diff --git a/books/bookvol10.4.pamphlet b/books/bookvol10.4.pamphlet index 76752eb..b3218e2 100644 --- a/books/bookvol10.4.pamphlet +++ b/books/bookvol10.4.pamphlet @@ -1304,6 +1304,485 @@ AlgebraicMultFact(OV,E,P) : C == T @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package ALGPKG AlgebraPackage} +\pagehead{AlgebraPackage}{ALGPKG} +\pagepic{ps/v104algebrapackage.ps}{ALGPKG}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package ALGPKG AlgebraPackage +++ Authors: J. Grabmeier, R. Wisbauer +++ Date Created: 04 March 1991 +++ Date Last Updated: 04 April 1992 +++ Basic Operations: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: rank, nucleus, nucloid, structural constants +++ Reference: +++ R.S. Pierce: Associative Algebras +++ Graduate Texts in Mathematics 88 +++ Springer-Verlag, Heidelberg, 1982, ISBN 0-387-90693-2 +++ +++ R.D. Schafer: An Introduction to Nonassociative Algebras +++ Academic Press, New York, 1966 +++ +++ A. Woerz-Busekros: Algebra in Genetics +++ Lectures Notes in Biomathematics 36, +++ Springer-Verlag, Heidelberg, 1980 +++ Description: +++ AlgebraPackage assembles a variety of useful functions for +++ general algebras. +AlgebraPackage(R:IntegralDomain, A: FramedNonAssociativeAlgebra(R)): _ + public == private where + + V ==> Vector + M ==> Matrix + I ==> Integer + NNI ==> NonNegativeInteger + REC ==> Record(particular: Union(V R,"failed"),basis: List V R) + LSMP ==> LinearSystemMatrixPackage(R,V R,V R, M R) + + public ==> with + + leftRank: A -> NonNegativeInteger + ++ leftRank(x) determines the number of linearly independent elements + ++ in \spad{x*b1},...,\spad{x*bn}, + ++ where \spad{b=[b1,...,bn]} is a basis. + rightRank: A -> NonNegativeInteger + ++ rightRank(x) determines the number of linearly independent elements + ++ in \spad{b1*x},...,\spad{bn*x}, + ++ where \spad{b=[b1,...,bn]} is a basis. + doubleRank: A -> NonNegativeInteger + ++ doubleRank(x) determines the number of linearly + ++ independent elements + ++ in \spad{b1*x},...,\spad{x*bn}, + ++ where \spad{b=[b1,...,bn]} is a basis. + weakBiRank: A -> NonNegativeInteger + ++ weakBiRank(x) determines the number of + ++ linearly independent elements + ++ in the \spad{bi*x*bj}, \spad{i,j=1,...,n}, + ++ where \spad{b=[b1,...,bn]} is a basis. + biRank: A -> NonNegativeInteger + ++ biRank(x) determines the number of linearly independent elements + ++ in \spad{x}, \spad{x*bi}, \spad{bi*x}, \spad{bi*x*bj}, + ++ \spad{i,j=1,...,n}, + ++ where \spad{b=[b1,...,bn]} is a basis. + ++ Note: if \spad{A} has a unit, + ++ then \spadfunFrom{doubleRank}{AlgebraPackage}, + ++ \spadfunFrom{weakBiRank}{AlgebraPackage} + ++ and \spadfunFrom{biRank}{AlgebraPackage} coincide. + basisOfCommutingElements: () -> List A + ++ basisOfCommutingElements() returns a basis of the space of + ++ all x of \spad{A} satisfying \spad{0 = commutator(x,a)} for all + ++ \spad{a} in \spad{A}. + basisOfLeftAnnihilator: A -> List A + ++ basisOfLeftAnnihilator(a) returns a basis of the space of + ++ all x of \spad{A} satisfying \spad{0 = x*a}. + basisOfRightAnnihilator: A -> List A + ++ basisOfRightAnnihilator(a) returns a basis of the space of + ++ all x of \spad{A} satisfying \spad{0 = a*x}. + basisOfLeftNucleus: () -> List A + ++ basisOfLeftNucleus() returns a basis of the space of + ++ all x of \spad{A} satisfying \spad{0 = associator(x,a,b)} + ++ for all \spad{a},b in \spad{A}. + basisOfRightNucleus: () -> List A + ++ basisOfRightNucleus() returns a basis of the space of + ++ all x of \spad{A} satisfying \spad{0 = associator(a,b,x)} + ++ for all \spad{a},b in \spad{A}. + basisOfMiddleNucleus: () -> List A + ++ basisOfMiddleNucleus() returns a basis of the space of + ++ all x of \spad{A} satisfying \spad{0 = associator(a,x,b)} + ++ for all \spad{a},b in \spad{A}. + basisOfNucleus: () -> List A + ++ basisOfNucleus() returns a basis of the space of + ++ all x of \spad{A} satisfying + ++ \spad{associator(x,a,b) = associator(a,x,b) = associator(a,b,x) = 0} + ++ for all \spad{a},b in \spad{A}. + basisOfCenter: () -> List A + ++ basisOfCenter() returns a basis of the space of + ++ all x of \spad{A} satisfying \spad{commutator(x,a) = 0} and + ++ \spad{associator(x,a,b) = associator(a,x,b) = associator(a,b,x) = 0} + ++ for all \spad{a},b in \spad{A}. + basisOfLeftNucloid:()-> List Matrix R + ++ basisOfLeftNucloid() returns a basis of the space of + ++ endomorphisms of \spad{A} as right module. + ++ Note: left nucloid coincides with left nucleus + ++ if \spad{A} has a unit. + basisOfRightNucloid:()-> List Matrix R + ++ basisOfRightNucloid() returns a basis of the space of + ++ endomorphisms of \spad{A} as left module. + ++ Note: right nucloid coincides with right nucleus + ++ if \spad{A} has a unit. + basisOfCentroid:()-> List Matrix R + ++ basisOfCentroid() returns a basis of the centroid, i.e. the + ++ endomorphism ring of \spad{A} considered as \spad{(A,A)}-bimodule. + radicalOfLeftTraceForm: () -> List A + ++ radicalOfLeftTraceForm() returns basis for null space of + ++ \spad{leftTraceMatrix()}, if the algebra is + ++ associative, alternative or a Jordan algebra, then this + ++ space equals the radical (maximal nil ideal) of the algebra. + if R has EuclideanDomain then + basis : V A -> V A + ++ basis(va) selects a basis from the elements of va. + + + private ==> add + + -- constants + + n : PositiveInteger := rank()$A + n2 : PositiveInteger := n*n + n3 : PositiveInteger := n*n2 + gamma : Vector Matrix R := structuralConstants()$A + + + -- local functions + + convVM : Vector R -> Matrix R + -- converts n2-vector to (n,n)-matrix row by row + convMV : Matrix R -> Vector R + -- converts n-square matrix to n2-vector row by row + convVM v == + cond : Matrix(R) := new(n,n,0$R)$M(R) + z : Integer := 0 + for i in 1..n repeat + for j in 1..n repeat + z := z+1 + setelt(cond,i,j,v.z) + cond + + + -- convMV m == + -- vec : Vector(R) := new(n*n,0$R) + -- z : Integer := 0 + -- for i in 1..n repeat + -- for j in 1..n repeat + -- z := z+1 + -- setelt(vec,z,elt(m,i,j)) + -- vec + + + radicalOfLeftTraceForm() == + ma : M R := leftTraceMatrix()$A + map(represents, nullSpace ma)$ListFunctions2(Vector R, A) + + + basisOfLeftAnnihilator a == + ca : M R := transpose (coordinates(a) :: M R) + cond : M R := reduce(vertConcat$(M R), + [ca*transpose(gamma.i) for i in 1..#gamma]) + map(represents, nullSpace cond)$ListFunctions2(Vector R, A) + + basisOfRightAnnihilator a == + ca : M R := transpose (coordinates(a) :: M R) + cond : M R := reduce(vertConcat$(M R), + [ca*(gamma.i) for i in 1..#gamma]) + map(represents, nullSpace cond)$ListFunctions2(Vector R, A) + + basisOfLeftNucloid() == + cond : Matrix(R) := new(n3,n2,0$R)$M(R) + condo: Matrix(R) := new(n3,n2,0$R)$M(R) + z : Integer := 0 + for i in 1..n repeat + for j in 1..n repeat + r1 : Integer := 0 + for k in 1..n repeat + z := z + 1 + -- z equals (i-1)*n*n+(j-1)*n+k (loop-invariant) + r2 : Integer := i + for r in 1..n repeat + r1 := r1 + 1 + -- here r1 equals (k-1)*n+r (loop-invariant) + setelt(cond,z,r1,elt(gamma.r,i,j)) + -- here r2 equals (r-1)*n+i (loop-invariant) + setelt(condo,z,r2,-elt(gamma.k,r,j)) + r2 := r2 + n + [convVM(sol) for sol in nullSpace(cond+condo)] + + basisOfCommutingElements() == + --gamma1 := first gamma + --gamma1 := gamma1 - transpose gamma1 + --cond : Matrix(R) := gamma1 :: Matrix(R) + --for i in 2..n repeat + -- gammak := gamma.i + -- gammak := gammak - transpose gammak + -- cond := vertConcat(cond, gammak :: Matrix(R))$Matrix(R) + --map(represents, nullSpace cond)$ListFunctions2(Vector R, A) + + cond : M R := reduce(vertConcat$(M R), + [(gam := gamma.i) - transpose gam for i in 1..#gamma]) + map(represents, nullSpace cond)$ListFunctions2(Vector R, A) + + basisOfLeftNucleus() == + condi: Matrix(R) := new(n3,n,0$R)$Matrix(R) + z : Integer := 0 + for k in 1..n repeat + for j in 1..n repeat + for s in 1..n repeat + z := z+1 + for i in 1..n repeat + entry : R := 0 + for l in 1..n repeat + entry := entry+elt(gamma.l,j,k)*elt(gamma.s,i,l)_ + -elt(gamma.l,i,j)*elt(gamma.s,l,k) + setelt(condi,z,i,entry)$Matrix(R) + map(represents, nullSpace condi)$ListFunctions2(Vector R,A) + + basisOfRightNucleus() == + condo : Matrix(R) := new(n3,n,0$R)$Matrix(R) + z : Integer := 0 + for k in 1..n repeat + for j in 1..n repeat + for s in 1..n repeat + z := z+1 + for i in 1..n repeat + entry : R := 0 + for l in 1..n repeat + entry := entry+elt(gamma.l,k,i)*elt(gamma.s,j,l) _ + -elt(gamma.l,j,k)*elt(gamma.s,l,i) + setelt(condo,z,i,entry)$Matrix(R) + map(represents, nullSpace condo)$ListFunctions2(Vector R,A) + + basisOfMiddleNucleus() == + conda : Matrix(R) := new(n3,n,0$R)$Matrix(R) + z : Integer := 0 + for k in 1..n repeat + for j in 1..n repeat + for s in 1..n repeat + z := z+1 + for i in 1..n repeat + entry : R := 0 + for l in 1..n repeat + entry := entry+elt(gamma.l,j,i)*elt(gamma.s,l,k) + -elt(gamma.l,i,k)*elt(gamma.s,j,l) + setelt(conda,z,i,entry)$Matrix(R) + map(represents, nullSpace conda)$ListFunctions2(Vector R,A) + + + basisOfNucleus() == + condi: Matrix(R) := new(3*n3,n,0$R)$Matrix(R) + z : Integer := 0 + u : Integer := n3 + w : Integer := 2*n3 + for k in 1..n repeat + for j in 1..n repeat + for s in 1..n repeat + z := z+1 + u := u+1 + w := w+1 + for i in 1..n repeat + entry : R := 0 + enter : R := 0 + ent : R := 0 + for l in 1..n repeat + entry := entry + elt(gamma.l,j,k)*elt(gamma.s,i,l) _ + - elt(gamma.l,i,j)*elt(gamma.s,l,k) + enter := enter + elt(gamma.l,k,i)*elt(gamma.s,j,l) _ + - elt(gamma.l,j,k)*elt(gamma.s,l,i) + ent := ent + elt(gamma.l,j,k)*elt(gamma.s,i,l) _ + - elt(gamma.l,j,i)*elt(gamma.s,l,k) + setelt(condi,z,i,entry)$Matrix(R) + setelt(condi,u,i,enter)$Matrix(R) + setelt(condi,w,i,ent)$Matrix(R) + map(represents, nullSpace condi)$ListFunctions2(Vector R,A) + + basisOfCenter() == + gamma1 := first gamma + gamma1 := gamma1 - transpose gamma1 + cond : Matrix(R) := gamma1 :: Matrix(R) + for i in 2..n repeat + gammak := gamma.i + gammak := gammak - transpose gammak + cond := vertConcat(cond, gammak :: Matrix(R))$Matrix(R) + B := cond :: Matrix(R) + condi: Matrix(R) := new(2*n3,n,0$R)$Matrix(R) + z : Integer := 0 + u : Integer := n3 + for k in 1..n repeat + for j in 1..n repeat + for s in 1..n repeat + z := z+1 + u := u+1 + for i in 1..n repeat + entry : R := 0 + enter : R := 0 + for l in 1..n repeat + entry := entry + elt(gamma.l,j,k)*elt(gamma.s,i,l) _ + - elt(gamma.l,i,j)*elt(gamma.s,l,k) + enter := enter + elt(gamma.l,k,i)*elt(gamma.s,j,l) _ + - elt(gamma.l,j,k)*elt(gamma.s,l,i) + setelt(condi,z,i,entry)$Matrix(R) + setelt(condi,u,i,enter)$Matrix(R) + D := vertConcat(condi,B)$Matrix(R) + map(represents, nullSpace D)$ListFunctions2(Vector R, A) + + basisOfRightNucloid() == + cond : Matrix(R) := new(n3,n2,0$R)$M(R) + condo: Matrix(R) := new(n3,n2,0$R)$M(R) + z : Integer := 0 + for i in 1..n repeat + for j in 1..n repeat + r1 : Integer := 0 + for k in 1..n repeat + z := z + 1 + -- z equals (i-1)*n*n+(j-1)*n+k (loop-invariant) + r2 : Integer := i + for r in 1..n repeat + r1 := r1 + 1 + -- here r1 equals (k-1)*n+r (loop-invariant) + setelt(cond,z,r1,elt(gamma.r,j,i)) + -- here r2 equals (r-1)*n+i (loop-invariant) + setelt(condo,z,r2,-elt(gamma.k,j,r)) + r2 := r2 + n + [convVM(sol) for sol in nullSpace(cond+condo)] + + basisOfCentroid() == + cond : Matrix(R) := new(2*n3,n2,0$R)$M(R) + condo: Matrix(R) := new(2*n3,n2,0$R)$M(R) + z : Integer := 0 + u : Integer := n3 + for i in 1..n repeat + for j in 1..n repeat + r1 : Integer := 0 + for k in 1..n repeat + z := z + 1 + u := u + 1 + -- z equals (i-1)*n*n+(j-1)*n+k (loop-invariant) + -- u equals n**3 + (i-1)*n*n+(j-1)*n+k (loop-invariant) + r2 : Integer := i + for r in 1..n repeat + r1 := r1 + 1 + -- here r1 equals (k-1)*n+r (loop-invariant) + setelt(cond,z,r1,elt(gamma.r,i,j)) + setelt(cond,u,r1,elt(gamma.r,j,i)) + -- here r2 equals (r-1)*n+i (loop-invariant) + setelt(condo,z,r2,-elt(gamma.k,r,j)) + setelt(condo,u,r2,-elt(gamma.k,j,r)) + r2 := r2 + n + [convVM(sol) for sol in nullSpace(cond+condo)] + + + doubleRank x == + cond : Matrix(R) := new(2*n,n,0$R) + for k in 1..n repeat + z : Integer := 0 + u : Integer := n + for j in 1..n repeat + z := z+1 + u := u+1 + entry : R := 0 + enter : R := 0 + for i in 1..n repeat + entry := entry + elt(x,i)*elt(gamma.k,j,i) + enter := enter + elt(x,i)*elt(gamma.k,i,j) + setelt(cond,z,k,entry)$Matrix(R) + setelt(cond,u,k,enter)$Matrix(R) + rank(cond)$(M R) + + weakBiRank(x) == + cond : Matrix(R) := new(n2,n,0$R)$Matrix(R) + z : Integer := 0 + for i in 1..n repeat + for j in 1..n repeat + z := z+1 + for k in 1..n repeat + entry : R := 0 + for l in 1..n repeat + for s in 1..n repeat + entry:=entry+elt(x,l)*elt(gamma.s,i,l)*elt(gamma.k,s,j) + setelt(cond,z,k,entry)$Matrix(R) + rank(cond)$(M R) + + biRank(x) == + cond : Matrix(R) := new(n2+2*n+1,n,0$R)$Matrix(R) + z : Integer := 0 + for j in 1..n repeat + for i in 1..n repeat + z := z+1 + for k in 1..n repeat + entry : R := 0 + for l in 1..n repeat + for s in 1..n repeat + entry:=entry+elt(x,l)*elt(gamma.s,i,l)*elt(gamma.k,s,j) + setelt(cond,z,k,entry)$Matrix(R) + u : Integer := n*n + w : Integer := n*(n+1) + c := n2 + 2*n + 1 + for j in 1..n repeat + u := u+1 + w := w+1 + for k in 1..n repeat + entry : R := 0 + enter : R := 0 + for i in 1..n repeat + entry := entry + elt(x,i)*elt(gamma.k,j,i) + enter := enter + elt(x,i)*elt(gamma.k,i,j) + setelt(cond,u,k,entry)$Matrix(R) + setelt(cond,w,k,enter)$Matrix(R) + setelt(cond,c,j, elt(x,j)) + rank(cond)$(M R) + + leftRank x == + cond : Matrix(R) := new(n,n,0$R) + for k in 1..n repeat + for j in 1..n repeat + entry : R := 0 + for i in 1..n repeat + entry := entry + elt(x,i)*elt(gamma.k,i,j) + setelt(cond,j,k,entry)$Matrix(R) + rank(cond)$(M R) + + rightRank x == + cond : Matrix(R) := new(n,n,0$R) + for k in 1..n repeat + for j in 1..n repeat + entry : R := 0 + for i in 1..n repeat + entry := entry + elt(x,i)*elt(gamma.k,j,i) + setelt(cond,j,k,entry)$Matrix(R) + rank(cond)$(M R) + + + if R has EuclideanDomain then + basis va == + v : V A := remove(zero?, va)$(V A) + v : V A := removeDuplicates v + empty? v => [0$A] + m : Matrix R := coerce(coordinates(v.1))$(Matrix R) + for i in 2..maxIndex v repeat + m := horizConcat(m,coerce(coordinates(v.i))$(Matrix R) ) + m := rowEchelon m + lj : List Integer := [] + h : Integer := 1 + mRI : Integer := maxRowIndex m + mCI : Integer := maxColIndex m + finished? : Boolean := false + j : Integer := 1 + while not finished? repeat + not zero? m(h,j) => -- corner found + lj := cons(j,lj) + h := mRI + while zero? m(h,j) repeat h := h-1 + finished? := (h = mRI) + if not finished? then h := h+1 + if j < mCI then + j := j + 1 + else + finished? := true + [v.j for j in reverse lj] + +@ +<>= +"ALGPKG" [color="#FF4488",href="bookvol10.4.pdf#nameddest=ALGPKG"] +"FRNAALG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FRNAALG"] +"ALGPKG" -> "FRNAALG" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package ALGFACT AlgFactor} \pagehead{AlgFactor}{ALGFACT} \pagepic{ps/v104algfactor.ps}{ALGFACT}{1.00} @@ -8888,6 +9367,50 @@ DrawComplex(): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package DRAWHACK DrawNumericHack} +\pagehead{DrawNumericHack}{DRAWHACK} +\pagepic{ps/v104drawnumerichack.ps}{DRAWHACK}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package DRAWHACK DrawNumericHack +++ Author: Manuel Bronstein +++ Date Created: 21 Feb 1990 +++ Date Last Updated: 21 Feb 1990 +++ Basic Operations: coerce +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: Hack for the draw interface. DrawNumericHack provides +++ a "coercion" from something of the form \spad{x = a..b} where \spad{a} +++ and b are +++ formal expressions to a binding of the form \spad{x = c..d} where c and d +++ are the numerical values of \spad{a} and b. This "coercion" fails if +++ \spad{a} and b contains symbolic variables, but is meant for expressions +++ involving %pi. +++ NOTE: This is meant for internal use only. + +DrawNumericHack(R:Join(OrderedSet,IntegralDomain,ConvertibleTo Float)): + with coerce: SegmentBinding Expression R -> SegmentBinding Float + ++ coerce(x = a..b) returns \spad{x = c..d} where c and d are the + ++ numerical values of \spad{a} and b. + == add + coerce s == + map(numeric$Numeric(R),s)$SegmentBindingFunctions2(Expression R, Float) + +@ +<>= +"DRAWHACK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=DRAWHACK"] +"ALGEBRA" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ALGEBRA"] +"DRAWHACK" -> "ALGEBRA" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package DROPT0 DrawOptionFunctions0} \pagehead{DrawOptionFunctions0}{DROPT0} \pagepic{ps/v104drawoptionfunctions0.ps}{DROPT0}{1.00} @@ -18926,6 +19449,272 @@ FiniteSetAggregateFunctions2(S, A, R, B): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FLOATCP FloatingComplexPackage} +\pagehead{FloatingComplexPackage}{FLOATCP} +\pagepic{ps/v104floatingcomplexpackage.ps}{FLOATCP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FLOATCP FloatingComplexPackage +++ Author: P. Gianni +++ Date Created: January 1990 +++ Date Last Updated: +++ Basic Functions: +++ Related Constructors: SystemSolvePackage, RadicalSolvePackage, +++ FloatingRealPackage +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This is a package for the approximation of complex solutions for +++ systems of equations of rational functions with complex rational +++ coefficients. The results are expressed as either complex rational +++ numbers or complex floats depending on the type of the precision +++ parameter which can be either a rational number or a floating point number. +FloatingComplexPackage(Par): Cat == Cap where + Par : Join(Field, OrderedRing) + K ==> GI + FPK ==> Fraction P K + C ==> Complex + I ==> Integer + NNI ==> NonNegativeInteger + P ==> Polynomial + EQ ==> Equation + L ==> List + SUP ==> SparseUnivariatePolynomial + RN ==> Fraction Integer + NF ==> Float + CF ==> Complex Float + GI ==> Complex Integer + GRN ==> Complex RN + SE ==> Symbol + RFI ==> Fraction P I + INFSP ==> InnerNumericFloatSolvePackage + + + Cat == with + + complexSolve: (L FPK,Par) -> L L EQ P C Par + ++ complexSolve(lp,eps) finds all the complex solutions to + ++ precision eps of the system lp of rational functions + ++ over the complex rationals with respect to all the + ++ variables appearing in lp. + + complexSolve: (L EQ FPK,Par) -> L L EQ P C Par + ++ complexSolve(leq,eps) finds all the complex solutions + ++ to precision eps of the system leq of equations + ++ of rational functions over complex rationals + ++ with respect to all the variables appearing in lp. + + complexSolve: (FPK,Par) -> L EQ P C Par + ++ complexSolve(p,eps) find all the complex solutions of the + ++ rational function p with complex rational coefficients + ++ with respect to all the variables appearing in p, + ++ with precision eps. + + complexSolve: (EQ FPK,Par) -> L EQ P C Par + ++ complexSolve(eq,eps) finds all the complex solutions of the + ++ equation eq of rational functions with rational rational coefficients + ++ with respect to all the variables appearing in eq, + ++ with precision eps. + + complexRoots : (FPK,Par) -> L C Par + ++ complexRoots(rf, eps) finds all the complex solutions of a + ++ univariate rational function with rational number coefficients. + ++ The solutions are computed to precision eps. + + complexRoots : (L FPK,L SE,Par) -> L L C Par + ++ complexRoots(lrf, lv, eps) finds all the complex solutions of a + ++ list of rational functions with rational number coefficients + ++ with respect the the variables appearing in lv. + ++ Each solution is computed to precision eps and returned as + ++ list corresponding to the order of variables in lv. + + Cap == add + + -- find the complex zeros of an univariate polynomial -- + complexRoots(q:FPK,eps:Par) : L C Par == + p:=numer q + complexZeros(univariate p,eps)$ComplexRootPackage(SUP GI, Par) + + -- find the complex zeros of an univariate polynomial -- + complexRoots(lp:L FPK,lv:L SE,eps:Par) : L L C Par == + lnum:=[numer p for p in lp] + lden:=[dp for p in lp |(dp:=denom p)^=1] + innerSolve(lnum,lden,lv,eps)$INFSP(K,C Par,Par) + + complexSolve(lp:L FPK,eps : Par) : L L EQ P C Par == + lnum:=[numer p for p in lp] + lden:=[dp for p in lp |(dp:=denom p)^=1] + lv:="setUnion"/[variables np for np in lnum] + if lden^=[] then + lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden]) + [[equation(x::(P C Par),r::(P C Par)) for x in lv for r in nres] + for nres in innerSolve(lnum,lden,lv,eps)$INFSP(K,C Par,Par)] + + complexSolve(le:L EQ FPK,eps : Par) : L L EQ P C Par == + lp:=[lhs ep - rhs ep for ep in le] + lnum:=[numer p for p in lp] + lden:=[dp for p in lp |(dp:=denom p)^=1] + lv:="setUnion"/[variables np for np in lnum] + if lden^=[] then + lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden]) + [[equation(x::(P C Par),r::(P C Par)) for x in lv for r in nres] + for nres in innerSolve(lnum,lden,lv,eps)$INFSP(K,C Par,Par)] + + complexSolve(p : FPK,eps : Par) : L EQ P C Par == + (mvar := mainVariable numer p ) case "failed" => + error "no variable found" + x:P C Par:=mvar::SE::(P C Par) + [equation(x,val::(P C Par)) for val in complexRoots(p,eps)] + + complexSolve(eq : EQ FPK,eps : Par) : L EQ P C Par == + complexSolve(lhs eq - rhs eq,eps) + +@ +<>= +"FLOATCP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FLOATCP"] +"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"] +"FLOATCP" -> "COMPCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FLOATRP FloatingRealPackage} +\pagehead{FloatingRealPackage}{FLOATRP} +\pagepic{ps/v104floatingrealpackage.ps}{FLOATRP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FLOATRP FloatingRealPackage +++ Author: P. Gianni +++ Date Created: January 1990 +++ Date Last Updated: +++ Basic Functions: +++ Related Constructors: SystemSolvePackage, RadicalSolvePackage, +++ FloatingComplexPackage +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This is a package for the approximation of real solutions for +++ systems of polynomial equations over the rational numbers. +++ The results are expressed as either rational numbers or floats +++ depending on the type of the precision parameter which can be +++ either a rational number or a floating point number. +FloatingRealPackage(Par): Cat == Cap where + I ==> Integer + NNI ==> NonNegativeInteger + P ==> Polynomial + EQ ==> Equation + L ==> List + SUP ==> SparseUnivariatePolynomial + RN ==> Fraction Integer + NF ==> Float + CF ==> Complex Float + GI ==> Complex Integer + GRN ==> Complex RN + SE ==> Symbol + RFI ==> Fraction P I + INFSP ==> InnerNumericFloatSolvePackage + + Par : Join(OrderedRing, Field) -- RN or NewFloat + + Cat == with + + solve: (L RFI,Par) -> L L EQ P Par + ++ solve(lp,eps) finds all of the real solutions of the + ++ system lp of rational functions over the rational numbers + ++ with respect to all the variables appearing in lp, + ++ with precision eps. + + solve: (L EQ RFI,Par) -> L L EQ P Par + ++ solve(leq,eps) finds all of the real solutions of the + ++ system leq of equationas of rational functions + ++ with respect to all the variables appearing in lp, + ++ with precision eps. + + solve: (RFI,Par) -> L EQ P Par + ++ solve(p,eps) finds all of the real solutions of the + ++ univariate rational function p with rational coefficients + ++ with respect to the unique variable appearing in p, + ++ with precision eps. + + solve: (EQ RFI,Par) -> L EQ P Par + ++ solve(eq,eps) finds all of the real solutions of the + ++ univariate equation eq of rational functions + ++ with respect to the unique variables appearing in eq, + ++ with precision eps. + + realRoots: (L RFI,L SE,Par) -> L L Par + ++ realRoots(lp,lv,eps) computes the list of the real + ++ solutions of the list lp of rational functions with rational + ++ coefficients with respect to the variables in lv, + ++ with precision eps. Each solution is expressed as a list + ++ of numbers in order corresponding to the variables in lv. + + realRoots : (RFI,Par) -> L Par + ++ realRoots(rf, eps) finds the real zeros of a univariate + ++ rational function with precision given by eps. + + Cap == add + + makeEq(nres:L Par,lv:L SE) : L EQ P Par == + [equation(x::(P Par),r::(P Par)) for x in lv for r in nres] + + -- find the real zeros of an univariate rational polynomial -- + realRoots(p:RFI,eps:Par) : L Par == + innerSolve1(numer p,eps)$INFSP(I,Par,Par) + + -- real zeros of the system of polynomial lp -- + realRoots(lp:L RFI,lv:L SE,eps: Par) : L L Par == + lnum:=[numer p for p in lp] + lden:=[dp for p in lp |(dp:=denom p)^=1] + innerSolve(lnum,lden,lv,eps)$INFSP(I,Par,Par) + + solve(lp:L RFI,eps : Par) : L L EQ P Par == + lnum:=[numer p for p in lp] + lden:=[dp for p in lp |(dp:=denom p)^=1] + lv:="setUnion"/[variables np for np in lnum] + if lden^=[] then + lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden]) + [makeEq(numres,lv) for numres + in innerSolve(lnum,lden,lv,eps)$INFSP(I,Par,Par)] + + solve(le:L EQ RFI,eps : Par) : L L EQ P Par == + lp:=[lhs ep - rhs ep for ep in le] + lnum:=[numer p for p in lp] + lden:=[dp for p in lp |(dp:=denom p)^=1] + lv:="setUnion"/[variables np for np in lnum] + if lden^=[] then + lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden]) + [makeEq(numres,lv) for numres + in innerSolve(lnum,lden,lv,eps)$INFSP(I,Par,Par)] + + solve(p : RFI,eps : Par) : L EQ P Par == + (mvar := mainVariable numer p ) case "failed" => + error "no variable found" + x:P Par:=mvar::SE::(P Par) + [equation(x,val::(P Par)) for val in realRoots(p,eps)] + + solve(eq : EQ RFI,eps : Par) : L EQ P Par == + solve(lhs eq - rhs eq,eps) + +@ +<>= +"FLOATRP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FLOATRP"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"FLOATRP" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package FCPAK1 FortranCodePackage1} \pagehead{FortranCodePackage1}{FCPAK1} \pagepic{ps/v104fortrancodepackage1.ps}{FCPAK1}{1.00} @@ -19996,6 +20785,68 @@ FractionFunctions2(A, B): Exports == Impl where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FRNAAF2 FramedNonAssociativeAlgebraFunctions2} +\pagehead{FramedNonAssociativeAlgebraFunctions2}{FRNAAF2} +\pagepic{ps/v104framednonassociativealgebrafunctions2.ps}{FRNAAF2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FRNAAF2 FramedNonAssociativeAlgebraFunctions2 +++ Author: Johannes Grabmeier +++ Date Created: 28 February 1992 +++ Date Last Updated: 28 February 1992 +++ Basic Operations: map +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: non-associative algebra +++ References: +++ Description: +++ FramedNonAssociativeAlgebraFunctions2 implements functions between +++ two framed non associative algebra domains defined over different rings. +++ The function map is used to coerce between algebras over different +++ domains having the same structural constants. + +FramedNonAssociativeAlgebraFunctions2(AR,R,AS,S) : Exports == + Implementation where + R : CommutativeRing + S : CommutativeRing + AR : FramedNonAssociativeAlgebra R + AS : FramedNonAssociativeAlgebra S + V ==> Vector + Exports ==> with + map: (R -> S, AR) -> AS + ++ map(f,u) maps f onto the coordinates of u to get an element + ++ in \spad{AS} via identification of the basis of \spad{AR} + ++ as beginning part of the basis of \spad{AS}. + Implementation ==> add + map(fn : R -> S, u : AR): AS == + rank()$AR > rank()$AS => error("map: ranks of algebras do not fit") + vr : V R := coordinates u + vs : V S := map(fn,vr)$VectorFunctions2(R,S) +@ +This line used to read: +\begin{verbatim} + rank()$AR = rank()$AR => represents(vs)$AS +\end{verbatim} +but the test is clearly always true and cannot be what was intended. +Gregory Vanuxem supplied the fix below. +<>= + rank()$AR = rank()$AS => represents(vs)$AS + ba := basis()$AS + represents(vs,[ba.i for i in 1..rank()$AR]) + +@ +<>= +"FRNAAF2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FRNAAF2"] +"FRNAALG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FRNAALG"] +"FRNAAF2" -> "FRNAALG" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package FSPECF FunctionalSpecialFunction} \pagehead{FunctionalSpecialFunction}{FSPECF} \pagepic{ps/v104functionalspecialfunction.ps}{FSPECF}{1.00} @@ -34025,6 +34876,423 @@ InnerNormalBasisFieldFunctions(GF): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package INEP InnerNumericEigenPackage} +\pagehead{InnerNumericEigenPackage}{INEP} +\pagepic{ps/v104innernumericeigenpackage.ps}{INEP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package INEP InnerNumericEigenPackage +++ Author:P. Gianni +++ Date Created: Summer 1990 +++ Date Last Updated:Spring 1991 +++ Basic Functions: +++ Related Constructors: ModularField +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This package is the inner package to be used by NumericRealEigenPackage +++ and NumericComplexEigenPackage for the computation of numeric +++ eigenvalues and eigenvectors. +InnerNumericEigenPackage(K,F,Par) : C == T + where + F : Field -- this is the field where the answer will be + -- for dealing with the complex case + K : Field -- type of the input + Par : Join(Field,OrderedRing) -- it will be NF or RN + + SE ==> Symbol() + RN ==> Fraction Integer + I ==> Integer + NF ==> Float + CF ==> Complex Float + GRN ==> Complex RN + GI ==> Complex Integer + PI ==> PositiveInteger + NNI ==> NonNegativeInteger + MRN ==> Matrix RN + + MK ==> Matrix K + PK ==> Polynomial K + MF ==> Matrix F + SUK ==> SparseUnivariatePolynomial K + SUF ==> SparseUnivariatePolynomial F + SUP ==> SparseUnivariatePolynomial + MSUK ==> Matrix SUK + + PEigenForm ==> Record(algpol:SUK,almult:Integer,poleigen:List(MSUK)) + + outForm ==> Record(outval:F,outmult:Integer,outvect:List MF) + + IntForm ==> Union(outForm,PEigenForm) + UFactor ==> (SUK -> Factored SUK) + C == with + + charpol : MK -> SUK + ++ charpol(m) computes the characteristic polynomial of a matrix + ++ m with entries in K. + ++ This function returns a polynomial + ++ over K, while the general one (that is in EiegenPackage) returns + ++ Fraction P K + + solve1 : (SUK, Par) -> List F + ++ solve1(pol, eps) finds the roots of the univariate polynomial + ++ polynomial pol to precision eps. If K is \spad{Fraction Integer} + ++ then only the real roots are returned, if K is + ++ \spad{Complex Fraction Integer} then all roots are found. + + innerEigenvectors : (MK,Par,UFactor) -> List(outForm) + ++ innerEigenvectors(m,eps,factor) computes explicitly + ++ the eigenvalues and the correspondent eigenvectors + ++ of the matrix m. The parameter eps determines the type of + ++ the output, factor is the univariate factorizer to br used + ++ to reduce the characteristic polynomial into irreducible factors. + + T == add + + numeric(r:K):F == + K is RN => + F is NF => convert(r)$RN + F is RN => r + F is CF => r :: RN :: CF + F is GRN => r::RN::GRN + K is GRN => + F is GRN => r + F is CF => convert(convert r) + error "unsupported coefficient type" + + ---- next functions neeeded for defining ModularField ---- + + monicize(f:SUK) : SUK == + (a:=leadingCoefficient f) =1 => f + inv(a)*f + + reduction(u:SUK,p:SUK):SUK == u rem p + + merge(p:SUK,q:SUK):Union(SUK,"failed") == + p = q => p + p = 0 => q + q = 0 => p + "failed" + + exactquo(u:SUK,v:SUK,p:SUK):Union(SUK,"failed") == + val:=extendedEuclidean(v,p,u) + val case "failed" => "failed" + val.coef1 + + ---- eval a vector of F in a radical expression ---- + evalvect(vect:MSUK,alg:F) : MF == + n:=nrows vect + w:MF:=zero(n,1)$MF + for i in 1..n repeat + polf:=map(numeric, + vect(i,1))$UnivariatePolynomialCategoryFunctions2(K,SUK,F,SUF) + v:F:=elt(polf,alg) + setelt(w,i,1,v) + w + + ---- internal function for the computation of eigenvectors ---- + inteigen(A:MK,p:SUK,fact:UFactor) : List(IntForm) == + dimA:NNI:= nrows A + MM:=ModularField(SUK,SUK,reduction,merge,exactquo) + AM:=Matrix(MM) + lff:=factors fact(p) + res: List IntForm :=[] + lr : List MF:=[] + for ff in lff repeat + pol:SUK:= ff.factor + if (degree pol)=1 then + alpha:K:=-coefficient(pol,0)/leadingCoefficient pol + -- compute the eigenvectors, rational case + B1:MK := zero(dimA,dimA)$MK + for i in 1..dimA repeat + for j in 1..dimA repeat B1(i,j):=A(i,j) + B1(i,i):= B1(i,i) - alpha + lr:=[] + for vecr in nullSpace B1 repeat + wf:MF:=zero(dimA,1) + for i in 1..dimA repeat wf(i,1):=numeric vecr.i + lr:=cons(wf,lr) + res:=cons([numeric alpha,ff.exponent,lr]$outForm,res) + else + ppol:=monicize pol + alg:MM:= reduce(monomial(1,1),ppol) + B:AM:= zero(dimA,dimA)$AM + for i in 1..dimA repeat + for j in 1..dimA repeat B(i,j):=reduce(A(i,j) ::SUK,ppol) + B(i,i):=B(i,i) - alg + sln2:=nullSpace B + soln:List MSUK :=[] + for vec in sln2 repeat + wk:MSUK:=zero(dimA,1) + for i in 1..dimA repeat wk(i,1):=(vec.i)::SUK + soln:=cons(wk,soln) + res:=cons([ff.factor,ff.exponent,soln]$PEigenForm, + res) + res + + if K is RN then + solve1(up:SUK, eps:Par) : List(F) == + denom := "lcm"/[denom(c::RN) for c in coefficients up] + up:=denom*up + upi := map(numer,up)$UnivariatePolynomialCategoryFunctions2(RN,SUP RN,I,SUP I) + innerSolve1(upi, eps)$InnerNumericFloatSolvePackage(I,F,Par) + else if K is GRN then + solve1(up:SUK, eps:Par) : List(F) == + denom := "lcm"/[lcm(denom real(c::GRN), denom imag(c::GRN)) + for c in coefficients up] + up:=denom*up + upgi := map(complex(numer(real #1), numer(imag #1)), + up)$UnivariatePolynomialCategoryFunctions2(GRN,SUP GRN,GI,SUP GI) + innerSolve1(upgi, eps)$InnerNumericFloatSolvePackage(GI,F,Par) + else error "unsupported matrix type" + + ---- the real eigenvectors expressed as floats ---- + + innerEigenvectors(A:MK,eps:Par,fact:UFactor) : List outForm == + pol:= charpol A + sln1:List(IntForm):=inteigen(A,pol,fact) + n:=nrows A + sln:List(outForm):=[] + for lev in sln1 repeat + lev case outForm => sln:=cons(lev,sln) + leva:=lev::PEigenForm + lval:List(F):= solve1(leva.algpol,eps) + lvect:=leva.poleigen + lmult:=leva.almult + for alg in lval repeat + nsl:=[alg,lmult,[evalvect(ep,alg) for ep in lvect]]$outForm + sln:=cons(nsl,sln) + sln + + charpol(A:MK) : SUK == + dimA :PI := (nrows A):PI + dimA ^= ncols A => error " The matrix is not square" + B:Matrix SUK :=zero(dimA,dimA) + for i in 1..dimA repeat + for j in 1..dimA repeat B(i,j):=A(i,j)::SUK + B(i,i) := B(i,i) - monomial(1,1)$SUK + determinant B + + +@ +<>= +"INEP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=INEP"] +"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"] +"INEP" -> "COMPCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package INFSP InnerNumericFloatSolvePackage} +\pagehead{InnerNumericFloatSolvePackage}{INFSP} +\pagepic{ps/v104innernumericfloatsolvepackage.ps}{INFSP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package INFSP InnerNumericFloatSolvePackage +++ Author: P. Gianni +++ Date Created: January 1990 +++ Date Last Updated: +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This is an internal package +++ for computing approximate solutions to systems of polynomial equations. +++ The parameter K specifies the coefficient field of the input polynomials +++ and must be either \spad{Fraction(Integer)} or \spad{Complex(Fraction Integer)}. +++ The parameter F specifies where the solutions must lie and can +++ be one of the following: \spad{Float}, \spad{Fraction(Integer)}, \spad{Complex(Float)}, +++ \spad{Complex(Fraction Integer)}. The last parameter specifies the type +++ of the precision operand and must be either \spad{Fraction(Integer)} or \spad{Float}. +InnerNumericFloatSolvePackage(K,F,Par): Cat == Cap where + F : Field -- this is the field where the answer will be + K : GcdDomain -- type of the input + Par : Join(Field, OrderedRing ) -- it will be NF or RN + + I ==> Integer + NNI ==> NonNegativeInteger + P ==> Polynomial + EQ ==> Equation + L ==> List + SUP ==> SparseUnivariatePolynomial + RN ==> Fraction Integer + NF ==> Float + CF ==> Complex Float + GI ==> Complex Integer + GRN ==> Complex RN + SE ==> Symbol + RFI ==> Fraction P I + + Cat == with + + innerSolve1 : (SUP K,Par) -> L F + ++ innerSolve1(up,eps) returns the list of the zeros + ++ of the univariate polynomial up with precision eps. + innerSolve1 : (P K,Par) -> L F + ++ innerSolve1(p,eps) returns the list of the zeros + ++ of the polynomial p with precision eps. + innerSolve : (L P K,L P K,L SE,Par) -> L L F + ++ innerSolve(lnum,lden,lvar,eps) returns a list of + ++ solutions of the system of polynomials lnum, with + ++ the side condition that none of the members of lden + ++ vanish identically on any solution. Each solution + ++ is expressed as a list corresponding to the list of + ++ variables in lvar and with precision specified by eps. + makeEq : (L F,L SE) -> L EQ P F + ++ makeEq(lsol,lvar) returns a list of equations formed + ++ by corresponding members of lvar and lsol. + + Cap == add + + ------ Local Functions ------ + isGeneric? : (L P K,L SE) -> Boolean + evaluate : (P K,SE,SE,F) -> F + numeric : K -> F + oldCoord : (L F,L I) -> L F + findGenZeros : (L P K,L SE,Par) -> L L F + failPolSolve : (L P K,L SE) -> Union(L L P K,"failed") + + numeric(r:K):F == + K is I => + F is Float => r::I::Float + F is RN => r::I::RN + F is CF => r::I::CF + F is GRN => r::I::GRN + K is GI => + gr:GI := r::GI + F is GRN => complex(real(gr)::RN,imag(gr)::RN)$GRN + F is CF => convert(gr) + error "case not handled" + + -- construct the equation + makeEq(nres:L F,lv:L SE) : L EQ P F == + [equation(x::(P F),r::(P F)) for x in lv for r in nres] + + evaluate(pol:P K,xvar:SE,zvar:SE,z:F):F == + rpp:=map(numeric,pol)$PolynomialFunctions2(K,F) + rpp := eval(rpp,zvar,z) + upol:=univariate(rpp,xvar) + retract(-coefficient(upol,0))/retract(leadingCoefficient upol) + + myConvert(eps:Par) : RN == + Par is RN => eps + Par is NF => retract(eps)$NF + + innerSolve1(pol:P K,eps:Par) : L F == innerSolve1(univariate pol,eps) + + innerSolve1(upol:SUP K,eps:Par) : L F == + K is GI and (Par is RN or Par is NF) => + (complexZeros(upol, + eps)$ComplexRootPackage(SUP K,Par)) pretend L(F) + K is I => + F is Float => + z:= realZeros(upol,myConvert eps)$RealZeroPackage(SUP I) + [convert((1/2)*(x.left+x.right))@Float for x in z] pretend L(F) + + F is RN => + z:= realZeros(upol,myConvert eps)$RealZeroPackage(SUP I) + [(1/2)*(x.left + x.right) for x in z] pretend L(F) + error "improper arguments to INFSP" + error "improper arguments to INFSP" + + + -- find the zeros of components in "generic" position -- + findGenZeros(lp:L P K,rlvar:L SE,eps:Par) : L L F == + rlp:=reverse lp + f:=rlp.first + zvar:= rlvar.first + rlp:=rlp.rest + lz:=innerSolve1(f,eps) + [reverse cons(z,[evaluate(pol,xvar,zvar,z) for pol in rlp + for xvar in rlvar.rest]) for z in lz] + + -- convert to the old coordinates -- + oldCoord(numres:L F,lval:L I) : L F == + rnumres:=reverse numres + rnumres.first:= rnumres.first + + (+/[n*nr for n in lval for nr in rnumres.rest]) + reverse rnumres + + -- real zeros of a system of 2 polynomials lp (incomplete) + innerSolve2(lp:L P K,lv:L SE,eps: Par):L L F == + mainvar := first lv + up1:=univariate(lp.1, mainvar) + up2:=univariate(lp.2, mainvar) + vec := subresultantVector(up1,up2)$SubResultantPackage(P K,SUP P K) + p0 := primitivePart multivariate(vec.0, mainvar) + p1 := primitivePart(multivariate(vec.1, mainvar),mainvar) + zero? p1 or + gcd(p0, leadingCoefficient(univariate(p1,mainvar))) ^=1 => + innerSolve(cons(0,lp),empty(),lv,eps) + findGenZeros([p1, p0], reverse lv, eps) + + -- real zeros of the system of polynomial lp -- + innerSolve(lp:L P K,ld:L P K,lv:L SE,eps: Par) : L L F == + -- empty?(ld) and (#lv = 2) and (# lp = 2) => innerSolve2(lp, lv, eps) + lnp:= [pToDmp(p)$PolToPol(lv,K) for p in lp] + OV:=OrderedVariableList(lv) + lvv:L OV:= [variable(vv)::OV for vv in lv] + DP:=DirectProduct(#lv,NonNegativeInteger) + dmp:=DistributedMultivariatePolynomial(lv,K) + lq:L dmp:=[] + if ld^=[] then + lq:= [(pToDmp(q1)$PolToPol(lv,K)) pretend dmp for q1 in ld] + partRes:=groebSolve(lnp,lvv)$GroebnerSolve(lv,K,K) pretend (L L dmp) + partRes=list [] => [] + -- remove components where denominators vanish + if lq^=[] then + gb:=GroebnerInternalPackage(K,DirectProduct(#lv,NNI),OV,dmp) + partRes:=[pr for pr in partRes| + and/[(redPol(fq,pr pretend List(dmp))$gb) ^=0 + for fq in lq]] + + -- select the components in "generic" form + rlv:=reverse lv + rrlvv:= rest reverse lvv + + listGen:L L dmp:=[] + for res in partRes repeat + res1:=rest reverse res + "and"/[("max"/degree(f,rrlvv))=1 for f in res1] => + listGen:=concat(res pretend (L dmp),listGen) + result:L L F := [] + if listGen^=[] then + listG :L L P K:= + [[dmpToP(pf)$PolToPol(lv,K) for pf in pr] for pr in listGen] + result:= + "append"/[findGenZeros(res,rlv,eps) for res in listG] + for gres in listGen repeat + partRes:=delete(partRes,position(gres,partRes)) + -- adjust the non-generic components + for gres in partRes repeat + genRecord := genericPosition(gres,lvv)$GroebnerSolve(lv,K,K) + lgen := genRecord.dpolys + lval := genRecord.coords + lgen1:=[dmpToP(pf)$PolToPol(lv,K) for pf in lgen] + lris:=findGenZeros(lgen1,rlv,eps) + result:= append([oldCoord(r,lval) for r in lris],result) + result + +@ +<>= +"INFSP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=INFSP"] +"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"] +"INFSP" -> "COMPCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package ITRIGMNP InnerTrigonometricManipulations} \pagehead{InnerTrigonometricManipulations}{ITRIGMNP} \pagepic{ps/v104innertrigonometricmanipulations.ps}{ITRIGMNP}{1.00} @@ -34957,6 +36225,826 @@ IntegerLinearDependence(R): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package INTHEORY IntegerNumberTheoryFunctions} +<>= +-- numtheor.spad.pamphlet IntegerNumberTheoryFunctions.input +)spool IntegerNumberTheoryFunctions.output +)set message test on +)set message auto off +)clear all +div144 := divisors(144) +--R +--R +--R (1) [1,2,3,4,6,8,9,12,16,18,24,36,48,72,144] +--R Type: List Integer +#(div144) +--R +--R +--R (2) 15 +--R Type: PositiveInteger +reduce(+,div144) +--R +--R +--R (3) 403 +--R Type: PositiveInteger +numberOfDivisors(144) +--R +--R +--R (4) 15 +--R Type: PositiveInteger +sumOfDivisors(144) +--R +--R +--R (5) 403 +--R Type: PositiveInteger +f1(n)==reduce(+,[moebiusMu(d)*numberOfDivisors(quo(n,d))_ + for d in divisors(n)]) +--R +--R Type: Void +f1(200) +--R +--R Compiling function f1 with type PositiveInteger -> Integer +--R +--R (7) 1 +--R Type: PositiveInteger +f1(846) +--R +--R +--R (8) 1 +--R Type: PositiveInteger +f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d))_ + for d in divisors(n)]) +--R +--R Type: Void +f2(200) +--R +--R Compiling function f2 with type PositiveInteger -> Integer +--R +--R (10) 200 +--R Type: PositiveInteger +f2(846) +--R +--R +--R (11) 846 +--R Type: PositiveInteger +fibonacci(25) +--R +--R +--R (12) 75025 +--R Type: PositiveInteger +[fibonacci(n) for n in 1..15] +--R +--R +--R (13) [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] +--R Type: List Integer +fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)]) +--R +--R Type: Void +fib(25) +--R +--R Compiling function fib with type PositiveInteger -> Integer +--R +--R (15) 75025 +--R Type: PositiveInteger +[fib(n) for n in 1..15] +--R +--R +--R (16) [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] +--R Type: List Integer +legendre(3,5) +--R +--R +--R (17) - 1 +--R Type: Integer +legendre(23,691) +--R +--R +--R (18) - 1 +--R Type: Integer +h(d) == quo(reduce(+,[jacobi(d,k) for k in 1..quo(-d, 2)]),2-jacobi(d,2)) +--R +--R Type: Void +h(-163) +--R +--R Compiling function h with type Integer -> Integer +--R +--R (20) 1 +--R Type: PositiveInteger +h(-499) +--R +--R +--R (21) 3 +--R Type: PositiveInteger +h(-1832) +--R +--R +--R (22) 26 +--R Type: PositiveInteger +inverse:(INT,INT)->INT +--R +--R Type: Void +inverse(a,b) == + borg:INT:=b + c1:INT := 1 + d1:INT := 0 + while b ~= 0 repeat + q := a quo b + r := a-q*b + print [a, "=", q, "*(", b, ")+", r] + (a,b):=(b,r) + (c1,d1):=(d1,c1-q*d1) + a ~= 1 => error("moduli are not relatively prime") + positiveRemainder(c1,borg) +--R +--R Type: Void +inverse(15,26) +--R +--R Compiling function inverse with type (Integer,Integer) -> Integer +--R [15,"=",0,"*(",26,")+",15] +--R [26,"=",1,"*(",15,")+",11] +--R [15,"=",1,"*(",11,")+",4] +--R [11,"=",2,"*(",4,")+",3] +--R [4,"=",1,"*(",3,")+",1] +--R [3,"=",3,"*(",1,")+",0] +--R +--R (25) 7 +--R Type: PositiveInteger +x1:=4 +--R +--R +--R (26) 4 +--R Type: PositiveInteger +m1:=5 +--R +--R +--R (27) 5 +--R Type: PositiveInteger +x2:=2 +--R +--R +--R (28) 2 +--R Type: PositiveInteger +m2:=3 +--R +--R +--R (29) 3 +--R Type: PositiveInteger +result:=chineseRemainder(x1,m1,x2,m2) +--R +--R +--R (30) 14 +--R Type: PositiveInteger +)spool +)lisp (bye) +@ +<>= +==================================================================== +IntegerNumberTheoryFunctions examples +==================================================================== + +The IntegerNumberTheoryFunctions package contains a variety of operations +of interest to number theorists. Many of these operations deal with +divisibility properties of integers. (Recall that an integer a divides +an integer b if there is an integer c such that b = a * c.) + +The operation divisors returns a list of the divisors of an integer. + + div144 := divisors(144) + [1,2,3,4,6,8,9,12,16,18,24,36,48,72,144] + Type: List Integer + +You can now compute the number of divisors of 144 and the sum of the +divisors of 144 by counting and summing the elements of the list we +just created. + + #(div144) + 15 + Type: PositiveInteger + + reduce(+,div144) + 403 + Type: PositiveInteger + +Of course, you can compute the number of divisors of an integer n, +usually denoted d(n), and the sum of the divisors of an integer n, +usually denoted sigma(n), without ever listing the divisors of n. + +In Axiom, you can simply call the operations numberOfDivisors and +sumOfDivisors. + + numberOfDivisors(144) + 15 + Type: PositiveInteger + + sumOfDivisors(144) + 403 + Type: PositiveInteger + +The key is that d(n) and sigma(n) are "multiplicative functions." +This means that when n and m are relatively prime, that is, when +n and m have no prime factor in common, then d(nm) = d(n) d(m) and +sigma(nm) = sigma(n) sigma(m). Note that these functions are trivial to +compute when n is a prime power and are computed for general n from the +prime factorization of n. Other examples of multiplicative functions +are sigma_k(n), the sum of the k-th powers of the divisors of n and +varphi(n), the number of integers between 1 and n which are prime to n. +The corresponding Axiom operations are called sumOfKthPowerDivisors and +eulerPhi. + +An interesting function is mu(n), the Moebius mu function, defined as +follows: mu(1) = 1, mu(n) = 0, when n is divisible by a square, and +mu = (-1)^k, when n is the product of k distinct primes. The corresponding +Axiom operation is moebiusMu. This function occurs in the following theorem: + +Theorem: (Moebius Inversion Formula): + Let f(n) be a function on the positive integers and let F(n) + be defined by + F(n) = \sum_{d | n} f(n) + the sum of f(n) over d | n where the sum is taken over the + positive divisors of n. Then the values of f(n) can be recovered + from the values of F(n): f(n) = sum_{d | n} \mu(n) F(n/d) where + again the sum is taken over the positive divisors of n. + +When f(n) = 1, then F(n) = d(n). Thus, if you sum mu(d)..d(n/d) over +the positive divisors d of n, you should always get 1. + + f1(n)==reduce(+,[moebiusMu(d)*numberOfDivisors(quo(n,d))_ + for d in divisors(n)]) + Type: Void + + f1(200) + 1 + Type: PositiveInteger + + f1(846) + 1 + Type: PositiveInteger + +Similarly, when f(n) = n, then F(n) = sigma(n). Thus, if you sum +mu(d)..sigma(n/d) over the positive divisors d of n, you should always get n. + + f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d))_ + for d in divisors(n)]) + Type: Void + + f2(200) + 200 + Type: PositiveInteger + + f2(846) + 846 + Type: PositiveInteger + +The Fibonacci numbers are defined by + F(1) = F(2) = 1 and + F(n) = F(n-1) + F(n-2) for n = 3,4,... + +The operation fibonacci computes the n-th Fibonacci number. + + fibonacci(25) + 75025 + Type: PositiveInteger + + [fibonacci(n) for n in 1..15] + [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] + Type: List Integer + +Fibonacci numbers can also be expressed as sums of binomial coefficients. + + fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)]) + Type: Void + + fib(25) + 75025 + Type: PositiveInteger + + [fib(n) for n in 1..15] + [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] + Type: List Integer + +Quadratic symbols can be computed with the operations legendre and +jacobi. The Legendre symbol a/p is defined for integers a and p with +p an odd prime number. By definition, + + (a/p) = +1, when a is a square (mod p), + (a/p)= -1, when a is not a square (mod p), and + (a/p) = 0, when a is divisible by p. + +You compute (a/p) via the command legendre(a,p). + + legendre(3,5) + - 1 + Type: Integer + + legendre(23,691) + - 1 + Type: Integer + +The Jacobi symbol (a/n) is the usual extension of the Legendre symbol, +where n is an arbitrary integer. The most important property of the +Jacobi symbol is the following: if K is a quadratic field with +discriminant d and quadratic character chi, then chi(n) = (d/n). +Thus, you can use the Jacobi symbol to compute, say, the class numbers +of imaginary quadratic fields from a standard class number formula. + +This function computes the class number of the imaginary quadratic +field with discriminant d. + + h(d) == quo(reduce(+,[jacobi(d,k) for k in 1..quo(-d, 2)]),2-jacobi(d,2)) + Type: Void + + h(-163) + 1 + Type: PositiveInteger + + h(-499) + 3 + Type: PositiveInteger + + h(-1832) + 26 + Type: PositiveInteger + +==================================================================== +The inverse function +==================================================================== + +The inverse function is derived from the Extended Euclidean Algorithm. +If we divide one integer by another nonzero integer we get an integer +quotient plus a remainder which is, in general, a rational number. +For instance, + 13/5 = 2 + 3/5 +where 2 is the quotient and 3/5 is the remainder. + +If we multiply thru by the denominator of the remainder we get an answer +in integer terms which no longer involves division: + 13 = 2(5) + 3 + +This gives a method of dividing integers. Specifically, if a and b are +positive integers, there exist unique non-negative integers q and r so that + + a = qb + r , where 0 <= r < b + +q is called the quotient and r the remainder. + +The greatest common divisor of integers a and b, denoted by gcd(a,b), +is the largest integer that divides (without remainder) both a and +b. So, for example: + gcd(15, 5) = 5, + gcd(7, 9) = 1, + gcd(12, 9) = 3, + gcd(81, 57) = 3. + +The gcd of two integers can be found by repeated application of the +division algorithm, this is known as the Euclidean Algorithm. You +repeatedly divide the divisor by the remainder until the remainder is +0. The gcd is the last non-zero remainder in this algorithm. The +following example shows the algorithm. + +Finding the gcd of 81 and 57 by the Euclidean Algorithm: + 81 = 1(57) + 24 + 57 = 2(24) + 9 + 24 = 2(9) + 6 + 9 = 1(6) + 3 + 6 = 2(3) + 0 + +So the greatest commmon divisor, the GCD(81,51)=3. + +If the gcd(a, b) = r then there exist integers s and t so that + + s(a) + t(b) = r + +By back substitution in the steps in the Euclidean Algorithm, it is +possible to find these integers s and t. We shall do this with the +above example: + +Starting with the next to last line, we have: + + 3 = 9 -1(6) + +From the line before that, we see that 6 = 24 - 2(9), so: + + 3 = 9 - 1(24 - 2(9)) = 3(9) - 1(24) + +From the line before that, we have 9 = 57 - 2(24), so: + + 3 = 3( 57 - 2(24)) - 1(24) = 3(57) - 7(24) + +And, from the line before that 24 = 81 - 1(57), giving us: + + 3 = 3(57) - 7( 81 - 1(57)) = 10(57) -7(81) + +So we have found s = -7 and t = 10. + +The Extended Euclidean Algorithm computes the GCD(a,b) and +the values for s and t. + +Suppose we were doing arithmetics modulo 26 and we needed to find the +inverse of a number mod 26. This turned out to be a difficult task (and +not always possible). We observed that a number x had an inverse mod 26 +(i.e., a number y so that xy = 1 mod 26) if and only if gcd(x,26) = 1. +In the general case the inverse of x exists if and only if gcd(x, n) = 1 +and if it exists then there exist integers s and t so that + + sx + tn = 1 + +But this says that sx = 1 + (-t)n, or in other words, + + sx == 1 mod n + +So, s (reduced mod n if need be) is the inverse of x mod n. +The extended Euclidean algorithm calculates s efficiently. + +==================================================================== +Finding the inverse mod n +==================================================================== + +We will number the steps of the Euclidean algorithm starting with step 0. +The quotient obtained at step i will be denoted by qi and an auxillary +number, si. For the first two steps, the value of this number is given: + s(0) = 0 and + s(1) = 1. + +For the remainder of the steps, we recursively calculate + s(i) = s(i-2) - s(i-1) q(i-2) mod n + +The algorithm starts by "dividing" n by x. If the last non-zero remainder +occurs at step k, then if this remainder is 1, x has an inverse and it is +s(k+2). If the remainder is not 1, then x does not have an inverse. + +For example, find the inverse of 15 mod 26. + +Step 0: 26 = 1(15) + 11 s(0) = 0 +Step 1: 15 = 1(11) + 4 s(1) = 1 +Step 2: 11 = 2(4) + 3 s(2) = 0 - 1( 1) mod 26 = 25 +Step 3: 4 = 1(3) + 1 s(3) = 1 - 25( 1) mod 26 = -24 mod 26 = 2 +Step 4: 3 = 3(1) + 0 s(4) = 25 - 2( 2) mod 26 = 21 + s(5) = 2 - 21( 1) mod 26 = -19 mod 26 = 7 + +Notice that 15(7) = 105 = 1 + 4(26) == 1 (mod 26). + +Using the half extended Euclidean algorithm we compute 1/a mod b. + + inverse:(INT,INT)->INT + Type: Void + + inverse(a,b) == + borg:INT:=b + c1:INT := 1 + d1:INT := 0 + while b ~= 0 repeat + q := a quo b + r := a-q*b + print [a, "=", q, "*(", b, ")+", r] + (a,b):=(b,r) + (c1,d1):=(d1,c1-q*d1) + a ~= 1 => error("moduli are not relatively prime") + positiveRemainder(c1,borg) + Type: Void + + inverse(15,26) + [15,"=",0,"*(",26,")+",15] + [26,"=",1,"*(",15,")+",11] + [15,"=",1,"*(",11,")+",4] + [11,"=",2,"*(",4,")+",3] + [4,"=",1,"*(",3,")+",1] + [3,"=",3,"*(",1,")+",0] + + 7 + Type: PositiveInteger + + +==================================================================== +The Chinese Remainder Algorithm +==================================================================== + +Let m1,m2,...,mr be positive integers that are pairwise relatively prime. +Let x1,x2,..,xr be integers with 0 <= xi < mi. Then, there is exactly one +x in the interval 0 <= x < m1 ... m2 ... mr +that satisfies the remainder equations + + irem(x,mi) = xi, i=1,2,...,r + +where irem is the positive integer remainder function. + +For example, et x1 = 4, m1 = 5, x2 = 2, m2 = 3. We know that + irem(x,m1) = x1 + irem(x,m2) = x2 +where 0 <= x_ < m1 and 0 <= x2 < m2. + +By the extended Euclidean Algorithm there are integers c and d such that + c m1 + d m2 = 1 + +In this case we are looking for an integer such that + irem(x,5) = 4, + irem(x,3) = 2 + +The algorithm we use is to first compute the positive integer remainder of +x1 and m1 to get a new x1: + + x1 = positiveRemainder(x1,m1) + 4 = positiveRemainder(4,5) + +Next compute the positive integer remainder of x2 and m2 to get a new x2: + + x2 = positiveRemainder(x2,m2) + 2 = positiveRemainder(2,3) + +Then we compute x1 + m1 ... positiveRemainder(((x2-x1)*inverse(m1,m2)),m2) +or + 4+5*positiveRemainder(((2-4)*inverse(5,3)),3) +or + 4+5*positiveRemainder(-2*2),3) +or + 4+5*2 +or + 14 + +This function has a restricted signature which only allows for +computing the chinese remainder of two numbers and two moduli. + x1:=4 + 4 + Type: PositiveInteger + m1:=5 + 5 + Type: PositiveInteger + x2:=2 + 2 + Type: PositiveInteger + m2:=3 + 3 + Type: PositiveInteger + result:=chineseRemainder(x1,m1,x2,m2) + 14 + Type: PositiveInteger + +See Also: +o )show IntegerNumberTheoryFunctions + +@ +\pagehead{IntegerNumberTheoryFunctions}{INTHEORY} +\pagepic{ps/v104integernumbertheoryfunctions.ps}{INTHEORY}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package INTHEORY IntegerNumberTheoryFunctions +++ Author: Michael Monagan, Martin Brock, Robert Sutor, Timothy Daly +++ Date Created: June 1987 +++ Date Last Updated: +++ Basic Operations: +++ Related Domains: +++ Also See: +++ AMS Classifications: +++ Keywords: number theory, integer +++ Examples: +++ References: Knuth, The Art of Computer Programming Vol.2 +++ Description: +++ This package provides various number theoretic functions on the integers. +IntegerNumberTheoryFunctions(): Exports == Implementation where + I ==> Integer + RN ==> Fraction I + SUP ==> SparseUnivariatePolynomial + NNI ==> NonNegativeInteger + + Exports ==> with + bernoulli : I -> RN + ++ \spad{bernoulli(n)} returns the nth Bernoulli number. + ++ this is \spad{B(n,0)}, where \spad{B(n,x)} is the \spad{n}th Bernoulli + ++ polynomial. + chineseRemainder: (I,I,I,I) -> I + ++ \spad{chineseRemainder(x1,m1,x2,m2)} returns w, where w is such that + ++ \spad{w = x1 mod m1} and \spad{w = x2 mod m2}. Note: \spad{m1} and + ++ \spad{m2} must be relatively prime. + divisors : I -> List I + ++ \spad{divisors(n)} returns a list of the divisors of n. + euler : I -> I + ++ \spad{euler(n)} returns the \spad{n}th Euler number. This is + ++ \spad{2^n E(n,1/2)}, where \spad{E(n,x)} is the nth Euler polynomial. + eulerPhi : I -> I + ++ \spad{eulerPhi(n)} returns the number of integers between 1 and n + ++ (including 1) which are relatively prime to n. This is the Euler phi + ++ function \spad{\phi(n)} is also called the totient function. + fibonacci : I -> I + ++ \spad{fibonacci(n)} returns the nth Fibonacci number. the Fibonacci + ++ numbers \spad{F[n]} are defined by \spad{F[0] = F[1] = 1} and + ++ \spad{F[n] = F[n-1] + F[n-2]}. + ++ The algorithm has running time \spad{O(log(n)^3)}. + ++ Reference: Knuth, The Art of Computer Programming + ++ Vol 2, Semi-Numerical Algorithms. + harmonic : I -> RN + ++ \spad{harmonic(n)} returns the nth harmonic number. This is + ++ \spad{H[n] = sum(1/k,k=1..n)}. + jacobi : (I,I) -> I + ++ \spad{jacobi(a,b)} returns the Jacobi symbol \spad{J(a/b)}. + ++ When b is odd, \spad{J(a/b) = product(L(a/p) for p in factor b )}. + ++ Note: by convention, 0 is returned if \spad{gcd(a,b) ^= 1}. + ++ Iterative \spad{O(log(b)^2)} version coded by Michael Monagan June 1987. + legendre : (I,I) -> I + ++ \spad{legendre(a,p)} returns the Legendre symbol \spad{L(a/p)}. + ++ \spad{L(a/p) = (-1)**((p-1)/2) mod p} (p prime), which is 0 if \spad{a} + ++ is 0, 1 if \spad{a} is a quadratic residue \spad{mod p} and -1 otherwise. + ++ Note: because the primality test is expensive, + ++ if it is known that p is prime then use \spad{jacobi(a,p)}. + moebiusMu : I -> I + ++ \spad{moebiusMu(n)} returns the Moebius function \spad{mu(n)}. + ++ \spad{mu(n)} is either -1,0 or 1 as follows: + ++ \spad{mu(n) = 0} if n is divisible by a square > 1, + ++ \spad{mu(n) = (-1)^k} if n is square-free and has k distinct + ++ prime divisors. + numberOfDivisors: I -> I + ++ \spad{numberOfDivisors(n)} returns the number of integers between 1 and n + ++ (inclusive) which divide n. The number of divisors of n is often + ++ denoted by \spad{tau(n)}. + sumOfDivisors : I -> I + ++ \spad{sumOfDivisors(n)} returns the sum of the integers between 1 and n + ++ (inclusive) which divide n. The sum of the divisors of n is often + ++ denoted by \spad{sigma(n)}. + sumOfKthPowerDivisors: (I,NNI) -> I + ++ \spad{sumOfKthPowerDivisors(n,k)} returns the sum of the \spad{k}th + ++ powers of the integers between 1 and n (inclusive) which divide n. + ++ the sum of the \spad{k}th powers of the divisors of n is often denoted + ++ by \spad{sigma_k(n)}. + Implementation ==> add + import IntegerPrimesPackage(I) + + -- we store the euler and bernoulli numbers computed so far in + -- a Vector because they are computed from an n-term recurrence + E: IndexedFlexibleArray(I,0) := new(1, 1) + B: IndexedFlexibleArray(RN,0) := new(1, 1) + H: Record(Hn:I,Hv:RN) := [1, 1] + + harmonic n == + s:I; h:RN + n < 0 => error("harmonic not defined for negative integers") + if n >= H.Hn then (s,h) := H else (s := 0; h := 0) + for k in s+1..n repeat h := h + 1/k + H.Hn := n + H.Hv := h + h + + fibonacci n == + n = 0 => 0 + n < 0 => (odd? n => 1; -1) * fibonacci(-n) + f1, f2 : I + (f1,f2) := (0,1) + for k in length(n)-2 .. 0 by -1 repeat + t := f2**2 + (f1,f2) := (t+f1**2,t+2*f1*f2) + if bit?(n,k) then (f1,f2) := (f2,f1+f2) + f2 + + euler n == + n < 0 => error "euler not defined for negative integers" + odd? n => 0 + l := (#E) :: I + n < l => E(n) + concat_!(E, new((n+1-l)::NNI, 0)$IndexedFlexibleArray(I,0)) + for i in 1 .. l by 2 repeat E(i) := 0 + -- compute E(i) i = l+2,l+4,...,n given E(j) j = 0,2,...,i-2 + t,e : I + for i in l+1 .. n by 2 repeat + t := e := 1 + for j in 2 .. i-2 by 2 repeat + t := (t*(i-j+1)*(i-j+2)) quo (j*(j-1)) + e := e + t*E(j) + E(i) := -e + E(n) + + bernoulli n == + n < 0 => error "bernoulli not defined for negative integers" + odd? n => + n = 1 => -1/2 + 0 + l := (#B) :: I + n < l => B(n) + concat_!(B, new((n+1-l)::NNI, 0)$IndexedFlexibleArray(RN,0)) + for i in 1 .. l by 2 repeat B(i) := 0 + -- compute B(i) i = l+2,l+4,...,n given B(j) j = 0,2,...,i-2 + for i in l+1 .. n by 2 repeat + t:I := 1 + b := (1-i)/2 + for j in 2 .. i-2 by 2 repeat + t := (t*(i-j+2)*(i-j+3)) quo (j*(j-1)) + b := b + (t::RN) * B(j) + B(i) := -b/((i+1)::RN) + B(n) + + inverse : (I,I) -> I + + inverse(a,b) == + borg:I:=b + c1:I := 1 + d1:I := 0 + while b ^= 0 repeat + q:I := a quo b + r:I := a-q*b + (a,b):=(b,r) + (c1,d1):=(d1,c1-q*d1) + a ^= 1 => error("moduli are not relatively prime") + positiveRemainder(c1,borg) + + chineseRemainder(x1,m1,x2,m2) == + m1 < 0 or m2 < 0 => error "moduli must be positive" + x1 := positiveRemainder(x1,m1) + x2 := positiveRemainder(x2,m2) + x1 + m1 * positiveRemainder(((x2-x1) * inverse(m1,m2)),m2) + + jacobi(a,b) == + -- Revised by Clifton Williamson January 1989. + -- Previous version returned incorrect answers when b was even. + -- The formula J(a/b) = product ( L(a/p) for p in factor b) is only + -- valid when b is odd (the Legendre symbol L(a/p) is not defined + -- for p = 2). When b is even, the Jacobi symbol J(a/b) is only + -- defined for a = 0 or 1 (mod 4). When a = 1 (mod 8), + -- J(a/2) = +1 and when a = 5 (mod 8), we define J(a/2) = -1. + -- Extending by multiplicativity, we have J(a/b) for even b and + -- appropriate a. + -- We also define J(a/1) = 1. + -- The point of this is the following: if d is the discriminant of + -- a quadratic field K and chi is the quadratic character for K, + -- then J(d/n) = chi(n) for n > 0. + -- Reference: Hecke, Vorlesungen ueber die Theorie der Algebraischen + -- Zahlen. + if b < 0 then b := -b + b = 0 => error "second argument of jacobi may not be 0" + b = 1 => 1 + even? b and positiveRemainder(a,4) > 1 => + error "J(a/b) not defined for b even and a = 2 or 3 (mod 4)" + even? b and even? a => 0 + for k in 0.. while even? b repeat b := b quo 2 + j:I := (odd? k and positiveRemainder(a,8) = 5 => -1; 1) + b = 1 => j + a := positiveRemainder(a,b) + -- assertion: 0 < a < b and odd? b + while a > 1 repeat + if odd? a then + -- J(a/b) = J(b/a) (-1) ** (a-1)/2 (b-1)/2 + if a rem 4 = 3 and b rem 4 = 3 then j := -j + (a,b) := (b rem a,a) + else + -- J(2*a/b) = J(a/b) (-1) (b**2-1)/8 + for k in 0.. until odd? a repeat a := a quo 2 + if odd? k and (b+2) rem 8 > 4 then j := -j + a = 0 => 0 + j + + legendre(a,p) == + prime? p => jacobi(a,p) + error "characteristic of legendre must be prime" + + eulerPhi n == + n = 0 => 0 + r : RN := 1 + for entry in factors factor n repeat + r := ((entry.factor - 1) /$RN entry.factor) * r + numer(n * r) + + divisors n == + oldList : List Integer := concat(1,nil()) + for f in factors factor n repeat + newList : List Integer := nil() + for k in 0..f.exponent repeat + pow := f.factor ** k + for m in oldList repeat + newList := concat(pow * m,newList) + oldList := newList + sort(#1 < #2,newList) + + numberOfDivisors n == + n = 0 => 0 + */[1+entry.exponent for entry in factors factor n] + + sumOfDivisors n == + n = 0 => 0 + r : RN := */[(entry.factor**(entry.exponent::NNI + 1)-1)/ + (entry.factor-1) for entry in factors factor n] + numer r + + sumOfKthPowerDivisors(n,k) == + n = 0 => 0 + r : RN := */[(entry.factor**(k*entry.exponent::NNI+k)-1)/ + (entry.factor**k-1) for entry in factors factor n] + numer r + + moebiusMu n == + n = 1 => 1 + t := factor n + for k in factors t repeat + k.exponent > 1 => return 0 + odd? numberOfFactors t => -1 + 1 + +@ +<>= +"INTHEORY" [color="#FF4488",href="bookvol10.4.pdf#nameddest=INTHEORY"] +"A1AGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=A1AGG"] +"INTHEORY" -> "A1AGG" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package PRIMES IntegerPrimesPackage} We've expanded the list of small primes to include those between 1 and 10000. \pagehead{IntegerPrimesPackage}{PRIMES} @@ -36154,6 +38242,48 @@ IntegrationResultToFunction(R, F): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package IPRNTPK InternalPrintPackage} +\pagehead{InternalPrintPackage}{IPRNTPK} +\pagepic{ps/v104internalprintpackage.ps}{IPRNTPK}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package IPRNTPK InternalPrintPackage +++ Author: Themos Tsikas +++ Date Created: 09/09/1998 +++ Date Last Updated: 09/09/1998 +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: A package to print strings without line-feed +++ nor carriage-return. + +InternalPrintPackage(): Exports == Implementation where + + Exports == with + iprint: String -> Void + ++ \axiom{iprint(s)} prints \axiom{s} at the current position + ++ of the cursor. + + Implementation == add + iprint(s:String) == + PRINC(coerce(s)@Symbol)$Lisp + FORCE_-OUTPUT()$Lisp + +@ +<>= +"IPRNTPK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=IPRNTPK"] +"ALIST" [color="#88FF44",href="bookvol10.3.pdf#nameddest=ALIST"] +"IPRNTPK" -> "ALIST" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package IRREDFFX IrredPolyOverFiniteField} \pagehead{IrredPolyOverFiniteField}{IRREDFFX} \pagepic{ps/v104irredpolyoverfinitefield.ps}{IRREDFFX}{1.00} @@ -37048,6 +39178,144 @@ LaplaceTransform(R, F): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package LAZM3PK LazardSetSolvingPackage} +\pagehead{LazardSetSolvingPackage}{LAZM3PK} +\pagepic{ps/v104lazardsetsolvingpackage.ps}{LAZM3PK}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package LAZM3PK LazardSetSolvingPackage +++ Author: Marc Moreno Maza +++ Date Created: 10/02/1998 +++ Date Last Updated: 12/16/1998 +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ Description: +++ A package for solving polynomial systems by means of Lazard triangular +++ sets [1]. +++ This package provides two operations. One for solving in the sense +++ of the regular zeros, and the other for solving in the sense of +++ the Zariski closure. Both produce square-free regular sets. +++ Moreover, the decompositions do not contain any redundant component. +++ However, only zero-dimensional regular sets are normalized, since +++ normalization may be time consumming in positive dimension. +++ The decomposition process is that of [2].\newline +++ References : +++ [1] D. LAZARD "A new method for solving algebraic systems of +++ positive dimension" Discr. App. Math. 33:147-160,1991 +++ [2] M. MORENO MAZA "A new algorithm for computing triangular +++ decomposition of algebraic varieties" NAG Tech. Rep. 4/98. +++ Version: 1. + +LazardSetSolvingPackage(R,E,V,P,TS,ST): Exports == Implementation where + + R : GcdDomain + E : OrderedAbelianMonoidSup + V : OrderedSet + P : RecursivePolynomialCategory(R,E,V) + TS: RegularTriangularSetCategory(R,E,V,P) + ST : SquareFreeRegularTriangularSetCategory(R,E,V,P) + N ==> NonNegativeInteger + Z ==> Integer + B ==> Boolean + S ==> String + K ==> Fraction R + LP ==> List P + PWT ==> Record(val : P, tower : TS) + BWT ==> Record(val : Boolean, tower : TS) + LpWT ==> Record(val : (List P), tower : TS) + Split ==> List TS + --KeyGcd ==> Record(arg1: P, arg2: P, arg3: TS, arg4: B) + --EntryGcd ==> List PWT + --HGcd ==> TabulatedComputationPackage(KeyGcd, EntryGcd) + --KeyInvSet ==> Record(arg1: P, arg3: TS) + --EntryInvSet ==> List TS + --HInvSet ==> TabulatedComputationPackage(KeyInvSet, EntryInvSet) + polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P) + regsetgcdpack ==> SquareFreeRegularTriangularSetGcdPackage(R,E,V,P,ST) + quasicomppack ==> SquareFreeQuasiComponentPackage(R,E,V,P,ST) + normalizpack ==> NormalizationPackage(R,E,V,P,ST) + + Exports == with + + normalizeIfCan: ST -> ST + ++ \axiom{normalizeIfCan(ts)} returns \axiom{ts} in an normalized shape + ++ if \axiom{ts} is zero-dimensional. + zeroSetSplit: (LP, B) -> List ST + ++ \axiom{zeroSetSplit(lp,clos?)} has the same specifications as + ++ \axiomOpFrom{zeroSetSplit(lp,clos?)}{RegularTriangularSetCategory}. + + Implementation == add + + convert(st: ST): TS == + ts: TS := empty() + lp: LP := members(st)$ST + lp := sort(infRittWu?,lp) + for p in lp repeat + ts := internalAugment(p,ts)$TS + ts + + squareFree(ts: TS): List ST == + empty? ts => [empty()$ST] + lp: LP := members(ts)$TS + lp := sort(infRittWu?,lp) + newts: ST := empty()$ST + toSee: List ST := [newts] + toSave: List ST + for p in lp repeat + toSave := [] + while (not empty? toSee) repeat + us := first toSee; toSee := rest toSee + lpwt := stoseSquareFreePart(p,us)$regsetgcdpack + for pwt in lpwt repeat + newus := internalAugment(pwt.val,pwt.tower)$ST + toSave := cons(newus,toSave) + toSee := toSave + toSave + + normalizeIfCan(ts: ST): ST == + empty? ts => ts + lp: LP := members(ts)$ST + lp := sort(infRittWu?,lp) + p: P := first lp + not univariate?(p)$polsetpack => ts + lp := rest lp + newts: ST := empty()$ST + newts := internalAugment(p,newts)$ST + while (not empty? lp) repeat + p := first lp + lv := variables(p) + for v in lv repeat + v = mvar(p) => "leave" + not algebraic?(v,newts) => return internalAugment(lp,newts)$ST + lp := rest lp + p := normalizedAssociate(p,newts)$normalizpack + newts := internalAugment(p,newts)$ST + newts + + zeroSetSplit(lp:List(P), clos?:B): List ST == + -- if clos? then SOLVE in the closure sense + toSee: Split := zeroSetSplit(lp, clos?)$TS + toSave: List ST := [] + for ts in toSee repeat + toSave := concat(squareFree(ts),toSave) + toSave := removeSuperfluousQuasiComponents(toSave)$quasicomppack + [normalizeIfCan(ts) for ts in toSave] + +@ +<>= +"LAZM3PK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=LAZM3PK"] +"SFRTCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=SFRTCAT"] +"LAZM3PK" -> "SFRTCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package LEADCDET LeadingCoefDetermination} \pagehead{LeadingCoefDetermination}{LEADCDET} \pagepic{ps/v104leadingcoefdetermination.ps}{LEADCDET}{1.00} @@ -49347,6 +51615,51 @@ NagSeriesSummationPackage(): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NSUP2 NewSparseUnivariatePolynomialFunctions2} +\pagehead{NewSparseUnivariatePolynomialFunctions2}{NSUP2} +\pagepic{ps/v104newsparseunivariatepolynomialfunctions2.ps}{NSUP2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NSUP2 NewSparseUnivariatePolynomialFunctions2 +++ Author: +++ Date Created: +++ Date Last Updated: +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This package lifts a mapping from coefficient rings R to S to +++ a mapping from sparse univariate polynomial over R to +++ a sparse univariate polynomial over S. +++ Note that the mapping is assumed +++ to send zero to zero, since it will only be applied to the non-zero +++ coefficients of the polynomial. + +NewSparseUnivariatePolynomialFunctions2(R:Ring, S:Ring): with + map:(R->S,NewSparseUnivariatePolynomial R) -> NewSparseUnivariatePolynomial S + ++ \axiom{map(func, poly)} creates a new polynomial by applying func to + ++ every non-zero coefficient of the polynomial poly. + == add + map(f, p) == map(f, p)$UnivariatePolynomialCategoryFunctions2(R, + NewSparseUnivariatePolynomial R, S, NewSparseUnivariatePolynomial S) + +@ +<>= +"NSUP2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NSUP2"] +"LMODULE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=LMODULE"] +"SGROUP" [color="#4488FF",href="bookvol10.2.pdf#nameddest=SGROUP"] +"NSUP2" -> "LMODULE" +"NSUP2" -> "SGROUP" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package NEWTON NewtonInterpolation} \pagehead{NewtonInterpolation}{NEWTON} \pagepic{ps/v104newtoninterpolation.ps}{NEWTON}{1.00} @@ -49551,6 +51864,497 @@ NoneFunctions1(S:Type): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NODE1 NonLinearFirstOrderODESolver} +\pagehead{NonLinearFirstOrderODESolver}{NODE1} +\pagepic{ps/v104nonlinearfirstorderodesolver.ps}{NODE1}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NODE1 NonLinearFirstOrderODESolver +++ Author: Manuel Bronstein +++ Date Created: 2 September 1991 +++ Date Last Updated: 14 October 1994 +++ Description: NonLinearFirstOrderODESolver provides a function +++ for finding closed form first integrals of nonlinear ordinary +++ differential equations of order 1. +++ Keywords: differential equation, ODE +NonLinearFirstOrderODESolver(R, F): Exports == Implementation where + R: Join(OrderedSet, EuclideanDomain, RetractableTo Integer, + LinearlyExplicitRingOver Integer, CharacteristicZero) + F: Join(AlgebraicallyClosedFunctionSpace R, TranscendentalFunctionCategory, + PrimitiveFunctionCategory) + + N ==> NonNegativeInteger + Q ==> Fraction Integer + UQ ==> Union(Q, "failed") + OP ==> BasicOperator + SY ==> Symbol + K ==> Kernel F + U ==> Union(F, "failed") + P ==> SparseMultivariatePolynomial(R, K) + REC ==> Record(coef:Q, logand:F) + SOL ==> Record(particular: F,basis: List F) + BER ==> Record(coef1:F, coefn:F, exponent:N) + + Exports ==> with + solve: (F, F, OP, SY) -> U + ++ solve(M(x,y), N(x,y), y, x) returns \spad{F(x,y)} such that + ++ \spad{F(x,y) = c} for a constant \spad{c} is a first integral + ++ of the equation \spad{M(x,y) dx + N(x,y) dy = 0}, or + ++ "failed" if no first-integral can be found. + + Implementation ==> add + import ODEIntegration(R, F) + import ElementaryFunctionODESolver(R, F) -- recursive dependency! + + checkBernoulli : (F, F, K) -> Union(BER, "failed") + solveBernoulli : (BER, OP, SY, F) -> Union(F, "failed") + checkRiccati : (F, F, K) -> Union(List F, "failed") + solveRiccati : (List F, OP, SY, F) -> Union(F, "failed") + partSolRiccati : (List F, OP, SY, F) -> Union(F, "failed") + integratingFactor: (F, F, SY, SY) -> U + + unk := new()$SY + kunk:K := kernel unk + + solve(m, n, y, x) == +-- first replace the operator y(x) by a new symbol z in m(x,y) and n(x,y) + lk:List(K) := [retract(yx := y(x::F))@K] + lv:List(F) := [kunk::F] + mm := eval(m, lk, lv) + nn := eval(n, lk, lv) +-- put over a common denominator (to balance m and n) + d := lcm(denom mm, denom nn)::F + mm := d * mm + nn := d * nn +-- look for an integrating factor mu + (u := integratingFactor(mm, nn, unk, x)) case F => + mu := u::F + mm := mm * mu + nn := nn * mu + eval(int(mm,x) + int(nn-int(differentiate(mm,unk),x), unk),[kunk],[yx]) +-- check for Bernoulli equation + (w := checkBernoulli(m, n, k1 := first lk)) case BER => + solveBernoulli(w::BER, y, x, yx) +-- check for Riccati equation + (v := checkRiccati(m, n, k1)) case List(F) => + solveRiccati(v::List(F), y, x, yx) + "failed" + +-- look for an integrating factor + integratingFactor(m, n, y, x) == +-- check first for exactness + zero?(d := differentiate(m, y) - differentiate(n, x)) => 1 +-- look for an integrating factor involving x only + not member?(y, variables(f := d / n)) => expint(f, x) +-- look for an integrating factor involving y only + not member?(x, variables(f := - d / m)) => expint(f, y) +-- room for more techniques later on (e.g. Prelle-Singer etc...) + "failed" + +-- check whether the equation is of the form +-- dy/dx + p(x)y + q(x)y^N = 0 with N > 1 +-- i.e. whether m/n is of the form p(x) y + q(x) y^N +-- returns [p, q, N] if the equation is in that form + checkBernoulli(m, n, ky) == + r := denom(f := m / n)::F + (not freeOf?(r, y := ky::F)) + or (d := degree(p := univariate(numer f, ky))) < 2 + or degree(pp := reductum p) ^= 1 or reductum(pp) ^= 0 + or (not freeOf?(a := (leadingCoefficient(pp)::F), y)) + or (not freeOf?(b := (leadingCoefficient(p)::F), y)) => "failed" + [a / r, b / r, d] + +-- solves the equation dy/dx + rec.coef1 y + rec.coefn y^rec.exponent = 0 +-- the change of variable v = y^{1-n} transforms the above equation to +-- dv/dx + (1 - n) p v + (1 - n) q = 0 + solveBernoulli(rec, y, x, yx) == + n1 := 1 - rec.exponent::Integer + deq := differentiate(yx, x) + n1 * rec.coef1 * yx + n1 * rec.coefn + sol := solve(deq, y, x)::SOL -- can always solve for order 1 +-- if v = vp + c v0 is the general solution of the linear equation, then +-- the general first integral for the Bernoulli equation is +-- (y^{1-n} - vp) / v0 = c for any constant c + (yx**n1 - sol.particular) / first(sol.basis) + +-- check whether the equation is of the form +-- dy/dx + q0(x) + q1(x)y + q2(x)y^2 = 0 +-- i.e. whether m/n is a quadratic polynomial in y. +-- returns the list [q0, q1, q2] if the equation is in that form + checkRiccati(m, n, ky) == + q := denom(f := m / n)::F + (not freeOf?(q, y := ky::F)) or degree(p := univariate(numer f, ky)) > 2 + or (not freeOf?(a0 := (coefficient(p, 0)::F), y)) + or (not freeOf?(a1 := (coefficient(p, 1)::F), y)) + or (not freeOf?(a2 := (coefficient(p, 2)::F), y)) => "failed" + [a0 / q, a1 / q, a2 / q] + +-- solves the equation dy/dx + l.1 + l.2 y + l.3 y^2 = 0 + solveRiccati(l, y, x, yx) == +-- get first a particular solution + (u := partSolRiccati(l, y, x, yx)) case "failed" => "failed" +-- once a particular solution yp is known, the general solution is of the +-- form y = yp + 1/v where v satisfies the linear 1st order equation +-- v' - (l.2 + 2 l.3 yp) v = l.3 + deq := differentiate(yx, x) - (l.2 + 2 * l.3 * u::F) * yx - l.3 + gsol := solve(deq, y, x)::SOL -- can always solve for order 1 +-- if v = vp + c v0 is the general solution of the above equation, then +-- the general first integral for the Riccati equation is +-- (1/(y - yp) - vp) / v0 = c for any constant c + (inv(yx - u::F) - gsol.particular) / first(gsol.basis) + +-- looks for a particular solution of dy/dx + l.1 + l.2 y + l.3 y^2 = 0 + partSolRiccati(l, y, x, yx) == +-- we first do the change of variable y = z / l.3, which transforms +-- the equation into dz/dx + l.1 l.3 + (l.2 - l.3'/l.3) z + z^2 = 0 + q0 := l.1 * (l3 := l.3) + q1 := l.2 - differentiate(l3, x) / l3 +-- the equation dz/dx + q0 + q1 z + z^2 = 0 is transformed by the change +-- of variable z = w'/w into the linear equation w'' + q1 w' + q0 w = 0 + lineq := differentiate(yx, x, 2) + q1 * differentiate(yx, x) + q0 * yx +-- should be made faster by requesting a particular nonzero solution only + (not((gsol := solve(lineq, y, x)) case SOL)) + or empty?(bas := (gsol::SOL).basis) => "failed" + differentiate(first bas, x) / (l3 * first bas) + +@ +<>= +"NODE1" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NODE1"] +"ACFS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ACFS"] +"NODE1" -> "ACFS" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NLINSOL NonLinearSolvePackage} +\pagehead{NonLinearSolvePackage}{NLINSOL} +\pagepic{ps/v104nonlinearsolvepackage.ps}{NLINSOL}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NLINSOL NonLinearSolvePackage +++ Author: Manuel Bronstein +++ Date Created: 31 October 1991 +++ Date Last Updated: 26 June 1992 +++ Description: +++ NonLinearSolvePackage is an interface to \spadtype{SystemSolvePackage} +++ that attempts to retract the coefficients of the equations before +++ solving. The solutions are given in the algebraic closure of R whenever +++ possible. + +NonLinearSolvePackage(R:IntegralDomain): Exports == Implementation where + Z ==> Integer + Q ==> Fraction Z + SY ==> Symbol + P ==> Polynomial R + F ==> Fraction P + EQ ==> Equation F + SSP ==> SystemSolvePackage + SOL ==> RetractSolvePackage + + Exports ==> with + solveInField: (List P, List SY) -> List List EQ + ++ solveInField(lp,lv) finds the solutions of the list lp of + ++ rational functions with respect to the list of symbols lv. + solveInField: List P -> List List EQ + ++ solveInField(lp) finds the solution of the list lp of rational + ++ functions with respect to all the symbols appearing in lp. + solve: (List P, List SY) -> List List EQ + ++ solve(lp,lv) finds the solutions in the algebraic closure of R + ++ of the list lp of + ++ rational functions with respect to the list of symbols lv. + solve: List P -> List List EQ + ++ solve(lp) finds the solution in the algebraic closure of R + ++ of the list lp of rational + ++ functions with respect to all the symbols appearing in lp. + + Implementation ==> add + solveInField l == solveInField(l, "setUnion"/[variables p for p in l]) + + if R has AlgebraicallyClosedField then + import RationalFunction(R) + + expandSol: List EQ -> List List EQ + RIfCan : F -> Union(R, "failed") + addRoot : (EQ, List List EQ) -> List List EQ + allRoots : List P -> List List EQ + evalSol : (List EQ, List EQ) -> List EQ + + solve l == solve(l, "setUnion"/[variables p for p in l]) + solve(lp, lv) == concat([expandSol sol for sol in solveInField(lp, lv)]) + addRoot(eq, l) == [concat(eq, sol) for sol in l] + evalSol(ls, l) == [equation(lhs eq, eval(rhs eq, l)) for eq in ls] + +-- converts [p1(a1),...,pn(an)] to +-- [[a1=v1,...,an=vn]] where vi ranges over all the zeros of pi + allRoots l == + empty? l => [empty()$List(EQ)] + z := allRoots rest l + s := mainVariable(p := first l)::SY::P::F + concat [addRoot(equation(s, a::P::F), z) for a in zerosOf univariate p] + + expandSol l == + lassign := lsubs := empty()$List(EQ) + luniv := empty()$List(P) + for eq in l repeat + if retractIfCan(lhs eq)@Union(SY, "failed") case SY then + if RIfCan(rhs eq) case R then lassign := concat(eq, lassign) + else lsubs := concat(eq, lsubs) + else + if ((u := retractIfCan(lhs eq)@Union(P, "failed")) case P) and +-- one?(# variables(u::P)) and ((r := RIfCan rhs eq) case R) then + ((# variables(u::P)) = 1) and ((r := RIfCan rhs eq) case R) then + luniv := concat(u::P - r::R::P, luniv) + else return [l] + empty? luniv => [l] + [concat(z, concat(evalSol(lsubs,z), lassign)) for z in allRoots luniv] + + RIfCan f == + ((n := retractIfCan(numer f)@Union(R,"failed")) case R) and + ((d := retractIfCan(denom f)@Union(R,"failed")) case R) => n::R / d::R + "failed" + else + solve l == solveInField l + solve(lp, lv) == solveInField(lp, lv) + + -- 'else if' is doubtful with this compiler so all 3 conditions are explicit + if (not(R is Q)) and (R has RetractableTo Q) then + solveInField(lp, lv) == solveRetract(lp, lv)$SOL(Q, R) + + if (not(R is Z)) and (not(R has RetractableTo Q)) and + (R has RetractableTo Z) then + solveInField(lp, lv) == solveRetract(lp, lv)$SOL(Z, R) + + if (not(R is Z)) and (not(R has RetractableTo Q)) and + (not(R has RetractableTo Z)) then + solveInField(lp, lv) == solve([p::F for p in lp]$List(F), lv)$SSP(R) + +@ +<>= +"NLINSOL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NLINSOL"] +"ACF" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ACF"] +"NLINSOL" -> "ACF" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NORMPK NormalizationPackage} +\pagehead{NormalizationPackage}{NORMPK} +\pagepic{ps/v104normalizationpackage.ps}{NORMPK}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NORMPK NormalizationPackage +++ Author: Marc Moreno Maza +++ Date Created: 09/23/1998 +++ Date Last Updated: 12/16/1998 +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ Description: +++ A package for computing normalized assocites of univariate polynomials +++ with coefficients in a tower of simple extensions of a field.\newline +++ References : +++ [1] D. LAZARD "A new method for solving algebraic systems of +++ positive dimension" Discr. App. Math. 33:147-160,1991 +++ [2] M. MORENO MAZA and R. RIOBOO "Computations of gcd over +++ algebraic towers of simple extensions" In proceedings of AAECC11 +++ Paris, 1995. +++ [3] M. MORENO MAZA "Calculs de pgcd au-dessus des tours +++ d'extensions simples et resolution des systemes d'equations +++ algebriques" These, Universite P.etM. Curie, Paris, 1997. +++ Version: 1. + +NormalizationPackage(R,E,V,P,TS): Exports == Implementation where + + R : GcdDomain + E : OrderedAbelianMonoidSup + V : OrderedSet + P : RecursivePolynomialCategory(R,E,V) + TS : RegularTriangularSetCategory(R,E,V,P) + N ==> NonNegativeInteger + Z ==> Integer + B ==> Boolean + S ==> String + K ==> Fraction R + LP ==> List P + PWT ==> Record(val : P, tower : TS) + + BWT ==> Record(val : Boolean, tower : TS) + LpWT ==> Record(val : (List P), tower : TS) + Split ==> List TS + --KeyGcd ==> Record(arg1: P, arg2: P, arg3: TS, arg4: B) + --EntryGcd ==> List PWT + --HGcd ==> TabulatedComputationPackage(KeyGcd, EntryGcd) + --KeyInvSet ==> Record(arg1: P, arg3: TS) + --EntryInvSet ==> List TS + --HInvSet ==> TabulatedComputationPackage(KeyInvSet, EntryInvSet) + polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P) + regsetgcdpack ==> SquareFreeRegularTriangularSetGcdPackage(R,E,V,P,TS) + + Exports == with + + recip: (P, TS) -> Record(num:P,den:P) + ++ \axiom{recip(p,ts)} returns the inverse of \axiom{p} w.r.t \spad{ts} + ++ assuming that \axiom{p} is invertible w.r.t \spad{ts}. + normalizedAssociate: (P, TS) -> P + ++ \axiom{normalizedAssociate(p,ts)} returns a normalized polynomial + ++ \axiom{n} w.r.t. \spad{ts} such that \axiom{n} and \axiom{p} are + ++ associates w.r.t \spad{ts} and assuming that \axiom{p} is invertible + ++ w.r.t \spad{ts}. + normalize: (P, TS) -> List PWT + ++ \axiom{normalize(p,ts)} normalizes \axiom{p} w.r.t \spad{ts}. + outputArgs: (S, S, P, TS) -> Void + ++ \axiom{outputArgs(s1,s2,p,ts)} + ++ is an internal subroutine, exported only for developement. + normInvertible?: (P, TS) -> List BWT + ++ \axiom{normInvertible?(p,ts)} + ++ is an internal subroutine, exported only for developement. + + Implementation == add + + if TS has SquareFreeRegularTriangularSetCategory(R,E,V,P) + then + + normInvertible?(p:P, ts:TS): List BWT == + stoseInvertible?_sqfreg(p,ts)$regsetgcdpack + + else + + normInvertible?(p:P, ts:TS): List BWT == + stoseInvertible?_reg(p,ts)$regsetgcdpack + + if (R has RetractableTo(Integer)) and (V has ConvertibleTo(Symbol)) + then + + outputArgs(s1:S, s2: S, p:P,ts:TS): Void == + if not empty? s1 then output(s1, p::OutputForm)$OutputPackage + if not empty? s1 then _ + output(s1,(convert(p)@String)::OutputForm)$OutputPackage + output(" ")$OutputPackage + if not empty? s2 then output(s2, ts::OutputForm)$OutputPackage + empty? s2 => void() + output(s2,("[")::OutputForm)$OutputPackage + lp: List P := members(ts) + for q in lp repeat + output((convert(q)@String)::OutputForm)$OutputPackage + output("]")$OutputPackage + output(" ")$OutputPackage + + else + + outputArgs(s1:S, s2: S, p:P,ts:TS): Void == + if not empty? s1 then output(s1, p::OutputForm)$OutputPackage + output(" ")$OutputPackage + if not empty? s2 then output(s2, ts::OutputForm)$OutputPackage + output(" ")$OutputPackage + + recip(p:P,ts:TS): Record(num:P, den:P) == + -- ASSUME p is invertible w.r.t. ts + -- ASSUME mvar(p) is algebraic w.r.t. ts + v := mvar(p) + ts_v := select(ts,v)::P + if mdeg(p) < mdeg(ts_v) + then + hesrg: Record (gcd : P, coef2 : P) := _ + halfExtendedSubResultantGcd2(ts_v,p)$P + d: P := hesrg.gcd; n: P := hesrg.coef2 + else + hesrg: Record (gcd : P, coef1 : P) := _ + halfExtendedSubResultantGcd1(p,ts_v)$P + d: P := hesrg.gcd; n: P := hesrg.coef1 + g := gcd(n,d) + (n, d) := ((n exquo g)::P, (d exquo g)::P) + remn, remd: Record(rnum:R,polnum:P,den:R) + remn := remainder(n,ts); remd := remainder(d,ts) + cn := remn.rnum; pn := remn.polnum; dn := remn.den + cd := remd.rnum; pd := remd.polnum; dp := remd.den + k: K := (cn / cd) * (dp / dn) + pn := removeZero(pn,ts) + pd := removeZero(pd,ts) + [numer(k) * pn, denom(k) * pd]$Record(num:P, den:P) + + normalizedAssociate(p:P,ts:TS): P == + -- ASSUME p is invertible or zero w.r.t. ts + empty? ts => p + zero?(p) => p + ground?(p) => 1 + zero? initiallyReduce(init(p),ts) => + error "in normalizedAssociate$NORMPK: bad #1" + vp := mvar(p) + ip: P := p + mp: P := 1 + tp: P := 0 + while not ground?(ip) repeat + v := mvar(ip) + if algebraic?(v,ts) + then + if v = vp + then + ts_v := select(ts,v)::P + ip := lastSubResultant(ip,ts_v)$P + ip := remainder(ip,ts).polnum + -- ip := primitivePart stronglyReduce(ip,ts) + ip := primitivePart initiallyReduce(ip,ts) + else + qr := recip(ip,ts) + ip := qr.den + tp := qr.num * tp + zero? ip => + outputArgs("p = ", " ts = ",p,ts) + error _ + "in normalizedAssociate$NORMPK: should never happen !" + else + tp := tail(ip) * mp + tp + mp := mainMonomial(ip) * mp + ip := init(ip) + r := ip * mp + tp + r := remainder(r,ts).polnum + -- primitivePart stronglyReduce(r,ts) + primitivePart initiallyReduce(r,ts) + + normalize(p: P, ts: TS): List PWT == + zero? p => [[p,ts]$PWT] + ground? p => [[1,ts]$PWT] + zero? initiallyReduce(init(p),ts) => + error "in normalize$NORMPK: init(#1) reduces to 0 w.r.t. #2" + --output("Entering normalize")$OutputPackage + --outputArgs("p = ", " ts = ",p,ts) + --output("Calling normInvertible?")$OutputPackage + lbwt: List BWT := normInvertible?(p,ts) + --output("Result is: ")$OutputPackage + --output(lbwt::OutputForm)$OutputPackage + lpwt: List PWT := [] + for bwt in lbwt repeat + us := bwt.tower + q := remainder(p,us).polnum + q := removeZero(q,us) + bwt.val => + --output("Calling normalizedAssociate")$OutputPackage + --outputArgs("q = ", " us = ",q,us) + lpwt := cons([normalizedAssociate(q,us)@P,us]$PWT, lpwt) + --output("Leaving normalizedAssociate")$OutputPackage + zero? q => lpwt := cons([0$P,us]$PWT, lpwt) + lpwt := concat(normalize(q,us)@(List PWT),lpwt) + lpwt + +@ +<>= +"NORMPK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NORMPK"] +"SFRTCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=SFRTCAT"] +"NORMPK" -> "SFRTCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package NORMMA NormInMonogenicAlgebra} \pagehead{NormInMonogenicAlgebra}{NORMMA} \pagepic{ps/v104norminmonogenicalgebra.ps}{NORMMA}{1.00} @@ -49603,6 +52407,178 @@ NormInMonogenicAlgebra(R, PolR, E, PolE): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NPCOEF NPCoef} +\pagehead{NPCoef}{NPCOEF} +\pagepic{ps/v104npcoef.ps}{NPCOEF}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NPCOEF NPCoef +++ Author : P.Gianni, revised May 1990 +++ Description: +++ Package for the determination of the coefficients in the lifting +++ process. Used by \spadtype{MultivariateLifting}. +++ This package will work for every euclidean domain R which has property +++ F, i.e. there exists a factor operation in \spad{R[x]}. +NPCoef(BP,E,OV,R,P) : C == T where + + OV : OrderedSet + E : OrderedAbelianMonoidSup + R : EuclideanDomain -- with property "F" + BP : UnivariatePolynomialCategory R + P : PolynomialCategory(R,E,OV) + + Z ==> Integer + NNI ==> NonNegativeInteger + USP ==> SparseUnivariatePolynomial(P) + Term ==> Record(expt:NNI,pcoef:P) + Detc ==> Record(valexp:NNI,valcoef:P,posit:NNI) + VTerm ==> List(Term) + DetCoef ==> Record(deter:List(USP),dterm:List(VTerm), + nfacts:List(BP),nlead:List(P)) + TermC ==> Record(coefu:P,detfacts:List(VTerm)) + TCoef ==> List(TermC) + + C == with + npcoef : (USP,List(BP),List(P)) -> DetCoef + ++ npcoef \undocumented + listexp : BP -> List(NNI) + ++ listexp \undocumented + T == add + + ---- Local Functions ---- + check : (TermC,Vector P) -> Union(Detc,"failed") + buildvect : (List(VTerm),NNI) -> Vector(List(VTerm)) + buildtable : (Vector(P),List(List NNI),List P) -> TCoef + modify : (TCoef,Detc) -> TCoef + constructp : VTerm -> USP + + npcoef(u:USP,factlist:List(BP),leadlist:List(P)) :DetCoef == + detcoef:List(VTerm):=empty();detufact:List(USP):=empty() + lexp:List(List(NNI)):=[listexp(v) for v in factlist] + ulist :Vector(P):=vector [coefficient(u,i) for i in 0..degree u] + tablecoef:=buildtable(ulist,lexp,leadlist) + detcoef:=[[[ep.first,lcu]$Term] for ep in lexp for lcu in leadlist] + ldtcf:=detcoef + lexp:=[ep.rest for ep in lexp] + ndet:NNI:=#factlist + changed:Boolean:=true + ltochange:List(NNI):=empty() + ltodel:List(NNI):=empty() + while changed and ndet^=1 repeat + changed :=false + dt:=#tablecoef + for i in 1..dt while ^changed repeat + (cf:=check(tablecoef.i,ulist)) case "failed" => "next i" + ltochange:=cons(i,ltochange) + celtf:Detc:=cf::Detc + tablecoef:=modify(tablecoef,celtf) + vpos:=celtf.posit + vexp:=celtf.valexp + nterm:=[vexp,celtf.valcoef]$Term + detcoef.vpos:=cons(nterm,detcoef.vpos) + lexp.vpos:=delete(lexp.vpos,position(vexp,lexp.vpos)) + if lexp.vpos=[] then + ltodel:=cons(vpos,ltodel) + ndet:=(ndet-1):NNI + detufact:=cons(constructp(detcoef.vpos),detufact) + changed:=true + for i in ltochange repeat tablecoef:=delete(tablecoef,i) + ltochange:=[] + if ndet=1 then + uu:=u exquo */[pol for pol in detufact] + if uu case "failed" then return + [empty(),ldtcf,factlist,leadlist]$DetCoef + else detufact:=cons(uu::USP,detufact) + else + ltodel:=sort(#1>#2,ltodel) + for i in ltodel repeat + detcoef:=delete(detcoef,i) + factlist:=delete(factlist,i) + leadlist:=delete(leadlist,i) + [detufact,detcoef,factlist,leadlist]$DetCoef + + + check(tterm:TermC,ulist:Vector(P)) : Union(Detc,"failed") == + cfu:P:=1$P;doit:NNI:=0;poselt:NNI:=0;pp:Union(P,"failed") + termlist:List(VTerm):=tterm.detfacts + vterm:VTerm:=empty() + #termlist=1 => + vterm:=termlist.first + for elterm in vterm while doit<2 repeat + (cu1:=elterm.pcoef)^=0 => cfu:=cu1*cfu + doit:=doit+1 + poselt:=position(elterm,vterm):NNI + doit=2 or (pp:=tterm.coefu exquo cfu) case "failed" => "failed" + [vterm.poselt.expt,pp::P,poselt]$Detc + "failed" + + buildvect(lvterm:List(VTerm),n:NNI) : Vector(List(VTerm)) == + vtable:Vector(List(VTerm)):=new(n,empty()) + (#lvterm)=1 => + for term in lvterm.first repeat vtable.(term.expt+1):=[[term]] + vtable + + vtable:=buildvect(lvterm.rest,n) + ntable:Vector(List(VTerm)):=new(n,empty()) + for term in lvterm.first repeat + nexp:=term.expt + for i in 1..n while (nexp+i)<(n+1) repeat + ntable.(nexp+i):=append( + [cons(term,lvterm) for lvterm in vtable.i], + ntable.(nexp+i)) + ntable + + buildtable(vu:Vector(P),lvect:List(List(NNI)),leadlist:List(P)):TCoef== + nfact:NNI:=#leadlist + table:TCoef:=empty() + degu:=(#vu-1)::NNI + prelim:List(VTerm):=[[[e,0$P]$Term for e in lv] for lv in lvect] + for i in 1..nfact repeat prelim.i.first.pcoef:=leadlist.i + partialv:Vector(List(VTerm)):=new(nfact,empty()) + partialv:=buildvect(prelim,degu) + for i in 1..degu repeat + empty? partialv.i => "next i" + table:=cons([vu.i,partialv.i]$TermC, table) + table + + modify(tablecoef:TCoef,cfter:Detc) : TCoef == + cfexp:=cfter.valexp;cfcoef:=cfter.valcoef;cfpos:=cfter.posit + lterase:List(NNI):=empty() + for cterm in tablecoef | ^empty?(ctdet:=cterm.detfacts) repeat + (+/[term.expt for term in ctdet.first]) "next term" + for celt in ctdet repeat + if celt.cfpos.expt=cfexp then + celt.cfpos.pcoef:=cfcoef + if (and/[cc.pcoef ^=0 for cc in celt]) then + k:=position(celt,ctdet):NNI + lterase:=cons(k,lterase) + cterm.coefu:=(cterm.coefu - */[cc.pcoef for cc in celt]) + if not empty? lterase then + lterase:=sort(#1>#2,lterase) + for i in lterase repeat ctdet:=delete(ctdet,i) + cterm.detfacts:=ctdet + lterase:=empty() + tablecoef + + listexp(up:BP) :List(NNI) == + degree up=0 => [0] + [degree up,:listexp(reductum up)] + + constructp(lterm:VTerm):USP == + +/[monomial(term.pcoef,term.expt) for term in lterm] + +@ +<>= +"NPCOEF" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NPCOEF"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"NPCOEF" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package NFINTBAS NumberFieldIntegralBasis} \pagehead{NumberFieldIntegralBasis}{NFINTBAS} \pagepic{ps/v104numberfieldintegralbasis.ps}{NFINTBAS}{1.00} @@ -49846,6 +52822,1493 @@ NumberFieldIntegralBasis(UP,F): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NUMERIC Numeric} +\pagehead{Numeric}{NUMERIC} +\pagepic{ps/v104numeric.ps}{NUMERIC}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NUMERIC Numeric +++ Author: Manuel Bronstein +++ Date Created: 21 Feb 1990 +++ Date Last Updated: 17 August 1995, Mike Dewar +++ 24 January 1997, Miked Dewar (added partial operators) +++ Basic Operations: numeric, complexNumeric, numericIfCan, complexNumericIfCan +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: Numeric provides real and complex numerical evaluation +++ functions for various symbolic types. + +Numeric(S:ConvertibleTo Float): with + numeric: S -> Float + ++ numeric(x) returns a real approximation of x. + numeric: (S, PositiveInteger) -> Float + ++ numeric(x, n) returns a real approximation of x up to n decimal + ++ places. + complexNumeric: S -> Complex Float + ++ complexNumeric(x) returns a complex approximation of x. + complexNumeric: (S, PositiveInteger) -> Complex Float + ++ complexNumeric(x, n) returns a complex approximation of x up + ++ to n decimal places. + if S has CommutativeRing then + complexNumeric: Complex S -> Complex Float + ++ complexNumeric(x) returns a complex approximation of x. + complexNumeric: (Complex S, PositiveInteger) -> Complex Float + ++ complexNumeric(x, n) returns a complex approximation of x up + ++ to n decimal places. + complexNumeric: Polynomial Complex S -> Complex Float + ++ complexNumeric(x) returns a complex approximation of x. + complexNumeric: (Polynomial Complex S, PositiveInteger) -> Complex Float + ++ complexNumeric(x, n) returns a complex approximation of x up + ++ to n decimal places. + if S has Ring then + numeric: Polynomial S -> Float + ++ numeric(x) returns a real approximation of x. + numeric: (Polynomial S, PositiveInteger) -> Float + ++ numeric(x,n) returns a real approximation of x up to n decimal + ++ places. + complexNumeric: Polynomial S -> Complex Float + ++ complexNumeric(x) returns a complex approximation of x. + complexNumeric: (Polynomial S, PositiveInteger) -> Complex Float + ++ complexNumeric(x, n) returns a complex approximation of x + ++ up to n decimal places. + if S has IntegralDomain then + numeric: Fraction Polynomial S -> Float + ++ numeric(x) returns a real approximation of x. + numeric: (Fraction Polynomial S, PositiveInteger) -> Float + ++ numeric(x,n) returns a real approximation of x up to n decimal + ++ places. + complexNumeric: Fraction Polynomial S -> Complex Float + ++ complexNumeric(x) returns a complex approximation of x. + complexNumeric: (Fraction Polynomial S, PositiveInteger) -> Complex Float + ++ complexNumeric(x, n) returns a complex approximation of x + complexNumeric: Fraction Polynomial Complex S -> Complex Float + ++ complexNumeric(x) returns a complex approximation of x. + complexNumeric: (Fraction Polynomial Complex S, PositiveInteger) -> + Complex Float + ++ complexNumeric(x, n) returns a complex approximation of x + ++ up to n decimal places. + if S has OrderedSet then + numeric: Expression S -> Float + ++ numeric(x) returns a real approximation of x. + numeric: (Expression S, PositiveInteger) -> Float + ++ numeric(x, n) returns a real approximation of x up to n + ++ decimal places. + complexNumeric: Expression S -> Complex Float + ++ complexNumeric(x) returns a complex approximation of x. + complexNumeric: (Expression S, PositiveInteger) -> Complex Float + ++ complexNumeric(x, n) returns a complex approximation of x + ++ up to n decimal places. + complexNumeric: Expression Complex S -> Complex Float + ++ complexNumeric(x) returns a complex approximation of x. + complexNumeric: (Expression Complex S, PositiveInteger) -> Complex Float + ++ complexNumeric(x, n) returns a complex approximation of x + ++ up to n decimal places. + if S has CommutativeRing then + complexNumericIfCan: Polynomial Complex S -> Union(Complex Float,"failed") + ++ complexNumericIfCan(x) returns a complex approximation of x, + ++ or "failed" if \axiom{x} is not constant. + complexNumericIfCan: (Polynomial Complex S, PositiveInteger) -> Union(Complex Float,"failed") + ++ complexNumericIfCan(x, n) returns a complex approximation of x up + ++ to n decimal places, or "failed" if \axiom{x} is not a constant. + if S has Ring then + numericIfCan: Polynomial S -> Union(Float,"failed") + ++ numericIfCan(x) returns a real approximation of x, + ++ or "failed" if \axiom{x} is not a constant. + numericIfCan: (Polynomial S, PositiveInteger) -> Union(Float,"failed") + ++ numericIfCan(x,n) returns a real approximation of x up to n decimal + ++ places, or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: Polynomial S -> Union(Complex Float,"failed") + ++ complexNumericIfCan(x) returns a complex approximation of x, + ++ or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: (Polynomial S, PositiveInteger) -> Union(Complex Float,"failed") + ++ complexNumericIfCan(x, n) returns a complex approximation of x + ++ up to n decimal places, or "failed" if \axiom{x} is not a constant. + if S has IntegralDomain then + numericIfCan: Fraction Polynomial S -> Union(Float,"failed") + ++ numericIfCan(x) returns a real approximation of x, + ++ or "failed" if \axiom{x} is not a constant. + numericIfCan: (Fraction Polynomial S, PositiveInteger) -> Union(Float,"failed") + ++ numericIfCan(x,n) returns a real approximation of x up to n decimal + ++ places, or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: Fraction Polynomial S -> Union(Complex Float,"failed") + ++ complexNumericIfCan(x) returns a complex approximation of x, + ++ or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: (Fraction Polynomial S, PositiveInteger) -> Union(Complex Float,"failed") + ++ complexNumericIfCan(x, n) returns a complex approximation of x, + ++ or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: Fraction Polynomial Complex S -> Union(Complex Float,"failed") + ++ complexNumericIfCan(x) returns a complex approximation of x, + ++ or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: (Fraction Polynomial Complex S, PositiveInteger) -> + Union(Complex Float,"failed") + ++ complexNumericIfCan(x, n) returns a complex approximation of x + ++ up to n decimal places, or "failed" if \axiom{x} is not a constant. + if S has OrderedSet then + numericIfCan: Expression S -> Union(Float,"failed") + ++ numericIfCan(x) returns a real approximation of x, + ++ or "failed" if \axiom{x} is not a constant. + numericIfCan: (Expression S, PositiveInteger) -> Union(Float,"failed") + ++ numericIfCan(x, n) returns a real approximation of x up to n + ++ decimal places, or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: Expression S -> Union(Complex Float,"failed") + ++ complexNumericIfCan(x) returns a complex approximation of x, + ++ or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: (Expression S, PositiveInteger) -> + Union(Complex Float,"failed") + ++ complexNumericIfCan(x, n) returns a complex approximation of x + ++ up to n decimal places, or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: Expression Complex S -> Union(Complex Float,"failed") + ++ complexNumericIfCan(x) returns a complex approximation of x, + ++ or "failed" if \axiom{x} is not a constant. + complexNumericIfCan: (Expression Complex S, PositiveInteger) -> + Union(Complex Float,"failed") + ++ complexNumericIfCan(x, n) returns a complex approximation of x + ++ up to n decimal places, or "failed" if \axiom{x} is not a constant. + == add + + if S has CommutativeRing then + complexNumericIfCan(p:Polynomial Complex S) == + p' : Union(Complex(S),"failed") := retractIfCan p + p' case "failed" => "failed" + complexNumeric(p') + + complexNumericIfCan(p:Polynomial Complex S,n:PositiveInteger) == + p' : Union(Complex(S),"failed") := retractIfCan p + p' case "failed" => "failed" + complexNumeric(p',n) + + if S has Ring then + numericIfCan(p:Polynomial S) == + p' : Union(S,"failed") := retractIfCan p + p' case "failed" => "failed" + numeric(p') + + complexNumericIfCan(p:Polynomial S) == + p' : Union(S,"failed") := retractIfCan p + p' case "failed" => "failed" + complexNumeric(p') + + complexNumericIfCan(p:Polynomial S, n:PositiveInteger) == + p' : Union(S,"failed") := retractIfCan p + p' case "failed" => "failed" + complexNumeric(p', n) + + numericIfCan(p:Polynomial S, n:PositiveInteger) == + old := digits(n)$Float + ans := numericIfCan p + digits(old)$Float + ans + + if S has IntegralDomain then + numericIfCan(f:Fraction Polynomial S)== + num := numericIfCan(numer(f)) + num case "failed" => "failed" + den := numericIfCan(denom f) + den case "failed" => "failed" + num/den + + complexNumericIfCan(f:Fraction Polynomial S) == + num := complexNumericIfCan(numer f) + num case "failed" => "failed" + den := complexNumericIfCan(denom f) + den case "failed" => "failed" + num/den + + complexNumericIfCan(f:Fraction Polynomial S, n:PositiveInteger) == + num := complexNumericIfCan(numer f, n) + num case "failed" => "failed" + den := complexNumericIfCan(denom f, n) + den case "failed" => "failed" + num/den + + numericIfCan(f:Fraction Polynomial S, n:PositiveInteger) == + old := digits(n)$Float + ans := numericIfCan f + digits(old)$Float + ans + + complexNumericIfCan(f:Fraction Polynomial Complex S) == + num := complexNumericIfCan(numer f) + num case "failed" => "failed" + den := complexNumericIfCan(denom f) + den case "failed" => "failed" + num/den + + complexNumericIfCan(f:Fraction Polynomial Complex S, n:PositiveInteger) == + num := complexNumericIfCan(numer f, n) + num case "failed" => "failed" + den := complexNumericIfCan(denom f, n) + den case "failed" => "failed" + num/den + + if S has OrderedSet then + numericIfCan(x:Expression S) == + retractIfCan(map(convert, x)$ExpressionFunctions2(S, Float)) + + --s2cs(u:S):Complex(S) == complex(u,0) + + complexNumericIfCan(x:Expression S) == + complexNumericIfCan map(coerce, x)$ExpressionFunctions2(S,Complex S) + + numericIfCan(x:Expression S, n:PositiveInteger) == + old := digits(n)$Float + x' : Expression Float := map(convert, x)$ExpressionFunctions2(S, Float) + ans : Union(Float,"failed") := retractIfCan x' + digits(old)$Float + ans + + complexNumericIfCan(x:Expression S, n:PositiveInteger) == + old := digits(n)$Float + x' : Expression Complex S := map(coerce, x)$ExpressionFunctions2(S, Complex S) + ans : Union(Complex Float,"failed") := complexNumericIfCan(x') + digits(old)$Float + ans + + if S has RealConstant then + complexNumericIfCan(x:Expression Complex S) == + retractIfCan(map(convert, x)$ExpressionFunctions2(Complex S,Complex Float)) + + complexNumericIfCan(x:Expression Complex S, n:PositiveInteger) == + old := digits(n)$Float + x' : Expression Complex Float := + map(convert, x)$ExpressionFunctions2(Complex S,Complex Float) + ans : Union(Complex Float,"failed") := retractIfCan x' + digits(old)$Float + ans + else + convert(x:Complex S):Complex(Float)==map(convert,x)$ComplexFunctions2(S,Float) + + complexNumericIfCan(x:Expression Complex S) == + retractIfCan(map(convert, x)$ExpressionFunctions2(Complex S,Complex Float)) + + complexNumericIfCan(x:Expression Complex S, n:PositiveInteger) == + old := digits(n)$Float + x' : Expression Complex Float := + map(convert, x)$ExpressionFunctions2(Complex S,Complex Float) + ans : Union(Complex Float,"failed") := retractIfCan x' + digits(old)$Float + ans + numeric(s:S) == convert(s)@Float + + if S has ConvertibleTo Complex Float then + complexNumeric(s:S) == convert(s)@Complex(Float) + + complexNumeric(s:S, n:PositiveInteger) == + old := digits(n)$Float + ans := complexNumeric s + digits(old)$Float + ans + + else + complexNumeric(s:S) == convert(s)@Float :: Complex(Float) + + complexNumeric(s:S,n:PositiveInteger) == + numeric(s, n)::Complex(Float) + + if S has CommutativeRing then + complexNumeric(p:Polynomial Complex S) == + p' : Union(Complex(S),"failed") := retractIfCan p + p' case "failed" => + error "Cannot compute the numerical value of a non-constant polynomial" + complexNumeric(p') + + complexNumeric(p:Polynomial Complex S,n:PositiveInteger) == + p' : Union(Complex(S),"failed") := retractIfCan p + p' case "failed" => + error "Cannot compute the numerical value of a non-constant polynomial" + complexNumeric(p',n) + + if S has RealConstant then + complexNumeric(s:Complex S) == convert(s)$Complex(S) + + complexNumeric(s:Complex S, n:PositiveInteger) == + old := digits(n)$Float + ans := complexNumeric s + digits(old)$Float + ans + + else if Complex(S) has ConvertibleTo(Complex Float) then + complexNumeric(s:Complex S) == convert(s)@Complex(Float) + + complexNumeric(s:Complex S, n:PositiveInteger) == + old := digits(n)$Float + ans := complexNumeric s + digits(old)$Float + ans + + else + complexNumeric(s:Complex S) == + s' : Union(S,"failed") := retractIfCan s + s' case "failed" => + error "Cannot compute the numerical value of a non-constant object" + complexNumeric(s') + + complexNumeric(s:Complex S, n:PositiveInteger) == + s' : Union(S,"failed") := retractIfCan s + s' case "failed" => + error "Cannot compute the numerical value of a non-constant object" + old := digits(n)$Float + ans := complexNumeric s' + digits(old)$Float + ans + + numeric(s:S, n:PositiveInteger) == + old := digits(n)$Float + ans := numeric s + digits(old)$Float + ans + + if S has Ring then + numeric(p:Polynomial S) == + p' : Union(S,"failed") := retractIfCan p + p' case "failed" => error + "Can only compute the numerical value of a constant, real-valued polynomial" + numeric(p') + + complexNumeric(p:Polynomial S) == + p' : Union(S,"failed") := retractIfCan p + p' case "failed" => + error "Cannot compute the numerical value of a non-constant polynomial" + complexNumeric(p') + + complexNumeric(p:Polynomial S, n:PositiveInteger) == + p' : Union(S,"failed") := retractIfCan p + p' case "failed" => + error "Cannot compute the numerical value of a non-constant polynomial" + complexNumeric(p', n) + + numeric(p:Polynomial S, n:PositiveInteger) == + old := digits(n)$Float + ans := numeric p + digits(old)$Float + ans + + if S has IntegralDomain then + numeric(f:Fraction Polynomial S)== + numeric(numer(f)) / numeric(denom f) + + complexNumeric(f:Fraction Polynomial S) == + complexNumeric(numer f)/complexNumeric(denom f) + + complexNumeric(f:Fraction Polynomial S, n:PositiveInteger) == + complexNumeric(numer f, n)/complexNumeric(denom f, n) + + numeric(f:Fraction Polynomial S, n:PositiveInteger) == + old := digits(n)$Float + ans := numeric f + digits(old)$Float + ans + + complexNumeric(f:Fraction Polynomial Complex S) == + complexNumeric(numer f)/complexNumeric(denom f) + + complexNumeric(f:Fraction Polynomial Complex S, n:PositiveInteger) == + complexNumeric(numer f, n)/complexNumeric(denom f, n) + + if S has OrderedSet then + numeric(x:Expression S) == + x' : Union(Float,"failed") := + retractIfCan(map(convert, x)$ExpressionFunctions2(S, Float)) + x' case "failed" => error + "Can only compute the numerical value of a constant, real-valued Expression" + x' + + complexNumeric(x:Expression S) == + x' : Union(Complex Float,"failed") := retractIfCan( + map(complexNumeric, x)$ExpressionFunctions2(S,Complex Float)) + x' case "failed" => + error "Cannot compute the numerical value of a non-constant expression" + x' + + numeric(x:Expression S, n:PositiveInteger) == + old := digits(n)$Float + x' : Expression Float := map(convert, x)$ExpressionFunctions2(S, Float) + ans : Union(Float,"failed") := retractIfCan x' + digits(old)$Float + ans case "failed" => error + "Can only compute the numerical value of a constant, real-valued Expression" + ans + + complexNumeric(x:Expression S, n:PositiveInteger) == + old := digits(n)$Float + x' : Expression Complex Float := + map(complexNumeric, x)$ExpressionFunctions2(S,Complex Float) + ans : Union(Complex Float,"failed") := retractIfCan x' + digits(old)$Float + ans case "failed" => + error "Cannot compute the numerical value of a non-constant expression" + ans + + complexNumeric(x:Expression Complex S) == + x' : Union(Complex Float,"failed") := retractIfCan( + map(complexNumeric, x)$ExpressionFunctions2(Complex S,Complex Float)) + x' case "failed" => + error "Cannot compute the numerical value of a non-constant expression" + x' + + complexNumeric(x:Expression Complex S, n:PositiveInteger) == + old := digits(n)$Float + x' : Expression Complex Float := + map(complexNumeric, x)$ExpressionFunctions2(Complex S,Complex Float) + ans : Union(Complex Float,"failed") := retractIfCan x' + digits(old)$Float + ans case "failed" => + error "Cannot compute the numerical value of a non-constant expression" + ans + +@ +<>= +"NUMERIC" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NUMERIC"] +"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"] +"NUMERIC" -> "COMPCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NUMODE NumericalOrdinaryDifferentialEquations} +\pagehead{NumericalOrdinaryDifferentialEquations}{NUMODE} +\pagepic{ps/v104numericalordinarydifferentialequations.ps}{NUMODE}{1.00} +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NUMODE NumericalOrdinaryDifferentialEquations +++ Author: Yurij Baransky +++ Date Created: October 90 +++ Date Last Updated: October 90 +++ Basic Operations: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This package is a suite of functions for the numerical integration of an +++ ordinary differential equation of n variables: +++ +++ \center{dy/dx = f(y,x)\space{5}y is an n-vector} +++ +++ \par All the routines are based on a 4-th order Runge-Kutta kernel. +++ These routines generally have as arguments: +++ n, the number of dependent variables; +++ x1, the initial point; +++ h, the step size; +++ y, a vector of initial conditions of length n which upon exit contains the solution at \spad{x1 + h}; +++ \spad{derivs}, a function which computes the right hand side of the +++ ordinary differential equation: \spad{derivs(dydx,y,x)} computes \spad{dydx}, +++ a vector which contains the derivative information. +++ +++ \par In order of increasing complexity:\begin{items} +++ +++ \item \spad{rk4(y,n,x1,h,derivs)} advances the solution vector to +++ \spad{x1 + h} and return the values in y. +++ +++ \item \spad{rk4(y,n,x1,h,derivs,t1,t2,t3,t4)} is the same as +++ \spad{rk4(y,n,x1,h,derivs)} except that you must provide 4 scratch +++ arrays t1-t4 of size n. +++ +++ \item Starting with y at x1, \spad{rk4f(y,n,x1,x2,ns,derivs)} +++ uses \spad{ns} fixed +++ steps of a 4-th order Runge-Kutta integrator to advance the +++ solution vector to x2 and return the values in y. +++ Argument x2, is the final point, and +++ \spad{ns}, the number of steps to take. +++ +++ \item \spad{rk4qc(y,n,x1,step,eps,yscal,derivs)} takes a 5-th order +++ Runge-Kutta step with monitoring +++ of local truncation to ensure accuracy and adjust stepsize. +++ The function takes two half steps and one full step and scales +++ the difference in solutions at the final point. If the error is +++ within \spad{eps}, the step is taken and the result is returned. +++ If the error is not within \spad{eps}, the stepsize if decreased +++ and the procedure is tried again until the desired accuracy is +++ reached. Upon input, an trial step size must be given and upon +++ return, an estimate of the next step size to use is returned as +++ well as the step size which produced the desired accuracy. +++ The scaled error is computed as +++ \center{\spad{error = MAX(ABS((y2steps(i) - y1step(i))/yscal(i)))}} +++ and this is compared against \spad{eps}. If this is greater +++ than \spad{eps}, the step size is reduced accordingly to +++ \center{\spad{hnew = 0.9 * hdid * (error/eps)**(-1/4)}} +++ If the error criterion is satisfied, then we check if the +++ step size was too fine and return a more efficient one. If +++ \spad{error > \spad{eps} * (6.0E-04)} then the next step size should be +++ \center{\spad{hnext = 0.9 * hdid * (error/\spad{eps})**(-1/5)}} +++ Otherwise \spad{hnext = 4.0 * hdid} is returned. +++ A more detailed discussion of this and related topics can be +++ found in the book "Numerical Recipies" by W.Press, B.P. Flannery, +++ S.A. Teukolsky, W.T. Vetterling published by Cambridge University Press. +++ Argument \spad{step} is a record of 3 floating point +++ numbers \spad{(try , did , next)}, +++ \spad{eps} is the required accuracy, +++ \spad{yscal} is the scaling vector for the difference in solutions. +++ On input, \spad{step.try} should be the guess at a step +++ size to achieve the accuracy. +++ On output, \spad{step.did} contains the step size which achieved the +++ accuracy and \spad{step.next} is the next step size to use. +++ +++ \item \spad{rk4qc(y,n,x1,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6,t7)} is the +++ same as \spad{rk4qc(y,n,x1,step,eps,yscal,derivs)} except that the user +++ must provide the 7 scratch arrays \spad{t1-t7} of size n. +++ +++ \item \spad{rk4a(y,n,x1,x2,eps,h,ns,derivs)} +++ is a driver program which uses \spad{rk4qc} to integrate n ordinary +++ differential equations starting at x1 to x2, keeping the local +++ truncation error to within \spad{eps} by changing the local step size. +++ The scaling vector is defined as +++ \center{\spad{yscal(i) = abs(y(i)) + abs(h*dydx(i)) + tiny}} +++ where \spad{y(i)} is the solution at location x, \spad{dydx} is the +++ ordinary differential equation's right hand side, h is the current +++ step size and \spad{tiny} is 10 times the +++ smallest positive number representable. +++ The user must supply an estimate for a trial step size and +++ the maximum number of calls to \spad{rk4qc} to use. +++ Argument x2 is the final point, +++ \spad{eps} is local truncation, +++ \spad{ns} is the maximum number of call to \spad{rk4qc} to use. +++ \end{items} +NumericalOrdinaryDifferentialEquations(): Exports == Implementation where + L ==> List + V ==> Vector + B ==> Boolean + I ==> Integer + E ==> OutputForm + NF ==> Float + NNI ==> NonNegativeInteger + VOID ==> Void + OFORM ==> OutputForm + RK4STEP ==> Record(try:NF, did:NF, next:NF) + + Exports ==> with +--header definitions here + rk4 : (V NF,I,NF,NF, (V NF,V NF,NF) -> VOID) -> VOID + ++ rk4(y,n,x1,h,derivs) uses a 4-th order Runge-Kutta method + ++ to numerically integrate the ordinary differential equation + ++ {\em dy/dx = f(y,x)} of n variables, where y is an n-vector. + ++ Argument y is a vector of initial conditions of length n which upon exit + ++ contains the solution at \spad{x1 + h}, n is the number of dependent + ++ variables, x1 is the initial point, h is the step size, and + ++ \spad{derivs} is a function which computes the right hand side of the + ++ ordinary differential equation. + ++ For details, see \spadtype{NumericalOrdinaryDifferentialEquations}. + rk4 : (V NF,I,NF,NF, (V NF,V NF,NF) -> VOID + ,V NF,V NF,V NF,V NF) -> VOID + ++ rk4(y,n,x1,h,derivs,t1,t2,t3,t4) is the same as + ++ \spad{rk4(y,n,x1,h,derivs)} except that you must provide 4 scratch + ++ arrays t1-t4 of size n. + ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. + rk4a : (V NF,I,NF,NF,NF,NF,I,(V NF,V NF,NF) -> VOID ) -> VOID + ++ rk4a(y,n,x1,x2,eps,h,ns,derivs) is a driver function for the + ++ numerical integration of an ordinary differential equation + ++ {\em dy/dx = f(y,x)} of n variables, where y is an n-vector + ++ using a 4-th order Runge-Kutta method. + ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. + rk4qc : (V NF,I,NF,RK4STEP,NF,V NF,(V NF,V NF,NF) -> VOID) -> VOID + ++ rk4qc(y,n,x1,step,eps,yscal,derivs) is a subfunction for the + ++ numerical integration of an ordinary differential equation + ++ {\em dy/dx = f(y,x)} of n variables, where y is an n-vector + ++ using a 4-th order Runge-Kutta method. + ++ This function takes a 5-th order Runge-Kutta step with monitoring + ++ of local truncation to ensure accuracy and adjust stepsize. + ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. + rk4qc : (V NF,I,NF,RK4STEP,NF,V NF,(V NF,V NF,NF) -> VOID + ,V NF,V NF,V NF,V NF,V NF,V NF,V NF) -> VOID + ++ rk4qc(y,n,x1,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6,t7) is a + ++ subfunction for the numerical integration of an ordinary differential + ++ equation {\em dy/dx = f(y,x)} of n variables, where y is an n-vector + ++ using a 4-th order Runge-Kutta method. + ++ This function takes a 5-th order Runge-Kutta step with monitoring + ++ of local truncation to ensure accuracy and adjust stepsize. + ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. + rk4f : (V NF,I,NF,NF,I,(V NF,V NF,NF) -> VOID ) -> VOID + ++ rk4f(y,n,x1,x2,ns,derivs) uses a 4-th order Runge-Kutta method + ++ to numerically integrate the ordinary differential equation + ++ {\em dy/dx = f(y,x)} of n variables, where y is an n-vector. + ++ Starting with y at x1, this function uses \spad{ns} fixed + ++ steps of a 4-th order Runge-Kutta integrator to advance the + ++ solution vector to x2 and return the values in y. + ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. + + Implementation ==> add + --some local function definitions here + rk4qclocal : (V NF,V NF,I,NF,RK4STEP,NF,V NF,(V NF,V NF,NF) -> VOID + ,V NF,V NF,V NF,V NF,V NF,V NF) -> VOID + rk4local : (V NF,V NF,I,NF,NF,V NF,(V NF,V NF,NF) -> VOID + ,V NF,V NF,V NF) -> VOID + import OutputPackage + +------------------------------------------------------------ + + rk4a(ystart,nvar,x1,x2,eps,htry,nstep,derivs) == + y : V NF := new(nvar::NNI,0.0) + yscal : V NF := new(nvar::NNI,1.0) + dydx : V NF := new(nvar::NNI,0.0) + t1 : V NF := new(nvar::NNI,0.0) + t2 : V NF := new(nvar::NNI,0.0) + t3 : V NF := new(nvar::NNI,0.0) + t4 : V NF := new(nvar::NNI,0.0) + t5 : V NF := new(nvar::NNI,0.0) + t6 : V NF := new(nvar::NNI,0.0) + step : RK4STEP := [htry,0.0,0.0] + x : NF := x1 + tiny : NF := 10.0**(-(digits()+1)::I) + m : I := nvar + outlist : L OFORM := [x::E,x::E,x::E] + i : I + iter : I + + eps := 1.0/eps + for i in 1..m repeat + y(i) := ystart(i) + for iter in 1..nstep repeat +--compute the derivative + derivs(dydx,y,x) +--if overshoot, the set h accordingly + if (x + step.try - x2) > 0.0 then + step.try := x2 - x +--find the correct scaling + for i in 1..m repeat + yscal(i) := abs(y(i)) + abs(step.try * dydx(i)) + tiny +--take a quality controlled runge-kutta step + rk4qclocal(y,dydx,nvar,x,step,eps,yscal,derivs + ,t1,t2,t3,t4,t5,t6) + x := x + step.did +-- outlist.0 := x::E +-- outlist.1 := y(0)::E +-- outlist.2 := y(1)::E +-- output(blankSeparate(outlist)::E) +--check to see if done + if (x-x2) >= 0.0 then + leave +--next stepsize to use + step.try := step.next +--end nstep repeat + if iter = (nstep+1) then + output("ode: ERROR ") + outlist.1 := nstep::E + outlist.2 := " steps to small, last h = "::E + outlist.3 := step.did::E + output(blankSeparate(outlist)) + output(" y= ",y::E) + for i in 1..m repeat + ystart(i) := y(i) + +---------------------------------------------------------------- + + rk4qc(y,n,x,step,eps,yscal,derivs) == + t1 : V NF := new(n::NNI,0.0) + t2 : V NF := new(n::NNI,0.0) + t3 : V NF := new(n::NNI,0.0) + t4 : V NF := new(n::NNI,0.0) + t5 : V NF := new(n::NNI,0.0) + t6 : V NF := new(n::NNI,0.0) + t7 : V NF := new(n::NNI,0.0) + derivs(t7,y,x) + eps := 1.0/eps + rk4qclocal(y,t7,n,x,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6) + +-------------------------------------------------------- + + rk4qc(y,n,x,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6,dydx) == + derivs(dydx,y,x) + eps := 1.0/eps + rk4qclocal(y,dydx,n,x,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6) + +-------------------------------------------------------- + + rk4qclocal(y,dydx,n,x,step,eps,yscal,derivs + ,t1,t2,t3,ysav,dysav,ytemp) == + xsav : NF := x + h : NF := step.try + fcor : NF := 1.0/15.0 + safety : NF := 0.9 + grow : NF := -0.20 + shrink : NF := -0.25 + errcon : NF := 0.6E-04 --(this is 4/safety)**(1/grow) + hh : NF + errmax : NF + i : I + m : I := n +-- + for i in 1..m repeat + dysav(i) := dydx(i) + ysav(i) := y(i) +--cut down step size till error criterion is met + repeat +--take two little steps to get to x + h + hh := 0.5 * h + rk4local(ysav,dysav,n,xsav,hh,ytemp,derivs,t1,t2,t3) + x := xsav + hh + derivs(dydx,ytemp,x) + rk4local(ytemp,dydx,n,x,hh,y,derivs,t1,t2,t3) + x := xsav + h +--take one big step get to x + h + rk4local(ysav,dysav,n,xsav,h,ytemp,derivs,t1,t2,t3) + +--compute the maximum scaled difference + errmax := 0.0 + for i in 1..m repeat + ytemp(i) := y(i) - ytemp(i) + errmax := max(errmax,abs(ytemp(i)/yscal(i))) +--scale relative to required accuracy + errmax := errmax * eps +--update integration stepsize + if (errmax > 1.0) then + h := safety * h * (errmax ** shrink) + else + step.did := h + if errmax > errcon then + step.next := safety * h * (errmax ** grow) + else + step.next := 4 * h + leave +--make fifth order with 4-th order error estimate + for i in 1..m repeat + y(i) := y(i) + ytemp(i) * fcor + +-------------------------------------------- + + rk4f(y,nvar,x1,x2,nstep,derivs) == + yt : V NF := new(nvar::NNI,0.0) + dyt : V NF := new(nvar::NNI,0.0) + dym : V NF := new(nvar::NNI,0.0) + dydx : V NF := new(nvar::NNI,0.0) + ynew : V NF := new(nvar::NNI,0.0) + h : NF := (x2-x1) / (nstep::NF) + x : NF := x1 + i : I + j : I +-- start integrating + for i in 1..nstep repeat + derivs(dydx,y,x) + rk4local(y,dydx,nvar,x,h,y,derivs,yt,dyt,dym) + x := x + h + +-------------------------------------------------------- + + rk4(y,n,x,h,derivs) == + t1 : V NF := new(n::NNI,0.0) + t2 : V NF := new(n::NNI,0.0) + t3 : V NF := new(n::NNI,0.0) + t4 : V NF := new(n::NNI,0.0) + derivs(t1,y,x) + rk4local(y,t1,n,x,h,y,derivs,t2,t3,t4) + +------------------------------------------------------------ + + rk4(y,n,x,h,derivs,t1,t2,t3,t4) == + derivs(t1,y,x) + rk4local(y,t1,n,x,h,y,derivs,t2,t3,t4) + +------------------------------------------------------------ + + rk4local(y,dydx,n,x,h,yout,derivs,yt,dyt,dym) == + hh : NF := h*0.5 + h6 : NF := h/6.0 + xh : NF := x+hh + m : I := n + i : I +-- first step + for i in 1..m repeat + yt(i) := y(i) + hh*dydx(i) +-- second step + derivs(dyt,yt,xh) + for i in 1..m repeat + yt(i) := y(i) + hh*dyt(i) +-- third step + derivs(dym,yt,xh) + for i in 1..m repeat + yt(i) := y(i) + h*dym(i) + dym(i) := dyt(i) + dym(i) +-- fourth step + derivs(dyt,yt,x+h) + for i in 1..m repeat + yout(i) := y(i) + h6*( dydx(i) + 2.0*dym(i) + dyt(i) ) + +@ +<>= +"NUMODE" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NUMODE"] +"IVECTOR" [color="#88FF44",href="bookvol10.3.pdf#nameddest=IVECTOR"] +"NUMODE" -> "IVECTOR" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NUMQUAD NumericalQuadrature} +\pagehead{NumericalQuadrature}{NUMQUAD} +\pagepic{ps/v104numericalquadrature.ps}{NUMQUAD}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NUMQUAD NumericalQuadrature +++ Author: Yurij A. Baransky +++ Date Created: October 90 +++ Date Last Updated: October 90 +++ Basic Operations: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This suite of routines performs numerical quadrature using +++ algorithms derived from the basic trapezoidal rule. Because +++ the error term of this rule contains only even powers of the +++ step size (for open and closed versions), fast convergence +++ can be obtained if the integrand is sufficiently smooth. +++ +++ Each routine returns a Record of type TrapAns, which contains\indent{3} +++ \newline value (\spadtype{Float}):\tab{20} estimate of the integral +++ \newline error (\spadtype{Float}):\tab{20} estimate of the error in the computation +++ \newline totalpts (\spadtype{Integer}):\tab{20} total number of function evaluations +++ \newline success (\spadtype{Boolean}):\tab{20} if the integral was computed within the user specified error criterion +++ \indent{0}\indent{0} +++ To produce this estimate, each routine generates an internal +++ sequence of sub-estimates, denoted by {\em S(i)}, depending on the +++ routine, to which the various convergence criteria are applied. +++ The user must supply a relative accuracy, \spad{eps_r}, and an absolute +++ accuracy, \spad{eps_a}. Convergence is obtained when either +++ \center{\spad{ABS(S(i) - S(i-1)) < eps_r * ABS(S(i-1))}} +++ \center{or \spad{ABS(S(i) - S(i-1)) < eps_a}} +++ are true statements. +++ +++ The routines come in three families and three flavors: +++ \newline\tab{3} closed:\tab{20}romberg,\tab{30}simpson,\tab{42}trapezoidal +++ \newline\tab{3} open: \tab{20}rombergo,\tab{30}simpsono,\tab{42}trapezoidalo +++ \newline\tab{3} adaptive closed:\tab{20}aromberg,\tab{30}asimpson,\tab{42}atrapezoidal +++ \par +++ The {\em S(i)} for the trapezoidal family is the value of the +++ integral using an equally spaced absicca trapezoidal rule for +++ that level of refinement. +++ \par +++ The {\em S(i)} for the simpson family is the value of the integral +++ using an equally spaced absicca simpson rule for that level of +++ refinement. +++ \par +++ The {\em S(i)} for the romberg family is the estimate of the integral +++ using an equally spaced absicca romberg method. For +++ the \spad{i}-th level, this is an appropriate combination of all the +++ previous trapezodial estimates so that the error term starts +++ with the \spad{2*(i+1)} power only. +++ \par +++ The three families come in a closed version, where the formulas +++ include the endpoints, an open version where the formulas do not +++ include the endpoints and an adaptive version, where the user +++ is required to input the number of subintervals over which the +++ appropriate closed family integrator will apply with the usual +++ convergence parmeters for each subinterval. This is useful +++ where a large number of points are needed only in a small fraction +++ of the entire domain. +++ \par +++ Each routine takes as arguments: +++ \newline f\tab{10} integrand +++ \newline a\tab{10} starting point +++ \newline b\tab{10} ending point +++ \newline \spad{eps_r}\tab{10} relative error +++ \newline \spad{eps_a}\tab{10} absolute error +++ \newline \spad{nmin} \tab{10} refinement level when to start checking for convergence (> 1) +++ \newline \spad{nmax} \tab{10} maximum level of refinement +++ \par +++ The adaptive routines take as an additional parameter +++ \newline \spad{nint}\tab{10} the number of independent intervals to apply a closed +++ family integrator of the same name. +++ \par Notes: +++ \newline Closed family level i uses \spad{1 + 2**i} points. +++ \newline Open family level i uses \spad{1 + 3**i} points. +NumericalQuadrature(): Exports == Implementation where + L ==> List + V ==> Vector + I ==> Integer + B ==> Boolean + E ==> OutputForm + F ==> Float + PI ==> PositiveInteger + OFORM ==> OutputForm + TrapAns ==> Record(value:F, error:F, totalpts:I, success:B ) + + Exports ==> with + aromberg : (F -> F,F,F,F,F,I,I,I) -> TrapAns + ++ aromberg(fn,a,b,epsrel,epsabs,nmin,nmax,nint) + ++ uses the adaptive romberg method to numerically integrate function + ++ \spad{fn} over the closed interval from \spad{a} to \spad{b}, + ++ with relative accuracy \spad{epsrel} and absolute accuracy + ++ \spad{epsabs}, with the refinement levels for convergence checking + ++ vary from \spad{nmin} to \spad{nmax}, and where \spad{nint} + ++ is the number of independent intervals to apply the integrator. + ++ The value returned is a record containing the value of the integral, + ++ the estimate of the error in the computation, the total number of + ++ function evaluations, and either a boolean value which is true if + ++ the integral was computed within the user specified error criterion. + ++ See \spadtype{NumericalQuadrature} for details. + asimpson : (F -> F,F,F,F,F,I,I,I) -> TrapAns + ++ asimpson(fn,a,b,epsrel,epsabs,nmin,nmax,nint) uses the + ++ adaptive simpson method to numerically integrate function \spad{fn} + ++ over the closed interval from \spad{a} to \spad{b}, with relative + ++ accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, with the + ++ refinement levels for convergence checking vary from \spad{nmin} + ++ to \spad{nmax}, and where \spad{nint} is the number of independent + ++ intervals to apply the integrator. The value returned is a record + ++ containing the value of the integral, the estimate of the error in + ++ the computation, the total number of function evaluations, and + ++ either a boolean value which is true if the integral was computed + ++ within the user specified error criterion. + ++ See \spadtype{NumericalQuadrature} for details. + atrapezoidal : (F -> F,F,F,F,F,I,I,I) -> TrapAns + ++ atrapezoidal(fn,a,b,epsrel,epsabs,nmin,nmax,nint) uses the + ++ adaptive trapezoidal method to numerically integrate function + ++ \spad{fn} over the closed interval from \spad{a} to \spad{b}, with + ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, + ++ with the refinement levels for convergence checking vary from + ++ \spad{nmin} to \spad{nmax}, and where \spad{nint} is the number + ++ of independent intervals to apply the integrator. The value returned + ++ is a record containing the value of the integral, the estimate of + ++ the error in the computation, the total number of function + ++ evaluations, and either a boolean value which is true if + ++ the integral was computed within the user specified error criterion. + ++ See \spadtype{NumericalQuadrature} for details. + romberg : (F -> F,F,F,F,F,I,I) -> TrapAns + ++ romberg(fn,a,b,epsrel,epsabs,nmin,nmax) uses the romberg + ++ method to numerically integrate function \spadvar{fn} over the closed + ++ interval \spad{a} to \spad{b}, with relative accuracy \spad{epsrel} + ++ and absolute accuracy \spad{epsabs}, with the refinement levels + ++ for convergence checking vary from \spad{nmin} to \spad{nmax}. + ++ The value returned is a record containing the value + ++ of the integral, the estimate of the error in the computation, the + ++ total number of function evaluations, and either a boolean value + ++ which is true if the integral was computed within the user specified + ++ error criterion. See \spadtype{NumericalQuadrature} for details. + simpson : (F -> F,F,F,F,F,I,I) -> TrapAns + ++ simpson(fn,a,b,epsrel,epsabs,nmin,nmax) uses the simpson + ++ method to numerically integrate function \spad{fn} over the closed + ++ interval \spad{a} to \spad{b}, with + ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, + ++ with the refinement levels for convergence checking vary from + ++ \spad{nmin} to \spad{nmax}. The value returned + ++ is a record containing the value of the integral, the estimate of + ++ the error in the computation, the total number of function + ++ evaluations, and either a boolean value which is true if + ++ the integral was computed within the user specified error criterion. + ++ See \spadtype{NumericalQuadrature} for details. + trapezoidal : (F -> F,F,F,F,F,I,I) -> TrapAns + ++ trapezoidal(fn,a,b,epsrel,epsabs,nmin,nmax) uses the + ++ trapezoidal method to numerically integrate function \spadvar{fn} over + ++ the closed interval \spad{a} to \spad{b}, with relative accuracy + ++ \spad{epsrel} and absolute accuracy \spad{epsabs}, with the + ++ refinement levels for convergence checking vary + ++ from \spad{nmin} to \spad{nmax}. The value + ++ returned is a record containing the value of the integral, the + ++ estimate of the error in the computation, the total number of + ++ function evaluations, and either a boolean value which is true + ++ if the integral was computed within the user specified error criterion. + ++ See \spadtype{NumericalQuadrature} for details. + rombergo : (F -> F,F,F,F,F,I,I) -> TrapAns + ++ rombergo(fn,a,b,epsrel,epsabs,nmin,nmax) uses the romberg + ++ method to numerically integrate function \spad{fn} over + ++ the open interval from \spad{a} to \spad{b}, with + ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, + ++ with the refinement levels for convergence checking vary from + ++ \spad{nmin} to \spad{nmax}. The value returned + ++ is a record containing the value of the integral, the estimate of + ++ the error in the computation, the total number of function + ++ evaluations, and either a boolean value which is true if + ++ the integral was computed within the user specified error criterion. + ++ See \spadtype{NumericalQuadrature} for details. + simpsono : (F -> F,F,F,F,F,I,I) -> TrapAns + ++ simpsono(fn,a,b,epsrel,epsabs,nmin,nmax) uses the + ++ simpson method to numerically integrate function \spad{fn} over + ++ the open interval from \spad{a} to \spad{b}, with + ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, + ++ with the refinement levels for convergence checking vary from + ++ \spad{nmin} to \spad{nmax}. The value returned + ++ is a record containing the value of the integral, the estimate of + ++ the error in the computation, the total number of function + ++ evaluations, and either a boolean value which is true if + ++ the integral was computed within the user specified error criterion. + ++ See \spadtype{NumericalQuadrature} for details. + trapezoidalo : (F -> F,F,F,F,F,I,I) -> TrapAns + ++ trapezoidalo(fn,a,b,epsrel,epsabs,nmin,nmax) uses the + ++ trapezoidal method to numerically integrate function \spad{fn} + ++ over the open interval from \spad{a} to \spad{b}, with + ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, + ++ with the refinement levels for convergence checking vary from + ++ \spad{nmin} to \spad{nmax}. The value returned + ++ is a record containing the value of the integral, the estimate of + ++ the error in the computation, the total number of function + ++ evaluations, and either a boolean value which is true if + ++ the integral was computed within the user specified error criterion. + ++ See \spadtype{NumericalQuadrature} for details. + + Implementation ==> add + trapclosed : (F -> F,F,F,F,I) -> F + trapopen : (F -> F,F,F,F,I) -> F + import OutputPackage + +--------------------------------------------------- + + aromberg(func,a,b,epsrel,epsabs,nmin,nmax,nint) == + ans : TrapAns + sum : F := 0.0 + err : F := 0.0 + pts : I := 1 + done : B := true + hh : F := (b-a) / nint + x1 : F := a + x2 : F := a + hh + io : L OFORM := [x1::E,x2::E] + i : I + for i in 1..nint repeat + ans := romberg(func,x1,x2,epsrel,epsabs,nmin,nmax) + if (not ans.success) then + io.1 := x1::E + io.2 := x2::E + print blankSeparate cons("accuracy not reached in interval"::E,io) + sum := sum + ans.value + err := err + abs(ans.error) + pts := pts + ans.totalpts-1 + done := (done and ans.success) + x1 := x2 + x2 := x2 + hh + return( [sum , err , pts , done] ) + +--------------------------------------------------- + + asimpson(func,a,b,epsrel,epsabs,nmin,nmax,nint) == + ans : TrapAns + sum : F := 0.0 + err : F := 0.0 + pts : I := 1 + done : B := true + hh : F := (b-a) / nint + x1 : F := a + x2 : F := a + hh + io : L OFORM := [x1::E,x2::E] + i : I + for i in 1..nint repeat + ans := simpson(func,x1,x2,epsrel,epsabs,nmin,nmax) + if (not ans.success) then + io.1 := x1::E + io.2 := x2::E + print blankSeparate cons("accuracy not reached in interval"::E,io) + sum := sum + ans.value + err := err + abs(ans.error) + pts := pts + ans.totalpts-1 + done := (done and ans.success) + x1 := x2 + x2 := x2 + hh + return( [sum , err , pts , done] ) + +--------------------------------------------------- + + atrapezoidal(func,a,b,epsrel,epsabs,nmin,nmax,nint) == + ans : TrapAns + sum : F := 0.0 + err : F := 0.0 + pts : I := 1 + i : I + done : B := true + hh : F := (b-a) / nint + x1 : F := a + x2 : F := a + hh + io : L OFORM := [x1::E,x2::E] + for i in 1..nint repeat + ans := trapezoidal(func,x1,x2,epsrel,epsabs,nmin,nmax) + if (not ans.success) then + io.1 := x1::E + io.2 := x2::E + print blankSeparate cons("accuracy not reached in interval"::E,io) + sum := sum + ans.value + err := err + abs(ans.error) + pts := pts + ans.totalpts-1 + done := (done and ans.success) + x1 := x2 + x2 := x2 + hh + return( [sum , err , pts , done] ) + +--------------------------------------------------- + + romberg(func,a,b,epsrel,epsabs,nmin,nmax) == + length : F := (b-a) + delta : F := length + newsum : F := 0.5 * length * (func(a)+func(b)) + newest : F := 0.0 + oldsum : F := 0.0 + oldest : F := 0.0 + change : F := 0.0 + qx1 : F := newsum + table : V F := new((nmax+1)::PI,0.0) + n : I := 1 + pts : I := 1 + four : I + j : I + i : I + if (nmin < 2) then + output("romberg: nmin to small (nmin > 1) nmin = ",nmin::E) + return([0.0,0.0,0,false]) + if (nmax < nmin) then + output("romberg: nmax < nmin : nmax = ",nmax::E) + output(" nmin = ",nmin::E) + return([0.0,0.0,0,false]) + if (a = b) then + output("romberg: integration limits are equal = ",a::E) + return([0.0,0.0,1,true]) + if (epsrel < 0.0) then + output("romberg: eps_r < 0.0 eps_r = ",epsrel::E) + return([0.0,0.0,0,false]) + if (epsabs < 0.0) then + output("romberg: eps_a < 0.0 eps_a = ",epsabs::E) + return([0.0,0.0,0,false]) + for n in 1..nmax repeat + oldsum := newsum + newsum := trapclosed(func,a,delta,oldsum,pts) + newest := (4.0 * newsum - oldsum) / 3.0 + four := 4 + table(n) := newest + for j in 2..n repeat + i := n+1-j + four := four * 4 + table(i) := table(i+1) + (table(i+1)-table(i)) / (four-1) + if n > nmin then + change := abs(table(1) - qx1) + if change < abs(epsrel*qx1) then + return( [table(1) , change , 2*pts+1 , true] ) + if change < epsabs then + return( [table(1) , change , 2*pts+1 , true] ) + oldsum := newsum + oldest := newest + delta := 0.5*delta + pts := 2*pts + qx1 := table(1) + return( [table(1) , 1.25*change , pts+1 ,false] ) + +--------------------------------------------------- + + simpson(func,a,b,epsrel,epsabs,nmin,nmax) == + length : F := (b-a) + delta : F := length + newsum : F := 0.5*(b-a)*(func(a)+func(b)) + newest : F := 0.0 + oldsum : F := 0.0 + oldest : F := 0.0 + change : F := 0.0 + n : I := 1 + pts : I := 1 + if (nmin < 2) then + output("simpson: nmin to small (nmin > 1) nmin = ",nmin::E) + return([0.0,0.0,0,false]) + if (nmax < nmin) then + output("simpson: nmax < nmin : nmax = ",nmax::E) + output(" nmin = ",nmin::E) + return([0.0,0.0,0,false]) + if (a = b) then + output("simpson: integration limits are equal = ",a::E) + return([0.0,0.0,1,true]) + if (epsrel < 0.0) then + output("simpson: eps_r < 0.0 : eps_r = ",epsrel::E) + return([0.0,0.0,0,false]) + if (epsabs < 0.0) then + output("simpson: eps_a < 0.0 : eps_a = ",epsabs::E) + return([0.0,0.0,0,false]) + for n in 1..nmax repeat + oldsum := newsum + newsum := trapclosed(func,a,delta,oldsum,pts) + newest := (4.0 * newsum - oldsum) / 3.0 + if n > nmin then + change := abs(newest-oldest) + if change < abs(epsrel*oldest) then + return( [newest , 1.25*change , 2*pts+1 , true] ) + if change < epsabs then + return( [newest , 1.25*change , 2*pts+1 , true] ) + oldsum := newsum + oldest := newest + delta := 0.5*delta + pts := 2*pts + return( [newest , 1.25*change , pts+1 ,false] ) + +--------------------------------------------------- + + trapezoidal(func,a,b,epsrel,epsabs,nmin,nmax) == + length : F := (b-a) + delta : F := length + newsum : F := 0.5*(b-a)*(func(a)+func(b)) + change : F := 0.0 + oldsum : F + n : I := 1 + pts : I := 1 + if (nmin < 2) then + output("trapezoidal: nmin to small (nmin > 1) nmin = ",nmin::E) + return([0.0,0.0,0,false]) + if (nmax < nmin) then + output("trapezoidal: nmax < nmin : nmax = ",nmax::E) + output(" nmin = ",nmin::E) + return([0.0,0.0,0,false]) + if (a = b) then + output("trapezoidal: integration limits are equal = ",a::E) + return([0.0,0.0,1,true]) + if (epsrel < 0.0) then + output("trapezoidal: eps_r < 0.0 : eps_r = ",epsrel::E) + return([0.0,0.0,0,false]) + if (epsabs < 0.0) then + output("trapezoidal: eps_a < 0.0 : eps_a = ",epsabs::E) + return([0.0,0.0,0,false]) + for n in 1..nmax repeat + oldsum := newsum + newsum := trapclosed(func,a,delta,oldsum,pts) + if n > nmin then + change := abs(newsum-oldsum) + if change < abs(epsrel*oldsum) then + return( [newsum , 1.25*change , 2*pts+1 , true] ) + if change < epsabs then + return( [newsum , 1.25*change , 2*pts+1 , true] ) + delta := 0.5*delta + pts := 2*pts + return( [newsum , 1.25*change , pts+1 ,false] ) + +--------------------------------------------------- + + rombergo(func,a,b,epsrel,epsabs,nmin,nmax) == + length : F := (b-a) + delta : F := length / 3.0 + newsum : F := length * func( 0.5*(a+b) ) + newest : F := 0.0 + oldsum : F := 0.0 + oldest : F := 0.0 + change : F := 0.0 + qx1 : F := newsum + table : V F := new((nmax+1)::PI,0.0) + four : I + j : I + i : I + n : I := 1 + pts : I := 1 + for n in 1..nmax repeat + oldsum := newsum + newsum := trapopen(func,a,delta,oldsum,pts) + newest := (9.0 * newsum - oldsum) / 8.0 + table(n) := newest + nine := 9 + output(newest::E) + for j in 2..n repeat + i := n+1-j + nine := nine * 9 + table(i) := table(i+1) + (table(i+1)-table(i)) / (nine-1) + if n > nmin then + change := abs(table(1) - qx1) + if change < abs(epsrel*qx1) then + return( [table(1) , 1.5*change , 3*pts , true] ) + if change < epsabs then + return( [table(1) , 1.5*change , 3*pts , true] ) + output(table::E) + oldsum := newsum + oldest := newest + delta := delta / 3.0 + pts := 3*pts + qx1 := table(1) + return( [table(1) , 1.5*change , pts ,false] ) + +--------------------------------------------------- + + simpsono(func,a,b,epsrel,epsabs,nmin,nmax) == + length : F := (b-a) + delta : F := length / 3.0 + newsum : F := length * func( 0.5*(a+b) ) + newest : F := 0.0 + oldsum : F := 0.0 + oldest : F := 0.0 + change : F := 0.0 + n : I := 1 + pts : I := 1 + for n in 1..nmax repeat + oldsum := newsum + newsum := trapopen(func,a,delta,oldsum,pts) + newest := (9.0 * newsum - oldsum) / 8.0 + output(newest::E) + if n > nmin then + change := abs(newest - oldest) + if change < abs(epsrel*oldest) then + return( [newest , 1.5*change , 3*pts , true] ) + if change < epsabs then + return( [newest , 1.5*change , 3*pts , true] ) + oldsum := newsum + oldest := newest + delta := delta / 3.0 + pts := 3*pts + return( [newest , 1.5*change , pts ,false] ) + +--------------------------------------------------- + + trapezoidalo(func,a,b,epsrel,epsabs,nmin,nmax) == + length : F := (b-a) + delta : F := length/3.0 + newsum : F := length*func( 0.5*(a+b) ) + change : F := 0.0 + pts : I := 1 + oldsum : F + n : I + for n in 1..nmax repeat + oldsum := newsum + newsum := trapopen(func,a,delta,oldsum,pts) + output(newsum::E) + if n > nmin then + change := abs(newsum-oldsum) + if change < abs(epsrel*oldsum) then + return([newsum , 1.5*change , 3*pts , true] ) + if change < epsabs then + return([newsum , 1.5*change , 3*pts , true] ) + delta := delta / 3.0 + pts := 3*pts + return([newsum , 1.5*change , pts ,false] ) + +--------------------------------------------------- + + trapclosed(func,start,h,oldsum,numpoints) == + x : F := start + 0.5*h + sum : F := 0.0 + i : I + for i in 1..numpoints repeat + sum := sum + func(x) + x := x + h + return( 0.5*(oldsum + sum*h) ) + +--------------------------------------------------- + + trapopen(func,start,del,oldsum,numpoints) == + ddel : F := 2.0*del + x : F := start + 0.5*del + sum : F := 0.0 + i : I + for i in 1..numpoints repeat + sum := sum + func(x) + x := x + ddel + sum := sum + func(x) + x := x + del + return( (oldsum/3.0 + sum*del) ) + +@ +<>= +"NUMQUAD" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NUMQUAD"] +"IVECTOR" [color="#88FF44",href="bookvol10.3.pdf#nameddest=IVECTOR"] +"NUMQUAD" -> "IVECTOR" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NCEP NumericComplexEigenPackage} +\pagehead{NumericComplexEigenPackage}{NCEP} +\pagepic{ps/v104numericcomplexeigenpackage.ps}{NCEP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +\pagehead{NumericComplexEigenPackage}{NCEP} +\pagepic{ps/v104numericcomplexeigenpackage.ps}{NCEP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NCEP NumericComplexEigenPackage +++ Author: P. Gianni +++ Date Created: Summer 1990 +++ Date Last Updated: Spring 1991 +++ Basic Functions: +++ Related Constructors: FloatingComplexPackage +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This package computes explicitly eigenvalues and eigenvectors of +++ matrices with entries over the complex rational numbers. +++ The results are expressed either as complex floating numbers or as +++ complex rational numbers +++ depending on the type of the precision parameter. +NumericComplexEigenPackage(Par) : C == T + where + Par : Join(Field,OrderedRing) -- Float or RationalNumber + + SE ==> Symbol() + RN ==> Fraction Integer + I ==> Integer + NF ==> Float + CF ==> Complex Float + GRN ==> Complex RN + GI ==> Complex Integer + PI ==> PositiveInteger + NNI ==> NonNegativeInteger + MRN ==> Matrix RN + + MCF ==> Matrix CF + MGRN ==> Matrix GRN + MCPar ==> Matrix Complex Par + SUPGRN ==> SparseUnivariatePolynomial GRN + outForm ==> Record(outval:Complex Par,outmult:Integer,outvect:List MCPar) + + C == with + characteristicPolynomial : MGRN -> Polynomial GRN + ++ characteristicPolynomial(m) returns the characteristic polynomial + ++ of the matrix m expressed as polynomial + ++ over complex rationals with a new symbol as variable. + -- while the function in EigenPackage returns Fraction P GRN. + characteristicPolynomial : (MGRN,SE) -> Polynomial GRN + ++ characteristicPolynomial(m,x) returns the characteristic polynomial + ++ of the matrix m expressed as polynomial + ++ over Complex Rationals with variable x. + -- while the function in EigenPackage returns Fraction P GRN. + complexEigenvalues : (MGRN,Par) -> List Complex Par + ++ complexEigenvalues(m,eps) computes the eigenvalues of the matrix + ++ m to precision eps. The eigenvalues are expressed as complex + ++ floats or complex rational numbers depending on the type of + ++ eps (float or rational). + complexEigenvectors : (MGRN,Par) -> List(outForm) + ++ complexEigenvectors(m,eps) returns a list of + ++ records each one containing + ++ a complex eigenvalue, its algebraic multiplicity, and a list of + ++ associated eigenvectors. All these results + ++ are computed to precision eps and are expressed as complex floats + ++ or complex rational numbers depending on the type of + ++ eps (float or rational). + T == add + + import InnerNumericEigenPackage(GRN,Complex Par,Par) + + characteristicPolynomial(m:MGRN) : Polynomial GRN == + x:SE:=new()$SE + multivariate(charpol m, x) + + ---- characteristic polynomial of a matrix A ---- + characteristicPolynomial(A:MGRN,x:SE):Polynomial GRN == + multivariate(charpol A, x) + + complexEigenvalues(m:MGRN,eps:Par) : List Complex Par == + solve1(charpol m, eps) + + complexEigenvectors(m:MGRN,eps:Par) :List outForm == + innerEigenvectors(m,eps,factor$ComplexFactorization(RN,SUPGRN)) + +@ +<>= +"NCEP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NCEP"] +"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"] +"NCEP" -> "COMPCAT" + +@ +<>= +"NCEP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NCEP"] +"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"] +"NCEP" -> "COMPCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package NCNTFRAC NumericContinuedFraction} \pagehead{NumericContinuedFraction}{NCNTFRAC} \pagepic{ps/v104numericcontinuedfraction.ps}{NCNTFRAC}{1.00} @@ -49904,6 +54367,99 @@ NumericContinuedFraction(F): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NREP NumericRealEigenPackage} +\pagehead{NumericRealEigenPackage}{NREP} +\pagepic{ps/v104numericrealeigenpackage.ps}{NREP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NREP NumericRealEigenPackage +++ Author:P. Gianni +++ Date Created:Summer 1990 +++ Date Last Updated:Spring 1991 +++ Basic Functions: +++ Related Constructors: FloatingRealPackage +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This package computes explicitly eigenvalues and eigenvectors of +++ matrices with entries over the Rational Numbers. +++ The results are expressed as floating numbers or as rational numbers +++ depending on the type of the parameter Par. +NumericRealEigenPackage(Par) : C == T + where + Par : Join(Field,OrderedRing) -- Float or RationalNumber + + SE ==> Symbol() + RN ==> Fraction Integer + I ==> Integer + NF ==> Float + CF ==> Complex Float + GRN ==> Complex RN + GI ==> Complex Integer + PI ==> PositiveInteger + NNI ==> NonNegativeInteger + MRN ==> Matrix RN + + MPar ==> Matrix Par + outForm ==> Record(outval:Par,outmult:Integer,outvect:List MPar) + + C == with + characteristicPolynomial : MRN -> Polynomial RN + ++ characteristicPolynomial(m) returns the characteristic polynomial + ++ of the matrix m expressed as polynomial + ++ over RN with a new symbol as variable. + -- while the function in EigenPackage returns Fraction P RN. + characteristicPolynomial : (MRN,SE) -> Polynomial RN + ++ characteristicPolynomial(m,x) returns the characteristic polynomial + ++ of the matrix m expressed as polynomial + ++ over RN with variable x. + -- while the function in EigenPackage returns + ++ Fraction P RN. + realEigenvalues : (MRN,Par) -> List Par + ++ realEigenvalues(m,eps) computes the eigenvalues of the matrix + ++ m to precision eps. The eigenvalues are expressed as floats or + ++ rational numbers depending on the type of eps (float or rational). + realEigenvectors : (MRN,Par) -> List(outForm) + ++ realEigenvectors(m,eps) returns a list of + ++ records each one containing + ++ a real eigenvalue, its algebraic multiplicity, and a list of + ++ associated eigenvectors. All these results + ++ are computed to precision eps as floats or rational + ++ numbers depending on the type of eps . + + + T == add + + import InnerNumericEigenPackage(RN, Par, Par) + + characteristicPolynomial(m:MRN) : Polynomial RN == + x:SE:=new()$SE + multivariate(charpol(m),x) + + ---- characteristic polynomial of a matrix A ---- + characteristicPolynomial(A:MRN,x:SE):Polynomial RN == + multivariate(charpol(A),x) + + realEigenvalues(m:MRN,eps:Par) : List Par == + solve1(charpol m, eps) + + realEigenvectors(m:MRN,eps:Par) :List outForm == + innerEigenvectors(m,eps,factor$GenUFactorize(RN)) + +@ +<>= +"NREP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NREP"] +"ALIST" [color="#88FF44",href="bookvol10.3.pdf#nameddest=ALIST"] +"NREP" -> "ALIST" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter O} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package ARRAY12 OneDimensionalArrayFunctions2} @@ -50605,6 +55161,142 @@ PiCoercions(R:Join(OrderedSet, IntegralDomain)): with @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package PTFUNC2 PointFunctions2} +\pagehead{PointFunctions2}{PTFUNC2} +\pagepic{ps/v104pointfunctions2.ps}{PTFUNC2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package PTFUNC2 PointFunctions2 +++ Description: +++ This package \undocumented +PointFunctions2(R1:Ring,R2:Ring):Exports == Implementation where + + Exports == with + map : ((R1->R2),Point(R1)) -> Point(R2) + ++ map(f,p) \undocumented + + Implementation ==> add + import Point(R1) + import Point(R2) + + map(mapping,p) == + point([mapping p.(i::PositiveInteger) for i in minIndex(p)..maxIndex(p)])$Point(R2) + +@ +<>= +"PTFUNC2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=PTFUNC2"] +"PID" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PID"] +"OAGROUP" [color="#4488FF",href="bookvol10.2.pdf#nameddest=OAGROUP"] +"PTFUNC2" -> "PID" +"PTFUNC2" -> "OAGROUP" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package PTPACK PointPackage} +\pagehead{PointPackage}{PTPACK} +\pagepic{ps/v104pointpackage.ps}{PTPACK}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package PTPACK PointPackage +++ Description: +++ This package \undocumented +PointPackage(R:Ring):Exports == Implementation where + + POINT ==> Point(R) + I ==> Integer + PI ==> PositiveInteger + NNI ==> NonNegativeInteger + L ==> List + B ==> Boolean + + Exports == with + xCoord : POINT -> R + ++ xCoord(pt) returns the first element of the point, pt, + ++ although no assumptions are made as to the coordinate + ++ system being used. This function is defined for the + ++ convenience of the user dealing with a Cartesian + ++ coordinate system. + yCoord : POINT -> R + ++ yCoord(pt) returns the second element of the point, pt, + ++ although no assumptions are made as to the coordinate + ++ system being used. This function is defined for the + ++ convenience of the user dealing with a Cartesian + ++ coordinate system. + zCoord : POINT -> R + ++ zCoord(pt) returns the third element of the point, pt, + ++ although no assumptions are made as to the coordinate + ++ system being used. This function is defined for the + ++ convenience of the user dealing with a Cartesian + ++ or a cylindrical coordinate system. + rCoord : POINT -> R + ++ rCoord(pt) returns the first element of the point, pt, + ++ although no assumptions are made as to the coordinate + ++ system being used. This function is defined for the + ++ convenience of the user dealing with a spherical + ++ or a cylindrical coordinate system. + thetaCoord : POINT -> R + ++ thetaCoord(pt) returns the second element of the point, pt, + ++ although no assumptions are made as to the coordinate + ++ system being used. This function is defined for the + ++ convenience of the user dealing with a spherical + ++ or a cylindrical coordinate system. + phiCoord : POINT -> R + ++ phiCoord(pt) returns the third element of the point, pt, + ++ although no assumptions are made as to the coordinate + ++ system being used. This function is defined for the + ++ convenience of the user dealing with a spherical + ++ coordinate system. + color : POINT -> R + ++ color(pt) returns the fourth element of the point, pt, + ++ although no assumptions are made with regards as to + ++ how the components of higher dimensional points are + ++ interpreted. This function is defined for the + ++ convenience of the user using specifically, color + ++ to express a fourth dimension. + hue : POINT -> R + ++ hue(pt) returns the third element of the two dimensional point, pt, + ++ although no assumptions are made with regards as to how the + ++ components of higher dimensional points are interpreted. This + ++ function is defined for the convenience of the user using + ++ specifically, hue to express a third dimension. + shade : POINT -> R + ++ shade(pt) returns the fourth element of the two dimensional + ++ point, pt, although no assumptions are made with regards as to + ++ how the components of higher dimensional points are interpreted. + ++ This function is defined for the convenience of the user using + ++ specifically, shade to express a fourth dimension. + + -- 2D and 3D extraction of data + Implementation ==> add + + xCoord p == elt(p,1) + yCoord p == elt(p,2) + zCoord p == elt(p,3) + rCoord p == elt(p,1) + thetaCoord p == elt(p,2) + phiCoord p == elt(p,3) + color p == + #p > 3 => p.4 + p.3 + hue p == elt(p,3) -- 4D points in 2D using extra dimensions for palette information + shade p == elt(p,4) -- 4D points in 2D using extra dimensions for palette information + +@ +<>= +"PTPACK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=PTPACK"] +"PTCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PTCAT"] +"PTPACK" -> "PTCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package PAN2EXPR PolynomialAN2Expression} \pagehead{PolynomialAN2Expression}{PAN2EXPR} \pagepic{ps/v104polynomialan2expression.ps}{PAN2EXPR}{1.00} @@ -50690,6 +55382,228 @@ PolynomialFunctions2(R:Ring, S:Ring): with @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package PNTHEORY PolynomialNumberTheoryFunctions} +\pagehead{PolynomialNumberTheoryFunctions}{PNTHEORY} +\pagepic{ps/v104polynomialnumbertheoryfunctions.ps}{PNTHEORY}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package PNTHEORY PolynomialNumberTheoryFunctions +++ Author: Michael Monagan, Clifton J. Williamson +++ Date Created: June 1987 +++ Date Last Updated: 10 November 1996 (Claude Quitte) +++ Basic Operations: +++ Related Domains: +++ Also See: +++ AMS Classifications: +++ Keywords: polynomial, number theory +++ Examples: +++ References: Knuth, The Art of Computer Programming Vol.2 +++ Description: +++ This package provides various polynomial number theoretic functions +++ over the integers. +PolynomialNumberTheoryFunctions(): Exports == Implementation where + I ==> Integer + RN ==> Fraction I + SUP ==> SparseUnivariatePolynomial + NNI ==> NonNegativeInteger + + Exports ==> with + bernoulli : I -> SUP RN + ++ bernoulli(n) returns the nth Bernoulli polynomial \spad{B[n](x)}. + ++ Note: Bernoulli polynomials denoted \spad{B(n,x)} computed by solving the + ++ differential equation \spad{differentiate(B(n,x),x) = n B(n-1,x)} where + ++ \spad{B(0,x) = 1} and initial condition comes from \spad{B(n) = B(n,0)}. + chebyshevT: I -> SUP I + ++ chebyshevT(n) returns the nth Chebyshev polynomial \spad{T[n](x)}. + ++ Note: Chebyshev polynomials of the first kind, denoted \spad{T[n](x)}, + ++ computed from the two term recurrence. The generating function + ++ \spad{(1-t*x)/(1-2*t*x+t**2) = sum(T[n](x)*t**n, n=0..infinity)}. + chebyshevU: I -> SUP I + ++ chebyshevU(n) returns the nth Chebyshev polynomial \spad{U[n](x)}. + ++ Note: Chebyshev polynomials of the second kind, denoted \spad{U[n](x)}, + ++ computed from the two term recurrence. The generating function + ++ \spad{1/(1-2*t*x+t**2) = sum(T[n](x)*t**n, n=0..infinity)}. + cyclotomic: I -> SUP I + ++ cyclotomic(n) returns the nth cyclotomic polynomial \spad{phi[n](x)}. + ++ Note: \spad{phi[n](x)} is the factor of \spad{x**n - 1} whose roots + ++ are the primitive nth roots of unity. + euler : I -> SUP RN + ++ euler(n) returns the nth Euler polynomial \spad{E[n](x)}. + ++ Note: Euler polynomials denoted \spad{E(n,x)} computed by solving the + ++ differential equation \spad{differentiate(E(n,x),x) = n E(n-1,x)} where + ++ \spad{E(0,x) = 1} and initial condition comes from \spad{E(n) = 2**n E(n,1/2)}. + fixedDivisor: SUP I -> I + ++ fixedDivisor(a) for \spad{a(x)} in \spad{Z[x]} is the largest integer + ++ f such that f divides \spad{a(x=k)} for all integers k. + ++ Note: fixed divisor of \spad{a} is + ++ \spad{reduce(gcd,[a(x=k) for k in 0..degree(a)])}. + hermite : I -> SUP I + ++ hermite(n) returns the nth Hermite polynomial \spad{H[n](x)}. + ++ Note: Hermite polynomials, denoted \spad{H[n](x)}, are computed from + ++ the two term recurrence. The generating function is: + ++ \spad{exp(2*t*x-t**2) = sum(H[n](x)*t**n/n!, n=0..infinity)}. + laguerre : I -> SUP I + ++ laguerre(n) returns the nth Laguerre polynomial \spad{L[n](x)}. + ++ Note: Laguerre polynomials, denoted \spad{L[n](x)}, are computed from + ++ the two term recurrence. The generating function is: + ++ \spad{exp(x*t/(t-1))/(1-t) = sum(L[n](x)*t**n/n!, n=0..infinity)}. + legendre : I -> SUP RN + ++ legendre(n) returns the nth Legendre polynomial \spad{P[n](x)}. + ++ Note: Legendre polynomials, denoted \spad{P[n](x)}, are computed from + ++ the two term recurrence. The generating function is: + ++ \spad{1/sqrt(1-2*t*x+t**2) = sum(P[n](x)*t**n, n=0..infinity)}. + Implementation ==> add + import IntegerPrimesPackage(I) + + x := monomial(1,1)$SUP(I) + y := monomial(1,1)$SUP(RN) + + -- For functions computed via a fixed term recurrence we record + -- previous values so that the next value can be computed directly + + E : Record(En:I, Ev:SUP(RN)) := [0,1] + B : Record( Bn:I, Bv:SUP(RN) ) := [0,1] + H : Record( Hn:I, H1:SUP(I), H2:SUP(I) ) := [0,1,x] + L : Record( Ln:I, L1:SUP(I), L2:SUP(I) ) := [0,1,x] + P : Record( Pn:I, P1:SUP(RN), P2:SUP(RN) ) := [0,1,y] + CT : Record( Tn:I, T1:SUP(I), T2:SUP(I) ) := [0,1,x] + U : Record( Un:I, U1:SUP(I), U2:SUP(I) ) := [0,1,0] + + MonicQuotient: (SUP(I),SUP(I)) -> SUP(I) + MonicQuotient (a,b) == + leadingCoefficient(b) ^= 1 => error "divisor must be monic" + b = 1 => a + da := degree a + db := degree b -- assertion: degree b > 0 + q:SUP(I) := 0 + while da >= db repeat + t := monomial(leadingCoefficient a, (da-db)::NNI) + a := a - b * t + q := q + t + da := degree a + q + + cyclotomic n == + --++ cyclotomic polynomial denoted phi[n](x) + p:I; q:I; r:I; s:I; m:NNI; c:SUP(I); t:SUP(I) + n < 0 => error "cyclotomic not defined for negative integers" + n = 0 => x + k := n; s := p := 1 + c := x - 1 + while k > 1 repeat + p := nextPrime p + (q,r) := divide(k, p) + if r = 0 then + while r = 0 repeat (k := q; (q,r) := divide(k,p)) + t := multiplyExponents(c,p::NNI) + c := MonicQuotient(t,c) + s := s * p + m := (n quo s) :: NNI + multiplyExponents(c,m) + + euler n == + p : SUP(RN); t : SUP(RN); c : RN; s : I + n < 0 => error "euler not defined for negative integers" + if n < E.En then (s,p) := (0$I,1$SUP(RN)) else (s,p) := E + -- (s,p) := if n < E.En then (0,1) else E + for i in s+1 .. n repeat + t := (i::RN) * integrate p + c := euler(i)$IntegerNumberTheoryFunctions / 2**(i::NNI) - t(1/2) + p := t + c::SUP(RN) + E.En := n + E.Ev := p + p + + bernoulli n == + p : SUP RN; t : SUP RN; c : RN; s : I + n < 0 => error "bernoulli not defined for negative integers" + if n < B.Bn then (s,p) := (0$I,1$SUP(RN)) else (s,p) := B + -- (s,p) := if n < B.Bn then (0,1) else B + for i in s+1 .. n repeat + t := (i::RN) * integrate p + c := bernoulli(i)$IntegerNumberTheoryFunctions + p := t + c::SUP(RN) + B.Bn := n + B.Bv := p + p + + fixedDivisor a == + g:I; d:NNI; SUP(I) + d := degree a + g := coefficient(a, minimumDegree a) + for k in 1..d while g > 1 repeat g := gcd(g,a k) + g + + hermite n == + s : I; p : SUP(I); q : SUP(I) + n < 0 => error "hermite not defined for negative integers" + -- (s,p,q) := if n < H.Hn then (0,1,x) else H + if n < H.Hn then (s := 0; p := 1; q := x) else (s,p,q) := H + for k in s+1 .. n repeat (p,q) := (2*x*p-2*(k-1)*q,p) + H.Hn := n + H.H1 := p + H.H2 := q + p + + legendre n == + s:I; t:I; p:SUP(RN); q:SUP(RN) + n < 0 => error "legendre not defined for negative integers" + -- (s,p,q) := if n < P.Pn then (0,1,y) else P + if n < P.Pn then (s := 0; p := 1; q := y) else (s,p,q) := P + for k in s+1 .. n repeat + t := k-1 + (p,q) := ((k+t)$I/k*y*p - t/k*q,p) + P.Pn := n + P.P1 := p + P.P2 := q + p + + laguerre n == + k:I; s:I; t:I; p:SUP(I); q:SUP(I) + n < 0 => error "laguerre not defined for negative integers" + -- (s,p,q) := if n < L.Ln then (0,1,x) else L + if n < L.Ln then (s := 0; p := 1; q := x) else (s,p,q) := L + for k in s+1 .. n repeat + t := k-1 + (p,q) := ((((k+t)$I)::SUP(I)-x)*p-t**2*q,p) + L.Ln := n + L.L1 := p + L.L2 := q + p + + chebyshevT n == + s : I; p : SUP(I); q : SUP(I) + n < 0 => error "chebyshevT not defined for negative integers" + -- (s,p,q) := if n < CT.Tn then (0,1,x) else CT + if n < CT.Tn then (s := 0; p := 1; q := x) else (s,p,q) := CT + for k in s+1 .. n repeat (p,q) := ((2*x*p - q),p) + CT.Tn := n + CT.T1 := p + CT.T2 := q + p + + chebyshevU n == + s : I; p : SUP(I); q : SUP(I) + n < 0 => error "chebyshevU not defined for negative integers" + if n < U.Un then (s := 0; p := 1; q := 0) else (s,p,q) := U + for k in s+1 .. n repeat (p,q) := ((2*x*p - q),p) + U.Un := n + U.U1 := p + U.U2 := q + p + +@ +<>= +"PNTHEORY" [color="#FF4488",href="bookvol10.4.pdf#nameddest=PNTHEORY"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"PNTHEORY" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package POLYROOT PolynomialRoots} \pagehead{PolynomialRoots}{POLYROOT} \pagepic{ps/v104polynomialroots.ps}{POLYROOT}{1.00} @@ -52828,6 +57742,86 @@ RepeatedSquaring(S): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package RETSOL RetractSolvePackage} +\pagehead{RetractSolvePackage}{RETSOL} +\pagepic{ps/v104retractsolvepackage.ps}{RETSOL}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package RETSOL RetractSolvePackage +++ Author: Manuel Bronstein +++ Date Created: 31 October 1991 +++ Date Last Updated: 31 October 1991 +++ Description: +++ RetractSolvePackage is an interface to \spadtype{SystemSolvePackage} +++ that attempts to retract the coefficients of the equations before +++ solving. + +RetractSolvePackage(Q, R): Exports == Implementation where + Q: IntegralDomain + R: Join(IntegralDomain, RetractableTo Q) + + PQ ==> Polynomial Q + FQ ==> Fraction PQ + SY ==> Symbol + P ==> Polynomial R + F ==> Fraction P + EQ ==> Equation + SSP ==> SystemSolvePackage + + Exports ==> with + solveRetract: (List P, List SY) -> List List EQ F + ++ solveRetract(lp,lv) finds the solutions of the list lp of + ++ rational functions with respect to the list of symbols lv. + ++ The function tries to retract all the coefficients of the equations + ++ to Q before solving if possible. + + Implementation ==> add + LEQQ2F : List EQ FQ -> List EQ F + FQ2F : FQ -> F + PQ2P : PQ -> P + QIfCan : List P -> Union(List FQ, "failed") + PQIfCan: P -> Union(FQ, "failed") + + PQ2P p == map(#1::R, p)$PolynomialFunctions2(Q, R) + FQ2F f == PQ2P numer f / PQ2P denom f + LEQQ2F l == [equation(FQ2F lhs eq, FQ2F rhs eq) for eq in l] + + solveRetract(lp, lv) == + (u := QIfCan lp) case "failed" => + solve([p::F for p in lp]$List(F), lv)$SSP(R) + [LEQQ2F l for l in solve(u::List(FQ), lv)$SSP(Q)] + + QIfCan l == + ans:List(FQ) := empty() + for p in l repeat + (u := PQIfCan p) case "failed" => return "failed" + ans := concat(u::FQ, ans) + ans + + PQIfCan p == + (u := mainVariable p) case "failed" => + (r := retractIfCan(ground p)@Union(Q,"failed")) case Q => r::Q::PQ::FQ + "failed" + up := univariate(p, s := u::SY) + ans:FQ := 0 + while up ^= 0 repeat + (v := PQIfCan leadingCoefficient up) case "failed" => return "failed" + ans := ans + monomial(1, s, degree up)$PQ * (v::FQ) + up := reductum up + ans + +@ +<>= +"RETSOL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=RETSOL"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"RETSOL" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter S} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package SAERFFC SAERationalFunctionAlgFactor} @@ -53371,6 +58365,158 @@ StreamInfiniteProduct(Coef): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package SCPKG StructuralConstantsPackage} +\pagehead{StructuralConstantsPackage}{SCPKG} +\pagepic{ps/v104structuralconstantspackage.ps}{SCPKG}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package SCPKG StructuralConstantsPackage +++ Authors: J. Grabmeier +++ Date Created: 02 April 1992 +++ Date Last Updated: 14 April 1992 +++ Basic Operations: +++ Related Constructors: AlgebraPackage, AlgebraGivenByStructuralConstants +++ Also See: +++ AMS Classifications: +++ Keywords: structural constants +++ Reference: +++ Description: +++ StructuralConstantsPackage provides functions creating +++ structural constants from a multiplication tables or a basis +++ of a matrix algebra and other useful functions in this context. +StructuralConstantsPackage(R:Field): public == private where + + L ==> List + S ==> Symbol + FRAC ==> Fraction + POLY ==> Polynomial + V ==> Vector + M ==> Matrix + REC ==> Record(particular: Union(V R,"failed"),basis: List V R) + LSMP ==> LinearSystemMatrixPackage(R,V R,V R, M R) + + public ==> with + -- what we really want to have here is a matrix over + -- linear polynomials in the list of symbols, having arbitrary + -- coefficients from a ring extension of R, e.g. FRAC POLY R. + structuralConstants : (L S, M FRAC POLY R) -> V M FRAC POLY R + ++ structuralConstants(ls,mt) determines the structural constants + ++ of an algebra with generators ls and multiplication table mt, the + ++ entries of which must be given as linear polynomials in the + ++ indeterminates given by ls. The result is in particular useful + ++ as fourth argument for \spadtype{AlgebraGivenByStructuralConstants} + ++ and \spadtype{GenericNonAssociativeAlgebra}. + structuralConstants : (L S, M POLY R) -> V M POLY R + ++ structuralConstants(ls,mt) determines the structural constants + ++ of an algebra with generators ls and multiplication table mt, the + ++ entries of which must be given as linear polynomials in the + ++ indeterminates given by ls. The result is in particular useful + ++ as fourth argument for \spadtype{AlgebraGivenByStructuralConstants} + ++ and \spadtype{GenericNonAssociativeAlgebra}. + structuralConstants: L M R -> V M R + ++ structuralConstants(basis) takes the basis of a matrix + ++ algebra, e.g. the result of \spadfun{basisOfCentroid} and calculates + ++ the structural constants. + ++ Note, that the it is not checked, whether basis really is a + ++ basis of a matrix algebra. + coordinates: (M R, L M R) -> V R + ++ coordinates(a,[v1,...,vn]) returns the coordinates of \spad{a} + ++ with respect to the \spad{R}-module basis \spad{v1},...,\spad{vn}. + + private ==> add + + matrix2Vector: M R -> V R + matrix2Vector m == + lili : L L R := listOfLists m + --li : L R := reduce(concat, listOfLists m) + li : L R := reduce(concat, lili) + construct(li)$(V R) + + coordinates(x,b) == + m : NonNegativeInteger := (maxIndex b) :: NonNegativeInteger + n : NonNegativeInteger := nrows(b.1) * ncols(b.1) + transitionMatrix : Matrix R := new(n,m,0$R)$Matrix(R) + for i in 1..m repeat + setColumn_!(transitionMatrix,i,matrix2Vector(b.i)) + res : REC := solve(transitionMatrix,matrix2Vector(x))$LSMP + if (not every?(zero?$R,first res.basis)) then + error("coordinates: the second argument is linearly dependent") + (res.particular case "failed") => + error("coordinates: first argument is not in linear span of _ +second argument") + (res.particular) :: (Vector R) + + structuralConstants b == + --n := rank() + -- be careful with the possibility that b is not a basis + m : NonNegativeInteger := (maxIndex b) :: NonNegativeInteger + sC : Vector Matrix R := [new(m,m,0$R) for k in 1..m] + for i in 1..m repeat + for j in 1..m repeat + covec : Vector R := coordinates(b.i * b.j, b)$% + for k in 1..m repeat + setelt( sC.k, i, j, covec.k ) + sC + + structuralConstants(ls:L S, mt: M POLY R) == + nn := #(ls) + nrows(mt) ^= nn or ncols(mt) ^= nn => + error "structuralConstants: size of second argument does not _ +agree with number of generators" + gamma : L M POLY R := [] + lscopy : L S := copy ls + while not null lscopy repeat + mat : M POLY R := new(nn,nn,0) + s : S := first lscopy + for i in 1..nn repeat + for j in 1..nn repeat + p := qelt(mt,i,j) + totalDegree(p,ls) > 1 => + error "structuralConstants: entries of second argument _ +must be linear polynomials in the generators" + if (c := coefficient(p, s, 1) ) ^= 0 then qsetelt_!(mat,i,j,c) + gamma := cons(mat, gamma) + lscopy := rest lscopy + vector reverse gamma + + structuralConstants(ls:L S, mt: M FRAC POLY R) == + nn := #(ls) + nrows(mt) ^= nn or ncols(mt) ^= nn => + error "structuralConstants: size of second argument does not _ +agree with number of generators" + gamma : L M FRAC(POLY R) := [] + lscopy : L S := copy ls + while not null lscopy repeat + mat : M FRAC(POLY R) := new(nn,nn,0) + s : S := first lscopy + for i in 1..nn repeat + for j in 1..nn repeat + r := qelt(mt,i,j) + q := denom(r) + totalDegree(q,ls) ^= 0 => + error "structuralConstants: entries of second argument _ +must be (linear) polynomials in the generators" + p := numer(r) + totalDegree(p,ls) > 1 => + error "structuralConstants: entries of second argument _ +must be linear polynomials in the generators" + if (c := coefficient(p, s, 1) ) ^= 0 then qsetelt_!(mat,i,j,c/q) + gamma := cons(mat, gamma) + lscopy := rest lscopy + vector reverse gamma + +@ +<>= +"SCPKG" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SCPKG"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"SCPKG" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package SUBRESP SubResultantPackage} \pagehead{SubResultantPackage}{SUBRESP} \pagepic{ps/v104subresultantpackage.ps}{SUBRESP}{1.00} @@ -53649,6 +58795,146 @@ SymmetricFunctions(R:Ring): Exports == Implementation where %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter T} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package TBCMPPK TabulatedComputationPackage} +\pagehead{TabulatedComputationPackage}{TBCMPPK} +\pagepic{ps/v104tabulatedcomputationpackage.ps}{TBCMPPK}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package TBCMPPK TabulatedComputationPackage +++ Author: Marc Moreno Maza +++ Date Created: 09/09/1998 +++ Date Last Updated: 12/16/1998 +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ \axiom{TabulatedComputationPackage(Key ,Entry)} provides some modest support +++ for dealing with operations with type \axiom{Key -> Entry}. The result of +++ such operations can be stored and retrieved with this package by using +++ a hash-table. The user does not need to worry about the management of +++ this hash-table. However, onnly one hash-table is built by calling +++ \axiom{TabulatedComputationPackage(Key ,Entry)}. +++ Version: 2. + +TabulatedComputationPackage(Key ,Entry): Exports == Implementation where + Key: SetCategory + Entry: SetCategory + N ==> NonNegativeInteger + H ==> HashTable(Key, Entry, "UEQUAL") + iprintpack ==> InternalPrintPackage() + + Exports == with + initTable!: () -> Void + ++ \axiom{initTable!()} initializes the hash-table. + printInfo!: (String, String) -> Void + ++ \axiom{printInfo!(x,y)} initializes the mesages to be printed + ++ when manipulating items from the hash-table. If + ++ a key is retrieved then \axiom{x} is displayed. If an item is + ++ stored then \axiom{y} is displayed. + startStats!: (String) -> Void + ++ \axiom{startStats!(x)} initializes the statisitics process and + ++ sets the comments to display when statistics are printed + printStats!: () -> Void + ++ \axiom{printStats!()} prints the statistics. + clearTable!: () -> Void + ++ \axiom{clearTable!()} clears the hash-table and assumes that + ++ it will no longer be used. + usingTable?: () -> Boolean + ++ \axiom{usingTable?()} returns true iff the hash-table is used + printingInfo?: () -> Boolean + ++ \axiom{printingInfo?()} returns true iff messages are printed + ++ when manipulating items from the hash-table. + makingStats?: () -> Boolean + ++ \axiom{makingStats?()} returns true iff the statisitics process + ++ is running. + extractIfCan: Key -> Union(Entry,"failed") + ++ \axiom{extractIfCan(x)} searches the item whose key is \axiom{x}. + insert!: (Key, Entry) -> Void + ++ \axiom{insert!(x,y)} stores the item whose key is \axiom{x} and whose + ++ entry is \axiom{y}. + + Implementation == add + table?: Boolean := false + t: H := empty() + info?: Boolean := false + stats?: Boolean := false + used: NonNegativeInteger := 0 + ok: String := "o" + ko: String := "+" + domainName: String := empty()$String + + initTable!(): Void == + table? := true + t := empty() + void() + printInfo!(s1: String, s2: String): Void == + (empty? s1) or (empty? s2) => void() + not usingTable? => + error "in printInfo!()$TBCMPPK: not allowed to use hashtable" + info? := true + ok := s1 + ko := s2 + void() + startStats!(s: String): Void == + empty? s => void() + not table? => + error "in startStats!()$TBCMPPK: not allowed to use hashtable" + stats? := true + used := 0 + domainName := s + void() + printStats!(): Void == + not table? => + error "in printStats!()$TBCMPPK: not allowed to use hashtable" + not stats? => + error "in printStats!()$TBCMPPK: statistics not started" + output(" ")$OutputPackage + title: String := concat("*** ", concat(domainName," Statistics ***")) + output(title)$OutputPackage + n: N := #t + output(" Table size: ", n::OutputForm)$OutputPackage + output(" Entries reused: ", used::OutputForm)$OutputPackage + clearTable!(): Void == + not table? => + error "in clearTable!()$TBCMPPK: not allowed to use hashtable" + t := empty() + table? := false + info? := false + stats? := false + domainName := empty()$String + void() + usingTable?() == table? + printingInfo?() == info? + makingStats?() == stats? + extractIfCan(k: Key): Union(Entry,"failed") == + not table? => "failed" :: Union(Entry,"failed") + s: Union(Entry,"failed") := search(k,t) + s case Entry => + if info? then iprint(ok)$iprintpack + if stats? then used := used + 1 + return s + "failed" :: Union(Entry,"failed") + insert!(k: Key, e:Entry): Void == + not table? => void() + t.k := e + if info? then iprint(ko)$iprintpack + void() + +@ +<>= +"TBCMPPK" [color="#FF4488",href="bookvol10.4.pdf#nameddest=TBCMPPK"] +"TBAGG" [color="#4488FF",href="bookvol10.2.pdf#nameddest=TBAGG"] +"TBCMPPK" -> "TBAGG" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package TANEXP TangentExpansions} \pagehead{TangentExpansions}{TANEXP} \pagepic{ps/v104tangentexpansions.ps}{TANEXP}{1.00} @@ -56904,6 +62190,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> <> <> <> @@ -56943,6 +62230,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> <> <> <> @@ -56986,6 +62274,8 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> +<> <> <> <> @@ -56993,6 +62283,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> <> <> <> @@ -57049,11 +62340,14 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> +<> <> <> <> <> <> +<> <> <> <> @@ -57061,6 +62355,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> <> <> <> @@ -57069,6 +62364,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> +<> <> <> <> @@ -57126,12 +62422,22 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> <> <> <> +<> +<> +<> <> +<> <> +<> +<> +<> +<> <> +<> <> <> @@ -57142,8 +62448,11 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> +<> <> <> +<> <> <> <> @@ -57162,6 +62471,7 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> <> <> @@ -57170,10 +62480,12 @@ WildFunctionFieldIntegralBasis(K,R,UP,F): Exports == Implementation where <> <> <> +<> <> <> <> +<> <> <> <> diff --git a/books/ps/v104algebrapackage.ps b/books/ps/v104algebrapackage.ps new file mode 100644 index 0000000..d31ce08 --- /dev/null +++ b/books/ps/v104algebrapackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 124 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 88 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% ALGPKG +gsave +[ /Rect [ 4 72 76 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=ALGPKG) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +4 108 lineto +4 72 lineto +76 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +4 108 lineto +4 72 lineto +76 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +12 85.9 moveto 56 (ALGPKG) alignedtext +grestore +% FRNAALG +gsave +[ /Rect [ 0 0 80 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FRNAALG) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 80 36 moveto +3.02917e-14 36 lineto +9.23914e-15 1.06581e-14 lineto +80 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 80 36 moveto +3.02917e-14 36 lineto +9.23914e-15 1.06581e-14 lineto +80 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 65 (FRNAALG) alignedtext +grestore +% ALGPKG->FRNAALG +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 40 72 moveto +40 64 40 55 40 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 124 152 +end +restore +%%EOF diff --git a/books/ps/v104drawnumerichack.ps b/books/ps/v104drawnumerichack.ps new file mode 100644 index 0000000..596e316 --- /dev/null +++ b/books/ps/v104drawnumerichack.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 140 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 104 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% DRAWHACK +gsave +[ /Rect [ 0 72 96 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=DRAWHACK) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 96 108 moveto +2.13163e-14 108 lineto +0 72 lineto +96 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 96 108 moveto +2.13163e-14 108 lineto +0 72 lineto +96 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 80 (DRAWHACK) alignedtext +grestore +% ALGEBRA +gsave +[ /Rect [ 8 0 88 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=ALGEBRA) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 88 36 moveto +8 36 lineto +8 1.06581e-14 lineto +88 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 88 36 moveto +8 36 lineto +8 1.06581e-14 lineto +88 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +15.5 13.9 moveto 65 (ALGEBRA) alignedtext +grestore +% DRAWHACK->ALGEBRA +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 48 72 moveto +48 64 48 55 48 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 51.5001 46 moveto +48 36 lineto +44.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 51.5001 46 moveto +48 36 lineto +44.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 140 152 +end +restore +%%EOF diff --git a/books/ps/v104floatingcomplexpackage.ps b/books/ps/v104floatingcomplexpackage.ps new file mode 100644 index 0000000..91994dd --- /dev/null +++ b/books/ps/v104floatingcomplexpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 128 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 92 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% FLOATCP +gsave +[ /Rect [ 4 72 80 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FLOATCP) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 80 108 moveto +4 108 lineto +4 72 lineto +80 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 80 108 moveto +4 108 lineto +4 72 lineto +80 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +11.5 85.9 moveto 61 (FLOATCP) alignedtext +grestore +% COMPCAT +gsave +[ /Rect [ 0 0 84 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 68 (COMPCAT) alignedtext +grestore +% FLOATCP->COMPCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 42 72 moveto +42 64 42 55 42 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 45.5001 46 moveto +42 36 lineto +38.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 45.5001 46 moveto +42 36 lineto +38.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 128 152 +end +restore +%%EOF diff --git a/books/ps/v104floatingrealpackage.ps b/books/ps/v104floatingrealpackage.ps new file mode 100644 index 0000000..f5a0ca6 --- /dev/null +++ b/books/ps/v104floatingrealpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 120 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 84 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% FLOATRP +gsave +[ /Rect [ 0 72 76 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FLOATRP) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +76 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +76 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 60 (FLOATRP) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 5 0 71 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 71 36 moveto +5 36 lineto +5 1.06581e-14 lineto +71 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 71 36 moveto +5 36 lineto +5 1.06581e-14 lineto +71 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +12.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% FLOATRP->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 38 72 moveto +38 64 38 55 38 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 41.5001 46 moveto +38 36 lineto +34.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 41.5001 46 moveto +38 36 lineto +34.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 120 152 +end +restore +%%EOF diff --git a/books/ps/v104framednonassociativealgebrafunctions2.ps b/books/ps/v104framednonassociativealgebrafunctions2.ps new file mode 100644 index 0000000..b5ad5d5 --- /dev/null +++ b/books/ps/v104framednonassociativealgebrafunctions2.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 124 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 88 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% FRNAAF2 +gsave +[ /Rect [ 2 72 78 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FRNAAF2) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 78 108 moveto +2 108 lineto +2 72 lineto +78 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 78 108 moveto +2 108 lineto +2 72 lineto +78 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +10 85.9 moveto 60 (FRNAAF2) alignedtext +grestore +% FRNAALG +gsave +[ /Rect [ 0 0 80 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FRNAALG) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 80 36 moveto +3.02917e-14 36 lineto +9.23914e-15 1.06581e-14 lineto +80 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 80 36 moveto +3.02917e-14 36 lineto +9.23914e-15 1.06581e-14 lineto +80 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 65 (FRNAALG) alignedtext +grestore +% FRNAAF2->FRNAALG +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 40 72 moveto +40 64 40 55 40 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 124 152 +end +restore +%%EOF diff --git a/books/ps/v104innernumericeigenpackage.ps b/books/ps/v104innernumericeigenpackage.ps new file mode 100644 index 0000000..09413a4 --- /dev/null +++ b/books/ps/v104innernumericeigenpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 128 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 92 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% INEP +gsave +[ /Rect [ 15 72 69 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=INEP) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 69 108 moveto +15 108 lineto +15 72 lineto +69 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 69 108 moveto +15 108 lineto +15 72 lineto +69 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +26.5 85.9 moveto 31 (INEP) alignedtext +grestore +% COMPCAT +gsave +[ /Rect [ 0 0 84 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 68 (COMPCAT) alignedtext +grestore +% INEP->COMPCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 42 72 moveto +42 64 42 55 42 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 45.5001 46 moveto +42 36 lineto +38.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 45.5001 46 moveto +42 36 lineto +38.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 128 152 +end +restore +%%EOF diff --git a/books/ps/v104innernumericfloatsolvepackage.ps b/books/ps/v104innernumericfloatsolvepackage.ps new file mode 100644 index 0000000..8226448 --- /dev/null +++ b/books/ps/v104innernumericfloatsolvepackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 134 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 98 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NUMQUAD +gsave +[ /Rect [ 0 72 90 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NUMQUAD) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 90 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +90 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 90 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +90 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 74 (NUMQUAD) alignedtext +grestore +% IVECTOR +gsave +[ /Rect [ 6 0 84 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=IVECTOR) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 84 36 moveto +6 36 lineto +6 1.06581e-14 lineto +84 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 84 36 moveto +6 36 lineto +6 1.06581e-14 lineto +84 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +14 13.9 moveto 62 (IVECTOR) alignedtext +grestore +% NUMQUAD->IVECTOR +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 45 72 moveto +45 64 45 55 45 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 48.5001 46 moveto +45 36 lineto +41.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 48.5001 46 moveto +45 36 lineto +41.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 134 152 +end +restore +%%EOF diff --git a/books/ps/v104integernumbertheoryfunctions.ps b/books/ps/v104integernumbertheoryfunctions.ps new file mode 100644 index 0000000..22530a2 --- /dev/null +++ b/books/ps/v104integernumbertheoryfunctions.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 130 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 94 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% INTHEORY +gsave +[ /Rect [ 0 72 86 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=INTHEORY) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 86 108 moveto +2.7485e-14 108 lineto +6.41154e-15 72 lineto +86 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 86 108 moveto +2.7485e-14 108 lineto +6.41154e-15 72 lineto +86 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 71 (INTHEORY) alignedtext +grestore +% A1AGG +gsave +[ /Rect [ 12 0 74 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=A1AGG) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 74 36 moveto +12 36 lineto +12 1.06581e-14 lineto +74 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 74 36 moveto +12 36 lineto +12 1.06581e-14 lineto +74 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +19.5 13.9 moveto 47 (A1AGG) alignedtext +grestore +% INTHEORY->A1AGG +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 43 72 moveto +43 64 43 55 43 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 46.5001 46 moveto +43 36 lineto +39.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 46.5001 46 moveto +43 36 lineto +39.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 130 152 +end +restore +%%EOF diff --git a/books/ps/v104internalprintpackage.ps b/books/ps/v104internalprintpackage.ps new file mode 100644 index 0000000..34c8012 --- /dev/null +++ b/books/ps/v104internalprintpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 116 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 80 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% IPRNTPK +gsave +[ /Rect [ 0 72 72 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=IPRNTPK) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 72 108 moveto +3.00315e-14 108 lineto +9.00668e-15 72 lineto +72 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 72 108 moveto +3.00315e-14 108 lineto +9.00668e-15 72 lineto +72 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 57 (IPRNTPK) alignedtext +grestore +% ALIST +gsave +[ /Rect [ 9 0 63 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=ALIST) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 63 36 moveto +9 36 lineto +9 1.06581e-14 lineto +63 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 63 36 moveto +9 36 lineto +9 1.06581e-14 lineto +63 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +16.5 13.9 moveto 39 (ALIST) alignedtext +grestore +% IPRNTPK->ALIST +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 36 72 moveto +36 64 36 55 36 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 39.5001 46 moveto +36 36 lineto +32.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 39.5001 46 moveto +36 36 lineto +32.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 116 152 +end +restore +%%EOF diff --git a/books/ps/v104lazardsetsolvingpackage.ps b/books/ps/v104lazardsetsolvingpackage.ps new file mode 100644 index 0000000..2249797 --- /dev/null +++ b/books/ps/v104lazardsetsolvingpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 122 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 86 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% LAZM3PK +gsave +[ /Rect [ 0 72 78 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=LAZM3PK) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 78 108 moveto +2.634e-14 108 lineto +5.29438e-15 72 lineto +78 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 78 108 moveto +2.634e-14 108 lineto +5.29438e-15 72 lineto +78 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 63 (LAZM3PK) alignedtext +grestore +% SFRTCAT +gsave +[ /Rect [ 2 0 76 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=SFRTCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 76 36 moveto +2 36 lineto +2 1.06581e-14 lineto +76 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 76 36 moveto +2 36 lineto +2 1.06581e-14 lineto +76 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +9.5 13.9 moveto 59 (SFRTCAT) alignedtext +grestore +% LAZM3PK->SFRTCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 39 72 moveto +39 64 39 55 39 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 42.5001 46 moveto +39 36 lineto +35.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 42.5001 46 moveto +39 36 lineto +35.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 122 152 +end +restore +%%EOF diff --git a/books/ps/v104newsparseunivariatepolynomialfunctions2.ps b/books/ps/v104newsparseunivariatepolynomialfunctions2.ps new file mode 100644 index 0000000..82dad73 --- /dev/null +++ b/books/ps/v104newsparseunivariatepolynomialfunctions2.ps @@ -0,0 +1,326 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 218 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 182 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NSUP2 +gsave +[ /Rect [ 61 72 119 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NSUP2) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 119 108 moveto +61 108 lineto +61 72 lineto +119 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 119 108 moveto +61 108 lineto +61 72 lineto +119 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +69 85.9 moveto 42 (NSUP2) alignedtext +grestore +% LMODULE +gsave +[ /Rect [ 0 0 84 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=LMODULE) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.63123e-14 36 lineto +5.2458e-15 1.06581e-14 lineto +84 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.63123e-14 36 lineto +5.2458e-15 1.06581e-14 lineto +84 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 69 (LMODULE) alignedtext +grestore +% NSUP2->LMODULE +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 78 72 moveto +73 64 66 54 60 44 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 62.8 41.9 moveto +54 36 lineto +57.2 46.1 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 62.8 41.9 moveto +54 36 lineto +57.2 46.1 lineto +closepath stroke +grestore +% SGROUP +gsave +[ /Rect [ 102 0 174 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=SGROUP) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 174 36 moveto +102 36 lineto +102 1.06581e-14 lineto +174 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 174 36 moveto +102 36 lineto +102 1.06581e-14 lineto +174 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +110 13.9 moveto 56 (SGROUP) alignedtext +grestore +% NSUP2->SGROUP +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 102 72 moveto +107 64 114 54 120 44 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 122.8 46.1 moveto +126 36 lineto +117.2 41.9 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 122.8 46.1 moveto +126 36 lineto +117.2 41.9 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 218 152 +end +restore +%%EOF diff --git a/books/ps/v104nonlinearfirstorderodesolver.ps b/books/ps/v104nonlinearfirstorderodesolver.ps new file mode 100644 index 0000000..8094345 --- /dev/null +++ b/books/ps/v104nonlinearfirstorderodesolver.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 106 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 70 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NODE1 +gsave +[ /Rect [ 0 72 62 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NODE1) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 62 108 moveto +2.13163e-14 108 lineto +3.55271e-15 72 lineto +62 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 62 108 moveto +2.13163e-14 108 lineto +3.55271e-15 72 lineto +62 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 46 (NODE1) alignedtext +grestore +% ACFS +gsave +[ /Rect [ 4 0 58 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=ACFS) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 58 36 moveto +4 36 lineto +4 1.06581e-14 lineto +58 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 58 36 moveto +4 36 lineto +4 1.06581e-14 lineto +58 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +13.5 13.9 moveto 35 (ACFS) alignedtext +grestore +% NODE1->ACFS +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 31 72 moveto +31 64 31 55 31 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 34.5001 46 moveto +31 36 lineto +27.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 34.5001 46 moveto +31 36 lineto +27.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 106 152 +end +restore +%%EOF diff --git a/books/ps/v104nonlinearsolvepackage.ps b/books/ps/v104nonlinearsolvepackage.ps new file mode 100644 index 0000000..8c34c2d --- /dev/null +++ b/books/ps/v104nonlinearsolvepackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 118 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 82 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NLINSOL +gsave +[ /Rect [ 0 72 74 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NLINSOL) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 74 108 moveto +2.00881e-14 108 lineto +6.06806e-15 72 lineto +74 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 74 108 moveto +2.00881e-14 108 lineto +6.06806e-15 72 lineto +74 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 59 (NLINSOL) alignedtext +grestore +% ACF +gsave +[ /Rect [ 10 0 64 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=ACF) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 64 36 moveto +10 36 lineto +10 1.06581e-14 lineto +64 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 64 36 moveto +10 36 lineto +10 1.06581e-14 lineto +64 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +23.5 13.9 moveto 27 (ACF) alignedtext +grestore +% NLINSOL->ACF +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 37 72 moveto +37 64 37 55 37 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 40.5001 46 moveto +37 36 lineto +33.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 40.5001 46 moveto +37 36 lineto +33.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 118 152 +end +restore +%%EOF diff --git a/books/ps/v104normalizationpackage.ps b/books/ps/v104normalizationpackage.ps new file mode 100644 index 0000000..f5a8142 --- /dev/null +++ b/books/ps/v104normalizationpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 118 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 82 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NORMPK +gsave +[ /Rect [ 0 72 74 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NORMPK) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 74 108 moveto +2.00881e-14 108 lineto +6.06806e-15 72 lineto +74 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 74 108 moveto +2.00881e-14 108 lineto +6.06806e-15 72 lineto +74 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 59 (NORMPK) alignedtext +grestore +% SFRTCAT +gsave +[ /Rect [ 0 0 74 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=SFRTCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 74 36 moveto +2.00881e-14 36 lineto +6.06806e-15 1.06581e-14 lineto +74 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 74 36 moveto +2.00881e-14 36 lineto +6.06806e-15 1.06581e-14 lineto +74 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 59 (SFRTCAT) alignedtext +grestore +% NORMPK->SFRTCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 37 72 moveto +37 64 37 55 37 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 40.5001 46 moveto +37 36 lineto +33.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 40.5001 46 moveto +37 36 lineto +33.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 118 152 +end +restore +%%EOF diff --git a/books/ps/v104npcoef.ps b/books/ps/v104npcoef.ps new file mode 100644 index 0000000..d3f2f48 --- /dev/null +++ b/books/ps/v104npcoef.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 114 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 78 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NPCOEF +gsave +[ /Rect [ 0 72 70 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NPCOEF) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 70 108 moveto +2.13163e-14 108 lineto +7.10543e-15 72 lineto +70 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 70 108 moveto +2.13163e-14 108 lineto +7.10543e-15 72 lineto +70 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 54 (NPCOEF) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 2 0 68 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 68 36 moveto +2 36 lineto +2 1.06581e-14 lineto +68 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 68 36 moveto +2 36 lineto +2 1.06581e-14 lineto +68 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +9.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% NPCOEF->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 35 72 moveto +35 64 35 55 35 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 38.5001 46 moveto +35 36 lineto +31.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 38.5001 46 moveto +35 36 lineto +31.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 114 152 +end +restore +%%EOF diff --git a/books/ps/v104numeric.ps b/books/ps/v104numeric.ps new file mode 100644 index 0000000..02f0fda --- /dev/null +++ b/books/ps/v104numeric.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 128 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 92 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NUMERIC +gsave +[ /Rect [ 2 72 82 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NUMERIC) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 82 108 moveto +2 108 lineto +2 72 lineto +82 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 82 108 moveto +2 108 lineto +2 72 lineto +82 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +9.5 85.9 moveto 65 (NUMERIC) alignedtext +grestore +% COMPCAT +gsave +[ /Rect [ 0 0 84 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 68 (COMPCAT) alignedtext +grestore +% NUMERIC->COMPCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 42 72 moveto +42 64 42 55 42 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 45.5001 46 moveto +42 36 lineto +38.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 45.5001 46 moveto +42 36 lineto +38.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 128 152 +end +restore +%%EOF diff --git a/books/ps/v104numericalordinarydifferentialequations.ps b/books/ps/v104numericalordinarydifferentialequations.ps new file mode 100644 index 0000000..2019d94 --- /dev/null +++ b/books/ps/v104numericalordinarydifferentialequations.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 122 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 86 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NUMODE +gsave +[ /Rect [ 0 72 78 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NUMODE) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 78 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +78 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 78 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +78 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 62 (NUMODE) alignedtext +grestore +% IVECTOR +gsave +[ /Rect [ 0 0 78 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=IVECTOR) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 78 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +78 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 78 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +78 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 62 (IVECTOR) alignedtext +grestore +% NUMODE->IVECTOR +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 39 72 moveto +39 64 39 55 39 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 42.5001 46 moveto +39 36 lineto +35.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 42.5001 46 moveto +39 36 lineto +35.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 122 152 +end +restore +%%EOF diff --git a/books/ps/v104numericalquadrature.ps b/books/ps/v104numericalquadrature.ps new file mode 100644 index 0000000..8226448 --- /dev/null +++ b/books/ps/v104numericalquadrature.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 134 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 98 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NUMQUAD +gsave +[ /Rect [ 0 72 90 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NUMQUAD) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 90 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +90 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 90 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +90 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 74 (NUMQUAD) alignedtext +grestore +% IVECTOR +gsave +[ /Rect [ 6 0 84 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=IVECTOR) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 84 36 moveto +6 36 lineto +6 1.06581e-14 lineto +84 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 84 36 moveto +6 36 lineto +6 1.06581e-14 lineto +84 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +14 13.9 moveto 62 (IVECTOR) alignedtext +grestore +% NUMQUAD->IVECTOR +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 45 72 moveto +45 64 45 55 45 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 48.5001 46 moveto +45 36 lineto +41.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 48.5001 46 moveto +45 36 lineto +41.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 134 152 +end +restore +%%EOF diff --git a/books/ps/v104numericcomplexeigenpackage.ps b/books/ps/v104numericcomplexeigenpackage.ps new file mode 100644 index 0000000..aa74a66 --- /dev/null +++ b/books/ps/v104numericcomplexeigenpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 128 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 92 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NCEP +gsave +[ /Rect [ 15 72 69 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NCEP) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 69 108 moveto +15 108 lineto +15 72 lineto +69 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 69 108 moveto +15 108 lineto +15 72 lineto +69 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +24 85.9 moveto 36 (NCEP) alignedtext +grestore +% COMPCAT +gsave +[ /Rect [ 0 0 84 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=COMPCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 84 36 moveto +2.84217e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +84 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 68 (COMPCAT) alignedtext +grestore +% NCEP->COMPCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 42 72 moveto +42 64 42 55 42 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 45.5001 46 moveto +42 36 lineto +38.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 45.5001 46 moveto +42 36 lineto +38.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 128 152 +end +restore +%%EOF diff --git a/books/ps/v104numericrealeigenpackage.ps b/books/ps/v104numericrealeigenpackage.ps new file mode 100644 index 0000000..79b6f60 --- /dev/null +++ b/books/ps/v104numericrealeigenpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 98 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 62 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% NREP +gsave +[ /Rect [ 0 72 54 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NREP) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 54 108 moveto +2.13163e-14 108 lineto +3.55271e-15 72 lineto +54 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 54 108 moveto +2.13163e-14 108 lineto +3.55271e-15 72 lineto +54 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +9.5 85.9 moveto 35 (NREP) alignedtext +grestore +% ALIST +gsave +[ /Rect [ 0 0 54 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=ALIST) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 54 36 moveto +1.41189e-14 36 lineto +3.65506e-15 1.06581e-14 lineto +54 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 54 36 moveto +1.41189e-14 36 lineto +3.65506e-15 1.06581e-14 lineto +54 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 39 (ALIST) alignedtext +grestore +% NREP->ALIST +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 27 72 moveto +27 64 27 55 27 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 30.5001 46 moveto +27 36 lineto +23.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 30.5001 46 moveto +27 36 lineto +23.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 98 152 +end +restore +%%EOF diff --git a/books/ps/v104pointfunctions2.ps b/books/ps/v104pointfunctions2.ps new file mode 100644 index 0000000..aa10488 --- /dev/null +++ b/books/ps/v104pointfunctions2.ps @@ -0,0 +1,326 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 200 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 164 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% PTFUNC2 +gsave +[ /Rect [ 32 72 108 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=PTFUNC2) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 108 108 moveto +32 108 lineto +32 72 lineto +108 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 108 108 moveto +32 108 lineto +32 72 lineto +108 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +39.5 85.9 moveto 61 (PTFUNC2) alignedtext +grestore +% PID +gsave +[ /Rect [ 0 0 54 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PID) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 54 36 moveto +2.13163e-14 36 lineto +3.55271e-15 1.06581e-14 lineto +54 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 54 36 moveto +2.13163e-14 36 lineto +3.55271e-15 1.06581e-14 lineto +54 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +16 13.9 moveto 22 (PID) alignedtext +grestore +% PTFUNC2->PID +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 59 72 moveto +54 64 48 54 43 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 45.916 43.0418 moveto +38 36 lineto +39.7969 46.4414 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 45.916 43.0418 moveto +38 36 lineto +39.7969 46.4414 lineto +closepath stroke +grestore +% OAGROUP +gsave +[ /Rect [ 72 0 156 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=OAGROUP) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 156 36 moveto +72 36 lineto +72 1.06581e-14 lineto +156 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 156 36 moveto +72 36 lineto +72 1.06581e-14 lineto +156 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +80 13.9 moveto 68 (OAGROUP) alignedtext +grestore +% PTFUNC2->OAGROUP +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 81 72 moveto +86 64 92 54 98 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 101.203 46.4414 moveto +103 36 lineto +95.084 43.0418 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 101.203 46.4414 moveto +103 36 lineto +95.084 43.0418 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 200 152 +end +restore +%%EOF diff --git a/books/ps/v104pointpackage.ps b/books/ps/v104pointpackage.ps new file mode 100644 index 0000000..9df65a7 --- /dev/null +++ b/books/ps/v104pointpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 112 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 76 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% PTPACK +gsave +[ /Rect [ 0 72 68 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=PTPACK) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 68 108 moveto +2.13163e-14 108 lineto +7.10543e-15 72 lineto +68 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 68 108 moveto +2.13163e-14 108 lineto +7.10543e-15 72 lineto +68 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 52 (PTPACK) alignedtext +grestore +% PTCAT +gsave +[ /Rect [ 4 0 64 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PTCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 64 36 moveto +4 36 lineto +4 1.06581e-14 lineto +64 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 64 36 moveto +4 36 lineto +4 1.06581e-14 lineto +64 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +12 13.9 moveto 44 (PTCAT) alignedtext +grestore +% PTPACK->PTCAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 34 72 moveto +34 64 34 55 34 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 37.5001 46 moveto +34 36 lineto +30.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 37.5001 46 moveto +34 36 lineto +30.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 112 152 +end +restore +%%EOF diff --git a/books/ps/v104polynomialnumbertheoryfunctions.ps b/books/ps/v104polynomialnumbertheoryfunctions.ps new file mode 100644 index 0000000..1f199a0 --- /dev/null +++ b/books/ps/v104polynomialnumbertheoryfunctions.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 134 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 98 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% PNTHEORY +gsave +[ /Rect [ 0 72 90 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=PNTHEORY) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 90 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +90 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 90 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +90 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 74 (PNTHEORY) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 12 0 78 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 78 36 moveto +12 36 lineto +12 1.06581e-14 lineto +78 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 78 36 moveto +12 36 lineto +12 1.06581e-14 lineto +78 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +19.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% PNTHEORY->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 45 72 moveto +45 64 45 55 45 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 48.5001 46 moveto +45 36 lineto +41.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 48.5001 46 moveto +45 36 lineto +41.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 134 152 +end +restore +%%EOF diff --git a/books/ps/v104retractsolvepackage.ps b/books/ps/v104retractsolvepackage.ps new file mode 100644 index 0000000..19c4354 --- /dev/null +++ b/books/ps/v104retractsolvepackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 112 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 76 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% RETSOL +gsave +[ /Rect [ 0 72 68 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=RETSOL) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 68 108 moveto +1.93977e-14 108 lineto +5.39152e-15 72 lineto +68 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 68 108 moveto +1.93977e-14 108 lineto +5.39152e-15 72 lineto +68 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 53 (RETSOL) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 1 0 67 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 67 36 moveto +1 36 lineto +1 1.06581e-14 lineto +67 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 67 36 moveto +1 36 lineto +1 1.06581e-14 lineto +67 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% RETSOL->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 34 72 moveto +34 64 34 55 34 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 37.5001 46 moveto +34 36 lineto +30.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 37.5001 46 moveto +34 36 lineto +30.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 112 152 +end +restore +%%EOF diff --git a/books/ps/v104structuralconstantspackage.ps b/books/ps/v104structuralconstantspackage.ps new file mode 100644 index 0000000..3d20170 --- /dev/null +++ b/books/ps/v104structuralconstantspackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 110 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 74 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% SCPKG +gsave +[ /Rect [ 3 72 63 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=SCPKG) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 63 108 moveto +3 108 lineto +3 72 lineto +63 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 63 108 moveto +3 108 lineto +3 72 lineto +63 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +10.5 85.9 moveto 45 (SCPKG) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 0 0 66 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=PFECAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 66 36 moveto +2.24404e-14 36 lineto +8.44116e-15 1.06581e-14 lineto +66 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% SCPKG->PFECAT +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 33 72 moveto +33 64 33 55 33 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 36.5001 46 moveto +33 36 lineto +29.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 36.5001 46 moveto +33 36 lineto +29.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 110 152 +end +restore +%%EOF diff --git a/books/ps/v104tabulatedcomputationpackage.ps b/books/ps/v104tabulatedcomputationpackage.ps new file mode 100644 index 0000000..741e805 --- /dev/null +++ b/books/ps/v104tabulatedcomputationpackage.ps @@ -0,0 +1,281 @@ +%!PS-Adobe-2.0 +%%Creator: Graphviz version 2.16.1 (Mon Jul 7 18:20:33 UTC 2008) +%%For: (root) root +%%Title: pic +%%Pages: (atend) +%%BoundingBox: (atend) +%%EndComments +save +%%BeginProlog +/DotDict 200 dict def +DotDict begin + +/setupLatin1 { +mark +/EncodingVector 256 array def + EncodingVector 0 + +ISOLatin1Encoding 0 255 getinterval putinterval +EncodingVector 45 /hyphen put + +% Set up ISO Latin 1 character encoding +/starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont +} def +/Times-Roman starnetISO def +/Times-Italic starnetISO def +/Times-Bold starnetISO def +/Times-BoldItalic starnetISO def +/Helvetica starnetISO def +/Helvetica-Oblique starnetISO def +/Helvetica-Bold starnetISO def +/Helvetica-BoldOblique starnetISO def +/Courier starnetISO def +/Courier-Oblique starnetISO def +/Courier-Bold starnetISO def +/Courier-BoldOblique starnetISO def +cleartomark +} bind def + +%%BeginResource: procset graphviz 0 0 +/coord-font-family /Times-Roman def +/default-font-family /Times-Roman def +/coordfont coord-font-family findfont 8 scalefont def + +/InvScaleFactor 1.0 def +/set_scale { + dup 1 exch div /InvScaleFactor exch def + scale +} bind def + +% styles +/solid { [] 0 setdash } bind def +/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def +/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def +/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def +/bold { 2 setlinewidth } bind def +/filled { } bind def +/unfilled { } bind def +/rounded { } bind def +/diagonals { } bind def + +% hooks for setting color +/nodecolor { sethsbcolor } bind def +/edgecolor { sethsbcolor } bind def +/graphcolor { sethsbcolor } bind def +/nopcolor {pop pop pop} bind def + +/beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if +} bind def + +/set_font { + findfont exch + scalefont setfont +} def + +% draw text fitted to its expected width +/alignedtext { % width text + /text exch def + /width exch def + gsave + width 0 gt { + [] 0 setdash + text stringwidth pop width exch sub text length div 0 text ashow + } if + grestore +} def + +/boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath +} bind def + +/ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix +} bind def + +/endpage { showpage } bind def +/showpage { } def + +/layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] +def + +/layerlen layercolorseq length def + +/setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer 1 sub layerlen mod get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def +} bind def + +/onlayer { curlayer ne {invis} if } def + +/onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if +} def + +/curlayer 0 def + +%%EndResource +%%EndProlog +%%BeginSetup +14 default-font-family set_font +1 setmiterlimit +% /arrowlength 10 def +% /arrowwidth 5 def + +% make sure pdfmark is harmless for PS-interpreters other than Distiller +/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse +% make '<<' and '>>' safe on PS Level 1 devices +/languagelevel where {pop languagelevel}{1} ifelse +2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put +} if + +%%EndSetup +setupLatin1 +%%Page: 1 1 +%%PageBoundingBox: 36 36 124 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 88 116 boxprim clip newpath +1 1 set_scale 0 rotate 40 40 translate +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath fill +1 setlinewidth +0.167 0.600 1.000 graphcolor +newpath -4 -4 moveto +-4 716 lineto +536 716 lineto +536 -4 lineto +closepath stroke +% TBCMPPK +gsave +[ /Rect [ 0 72 80 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=TBCMPPK) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 80 108 moveto +3.02917e-14 108 lineto +9.23914e-15 72 lineto +80 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 80 108 moveto +3.02917e-14 108 lineto +9.23914e-15 72 lineto +80 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 65 (TBCMPPK) alignedtext +grestore +% TBAGG +gsave +[ /Rect [ 8 0 72 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=TBAGG) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 72 36 moveto +8 36 lineto +8 1.06581e-14 lineto +72 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 72 36 moveto +8 36 lineto +8 1.06581e-14 lineto +72 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +15.5 13.9 moveto 49 (TBAGG) alignedtext +grestore +% TBCMPPK->TBAGG +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 40 72 moveto +40 64 40 55 40 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 43.5001 46 moveto +40 36 lineto +36.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 124 152 +end +restore +%%EOF diff --git a/changelog b/changelog index 37371db..5264222 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,48 @@ +20090207 tpd src/axiom-website/patches.html 20090207.01.tpd.patch +20090207 tpd src/algebra/Makefile remove spad files +20090207 tpd src/algebra/numtheor.spad removed +20090207 tpd books/ps/v104polynomialnumbertheoryfunctions.ps added +20090207 tpd books/ps/v104integernumbertheoryfunctions.ps added +20090207 tpd src/algebra/numsolve.spad removed +20090207 tpd books/ps/v104floatingcomplexpackage.ps added +20090207 tpd books/ps/v104floatingrealpackage.ps added +20090207 tpd books/ps/v104innernumericfloatsolvepackage.ps added +20090207 tpd src/algebra/numquad.spad removed +20090207 tpd books/ps/v104numericalquadrature.ps added +20090207 tpd src/algebra/numeigen.spad removed +20090207 tpd books/ps/v104numericcomplexeigenpackage.ps added +20090207 tpd src/algebra/numode.spad removed +20090207 tpd books/ps/v104numericalordinarydifferentialequations.ps added +20090207 tpd src/algebra/numeric.spad removed +20090207 tpd books/ps/v104drawnumerichack.ps added +20090207 tpd books/ps/v104numeric.ps added +20090207 tpd src/algebra/numeigen.spad removed +20090207 tpd books/ps/v104numericcomplexeigenpackage.ps added +20090207 tpd books/ps/v104numericrealeigenpackage.ps added +20090207 tpd books/ps/v104innernumericeigenpackage.ps added +20090207 tpd src/algebra/nsregset.spad removed +20090207 tpd books/ps/v104lazardsetsolvingpackage.ps added +20090207 tpd src/algebra/nregset.spad removed +20090207 tpd books/ps/v104normalizationpackage.ps added +20090207 tpd src/algebra/npcoef.spad removed +20090207 tpd books/ps/v104npcoef.ps added +20090207 tpd src/algebra/nlode.spad removed +20090207 tpd books/ps/v104nonlinearfirstorderodesolver.ps added +20090207 tpd src/algebra/nlinsol.spad removed +20090207 tpd books/ps/v104nonlinearsolvepackage.ps added +20090207 tpd books/ps/v104retractsolvepackage.ps added +20090207 tpd src/algebra/newpoly.spad removed +20090207 tpd books/ps/v104newsparseunivariatepolynomialfunctions2.ps added +20090207 tpd src/algebra/newpoint.spad removed +20090207 tpd books/ps/v104pointfunctions2.ps added +20090207 tpd books/ps/v104pointpackage.ps added +20090207 tpd src/algebra/newdata.spad removed +20090207 tpd books/ps/v104tabulatedcomputationpackage.ps added +20090207 tpd books/ps/v104internalprintpackage.ps added +20090207 tpd src/algebra/naalg.spad removed +20090207 tpd books/ps/v104framednonassociativealgebrafunctions2.ps added +20090207 tpd books/ps/v104structuralconstantspackage.ps added +20090207 tpd books/ps/v104algebrapackage.ps added 20090203 tpd src/axiom-website/patches.html 20090203.01.tpd.patch 20090203 tpd books/bookvol10.4.pamphlet add packages 20090203 tpd src/algebra/Makefile remove spad files diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index 3882e11..9f9942e 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -15771,14 +15771,6 @@ We need to figure out which mlift.spad to keep. <>= SPADFILES= \ - ${OUTSRC}/naalg.spad \ - ${OUTSRC}/newdata.spad ${OUTSRC}/newpoint.spad \ - ${OUTSRC}/newpoly.spad ${OUTSRC}/nlinsol.spad ${OUTSRC}/nlode.spad \ - ${OUTSRC}/npcoef.spad \ - ${OUTSRC}/nregset.spad \ - ${OUTSRC}/nsregset.spad ${OUTSRC}/numeigen.spad ${OUTSRC}/numeric.spad \ - ${OUTSRC}/numode.spad ${OUTSRC}/numquad.spad ${OUTSRC}/numsolve.spad \ - ${OUTSRC}/numtheor.spad \ ${OUTSRC}/oct.spad ${OUTSRC}/odealg.spad ${OUTSRC}/odeef.spad \ ${OUTSRC}/oderf.spad ${OUTSRC}/omdev.spad \ ${OUTSRC}/omserver.spad \ @@ -15856,14 +15848,10 @@ DOCFILES= \ ${DOC}/invnode.as.dvi ${DOC}/invrender.as.dvi \ ${DOC}/invtypes.as.dvi ${DOC}/invutils.as.dvi \ ${DOC}/iviews.as.dvi \ - ${DOC}/naalg.spad.dvi ${DOC}/ndftip.as.dvi \ - ${DOC}/nepip.as.dvi ${DOC}/newdata.spad.dvi ${DOC}/newpoint.spad.dvi \ - ${DOC}/newpoly.spad.dvi ${DOC}/nlinsol.spad.dvi ${DOC}/nlode.spad.dvi \ - ${DOC}/noptip.as.dvi ${DOC}/npcoef.spad.dvi ${DOC}/nqip.as.dvi \ - ${DOC}/nrc.as.dvi ${DOC}/nregset.spad.dvi ${DOC}/nsfip.as.dvi \ - ${DOC}/nsregset.spad.dvi ${DOC}/numeigen.spad.dvi ${DOC}/numeric.spad.dvi \ - ${DOC}/numode.spad.dvi ${DOC}/numquad.spad.dvi ${DOC}/numsolve.spad.dvi \ - ${DOC}/numtheor.spad.dvi \ + ${DOC}/ndftip.as.dvi \ + ${DOC}/nepip.as.dvi \ + ${DOC}/noptip.as.dvi ${DOC}/nqip.as.dvi \ + ${DOC}/nrc.as.dvi ${DOC}/nsfip.as.dvi \ ${DOC}/oct.spad.dvi ${DOC}/odealg.spad.dvi ${DOC}/odeef.spad.dvi \ ${DOC}/oderf.spad.dvi ${DOC}/omdev.spad.dvi \ ${DOC}/omserver.spad.dvi \ @@ -17051,16 +17039,16 @@ ${HELP}/IntegerLinearDependence.help: ${BOOKS}/bookvol10.4.pamphlet >${INPUT}/IntegerLinearDependence.input @echo "IntegerLinearDependence (ZLINDEP)" >>${HELPFILE} -${HELP}/IntegerNumberTheoryFunctions.help: ${IN}/numtheor.spad.pamphlet +${HELP}/IntegerNumberTheoryFunctions.help: ${BOOKS}/bookvol10.4.pamphlet @echo 7035 create IntegerNumberTheoryFunctions.help \ - from ${IN}/numtheor.spad.pamphlet + from ${BOOKS}/bookvol10.4.pamphlet @${TANGLE} -R"IntegerNumberTheoryFunctions.help" \ - ${IN}/numtheor.spad.pamphlet \ + ${BOOKS}/bookvol10.4.pamphlet \ >${HELP}/IntegerNumberTheoryFunctions.help @cp ${HELP}/IntegerNumberTheoryFunctions.help \ ${HELP}/INTHEORY.help @${TANGLE} -R"IntegerNumberTheoryFunctions.input" \ - ${IN}/numtheor.spad.pamphlet \ + ${BOOKS}/bookvol10.4.pamphlet \ >${INPUT}/IntegerNumberTheoryFunctions.input @echo "IntegerNumberTheoryFunctions (INTHEORY)" >>${HELPFILE} diff --git a/src/algebra/naalg.spad.pamphlet b/src/algebra/naalg.spad.pamphlet deleted file mode 100644 index d70c989..0000000 --- a/src/algebra/naalg.spad.pamphlet +++ /dev/null @@ -1,704 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra naalg.spad} -\author{Johannes Grabmeier, Robert Wisbauer} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package SCPKG StructuralConstantsPackage} -<>= -)abbrev package SCPKG StructuralConstantsPackage -++ Authors: J. Grabmeier -++ Date Created: 02 April 1992 -++ Date Last Updated: 14 April 1992 -++ Basic Operations: -++ Related Constructors: AlgebraPackage, AlgebraGivenByStructuralConstants -++ Also See: -++ AMS Classifications: -++ Keywords: structural constants -++ Reference: -++ Description: -++ StructuralConstantsPackage provides functions creating -++ structural constants from a multiplication tables or a basis -++ of a matrix algebra and other useful functions in this context. -StructuralConstantsPackage(R:Field): public == private where - - L ==> List - S ==> Symbol - FRAC ==> Fraction - POLY ==> Polynomial - V ==> Vector - M ==> Matrix - REC ==> Record(particular: Union(V R,"failed"),basis: List V R) - LSMP ==> LinearSystemMatrixPackage(R,V R,V R, M R) - - public ==> with - -- what we really want to have here is a matrix over - -- linear polynomials in the list of symbols, having arbitrary - -- coefficients from a ring extension of R, e.g. FRAC POLY R. - structuralConstants : (L S, M FRAC POLY R) -> V M FRAC POLY R - ++ structuralConstants(ls,mt) determines the structural constants - ++ of an algebra with generators ls and multiplication table mt, the - ++ entries of which must be given as linear polynomials in the - ++ indeterminates given by ls. The result is in particular useful - ++ as fourth argument for \spadtype{AlgebraGivenByStructuralConstants} - ++ and \spadtype{GenericNonAssociativeAlgebra}. - structuralConstants : (L S, M POLY R) -> V M POLY R - ++ structuralConstants(ls,mt) determines the structural constants - ++ of an algebra with generators ls and multiplication table mt, the - ++ entries of which must be given as linear polynomials in the - ++ indeterminates given by ls. The result is in particular useful - ++ as fourth argument for \spadtype{AlgebraGivenByStructuralConstants} - ++ and \spadtype{GenericNonAssociativeAlgebra}. - structuralConstants: L M R -> V M R - ++ structuralConstants(basis) takes the basis of a matrix - ++ algebra, e.g. the result of \spadfun{basisOfCentroid} and calculates - ++ the structural constants. - ++ Note, that the it is not checked, whether basis really is a - ++ basis of a matrix algebra. - coordinates: (M R, L M R) -> V R - ++ coordinates(a,[v1,...,vn]) returns the coordinates of \spad{a} - ++ with respect to the \spad{R}-module basis \spad{v1},...,\spad{vn}. - - private ==> add - - matrix2Vector: M R -> V R - matrix2Vector m == - lili : L L R := listOfLists m - --li : L R := reduce(concat, listOfLists m) - li : L R := reduce(concat, lili) - construct(li)$(V R) - - coordinates(x,b) == - m : NonNegativeInteger := (maxIndex b) :: NonNegativeInteger - n : NonNegativeInteger := nrows(b.1) * ncols(b.1) - transitionMatrix : Matrix R := new(n,m,0$R)$Matrix(R) - for i in 1..m repeat - setColumn_!(transitionMatrix,i,matrix2Vector(b.i)) - res : REC := solve(transitionMatrix,matrix2Vector(x))$LSMP - if (not every?(zero?$R,first res.basis)) then - error("coordinates: the second argument is linearly dependent") - (res.particular case "failed") => - error("coordinates: first argument is not in linear span of _ -second argument") - (res.particular) :: (Vector R) - - structuralConstants b == - --n := rank() - -- be careful with the possibility that b is not a basis - m : NonNegativeInteger := (maxIndex b) :: NonNegativeInteger - sC : Vector Matrix R := [new(m,m,0$R) for k in 1..m] - for i in 1..m repeat - for j in 1..m repeat - covec : Vector R := coordinates(b.i * b.j, b)$% - for k in 1..m repeat - setelt( sC.k, i, j, covec.k ) - sC - - structuralConstants(ls:L S, mt: M POLY R) == - nn := #(ls) - nrows(mt) ^= nn or ncols(mt) ^= nn => - error "structuralConstants: size of second argument does not _ -agree with number of generators" - gamma : L M POLY R := [] - lscopy : L S := copy ls - while not null lscopy repeat - mat : M POLY R := new(nn,nn,0) - s : S := first lscopy - for i in 1..nn repeat - for j in 1..nn repeat - p := qelt(mt,i,j) - totalDegree(p,ls) > 1 => - error "structuralConstants: entries of second argument _ -must be linear polynomials in the generators" - if (c := coefficient(p, s, 1) ) ^= 0 then qsetelt_!(mat,i,j,c) - gamma := cons(mat, gamma) - lscopy := rest lscopy - vector reverse gamma - - structuralConstants(ls:L S, mt: M FRAC POLY R) == - nn := #(ls) - nrows(mt) ^= nn or ncols(mt) ^= nn => - error "structuralConstants: size of second argument does not _ -agree with number of generators" - gamma : L M FRAC(POLY R) := [] - lscopy : L S := copy ls - while not null lscopy repeat - mat : M FRAC(POLY R) := new(nn,nn,0) - s : S := first lscopy - for i in 1..nn repeat - for j in 1..nn repeat - r := qelt(mt,i,j) - q := denom(r) - totalDegree(q,ls) ^= 0 => - error "structuralConstants: entries of second argument _ -must be (linear) polynomials in the generators" - p := numer(r) - totalDegree(p,ls) > 1 => - error "structuralConstants: entries of second argument _ -must be linear polynomials in the generators" - if (c := coefficient(p, s, 1) ) ^= 0 then qsetelt_!(mat,i,j,c/q) - gamma := cons(mat, gamma) - lscopy := rest lscopy - vector reverse gamma - -@ -\section{package ALGPKG AlgebraPackage} -<>= -)abbrev package ALGPKG AlgebraPackage -++ Authors: J. Grabmeier, R. Wisbauer -++ Date Created: 04 March 1991 -++ Date Last Updated: 04 April 1992 -++ Basic Operations: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: rank, nucleus, nucloid, structural constants -++ Reference: -++ R.S. Pierce: Associative Algebras -++ Graduate Texts in Mathematics 88 -++ Springer-Verlag, Heidelberg, 1982, ISBN 0-387-90693-2 -++ -++ R.D. Schafer: An Introduction to Nonassociative Algebras -++ Academic Press, New York, 1966 -++ -++ A. Woerz-Busekros: Algebra in Genetics -++ Lectures Notes in Biomathematics 36, -++ Springer-Verlag, Heidelberg, 1980 -++ Description: -++ AlgebraPackage assembles a variety of useful functions for -++ general algebras. -AlgebraPackage(R:IntegralDomain, A: FramedNonAssociativeAlgebra(R)): _ - public == private where - - V ==> Vector - M ==> Matrix - I ==> Integer - NNI ==> NonNegativeInteger - REC ==> Record(particular: Union(V R,"failed"),basis: List V R) - LSMP ==> LinearSystemMatrixPackage(R,V R,V R, M R) - - public ==> with - - leftRank: A -> NonNegativeInteger - ++ leftRank(x) determines the number of linearly independent elements - ++ in \spad{x*b1},...,\spad{x*bn}, - ++ where \spad{b=[b1,...,bn]} is a basis. - rightRank: A -> NonNegativeInteger - ++ rightRank(x) determines the number of linearly independent elements - ++ in \spad{b1*x},...,\spad{bn*x}, - ++ where \spad{b=[b1,...,bn]} is a basis. - doubleRank: A -> NonNegativeInteger - ++ doubleRank(x) determines the number of linearly - ++ independent elements - ++ in \spad{b1*x},...,\spad{x*bn}, - ++ where \spad{b=[b1,...,bn]} is a basis. - weakBiRank: A -> NonNegativeInteger - ++ weakBiRank(x) determines the number of - ++ linearly independent elements - ++ in the \spad{bi*x*bj}, \spad{i,j=1,...,n}, - ++ where \spad{b=[b1,...,bn]} is a basis. - biRank: A -> NonNegativeInteger - ++ biRank(x) determines the number of linearly independent elements - ++ in \spad{x}, \spad{x*bi}, \spad{bi*x}, \spad{bi*x*bj}, - ++ \spad{i,j=1,...,n}, - ++ where \spad{b=[b1,...,bn]} is a basis. - ++ Note: if \spad{A} has a unit, - ++ then \spadfunFrom{doubleRank}{AlgebraPackage}, - ++ \spadfunFrom{weakBiRank}{AlgebraPackage} - ++ and \spadfunFrom{biRank}{AlgebraPackage} coincide. - basisOfCommutingElements: () -> List A - ++ basisOfCommutingElements() returns a basis of the space of - ++ all x of \spad{A} satisfying \spad{0 = commutator(x,a)} for all - ++ \spad{a} in \spad{A}. - basisOfLeftAnnihilator: A -> List A - ++ basisOfLeftAnnihilator(a) returns a basis of the space of - ++ all x of \spad{A} satisfying \spad{0 = x*a}. - basisOfRightAnnihilator: A -> List A - ++ basisOfRightAnnihilator(a) returns a basis of the space of - ++ all x of \spad{A} satisfying \spad{0 = a*x}. - basisOfLeftNucleus: () -> List A - ++ basisOfLeftNucleus() returns a basis of the space of - ++ all x of \spad{A} satisfying \spad{0 = associator(x,a,b)} - ++ for all \spad{a},b in \spad{A}. - basisOfRightNucleus: () -> List A - ++ basisOfRightNucleus() returns a basis of the space of - ++ all x of \spad{A} satisfying \spad{0 = associator(a,b,x)} - ++ for all \spad{a},b in \spad{A}. - basisOfMiddleNucleus: () -> List A - ++ basisOfMiddleNucleus() returns a basis of the space of - ++ all x of \spad{A} satisfying \spad{0 = associator(a,x,b)} - ++ for all \spad{a},b in \spad{A}. - basisOfNucleus: () -> List A - ++ basisOfNucleus() returns a basis of the space of all x of \spad{A} satisfying - ++ \spad{associator(x,a,b) = associator(a,x,b) = associator(a,b,x) = 0} - ++ for all \spad{a},b in \spad{A}. - basisOfCenter: () -> List A - ++ basisOfCenter() returns a basis of the space of - ++ all x of \spad{A} satisfying \spad{commutator(x,a) = 0} and - ++ \spad{associator(x,a,b) = associator(a,x,b) = associator(a,b,x) = 0} - ++ for all \spad{a},b in \spad{A}. - basisOfLeftNucloid:()-> List Matrix R - ++ basisOfLeftNucloid() returns a basis of the space of - ++ endomorphisms of \spad{A} as right module. - ++ Note: left nucloid coincides with left nucleus if \spad{A} has a unit. - basisOfRightNucloid:()-> List Matrix R - ++ basisOfRightNucloid() returns a basis of the space of - ++ endomorphisms of \spad{A} as left module. - ++ Note: right nucloid coincides with right nucleus if \spad{A} has a unit. - basisOfCentroid:()-> List Matrix R - ++ basisOfCentroid() returns a basis of the centroid, i.e. the - ++ endomorphism ring of \spad{A} considered as \spad{(A,A)}-bimodule. - radicalOfLeftTraceForm: () -> List A - ++ radicalOfLeftTraceForm() returns basis for null space of - ++ \spad{leftTraceMatrix()}, if the algebra is - ++ associative, alternative or a Jordan algebra, then this - ++ space equals the radical (maximal nil ideal) of the algebra. - if R has EuclideanDomain then - basis : V A -> V A - ++ basis(va) selects a basis from the elements of va. - - - private ==> add - - -- constants - - n : PositiveInteger := rank()$A - n2 : PositiveInteger := n*n - n3 : PositiveInteger := n*n2 - gamma : Vector Matrix R := structuralConstants()$A - - - -- local functions - - convVM : Vector R -> Matrix R - -- converts n2-vector to (n,n)-matrix row by row - convMV : Matrix R -> Vector R - -- converts n-square matrix to n2-vector row by row - convVM v == - cond : Matrix(R) := new(n,n,0$R)$M(R) - z : Integer := 0 - for i in 1..n repeat - for j in 1..n repeat - z := z+1 - setelt(cond,i,j,v.z) - cond - - - -- convMV m == - -- vec : Vector(R) := new(n*n,0$R) - -- z : Integer := 0 - -- for i in 1..n repeat - -- for j in 1..n repeat - -- z := z+1 - -- setelt(vec,z,elt(m,i,j)) - -- vec - - - radicalOfLeftTraceForm() == - ma : M R := leftTraceMatrix()$A - map(represents, nullSpace ma)$ListFunctions2(Vector R, A) - - - basisOfLeftAnnihilator a == - ca : M R := transpose (coordinates(a) :: M R) - cond : M R := reduce(vertConcat$(M R), - [ca*transpose(gamma.i) for i in 1..#gamma]) - map(represents, nullSpace cond)$ListFunctions2(Vector R, A) - - basisOfRightAnnihilator a == - ca : M R := transpose (coordinates(a) :: M R) - cond : M R := reduce(vertConcat$(M R), - [ca*(gamma.i) for i in 1..#gamma]) - map(represents, nullSpace cond)$ListFunctions2(Vector R, A) - - basisOfLeftNucloid() == - cond : Matrix(R) := new(n3,n2,0$R)$M(R) - condo: Matrix(R) := new(n3,n2,0$R)$M(R) - z : Integer := 0 - for i in 1..n repeat - for j in 1..n repeat - r1 : Integer := 0 - for k in 1..n repeat - z := z + 1 - -- z equals (i-1)*n*n+(j-1)*n+k (loop-invariant) - r2 : Integer := i - for r in 1..n repeat - r1 := r1 + 1 - -- here r1 equals (k-1)*n+r (loop-invariant) - setelt(cond,z,r1,elt(gamma.r,i,j)) - -- here r2 equals (r-1)*n+i (loop-invariant) - setelt(condo,z,r2,-elt(gamma.k,r,j)) - r2 := r2 + n - [convVM(sol) for sol in nullSpace(cond+condo)] - - basisOfCommutingElements() == - --gamma1 := first gamma - --gamma1 := gamma1 - transpose gamma1 - --cond : Matrix(R) := gamma1 :: Matrix(R) - --for i in 2..n repeat - -- gammak := gamma.i - -- gammak := gammak - transpose gammak - -- cond := vertConcat(cond, gammak :: Matrix(R))$Matrix(R) - --map(represents, nullSpace cond)$ListFunctions2(Vector R, A) - - cond : M R := reduce(vertConcat$(M R), - [(gam := gamma.i) - transpose gam for i in 1..#gamma]) - map(represents, nullSpace cond)$ListFunctions2(Vector R, A) - - basisOfLeftNucleus() == - condi: Matrix(R) := new(n3,n,0$R)$Matrix(R) - z : Integer := 0 - for k in 1..n repeat - for j in 1..n repeat - for s in 1..n repeat - z := z+1 - for i in 1..n repeat - entry : R := 0 - for l in 1..n repeat - entry := entry+elt(gamma.l,j,k)*elt(gamma.s,i,l)_ - -elt(gamma.l,i,j)*elt(gamma.s,l,k) - setelt(condi,z,i,entry)$Matrix(R) - map(represents, nullSpace condi)$ListFunctions2(Vector R,A) - - basisOfRightNucleus() == - condo : Matrix(R) := new(n3,n,0$R)$Matrix(R) - z : Integer := 0 - for k in 1..n repeat - for j in 1..n repeat - for s in 1..n repeat - z := z+1 - for i in 1..n repeat - entry : R := 0 - for l in 1..n repeat - entry := entry+elt(gamma.l,k,i)*elt(gamma.s,j,l) _ - -elt(gamma.l,j,k)*elt(gamma.s,l,i) - setelt(condo,z,i,entry)$Matrix(R) - map(represents, nullSpace condo)$ListFunctions2(Vector R,A) - - basisOfMiddleNucleus() == - conda : Matrix(R) := new(n3,n,0$R)$Matrix(R) - z : Integer := 0 - for k in 1..n repeat - for j in 1..n repeat - for s in 1..n repeat - z := z+1 - for i in 1..n repeat - entry : R := 0 - for l in 1..n repeat - entry := entry+elt(gamma.l,j,i)*elt(gamma.s,l,k) - -elt(gamma.l,i,k)*elt(gamma.s,j,l) - setelt(conda,z,i,entry)$Matrix(R) - map(represents, nullSpace conda)$ListFunctions2(Vector R,A) - - - basisOfNucleus() == - condi: Matrix(R) := new(3*n3,n,0$R)$Matrix(R) - z : Integer := 0 - u : Integer := n3 - w : Integer := 2*n3 - for k in 1..n repeat - for j in 1..n repeat - for s in 1..n repeat - z := z+1 - u := u+1 - w := w+1 - for i in 1..n repeat - entry : R := 0 - enter : R := 0 - ent : R := 0 - for l in 1..n repeat - entry := entry + elt(gamma.l,j,k)*elt(gamma.s,i,l) _ - - elt(gamma.l,i,j)*elt(gamma.s,l,k) - enter := enter + elt(gamma.l,k,i)*elt(gamma.s,j,l) _ - - elt(gamma.l,j,k)*elt(gamma.s,l,i) - ent := ent + elt(gamma.l,j,k)*elt(gamma.s,i,l) _ - - elt(gamma.l,j,i)*elt(gamma.s,l,k) - setelt(condi,z,i,entry)$Matrix(R) - setelt(condi,u,i,enter)$Matrix(R) - setelt(condi,w,i,ent)$Matrix(R) - map(represents, nullSpace condi)$ListFunctions2(Vector R,A) - - basisOfCenter() == - gamma1 := first gamma - gamma1 := gamma1 - transpose gamma1 - cond : Matrix(R) := gamma1 :: Matrix(R) - for i in 2..n repeat - gammak := gamma.i - gammak := gammak - transpose gammak - cond := vertConcat(cond, gammak :: Matrix(R))$Matrix(R) - B := cond :: Matrix(R) - condi: Matrix(R) := new(2*n3,n,0$R)$Matrix(R) - z : Integer := 0 - u : Integer := n3 - for k in 1..n repeat - for j in 1..n repeat - for s in 1..n repeat - z := z+1 - u := u+1 - for i in 1..n repeat - entry : R := 0 - enter : R := 0 - for l in 1..n repeat - entry := entry + elt(gamma.l,j,k)*elt(gamma.s,i,l) _ - - elt(gamma.l,i,j)*elt(gamma.s,l,k) - enter := enter + elt(gamma.l,k,i)*elt(gamma.s,j,l) _ - - elt(gamma.l,j,k)*elt(gamma.s,l,i) - setelt(condi,z,i,entry)$Matrix(R) - setelt(condi,u,i,enter)$Matrix(R) - D := vertConcat(condi,B)$Matrix(R) - map(represents, nullSpace D)$ListFunctions2(Vector R, A) - - basisOfRightNucloid() == - cond : Matrix(R) := new(n3,n2,0$R)$M(R) - condo: Matrix(R) := new(n3,n2,0$R)$M(R) - z : Integer := 0 - for i in 1..n repeat - for j in 1..n repeat - r1 : Integer := 0 - for k in 1..n repeat - z := z + 1 - -- z equals (i-1)*n*n+(j-1)*n+k (loop-invariant) - r2 : Integer := i - for r in 1..n repeat - r1 := r1 + 1 - -- here r1 equals (k-1)*n+r (loop-invariant) - setelt(cond,z,r1,elt(gamma.r,j,i)) - -- here r2 equals (r-1)*n+i (loop-invariant) - setelt(condo,z,r2,-elt(gamma.k,j,r)) - r2 := r2 + n - [convVM(sol) for sol in nullSpace(cond+condo)] - - basisOfCentroid() == - cond : Matrix(R) := new(2*n3,n2,0$R)$M(R) - condo: Matrix(R) := new(2*n3,n2,0$R)$M(R) - z : Integer := 0 - u : Integer := n3 - for i in 1..n repeat - for j in 1..n repeat - r1 : Integer := 0 - for k in 1..n repeat - z := z + 1 - u := u + 1 - -- z equals (i-1)*n*n+(j-1)*n+k (loop-invariant) - -- u equals n**3 + (i-1)*n*n+(j-1)*n+k (loop-invariant) - r2 : Integer := i - for r in 1..n repeat - r1 := r1 + 1 - -- here r1 equals (k-1)*n+r (loop-invariant) - setelt(cond,z,r1,elt(gamma.r,i,j)) - setelt(cond,u,r1,elt(gamma.r,j,i)) - -- here r2 equals (r-1)*n+i (loop-invariant) - setelt(condo,z,r2,-elt(gamma.k,r,j)) - setelt(condo,u,r2,-elt(gamma.k,j,r)) - r2 := r2 + n - [convVM(sol) for sol in nullSpace(cond+condo)] - - - doubleRank x == - cond : Matrix(R) := new(2*n,n,0$R) - for k in 1..n repeat - z : Integer := 0 - u : Integer := n - for j in 1..n repeat - z := z+1 - u := u+1 - entry : R := 0 - enter : R := 0 - for i in 1..n repeat - entry := entry + elt(x,i)*elt(gamma.k,j,i) - enter := enter + elt(x,i)*elt(gamma.k,i,j) - setelt(cond,z,k,entry)$Matrix(R) - setelt(cond,u,k,enter)$Matrix(R) - rank(cond)$(M R) - - weakBiRank(x) == - cond : Matrix(R) := new(n2,n,0$R)$Matrix(R) - z : Integer := 0 - for i in 1..n repeat - for j in 1..n repeat - z := z+1 - for k in 1..n repeat - entry : R := 0 - for l in 1..n repeat - for s in 1..n repeat - entry:=entry+elt(x,l)*elt(gamma.s,i,l)*elt(gamma.k,s,j) - setelt(cond,z,k,entry)$Matrix(R) - rank(cond)$(M R) - - biRank(x) == - cond : Matrix(R) := new(n2+2*n+1,n,0$R)$Matrix(R) - z : Integer := 0 - for j in 1..n repeat - for i in 1..n repeat - z := z+1 - for k in 1..n repeat - entry : R := 0 - for l in 1..n repeat - for s in 1..n repeat - entry:=entry+elt(x,l)*elt(gamma.s,i,l)*elt(gamma.k,s,j) - setelt(cond,z,k,entry)$Matrix(R) - u : Integer := n*n - w : Integer := n*(n+1) - c := n2 + 2*n + 1 - for j in 1..n repeat - u := u+1 - w := w+1 - for k in 1..n repeat - entry : R := 0 - enter : R := 0 - for i in 1..n repeat - entry := entry + elt(x,i)*elt(gamma.k,j,i) - enter := enter + elt(x,i)*elt(gamma.k,i,j) - setelt(cond,u,k,entry)$Matrix(R) - setelt(cond,w,k,enter)$Matrix(R) - setelt(cond,c,j, elt(x,j)) - rank(cond)$(M R) - - leftRank x == - cond : Matrix(R) := new(n,n,0$R) - for k in 1..n repeat - for j in 1..n repeat - entry : R := 0 - for i in 1..n repeat - entry := entry + elt(x,i)*elt(gamma.k,i,j) - setelt(cond,j,k,entry)$Matrix(R) - rank(cond)$(M R) - - rightRank x == - cond : Matrix(R) := new(n,n,0$R) - for k in 1..n repeat - for j in 1..n repeat - entry : R := 0 - for i in 1..n repeat - entry := entry + elt(x,i)*elt(gamma.k,j,i) - setelt(cond,j,k,entry)$Matrix(R) - rank(cond)$(M R) - - - if R has EuclideanDomain then - basis va == - v : V A := remove(zero?, va)$(V A) - v : V A := removeDuplicates v - empty? v => [0$A] - m : Matrix R := coerce(coordinates(v.1))$(Matrix R) - for i in 2..maxIndex v repeat - m := horizConcat(m,coerce(coordinates(v.i))$(Matrix R) ) - m := rowEchelon m - lj : List Integer := [] - h : Integer := 1 - mRI : Integer := maxRowIndex m - mCI : Integer := maxColIndex m - finished? : Boolean := false - j : Integer := 1 - while not finished? repeat - not zero? m(h,j) => -- corner found - lj := cons(j,lj) - h := mRI - while zero? m(h,j) repeat h := h-1 - finished? := (h = mRI) - if not finished? then h := h+1 - if j < mCI then - j := j + 1 - else - finished? := true - [v.j for j in reverse lj] - -@ -\section{package FRNAAF2 FramedNonAssociativeAlgebraFunctions2} -<>= -)abbrev package FRNAAF2 FramedNonAssociativeAlgebraFunctions2 -++ Author: Johannes Grabmeier -++ Date Created: 28 February 1992 -++ Date Last Updated: 28 February 1992 -++ Basic Operations: map -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: non-associative algebra -++ References: -++ Description: -++ FramedNonAssociativeAlgebraFunctions2 implements functions between -++ two framed non associative algebra domains defined over different rings. -++ The function map is used to coerce between algebras over different -++ domains having the same structural constants. - -FramedNonAssociativeAlgebraFunctions2(AR,R,AS,S) : Exports == - Implementation where - R : CommutativeRing - S : CommutativeRing - AR : FramedNonAssociativeAlgebra R - AS : FramedNonAssociativeAlgebra S - V ==> Vector - Exports ==> with - map: (R -> S, AR) -> AS - ++ map(f,u) maps f onto the coordinates of u to get an element - ++ in \spad{AS} via identification of the basis of \spad{AR} - ++ as beginning part of the basis of \spad{AS}. - Implementation ==> add - map(fn : R -> S, u : AR): AS == - rank()$AR > rank()$AS => error("map: ranks of algebras do not fit") - vr : V R := coordinates u - vs : V S := map(fn,vr)$VectorFunctions2(R,S) -@ -This line used to read: -\begin{verbatim} - rank()$AR = rank()$AR => represents(vs)$AS -\end{verbatim} -but the test is clearly always true and cannot be what was intended. -Gregory Vanuxem supplied the fix below. -<>= - rank()$AR = rank()$AS => represents(vs)$AS - ba := basis()$AS - represents(vs,[ba.i for i in 1..rank()$AR]) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -<> -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/newdata.spad.pamphlet b/src/algebra/newdata.spad.pamphlet deleted file mode 100644 index 018f81f..0000000 --- a/src/algebra/newdata.spad.pamphlet +++ /dev/null @@ -1,224 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra newdata.spad} -\author{Themos Tsikas, Marc Moreno Maza} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package IPRNTPK InternalPrintPackage} -Putting (or omitting) the final call to {\bf FORCE-OUPUT} in {\bf iprint} -is controversial: -\begin{verbatim} -Waldek: iprint is used to print (regular) triangular sets. - Unconditional flush defeats buffering optimizations, so IMHO - it should be done only for some streams (for example streams - connected to terminals). - Flushing output should be done when the outupt is complete, - while iprint clearly is used to compose bigger units from small parts. -Tim: unless the princ contains a newline there is no guarantee that - the output will appear. if the output is intended to be a prompt, - for instance, which does not contain a newline then the flush - is needed to force the output to appear. - Deleting the call to flush breaks the existing semantics of the package. -\end{verbatim} -<>= -)abbrev package IPRNTPK InternalPrintPackage -++ Author: Themos Tsikas -++ Date Created: 09/09/1998 -++ Date Last Updated: 09/09/1998 -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: A package to print strings without line-feed -++ nor carriage-return. - -InternalPrintPackage(): Exports == Implementation where - - Exports == with - iprint: String -> Void - ++ \axiom{iprint(s)} prints \axiom{s} at the current position - ++ of the cursor. - - Implementation == add - iprint(s:String) == - PRINC(coerce(s)@Symbol)$Lisp - FORCE_-OUTPUT()$Lisp - -@ -\section{package TBCMPPK TabulatedComputationPackage} -<>= -)abbrev package TBCMPPK TabulatedComputationPackage -++ Author: Marc Moreno Maza -++ Date Created: 09/09/1998 -++ Date Last Updated: 12/16/1998 -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ \axiom{TabulatedComputationPackage(Key ,Entry)} provides some modest support -++ for dealing with operations with type \axiom{Key -> Entry}. The result of -++ such operations can be stored and retrieved with this package by using -++ a hash-table. The user does not need to worry about the management of -++ this hash-table. However, onnly one hash-table is built by calling -++ \axiom{TabulatedComputationPackage(Key ,Entry)}. -++ Version: 2. - -TabulatedComputationPackage(Key ,Entry): Exports == Implementation where - Key: SetCategory - Entry: SetCategory - N ==> NonNegativeInteger - H ==> HashTable(Key, Entry, "UEQUAL") - iprintpack ==> InternalPrintPackage() - - Exports == with - initTable!: () -> Void - ++ \axiom{initTable!()} initializes the hash-table. - printInfo!: (String, String) -> Void - ++ \axiom{printInfo!(x,y)} initializes the mesages to be printed - ++ when manipulating items from the hash-table. If - ++ a key is retrieved then \axiom{x} is displayed. If an item is - ++ stored then \axiom{y} is displayed. - startStats!: (String) -> Void - ++ \axiom{startStats!(x)} initializes the statisitics process and - ++ sets the comments to display when statistics are printed - printStats!: () -> Void - ++ \axiom{printStats!()} prints the statistics. - clearTable!: () -> Void - ++ \axiom{clearTable!()} clears the hash-table and assumes that - ++ it will no longer be used. - usingTable?: () -> Boolean - ++ \axiom{usingTable?()} returns true iff the hash-table is used - printingInfo?: () -> Boolean - ++ \axiom{printingInfo?()} returns true iff messages are printed - ++ when manipulating items from the hash-table. - makingStats?: () -> Boolean - ++ \axiom{makingStats?()} returns true iff the statisitics process - ++ is running. - extractIfCan: Key -> Union(Entry,"failed") - ++ \axiom{extractIfCan(x)} searches the item whose key is \axiom{x}. - insert!: (Key, Entry) -> Void - ++ \axiom{insert!(x,y)} stores the item whose key is \axiom{x} and whose - ++ entry is \axiom{y}. - - Implementation == add - table?: Boolean := false - t: H := empty() - info?: Boolean := false - stats?: Boolean := false - used: NonNegativeInteger := 0 - ok: String := "o" - ko: String := "+" - domainName: String := empty()$String - - initTable!(): Void == - table? := true - t := empty() - void() - printInfo!(s1: String, s2: String): Void == - (empty? s1) or (empty? s2) => void() - not usingTable? => - error "in printInfo!()$TBCMPPK: not allowed to use hashtable" - info? := true - ok := s1 - ko := s2 - void() - startStats!(s: String): Void == - empty? s => void() - not table? => - error "in startStats!()$TBCMPPK: not allowed to use hashtable" - stats? := true - used := 0 - domainName := s - void() - printStats!(): Void == - not table? => - error "in printStats!()$TBCMPPK: not allowed to use hashtable" - not stats? => - error "in printStats!()$TBCMPPK: statistics not started" - output(" ")$OutputPackage - title: String := concat("*** ", concat(domainName," Statistics ***")) - output(title)$OutputPackage - n: N := #t - output(" Table size: ", n::OutputForm)$OutputPackage - output(" Entries reused: ", used::OutputForm)$OutputPackage - clearTable!(): Void == - not table? => - error "in clearTable!()$TBCMPPK: not allowed to use hashtable" - t := empty() - table? := false - info? := false - stats? := false - domainName := empty()$String - void() - usingTable?() == table? - printingInfo?() == info? - makingStats?() == stats? - extractIfCan(k: Key): Union(Entry,"failed") == - not table? => "failed" :: Union(Entry,"failed") - s: Union(Entry,"failed") := search(k,t) - s case Entry => - if info? then iprint(ok)$iprintpack - if stats? then used := used + 1 - return s - "failed" :: Union(Entry,"failed") - insert!(k: Key, e:Entry): Void == - not table? => void() - t.k := e - if info? then iprint(ko)$iprintpack - void() - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/newpoint.spad.pamphlet b/src/algebra/newpoint.spad.pamphlet deleted file mode 100644 index ea9e1ff..0000000 --- a/src/algebra/newpoint.spad.pamphlet +++ /dev/null @@ -1,161 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra newpoint.spad} -\author{The Axiom Team} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package PTPACK PointPackage} -<>= -)abbrev package PTPACK PointPackage -++ Description: -++ This package \undocumented -PointPackage(R:Ring):Exports == Implementation where - - POINT ==> Point(R) - I ==> Integer - PI ==> PositiveInteger - NNI ==> NonNegativeInteger - L ==> List - B ==> Boolean - - Exports == with - xCoord : POINT -> R - ++ xCoord(pt) returns the first element of the point, pt, - ++ although no assumptions are made as to the coordinate - ++ system being used. This function is defined for the - ++ convenience of the user dealing with a Cartesian - ++ coordinate system. - yCoord : POINT -> R - ++ yCoord(pt) returns the second element of the point, pt, - ++ although no assumptions are made as to the coordinate - ++ system being used. This function is defined for the - ++ convenience of the user dealing with a Cartesian - ++ coordinate system. - zCoord : POINT -> R - ++ zCoord(pt) returns the third element of the point, pt, - ++ although no assumptions are made as to the coordinate - ++ system being used. This function is defined for the - ++ convenience of the user dealing with a Cartesian - ++ or a cylindrical coordinate system. - rCoord : POINT -> R - ++ rCoord(pt) returns the first element of the point, pt, - ++ although no assumptions are made as to the coordinate - ++ system being used. This function is defined for the - ++ convenience of the user dealing with a spherical - ++ or a cylindrical coordinate system. - thetaCoord : POINT -> R - ++ thetaCoord(pt) returns the second element of the point, pt, - ++ although no assumptions are made as to the coordinate - ++ system being used. This function is defined for the - ++ convenience of the user dealing with a spherical - ++ or a cylindrical coordinate system. - phiCoord : POINT -> R - ++ phiCoord(pt) returns the third element of the point, pt, - ++ although no assumptions are made as to the coordinate - ++ system being used. This function is defined for the - ++ convenience of the user dealing with a spherical - ++ coordinate system. - color : POINT -> R - ++ color(pt) returns the fourth element of the point, pt, - ++ although no assumptions are made with regards as to - ++ how the components of higher dimensional points are - ++ interpreted. This function is defined for the - ++ convenience of the user using specifically, color - ++ to express a fourth dimension. - hue : POINT -> R - ++ hue(pt) returns the third element of the two dimensional point, pt, - ++ although no assumptions are made with regards as to how the - ++ components of higher dimensional points are interpreted. This - ++ function is defined for the convenience of the user using - ++ specifically, hue to express a third dimension. - shade : POINT -> R - ++ shade(pt) returns the fourth element of the two dimensional - ++ point, pt, although no assumptions are made with regards as to - ++ how the components of higher dimensional points are interpreted. - ++ This function is defined for the convenience of the user using - ++ specifically, shade to express a fourth dimension. - - -- 2D and 3D extraction of data - Implementation ==> add - - xCoord p == elt(p,1) - yCoord p == elt(p,2) - zCoord p == elt(p,3) - rCoord p == elt(p,1) - thetaCoord p == elt(p,2) - phiCoord p == elt(p,3) - color p == - #p > 3 => p.4 - p.3 - hue p == elt(p,3) -- 4D points in 2D using extra dimensions for palette information - shade p == elt(p,4) -- 4D points in 2D using extra dimensions for palette information - -@ -\section{package PTFUNC2 PointFunctions2} -<>= -)abbrev package PTFUNC2 PointFunctions2 -++ Description: -++ This package \undocumented -PointFunctions2(R1:Ring,R2:Ring):Exports == Implementation where - - Exports == with - map : ((R1->R2),Point(R1)) -> Point(R2) - ++ map(f,p) \undocumented - - Implementation ==> add - import Point(R1) - import Point(R2) - - map(mapping,p) == - point([mapping p.(i::PositiveInteger) for i in minIndex(p)..maxIndex(p)])$Point(R2) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/newpoly.spad.pamphlet b/src/algebra/newpoly.spad.pamphlet deleted file mode 100644 index bfe4d01..0000000 --- a/src/algebra/newpoly.spad.pamphlet +++ /dev/null @@ -1,83 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra newpoly.spad} -\author{Marc Moreno Maza} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NSUP2 NewSparseUnivariatePolynomialFunctions2} -<>= -)abbrev package NSUP2 NewSparseUnivariatePolynomialFunctions2 -++ Author: -++ Date Created: -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This package lifts a mapping from coefficient rings R to S to -++ a mapping from sparse univariate polynomial over R to -++ a sparse univariate polynomial over S. -++ Note that the mapping is assumed -++ to send zero to zero, since it will only be applied to the non-zero -++ coefficients of the polynomial. - -NewSparseUnivariatePolynomialFunctions2(R:Ring, S:Ring): with - map:(R->S,NewSparseUnivariatePolynomial R) -> NewSparseUnivariatePolynomial S - ++ \axiom{map(func, poly)} creates a new polynomial by applying func to - ++ every non-zero coefficient of the polynomial poly. - == add - map(f, p) == map(f, p)$UnivariatePolynomialCategoryFunctions2(R, - NewSparseUnivariatePolynomial R, S, NewSparseUnivariatePolynomial S) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/nlinsol.spad.pamphlet b/src/algebra/nlinsol.spad.pamphlet deleted file mode 100644 index f181a47..0000000 --- a/src/algebra/nlinsol.spad.pamphlet +++ /dev/null @@ -1,224 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra nlinsol.spad} -\author{Manuel Bronstein} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package RETSOL RetractSolvePackage} -<>= -)abbrev package RETSOL RetractSolvePackage -++ Author: Manuel Bronstein -++ Date Created: 31 October 1991 -++ Date Last Updated: 31 October 1991 -++ Description: -++ RetractSolvePackage is an interface to \spadtype{SystemSolvePackage} -++ that attempts to retract the coefficients of the equations before -++ solving. - -RetractSolvePackage(Q, R): Exports == Implementation where - Q: IntegralDomain - R: Join(IntegralDomain, RetractableTo Q) - - PQ ==> Polynomial Q - FQ ==> Fraction PQ - SY ==> Symbol - P ==> Polynomial R - F ==> Fraction P - EQ ==> Equation - SSP ==> SystemSolvePackage - - Exports ==> with - solveRetract: (List P, List SY) -> List List EQ F - ++ solveRetract(lp,lv) finds the solutions of the list lp of - ++ rational functions with respect to the list of symbols lv. - ++ The function tries to retract all the coefficients of the equations - ++ to Q before solving if possible. - - Implementation ==> add - LEQQ2F : List EQ FQ -> List EQ F - FQ2F : FQ -> F - PQ2P : PQ -> P - QIfCan : List P -> Union(List FQ, "failed") - PQIfCan: P -> Union(FQ, "failed") - - PQ2P p == map(#1::R, p)$PolynomialFunctions2(Q, R) - FQ2F f == PQ2P numer f / PQ2P denom f - LEQQ2F l == [equation(FQ2F lhs eq, FQ2F rhs eq) for eq in l] - - solveRetract(lp, lv) == - (u := QIfCan lp) case "failed" => - solve([p::F for p in lp]$List(F), lv)$SSP(R) - [LEQQ2F l for l in solve(u::List(FQ), lv)$SSP(Q)] - - QIfCan l == - ans:List(FQ) := empty() - for p in l repeat - (u := PQIfCan p) case "failed" => return "failed" - ans := concat(u::FQ, ans) - ans - - PQIfCan p == - (u := mainVariable p) case "failed" => - (r := retractIfCan(ground p)@Union(Q,"failed")) case Q => r::Q::PQ::FQ - "failed" - up := univariate(p, s := u::SY) - ans:FQ := 0 - while up ^= 0 repeat - (v := PQIfCan leadingCoefficient up) case "failed" => return "failed" - ans := ans + monomial(1, s, degree up)$PQ * (v::FQ) - up := reductum up - ans - -@ -\section{package NLINSOL NonLinearSolvePackage} -<>= -)abbrev package NLINSOL NonLinearSolvePackage -++ Author: Manuel Bronstein -++ Date Created: 31 October 1991 -++ Date Last Updated: 26 June 1992 -++ Description: -++ NonLinearSolvePackage is an interface to \spadtype{SystemSolvePackage} -++ that attempts to retract the coefficients of the equations before -++ solving. The solutions are given in the algebraic closure of R whenever -++ possible. - -NonLinearSolvePackage(R:IntegralDomain): Exports == Implementation where - Z ==> Integer - Q ==> Fraction Z - SY ==> Symbol - P ==> Polynomial R - F ==> Fraction P - EQ ==> Equation F - SSP ==> SystemSolvePackage - SOL ==> RetractSolvePackage - - Exports ==> with - solveInField: (List P, List SY) -> List List EQ - ++ solveInField(lp,lv) finds the solutions of the list lp of - ++ rational functions with respect to the list of symbols lv. - solveInField: List P -> List List EQ - ++ solveInField(lp) finds the solution of the list lp of rational - ++ functions with respect to all the symbols appearing in lp. - solve: (List P, List SY) -> List List EQ - ++ solve(lp,lv) finds the solutions in the algebraic closure of R - ++ of the list lp of - ++ rational functions with respect to the list of symbols lv. - solve: List P -> List List EQ - ++ solve(lp) finds the solution in the algebraic closure of R - ++ of the list lp of rational - ++ functions with respect to all the symbols appearing in lp. - - Implementation ==> add - solveInField l == solveInField(l, "setUnion"/[variables p for p in l]) - - if R has AlgebraicallyClosedField then - import RationalFunction(R) - - expandSol: List EQ -> List List EQ - RIfCan : F -> Union(R, "failed") - addRoot : (EQ, List List EQ) -> List List EQ - allRoots : List P -> List List EQ - evalSol : (List EQ, List EQ) -> List EQ - - solve l == solve(l, "setUnion"/[variables p for p in l]) - solve(lp, lv) == concat([expandSol sol for sol in solveInField(lp, lv)]) - addRoot(eq, l) == [concat(eq, sol) for sol in l] - evalSol(ls, l) == [equation(lhs eq, eval(rhs eq, l)) for eq in ls] - --- converts [p1(a1),...,pn(an)] to --- [[a1=v1,...,an=vn]] where vi ranges over all the zeros of pi - allRoots l == - empty? l => [empty()$List(EQ)] - z := allRoots rest l - s := mainVariable(p := first l)::SY::P::F - concat [addRoot(equation(s, a::P::F), z) for a in zerosOf univariate p] - - expandSol l == - lassign := lsubs := empty()$List(EQ) - luniv := empty()$List(P) - for eq in l repeat - if retractIfCan(lhs eq)@Union(SY, "failed") case SY then - if RIfCan(rhs eq) case R then lassign := concat(eq, lassign) - else lsubs := concat(eq, lsubs) - else - if ((u := retractIfCan(lhs eq)@Union(P, "failed")) case P) and --- one?(# variables(u::P)) and ((r := RIfCan rhs eq) case R) then - ((# variables(u::P)) = 1) and ((r := RIfCan rhs eq) case R) then - luniv := concat(u::P - r::R::P, luniv) - else return [l] - empty? luniv => [l] - [concat(z, concat(evalSol(lsubs,z), lassign)) for z in allRoots luniv] - - RIfCan f == - ((n := retractIfCan(numer f)@Union(R,"failed")) case R) and - ((d := retractIfCan(denom f)@Union(R,"failed")) case R) => n::R / d::R - "failed" - else - solve l == solveInField l - solve(lp, lv) == solveInField(lp, lv) - - -- 'else if' is doubtful with this compiler so all 3 conditions are explicit - if (not(R is Q)) and (R has RetractableTo Q) then - solveInField(lp, lv) == solveRetract(lp, lv)$SOL(Q, R) - - if (not(R is Z)) and (not(R has RetractableTo Q)) and - (R has RetractableTo Z) then - solveInField(lp, lv) == solveRetract(lp, lv)$SOL(Z, R) - - if (not(R is Z)) and (not(R has RetractableTo Q)) and - (not(R has RetractableTo Z)) then - solveInField(lp, lv) == solve([p::F for p in lp]$List(F), lv)$SSP(R) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - --- Compile order for the differential equation solver: --- oderf.spad odealg.spad nlode.spad nlinsol.spad riccati.spad odeef.spad - -<> -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/nlode.spad.pamphlet b/src/algebra/nlode.spad.pamphlet deleted file mode 100644 index 2f7f672..0000000 --- a/src/algebra/nlode.spad.pamphlet +++ /dev/null @@ -1,207 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra nlode.spad} -\author{Manuel Bronstein} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NODE1 NonLinearFirstOrderODESolver} -<>= -)abbrev package NODE1 NonLinearFirstOrderODESolver -++ Author: Manuel Bronstein -++ Date Created: 2 September 1991 -++ Date Last Updated: 14 October 1994 -++ Description: NonLinearFirstOrderODESolver provides a function -++ for finding closed form first integrals of nonlinear ordinary -++ differential equations of order 1. -++ Keywords: differential equation, ODE -NonLinearFirstOrderODESolver(R, F): Exports == Implementation where - R: Join(OrderedSet, EuclideanDomain, RetractableTo Integer, - LinearlyExplicitRingOver Integer, CharacteristicZero) - F: Join(AlgebraicallyClosedFunctionSpace R, TranscendentalFunctionCategory, - PrimitiveFunctionCategory) - - N ==> NonNegativeInteger - Q ==> Fraction Integer - UQ ==> Union(Q, "failed") - OP ==> BasicOperator - SY ==> Symbol - K ==> Kernel F - U ==> Union(F, "failed") - P ==> SparseMultivariatePolynomial(R, K) - REC ==> Record(coef:Q, logand:F) - SOL ==> Record(particular: F,basis: List F) - BER ==> Record(coef1:F, coefn:F, exponent:N) - - Exports ==> with - solve: (F, F, OP, SY) -> U - ++ solve(M(x,y), N(x,y), y, x) returns \spad{F(x,y)} such that - ++ \spad{F(x,y) = c} for a constant \spad{c} is a first integral - ++ of the equation \spad{M(x,y) dx + N(x,y) dy = 0}, or - ++ "failed" if no first-integral can be found. - - Implementation ==> add - import ODEIntegration(R, F) - import ElementaryFunctionODESolver(R, F) -- recursive dependency! - - checkBernoulli : (F, F, K) -> Union(BER, "failed") - solveBernoulli : (BER, OP, SY, F) -> Union(F, "failed") - checkRiccati : (F, F, K) -> Union(List F, "failed") - solveRiccati : (List F, OP, SY, F) -> Union(F, "failed") - partSolRiccati : (List F, OP, SY, F) -> Union(F, "failed") - integratingFactor: (F, F, SY, SY) -> U - - unk := new()$SY - kunk:K := kernel unk - - solve(m, n, y, x) == --- first replace the operator y(x) by a new symbol z in m(x,y) and n(x,y) - lk:List(K) := [retract(yx := y(x::F))@K] - lv:List(F) := [kunk::F] - mm := eval(m, lk, lv) - nn := eval(n, lk, lv) --- put over a common denominator (to balance m and n) - d := lcm(denom mm, denom nn)::F - mm := d * mm - nn := d * nn --- look for an integrating factor mu - (u := integratingFactor(mm, nn, unk, x)) case F => - mu := u::F - mm := mm * mu - nn := nn * mu - eval(int(mm,x) + int(nn-int(differentiate(mm,unk),x), unk),[kunk],[yx]) --- check for Bernoulli equation - (w := checkBernoulli(m, n, k1 := first lk)) case BER => - solveBernoulli(w::BER, y, x, yx) --- check for Riccati equation - (v := checkRiccati(m, n, k1)) case List(F) => - solveRiccati(v::List(F), y, x, yx) - "failed" - --- look for an integrating factor - integratingFactor(m, n, y, x) == --- check first for exactness - zero?(d := differentiate(m, y) - differentiate(n, x)) => 1 --- look for an integrating factor involving x only - not member?(y, variables(f := d / n)) => expint(f, x) --- look for an integrating factor involving y only - not member?(x, variables(f := - d / m)) => expint(f, y) --- room for more techniques later on (e.g. Prelle-Singer etc...) - "failed" - --- check whether the equation is of the form --- dy/dx + p(x)y + q(x)y^N = 0 with N > 1 --- i.e. whether m/n is of the form p(x) y + q(x) y^N --- returns [p, q, N] if the equation is in that form - checkBernoulli(m, n, ky) == - r := denom(f := m / n)::F - (not freeOf?(r, y := ky::F)) - or (d := degree(p := univariate(numer f, ky))) < 2 - or degree(pp := reductum p) ^= 1 or reductum(pp) ^= 0 - or (not freeOf?(a := (leadingCoefficient(pp)::F), y)) - or (not freeOf?(b := (leadingCoefficient(p)::F), y)) => "failed" - [a / r, b / r, d] - --- solves the equation dy/dx + rec.coef1 y + rec.coefn y^rec.exponent = 0 --- the change of variable v = y^{1-n} transforms the above equation to --- dv/dx + (1 - n) p v + (1 - n) q = 0 - solveBernoulli(rec, y, x, yx) == - n1 := 1 - rec.exponent::Integer - deq := differentiate(yx, x) + n1 * rec.coef1 * yx + n1 * rec.coefn - sol := solve(deq, y, x)::SOL -- can always solve for order 1 --- if v = vp + c v0 is the general solution of the linear equation, then --- the general first integral for the Bernoulli equation is --- (y^{1-n} - vp) / v0 = c for any constant c - (yx**n1 - sol.particular) / first(sol.basis) - --- check whether the equation is of the form --- dy/dx + q0(x) + q1(x)y + q2(x)y^2 = 0 --- i.e. whether m/n is a quadratic polynomial in y. --- returns the list [q0, q1, q2] if the equation is in that form - checkRiccati(m, n, ky) == - q := denom(f := m / n)::F - (not freeOf?(q, y := ky::F)) or degree(p := univariate(numer f, ky)) > 2 - or (not freeOf?(a0 := (coefficient(p, 0)::F), y)) - or (not freeOf?(a1 := (coefficient(p, 1)::F), y)) - or (not freeOf?(a2 := (coefficient(p, 2)::F), y)) => "failed" - [a0 / q, a1 / q, a2 / q] - --- solves the equation dy/dx + l.1 + l.2 y + l.3 y^2 = 0 - solveRiccati(l, y, x, yx) == --- get first a particular solution - (u := partSolRiccati(l, y, x, yx)) case "failed" => "failed" --- once a particular solution yp is known, the general solution is of the --- form y = yp + 1/v where v satisfies the linear 1st order equation --- v' - (l.2 + 2 l.3 yp) v = l.3 - deq := differentiate(yx, x) - (l.2 + 2 * l.3 * u::F) * yx - l.3 - gsol := solve(deq, y, x)::SOL -- can always solve for order 1 --- if v = vp + c v0 is the general solution of the above equation, then --- the general first integral for the Riccati equation is --- (1/(y - yp) - vp) / v0 = c for any constant c - (inv(yx - u::F) - gsol.particular) / first(gsol.basis) - --- looks for a particular solution of dy/dx + l.1 + l.2 y + l.3 y^2 = 0 - partSolRiccati(l, y, x, yx) == --- we first do the change of variable y = z / l.3, which transforms --- the equation into dz/dx + l.1 l.3 + (l.2 - l.3'/l.3) z + z^2 = 0 - q0 := l.1 * (l3 := l.3) - q1 := l.2 - differentiate(l3, x) / l3 --- the equation dz/dx + q0 + q1 z + z^2 = 0 is transformed by the change --- of variable z = w'/w into the linear equation w'' + q1 w' + q0 w = 0 - lineq := differentiate(yx, x, 2) + q1 * differentiate(yx, x) + q0 * yx --- should be made faster by requesting a particular nonzero solution only - (not((gsol := solve(lineq, y, x)) case SOL)) - or empty?(bas := (gsol::SOL).basis) => "failed" - differentiate(first bas, x) / (l3 * first bas) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - --- Compile order for the differential equation solver: --- oderf.spad odealg.spad nlode.spad nlinsol.spad riccati.spad odeef.spad - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/npcoef.spad.pamphlet b/src/algebra/npcoef.spad.pamphlet deleted file mode 100644 index ef84222..0000000 --- a/src/algebra/npcoef.spad.pamphlet +++ /dev/null @@ -1,212 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra npcoef.spad} -\author{Patrizia Gianni} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NPCOEF NPCoef} -<>= -)abbrev package NPCOEF NPCoef -++ Author : P.Gianni, revised May 1990 -++ Description: -++ Package for the determination of the coefficients in the lifting -++ process. Used by \spadtype{MultivariateLifting}. -++ This package will work for every euclidean domain R which has property -++ F, i.e. there exists a factor operation in \spad{R[x]}. -NPCoef(BP,E,OV,R,P) : C == T where - - OV : OrderedSet - E : OrderedAbelianMonoidSup - R : EuclideanDomain -- with property "F" - BP : UnivariatePolynomialCategory R - P : PolynomialCategory(R,E,OV) - - Z ==> Integer - NNI ==> NonNegativeInteger - USP ==> SparseUnivariatePolynomial(P) - Term ==> Record(expt:NNI,pcoef:P) - Detc ==> Record(valexp:NNI,valcoef:P,posit:NNI) - VTerm ==> List(Term) - DetCoef ==> Record(deter:List(USP),dterm:List(VTerm), - nfacts:List(BP),nlead:List(P)) - TermC ==> Record(coefu:P,detfacts:List(VTerm)) - TCoef ==> List(TermC) - - C == with - npcoef : (USP,List(BP),List(P)) -> DetCoef - ++ npcoef \undocumented - listexp : BP -> List(NNI) - ++ listexp \undocumented - T == add - - ---- Local Functions ---- - check : (TermC,Vector P) -> Union(Detc,"failed") - buildvect : (List(VTerm),NNI) -> Vector(List(VTerm)) - buildtable : (Vector(P),List(List NNI),List P) -> TCoef - modify : (TCoef,Detc) -> TCoef - constructp : VTerm -> USP - - npcoef(u:USP,factlist:List(BP),leadlist:List(P)) :DetCoef == - detcoef:List(VTerm):=empty();detufact:List(USP):=empty() - lexp:List(List(NNI)):=[listexp(v) for v in factlist] - ulist :Vector(P):=vector [coefficient(u,i) for i in 0..degree u] - tablecoef:=buildtable(ulist,lexp,leadlist) - detcoef:=[[[ep.first,lcu]$Term] for ep in lexp for lcu in leadlist] - ldtcf:=detcoef - lexp:=[ep.rest for ep in lexp] - ndet:NNI:=#factlist - changed:Boolean:=true - ltochange:List(NNI):=empty() - ltodel:List(NNI):=empty() - while changed and ndet^=1 repeat - changed :=false - dt:=#tablecoef - for i in 1..dt while ^changed repeat - (cf:=check(tablecoef.i,ulist)) case "failed" => "next i" - ltochange:=cons(i,ltochange) - celtf:Detc:=cf::Detc - tablecoef:=modify(tablecoef,celtf) - vpos:=celtf.posit - vexp:=celtf.valexp - nterm:=[vexp,celtf.valcoef]$Term - detcoef.vpos:=cons(nterm,detcoef.vpos) - lexp.vpos:=delete(lexp.vpos,position(vexp,lexp.vpos)) - if lexp.vpos=[] then - ltodel:=cons(vpos,ltodel) - ndet:=(ndet-1):NNI - detufact:=cons(constructp(detcoef.vpos),detufact) - changed:=true - for i in ltochange repeat tablecoef:=delete(tablecoef,i) - ltochange:=[] - if ndet=1 then - uu:=u exquo */[pol for pol in detufact] - if uu case "failed" then return - [empty(),ldtcf,factlist,leadlist]$DetCoef - else detufact:=cons(uu::USP,detufact) - else - ltodel:=sort(#1>#2,ltodel) - for i in ltodel repeat - detcoef:=delete(detcoef,i) - factlist:=delete(factlist,i) - leadlist:=delete(leadlist,i) - [detufact,detcoef,factlist,leadlist]$DetCoef - - - check(tterm:TermC,ulist:Vector(P)) : Union(Detc,"failed") == - cfu:P:=1$P;doit:NNI:=0;poselt:NNI:=0;pp:Union(P,"failed") - termlist:List(VTerm):=tterm.detfacts - vterm:VTerm:=empty() - #termlist=1 => - vterm:=termlist.first - for elterm in vterm while doit<2 repeat - (cu1:=elterm.pcoef)^=0 => cfu:=cu1*cfu - doit:=doit+1 - poselt:=position(elterm,vterm):NNI - doit=2 or (pp:=tterm.coefu exquo cfu) case "failed" => "failed" - [vterm.poselt.expt,pp::P,poselt]$Detc - "failed" - - buildvect(lvterm:List(VTerm),n:NNI) : Vector(List(VTerm)) == - vtable:Vector(List(VTerm)):=new(n,empty()) - (#lvterm)=1 => - for term in lvterm.first repeat vtable.(term.expt+1):=[[term]] - vtable - - vtable:=buildvect(lvterm.rest,n) - ntable:Vector(List(VTerm)):=new(n,empty()) - for term in lvterm.first repeat - nexp:=term.expt - for i in 1..n while (nexp+i)<(n+1) repeat - ntable.(nexp+i):=append( - [cons(term,lvterm) for lvterm in vtable.i], - ntable.(nexp+i)) - ntable - - buildtable(vu:Vector(P),lvect:List(List(NNI)),leadlist:List(P)):TCoef== - nfact:NNI:=#leadlist - table:TCoef:=empty() - degu:=(#vu-1)::NNI - prelim:List(VTerm):=[[[e,0$P]$Term for e in lv] for lv in lvect] - for i in 1..nfact repeat prelim.i.first.pcoef:=leadlist.i - partialv:Vector(List(VTerm)):=new(nfact,empty()) - partialv:=buildvect(prelim,degu) - for i in 1..degu repeat - empty? partialv.i => "next i" - table:=cons([vu.i,partialv.i]$TermC, table) - table - - modify(tablecoef:TCoef,cfter:Detc) : TCoef == - cfexp:=cfter.valexp;cfcoef:=cfter.valcoef;cfpos:=cfter.posit - lterase:List(NNI):=empty() - for cterm in tablecoef | ^empty?(ctdet:=cterm.detfacts) repeat - (+/[term.expt for term in ctdet.first]) "next term" - for celt in ctdet repeat - if celt.cfpos.expt=cfexp then - celt.cfpos.pcoef:=cfcoef - if (and/[cc.pcoef ^=0 for cc in celt]) then - k:=position(celt,ctdet):NNI - lterase:=cons(k,lterase) - cterm.coefu:=(cterm.coefu - */[cc.pcoef for cc in celt]) - if not empty? lterase then - lterase:=sort(#1>#2,lterase) - for i in lterase repeat ctdet:=delete(ctdet,i) - cterm.detfacts:=ctdet - lterase:=empty() - tablecoef - - listexp(up:BP) :List(NNI) == - degree up=0 => [0] - [degree up,:listexp(reductum up)] - - constructp(lterm:VTerm):USP == - +/[monomial(term.pcoef,term.expt) for term in lterm] - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/nregset.spad.pamphlet b/src/algebra/nregset.spad.pamphlet deleted file mode 100644 index fe0243d..0000000 --- a/src/algebra/nregset.spad.pamphlet +++ /dev/null @@ -1,253 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra nregset.spad} -\author{Marc Moreno Maza} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NORMPK NormalizationPackage} -<>= -)abbrev package NORMPK NormalizationPackage -++ Author: Marc Moreno Maza -++ Date Created: 09/23/1998 -++ Date Last Updated: 12/16/1998 -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ Description: -++ A package for computing normalized assocites of univariate polynomials -++ with coefficients in a tower of simple extensions of a field.\newline -++ References : -++ [1] D. LAZARD "A new method for solving algebraic systems of -++ positive dimension" Discr. App. Math. 33:147-160,1991 -++ [2] M. MORENO MAZA and R. RIOBOO "Computations of gcd over -++ algebraic towers of simple extensions" In proceedings of AAECC11 -++ Paris, 1995. -++ [3] M. MORENO MAZA "Calculs de pgcd au-dessus des tours -++ d'extensions simples et resolution des systemes d'equations -++ algebriques" These, Universite P.etM. Curie, Paris, 1997. -++ Version: 1. - -NormalizationPackage(R,E,V,P,TS): Exports == Implementation where - - R : GcdDomain - E : OrderedAbelianMonoidSup - V : OrderedSet - P : RecursivePolynomialCategory(R,E,V) - TS : RegularTriangularSetCategory(R,E,V,P) - N ==> NonNegativeInteger - Z ==> Integer - B ==> Boolean - S ==> String - K ==> Fraction R - LP ==> List P - PWT ==> Record(val : P, tower : TS) - - BWT ==> Record(val : Boolean, tower : TS) - LpWT ==> Record(val : (List P), tower : TS) - Split ==> List TS - --KeyGcd ==> Record(arg1: P, arg2: P, arg3: TS, arg4: B) - --EntryGcd ==> List PWT - --HGcd ==> TabulatedComputationPackage(KeyGcd, EntryGcd) - --KeyInvSet ==> Record(arg1: P, arg3: TS) - --EntryInvSet ==> List TS - --HInvSet ==> TabulatedComputationPackage(KeyInvSet, EntryInvSet) - polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P) - regsetgcdpack ==> SquareFreeRegularTriangularSetGcdPackage(R,E,V,P,TS) - - Exports == with - - recip: (P, TS) -> Record(num:P,den:P) - ++ \axiom{recip(p,ts)} returns the inverse of \axiom{p} w.r.t \spad{ts} - ++ assuming that \axiom{p} is invertible w.r.t \spad{ts}. - normalizedAssociate: (P, TS) -> P - ++ \axiom{normalizedAssociate(p,ts)} returns a normalized polynomial - ++ \axiom{n} w.r.t. \spad{ts} such that \axiom{n} and \axiom{p} are - ++ associates w.r.t \spad{ts} and assuming that \axiom{p} is invertible - ++ w.r.t \spad{ts}. - normalize: (P, TS) -> List PWT - ++ \axiom{normalize(p,ts)} normalizes \axiom{p} w.r.t \spad{ts}. - outputArgs: (S, S, P, TS) -> Void - ++ \axiom{outputArgs(s1,s2,p,ts)} - ++ is an internal subroutine, exported only for developement. - normInvertible?: (P, TS) -> List BWT - ++ \axiom{normInvertible?(p,ts)} - ++ is an internal subroutine, exported only for developement. - - Implementation == add - - if TS has SquareFreeRegularTriangularSetCategory(R,E,V,P) - then - - normInvertible?(p:P, ts:TS): List BWT == - stoseInvertible?_sqfreg(p,ts)$regsetgcdpack - - else - - normInvertible?(p:P, ts:TS): List BWT == - stoseInvertible?_reg(p,ts)$regsetgcdpack - - if (R has RetractableTo(Integer)) and (V has ConvertibleTo(Symbol)) - then - - outputArgs(s1:S, s2: S, p:P,ts:TS): Void == - if not empty? s1 then output(s1, p::OutputForm)$OutputPackage - if not empty? s1 then _ - output(s1,(convert(p)@String)::OutputForm)$OutputPackage - output(" ")$OutputPackage - if not empty? s2 then output(s2, ts::OutputForm)$OutputPackage - empty? s2 => void() - output(s2,("[")::OutputForm)$OutputPackage - lp: List P := members(ts) - for q in lp repeat - output((convert(q)@String)::OutputForm)$OutputPackage - output("]")$OutputPackage - output(" ")$OutputPackage - - else - - outputArgs(s1:S, s2: S, p:P,ts:TS): Void == - if not empty? s1 then output(s1, p::OutputForm)$OutputPackage - output(" ")$OutputPackage - if not empty? s2 then output(s2, ts::OutputForm)$OutputPackage - output(" ")$OutputPackage - - recip(p:P,ts:TS): Record(num:P, den:P) == - -- ASSUME p is invertible w.r.t. ts - -- ASSUME mvar(p) is algebraic w.r.t. ts - v := mvar(p) - ts_v := select(ts,v)::P - if mdeg(p) < mdeg(ts_v) - then - hesrg: Record (gcd : P, coef2 : P) := _ - halfExtendedSubResultantGcd2(ts_v,p)$P - d: P := hesrg.gcd; n: P := hesrg.coef2 - else - hesrg: Record (gcd : P, coef1 : P) := _ - halfExtendedSubResultantGcd1(p,ts_v)$P - d: P := hesrg.gcd; n: P := hesrg.coef1 - g := gcd(n,d) - (n, d) := ((n exquo g)::P, (d exquo g)::P) - remn, remd: Record(rnum:R,polnum:P,den:R) - remn := remainder(n,ts); remd := remainder(d,ts) - cn := remn.rnum; pn := remn.polnum; dn := remn.den - cd := remd.rnum; pd := remd.polnum; dp := remd.den - k: K := (cn / cd) * (dp / dn) - pn := removeZero(pn,ts) - pd := removeZero(pd,ts) - [numer(k) * pn, denom(k) * pd]$Record(num:P, den:P) - - normalizedAssociate(p:P,ts:TS): P == - -- ASSUME p is invertible or zero w.r.t. ts - empty? ts => p - zero?(p) => p - ground?(p) => 1 - zero? initiallyReduce(init(p),ts) => - error "in normalizedAssociate$NORMPK: bad #1" - vp := mvar(p) - ip: P := p - mp: P := 1 - tp: P := 0 - while not ground?(ip) repeat - v := mvar(ip) - if algebraic?(v,ts) - then - if v = vp - then - ts_v := select(ts,v)::P - ip := lastSubResultant(ip,ts_v)$P - ip := remainder(ip,ts).polnum - -- ip := primitivePart stronglyReduce(ip,ts) - ip := primitivePart initiallyReduce(ip,ts) - else - qr := recip(ip,ts) - ip := qr.den - tp := qr.num * tp - zero? ip => - outputArgs("p = ", " ts = ",p,ts) - error _ - "in normalizedAssociate$NORMPK: should never happen !" - else - tp := tail(ip) * mp + tp - mp := mainMonomial(ip) * mp - ip := init(ip) - r := ip * mp + tp - r := remainder(r,ts).polnum - -- primitivePart stronglyReduce(r,ts) - primitivePart initiallyReduce(r,ts) - - normalize(p: P, ts: TS): List PWT == - zero? p => [[p,ts]$PWT] - ground? p => [[1,ts]$PWT] - zero? initiallyReduce(init(p),ts) => - error "in normalize$NORMPK: init(#1) reduces to 0 w.r.t. #2" - --output("Entering normalize")$OutputPackage - --outputArgs("p = ", " ts = ",p,ts) - --output("Calling normInvertible?")$OutputPackage - lbwt: List BWT := normInvertible?(p,ts) - --output("Result is: ")$OutputPackage - --output(lbwt::OutputForm)$OutputPackage - lpwt: List PWT := [] - for bwt in lbwt repeat - us := bwt.tower - q := remainder(p,us).polnum - q := removeZero(q,us) - bwt.val => - --output("Calling normalizedAssociate")$OutputPackage - --outputArgs("q = ", " us = ",q,us) - lpwt := cons([normalizedAssociate(q,us)@P,us]$PWT, lpwt) - --output("Leaving normalizedAssociate")$OutputPackage - zero? q => lpwt := cons([0$P,us]$PWT, lpwt) - lpwt := concat(normalize(q,us)@(List PWT),lpwt) - lpwt - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/nsregset.spad.pamphlet b/src/algebra/nsregset.spad.pamphlet deleted file mode 100644 index fb5965a..0000000 --- a/src/algebra/nsregset.spad.pamphlet +++ /dev/null @@ -1,178 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra nsregset.spad} -\author{Marc Moreno Maza} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package LAZM3PK LazardSetSolvingPackage} -<>= -)abbrev package LAZM3PK LazardSetSolvingPackage -++ Author: Marc Moreno Maza -++ Date Created: 10/02/1998 -++ Date Last Updated: 12/16/1998 -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ Description: -++ A package for solving polynomial systems by means of Lazard triangular -++ sets [1]. -++ This package provides two operations. One for solving in the sense -++ of the regular zeros, and the other for solving in the sense of -++ the Zariski closure. Both produce square-free regular sets. -++ Moreover, the decompositions do not contain any redundant component. -++ However, only zero-dimensional regular sets are normalized, since -++ normalization may be time consumming in positive dimension. -++ The decomposition process is that of [2].\newline -++ References : -++ [1] D. LAZARD "A new method for solving algebraic systems of -++ positive dimension" Discr. App. Math. 33:147-160,1991 -++ [2] M. MORENO MAZA "A new algorithm for computing triangular -++ decomposition of algebraic varieties" NAG Tech. Rep. 4/98. -++ Version: 1. - -LazardSetSolvingPackage(R,E,V,P,TS,ST): Exports == Implementation where - - R : GcdDomain - E : OrderedAbelianMonoidSup - V : OrderedSet - P : RecursivePolynomialCategory(R,E,V) - TS: RegularTriangularSetCategory(R,E,V,P) - ST : SquareFreeRegularTriangularSetCategory(R,E,V,P) - N ==> NonNegativeInteger - Z ==> Integer - B ==> Boolean - S ==> String - K ==> Fraction R - LP ==> List P - PWT ==> Record(val : P, tower : TS) - BWT ==> Record(val : Boolean, tower : TS) - LpWT ==> Record(val : (List P), tower : TS) - Split ==> List TS - --KeyGcd ==> Record(arg1: P, arg2: P, arg3: TS, arg4: B) - --EntryGcd ==> List PWT - --HGcd ==> TabulatedComputationPackage(KeyGcd, EntryGcd) - --KeyInvSet ==> Record(arg1: P, arg3: TS) - --EntryInvSet ==> List TS - --HInvSet ==> TabulatedComputationPackage(KeyInvSet, EntryInvSet) - polsetpack ==> PolynomialSetUtilitiesPackage(R,E,V,P) - regsetgcdpack ==> SquareFreeRegularTriangularSetGcdPackage(R,E,V,P,ST) - quasicomppack ==> SquareFreeQuasiComponentPackage(R,E,V,P,ST) - normalizpack ==> NormalizationPackage(R,E,V,P,ST) - - Exports == with - - normalizeIfCan: ST -> ST - ++ \axiom{normalizeIfCan(ts)} returns \axiom{ts} in an normalized shape - ++ if \axiom{ts} is zero-dimensional. - zeroSetSplit: (LP, B) -> List ST - ++ \axiom{zeroSetSplit(lp,clos?)} has the same specifications as - ++ \axiomOpFrom{zeroSetSplit(lp,clos?)}{RegularTriangularSetCategory}. - - Implementation == add - - convert(st: ST): TS == - ts: TS := empty() - lp: LP := members(st)$ST - lp := sort(infRittWu?,lp) - for p in lp repeat - ts := internalAugment(p,ts)$TS - ts - - squareFree(ts: TS): List ST == - empty? ts => [empty()$ST] - lp: LP := members(ts)$TS - lp := sort(infRittWu?,lp) - newts: ST := empty()$ST - toSee: List ST := [newts] - toSave: List ST - for p in lp repeat - toSave := [] - while (not empty? toSee) repeat - us := first toSee; toSee := rest toSee - lpwt := stoseSquareFreePart(p,us)$regsetgcdpack - for pwt in lpwt repeat - newus := internalAugment(pwt.val,pwt.tower)$ST - toSave := cons(newus,toSave) - toSee := toSave - toSave - - normalizeIfCan(ts: ST): ST == - empty? ts => ts - lp: LP := members(ts)$ST - lp := sort(infRittWu?,lp) - p: P := first lp - not univariate?(p)$polsetpack => ts - lp := rest lp - newts: ST := empty()$ST - newts := internalAugment(p,newts)$ST - while (not empty? lp) repeat - p := first lp - lv := variables(p) - for v in lv repeat - v = mvar(p) => "leave" - not algebraic?(v,newts) => return internalAugment(lp,newts)$ST - lp := rest lp - p := normalizedAssociate(p,newts)$normalizpack - newts := internalAugment(p,newts)$ST - newts - - zeroSetSplit(lp:List(P), clos?:B): List ST == - -- if clos? then SOLVE in the closure sense - toSee: Split := zeroSetSplit(lp, clos?)$TS - toSave: List ST := [] - for ts in toSee repeat - toSave := concat(squareFree(ts),toSave) - toSave := removeSuperfluousQuasiComponents(toSave)$quasicomppack - [normalizeIfCan(ts) for ts in toSave] - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/numeigen.spad.pamphlet b/src/algebra/numeigen.spad.pamphlet deleted file mode 100644 index 310fe94..0000000 --- a/src/algebra/numeigen.spad.pamphlet +++ /dev/null @@ -1,413 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra numeigen.spad} -\author{Patrizia Gianni} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package INEP InnerNumericEigenPackage} -<>= -)abbrev package INEP InnerNumericEigenPackage -++ Author:P. Gianni -++ Date Created: Summer 1990 -++ Date Last Updated:Spring 1991 -++ Basic Functions: -++ Related Constructors: ModularField -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This package is the inner package to be used by NumericRealEigenPackage -++ and NumericComplexEigenPackage for the computation of numeric -++ eigenvalues and eigenvectors. -InnerNumericEigenPackage(K,F,Par) : C == T - where - F : Field -- this is the field where the answer will be - -- for dealing with the complex case - K : Field -- type of the input - Par : Join(Field,OrderedRing) -- it will be NF or RN - - SE ==> Symbol() - RN ==> Fraction Integer - I ==> Integer - NF ==> Float - CF ==> Complex Float - GRN ==> Complex RN - GI ==> Complex Integer - PI ==> PositiveInteger - NNI ==> NonNegativeInteger - MRN ==> Matrix RN - - MK ==> Matrix K - PK ==> Polynomial K - MF ==> Matrix F - SUK ==> SparseUnivariatePolynomial K - SUF ==> SparseUnivariatePolynomial F - SUP ==> SparseUnivariatePolynomial - MSUK ==> Matrix SUK - - PEigenForm ==> Record(algpol:SUK,almult:Integer,poleigen:List(MSUK)) - - outForm ==> Record(outval:F,outmult:Integer,outvect:List MF) - - IntForm ==> Union(outForm,PEigenForm) - UFactor ==> (SUK -> Factored SUK) - C == with - - charpol : MK -> SUK - ++ charpol(m) computes the characteristic polynomial of a matrix - ++ m with entries in K. - ++ This function returns a polynomial - ++ over K, while the general one (that is in EiegenPackage) returns - ++ Fraction P K - - solve1 : (SUK, Par) -> List F - ++ solve1(pol, eps) finds the roots of the univariate polynomial - ++ polynomial pol to precision eps. If K is \spad{Fraction Integer} - ++ then only the real roots are returned, if K is - ++ \spad{Complex Fraction Integer} then all roots are found. - - innerEigenvectors : (MK,Par,UFactor) -> List(outForm) - ++ innerEigenvectors(m,eps,factor) computes explicitly - ++ the eigenvalues and the correspondent eigenvectors - ++ of the matrix m. The parameter eps determines the type of - ++ the output, factor is the univariate factorizer to br used - ++ to reduce the characteristic polynomial into irreducible factors. - - T == add - - numeric(r:K):F == - K is RN => - F is NF => convert(r)$RN - F is RN => r - F is CF => r :: RN :: CF - F is GRN => r::RN::GRN - K is GRN => - F is GRN => r - F is CF => convert(convert r) - error "unsupported coefficient type" - - ---- next functions neeeded for defining ModularField ---- - - monicize(f:SUK) : SUK == - (a:=leadingCoefficient f) =1 => f - inv(a)*f - - reduction(u:SUK,p:SUK):SUK == u rem p - - merge(p:SUK,q:SUK):Union(SUK,"failed") == - p = q => p - p = 0 => q - q = 0 => p - "failed" - - exactquo(u:SUK,v:SUK,p:SUK):Union(SUK,"failed") == - val:=extendedEuclidean(v,p,u) - val case "failed" => "failed" - val.coef1 - - ---- eval a vector of F in a radical expression ---- - evalvect(vect:MSUK,alg:F) : MF == - n:=nrows vect - w:MF:=zero(n,1)$MF - for i in 1..n repeat - polf:=map(numeric, - vect(i,1))$UnivariatePolynomialCategoryFunctions2(K,SUK,F,SUF) - v:F:=elt(polf,alg) - setelt(w,i,1,v) - w - - ---- internal function for the computation of eigenvectors ---- - inteigen(A:MK,p:SUK,fact:UFactor) : List(IntForm) == - dimA:NNI:= nrows A - MM:=ModularField(SUK,SUK,reduction,merge,exactquo) - AM:=Matrix(MM) - lff:=factors fact(p) - res: List IntForm :=[] - lr : List MF:=[] - for ff in lff repeat - pol:SUK:= ff.factor - if (degree pol)=1 then - alpha:K:=-coefficient(pol,0)/leadingCoefficient pol - -- compute the eigenvectors, rational case - B1:MK := zero(dimA,dimA)$MK - for i in 1..dimA repeat - for j in 1..dimA repeat B1(i,j):=A(i,j) - B1(i,i):= B1(i,i) - alpha - lr:=[] - for vecr in nullSpace B1 repeat - wf:MF:=zero(dimA,1) - for i in 1..dimA repeat wf(i,1):=numeric vecr.i - lr:=cons(wf,lr) - res:=cons([numeric alpha,ff.exponent,lr]$outForm,res) - else - ppol:=monicize pol - alg:MM:= reduce(monomial(1,1),ppol) - B:AM:= zero(dimA,dimA)$AM - for i in 1..dimA repeat - for j in 1..dimA repeat B(i,j):=reduce(A(i,j) ::SUK,ppol) - B(i,i):=B(i,i) - alg - sln2:=nullSpace B - soln:List MSUK :=[] - for vec in sln2 repeat - wk:MSUK:=zero(dimA,1) - for i in 1..dimA repeat wk(i,1):=(vec.i)::SUK - soln:=cons(wk,soln) - res:=cons([ff.factor,ff.exponent,soln]$PEigenForm, - res) - res - - if K is RN then - solve1(up:SUK, eps:Par) : List(F) == - denom := "lcm"/[denom(c::RN) for c in coefficients up] - up:=denom*up - upi := map(numer,up)$UnivariatePolynomialCategoryFunctions2(RN,SUP RN,I,SUP I) - innerSolve1(upi, eps)$InnerNumericFloatSolvePackage(I,F,Par) - else if K is GRN then - solve1(up:SUK, eps:Par) : List(F) == - denom := "lcm"/[lcm(denom real(c::GRN), denom imag(c::GRN)) - for c in coefficients up] - up:=denom*up - upgi := map(complex(numer(real #1), numer(imag #1)), - up)$UnivariatePolynomialCategoryFunctions2(GRN,SUP GRN,GI,SUP GI) - innerSolve1(upgi, eps)$InnerNumericFloatSolvePackage(GI,F,Par) - else error "unsupported matrix type" - - ---- the real eigenvectors expressed as floats ---- - - innerEigenvectors(A:MK,eps:Par,fact:UFactor) : List outForm == - pol:= charpol A - sln1:List(IntForm):=inteigen(A,pol,fact) - n:=nrows A - sln:List(outForm):=[] - for lev in sln1 repeat - lev case outForm => sln:=cons(lev,sln) - leva:=lev::PEigenForm - lval:List(F):= solve1(leva.algpol,eps) - lvect:=leva.poleigen - lmult:=leva.almult - for alg in lval repeat - nsl:=[alg,lmult,[evalvect(ep,alg) for ep in lvect]]$outForm - sln:=cons(nsl,sln) - sln - - charpol(A:MK) : SUK == - dimA :PI := (nrows A):PI - dimA ^= ncols A => error " The matrix is not square" - B:Matrix SUK :=zero(dimA,dimA) - for i in 1..dimA repeat - for j in 1..dimA repeat B(i,j):=A(i,j)::SUK - B(i,i) := B(i,i) - monomial(1,1)$SUK - determinant B - - -@ -\section{package NREP NumericRealEigenPackage} -<>= -)abbrev package NREP NumericRealEigenPackage -++ Author:P. Gianni -++ Date Created:Summer 1990 -++ Date Last Updated:Spring 1991 -++ Basic Functions: -++ Related Constructors: FloatingRealPackage -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This package computes explicitly eigenvalues and eigenvectors of -++ matrices with entries over the Rational Numbers. -++ The results are expressed as floating numbers or as rational numbers -++ depending on the type of the parameter Par. -NumericRealEigenPackage(Par) : C == T - where - Par : Join(Field,OrderedRing) -- Float or RationalNumber - - SE ==> Symbol() - RN ==> Fraction Integer - I ==> Integer - NF ==> Float - CF ==> Complex Float - GRN ==> Complex RN - GI ==> Complex Integer - PI ==> PositiveInteger - NNI ==> NonNegativeInteger - MRN ==> Matrix RN - - MPar ==> Matrix Par - outForm ==> Record(outval:Par,outmult:Integer,outvect:List MPar) - - C == with - characteristicPolynomial : MRN -> Polynomial RN - ++ characteristicPolynomial(m) returns the characteristic polynomial - ++ of the matrix m expressed as polynomial - ++ over RN with a new symbol as variable. - -- while the function in EigenPackage returns Fraction P RN. - characteristicPolynomial : (MRN,SE) -> Polynomial RN - ++ characteristicPolynomial(m,x) returns the characteristic polynomial - ++ of the matrix m expressed as polynomial - ++ over RN with variable x. - -- while the function in EigenPackage returns - ++ Fraction P RN. - realEigenvalues : (MRN,Par) -> List Par - ++ realEigenvalues(m,eps) computes the eigenvalues of the matrix - ++ m to precision eps. The eigenvalues are expressed as floats or - ++ rational numbers depending on the type of eps (float or rational). - realEigenvectors : (MRN,Par) -> List(outForm) - ++ realEigenvectors(m,eps) returns a list of - ++ records each one containing - ++ a real eigenvalue, its algebraic multiplicity, and a list of - ++ associated eigenvectors. All these results - ++ are computed to precision eps as floats or rational - ++ numbers depending on the type of eps . - - - T == add - - import InnerNumericEigenPackage(RN, Par, Par) - - characteristicPolynomial(m:MRN) : Polynomial RN == - x:SE:=new()$SE - multivariate(charpol(m),x) - - ---- characteristic polynomial of a matrix A ---- - characteristicPolynomial(A:MRN,x:SE):Polynomial RN == - multivariate(charpol(A),x) - - realEigenvalues(m:MRN,eps:Par) : List Par == - solve1(charpol m, eps) - - realEigenvectors(m:MRN,eps:Par) :List outForm == - innerEigenvectors(m,eps,factor$GenUFactorize(RN)) - -@ -\section{package NCEP NumericComplexEigenPackage} -<>= -)abbrev package NCEP NumericComplexEigenPackage -++ Author: P. Gianni -++ Date Created: Summer 1990 -++ Date Last Updated: Spring 1991 -++ Basic Functions: -++ Related Constructors: FloatingComplexPackage -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This package computes explicitly eigenvalues and eigenvectors of -++ matrices with entries over the complex rational numbers. -++ The results are expressed either as complex floating numbers or as -++ complex rational numbers -++ depending on the type of the precision parameter. -NumericComplexEigenPackage(Par) : C == T - where - Par : Join(Field,OrderedRing) -- Float or RationalNumber - - SE ==> Symbol() - RN ==> Fraction Integer - I ==> Integer - NF ==> Float - CF ==> Complex Float - GRN ==> Complex RN - GI ==> Complex Integer - PI ==> PositiveInteger - NNI ==> NonNegativeInteger - MRN ==> Matrix RN - - MCF ==> Matrix CF - MGRN ==> Matrix GRN - MCPar ==> Matrix Complex Par - SUPGRN ==> SparseUnivariatePolynomial GRN - outForm ==> Record(outval:Complex Par,outmult:Integer,outvect:List MCPar) - - C == with - characteristicPolynomial : MGRN -> Polynomial GRN - ++ characteristicPolynomial(m) returns the characteristic polynomial - ++ of the matrix m expressed as polynomial - ++ over complex rationals with a new symbol as variable. - -- while the function in EigenPackage returns Fraction P GRN. - characteristicPolynomial : (MGRN,SE) -> Polynomial GRN - ++ characteristicPolynomial(m,x) returns the characteristic polynomial - ++ of the matrix m expressed as polynomial - ++ over Complex Rationals with variable x. - -- while the function in EigenPackage returns Fraction P GRN. - complexEigenvalues : (MGRN,Par) -> List Complex Par - ++ complexEigenvalues(m,eps) computes the eigenvalues of the matrix - ++ m to precision eps. The eigenvalues are expressed as complex floats or - ++ complex rational numbers depending on the type of eps (float or rational). - complexEigenvectors : (MGRN,Par) -> List(outForm) - ++ complexEigenvectors(m,eps) returns a list of - ++ records each one containing - ++ a complex eigenvalue, its algebraic multiplicity, and a list of - ++ associated eigenvectors. All these results - ++ are computed to precision eps and are expressed as complex floats - ++ or complex rational numbers depending on the type of eps (float or rational). - T == add - - import InnerNumericEigenPackage(GRN,Complex Par,Par) - - characteristicPolynomial(m:MGRN) : Polynomial GRN == - x:SE:=new()$SE - multivariate(charpol m, x) - - ---- characteristic polynomial of a matrix A ---- - characteristicPolynomial(A:MGRN,x:SE):Polynomial GRN == - multivariate(charpol A, x) - - complexEigenvalues(m:MGRN,eps:Par) : List Complex Par == - solve1(charpol m, eps) - - complexEigenvectors(m:MGRN,eps:Par) :List outForm == - innerEigenvectors(m,eps,factor$ComplexFactorization(RN,SUPGRN)) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -<> -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/numeric.spad.pamphlet b/src/algebra/numeric.spad.pamphlet deleted file mode 100644 index cb575e8..0000000 --- a/src/algebra/numeric.spad.pamphlet +++ /dev/null @@ -1,520 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra numeric.spad} -\author{Manuel Bronstein, Mike Dewar} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NUMERIC Numeric} -<>= -)abbrev package NUMERIC Numeric -++ Author: Manuel Bronstein -++ Date Created: 21 Feb 1990 -++ Date Last Updated: 17 August 1995, Mike Dewar -++ 24 January 1997, Miked Dewar (added partial operators) -++ Basic Operations: numeric, complexNumeric, numericIfCan, complexNumericIfCan -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: Numeric provides real and complex numerical evaluation -++ functions for various symbolic types. - -Numeric(S:ConvertibleTo Float): with - numeric: S -> Float - ++ numeric(x) returns a real approximation of x. - numeric: (S, PositiveInteger) -> Float - ++ numeric(x, n) returns a real approximation of x up to n decimal - ++ places. - complexNumeric: S -> Complex Float - ++ complexNumeric(x) returns a complex approximation of x. - complexNumeric: (S, PositiveInteger) -> Complex Float - ++ complexNumeric(x, n) returns a complex approximation of x up - ++ to n decimal places. - if S has CommutativeRing then - complexNumeric: Complex S -> Complex Float - ++ complexNumeric(x) returns a complex approximation of x. - complexNumeric: (Complex S, PositiveInteger) -> Complex Float - ++ complexNumeric(x, n) returns a complex approximation of x up - ++ to n decimal places. - complexNumeric: Polynomial Complex S -> Complex Float - ++ complexNumeric(x) returns a complex approximation of x. - complexNumeric: (Polynomial Complex S, PositiveInteger) -> Complex Float - ++ complexNumeric(x, n) returns a complex approximation of x up - ++ to n decimal places. - if S has Ring then - numeric: Polynomial S -> Float - ++ numeric(x) returns a real approximation of x. - numeric: (Polynomial S, PositiveInteger) -> Float - ++ numeric(x,n) returns a real approximation of x up to n decimal - ++ places. - complexNumeric: Polynomial S -> Complex Float - ++ complexNumeric(x) returns a complex approximation of x. - complexNumeric: (Polynomial S, PositiveInteger) -> Complex Float - ++ complexNumeric(x, n) returns a complex approximation of x - ++ up to n decimal places. - if S has IntegralDomain then - numeric: Fraction Polynomial S -> Float - ++ numeric(x) returns a real approximation of x. - numeric: (Fraction Polynomial S, PositiveInteger) -> Float - ++ numeric(x,n) returns a real approximation of x up to n decimal - ++ places. - complexNumeric: Fraction Polynomial S -> Complex Float - ++ complexNumeric(x) returns a complex approximation of x. - complexNumeric: (Fraction Polynomial S, PositiveInteger) -> Complex Float - ++ complexNumeric(x, n) returns a complex approximation of x - complexNumeric: Fraction Polynomial Complex S -> Complex Float - ++ complexNumeric(x) returns a complex approximation of x. - complexNumeric: (Fraction Polynomial Complex S, PositiveInteger) -> - Complex Float - ++ complexNumeric(x, n) returns a complex approximation of x - ++ up to n decimal places. - if S has OrderedSet then - numeric: Expression S -> Float - ++ numeric(x) returns a real approximation of x. - numeric: (Expression S, PositiveInteger) -> Float - ++ numeric(x, n) returns a real approximation of x up to n - ++ decimal places. - complexNumeric: Expression S -> Complex Float - ++ complexNumeric(x) returns a complex approximation of x. - complexNumeric: (Expression S, PositiveInteger) -> Complex Float - ++ complexNumeric(x, n) returns a complex approximation of x - ++ up to n decimal places. - complexNumeric: Expression Complex S -> Complex Float - ++ complexNumeric(x) returns a complex approximation of x. - complexNumeric: (Expression Complex S, PositiveInteger) -> Complex Float - ++ complexNumeric(x, n) returns a complex approximation of x - ++ up to n decimal places. - if S has CommutativeRing then - complexNumericIfCan: Polynomial Complex S -> Union(Complex Float,"failed") - ++ complexNumericIfCan(x) returns a complex approximation of x, - ++ or "failed" if \axiom{x} is not constant. - complexNumericIfCan: (Polynomial Complex S, PositiveInteger) -> Union(Complex Float,"failed") - ++ complexNumericIfCan(x, n) returns a complex approximation of x up - ++ to n decimal places, or "failed" if \axiom{x} is not a constant. - if S has Ring then - numericIfCan: Polynomial S -> Union(Float,"failed") - ++ numericIfCan(x) returns a real approximation of x, - ++ or "failed" if \axiom{x} is not a constant. - numericIfCan: (Polynomial S, PositiveInteger) -> Union(Float,"failed") - ++ numericIfCan(x,n) returns a real approximation of x up to n decimal - ++ places, or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: Polynomial S -> Union(Complex Float,"failed") - ++ complexNumericIfCan(x) returns a complex approximation of x, - ++ or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: (Polynomial S, PositiveInteger) -> Union(Complex Float,"failed") - ++ complexNumericIfCan(x, n) returns a complex approximation of x - ++ up to n decimal places, or "failed" if \axiom{x} is not a constant. - if S has IntegralDomain then - numericIfCan: Fraction Polynomial S -> Union(Float,"failed") - ++ numericIfCan(x) returns a real approximation of x, - ++ or "failed" if \axiom{x} is not a constant. - numericIfCan: (Fraction Polynomial S, PositiveInteger) -> Union(Float,"failed") - ++ numericIfCan(x,n) returns a real approximation of x up to n decimal - ++ places, or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: Fraction Polynomial S -> Union(Complex Float,"failed") - ++ complexNumericIfCan(x) returns a complex approximation of x, - ++ or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: (Fraction Polynomial S, PositiveInteger) -> Union(Complex Float,"failed") - ++ complexNumericIfCan(x, n) returns a complex approximation of x, - ++ or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: Fraction Polynomial Complex S -> Union(Complex Float,"failed") - ++ complexNumericIfCan(x) returns a complex approximation of x, - ++ or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: (Fraction Polynomial Complex S, PositiveInteger) -> - Union(Complex Float,"failed") - ++ complexNumericIfCan(x, n) returns a complex approximation of x - ++ up to n decimal places, or "failed" if \axiom{x} is not a constant. - if S has OrderedSet then - numericIfCan: Expression S -> Union(Float,"failed") - ++ numericIfCan(x) returns a real approximation of x, - ++ or "failed" if \axiom{x} is not a constant. - numericIfCan: (Expression S, PositiveInteger) -> Union(Float,"failed") - ++ numericIfCan(x, n) returns a real approximation of x up to n - ++ decimal places, or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: Expression S -> Union(Complex Float,"failed") - ++ complexNumericIfCan(x) returns a complex approximation of x, - ++ or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: (Expression S, PositiveInteger) -> - Union(Complex Float,"failed") - ++ complexNumericIfCan(x, n) returns a complex approximation of x - ++ up to n decimal places, or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: Expression Complex S -> Union(Complex Float,"failed") - ++ complexNumericIfCan(x) returns a complex approximation of x, - ++ or "failed" if \axiom{x} is not a constant. - complexNumericIfCan: (Expression Complex S, PositiveInteger) -> - Union(Complex Float,"failed") - ++ complexNumericIfCan(x, n) returns a complex approximation of x - ++ up to n decimal places, or "failed" if \axiom{x} is not a constant. - == add - - if S has CommutativeRing then - complexNumericIfCan(p:Polynomial Complex S) == - p' : Union(Complex(S),"failed") := retractIfCan p - p' case "failed" => "failed" - complexNumeric(p') - - complexNumericIfCan(p:Polynomial Complex S,n:PositiveInteger) == - p' : Union(Complex(S),"failed") := retractIfCan p - p' case "failed" => "failed" - complexNumeric(p',n) - - if S has Ring then - numericIfCan(p:Polynomial S) == - p' : Union(S,"failed") := retractIfCan p - p' case "failed" => "failed" - numeric(p') - - complexNumericIfCan(p:Polynomial S) == - p' : Union(S,"failed") := retractIfCan p - p' case "failed" => "failed" - complexNumeric(p') - - complexNumericIfCan(p:Polynomial S, n:PositiveInteger) == - p' : Union(S,"failed") := retractIfCan p - p' case "failed" => "failed" - complexNumeric(p', n) - - numericIfCan(p:Polynomial S, n:PositiveInteger) == - old := digits(n)$Float - ans := numericIfCan p - digits(old)$Float - ans - - if S has IntegralDomain then - numericIfCan(f:Fraction Polynomial S)== - num := numericIfCan(numer(f)) - num case "failed" => "failed" - den := numericIfCan(denom f) - den case "failed" => "failed" - num/den - - complexNumericIfCan(f:Fraction Polynomial S) == - num := complexNumericIfCan(numer f) - num case "failed" => "failed" - den := complexNumericIfCan(denom f) - den case "failed" => "failed" - num/den - - complexNumericIfCan(f:Fraction Polynomial S, n:PositiveInteger) == - num := complexNumericIfCan(numer f, n) - num case "failed" => "failed" - den := complexNumericIfCan(denom f, n) - den case "failed" => "failed" - num/den - - numericIfCan(f:Fraction Polynomial S, n:PositiveInteger) == - old := digits(n)$Float - ans := numericIfCan f - digits(old)$Float - ans - - complexNumericIfCan(f:Fraction Polynomial Complex S) == - num := complexNumericIfCan(numer f) - num case "failed" => "failed" - den := complexNumericIfCan(denom f) - den case "failed" => "failed" - num/den - - complexNumericIfCan(f:Fraction Polynomial Complex S, n:PositiveInteger) == - num := complexNumericIfCan(numer f, n) - num case "failed" => "failed" - den := complexNumericIfCan(denom f, n) - den case "failed" => "failed" - num/den - - if S has OrderedSet then - numericIfCan(x:Expression S) == - retractIfCan(map(convert, x)$ExpressionFunctions2(S, Float)) - - --s2cs(u:S):Complex(S) == complex(u,0) - - complexNumericIfCan(x:Expression S) == - complexNumericIfCan map(coerce, x)$ExpressionFunctions2(S,Complex S) - - numericIfCan(x:Expression S, n:PositiveInteger) == - old := digits(n)$Float - x' : Expression Float := map(convert, x)$ExpressionFunctions2(S, Float) - ans : Union(Float,"failed") := retractIfCan x' - digits(old)$Float - ans - - complexNumericIfCan(x:Expression S, n:PositiveInteger) == - old := digits(n)$Float - x' : Expression Complex S := map(coerce, x)$ExpressionFunctions2(S, Complex S) - ans : Union(Complex Float,"failed") := complexNumericIfCan(x') - digits(old)$Float - ans - - if S has RealConstant then - complexNumericIfCan(x:Expression Complex S) == - retractIfCan(map(convert, x)$ExpressionFunctions2(Complex S,Complex Float)) - - complexNumericIfCan(x:Expression Complex S, n:PositiveInteger) == - old := digits(n)$Float - x' : Expression Complex Float := - map(convert, x)$ExpressionFunctions2(Complex S,Complex Float) - ans : Union(Complex Float,"failed") := retractIfCan x' - digits(old)$Float - ans - else - convert(x:Complex S):Complex(Float)==map(convert,x)$ComplexFunctions2(S,Float) - - complexNumericIfCan(x:Expression Complex S) == - retractIfCan(map(convert, x)$ExpressionFunctions2(Complex S,Complex Float)) - - complexNumericIfCan(x:Expression Complex S, n:PositiveInteger) == - old := digits(n)$Float - x' : Expression Complex Float := - map(convert, x)$ExpressionFunctions2(Complex S,Complex Float) - ans : Union(Complex Float,"failed") := retractIfCan x' - digits(old)$Float - ans - numeric(s:S) == convert(s)@Float - - if S has ConvertibleTo Complex Float then - complexNumeric(s:S) == convert(s)@Complex(Float) - - complexNumeric(s:S, n:PositiveInteger) == - old := digits(n)$Float - ans := complexNumeric s - digits(old)$Float - ans - - else - complexNumeric(s:S) == convert(s)@Float :: Complex(Float) - - complexNumeric(s:S,n:PositiveInteger) == - numeric(s, n)::Complex(Float) - - if S has CommutativeRing then - complexNumeric(p:Polynomial Complex S) == - p' : Union(Complex(S),"failed") := retractIfCan p - p' case "failed" => - error "Cannot compute the numerical value of a non-constant polynomial" - complexNumeric(p') - - complexNumeric(p:Polynomial Complex S,n:PositiveInteger) == - p' : Union(Complex(S),"failed") := retractIfCan p - p' case "failed" => - error "Cannot compute the numerical value of a non-constant polynomial" - complexNumeric(p',n) - - if S has RealConstant then - complexNumeric(s:Complex S) == convert(s)$Complex(S) - - complexNumeric(s:Complex S, n:PositiveInteger) == - old := digits(n)$Float - ans := complexNumeric s - digits(old)$Float - ans - - else if Complex(S) has ConvertibleTo(Complex Float) then - complexNumeric(s:Complex S) == convert(s)@Complex(Float) - - complexNumeric(s:Complex S, n:PositiveInteger) == - old := digits(n)$Float - ans := complexNumeric s - digits(old)$Float - ans - - else - complexNumeric(s:Complex S) == - s' : Union(S,"failed") := retractIfCan s - s' case "failed" => - error "Cannot compute the numerical value of a non-constant object" - complexNumeric(s') - - complexNumeric(s:Complex S, n:PositiveInteger) == - s' : Union(S,"failed") := retractIfCan s - s' case "failed" => - error "Cannot compute the numerical value of a non-constant object" - old := digits(n)$Float - ans := complexNumeric s' - digits(old)$Float - ans - - numeric(s:S, n:PositiveInteger) == - old := digits(n)$Float - ans := numeric s - digits(old)$Float - ans - - if S has Ring then - numeric(p:Polynomial S) == - p' : Union(S,"failed") := retractIfCan p - p' case "failed" => error - "Can only compute the numerical value of a constant, real-valued polynomial" - numeric(p') - - complexNumeric(p:Polynomial S) == - p' : Union(S,"failed") := retractIfCan p - p' case "failed" => - error "Cannot compute the numerical value of a non-constant polynomial" - complexNumeric(p') - - complexNumeric(p:Polynomial S, n:PositiveInteger) == - p' : Union(S,"failed") := retractIfCan p - p' case "failed" => - error "Cannot compute the numerical value of a non-constant polynomial" - complexNumeric(p', n) - - numeric(p:Polynomial S, n:PositiveInteger) == - old := digits(n)$Float - ans := numeric p - digits(old)$Float - ans - - if S has IntegralDomain then - numeric(f:Fraction Polynomial S)== - numeric(numer(f)) / numeric(denom f) - - complexNumeric(f:Fraction Polynomial S) == - complexNumeric(numer f)/complexNumeric(denom f) - - complexNumeric(f:Fraction Polynomial S, n:PositiveInteger) == - complexNumeric(numer f, n)/complexNumeric(denom f, n) - - numeric(f:Fraction Polynomial S, n:PositiveInteger) == - old := digits(n)$Float - ans := numeric f - digits(old)$Float - ans - - complexNumeric(f:Fraction Polynomial Complex S) == - complexNumeric(numer f)/complexNumeric(denom f) - - complexNumeric(f:Fraction Polynomial Complex S, n:PositiveInteger) == - complexNumeric(numer f, n)/complexNumeric(denom f, n) - - if S has OrderedSet then - numeric(x:Expression S) == - x' : Union(Float,"failed") := - retractIfCan(map(convert, x)$ExpressionFunctions2(S, Float)) - x' case "failed" => error - "Can only compute the numerical value of a constant, real-valued Expression" - x' - - complexNumeric(x:Expression S) == - x' : Union(Complex Float,"failed") := retractIfCan( - map(complexNumeric, x)$ExpressionFunctions2(S,Complex Float)) - x' case "failed" => - error "Cannot compute the numerical value of a non-constant expression" - x' - - numeric(x:Expression S, n:PositiveInteger) == - old := digits(n)$Float - x' : Expression Float := map(convert, x)$ExpressionFunctions2(S, Float) - ans : Union(Float,"failed") := retractIfCan x' - digits(old)$Float - ans case "failed" => error - "Can only compute the numerical value of a constant, real-valued Expression" - ans - - complexNumeric(x:Expression S, n:PositiveInteger) == - old := digits(n)$Float - x' : Expression Complex Float := - map(complexNumeric, x)$ExpressionFunctions2(S,Complex Float) - ans : Union(Complex Float,"failed") := retractIfCan x' - digits(old)$Float - ans case "failed" => - error "Cannot compute the numerical value of a non-constant expression" - ans - - complexNumeric(x:Expression Complex S) == - x' : Union(Complex Float,"failed") := retractIfCan( - map(complexNumeric, x)$ExpressionFunctions2(Complex S,Complex Float)) - x' case "failed" => - error "Cannot compute the numerical value of a non-constant expression" - x' - - complexNumeric(x:Expression Complex S, n:PositiveInteger) == - old := digits(n)$Float - x' : Expression Complex Float := - map(complexNumeric, x)$ExpressionFunctions2(Complex S,Complex Float) - ans : Union(Complex Float,"failed") := retractIfCan x' - digits(old)$Float - ans case "failed" => - error "Cannot compute the numerical value of a non-constant expression" - ans - -@ -\section{package DRAWHACK DrawNumericHack} -<>= -)abbrev package DRAWHACK DrawNumericHack -++ Author: Manuel Bronstein -++ Date Created: 21 Feb 1990 -++ Date Last Updated: 21 Feb 1990 -++ Basic Operations: coerce -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: Hack for the draw interface. DrawNumericHack provides -++ a "coercion" from something of the form \spad{x = a..b} where \spad{a} -++ and b are -++ formal expressions to a binding of the form \spad{x = c..d} where c and d -++ are the numerical values of \spad{a} and b. This "coercion" fails if -++ \spad{a} and b contains symbolic variables, but is meant for expressions -++ involving %pi. -++ NOTE: This is meant for internal use only. - -DrawNumericHack(R:Join(OrderedSet,IntegralDomain,ConvertibleTo Float)): - with coerce: SegmentBinding Expression R -> SegmentBinding Float - ++ coerce(x = a..b) returns \spad{x = c..d} where c and d are the - ++ numerical values of \spad{a} and b. - == add - coerce s == - map(numeric$Numeric(R),s)$SegmentBindingFunctions2(Expression R, Float) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/numode.spad.pamphlet b/src/algebra/numode.spad.pamphlet deleted file mode 100644 index 4de1cf2..0000000 --- a/src/algebra/numode.spad.pamphlet +++ /dev/null @@ -1,410 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra numode.spad} -\author{Yurij Baransky} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NUMODE NumericalOrdinaryDifferentialEquations} -<>= -)abbrev package NUMODE NumericalOrdinaryDifferentialEquations -++ Author: Yurij Baransky -++ Date Created: October 90 -++ Date Last Updated: October 90 -++ Basic Operations: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This package is a suite of functions for the numerical integration of an -++ ordinary differential equation of n variables: -++ -++ \center{dy/dx = f(y,x)\space{5}y is an n-vector} -++ -++ \par All the routines are based on a 4-th order Runge-Kutta kernel. -++ These routines generally have as arguments: -++ n, the number of dependent variables; -++ x1, the initial point; -++ h, the step size; -++ y, a vector of initial conditions of length n which upon exit contains the solution at \spad{x1 + h}; -++ \spad{derivs}, a function which computes the right hand side of the -++ ordinary differential equation: \spad{derivs(dydx,y,x)} computes \spad{dydx}, -++ a vector which contains the derivative information. -++ -++ \par In order of increasing complexity:\begin{items} -++ -++ \item \spad{rk4(y,n,x1,h,derivs)} advances the solution vector to -++ \spad{x1 + h} and return the values in y. -++ -++ \item \spad{rk4(y,n,x1,h,derivs,t1,t2,t3,t4)} is the same as -++ \spad{rk4(y,n,x1,h,derivs)} except that you must provide 4 scratch -++ arrays t1-t4 of size n. -++ -++ \item Starting with y at x1, \spad{rk4f(y,n,x1,x2,ns,derivs)} -++ uses \spad{ns} fixed -++ steps of a 4-th order Runge-Kutta integrator to advance the -++ solution vector to x2 and return the values in y. -++ Argument x2, is the final point, and -++ \spad{ns}, the number of steps to take. -++ -++ \item \spad{rk4qc(y,n,x1,step,eps,yscal,derivs)} takes a 5-th order -++ Runge-Kutta step with monitoring -++ of local truncation to ensure accuracy and adjust stepsize. -++ The function takes two half steps and one full step and scales -++ the difference in solutions at the final point. If the error is -++ within \spad{eps}, the step is taken and the result is returned. -++ If the error is not within \spad{eps}, the stepsize if decreased -++ and the procedure is tried again until the desired accuracy is -++ reached. Upon input, an trial step size must be given and upon -++ return, an estimate of the next step size to use is returned as -++ well as the step size which produced the desired accuracy. -++ The scaled error is computed as -++ \center{\spad{error = MAX(ABS((y2steps(i) - y1step(i))/yscal(i)))}} -++ and this is compared against \spad{eps}. If this is greater -++ than \spad{eps}, the step size is reduced accordingly to -++ \center{\spad{hnew = 0.9 * hdid * (error/eps)**(-1/4)}} -++ If the error criterion is satisfied, then we check if the -++ step size was too fine and return a more efficient one. If -++ \spad{error > \spad{eps} * (6.0E-04)} then the next step size should be -++ \center{\spad{hnext = 0.9 * hdid * (error/\spad{eps})**(-1/5)}} -++ Otherwise \spad{hnext = 4.0 * hdid} is returned. -++ A more detailed discussion of this and related topics can be -++ found in the book "Numerical Recipies" by W.Press, B.P. Flannery, -++ S.A. Teukolsky, W.T. Vetterling published by Cambridge University Press. -++ Argument \spad{step} is a record of 3 floating point -++ numbers \spad{(try , did , next)}, -++ \spad{eps} is the required accuracy, -++ \spad{yscal} is the scaling vector for the difference in solutions. -++ On input, \spad{step.try} should be the guess at a step -++ size to achieve the accuracy. -++ On output, \spad{step.did} contains the step size which achieved the -++ accuracy and \spad{step.next} is the next step size to use. -++ -++ \item \spad{rk4qc(y,n,x1,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6,t7)} is the -++ same as \spad{rk4qc(y,n,x1,step,eps,yscal,derivs)} except that the user -++ must provide the 7 scratch arrays \spad{t1-t7} of size n. -++ -++ \item \spad{rk4a(y,n,x1,x2,eps,h,ns,derivs)} -++ is a driver program which uses \spad{rk4qc} to integrate n ordinary -++ differential equations starting at x1 to x2, keeping the local -++ truncation error to within \spad{eps} by changing the local step size. -++ The scaling vector is defined as -++ \center{\spad{yscal(i) = abs(y(i)) + abs(h*dydx(i)) + tiny}} -++ where \spad{y(i)} is the solution at location x, \spad{dydx} is the -++ ordinary differential equation's right hand side, h is the current -++ step size and \spad{tiny} is 10 times the -++ smallest positive number representable. -++ The user must supply an estimate for a trial step size and -++ the maximum number of calls to \spad{rk4qc} to use. -++ Argument x2 is the final point, -++ \spad{eps} is local truncation, -++ \spad{ns} is the maximum number of call to \spad{rk4qc} to use. -++ \end{items} -NumericalOrdinaryDifferentialEquations(): Exports == Implementation where - L ==> List - V ==> Vector - B ==> Boolean - I ==> Integer - E ==> OutputForm - NF ==> Float - NNI ==> NonNegativeInteger - VOID ==> Void - OFORM ==> OutputForm - RK4STEP ==> Record(try:NF, did:NF, next:NF) - - Exports ==> with ---header definitions here - rk4 : (V NF,I,NF,NF, (V NF,V NF,NF) -> VOID) -> VOID - ++ rk4(y,n,x1,h,derivs) uses a 4-th order Runge-Kutta method - ++ to numerically integrate the ordinary differential equation - ++ {\em dy/dx = f(y,x)} of n variables, where y is an n-vector. - ++ Argument y is a vector of initial conditions of length n which upon exit - ++ contains the solution at \spad{x1 + h}, n is the number of dependent - ++ variables, x1 is the initial point, h is the step size, and - ++ \spad{derivs} is a function which computes the right hand side of the - ++ ordinary differential equation. - ++ For details, see \spadtype{NumericalOrdinaryDifferentialEquations}. - rk4 : (V NF,I,NF,NF, (V NF,V NF,NF) -> VOID - ,V NF,V NF,V NF,V NF) -> VOID - ++ rk4(y,n,x1,h,derivs,t1,t2,t3,t4) is the same as - ++ \spad{rk4(y,n,x1,h,derivs)} except that you must provide 4 scratch - ++ arrays t1-t4 of size n. - ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. - rk4a : (V NF,I,NF,NF,NF,NF,I,(V NF,V NF,NF) -> VOID ) -> VOID - ++ rk4a(y,n,x1,x2,eps,h,ns,derivs) is a driver function for the - ++ numerical integration of an ordinary differential equation - ++ {\em dy/dx = f(y,x)} of n variables, where y is an n-vector - ++ using a 4-th order Runge-Kutta method. - ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. - rk4qc : (V NF,I,NF,RK4STEP,NF,V NF,(V NF,V NF,NF) -> VOID) -> VOID - ++ rk4qc(y,n,x1,step,eps,yscal,derivs) is a subfunction for the - ++ numerical integration of an ordinary differential equation - ++ {\em dy/dx = f(y,x)} of n variables, where y is an n-vector - ++ using a 4-th order Runge-Kutta method. - ++ This function takes a 5-th order Runge-Kutta step with monitoring - ++ of local truncation to ensure accuracy and adjust stepsize. - ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. - rk4qc : (V NF,I,NF,RK4STEP,NF,V NF,(V NF,V NF,NF) -> VOID - ,V NF,V NF,V NF,V NF,V NF,V NF,V NF) -> VOID - ++ rk4qc(y,n,x1,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6,t7) is a subfunction for the - ++ numerical integration of an ordinary differential equation - ++ {\em dy/dx = f(y,x)} of n variables, where y is an n-vector - ++ using a 4-th order Runge-Kutta method. - ++ This function takes a 5-th order Runge-Kutta step with monitoring - ++ of local truncation to ensure accuracy and adjust stepsize. - ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. - rk4f : (V NF,I,NF,NF,I,(V NF,V NF,NF) -> VOID ) -> VOID - ++ rk4f(y,n,x1,x2,ns,derivs) uses a 4-th order Runge-Kutta method - ++ to numerically integrate the ordinary differential equation - ++ {\em dy/dx = f(y,x)} of n variables, where y is an n-vector. - ++ Starting with y at x1, this function uses \spad{ns} fixed - ++ steps of a 4-th order Runge-Kutta integrator to advance the - ++ solution vector to x2 and return the values in y. - ++ For details, see \con{NumericalOrdinaryDifferentialEquations}. - - Implementation ==> add - --some local function definitions here - rk4qclocal : (V NF,V NF,I,NF,RK4STEP,NF,V NF,(V NF,V NF,NF) -> VOID - ,V NF,V NF,V NF,V NF,V NF,V NF) -> VOID - rk4local : (V NF,V NF,I,NF,NF,V NF,(V NF,V NF,NF) -> VOID - ,V NF,V NF,V NF) -> VOID - import OutputPackage - ------------------------------------------------------------- - - rk4a(ystart,nvar,x1,x2,eps,htry,nstep,derivs) == - y : V NF := new(nvar::NNI,0.0) - yscal : V NF := new(nvar::NNI,1.0) - dydx : V NF := new(nvar::NNI,0.0) - t1 : V NF := new(nvar::NNI,0.0) - t2 : V NF := new(nvar::NNI,0.0) - t3 : V NF := new(nvar::NNI,0.0) - t4 : V NF := new(nvar::NNI,0.0) - t5 : V NF := new(nvar::NNI,0.0) - t6 : V NF := new(nvar::NNI,0.0) - step : RK4STEP := [htry,0.0,0.0] - x : NF := x1 - tiny : NF := 10.0**(-(digits()+1)::I) - m : I := nvar - outlist : L OFORM := [x::E,x::E,x::E] - i : I - iter : I - - eps := 1.0/eps - for i in 1..m repeat - y(i) := ystart(i) - for iter in 1..nstep repeat ---compute the derivative - derivs(dydx,y,x) ---if overshoot, the set h accordingly - if (x + step.try - x2) > 0.0 then - step.try := x2 - x ---find the correct scaling - for i in 1..m repeat - yscal(i) := abs(y(i)) + abs(step.try * dydx(i)) + tiny ---take a quality controlled runge-kutta step - rk4qclocal(y,dydx,nvar,x,step,eps,yscal,derivs - ,t1,t2,t3,t4,t5,t6) - x := x + step.did --- outlist.0 := x::E --- outlist.1 := y(0)::E --- outlist.2 := y(1)::E --- output(blankSeparate(outlist)::E) ---check to see if done - if (x-x2) >= 0.0 then - leave ---next stepsize to use - step.try := step.next ---end nstep repeat - if iter = (nstep+1) then - output("ode: ERROR ") - outlist.1 := nstep::E - outlist.2 := " steps to small, last h = "::E - outlist.3 := step.did::E - output(blankSeparate(outlist)) - output(" y= ",y::E) - for i in 1..m repeat - ystart(i) := y(i) - ----------------------------------------------------------------- - - rk4qc(y,n,x,step,eps,yscal,derivs) == - t1 : V NF := new(n::NNI,0.0) - t2 : V NF := new(n::NNI,0.0) - t3 : V NF := new(n::NNI,0.0) - t4 : V NF := new(n::NNI,0.0) - t5 : V NF := new(n::NNI,0.0) - t6 : V NF := new(n::NNI,0.0) - t7 : V NF := new(n::NNI,0.0) - derivs(t7,y,x) - eps := 1.0/eps - rk4qclocal(y,t7,n,x,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6) - --------------------------------------------------------- - - rk4qc(y,n,x,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6,dydx) == - derivs(dydx,y,x) - eps := 1.0/eps - rk4qclocal(y,dydx,n,x,step,eps,yscal,derivs,t1,t2,t3,t4,t5,t6) - --------------------------------------------------------- - - rk4qclocal(y,dydx,n,x,step,eps,yscal,derivs - ,t1,t2,t3,ysav,dysav,ytemp) == - xsav : NF := x - h : NF := step.try - fcor : NF := 1.0/15.0 - safety : NF := 0.9 - grow : NF := -0.20 - shrink : NF := -0.25 - errcon : NF := 0.6E-04 --(this is 4/safety)**(1/grow) - hh : NF - errmax : NF - i : I - m : I := n --- - for i in 1..m repeat - dysav(i) := dydx(i) - ysav(i) := y(i) ---cut down step size till error criterion is met - repeat ---take two little steps to get to x + h - hh := 0.5 * h - rk4local(ysav,dysav,n,xsav,hh,ytemp,derivs,t1,t2,t3) - x := xsav + hh - derivs(dydx,ytemp,x) - rk4local(ytemp,dydx,n,x,hh,y,derivs,t1,t2,t3) - x := xsav + h ---take one big step get to x + h - rk4local(ysav,dysav,n,xsav,h,ytemp,derivs,t1,t2,t3) - ---compute the maximum scaled difference - errmax := 0.0 - for i in 1..m repeat - ytemp(i) := y(i) - ytemp(i) - errmax := max(errmax,abs(ytemp(i)/yscal(i))) ---scale relative to required accuracy - errmax := errmax * eps ---update integration stepsize - if (errmax > 1.0) then - h := safety * h * (errmax ** shrink) - else - step.did := h - if errmax > errcon then - step.next := safety * h * (errmax ** grow) - else - step.next := 4 * h - leave ---make fifth order with 4-th order error estimate - for i in 1..m repeat - y(i) := y(i) + ytemp(i) * fcor - --------------------------------------------- - - rk4f(y,nvar,x1,x2,nstep,derivs) == - yt : V NF := new(nvar::NNI,0.0) - dyt : V NF := new(nvar::NNI,0.0) - dym : V NF := new(nvar::NNI,0.0) - dydx : V NF := new(nvar::NNI,0.0) - ynew : V NF := new(nvar::NNI,0.0) - h : NF := (x2-x1) / (nstep::NF) - x : NF := x1 - i : I - j : I --- start integrating - for i in 1..nstep repeat - derivs(dydx,y,x) - rk4local(y,dydx,nvar,x,h,y,derivs,yt,dyt,dym) - x := x + h - --------------------------------------------------------- - - rk4(y,n,x,h,derivs) == - t1 : V NF := new(n::NNI,0.0) - t2 : V NF := new(n::NNI,0.0) - t3 : V NF := new(n::NNI,0.0) - t4 : V NF := new(n::NNI,0.0) - derivs(t1,y,x) - rk4local(y,t1,n,x,h,y,derivs,t2,t3,t4) - ------------------------------------------------------------- - - rk4(y,n,x,h,derivs,t1,t2,t3,t4) == - derivs(t1,y,x) - rk4local(y,t1,n,x,h,y,derivs,t2,t3,t4) - ------------------------------------------------------------- - - rk4local(y,dydx,n,x,h,yout,derivs,yt,dyt,dym) == - hh : NF := h*0.5 - h6 : NF := h/6.0 - xh : NF := x+hh - m : I := n - i : I --- first step - for i in 1..m repeat - yt(i) := y(i) + hh*dydx(i) --- second step - derivs(dyt,yt,xh) - for i in 1..m repeat - yt(i) := y(i) + hh*dyt(i) --- third step - derivs(dym,yt,xh) - for i in 1..m repeat - yt(i) := y(i) + h*dym(i) - dym(i) := dyt(i) + dym(i) --- fourth step - derivs(dyt,yt,x+h) - for i in 1..m repeat - yout(i) := y(i) + h6*( dydx(i) + 2.0*dym(i) + dyt(i) ) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/numquad.spad.pamphlet b/src/algebra/numquad.spad.pamphlet deleted file mode 100644 index 7998742..0000000 --- a/src/algebra/numquad.spad.pamphlet +++ /dev/null @@ -1,600 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra numquad.spad} -\author{Yurij Baransky} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NUMQUAD NumericalQuadrature} -<>= -)abbrev package NUMQUAD NumericalQuadrature -++ Author: Yurij A. Baransky -++ Date Created: October 90 -++ Date Last Updated: October 90 -++ Basic Operations: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This suite of routines performs numerical quadrature using -++ algorithms derived from the basic trapezoidal rule. Because -++ the error term of this rule contains only even powers of the -++ step size (for open and closed versions), fast convergence -++ can be obtained if the integrand is sufficiently smooth. -++ -++ Each routine returns a Record of type TrapAns, which contains\indent{3} -++ \newline value (\spadtype{Float}):\tab{20} estimate of the integral -++ \newline error (\spadtype{Float}):\tab{20} estimate of the error in the computation -++ \newline totalpts (\spadtype{Integer}):\tab{20} total number of function evaluations -++ \newline success (\spadtype{Boolean}):\tab{20} if the integral was computed within the user specified error criterion -++ \indent{0}\indent{0} -++ To produce this estimate, each routine generates an internal -++ sequence of sub-estimates, denoted by {\em S(i)}, depending on the -++ routine, to which the various convergence criteria are applied. -++ The user must supply a relative accuracy, \spad{eps_r}, and an absolute -++ accuracy, \spad{eps_a}. Convergence is obtained when either -++ \center{\spad{ABS(S(i) - S(i-1)) < eps_r * ABS(S(i-1))}} -++ \center{or \spad{ABS(S(i) - S(i-1)) < eps_a}} -++ are true statements. -++ -++ The routines come in three families and three flavors: -++ \newline\tab{3} closed:\tab{20}romberg,\tab{30}simpson,\tab{42}trapezoidal -++ \newline\tab{3} open: \tab{20}rombergo,\tab{30}simpsono,\tab{42}trapezoidalo -++ \newline\tab{3} adaptive closed:\tab{20}aromberg,\tab{30}asimpson,\tab{42}atrapezoidal -++ \par -++ The {\em S(i)} for the trapezoidal family is the value of the -++ integral using an equally spaced absicca trapezoidal rule for -++ that level of refinement. -++ \par -++ The {\em S(i)} for the simpson family is the value of the integral -++ using an equally spaced absicca simpson rule for that level of -++ refinement. -++ \par -++ The {\em S(i)} for the romberg family is the estimate of the integral -++ using an equally spaced absicca romberg method. For -++ the \spad{i}-th level, this is an appropriate combination of all the -++ previous trapezodial estimates so that the error term starts -++ with the \spad{2*(i+1)} power only. -++ \par -++ The three families come in a closed version, where the formulas -++ include the endpoints, an open version where the formulas do not -++ include the endpoints and an adaptive version, where the user -++ is required to input the number of subintervals over which the -++ appropriate closed family integrator will apply with the usual -++ convergence parmeters for each subinterval. This is useful -++ where a large number of points are needed only in a small fraction -++ of the entire domain. -++ \par -++ Each routine takes as arguments: -++ \newline f\tab{10} integrand -++ \newline a\tab{10} starting point -++ \newline b\tab{10} ending point -++ \newline \spad{eps_r}\tab{10} relative error -++ \newline \spad{eps_a}\tab{10} absolute error -++ \newline \spad{nmin} \tab{10} refinement level when to start checking for convergence (> 1) -++ \newline \spad{nmax} \tab{10} maximum level of refinement -++ \par -++ The adaptive routines take as an additional parameter -++ \newline \spad{nint}\tab{10} the number of independent intervals to apply a closed -++ family integrator of the same name. -++ \par Notes: -++ \newline Closed family level i uses \spad{1 + 2**i} points. -++ \newline Open family level i uses \spad{1 + 3**i} points. -NumericalQuadrature(): Exports == Implementation where - L ==> List - V ==> Vector - I ==> Integer - B ==> Boolean - E ==> OutputForm - F ==> Float - PI ==> PositiveInteger - OFORM ==> OutputForm - TrapAns ==> Record(value:F, error:F, totalpts:I, success:B ) - - Exports ==> with - aromberg : (F -> F,F,F,F,F,I,I,I) -> TrapAns - ++ aromberg(fn,a,b,epsrel,epsabs,nmin,nmax,nint) - ++ uses the adaptive romberg method to numerically integrate function - ++ \spad{fn} over the closed interval from \spad{a} to \spad{b}, - ++ with relative accuracy \spad{epsrel} and absolute accuracy - ++ \spad{epsabs}, with the refinement levels for convergence checking - ++ vary from \spad{nmin} to \spad{nmax}, and where \spad{nint} - ++ is the number of independent intervals to apply the integrator. - ++ The value returned is a record containing the value of the integral, - ++ the estimate of the error in the computation, the total number of - ++ function evaluations, and either a boolean value which is true if - ++ the integral was computed within the user specified error criterion. - ++ See \spadtype{NumericalQuadrature} for details. - asimpson : (F -> F,F,F,F,F,I,I,I) -> TrapAns - ++ asimpson(fn,a,b,epsrel,epsabs,nmin,nmax,nint) uses the - ++ adaptive simpson method to numerically integrate function \spad{fn} - ++ over the closed interval from \spad{a} to \spad{b}, with relative - ++ accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, with the - ++ refinement levels for convergence checking vary from \spad{nmin} - ++ to \spad{nmax}, and where \spad{nint} is the number of independent - ++ intervals to apply the integrator. The value returned is a record - ++ containing the value of the integral, the estimate of the error in - ++ the computation, the total number of function evaluations, and - ++ either a boolean value which is true if the integral was computed - ++ within the user specified error criterion. - ++ See \spadtype{NumericalQuadrature} for details. - atrapezoidal : (F -> F,F,F,F,F,I,I,I) -> TrapAns - ++ atrapezoidal(fn,a,b,epsrel,epsabs,nmin,nmax,nint) uses the - ++ adaptive trapezoidal method to numerically integrate function - ++ \spad{fn} over the closed interval from \spad{a} to \spad{b}, with - ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, - ++ with the refinement levels for convergence checking vary from - ++ \spad{nmin} to \spad{nmax}, and where \spad{nint} is the number - ++ of independent intervals to apply the integrator. The value returned - ++ is a record containing the value of the integral, the estimate of - ++ the error in the computation, the total number of function - ++ evaluations, and either a boolean value which is true if - ++ the integral was computed within the user specified error criterion. - ++ See \spadtype{NumericalQuadrature} for details. - romberg : (F -> F,F,F,F,F,I,I) -> TrapAns - ++ romberg(fn,a,b,epsrel,epsabs,nmin,nmax) uses the romberg - ++ method to numerically integrate function \spadvar{fn} over the closed - ++ interval \spad{a} to \spad{b}, with relative accuracy \spad{epsrel} - ++ and absolute accuracy \spad{epsabs}, with the refinement levels - ++ for convergence checking vary from \spad{nmin} to \spad{nmax}. - ++ The value returned is a record containing the value - ++ of the integral, the estimate of the error in the computation, the - ++ total number of function evaluations, and either a boolean value - ++ which is true if the integral was computed within the user specified - ++ error criterion. See \spadtype{NumericalQuadrature} for details. - simpson : (F -> F,F,F,F,F,I,I) -> TrapAns - ++ simpson(fn,a,b,epsrel,epsabs,nmin,nmax) uses the simpson - ++ method to numerically integrate function \spad{fn} over the closed - ++ interval \spad{a} to \spad{b}, with - ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, - ++ with the refinement levels for convergence checking vary from - ++ \spad{nmin} to \spad{nmax}. The value returned - ++ is a record containing the value of the integral, the estimate of - ++ the error in the computation, the total number of function - ++ evaluations, and either a boolean value which is true if - ++ the integral was computed within the user specified error criterion. - ++ See \spadtype{NumericalQuadrature} for details. - trapezoidal : (F -> F,F,F,F,F,I,I) -> TrapAns - ++ trapezoidal(fn,a,b,epsrel,epsabs,nmin,nmax) uses the - ++ trapezoidal method to numerically integrate function \spadvar{fn} over - ++ the closed interval \spad{a} to \spad{b}, with relative accuracy - ++ \spad{epsrel} and absolute accuracy \spad{epsabs}, with the - ++ refinement levels for convergence checking vary - ++ from \spad{nmin} to \spad{nmax}. The value - ++ returned is a record containing the value of the integral, the - ++ estimate of the error in the computation, the total number of - ++ function evaluations, and either a boolean value which is true - ++ if the integral was computed within the user specified error criterion. - ++ See \spadtype{NumericalQuadrature} for details. - rombergo : (F -> F,F,F,F,F,I,I) -> TrapAns - ++ rombergo(fn,a,b,epsrel,epsabs,nmin,nmax) uses the romberg - ++ method to numerically integrate function \spad{fn} over - ++ the open interval from \spad{a} to \spad{b}, with - ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, - ++ with the refinement levels for convergence checking vary from - ++ \spad{nmin} to \spad{nmax}. The value returned - ++ is a record containing the value of the integral, the estimate of - ++ the error in the computation, the total number of function - ++ evaluations, and either a boolean value which is true if - ++ the integral was computed within the user specified error criterion. - ++ See \spadtype{NumericalQuadrature} for details. - simpsono : (F -> F,F,F,F,F,I,I) -> TrapAns - ++ simpsono(fn,a,b,epsrel,epsabs,nmin,nmax) uses the - ++ simpson method to numerically integrate function \spad{fn} over - ++ the open interval from \spad{a} to \spad{b}, with - ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, - ++ with the refinement levels for convergence checking vary from - ++ \spad{nmin} to \spad{nmax}. The value returned - ++ is a record containing the value of the integral, the estimate of - ++ the error in the computation, the total number of function - ++ evaluations, and either a boolean value which is true if - ++ the integral was computed within the user specified error criterion. - ++ See \spadtype{NumericalQuadrature} for details. - trapezoidalo : (F -> F,F,F,F,F,I,I) -> TrapAns - ++ trapezoidalo(fn,a,b,epsrel,epsabs,nmin,nmax) uses the - ++ trapezoidal method to numerically integrate function \spad{fn} - ++ over the open interval from \spad{a} to \spad{b}, with - ++ relative accuracy \spad{epsrel} and absolute accuracy \spad{epsabs}, - ++ with the refinement levels for convergence checking vary from - ++ \spad{nmin} to \spad{nmax}. The value returned - ++ is a record containing the value of the integral, the estimate of - ++ the error in the computation, the total number of function - ++ evaluations, and either a boolean value which is true if - ++ the integral was computed within the user specified error criterion. - ++ See \spadtype{NumericalQuadrature} for details. - - Implementation ==> add - trapclosed : (F -> F,F,F,F,I) -> F - trapopen : (F -> F,F,F,F,I) -> F - import OutputPackage - ---------------------------------------------------- - - aromberg(func,a,b,epsrel,epsabs,nmin,nmax,nint) == - ans : TrapAns - sum : F := 0.0 - err : F := 0.0 - pts : I := 1 - done : B := true - hh : F := (b-a) / nint - x1 : F := a - x2 : F := a + hh - io : L OFORM := [x1::E,x2::E] - i : I - for i in 1..nint repeat - ans := romberg(func,x1,x2,epsrel,epsabs,nmin,nmax) - if (not ans.success) then - io.1 := x1::E - io.2 := x2::E - print blankSeparate cons("accuracy not reached in interval"::E,io) - sum := sum + ans.value - err := err + abs(ans.error) - pts := pts + ans.totalpts-1 - done := (done and ans.success) - x1 := x2 - x2 := x2 + hh - return( [sum , err , pts , done] ) - ---------------------------------------------------- - - asimpson(func,a,b,epsrel,epsabs,nmin,nmax,nint) == - ans : TrapAns - sum : F := 0.0 - err : F := 0.0 - pts : I := 1 - done : B := true - hh : F := (b-a) / nint - x1 : F := a - x2 : F := a + hh - io : L OFORM := [x1::E,x2::E] - i : I - for i in 1..nint repeat - ans := simpson(func,x1,x2,epsrel,epsabs,nmin,nmax) - if (not ans.success) then - io.1 := x1::E - io.2 := x2::E - print blankSeparate cons("accuracy not reached in interval"::E,io) - sum := sum + ans.value - err := err + abs(ans.error) - pts := pts + ans.totalpts-1 - done := (done and ans.success) - x1 := x2 - x2 := x2 + hh - return( [sum , err , pts , done] ) - ---------------------------------------------------- - - atrapezoidal(func,a,b,epsrel,epsabs,nmin,nmax,nint) == - ans : TrapAns - sum : F := 0.0 - err : F := 0.0 - pts : I := 1 - i : I - done : B := true - hh : F := (b-a) / nint - x1 : F := a - x2 : F := a + hh - io : L OFORM := [x1::E,x2::E] - for i in 1..nint repeat - ans := trapezoidal(func,x1,x2,epsrel,epsabs,nmin,nmax) - if (not ans.success) then - io.1 := x1::E - io.2 := x2::E - print blankSeparate cons("accuracy not reached in interval"::E,io) - sum := sum + ans.value - err := err + abs(ans.error) - pts := pts + ans.totalpts-1 - done := (done and ans.success) - x1 := x2 - x2 := x2 + hh - return( [sum , err , pts , done] ) - ---------------------------------------------------- - - romberg(func,a,b,epsrel,epsabs,nmin,nmax) == - length : F := (b-a) - delta : F := length - newsum : F := 0.5 * length * (func(a)+func(b)) - newest : F := 0.0 - oldsum : F := 0.0 - oldest : F := 0.0 - change : F := 0.0 - qx1 : F := newsum - table : V F := new((nmax+1)::PI,0.0) - n : I := 1 - pts : I := 1 - four : I - j : I - i : I - if (nmin < 2) then - output("romberg: nmin to small (nmin > 1) nmin = ",nmin::E) - return([0.0,0.0,0,false]) - if (nmax < nmin) then - output("romberg: nmax < nmin : nmax = ",nmax::E) - output(" nmin = ",nmin::E) - return([0.0,0.0,0,false]) - if (a = b) then - output("romberg: integration limits are equal = ",a::E) - return([0.0,0.0,1,true]) - if (epsrel < 0.0) then - output("romberg: eps_r < 0.0 eps_r = ",epsrel::E) - return([0.0,0.0,0,false]) - if (epsabs < 0.0) then - output("romberg: eps_a < 0.0 eps_a = ",epsabs::E) - return([0.0,0.0,0,false]) - for n in 1..nmax repeat - oldsum := newsum - newsum := trapclosed(func,a,delta,oldsum,pts) - newest := (4.0 * newsum - oldsum) / 3.0 - four := 4 - table(n) := newest - for j in 2..n repeat - i := n+1-j - four := four * 4 - table(i) := table(i+1) + (table(i+1)-table(i)) / (four-1) - if n > nmin then - change := abs(table(1) - qx1) - if change < abs(epsrel*qx1) then - return( [table(1) , change , 2*pts+1 , true] ) - if change < epsabs then - return( [table(1) , change , 2*pts+1 , true] ) - oldsum := newsum - oldest := newest - delta := 0.5*delta - pts := 2*pts - qx1 := table(1) - return( [table(1) , 1.25*change , pts+1 ,false] ) - ---------------------------------------------------- - - simpson(func,a,b,epsrel,epsabs,nmin,nmax) == - length : F := (b-a) - delta : F := length - newsum : F := 0.5*(b-a)*(func(a)+func(b)) - newest : F := 0.0 - oldsum : F := 0.0 - oldest : F := 0.0 - change : F := 0.0 - n : I := 1 - pts : I := 1 - if (nmin < 2) then - output("simpson: nmin to small (nmin > 1) nmin = ",nmin::E) - return([0.0,0.0,0,false]) - if (nmax < nmin) then - output("simpson: nmax < nmin : nmax = ",nmax::E) - output(" nmin = ",nmin::E) - return([0.0,0.0,0,false]) - if (a = b) then - output("simpson: integration limits are equal = ",a::E) - return([0.0,0.0,1,true]) - if (epsrel < 0.0) then - output("simpson: eps_r < 0.0 : eps_r = ",epsrel::E) - return([0.0,0.0,0,false]) - if (epsabs < 0.0) then - output("simpson: eps_a < 0.0 : eps_a = ",epsabs::E) - return([0.0,0.0,0,false]) - for n in 1..nmax repeat - oldsum := newsum - newsum := trapclosed(func,a,delta,oldsum,pts) - newest := (4.0 * newsum - oldsum) / 3.0 - if n > nmin then - change := abs(newest-oldest) - if change < abs(epsrel*oldest) then - return( [newest , 1.25*change , 2*pts+1 , true] ) - if change < epsabs then - return( [newest , 1.25*change , 2*pts+1 , true] ) - oldsum := newsum - oldest := newest - delta := 0.5*delta - pts := 2*pts - return( [newest , 1.25*change , pts+1 ,false] ) - ---------------------------------------------------- - - trapezoidal(func,a,b,epsrel,epsabs,nmin,nmax) == - length : F := (b-a) - delta : F := length - newsum : F := 0.5*(b-a)*(func(a)+func(b)) - change : F := 0.0 - oldsum : F - n : I := 1 - pts : I := 1 - if (nmin < 2) then - output("trapezoidal: nmin to small (nmin > 1) nmin = ",nmin::E) - return([0.0,0.0,0,false]) - if (nmax < nmin) then - output("trapezoidal: nmax < nmin : nmax = ",nmax::E) - output(" nmin = ",nmin::E) - return([0.0,0.0,0,false]) - if (a = b) then - output("trapezoidal: integration limits are equal = ",a::E) - return([0.0,0.0,1,true]) - if (epsrel < 0.0) then - output("trapezoidal: eps_r < 0.0 : eps_r = ",epsrel::E) - return([0.0,0.0,0,false]) - if (epsabs < 0.0) then - output("trapezoidal: eps_a < 0.0 : eps_a = ",epsabs::E) - return([0.0,0.0,0,false]) - for n in 1..nmax repeat - oldsum := newsum - newsum := trapclosed(func,a,delta,oldsum,pts) - if n > nmin then - change := abs(newsum-oldsum) - if change < abs(epsrel*oldsum) then - return( [newsum , 1.25*change , 2*pts+1 , true] ) - if change < epsabs then - return( [newsum , 1.25*change , 2*pts+1 , true] ) - delta := 0.5*delta - pts := 2*pts - return( [newsum , 1.25*change , pts+1 ,false] ) - ---------------------------------------------------- - - rombergo(func,a,b,epsrel,epsabs,nmin,nmax) == - length : F := (b-a) - delta : F := length / 3.0 - newsum : F := length * func( 0.5*(a+b) ) - newest : F := 0.0 - oldsum : F := 0.0 - oldest : F := 0.0 - change : F := 0.0 - qx1 : F := newsum - table : V F := new((nmax+1)::PI,0.0) - four : I - j : I - i : I - n : I := 1 - pts : I := 1 - for n in 1..nmax repeat - oldsum := newsum - newsum := trapopen(func,a,delta,oldsum,pts) - newest := (9.0 * newsum - oldsum) / 8.0 - table(n) := newest - nine := 9 - output(newest::E) - for j in 2..n repeat - i := n+1-j - nine := nine * 9 - table(i) := table(i+1) + (table(i+1)-table(i)) / (nine-1) - if n > nmin then - change := abs(table(1) - qx1) - if change < abs(epsrel*qx1) then - return( [table(1) , 1.5*change , 3*pts , true] ) - if change < epsabs then - return( [table(1) , 1.5*change , 3*pts , true] ) - output(table::E) - oldsum := newsum - oldest := newest - delta := delta / 3.0 - pts := 3*pts - qx1 := table(1) - return( [table(1) , 1.5*change , pts ,false] ) - ---------------------------------------------------- - - simpsono(func,a,b,epsrel,epsabs,nmin,nmax) == - length : F := (b-a) - delta : F := length / 3.0 - newsum : F := length * func( 0.5*(a+b) ) - newest : F := 0.0 - oldsum : F := 0.0 - oldest : F := 0.0 - change : F := 0.0 - n : I := 1 - pts : I := 1 - for n in 1..nmax repeat - oldsum := newsum - newsum := trapopen(func,a,delta,oldsum,pts) - newest := (9.0 * newsum - oldsum) / 8.0 - output(newest::E) - if n > nmin then - change := abs(newest - oldest) - if change < abs(epsrel*oldest) then - return( [newest , 1.5*change , 3*pts , true] ) - if change < epsabs then - return( [newest , 1.5*change , 3*pts , true] ) - oldsum := newsum - oldest := newest - delta := delta / 3.0 - pts := 3*pts - return( [newest , 1.5*change , pts ,false] ) - ---------------------------------------------------- - - trapezoidalo(func,a,b,epsrel,epsabs,nmin,nmax) == - length : F := (b-a) - delta : F := length/3.0 - newsum : F := length*func( 0.5*(a+b) ) - change : F := 0.0 - pts : I := 1 - oldsum : F - n : I - for n in 1..nmax repeat - oldsum := newsum - newsum := trapopen(func,a,delta,oldsum,pts) - output(newsum::E) - if n > nmin then - change := abs(newsum-oldsum) - if change < abs(epsrel*oldsum) then - return([newsum , 1.5*change , 3*pts , true] ) - if change < epsabs then - return([newsum , 1.5*change , 3*pts , true] ) - delta := delta / 3.0 - pts := 3*pts - return([newsum , 1.5*change , pts ,false] ) - ---------------------------------------------------- - - trapclosed(func,start,h,oldsum,numpoints) == - x : F := start + 0.5*h - sum : F := 0.0 - i : I - for i in 1..numpoints repeat - sum := sum + func(x) - x := x + h - return( 0.5*(oldsum + sum*h) ) - ---------------------------------------------------- - - trapopen(func,start,del,oldsum,numpoints) == - ddel : F := 2.0*del - x : F := start + 0.5*del - sum : F := 0.0 - i : I - for i in 1..numpoints repeat - sum := sum + func(x) - x := x + ddel - sum := sum + func(x) - x := x + del - return( (oldsum/3.0 + sum*del) ) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/numsolve.spad.pamphlet b/src/algebra/numsolve.spad.pamphlet deleted file mode 100644 index b640b92..0000000 --- a/src/algebra/numsolve.spad.pamphlet +++ /dev/null @@ -1,485 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra numsolve.spad} -\author{Patrizia Gianni} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package INFSP InnerNumericFloatSolvePackage} -<>= -)abbrev package INFSP InnerNumericFloatSolvePackage -++ Author: P. Gianni -++ Date Created: January 1990 -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This is an internal package -++ for computing approximate solutions to systems of polynomial equations. -++ The parameter K specifies the coefficient field of the input polynomials -++ and must be either \spad{Fraction(Integer)} or \spad{Complex(Fraction Integer)}. -++ The parameter F specifies where the solutions must lie and can -++ be one of the following: \spad{Float}, \spad{Fraction(Integer)}, \spad{Complex(Float)}, -++ \spad{Complex(Fraction Integer)}. The last parameter specifies the type -++ of the precision operand and must be either \spad{Fraction(Integer)} or \spad{Float}. -InnerNumericFloatSolvePackage(K,F,Par): Cat == Cap where - F : Field -- this is the field where the answer will be - K : GcdDomain -- type of the input - Par : Join(Field, OrderedRing ) -- it will be NF or RN - - I ==> Integer - NNI ==> NonNegativeInteger - P ==> Polynomial - EQ ==> Equation - L ==> List - SUP ==> SparseUnivariatePolynomial - RN ==> Fraction Integer - NF ==> Float - CF ==> Complex Float - GI ==> Complex Integer - GRN ==> Complex RN - SE ==> Symbol - RFI ==> Fraction P I - - Cat == with - - innerSolve1 : (SUP K,Par) -> L F - ++ innerSolve1(up,eps) returns the list of the zeros - ++ of the univariate polynomial up with precision eps. - innerSolve1 : (P K,Par) -> L F - ++ innerSolve1(p,eps) returns the list of the zeros - ++ of the polynomial p with precision eps. - innerSolve : (L P K,L P K,L SE,Par) -> L L F - ++ innerSolve(lnum,lden,lvar,eps) returns a list of - ++ solutions of the system of polynomials lnum, with - ++ the side condition that none of the members of lden - ++ vanish identically on any solution. Each solution - ++ is expressed as a list corresponding to the list of - ++ variables in lvar and with precision specified by eps. - makeEq : (L F,L SE) -> L EQ P F - ++ makeEq(lsol,lvar) returns a list of equations formed - ++ by corresponding members of lvar and lsol. - - Cap == add - - ------ Local Functions ------ - isGeneric? : (L P K,L SE) -> Boolean - evaluate : (P K,SE,SE,F) -> F - numeric : K -> F - oldCoord : (L F,L I) -> L F - findGenZeros : (L P K,L SE,Par) -> L L F - failPolSolve : (L P K,L SE) -> Union(L L P K,"failed") - - numeric(r:K):F == - K is I => - F is Float => r::I::Float - F is RN => r::I::RN - F is CF => r::I::CF - F is GRN => r::I::GRN - K is GI => - gr:GI := r::GI - F is GRN => complex(real(gr)::RN,imag(gr)::RN)$GRN - F is CF => convert(gr) - error "case not handled" - - -- construct the equation - makeEq(nres:L F,lv:L SE) : L EQ P F == - [equation(x::(P F),r::(P F)) for x in lv for r in nres] - - evaluate(pol:P K,xvar:SE,zvar:SE,z:F):F == - rpp:=map(numeric,pol)$PolynomialFunctions2(K,F) - rpp := eval(rpp,zvar,z) - upol:=univariate(rpp,xvar) - retract(-coefficient(upol,0))/retract(leadingCoefficient upol) - - myConvert(eps:Par) : RN == - Par is RN => eps - Par is NF => retract(eps)$NF - - innerSolve1(pol:P K,eps:Par) : L F == innerSolve1(univariate pol,eps) - - innerSolve1(upol:SUP K,eps:Par) : L F == - K is GI and (Par is RN or Par is NF) => - (complexZeros(upol, - eps)$ComplexRootPackage(SUP K,Par)) pretend L(F) - K is I => - F is Float => - z:= realZeros(upol,myConvert eps)$RealZeroPackage(SUP I) - [convert((1/2)*(x.left+x.right))@Float for x in z] pretend L(F) - - F is RN => - z:= realZeros(upol,myConvert eps)$RealZeroPackage(SUP I) - [(1/2)*(x.left + x.right) for x in z] pretend L(F) - error "improper arguments to INFSP" - error "improper arguments to INFSP" - - - -- find the zeros of components in "generic" position -- - findGenZeros(lp:L P K,rlvar:L SE,eps:Par) : L L F == - rlp:=reverse lp - f:=rlp.first - zvar:= rlvar.first - rlp:=rlp.rest - lz:=innerSolve1(f,eps) - [reverse cons(z,[evaluate(pol,xvar,zvar,z) for pol in rlp - for xvar in rlvar.rest]) for z in lz] - - -- convert to the old coordinates -- - oldCoord(numres:L F,lval:L I) : L F == - rnumres:=reverse numres - rnumres.first:= rnumres.first + - (+/[n*nr for n in lval for nr in rnumres.rest]) - reverse rnumres - - -- real zeros of a system of 2 polynomials lp (incomplete) - innerSolve2(lp:L P K,lv:L SE,eps: Par):L L F == - mainvar := first lv - up1:=univariate(lp.1, mainvar) - up2:=univariate(lp.2, mainvar) - vec := subresultantVector(up1,up2)$SubResultantPackage(P K,SUP P K) - p0 := primitivePart multivariate(vec.0, mainvar) - p1 := primitivePart(multivariate(vec.1, mainvar),mainvar) - zero? p1 or - gcd(p0, leadingCoefficient(univariate(p1,mainvar))) ^=1 => - innerSolve(cons(0,lp),empty(),lv,eps) - findGenZeros([p1, p0], reverse lv, eps) - - -- real zeros of the system of polynomial lp -- - innerSolve(lp:L P K,ld:L P K,lv:L SE,eps: Par) : L L F == - -- empty?(ld) and (#lv = 2) and (# lp = 2) => innerSolve2(lp, lv, eps) - lnp:= [pToDmp(p)$PolToPol(lv,K) for p in lp] - OV:=OrderedVariableList(lv) - lvv:L OV:= [variable(vv)::OV for vv in lv] - DP:=DirectProduct(#lv,NonNegativeInteger) - dmp:=DistributedMultivariatePolynomial(lv,K) - lq:L dmp:=[] - if ld^=[] then - lq:= [(pToDmp(q1)$PolToPol(lv,K)) pretend dmp for q1 in ld] - partRes:=groebSolve(lnp,lvv)$GroebnerSolve(lv,K,K) pretend (L L dmp) - partRes=list [] => [] - -- remove components where denominators vanish - if lq^=[] then - gb:=GroebnerInternalPackage(K,DirectProduct(#lv,NNI),OV,dmp) - partRes:=[pr for pr in partRes| - and/[(redPol(fq,pr pretend List(dmp))$gb) ^=0 - for fq in lq]] - - -- select the components in "generic" form - rlv:=reverse lv - rrlvv:= rest reverse lvv - - listGen:L L dmp:=[] - for res in partRes repeat - res1:=rest reverse res - "and"/[("max"/degree(f,rrlvv))=1 for f in res1] => - listGen:=concat(res pretend (L dmp),listGen) - result:L L F := [] - if listGen^=[] then - listG :L L P K:= - [[dmpToP(pf)$PolToPol(lv,K) for pf in pr] for pr in listGen] - result:= - "append"/[findGenZeros(res,rlv,eps) for res in listG] - for gres in listGen repeat - partRes:=delete(partRes,position(gres,partRes)) - -- adjust the non-generic components - for gres in partRes repeat - genRecord := genericPosition(gres,lvv)$GroebnerSolve(lv,K,K) - lgen := genRecord.dpolys - lval := genRecord.coords - lgen1:=[dmpToP(pf)$PolToPol(lv,K) for pf in lgen] - lris:=findGenZeros(lgen1,rlv,eps) - result:= append([oldCoord(r,lval) for r in lris],result) - result - -@ -\section{package FLOATRP FloatingRealPackage} -<>= -)abbrev package FLOATRP FloatingRealPackage -++ Author: P. Gianni -++ Date Created: January 1990 -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: SystemSolvePackage, RadicalSolvePackage, -++ FloatingComplexPackage -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This is a package for the approximation of real solutions for -++ systems of polynomial equations over the rational numbers. -++ The results are expressed as either rational numbers or floats -++ depending on the type of the precision parameter which can be -++ either a rational number or a floating point number. -FloatingRealPackage(Par): Cat == Cap where - I ==> Integer - NNI ==> NonNegativeInteger - P ==> Polynomial - EQ ==> Equation - L ==> List - SUP ==> SparseUnivariatePolynomial - RN ==> Fraction Integer - NF ==> Float - CF ==> Complex Float - GI ==> Complex Integer - GRN ==> Complex RN - SE ==> Symbol - RFI ==> Fraction P I - INFSP ==> InnerNumericFloatSolvePackage - - Par : Join(OrderedRing, Field) -- RN or NewFloat - - Cat == with - - solve: (L RFI,Par) -> L L EQ P Par - ++ solve(lp,eps) finds all of the real solutions of the - ++ system lp of rational functions over the rational numbers - ++ with respect to all the variables appearing in lp, - ++ with precision eps. - - solve: (L EQ RFI,Par) -> L L EQ P Par - ++ solve(leq,eps) finds all of the real solutions of the - ++ system leq of equationas of rational functions - ++ with respect to all the variables appearing in lp, - ++ with precision eps. - - solve: (RFI,Par) -> L EQ P Par - ++ solve(p,eps) finds all of the real solutions of the - ++ univariate rational function p with rational coefficients - ++ with respect to the unique variable appearing in p, - ++ with precision eps. - - solve: (EQ RFI,Par) -> L EQ P Par - ++ solve(eq,eps) finds all of the real solutions of the - ++ univariate equation eq of rational functions - ++ with respect to the unique variables appearing in eq, - ++ with precision eps. - - realRoots: (L RFI,L SE,Par) -> L L Par - ++ realRoots(lp,lv,eps) computes the list of the real - ++ solutions of the list lp of rational functions with rational - ++ coefficients with respect to the variables in lv, - ++ with precision eps. Each solution is expressed as a list - ++ of numbers in order corresponding to the variables in lv. - - realRoots : (RFI,Par) -> L Par - ++ realRoots(rf, eps) finds the real zeros of a univariate - ++ rational function with precision given by eps. - - Cap == add - - makeEq(nres:L Par,lv:L SE) : L EQ P Par == - [equation(x::(P Par),r::(P Par)) for x in lv for r in nres] - - -- find the real zeros of an univariate rational polynomial -- - realRoots(p:RFI,eps:Par) : L Par == - innerSolve1(numer p,eps)$INFSP(I,Par,Par) - - -- real zeros of the system of polynomial lp -- - realRoots(lp:L RFI,lv:L SE,eps: Par) : L L Par == - lnum:=[numer p for p in lp] - lden:=[dp for p in lp |(dp:=denom p)^=1] - innerSolve(lnum,lden,lv,eps)$INFSP(I,Par,Par) - - solve(lp:L RFI,eps : Par) : L L EQ P Par == - lnum:=[numer p for p in lp] - lden:=[dp for p in lp |(dp:=denom p)^=1] - lv:="setUnion"/[variables np for np in lnum] - if lden^=[] then - lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden]) - [makeEq(numres,lv) for numres - in innerSolve(lnum,lden,lv,eps)$INFSP(I,Par,Par)] - - solve(le:L EQ RFI,eps : Par) : L L EQ P Par == - lp:=[lhs ep - rhs ep for ep in le] - lnum:=[numer p for p in lp] - lden:=[dp for p in lp |(dp:=denom p)^=1] - lv:="setUnion"/[variables np for np in lnum] - if lden^=[] then - lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden]) - [makeEq(numres,lv) for numres - in innerSolve(lnum,lden,lv,eps)$INFSP(I,Par,Par)] - - solve(p : RFI,eps : Par) : L EQ P Par == - (mvar := mainVariable numer p ) case "failed" => - error "no variable found" - x:P Par:=mvar::SE::(P Par) - [equation(x,val::(P Par)) for val in realRoots(p,eps)] - - solve(eq : EQ RFI,eps : Par) : L EQ P Par == - solve(lhs eq - rhs eq,eps) - -@ -\section{package FLOATCP FloatingComplexPackage} -<>= -)abbrev package FLOATCP FloatingComplexPackage -++ Author: P. Gianni -++ Date Created: January 1990 -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: SystemSolvePackage, RadicalSolvePackage, -++ FloatingRealPackage -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This is a package for the approximation of complex solutions for -++ systems of equations of rational functions with complex rational -++ coefficients. The results are expressed as either complex rational -++ numbers or complex floats depending on the type of the precision -++ parameter which can be either a rational number or a floating point number. -FloatingComplexPackage(Par): Cat == Cap where - Par : Join(Field, OrderedRing) - K ==> GI - FPK ==> Fraction P K - C ==> Complex - I ==> Integer - NNI ==> NonNegativeInteger - P ==> Polynomial - EQ ==> Equation - L ==> List - SUP ==> SparseUnivariatePolynomial - RN ==> Fraction Integer - NF ==> Float - CF ==> Complex Float - GI ==> Complex Integer - GRN ==> Complex RN - SE ==> Symbol - RFI ==> Fraction P I - INFSP ==> InnerNumericFloatSolvePackage - - - Cat == with - - complexSolve: (L FPK,Par) -> L L EQ P C Par - ++ complexSolve(lp,eps) finds all the complex solutions to - ++ precision eps of the system lp of rational functions - ++ over the complex rationals with respect to all the - ++ variables appearing in lp. - - complexSolve: (L EQ FPK,Par) -> L L EQ P C Par - ++ complexSolve(leq,eps) finds all the complex solutions - ++ to precision eps of the system leq of equations - ++ of rational functions over complex rationals - ++ with respect to all the variables appearing in lp. - - complexSolve: (FPK,Par) -> L EQ P C Par - ++ complexSolve(p,eps) find all the complex solutions of the - ++ rational function p with complex rational coefficients - ++ with respect to all the variables appearing in p, - ++ with precision eps. - - complexSolve: (EQ FPK,Par) -> L EQ P C Par - ++ complexSolve(eq,eps) finds all the complex solutions of the - ++ equation eq of rational functions with rational rational coefficients - ++ with respect to all the variables appearing in eq, - ++ with precision eps. - - complexRoots : (FPK,Par) -> L C Par - ++ complexRoots(rf, eps) finds all the complex solutions of a - ++ univariate rational function with rational number coefficients. - ++ The solutions are computed to precision eps. - - complexRoots : (L FPK,L SE,Par) -> L L C Par - ++ complexRoots(lrf, lv, eps) finds all the complex solutions of a - ++ list of rational functions with rational number coefficients - ++ with respect the the variables appearing in lv. - ++ Each solution is computed to precision eps and returned as - ++ list corresponding to the order of variables in lv. - - Cap == add - - -- find the complex zeros of an univariate polynomial -- - complexRoots(q:FPK,eps:Par) : L C Par == - p:=numer q - complexZeros(univariate p,eps)$ComplexRootPackage(SUP GI, Par) - - -- find the complex zeros of an univariate polynomial -- - complexRoots(lp:L FPK,lv:L SE,eps:Par) : L L C Par == - lnum:=[numer p for p in lp] - lden:=[dp for p in lp |(dp:=denom p)^=1] - innerSolve(lnum,lden,lv,eps)$INFSP(K,C Par,Par) - - complexSolve(lp:L FPK,eps : Par) : L L EQ P C Par == - lnum:=[numer p for p in lp] - lden:=[dp for p in lp |(dp:=denom p)^=1] - lv:="setUnion"/[variables np for np in lnum] - if lden^=[] then - lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden]) - [[equation(x::(P C Par),r::(P C Par)) for x in lv for r in nres] - for nres in innerSolve(lnum,lden,lv,eps)$INFSP(K,C Par,Par)] - - complexSolve(le:L EQ FPK,eps : Par) : L L EQ P C Par == - lp:=[lhs ep - rhs ep for ep in le] - lnum:=[numer p for p in lp] - lden:=[dp for p in lp |(dp:=denom p)^=1] - lv:="setUnion"/[variables np for np in lnum] - if lden^=[] then - lv:=setUnion(lv,"setUnion"/[variables dp for dp in lden]) - [[equation(x::(P C Par),r::(P C Par)) for x in lv for r in nres] - for nres in innerSolve(lnum,lden,lv,eps)$INFSP(K,C Par,Par)] - - complexSolve(p : FPK,eps : Par) : L EQ P C Par == - (mvar := mainVariable numer p ) case "failed" => - error "no variable found" - x:P C Par:=mvar::SE::(P C Par) - [equation(x,val::(P C Par)) for val in complexRoots(p,eps)] - - complexSolve(eq : EQ FPK,eps : Par) : L EQ P C Par == - complexSolve(lhs eq - rhs eq,eps) - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -<> -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/numtheor.spad.pamphlet b/src/algebra/numtheor.spad.pamphlet deleted file mode 100644 index 8547989..0000000 --- a/src/algebra/numtheor.spad.pamphlet +++ /dev/null @@ -1,1079 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra numtheor.spad} -\author{Martin Brock, Timothy Daly, Michael Monagan, Robert Sutor, -Clifton J. Williamson} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package INTHEORY IntegerNumberTheoryFunctions} -<>= --- numtheor.spad.pamphlet IntegerNumberTheoryFunctions.input -)spool IntegerNumberTheoryFunctions.output -)set message test on -)set message auto off -)clear all -div144 := divisors(144) ---R ---R ---R (1) [1,2,3,4,6,8,9,12,16,18,24,36,48,72,144] ---R Type: List Integer -#(div144) ---R ---R ---R (2) 15 ---R Type: PositiveInteger -reduce(+,div144) ---R ---R ---R (3) 403 ---R Type: PositiveInteger -numberOfDivisors(144) ---R ---R ---R (4) 15 ---R Type: PositiveInteger -sumOfDivisors(144) ---R ---R ---R (5) 403 ---R Type: PositiveInteger -f1(n)==reduce(+,[moebiusMu(d)*numberOfDivisors(quo(n,d))_ - for d in divisors(n)]) ---R ---R Type: Void -f1(200) ---R ---R Compiling function f1 with type PositiveInteger -> Integer ---R ---R (7) 1 ---R Type: PositiveInteger -f1(846) ---R ---R ---R (8) 1 ---R Type: PositiveInteger -f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d))_ - for d in divisors(n)]) ---R ---R Type: Void -f2(200) ---R ---R Compiling function f2 with type PositiveInteger -> Integer ---R ---R (10) 200 ---R Type: PositiveInteger -f2(846) ---R ---R ---R (11) 846 ---R Type: PositiveInteger -fibonacci(25) ---R ---R ---R (12) 75025 ---R Type: PositiveInteger -[fibonacci(n) for n in 1..15] ---R ---R ---R (13) [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] ---R Type: List Integer -fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)]) ---R ---R Type: Void -fib(25) ---R ---R Compiling function fib with type PositiveInteger -> Integer ---R ---R (15) 75025 ---R Type: PositiveInteger -[fib(n) for n in 1..15] ---R ---R ---R (16) [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] ---R Type: List Integer -legendre(3,5) ---R ---R ---R (17) - 1 ---R Type: Integer -legendre(23,691) ---R ---R ---R (18) - 1 ---R Type: Integer -h(d) == quo(reduce(+,[jacobi(d,k) for k in 1..quo(-d, 2)]),2-jacobi(d,2)) ---R ---R Type: Void -h(-163) ---R ---R Compiling function h with type Integer -> Integer ---R ---R (20) 1 ---R Type: PositiveInteger -h(-499) ---R ---R ---R (21) 3 ---R Type: PositiveInteger -h(-1832) ---R ---R ---R (22) 26 ---R Type: PositiveInteger -inverse:(INT,INT)->INT ---R ---R Type: Void -inverse(a,b) == - borg:INT:=b - c1:INT := 1 - d1:INT := 0 - while b ~= 0 repeat - q := a quo b - r := a-q*b - print [a, "=", q, "*(", b, ")+", r] - (a,b):=(b,r) - (c1,d1):=(d1,c1-q*d1) - a ~= 1 => error("moduli are not relatively prime") - positiveRemainder(c1,borg) ---R ---R Type: Void -inverse(15,26) ---R ---R Compiling function inverse with type (Integer,Integer) -> Integer ---R [15,"=",0,"*(",26,")+",15] ---R [26,"=",1,"*(",15,")+",11] ---R [15,"=",1,"*(",11,")+",4] ---R [11,"=",2,"*(",4,")+",3] ---R [4,"=",1,"*(",3,")+",1] ---R [3,"=",3,"*(",1,")+",0] ---R ---R (25) 7 ---R Type: PositiveInteger -x1:=4 ---R ---R ---R (26) 4 ---R Type: PositiveInteger -m1:=5 ---R ---R ---R (27) 5 ---R Type: PositiveInteger -x2:=2 ---R ---R ---R (28) 2 ---R Type: PositiveInteger -m2:=3 ---R ---R ---R (29) 3 ---R Type: PositiveInteger -result:=chineseRemainder(x1,m1,x2,m2) ---R ---R ---R (30) 14 ---R Type: PositiveInteger -)spool -)lisp (bye) -@ -<>= -==================================================================== -IntegerNumberTheoryFunctions examples -==================================================================== - -The IntegerNumberTheoryFunctions package contains a variety of operations -of interest to number theorists. Many of these operations deal with -divisibility properties of integers. (Recall that an integer a divides -an integer b if there is an integer c such that b = a * c.) - -The operation divisors returns a list of the divisors of an integer. - - div144 := divisors(144) - [1,2,3,4,6,8,9,12,16,18,24,36,48,72,144] - Type: List Integer - -You can now compute the number of divisors of 144 and the sum of the -divisors of 144 by counting and summing the elements of the list we -just created. - - #(div144) - 15 - Type: PositiveInteger - - reduce(+,div144) - 403 - Type: PositiveInteger - -Of course, you can compute the number of divisors of an integer n, -usually denoted d(n), and the sum of the divisors of an integer n, -usually denoted sigma(n), without ever listing the divisors of n. - -In Axiom, you can simply call the operations numberOfDivisors and -sumOfDivisors. - - numberOfDivisors(144) - 15 - Type: PositiveInteger - - sumOfDivisors(144) - 403 - Type: PositiveInteger - -The key is that d(n) and sigma(n) are "multiplicative functions." -This means that when n and m are relatively prime, that is, when -n and m have no prime factor in common, then d(nm) = d(n) d(m) and -sigma(nm) = sigma(n) sigma(m). Note that these functions are trivial to -compute when n is a prime power and are computed for general n from the -prime factorization of n. Other examples of multiplicative functions -are sigma_k(n), the sum of the k-th powers of the divisors of n and -varphi(n), the number of integers between 1 and n which are prime to n. -The corresponding Axiom operations are called sumOfKthPowerDivisors and -eulerPhi. - -An interesting function is mu(n), the Moebius mu function, defined as -follows: mu(1) = 1, mu(n) = 0, when n is divisible by a square, and -mu = (-1)^k, when n is the product of k distinct primes. The corresponding -Axiom operation is moebiusMu. This function occurs in the following theorem: - -Theorem: (Moebius Inversion Formula): - Let f(n) be a function on the positive integers and let F(n) - be defined by - F(n) = \sum_{d | n} f(n) - the sum of f(n) over d | n where the sum is taken over the - positive divisors of n. Then the values of f(n) can be recovered - from the values of F(n): f(n) = sum_{d | n} \mu(n) F(n/d) where - again the sum is taken over the positive divisors of n. - -When f(n) = 1, then F(n) = d(n). Thus, if you sum mu(d)..d(n/d) over -the positive divisors d of n, you should always get 1. - - f1(n)==reduce(+,[moebiusMu(d)*numberOfDivisors(quo(n,d))_ - for d in divisors(n)]) - Type: Void - - f1(200) - 1 - Type: PositiveInteger - - f1(846) - 1 - Type: PositiveInteger - -Similarly, when f(n) = n, then F(n) = sigma(n). Thus, if you sum -mu(d)..sigma(n/d) over the positive divisors d of n, you should always get n. - - f2(n) == reduce(+,[moebiusMu(d) * sumOfDivisors(quo(n,d))_ - for d in divisors(n)]) - Type: Void - - f2(200) - 200 - Type: PositiveInteger - - f2(846) - 846 - Type: PositiveInteger - -The Fibonacci numbers are defined by - F(1) = F(2) = 1 and - F(n) = F(n-1) + F(n-2) for n = 3,4,... - -The operation fibonacci computes the n-th Fibonacci number. - - fibonacci(25) - 75025 - Type: PositiveInteger - - [fibonacci(n) for n in 1..15] - [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] - Type: List Integer - -Fibonacci numbers can also be expressed as sums of binomial coefficients. - - fib(n) == reduce(+,[binomial(n-1-k,k) for k in 0..quo(n-1,2)]) - Type: Void - - fib(25) - 75025 - Type: PositiveInteger - - [fib(n) for n in 1..15] - [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610] - Type: List Integer - -Quadratic symbols can be computed with the operations legendre and -jacobi. The Legendre symbol a/p is defined for integers a and p with -p an odd prime number. By definition, - - (a/p) = +1, when a is a square (mod p), - (a/p)= -1, when a is not a square (mod p), and - (a/p) = 0, when a is divisible by p. - -You compute (a/p) via the command legendre(a,p). - - legendre(3,5) - - 1 - Type: Integer - - legendre(23,691) - - 1 - Type: Integer - -The Jacobi symbol (a/n) is the usual extension of the Legendre symbol, -where n is an arbitrary integer. The most important property of the -Jacobi symbol is the following: if K is a quadratic field with -discriminant d and quadratic character chi, then chi(n) = (d/n). -Thus, you can use the Jacobi symbol to compute, say, the class numbers -of imaginary quadratic fields from a standard class number formula. - -This function computes the class number of the imaginary quadratic -field with discriminant d. - - h(d) == quo(reduce(+,[jacobi(d,k) for k in 1..quo(-d, 2)]),2-jacobi(d,2)) - Type: Void - - h(-163) - 1 - Type: PositiveInteger - - h(-499) - 3 - Type: PositiveInteger - - h(-1832) - 26 - Type: PositiveInteger - -==================================================================== -The inverse function -==================================================================== - -The inverse function is derived from the Extended Euclidean Algorithm. -If we divide one integer by another nonzero integer we get an integer -quotient plus a remainder which is, in general, a rational number. -For instance, - 13/5 = 2 + 3/5 -where 2 is the quotient and 3/5 is the remainder. - -If we multiply thru by the denominator of the remainder we get an answer -in integer terms which no longer involves division: - 13 = 2(5) + 3 - -This gives a method of dividing integers. Specifically, if a and b are -positive integers, there exist unique non-negative integers q and r so that - - a = qb + r , where 0 <= r < b - -q is called the quotient and r the remainder. - -The greatest common divisor of integers a and b, denoted by gcd(a,b), -is the largest integer that divides (without remainder) both a and -b. So, for example: - gcd(15, 5) = 5, - gcd(7, 9) = 1, - gcd(12, 9) = 3, - gcd(81, 57) = 3. - -The gcd of two integers can be found by repeated application of the -division algorithm, this is known as the Euclidean Algorithm. You -repeatedly divide the divisor by the remainder until the remainder is -0. The gcd is the last non-zero remainder in this algorithm. The -following example shows the algorithm. - -Finding the gcd of 81 and 57 by the Euclidean Algorithm: - 81 = 1(57) + 24 - 57 = 2(24) + 9 - 24 = 2(9) + 6 - 9 = 1(6) + 3 - 6 = 2(3) + 0 - -So the greatest commmon divisor, the GCD(81,51)=3. - -If the gcd(a, b) = r then there exist integers s and t so that - - s(a) + t(b) = r - -By back substitution in the steps in the Euclidean Algorithm, it is -possible to find these integers s and t. We shall do this with the -above example: - -Starting with the next to last line, we have: - - 3 = 9 -1(6) - -From the line before that, we see that 6 = 24 - 2(9), so: - - 3 = 9 - 1(24 - 2(9)) = 3(9) - 1(24) - -From the line before that, we have 9 = 57 - 2(24), so: - - 3 = 3( 57 - 2(24)) - 1(24) = 3(57) - 7(24) - -And, from the line before that 24 = 81 - 1(57), giving us: - - 3 = 3(57) - 7( 81 - 1(57)) = 10(57) -7(81) - -So we have found s = -7 and t = 10. - -The Extended Euclidean Algorithm computes the GCD(a,b) and -the values for s and t. - -Suppose we were doing arithmetics modulo 26 and we needed to find the -inverse of a number mod 26. This turned out to be a difficult task (and -not always possible). We observed that a number x had an inverse mod 26 -(i.e., a number y so that xy = 1 mod 26) if and only if gcd(x,26) = 1. -In the general case the inverse of x exists if and only if gcd(x, n) = 1 -and if it exists then there exist integers s and t so that - - sx + tn = 1 - -But this says that sx = 1 + (-t)n, or in other words, - - sx == 1 mod n - -So, s (reduced mod n if need be) is the inverse of x mod n. -The extended Euclidean algorithm calculates s efficiently. - -==================================================================== -Finding the inverse mod n -==================================================================== - -We will number the steps of the Euclidean algorithm starting with step 0. -The quotient obtained at step i will be denoted by qi and an auxillary -number, si. For the first two steps, the value of this number is given: - s(0) = 0 and - s(1) = 1. - -For the remainder of the steps, we recursively calculate - s(i) = s(i-2) - s(i-1) q(i-2) mod n - -The algorithm starts by "dividing" n by x. If the last non-zero remainder -occurs at step k, then if this remainder is 1, x has an inverse and it is -s(k+2). If the remainder is not 1, then x does not have an inverse. - -For example, find the inverse of 15 mod 26. - -Step 0: 26 = 1(15) + 11 s(0) = 0 -Step 1: 15 = 1(11) + 4 s(1) = 1 -Step 2: 11 = 2(4) + 3 s(2) = 0 - 1( 1) mod 26 = 25 -Step 3: 4 = 1(3) + 1 s(3) = 1 - 25( 1) mod 26 = -24 mod 26 = 2 -Step 4: 3 = 3(1) + 0 s(4) = 25 - 2( 2) mod 26 = 21 - s(5) = 2 - 21( 1) mod 26 = -19 mod 26 = 7 - -Notice that 15(7) = 105 = 1 + 4(26) == 1 (mod 26). - -Using the half extended Euclidean algorithm we compute 1/a mod b. - - inverse:(INT,INT)->INT - Type: Void - - inverse(a,b) == - borg:INT:=b - c1:INT := 1 - d1:INT := 0 - while b ~= 0 repeat - q := a quo b - r := a-q*b - print [a, "=", q, "*(", b, ")+", r] - (a,b):=(b,r) - (c1,d1):=(d1,c1-q*d1) - a ~= 1 => error("moduli are not relatively prime") - positiveRemainder(c1,borg) - Type: Void - - inverse(15,26) - [15,"=",0,"*(",26,")+",15] - [26,"=",1,"*(",15,")+",11] - [15,"=",1,"*(",11,")+",4] - [11,"=",2,"*(",4,")+",3] - [4,"=",1,"*(",3,")+",1] - [3,"=",3,"*(",1,")+",0] - - 7 - Type: PositiveInteger - - -==================================================================== -The Chinese Remainder Algorithm -==================================================================== - -Let m1,m2,...,mr be positive integers that are pairwise relatively prime. -Let x1,x2,..,xr be integers with 0 <= xi < mi. Then, there is exactly one -x in the interval 0 <= x < m1 ... m2 ... mr -that satisfies the remainder equations - - irem(x,mi) = xi, i=1,2,...,r - -where irem is the positive integer remainder function. - -For example, et x1 = 4, m1 = 5, x2 = 2, m2 = 3. We know that - irem(x,m1) = x1 - irem(x,m2) = x2 -where 0 <= x_ < m1 and 0 <= x2 < m2. - -By the extended Euclidean Algorithm there are integers c and d such that - c m1 + d m2 = 1 - -In this case we are looking for an integer such that - irem(x,5) = 4, - irem(x,3) = 2 - -The algorithm we use is to first compute the positive integer remainder of -x1 and m1 to get a new x1: - - x1 = positiveRemainder(x1,m1) - 4 = positiveRemainder(4,5) - -Next compute the positive integer remainder of x2 and m2 to get a new x2: - - x2 = positiveRemainder(x2,m2) - 2 = positiveRemainder(2,3) - -Then we compute x1 + m1 ... positiveRemainder(((x2-x1)*inverse(m1,m2)),m2) -or - 4+5*positiveRemainder(((2-4)*inverse(5,3)),3) -or - 4+5*positiveRemainder(-2*2),3) -or - 4+5*2 -or - 14 - -This function has a restricted signature which only allows for -computing the chinese remainder of two numbers and two moduli. - x1:=4 - 4 - Type: PositiveInteger - m1:=5 - 5 - Type: PositiveInteger - x2:=2 - 2 - Type: PositiveInteger - m2:=3 - 3 - Type: PositiveInteger - result:=chineseRemainder(x1,m1,x2,m2) - 14 - Type: PositiveInteger - -See Also: -o )show IntegerNumberTheoryFunctions -o $AXIOM/doc/src/algebra/numtheor.spad.dvi - -@ -<>= -)abbrev package INTHEORY IntegerNumberTheoryFunctions -++ Author: Michael Monagan, Martin Brock, Robert Sutor, Timothy Daly -++ Date Created: June 1987 -++ Date Last Updated: -++ Basic Operations: -++ Related Domains: -++ Also See: -++ AMS Classifications: -++ Keywords: number theory, integer -++ Examples: -++ References: Knuth, The Art of Computer Programming Vol.2 -++ Description: -++ This package provides various number theoretic functions on the integers. -IntegerNumberTheoryFunctions(): Exports == Implementation where - I ==> Integer - RN ==> Fraction I - SUP ==> SparseUnivariatePolynomial - NNI ==> NonNegativeInteger - - Exports ==> with - bernoulli : I -> RN - ++ \spad{bernoulli(n)} returns the nth Bernoulli number. - ++ this is \spad{B(n,0)}, where \spad{B(n,x)} is the \spad{n}th Bernoulli - ++ polynomial. - chineseRemainder: (I,I,I,I) -> I - ++ \spad{chineseRemainder(x1,m1,x2,m2)} returns w, where w is such that - ++ \spad{w = x1 mod m1} and \spad{w = x2 mod m2}. Note: \spad{m1} and - ++ \spad{m2} must be relatively prime. - divisors : I -> List I - ++ \spad{divisors(n)} returns a list of the divisors of n. - euler : I -> I - ++ \spad{euler(n)} returns the \spad{n}th Euler number. This is - ++ \spad{2^n E(n,1/2)}, where \spad{E(n,x)} is the nth Euler polynomial. - eulerPhi : I -> I - ++ \spad{eulerPhi(n)} returns the number of integers between 1 and n - ++ (including 1) which are relatively prime to n. This is the Euler phi - ++ function \spad{\phi(n)} is also called the totient function. - fibonacci : I -> I - ++ \spad{fibonacci(n)} returns the nth Fibonacci number. the Fibonacci - ++ numbers \spad{F[n]} are defined by \spad{F[0] = F[1] = 1} and - ++ \spad{F[n] = F[n-1] + F[n-2]}. - ++ The algorithm has running time \spad{O(log(n)^3)}. - ++ Reference: Knuth, The Art of Computer Programming - ++ Vol 2, Semi-Numerical Algorithms. - harmonic : I -> RN - ++ \spad{harmonic(n)} returns the nth harmonic number. This is - ++ \spad{H[n] = sum(1/k,k=1..n)}. - jacobi : (I,I) -> I - ++ \spad{jacobi(a,b)} returns the Jacobi symbol \spad{J(a/b)}. - ++ When b is odd, \spad{J(a/b) = product(L(a/p) for p in factor b )}. - ++ Note: by convention, 0 is returned if \spad{gcd(a,b) ^= 1}. - ++ Iterative \spad{O(log(b)^2)} version coded by Michael Monagan June 1987. - legendre : (I,I) -> I - ++ \spad{legendre(a,p)} returns the Legendre symbol \spad{L(a/p)}. - ++ \spad{L(a/p) = (-1)**((p-1)/2) mod p} (p prime), which is 0 if \spad{a} - ++ is 0, 1 if \spad{a} is a quadratic residue \spad{mod p} and -1 otherwise. - ++ Note: because the primality test is expensive, - ++ if it is known that p is prime then use \spad{jacobi(a,p)}. - moebiusMu : I -> I - ++ \spad{moebiusMu(n)} returns the Moebius function \spad{mu(n)}. - ++ \spad{mu(n)} is either -1,0 or 1 as follows: - ++ \spad{mu(n) = 0} if n is divisible by a square > 1, - ++ \spad{mu(n) = (-1)^k} if n is square-free and has k distinct - ++ prime divisors. - numberOfDivisors: I -> I - ++ \spad{numberOfDivisors(n)} returns the number of integers between 1 and n - ++ (inclusive) which divide n. The number of divisors of n is often - ++ denoted by \spad{tau(n)}. - sumOfDivisors : I -> I - ++ \spad{sumOfDivisors(n)} returns the sum of the integers between 1 and n - ++ (inclusive) which divide n. The sum of the divisors of n is often - ++ denoted by \spad{sigma(n)}. - sumOfKthPowerDivisors: (I,NNI) -> I - ++ \spad{sumOfKthPowerDivisors(n,k)} returns the sum of the \spad{k}th - ++ powers of the integers between 1 and n (inclusive) which divide n. - ++ the sum of the \spad{k}th powers of the divisors of n is often denoted - ++ by \spad{sigma_k(n)}. - Implementation ==> add - import IntegerPrimesPackage(I) - - -- we store the euler and bernoulli numbers computed so far in - -- a Vector because they are computed from an n-term recurrence - E: IndexedFlexibleArray(I,0) := new(1, 1) - B: IndexedFlexibleArray(RN,0) := new(1, 1) - H: Record(Hn:I,Hv:RN) := [1, 1] - - harmonic n == - s:I; h:RN - n < 0 => error("harmonic not defined for negative integers") - if n >= H.Hn then (s,h) := H else (s := 0; h := 0) - for k in s+1..n repeat h := h + 1/k - H.Hn := n - H.Hv := h - h - - fibonacci n == - n = 0 => 0 - n < 0 => (odd? n => 1; -1) * fibonacci(-n) - f1, f2 : I - (f1,f2) := (0,1) - for k in length(n)-2 .. 0 by -1 repeat - t := f2**2 - (f1,f2) := (t+f1**2,t+2*f1*f2) - if bit?(n,k) then (f1,f2) := (f2,f1+f2) - f2 - - euler n == - n < 0 => error "euler not defined for negative integers" - odd? n => 0 - l := (#E) :: I - n < l => E(n) - concat_!(E, new((n+1-l)::NNI, 0)$IndexedFlexibleArray(I,0)) - for i in 1 .. l by 2 repeat E(i) := 0 - -- compute E(i) i = l+2,l+4,...,n given E(j) j = 0,2,...,i-2 - t,e : I - for i in l+1 .. n by 2 repeat - t := e := 1 - for j in 2 .. i-2 by 2 repeat - t := (t*(i-j+1)*(i-j+2)) quo (j*(j-1)) - e := e + t*E(j) - E(i) := -e - E(n) - - bernoulli n == - n < 0 => error "bernoulli not defined for negative integers" - odd? n => - n = 1 => -1/2 - 0 - l := (#B) :: I - n < l => B(n) - concat_!(B, new((n+1-l)::NNI, 0)$IndexedFlexibleArray(RN,0)) - for i in 1 .. l by 2 repeat B(i) := 0 - -- compute B(i) i = l+2,l+4,...,n given B(j) j = 0,2,...,i-2 - for i in l+1 .. n by 2 repeat - t:I := 1 - b := (1-i)/2 - for j in 2 .. i-2 by 2 repeat - t := (t*(i-j+2)*(i-j+3)) quo (j*(j-1)) - b := b + (t::RN) * B(j) - B(i) := -b/((i+1)::RN) - B(n) - - inverse : (I,I) -> I - - inverse(a,b) == - borg:I:=b - c1:I := 1 - d1:I := 0 - while b ^= 0 repeat - q:I := a quo b - r:I := a-q*b - (a,b):=(b,r) - (c1,d1):=(d1,c1-q*d1) - a ^= 1 => error("moduli are not relatively prime") - positiveRemainder(c1,borg) - - chineseRemainder(x1,m1,x2,m2) == - m1 < 0 or m2 < 0 => error "moduli must be positive" - x1 := positiveRemainder(x1,m1) - x2 := positiveRemainder(x2,m2) - x1 + m1 * positiveRemainder(((x2-x1) * inverse(m1,m2)),m2) - - jacobi(a,b) == - -- Revised by Clifton Williamson January 1989. - -- Previous version returned incorrect answers when b was even. - -- The formula J(a/b) = product ( L(a/p) for p in factor b) is only - -- valid when b is odd (the Legendre symbol L(a/p) is not defined - -- for p = 2). When b is even, the Jacobi symbol J(a/b) is only - -- defined for a = 0 or 1 (mod 4). When a = 1 (mod 8), - -- J(a/2) = +1 and when a = 5 (mod 8), we define J(a/2) = -1. - -- Extending by multiplicativity, we have J(a/b) for even b and - -- appropriate a. - -- We also define J(a/1) = 1. - -- The point of this is the following: if d is the discriminant of - -- a quadratic field K and chi is the quadratic character for K, - -- then J(d/n) = chi(n) for n > 0. - -- Reference: Hecke, Vorlesungen ueber die Theorie der Algebraischen - -- Zahlen. - if b < 0 then b := -b - b = 0 => error "second argument of jacobi may not be 0" - b = 1 => 1 - even? b and positiveRemainder(a,4) > 1 => - error "J(a/b) not defined for b even and a = 2 or 3 (mod 4)" - even? b and even? a => 0 - for k in 0.. while even? b repeat b := b quo 2 - j:I := (odd? k and positiveRemainder(a,8) = 5 => -1; 1) - b = 1 => j - a := positiveRemainder(a,b) - -- assertion: 0 < a < b and odd? b - while a > 1 repeat - if odd? a then - -- J(a/b) = J(b/a) (-1) ** (a-1)/2 (b-1)/2 - if a rem 4 = 3 and b rem 4 = 3 then j := -j - (a,b) := (b rem a,a) - else - -- J(2*a/b) = J(a/b) (-1) (b**2-1)/8 - for k in 0.. until odd? a repeat a := a quo 2 - if odd? k and (b+2) rem 8 > 4 then j := -j - a = 0 => 0 - j - - legendre(a,p) == - prime? p => jacobi(a,p) - error "characteristic of legendre must be prime" - - eulerPhi n == - n = 0 => 0 - r : RN := 1 - for entry in factors factor n repeat - r := ((entry.factor - 1) /$RN entry.factor) * r - numer(n * r) - - divisors n == - oldList : List Integer := concat(1,nil()) - for f in factors factor n repeat - newList : List Integer := nil() - for k in 0..f.exponent repeat - pow := f.factor ** k - for m in oldList repeat - newList := concat(pow * m,newList) - oldList := newList - sort(#1 < #2,newList) - - numberOfDivisors n == - n = 0 => 0 - */[1+entry.exponent for entry in factors factor n] - - sumOfDivisors n == - n = 0 => 0 - r : RN := */[(entry.factor**(entry.exponent::NNI + 1)-1)/ - (entry.factor-1) for entry in factors factor n] - numer r - - sumOfKthPowerDivisors(n,k) == - n = 0 => 0 - r : RN := */[(entry.factor**(k*entry.exponent::NNI+k)-1)/ - (entry.factor**k-1) for entry in factors factor n] - numer r - - moebiusMu n == - n = 1 => 1 - t := factor n - for k in factors t repeat - k.exponent > 1 => return 0 - odd? numberOfFactors t => -1 - 1 - -@ -\section{package PNTHEORY PolynomialNumberTheoryFunctions} -<>= -)abbrev package PNTHEORY PolynomialNumberTheoryFunctions -++ Author: Michael Monagan, Clifton J. Williamson -++ Date Created: June 1987 -++ Date Last Updated: 10 November 1996 (Claude Quitte) -++ Basic Operations: -++ Related Domains: -++ Also See: -++ AMS Classifications: -++ Keywords: polynomial, number theory -++ Examples: -++ References: Knuth, The Art of Computer Programming Vol.2 -++ Description: -++ This package provides various polynomial number theoretic functions -++ over the integers. -PolynomialNumberTheoryFunctions(): Exports == Implementation where - I ==> Integer - RN ==> Fraction I - SUP ==> SparseUnivariatePolynomial - NNI ==> NonNegativeInteger - - Exports ==> with - bernoulli : I -> SUP RN - ++ bernoulli(n) returns the nth Bernoulli polynomial \spad{B[n](x)}. - ++ Note: Bernoulli polynomials denoted \spad{B(n,x)} computed by solving the - ++ differential equation \spad{differentiate(B(n,x),x) = n B(n-1,x)} where - ++ \spad{B(0,x) = 1} and initial condition comes from \spad{B(n) = B(n,0)}. - chebyshevT: I -> SUP I - ++ chebyshevT(n) returns the nth Chebyshev polynomial \spad{T[n](x)}. - ++ Note: Chebyshev polynomials of the first kind, denoted \spad{T[n](x)}, - ++ computed from the two term recurrence. The generating function - ++ \spad{(1-t*x)/(1-2*t*x+t**2) = sum(T[n](x)*t**n, n=0..infinity)}. - chebyshevU: I -> SUP I - ++ chebyshevU(n) returns the nth Chebyshev polynomial \spad{U[n](x)}. - ++ Note: Chebyshev polynomials of the second kind, denoted \spad{U[n](x)}, - ++ computed from the two term recurrence. The generating function - ++ \spad{1/(1-2*t*x+t**2) = sum(T[n](x)*t**n, n=0..infinity)}. - cyclotomic: I -> SUP I - ++ cyclotomic(n) returns the nth cyclotomic polynomial \spad{phi[n](x)}. - ++ Note: \spad{phi[n](x)} is the factor of \spad{x**n - 1} whose roots - ++ are the primitive nth roots of unity. - euler : I -> SUP RN - ++ euler(n) returns the nth Euler polynomial \spad{E[n](x)}. - ++ Note: Euler polynomials denoted \spad{E(n,x)} computed by solving the - ++ differential equation \spad{differentiate(E(n,x),x) = n E(n-1,x)} where - ++ \spad{E(0,x) = 1} and initial condition comes from \spad{E(n) = 2**n E(n,1/2)}. - fixedDivisor: SUP I -> I - ++ fixedDivisor(a) for \spad{a(x)} in \spad{Z[x]} is the largest integer - ++ f such that f divides \spad{a(x=k)} for all integers k. - ++ Note: fixed divisor of \spad{a} is - ++ \spad{reduce(gcd,[a(x=k) for k in 0..degree(a)])}. - hermite : I -> SUP I - ++ hermite(n) returns the nth Hermite polynomial \spad{H[n](x)}. - ++ Note: Hermite polynomials, denoted \spad{H[n](x)}, are computed from - ++ the two term recurrence. The generating function is: - ++ \spad{exp(2*t*x-t**2) = sum(H[n](x)*t**n/n!, n=0..infinity)}. - laguerre : I -> SUP I - ++ laguerre(n) returns the nth Laguerre polynomial \spad{L[n](x)}. - ++ Note: Laguerre polynomials, denoted \spad{L[n](x)}, are computed from - ++ the two term recurrence. The generating function is: - ++ \spad{exp(x*t/(t-1))/(1-t) = sum(L[n](x)*t**n/n!, n=0..infinity)}. - legendre : I -> SUP RN - ++ legendre(n) returns the nth Legendre polynomial \spad{P[n](x)}. - ++ Note: Legendre polynomials, denoted \spad{P[n](x)}, are computed from - ++ the two term recurrence. The generating function is: - ++ \spad{1/sqrt(1-2*t*x+t**2) = sum(P[n](x)*t**n, n=0..infinity)}. - Implementation ==> add - import IntegerPrimesPackage(I) - - x := monomial(1,1)$SUP(I) - y := monomial(1,1)$SUP(RN) - - -- For functions computed via a fixed term recurrence we record - -- previous values so that the next value can be computed directly - - E : Record(En:I, Ev:SUP(RN)) := [0,1] - B : Record( Bn:I, Bv:SUP(RN) ) := [0,1] - H : Record( Hn:I, H1:SUP(I), H2:SUP(I) ) := [0,1,x] - L : Record( Ln:I, L1:SUP(I), L2:SUP(I) ) := [0,1,x] - P : Record( Pn:I, P1:SUP(RN), P2:SUP(RN) ) := [0,1,y] - CT : Record( Tn:I, T1:SUP(I), T2:SUP(I) ) := [0,1,x] - U : Record( Un:I, U1:SUP(I), U2:SUP(I) ) := [0,1,0] - - MonicQuotient: (SUP(I),SUP(I)) -> SUP(I) - MonicQuotient (a,b) == - leadingCoefficient(b) ^= 1 => error "divisor must be monic" - b = 1 => a - da := degree a - db := degree b -- assertion: degree b > 0 - q:SUP(I) := 0 - while da >= db repeat - t := monomial(leadingCoefficient a, (da-db)::NNI) - a := a - b * t - q := q + t - da := degree a - q - - cyclotomic n == - --++ cyclotomic polynomial denoted phi[n](x) - p:I; q:I; r:I; s:I; m:NNI; c:SUP(I); t:SUP(I) - n < 0 => error "cyclotomic not defined for negative integers" - n = 0 => x - k := n; s := p := 1 - c := x - 1 - while k > 1 repeat - p := nextPrime p - (q,r) := divide(k, p) - if r = 0 then - while r = 0 repeat (k := q; (q,r) := divide(k,p)) - t := multiplyExponents(c,p::NNI) - c := MonicQuotient(t,c) - s := s * p - m := (n quo s) :: NNI - multiplyExponents(c,m) - - euler n == - p : SUP(RN); t : SUP(RN); c : RN; s : I - n < 0 => error "euler not defined for negative integers" - if n < E.En then (s,p) := (0$I,1$SUP(RN)) else (s,p) := E - -- (s,p) := if n < E.En then (0,1) else E - for i in s+1 .. n repeat - t := (i::RN) * integrate p - c := euler(i)$IntegerNumberTheoryFunctions / 2**(i::NNI) - t(1/2) - p := t + c::SUP(RN) - E.En := n - E.Ev := p - p - - bernoulli n == - p : SUP RN; t : SUP RN; c : RN; s : I - n < 0 => error "bernoulli not defined for negative integers" - if n < B.Bn then (s,p) := (0$I,1$SUP(RN)) else (s,p) := B - -- (s,p) := if n < B.Bn then (0,1) else B - for i in s+1 .. n repeat - t := (i::RN) * integrate p - c := bernoulli(i)$IntegerNumberTheoryFunctions - p := t + c::SUP(RN) - B.Bn := n - B.Bv := p - p - - fixedDivisor a == - g:I; d:NNI; SUP(I) - d := degree a - g := coefficient(a, minimumDegree a) - for k in 1..d while g > 1 repeat g := gcd(g,a k) - g - - hermite n == - s : I; p : SUP(I); q : SUP(I) - n < 0 => error "hermite not defined for negative integers" - -- (s,p,q) := if n < H.Hn then (0,1,x) else H - if n < H.Hn then (s := 0; p := 1; q := x) else (s,p,q) := H - for k in s+1 .. n repeat (p,q) := (2*x*p-2*(k-1)*q,p) - H.Hn := n - H.H1 := p - H.H2 := q - p - - legendre n == - s:I; t:I; p:SUP(RN); q:SUP(RN) - n < 0 => error "legendre not defined for negative integers" - -- (s,p,q) := if n < P.Pn then (0,1,y) else P - if n < P.Pn then (s := 0; p := 1; q := y) else (s,p,q) := P - for k in s+1 .. n repeat - t := k-1 - (p,q) := ((k+t)$I/k*y*p - t/k*q,p) - P.Pn := n - P.P1 := p - P.P2 := q - p - - laguerre n == - k:I; s:I; t:I; p:SUP(I); q:SUP(I) - n < 0 => error "laguerre not defined for negative integers" - -- (s,p,q) := if n < L.Ln then (0,1,x) else L - if n < L.Ln then (s := 0; p := 1; q := x) else (s,p,q) := L - for k in s+1 .. n repeat - t := k-1 - (p,q) := ((((k+t)$I)::SUP(I)-x)*p-t**2*q,p) - L.Ln := n - L.L1 := p - L.L2 := q - p - - chebyshevT n == - s : I; p : SUP(I); q : SUP(I) - n < 0 => error "chebyshevT not defined for negative integers" - -- (s,p,q) := if n < CT.Tn then (0,1,x) else CT - if n < CT.Tn then (s := 0; p := 1; q := x) else (s,p,q) := CT - for k in s+1 .. n repeat (p,q) := ((2*x*p - q),p) - CT.Tn := n - CT.T1 := p - CT.T2 := q - p - - chebyshevU n == - s : I; p : SUP(I); q : SUP(I) - n < 0 => error "chebyshevU not defined for negative integers" - if n < U.Un then (s := 0; p := 1; q := 0) else (s,p,q) := U - for k in s+1 .. n repeat (p,q) := ((2*x*p - q),p) - U.Un := n - U.U1 := p - U.U2 := q - p - -@ -\section{License} -<>= ---Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ---All rights reserved. --- ---Redistribution and use in source and binary forms, with or without ---modification, are permitted provided that the following conditions are ---met: --- --- - Redistributions of source code must retain the above copyright --- notice, this list of conditions and the following disclaimer. --- --- - Redistributions in binary form must reproduce the above copyright --- notice, this list of conditions and the following disclaimer in --- the documentation and/or other materials provided with the --- distribution. --- --- - Neither the name of The Numerical ALgorithms Group Ltd. nor the --- names of its contributors may be used to endorse or promote products --- derived from this software without specific prior written permission. --- ---THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS ---IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED ---TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A ---PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER ---OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, ---EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, ---PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ---PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ---LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ---NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ---SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -@ -<<*>>= -<> - -<> -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} Cohen, Joel S., -{\sl Computer Algebra and Symbolic Computation} -{\sl Mathematical Methods}, -A.K. Peters, Ltd, Natick, MA. USA (2003) -ISBN 1-56881-159-4 -\bibitem{2} Geddes, Keith O., Czapor, Stephen R., Labahn, George -{\sl Algorithms for Computer Algebra} -Kluwer Academic Publishers -ISBN 0-7923-9259-0 -\end{thebibliography} -\end{document} diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index b049c62..9b921de 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -925,5 +925,7 @@ bookvol10.4 add packages
bookvol10.4 add packages
20090203.01.tpd.patch bookvol10.4 add packages
+20090207.01.tpd.patch +bookvol10.4 add packages