diff --git a/books/bookvol10.4.pamphlet b/books/bookvol10.4.pamphlet index 482f43e..b7f9567 100644 --- a/books/bookvol10.4.pamphlet +++ b/books/bookvol10.4.pamphlet @@ -6975,6 +6975,102 @@ DegreeReductionPackage(R1, R2): Cat == Capsule where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package DLP DiscreteLogarithmPackage} +\pagehead{DiscreteLogarithmPackage}{DLP} +\pagepic{ps/v104discretelogarithmpackage.ps}{DLP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package DLP DiscreteLogarithmPackage +++ Author: J. Grabmeier, A. Scheerhorn +++ Date Created: 12 March 1991 +++ Date Last Updated: 31 March 1991 +++ Basic Operations: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: discrete logarithm +++ References: +++ J. Grabmeier, A. Scheerhorn: Finite Fields in AXIOM. +++ AXIOM Technical Report Series, ATR/5 NP2522. +++ Description: +++ DiscreteLogarithmPackage implements help functions for discrete logarithms +++ in monoids using small cyclic groups. + +DiscreteLogarithmPackage(M): public == private where + M : Join(Monoid,Finite) with + "**": (M,Integer) -> M + ++ x ** n returns x raised to the integer power n + public ==> with + shanksDiscLogAlgorithm:(M,M,NonNegativeInteger)-> _ + Union(NonNegativeInteger,"failed") + ++ shanksDiscLogAlgorithm(b,a,p) computes s with \spad{b**s = a} for + ++ assuming that \spad{a} and b are elements in a 'small' cyclic group of + ++ order p by Shank's algorithm. + ++ Note: this is a subroutine of the function \spadfun{discreteLog}. + I ==> Integer + PI ==> PositiveInteger + NNI ==> NonNegativeInteger + SUP ==> SparseUnivariatePolynomial + DLP ==> DiscreteLogarithmPackage + + private ==> add + shanksDiscLogAlgorithm(logbase,c,p) == + limit:Integer:= 30 + -- for logarithms up to cyclic groups of order limit a full + -- logarithm table is computed + p < limit => + a:M:=1 + disclog:Integer:=0 + found:Boolean:=false + for i in 0..p-1 while not found repeat + a = c => + disclog:=i + found:=true + a:=a*logbase + not found => + messagePrint("discreteLog: second argument not in cyclic group_ + generated by first argument")$OutputForm + "failed" + disclog pretend NonNegativeInteger + l:Integer:=length(p)$Integer + if odd?(l)$Integer then n:Integer:= shift(p,-(l quo 2)) + else n:Integer:= shift(1,(l quo 2)) + a:M:=1 + exptable : Table(PI,NNI) :=table()$Table(PI,NNI) + for i in (0::NNI)..(n-1)::NNI repeat + insert_!([lookup(a),i::NNI]$Record(key:PI,entry:NNI),_ + exptable)$Table(PI,NNI) + a:=a*logbase + found := false + end := (p-1) quo n + disclog:Integer:=0 + a := c + b := logbase ** (-n) + for i in 0..end while not found repeat + rho:= search(lookup(a),exptable)_ + $Table(PositiveInteger,NNI) + rho case NNI => + found := true + disclog:= n * i + rho pretend Integer + a := a * b + not found => + messagePrint("discreteLog: second argument not in cyclic group_ + generated by first argument")$OutputForm + "failed" + disclog pretend NonNegativeInteger + +@ +<>= +"DLP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=DLP"] +"OAMONS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=OAMONS"] +"DLP" -> "OAMONS" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package DDFACT DistinctDegreeFactorize} \pagehead{DistinctDegreeFactorize}{DDFACT} \pagepic{ps/v104distinctdegreefactorize.ps}{DDFACT}{1.00} @@ -11651,6 +11747,81 @@ ExpressionFunctions2(R:OrderedSet, S:OrderedSet): @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package ES1 ExpressionSpaceFunctions1} +\pagehead{ExpressionSpaceFunctions1}{ES1} +\pagepic{ps/v104expressionspacefunctions1.ps}{ES1}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package ES1 ExpressionSpaceFunctions1 +++ Lifting of maps from expression spaces to kernels over them +++ Author: Manuel Bronstein +++ Date Created: 23 March 1988 +++ Date Last Updated: 19 April 1991 +++ Description: +++ This package allows a map from any expression space into any object +++ to be lifted to a kernel over the expression set, using a given +++ property of the operator of the kernel. +-- should not be exposed +ExpressionSpaceFunctions1(F:ExpressionSpace, S:Type): with + map: (F -> S, String, Kernel F) -> S + ++ map(f, p, k) uses the property p of the operator + ++ of k, in order to lift f and apply it to k. + + == add + -- prop contains an evaluation function List S -> S + map(F2S, prop, k) == + args := [F2S x for x in argument k]$List(S) + (p := property(operator k, prop)) case None => + ((p::None) pretend (List S -> S)) args + error "Operator does not have required property" + +@ +<>= +"ES1" [color="#FF4488",href="bookvol10.4.pdf#nameddest=ES1"] +"EVALAB" [color="#4488FF",href="bookvol10.2.pdf#nameddest=EVALAB"] +"ES1" -> "EVALAB" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package ES2 ExpressionSpaceFunctions2} +\pagehead{ExpressionSpaceFunctions2}{ES2} +\pagepic{ps/v104expressionspacefunctions2.ps}{ES2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package ES2 ExpressionSpaceFunctions2 +++ Lifting of maps from expression spaces to kernels over them +++ Author: Manuel Bronstein +++ Date Created: 23 March 1988 +++ Date Last Updated: 19 April 1991 +++ Description: +++ This package allows a mapping E -> F to be lifted to a kernel over E; +++ This lifting can fail if the operator of the kernel cannot be applied +++ in F; Do not use this package with E = F, since this may +++ drop some properties of the operators. +ExpressionSpaceFunctions2(E:ExpressionSpace, F:ExpressionSpace): with + map: (E -> F, Kernel E) -> F + ++ map(f, k) returns \spad{g = op(f(a1),...,f(an))} where + ++ \spad{k = op(a1,...,an)}. + == add + map(f, k) == + (operator(operator k)$F) [f x for x in argument k]$List(F) + +@ +<>= +"ES2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=ES2"] +"EVALAB" [color="#4488FF",href="bookvol10.2.pdf#nameddest=EVALAB"] +"ES2" -> "EVALAB" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package EXPRODE ExpressionSpaceODESolver} \pagehead{ExpressionSpaceODESolver}{EXPRODE} \pagepic{ps/v104expressionspaceodesolver.ps}{EXPRODE}{1.00} @@ -12484,6 +12655,397 @@ e04AgentsPackage(): E == I where %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter F} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FR2 FactoredFunctions2} +\pagehead{FactoredFunctions2}{FR2} +\pagepic{ps/v104FactoredFunctions2.ps}{FR2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +"FR2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FR2"] + +@ +<>= +-- fr.spad.pamphlet FactoredFunctions2.input +)spool FactoredFunctions2.output +)set message test on +)set message auto off +)clear all +--S 1 of 6 +double(x) == x + x +--R +--R Type: Void +--E 1 + +--S 2 of 6 +f := factor(720) +--R +--R +--R 4 2 +--R (2) 2 3 5 +--R Type: Factored Integer +--E 2 + +--S 3 of 6 +map(double,f) +--R +--R Compiling function double with type Integer -> Integer +--R +--R 4 2 +--R (3) 2 4 6 10 +--R Type: Factored Integer +--E 3 + +--S 4 of 6 +makePoly(b) == x + b +--R +--R Type: Void +--E 4 + +--S 5 of 6 +g := map(makePoly,f) +--R +--R Compiling function makePoly with type Integer -> Polynomial Integer +--R +--R 4 2 +--R (5) (x + 1)(x + 2) (x + 3) (x + 5) +--R Type: Factored Polynomial Integer +--E 5 + +--S 6 of 6 +nthFlag(g,1) +--R +--R +--R (6) "nil" +--R Type: Union("nil",...) +--E 6 +)spool +)lisp (bye) +@ + +<>= +==================================================================== +FactoredFunctions2 examples +==================================================================== + +The FactoredFunctions2 package implements one operation, map, for +applying an operation to every base in a factored object and to the unit. + + double(x) == x + x + Type: Void + + f := factor(720) + 4 2 + 2 3 5 + Type: Factored Integer + +Actually, the map operation used in this example comes from Factored +itself, since double takes an integer argument and returns an integer +result. + + map(double,f) + 4 2 + 2 4 6 10 + Type: Factored Integer + +If we want to use an operation that returns an object that has a type +different from the operation's argument, the map in Factored cannot be +used and we use the one in FactoredFunctions2. + + makePoly(b) == x + b + 4 2 + (x + 1)(x + 2) (x + 3) (x + 5) + Type: Factored Polynomial Integer + +In fact, the "2" in the name of the package means that we might +be using factored objects of two different types. + + g := map(makePoly,f) + +It is important to note that both versions of map destroy any information +known about the bases (the fact that they are prime, for instance). + +The flags for each base are set to "nil" in the object returned by map. + + nthFlag(g,1) + "nil" + Type: Union("nil",...) + +See Also: +o )help Factored +o )show FactoredFunctions2 +o $AXIOM/doc/src/algebra/fr.spad.dvi + +@ +<>= +)abbrev package FR2 FactoredFunctions2 +++ Author: Robert S. Sutor +++ Date Created: 1987 +++ Change History: +++ Basic Operations: map +++ Related Constructors: Factored +++ Also See: +++ AMS Classifications: 11A51, 11Y05 +++ Keywords: map, factor +++ References: +++ Description: +++ \spadtype{FactoredFunctions2} contains functions that involve +++ factored objects whose underlying domains may not be the same. +++ For example, \spadfun{map} might be used to coerce an object of +++ type \spadtype{Factored(Integer)} to +++ \spadtype{Factored(Complex(Integer))}. +FactoredFunctions2(R, S): Exports == Implementation where + R: IntegralDomain + S: IntegralDomain + + Exports ==> with + map: (R -> S, Factored R) -> Factored S + ++ map(fn,u) is used to apply the function \userfun{fn} to every + ++ factor of \spadvar{u}. The new factored object will have all its + ++ information flags set to "nil". This function is used, for + ++ example, to coerce every factor base to another type. + + Implementation ==> add + map(func, f) == + func(unit f) * + _*/[nilFactor(func(g.factor), g.exponent) for g in factors f] + +@ +<>= +"FR2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FR2"] +"ALGEBRA" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ALGEBRA"] +"FR2" -> "ALGEBRA" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FRUTIL FactoredFunctionUtilities} +\pagehead{FactoredFunctionUtilities}{FRUTIL} +\pagepic{ps/v104factoredfunctionutilities.ps}{FRUTIL}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FRUTIL FactoredFunctionUtilities +++ Author: +++ Date Created: +++ Change History: +++ Basic Operations: refine, mergeFactors +++ Related Constructors: Factored +++ Also See: +++ AMS Classifications: 11A51, 11Y05 +++ Keywords: factor +++ References: +++ Description: +++ \spadtype{FactoredFunctionUtilities} implements some utility +++ functions for manipulating factored objects. +FactoredFunctionUtilities(R): Exports == Implementation where + R: IntegralDomain + FR ==> Factored R + + Exports ==> with + refine: (FR, R-> FR) -> FR + ++ refine(u,fn) is used to apply the function \userfun{fn} to + ++ each factor of \spadvar{u} and then build a new factored + ++ object from the results. For example, if \spadvar{u} were + ++ created by calling \spad{nilFactor(10,2)} then + ++ \spad{refine(u,factor)} would create a factored object equal + ++ to that created by \spad{factor(100)} or + ++ \spad{primeFactor(2,2) * primeFactor(5,2)}. + + mergeFactors: (FR,FR) -> FR + ++ mergeFactors(u,v) is used when the factorizations of \spadvar{u} + ++ and \spadvar{v} are known to be disjoint, e.g. resulting from a + ++ content/primitive part split. Essentially, it creates a new + ++ factored object by multiplying the units together and appending + ++ the lists of factors. + + Implementation ==> add + fg: FR + func: R -> FR + fUnion ==> Union("nil", "sqfr", "irred", "prime") + FF ==> Record(flg: fUnion, fctr: R, xpnt: Integer) + + mergeFactors(f,g) == + makeFR(unit(f)*unit(g),append(factorList f,factorList g)) + + refine(f, func) == + u := unit(f) + l: List FF := empty() + for item in factorList f repeat + fitem := func item.fctr + u := u*unit(fitem) ** (item.xpnt :: NonNegativeInteger) + if item.xpnt = 1 then + l := concat(factorList fitem,l) + else l := concat([[v.flg,v.fctr,v.xpnt*item.xpnt] + for v in factorList fitem],l) + makeFR(u,l) + +@ +<>= +"FRUTIL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FRUTIL"] +"ALGEBRA" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ALGEBRA"] +"FRUTIL" -> "ALGEBRA" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FACUTIL FactoringUtilities} +\pagehead{FactoringUtilities}{FACUTIL} +\pagepic{ps/v104factoringutilities.ps}{FACUTIL}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FACUTIL FactoringUtilities +++ Author: Barry Trager +++ Date Created: March 12, 1992 +++ Date Last Updated: +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This package provides utilities used by the factorizers +++ which operate on polynomials represented as univariate polynomials +++ with multivariate coefficients. + +FactoringUtilities(E,OV,R,P) : C == T where + E : OrderedAbelianMonoidSup + OV : OrderedSet + R : Ring + P : PolynomialCategory(R,E,OV) + + SUP ==> SparseUnivariatePolynomial + NNI ==> NonNegativeInteger + Z ==> Integer + + C == with + completeEval : (SUP P,List OV,List R) -> SUP R + ++ completeEval(upoly, lvar, lval) evaluates the polynomial upoly + ++ with each variable in lvar replaced by the corresponding value + ++ in lval. Substitutions are done for all variables in upoly + ++ producing a univariate polynomial over R. + degree : (SUP P,List OV) -> List NNI + ++ degree(upoly, lvar) returns a list containing the maximum + ++ degree for each variable in lvar. + variables : SUP P -> List OV + ++ variables(upoly) returns the list of variables for the coefficients + ++ of upoly. + lowerPolynomial: SUP P -> SUP R + ++ lowerPolynomial(upoly) converts upoly to be a univariate polynomial + ++ over R. An error if the coefficients contain variables. + raisePolynomial: SUP R -> SUP P + ++ raisePolynomial(rpoly) converts rpoly from a univariate polynomial + ++ over r to be a univariate polynomial with polynomial coefficients. + normalDeriv : (SUP P,Z) -> SUP P + ++ normalDeriv(poly,i) computes the ith derivative of poly divided + ++ by i!. + ran : Z -> R + ++ ran(k) computes a random integer between -k and k as a member of R. + + T == add + + lowerPolynomial(f:SUP P) : SUP R == + zero? f => 0$SUP(R) + monomial(ground leadingCoefficient f, degree f)$SUP(R) + + lowerPolynomial(reductum f) + + raisePolynomial(u:SUP R) : SUP P == + zero? u => 0$SUP(P) + monomial(leadingCoefficient(u)::P, degree u)$SUP(P) + + raisePolynomial(reductum u) + + completeEval(f:SUP P,lvar:List OV,lval:List R) : SUP R == + zero? f => 0$SUP(R) + monomial(ground eval(leadingCoefficient f,lvar,lval),degree f)$SUP(R) + + completeEval(reductum f,lvar,lval) + + degree(f:SUP P,lvar:List OV) : List NNI == + coefs := coefficients f + ldeg:= ["max"/[degree(fc,xx) for fc in coefs] for xx in lvar] + + variables(f:SUP P) : List OV == + "setUnion"/[variables cf for cf in coefficients f] + + if R has FiniteFieldCategory then + ran(k:Z):R == random()$R + else + ran(k:Z):R == (random(2*k+1)$Z -k)::R + + -- Compute the normalized m derivative + normalDeriv(f:SUP P,m:Z) : SUP P== + (n1:Z:=degree f) < m => 0$SUP(P) + n1=m => (leadingCoefficient f)::SUP(P) + k:=binomial(n1,m) + ris:SUP:=0$SUP(P) + n:Z:=n1 + while n>= m repeat + while n1>n repeat + k:=(k*(n1-m)) quo n1 + n1:=n1-1 + ris:=ris+monomial(k*leadingCoefficient f,(n-m)::NNI) + f:=reductum f + n:=degree f + ris + +@ +<>= +"FACUTIL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FACUTIL"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"FACUTIL" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FAMR2 FiniteAbelianMonoidRingFunctions2} +\pagehead{FiniteAbelianMonoidRingFunctions2}{FAMR2} +\pagepic{ps/v104finiteabelianmonoidringfunctions2.ps}{FAMR2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FAMR2 FiniteAbelianMonoidRingFunctions2 +++ Author: Martin Rubey +++ Description: +++ This package provides a mapping function for +++ \spadtype{FiniteAbelianMonoidRing} +++ The packages defined in this file provide fast fraction free rational +++ interpolation algorithms. (see FAMR2, FFFG, FFFGF, NEWTON) +FiniteAbelianMonoidRingFunctions2(E: OrderedAbelianMonoid, + R1: Ring, + A1: FiniteAbelianMonoidRing(R1, E), + R2: Ring, + A2: FiniteAbelianMonoidRing(R2, E)) _ + : Exports == Implementation where + Exports == with + + map: (R1 -> R2, A1) -> A2 + ++ \spad{map}(f, a) applies the map f to each coefficient in a. It is + ++ assumed that f maps 0 to 0 + + Implementation == add + + map(f: R1 -> R2, a: A1): A2 == + if zero? a then 0$A2 + else + monomial(f leadingCoefficient a, degree a)$A2 + map(f, reductum a) + +@ +<>= +"FAMR2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FAMR2"] +"FAMR" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FAMR"] +"FAMR2" -> "FAMR" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package FDIV2 FiniteDivisorFunctions2} \pagehead{FiniteDivisorFunctions2}{FDIV2} \pagepic{ps/v104finitedivisorfunctions2.ps}{FDIV2}{1.00} @@ -12532,6 +13094,1829 @@ FiniteDivisorFunctions2(R1, UP1, UPUP1, F1, R2, UP2, UPUP2, F2): @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FFF FiniteFieldFunctions} +\pagehead{FiniteFieldFunctions}{FFF} +\pagepic{ps/v104finitefieldfunctions.ps}{FFF}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FFF FiniteFieldFunctions +++ Author: J. Grabmeier, A. Scheerhorn +++ Date Created: 21 March 1991 +++ Date Last Updated: 31 March 1991 +++ Basic Operations: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ References: +++ Lidl, R. & Niederreiter, H., "Finite Fields", +++ Encycl. of Math. 20, Addison-Wesley, 1983 +++ J. Grabmeier, A. Scheerhorn: Finite Fields in AXIOM. +++ AXIOM Technical Report Series, ATR/5 NP2522. +++ Description: +++ FiniteFieldFunctions(GF) is a package with functions +++ concerning finite extension fields of the finite ground field {\em GF}, +++ e.g. Zech logarithms. +++ Keywords: finite field, Zech logarithm, Jacobi logarithm, normal basis + +FiniteFieldFunctions(GF): Exports == Implementation where + GF : FiniteFieldCategory -- the ground field + + PI ==> PositiveInteger + NNI ==> NonNegativeInteger + I ==> Integer + SI ==> SingleInteger + SUP ==> SparseUnivariatePolynomial GF + V ==> Vector + M ==> Matrix + L ==> List + OUT ==> OutputForm + SAE ==> SimpleAlgebraicExtension + ARR ==> PrimitiveArray(SI) + TERM ==> Record(value:GF,index:SI) + MM ==> ModMonic(GF,SUP) + PF ==> PrimeField + + Exports ==> with + + createZechTable: SUP -> ARR + ++ createZechTable(f) generates a Zech logarithm table for the cyclic + ++ group representation of a extension of the ground field by the + ++ primitive polynomial {\em f(x)}, i.e. \spad{Z(i)}, + ++ defined by {\em x**Z(i) = 1+x**i} is stored at index i. + ++ This is needed in particular + ++ to perform addition of field elements in finite fields represented + ++ in this way. See \spadtype{FFCGP}, \spadtype{FFCGX}. + createMultiplicationTable: SUP -> V L TERM + ++ createMultiplicationTable(f) generates a multiplication + ++ table for the normal basis of the field extension determined + ++ by {\em f}. This is needed to perform multiplications + ++ between elements represented as coordinate vectors to this basis. + ++ See \spadtype{FFNBP}, \spadtype{FFNBX}. + createMultiplicationMatrix: V L TERM -> M GF + ++ createMultiplicationMatrix(m) forms the multiplication table + ++ {\em m} into a matrix over the ground field. + -- only useful for the user to visualise the multiplication table + -- in a nice form + sizeMultiplication: V L TERM -> NNI + ++ sizeMultiplication(m) returns the number of entries + ++ of the multiplication table {\em m}. + -- the time of the multiplication of field elements depends + -- on this size + createLowComplexityTable: PI -> Union(Vector List TERM,"failed") + ++ createLowComplexityTable(n) tries to find + ++ a low complexity normal basis of degree {\em n} over {\em GF} + ++ and returns its multiplication matrix + ++ Fails, if it does not find a low complexity basis + createLowComplexityNormalBasis: PI -> Union(SUP, V L TERM) + ++ createLowComplexityNormalBasis(n) tries to find a + ++ a low complexity normal basis of degree {\em n} over {\em GF} + ++ and returns its multiplication matrix + ++ If no low complexity basis is found it calls + ++ \axiomFunFrom{createNormalPoly}{FiniteFieldPolynomialPackage}(n) + ++ to produce a normal + ++ polynomial of degree {\em n} over {\em GF} + + Implementation ==> add + + + createLowComplexityNormalBasis(n) == + (u:=createLowComplexityTable(n)) case "failed" => + createNormalPoly(n)$FiniteFieldPolynomialPackage(GF) + u::(V L TERM) + +-- try to find a low complexity normal basis multiplication table +-- of the field of extension degree n +-- the algorithm is from: +-- Wassermann A., Konstruktion von Normalbasen, +-- Bayreuther Mathematische Schriften 31 (1989),1-9. + + createLowComplexityTable(n) == + q:=size()$GF + -- this algorithm works only for prime fields + p:=characteristic()$GF + -- search of a suitable parameter k + k:NNI:=0 + for i in 1..n-1 while (k=0) repeat + if prime?(i*n+1) and not(p = (i*n+1)) then + primitive?(q::PF(i*n+1))$PF(i*n+1) => + a:NNI:=1 + k:=i + t1:PF(k*n+1):=(q::PF(k*n+1))**n + gcd(n,a:=discreteLog(q::PF(n*i+1))$PF(n*i+1))$I = 1 => + k:=i + t1:=primitiveElement()$PF(k*n+1)**n + k = 0 => "failed" + -- initialize some start values + multmat:M PF(p):=zero(n,n) + p1:=(k*n+1) + pkn:=q::PF(p1) + t:=t1 pretend PF(p1) + if odd?(k) then + jt:I:=(n quo 2)+1 + vt:I:=positiveRemainder((k-a) quo 2,k)+1 + else + jt:I:=1 + vt:I:=(k quo 2)+1 + -- compute matrix + vec:Vector I:=zero(p1 pretend NNI) + for x in 1..k repeat + for l in 1..n repeat + vec.((t**(x-1) * pkn**(l-1)) pretend Integer+1):=_ + positiveRemainder(l,p1) + lvj:M I:=zero(k::NNI,n) + for v in 1..k repeat + for j in 1..n repeat + if (j^=jt) or (v^=vt) then + help:PF(p1):=t**(v-1)*pkn**(j-1)+1@PF(p1) + setelt(lvj,v,j,vec.(help pretend I +1)) + for j in 1..n repeat + if j^=jt then + for v in 1..k repeat + lvjh:=elt(lvj,v,j) + setelt(multmat,j,lvjh,elt(multmat,j,lvjh)+1) + for i in 1..n repeat + setelt(multmat,jt,i,positiveRemainder(-k,p)::PF(p)) + for v in 1..k repeat + if v^=vt then + lvjh:=elt(lvj,v,jt) + setelt(multmat,jt,lvjh,elt(multmat,jt,lvjh)+1) + -- multmat + m:=nrows(multmat)$(M PF(p)) + multtable:V L TERM:=new(m,nil()$(L TERM))$(V L TERM) + for i in 1..m repeat + l:L TERM:=nil()$(L TERM) + v:V PF(p):=row(multmat,i) + for j in (1::I)..(m::I) repeat + if (v.j ^= 0) then + -- take -v.j to get trace 1 instead of -1 + term:TERM:=[(convert(-v.j)@I)::GF,(j-2) pretend SI]$TERM + l:=cons(term,l)$(L TERM) + qsetelt_!(multtable,i,copy l)$(V L TERM) + multtable + + sizeMultiplication(m) == + s:NNI:=0 + for i in 1..#m repeat + s := s + #(m.i) + s + + createMultiplicationTable(f:SUP) == + sizeGF:NNI:=size()$GF -- the size of the ground field + m:PI:=degree(f)$SUP pretend PI + m=1 => + [[[-coefficient(f,0)$SUP,(-1)::SI]$TERM]$(L TERM)]::(V L TERM) + m1:I:=m-1 + -- initialize basis change matrices + setPoly(f)$MM + e:=reduce(monomial(1,1)$SUP)$MM ** sizeGF + w:=1$MM + qpow:PrimitiveArray(MM):=new(m,0) + qpow.0:=1$MM + for i in 1..m1 repeat + qpow.i:=(w:=w*e) + -- qpow.i = x**(i*q) + qexp:PrimitiveArray(MM):=new(m,0) + qexp.0:=reduce(monomial(1,1)$SUP)$MM + mat:M GF:=zero(m,m)$(M GF) + qsetelt_!(mat,2,1,1$GF)$(M GF) + h:=qpow.1 + qexp.1:=h + setColumn_!(mat,2,Vectorise(h)$MM)$(M GF) + for i in 2..m1 repeat + g:=0$MM + while h ^= 0 repeat + g:=g + leadingCoefficient(h) * qpow.degree(h)$MM + h:=reductum(h)$MM + qexp.i:=g + setColumn_!(mat,i+1,Vectorise(h:=g)$MM)$(M GF) + -- loop invariant: qexp.i = x**(q**i) + mat1:=inverse(mat)$(M GF) + mat1 = "failed" => + error "createMultiplicationTable: polynomial must be normal" + mat:=mat1 :: (M GF) + -- initialize multiplication table + multtable:V L TERM:=new(m,nil()$(L TERM))$(V L TERM) + for i in 1..m repeat + l:L TERM:=nil()$(L TERM) + v:V GF:=mat *$(M GF) Vectorise(qexp.(i-1) *$MM qexp.0)$MM + for j in (1::SI)..(m::SI) repeat + if (v.j ^= 0$GF) then + term:TERM:=[(v.j),j-(2::SI)]$TERM + l:=cons(term,l)$(L TERM) + qsetelt_!(multtable,i,copy l)$(V L TERM) + multtable + + + createZechTable(f:SUP) == + sizeGF:NNI:=size()$GF -- the size of the ground field + m:=degree(f)$SUP::PI + qm1:SI:=(sizeGF ** m -1) pretend SI + zechlog:ARR:=new(((sizeGF ** m + 1) quo 2)::NNI,-1::SI)$ARR + helparr:ARR:=new(sizeGF ** m::NNI,0$SI)$ARR + primElement:=reduce(monomial(1,1)$SUP)$SAE(GF,SUP,f) + a:=primElement + for i in 1..qm1-1 repeat + helparr.(lookup(a -$SAE(GF,SUP,f) 1$SAE(GF,SUP,f)_ + )$SAE(GF,SUP,f)):=i::SI + a:=a * primElement + characteristic() = 2 => + a:=primElement + for i in 1..(qm1 quo 2) repeat + zechlog.i:=helparr.lookup(a)$SAE(GF,SUP,f) + a:=a * primElement + zechlog + a:=1$SAE(GF,SUP,f) + for i in 0..((qm1-2) quo 2) repeat + zechlog.i:=helparr.lookup(a)$SAE(GF,SUP,f) + a:=a * primElement + zechlog + + createMultiplicationMatrix(m) == + n:NNI:=#m + mat:M GF:=zero(n,n)$(M GF) + for i in 1..n repeat + for t in m.i repeat + qsetelt_!(mat,i,t.index+2,t.value) + mat + +@ +<>= +"FFF" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FFF"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"FFF" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FFHOM FiniteFieldHomomorphisms} +\pagehead{FiniteFieldHomomorphisms}{FFHOM} +\pagepic{ps/v104finitefieldhomomorphisms.ps}{FFHOM}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FFHOM FiniteFieldHomomorphisms +++ Authors: J.Grabmeier, A.Scheerhorn +++ Date Created: 26.03.1991 +++ Date Last Updated: +++ Basic Operations: +++ Related Constructors: FiniteFieldCategory, FiniteAlgebraicExtensionField +++ Also See: +++ AMS Classifications: +++ Keywords: finite field, homomorphism, isomorphism +++ References: +++ R.Lidl, H.Niederreiter: Finite Field, Encycoldia of Mathematics and +++ Its Applications, Vol. 20, Cambridge Univ. Press, 1983, ISBN 0 521 30240 4 +++ J. Grabmeier, A. Scheerhorn: Finite Fields in AXIOM. +++ AXIOM Technical Report Series, ATR/5 NP2522. +++ Description: +++ FiniteFieldHomomorphisms(F1,GF,F2) exports coercion functions of +++ elements between the fields {\em F1} and {\em F2}, which both must be +++ finite simple algebraic extensions of the finite ground field {\em GF}. +FiniteFieldHomomorphisms(F1,GF,F2): Exports == Implementation where + F1: FiniteAlgebraicExtensionField(GF) + GF: FiniteFieldCategory + F2: FiniteAlgebraicExtensionField(GF) + -- the homorphism can only convert elements w.r.t. the last extension . + -- Adding a function 'groundField()' which returns the groundfield of GF + -- as a variable of type FiniteFieldCategory in the new compiler, one + -- could build up 'convert' recursively to get an homomorphism w.r.t + -- the whole extension. + + I ==> Integer + NNI ==> NonNegativeInteger + SI ==> SingleInteger + PI ==> PositiveInteger + SUP ==> SparseUnivariatePolynomial + M ==> Matrix GF + FFP ==> FiniteFieldExtensionByPolynomial + FFPOL2 ==> FiniteFieldPolynomialPackage2 + FFPOLY ==> FiniteFieldPolynomialPackage + OUT ==> OutputForm + + Exports ==> with + + coerce: F1 -> F2 + ++ coerce(x) is the homomorphic image of x from + ++ {\em F1} in {\em F2}. Thus {\em coerce} is a + ++ field homomorphism between the fields extensions + ++ {\em F1} and {\em F2} both over ground field {\em GF} + ++ (the second argument to the package). + ++ Error: if the extension degree of {\em F1} doesn't divide + ++ the extension degree of {\em F2}. + ++ Note that the other coercion function in the + ++ \spadtype{FiniteFieldHomomorphisms} is a left inverse. + + coerce: F2 -> F1 + ++ coerce(x) is the homomorphic image of x from + ++ {\em F2} in {\em F1}, where {\em coerce} is a + ++ field homomorphism between the fields extensions + ++ {\em F2} and {\em F1} both over ground field {\em GF} + ++ (the second argument to the package). + ++ Error: if the extension degree of {\em F2} doesn't divide + ++ the extension degree of {\em F1}. + ++ Note that the other coercion function in the + ++ \spadtype{FiniteFieldHomomorphisms} is a left inverse. + -- coerce(coerce(x:F1)@F2)@F1 = x and coerce(coerce(y:F2)@F1)@F2 = y + + Implementation ==> add + +-- global variables =================================================== + + degree1:NNI:= extensionDegree()$F1 + degree2:NNI:= extensionDegree()$F2 + -- the degrees of the last extension + + -- a necessary condition for the one field being an subfield of + -- the other one is, that the respective extension degrees are + -- multiples + if max(degree1,degree2) rem min(degree1,degree2) ^= 0 then + error "FFHOM: one extension degree must divide the other one" + + conMat1to2:M:= zero(degree2,degree1)$M + -- conversion Matix for the conversion direction F1 -> F2 + conMat2to1:M:= zero(degree1,degree2)$M + -- conversion Matix for the conversion direction F2 -> F1 + + repType1:=representationType()$F1 + repType2:=representationType()$F2 + -- the representation types of the fields + + init?:Boolean:=true + -- gets false after initialization + + defPol1:=definingPolynomial()$F1 + defPol2:=definingPolynomial()$F2 + -- the defining polynomials of the fields + + +-- functions ========================================================== + + + compare: (SUP GF,SUP GF) -> Boolean + -- compares two polynomials + + convertWRTsameDefPol12: F1 -> F2 + convertWRTsameDefPol21: F2 -> F1 + -- homomorphism if the last extension of F1 and F2 was build up + -- using the same defining polynomials + + convertWRTdifferentDefPol12: F1 -> F2 + convertWRTdifferentDefPol21: F2 -> F1 + -- homomorphism if the last extension of F1 and F2 was build up + -- with different defining polynomials + + initialize: () -> Void + -- computes the conversion matrices + + compare(g:(SUP GF),f:(SUP GF)) == + degree(f)$(SUP GF) >$NNI degree(g)$(SUP GF) => true + degree(f)$(SUP GF) <$NNI degree(g)$(SUP GF) => false + equal:Integer:=0 + for i in degree(f)$(SUP GF)..0 by -1 while equal=0 repeat + not zero?(coefficient(f,i)$(SUP GF))$GF and _ + zero?(coefficient(g,i)$(SUP GF))$GF => equal:=1 + not zero?(coefficient(g,i)$(SUP GF))$GF and _ + zero?(coefficient(f,i)$(SUP GF))$GF => equal:=(-1) + (f1:=lookup(coefficient(f,i)$(SUP GF))$GF) >$PositiveInteger _ + (g1:=lookup(coefficient(g,i)$(SUP GF))$GF) => equal:=1 + f1 <$PositiveInteger g1 => equal:=(-1) + equal=1 => true + false + + initialize() == + -- 1) in the case of equal def. polynomials initialize is called only + -- if one of the rep. types is "normal" and the other one is "polynomial" + -- we have to compute the basis change matrix 'mat', which i-th + -- column are the coordinates of a**(q**i), the i-th component of + -- the normal basis ('a' the root of the def. polynomial and q the + -- size of the groundfield) + defPol1 =$(SUP GF) defPol2 => + -- new code using reducedQPowers + mat:=zero(degree1,degree1)$M + arr:=reducedQPowers(defPol1)$FFPOLY(GF) + for i in 1..degree1 repeat + setColumn_!(mat,i,vectorise(arr.(i-1),degree1)$SUP(GF))$M + -- old code + -- here one of the representation types must be "normal" + --a:=basis()$FFP(GF,defPol1).2 -- the root of the def. polynomial + --setColumn_!(mat,1,coordinates(a)$FFP(GF,defPol1))$M + --for i in 2..degree1 repeat + -- a:= a **$FFP(GF,defPol1) size()$GF + -- setColumn_!(mat,i,coordinates(a)$FFP(GF,defPol1))$M + --for the direction "normal" -> "polynomial" we have to multiply the + -- coordinate vector of an element of the normal basis field with + -- the matrix 'mat'. In this case 'mat' is the correct conversion + -- matrix for the conversion of F1 to F2, its inverse the correct + -- inversion matrix for the conversion of F2 to F1 + repType1 = "normal" => -- repType2 = "polynomial" + conMat1to2:=copy(mat) + conMat2to1:=copy(inverse(mat)$M :: M) + --we finish the function for one case, hence reset initialization flag + init? := false + void()$Void + -- print("'normal' <=> 'polynomial' matrices initialized"::OUT) + -- in the other case we have to change the matrices + -- repType2 = "normal" and repType1 = "polynomial" + conMat2to1:=copy(mat) + conMat1to2:=copy(inverse(mat)$M :: M) + -- print("'normal' <=> 'polynomial' matrices initialized"::OUT) + --we finish the function for one case, hence reset initialization flag + init? := false + void()$Void + -- 2) in the case of different def. polynomials we have to order the + -- fields to get the same isomorphism, if the package is called with + -- the fields F1 and F2 swapped. + dPbig:= defPol2 + rTbig:= repType2 + dPsmall:= defPol1 + rTsmall:= repType1 + degbig:=degree2 + degsmall:=degree1 + if compare(defPol2,defPol1) then + degsmall:=degree2 + degbig:=degree1 + dPbig:= defPol1 + rTbig:= repType1 + dPsmall:= defPol2 + rTsmall:= repType2 + -- 3) in every case we need a conversion between the polynomial + -- represented fields. Therefore we compute 'root' as a root of the + -- 'smaller' def. polynomial in the 'bigger' field. + -- We compute the matrix 'matsb', which i-th column are the coordinates + -- of the (i-1)-th power of root, i=1..degsmall. Multiplying a + -- coordinate vector of an element of the 'smaller' field by this + -- matrix, we got the coordinates of the corresponding element in the + -- 'bigger' field. + -- compute the root of dPsmall in the 'big' field + root:=rootOfIrreduciblePoly(dPsmall)$FFPOL2(FFP(GF,dPbig),GF) + -- set up matrix for polynomial conversion + matsb:=zero(degbig,degsmall)$M + qsetelt_!(matsb,1,1,1$GF)$M + a:=root + for i in 2..degsmall repeat + setColumn_!(matsb,i,coordinates(a)$FFP(GF,dPbig))$M + a := a *$FFP(GF,dPbig) root + -- the conversion from 'big' to 'small': we can't invert matsb + -- directly, because it has degbig rows and degsmall columns and + -- may be no square matrix. Therfore we construct a square matrix + -- mat from degsmall linear independent rows of matsb and invert it. + -- Now we get the conversion matrix 'matbs' for the conversion from + -- 'big' to 'small' by putting the columns of mat at the indices + -- of the linear independent rows of matsb to columns of matbs. + ra:I:=1 -- the rank + mat:M:=transpose(row(matsb,1))$M -- has already rank 1 + rowind:I:=2 + iVec:Vector I:=new(degsmall,1$I)$(Vector I) + while ra < degsmall repeat + if rank(vertConcat(mat,transpose(row(matsb,rowind))$M)$M)$M > ra then + mat:=vertConcat(mat,transpose(row(matsb,rowind))$M)$M + ra:=ra+1 + iVec.ra := rowind + rowind:=rowind + 1 + mat:=inverse(mat)$M :: M + matbs:=zero(degsmall,degbig)$M + for i in 1..degsmall repeat + setColumn_!(matbs,iVec.i,column(mat,i)$M)$M + -- print(matsb::OUT) + -- print(matbs::OUT) + -- 4) if the 'bigger' field is "normal" we have to compose the + -- polynomial conversion with a conversion from polynomial to normal + -- between the FFP(GF,dPbig) and FFNBP(GF,dPbig) the 'bigger' + -- field. Therefore we compute a conversion matrix 'mat' as in 1) + -- Multiplying with the inverse of 'mat' yields the desired + -- conversion from polynomial to normal. Multiplying this matrix by + -- the above computed 'matsb' we got the matrix for converting form + -- 'small polynomial' to 'big normal'. + -- set up matrix 'mat' for polynomial to normal + if rTbig = "normal" then + arr:=reducedQPowers(dPbig)$FFPOLY(GF) + mat:=zero(degbig,degbig)$M + for i in 1..degbig repeat + setColumn_!(mat,i,vectorise(arr.(i-1),degbig)$SUP(GF))$M + -- old code + --a:=basis()$FFP(GF,dPbig).2 -- the root of the def.Polynomial + --setColumn_!(mat,1,coordinates(a)$FFP(GF,dPbig))$M + --for i in 2..degbig repeat + -- a:= a **$FFP(GF,dPbig) size()$GF + -- setColumn_!(mat,i,coordinates(a)$FFP(GF,dPbig))$M + -- print(inverse(mat)$M::OUT) + matsb:= (inverse(mat)$M :: M) * matsb + -- print("inv *.."::OUT) + matbs:=matbs * mat + -- 5) if the 'smaller' field is "normal" we have first to convert + -- from 'small normal' to 'small polynomial', that is from + -- FFNBP(GF,dPsmall) to FFP(GF,dPsmall). Therefore we compute a + -- conversion matrix 'mat' as in 1). Multiplying with 'mat' + -- yields the desired conversion from normal to polynomial. + -- Multiplying the above computed 'matsb' with 'mat' we got the + -- matrix for converting form 'small normal' to 'big normal'. + -- set up matrix 'mat' for normal to polynomial + if rTsmall = "normal" then + arr:=reducedQPowers(dPsmall)$FFPOLY(GF) + mat:=zero(degsmall,degsmall)$M + for i in 1..degsmall repeat + setColumn_!(mat,i,vectorise(arr.(i-1),degsmall)$SUP(GF))$M + -- old code + --b:FFP(GF,dPsmall):=basis()$FFP(GF,dPsmall).2 + --setColumn_!(mat,1,coordinates(b)$FFP(GF,dPsmall))$M + --for i in 2..degsmall repeat + -- b:= b **$FFP(GF,dPsmall) size()$GF + -- setColumn_!(mat,i,coordinates(b)$FFP(GF,dPsmall))$M + -- print(mat::OUT) + matsb:= matsb * mat + matbs:= (inverse(mat) :: M) * matbs + -- now 'matsb' is the corret conversion matrix for 'small' to 'big' + -- and 'matbs' the corret one for 'big' to 'small'. + -- depending on the above ordering the conversion matrices are + -- initialized + dPbig =$(SUP GF) defPol2 => + conMat1to2 :=matsb + conMat2to1 :=matbs + -- print(conMat1to2::OUT) + -- print(conMat2to1::OUT) + -- print("conversion matrices initialized"::OUT) + --we finish the function for one case, hence reset initialization flag + init? := false + void()$Void + conMat1to2 :=matbs + conMat2to1 :=matsb + -- print(conMat1to2::OUT) + -- print(conMat2to1::OUT) + -- print("conversion matrices initialized"::OUT) + --we finish the function for one case, hence reset initialization flag + init? := false + void()$Void + + + coerce(x:F1) == + inGroundField?(x)$F1 => retract(x)$F1 :: F2 + -- if x is already in GF then we can use a simple coercion + defPol1 =$(SUP GF) defPol2 => convertWRTsameDefPol12(x) + convertWRTdifferentDefPol12(x) + + convertWRTsameDefPol12(x:F1) == + repType1 = repType2 => x pretend F2 + -- same groundfields, same defining polynomials, same + -- representation types --> F1 = F2, x is already in F2 + repType1 = "cyclic" => + x = 0$F1 => 0$F2 + -- the SI corresponding to the cyclic representation is the exponent of + -- the primitiveElement, therefore we exponentiate the primitiveElement + -- of F2 by it. + primitiveElement()$F2 **$F2 (x pretend SI) + repType2 = "cyclic" => + x = 0$F1 => 0$F2 + -- to get the exponent, we have to take the discrete logarithm of the + -- element in the given field. + (discreteLog(x)$F1 pretend SI) pretend F2 + -- here one of the representation types is "normal" + if init? then initialize() + -- here a conversion matrix is necessary, (see initialize()) + represents(conMat1to2 *$(Matrix GF) coordinates(x)$F1)$F2 + + convertWRTdifferentDefPol12(x:F1) == + if init? then initialize() + -- if we want to convert into a 'smaller' field, we have to test, + -- whether the element is in the subfield of the 'bigger' field, which + -- corresponds to the 'smaller' field + if degree1 > degree2 then + if positiveRemainder(degree2,degree(x)$F1)^= 0 then + error "coerce: element doesn't belong to smaller field" + represents(conMat1to2 *$(Matrix GF) coordinates(x)$F1)$F2 + +-- the three functions below equal the three functions above up to +-- '1' exchanged by '2' in all domain and variable names + + + coerce(x:F2) == + inGroundField?(x)$F2 => retract(x)$F2 :: F1 + -- if x is already in GF then we can use a simple coercion + defPol1 =$(SUP GF) defPol2 => convertWRTsameDefPol21(x) + convertWRTdifferentDefPol21(x) + + convertWRTsameDefPol21(x:F2) == + repType1 = repType2 => x pretend F1 + -- same groundfields, same defining polynomials, + -- same representation types --> F1 = F2, that is: + -- x is already in F1 + repType2 = "cyclic" => + x = 0$F2 => 0$F1 + primitiveElement()$F1 **$F1 (x pretend SI) + repType1 = "cyclic" => + x = 0$F2 => 0$F1 + (discreteLog(x)$F2 pretend SI) pretend F1 + -- here one of the representation types is "normal" + if init? then initialize() + represents(conMat2to1 *$(Matrix GF) coordinates(x)$F2)$F1 + + convertWRTdifferentDefPol21(x:F2) == + if init? then initialize() + if degree2 > degree1 then + if positiveRemainder(degree1,degree(x)$F2)^= 0 then + error "coerce: element doesn't belong to smaller field" + represents(conMat2to1 *$(Matrix GF) coordinates(x)$F2)$F1 + +@ +<>= +"FFHOM" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FFHOM"] +"FAXF" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FAXF"] +"FFHOM" -> "FAXF" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FFPOLY FiniteFieldPolynomialPackage} +\pagehead{FiniteFieldPolynomialPackage}{FFPOLY} +\pagepic{ps/v104finitefieldpolynomialpackage.ps}{FFPOLY}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FFPOLY FiniteFieldPolynomialPackage +++ Author: A. Bouyer, J. Grabmeier, A. Scheerhorn, R. Sutor, B. Trager +++ Date Created: January 1991 +++ Date Last Updated: 1 June 1994 +++ Basic Operations: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: finite field, polynomial, irreducible polynomial, normal +++ polynomial, primitive polynomial, random polynomials +++ References: +++ [LS] Lenstra, H. W. & Schoof, R. J., "Primitivive Normal Bases +++ for Finite Fields", Math. Comp. 48, 1987, pp. 217-231 +++ [LN] Lidl, R. & Niederreiter, H., "Finite Fields", +++ Encycl. of Math. 20, Addison-Wesley, 1983 +++ J. Grabmeier, A. Scheerhorn: Finite Fields in Axiom. +++ Axiom Technical Report Series, to appear. +++ Description: +++ This package provides a number of functions for generating, counting +++ and testing irreducible, normal, primitive, random polynomials +++ over finite fields. + +FiniteFieldPolynomialPackage GF : Exports == Implementation where + + GF : FiniteFieldCategory + + I ==> Integer + L ==> List + NNI ==> NonNegativeInteger + PI ==> PositiveInteger + Rec ==> Record(expnt:NNI, coeff:GF) + Repr ==> L Rec + SUP ==> SparseUnivariatePolynomial GF + + Exports ==> with + -- qEulerPhiCyclotomic : PI -> PI +-- ++ qEulerPhiCyclotomic(n)$FFPOLY(GF) yields the q-Euler's function +-- ++ of the n-th cyclotomic polynomial over the field {\em GF} of +-- ++ order q (cf. [LN] p.122); +-- ++ error if n is a multiple of the field characteristic. + primitive? : SUP -> Boolean + ++ primitive?(f) tests whether the polynomial f over a finite + ++ field is primitive, i.e. all its roots are primitive. + normal? : SUP -> Boolean + ++ normal?(f) tests whether the polynomial f over a finite field is + ++ normal, i.e. its roots are linearly independent over the field. + numberOfIrreduciblePoly : PI -> PI + ++ numberOfIrreduciblePoly(n)$FFPOLY(GF) yields the number of + ++ monic irreducible univariate polynomials of degree n + ++ over the finite field {\em GF}. + numberOfPrimitivePoly : PI -> PI + ++ numberOfPrimitivePoly(n)$FFPOLY(GF) yields the number of + ++ primitive polynomials of degree n over the finite field {\em GF}. + numberOfNormalPoly : PI -> PI + ++ numberOfNormalPoly(n)$FFPOLY(GF) yields the number of + ++ normal polynomials of degree n over the finite field {\em GF}. + createIrreduciblePoly : PI -> SUP + ++ createIrreduciblePoly(n)$FFPOLY(GF) generates a monic irreducible + ++ univariate polynomial of degree n over the finite field {\em GF}. + createPrimitivePoly : PI -> SUP + ++ createPrimitivePoly(n)$FFPOLY(GF) generates a primitive polynomial + ++ of degree n over the finite field {\em GF}. + createNormalPoly : PI -> SUP + ++ createNormalPoly(n)$FFPOLY(GF) generates a normal polynomial + ++ of degree n over the finite field {\em GF}. + createNormalPrimitivePoly : PI -> SUP + ++ createNormalPrimitivePoly(n)$FFPOLY(GF) generates a normal and + ++ primitive polynomial of degree n over the field {\em GF}. + ++ Note: this function is equivalent to createPrimitiveNormalPoly(n) + createPrimitiveNormalPoly : PI -> SUP + ++ createPrimitiveNormalPoly(n)$FFPOLY(GF) generates a normal and + ++ primitive polynomial of degree n over the field {\em GF}. + ++ polynomial of degree n over the field {\em GF}. + nextIrreduciblePoly : SUP -> Union(SUP, "failed") + ++ nextIrreduciblePoly(f) yields the next monic irreducible polynomial + ++ over a finite field {\em GF} of the same degree as f in the following + ++ order, or "failed" if there are no greater ones. + ++ Error: if f has degree 0. + ++ Note: the input polynomial f is made monic. + ++ Also, \spad{f < g} if + ++ the number of monomials of f is less + ++ than this number for g. + ++ If f and g have the same number of monomials, + ++ the lists of exponents are compared lexicographically. + ++ If these lists are also equal, the lists of coefficients + ++ are compared according to the lexicographic ordering induced by + ++ the ordering of the elements of {\em GF} given by {\em lookup}. + nextPrimitivePoly : SUP -> Union(SUP, "failed") + ++ nextPrimitivePoly(f) yields the next primitive polynomial over + ++ a finite field {\em GF} of the same degree as f in the following + ++ order, or "failed" if there are no greater ones. + ++ Error: if f has degree 0. + ++ Note: the input polynomial f is made monic. + ++ Also, \spad{f < g} if the {\em lookup} of the constant term + ++ of f is less than + ++ this number for g. + ++ If these values are equal, then \spad{f < g} if + ++ if the number of monomials of f is less than that for g or if + ++ the lists of exponents of f are lexicographically less than the + ++ corresponding list for g. + ++ If these lists are also equal, the lists of coefficients are + ++ compared according to the lexicographic ordering induced by + ++ the ordering of the elements of {\em GF} given by {\em lookup}. + nextNormalPoly : SUP -> Union(SUP, "failed") + ++ nextNormalPoly(f) yields the next normal polynomial over + ++ a finite field {\em GF} of the same degree as f in the following + ++ order, or "failed" if there are no greater ones. + ++ Error: if f has degree 0. + ++ Note: the input polynomial f is made monic. + ++ Also, \spad{f < g} if the {\em lookup} of the coefficient + ++ of the term of degree + ++ {\em n-1} of f is less than that for g. + ++ In case these numbers are equal, \spad{f < g} if + ++ if the number of monomials of f is less that for g or if + ++ the list of exponents of f are lexicographically less than the + ++ corresponding list for g. + ++ If these lists are also equal, the lists of coefficients are + ++ compared according to the lexicographic ordering induced by + ++ the ordering of the elements of {\em GF} given by {\em lookup}. + nextNormalPrimitivePoly : SUP -> Union(SUP, "failed") + ++ nextNormalPrimitivePoly(f) yields the next normal primitive polynomial + ++ over a finite field {\em GF} of the same degree as f in the following + ++ order, or "failed" if there are no greater ones. + ++ Error: if f has degree 0. + ++ Note: the input polynomial f is made monic. + ++ Also, \spad{f < g} if the {\em lookup} of the constant + ++ term of f is less than + ++ this number for g or if + ++ {\em lookup} of the coefficient of the term of degree {\em n-1} + ++ of f is less than this number for g. + ++ Otherwise, \spad{f < g} + ++ if the number of monomials of f is less than + ++ that for g or if the lists of exponents for f are + ++ lexicographically less than those for g. + ++ If these lists are also equal, the lists of coefficients are + ++ compared according to the lexicographic ordering induced by + ++ the ordering of the elements of {\em GF} given by {\em lookup}. + ++ This operation is equivalent to nextPrimitiveNormalPoly(f). + nextPrimitiveNormalPoly : SUP -> Union(SUP, "failed") + ++ nextPrimitiveNormalPoly(f) yields the next primitive normal polynomial + ++ over a finite field {\em GF} of the same degree as f in the following + ++ order, or "failed" if there are no greater ones. + ++ Error: if f has degree 0. + ++ Note: the input polynomial f is made monic. + ++ Also, \spad{f < g} if the {\em lookup} of the + ++ constant term of f is less than + ++ this number for g or, in case these numbers are equal, if the + ++ {\em lookup} of the coefficient of the term of degree {\em n-1} + ++ of f is less than this number for g. + ++ If these numbers are equals, \spad{f < g} + ++ if the number of monomials of f is less than + ++ that for g, or if the lists of exponents for f are lexicographically + ++ less than those for g. + ++ If these lists are also equal, the lists of coefficients are + ++ coefficients according to the lexicographic ordering induced by + ++ the ordering of the elements of {\em GF} given by {\em lookup}. + ++ This operation is equivalent to nextNormalPrimitivePoly(f). +-- random : () -> SUP +-- ++ random()$FFPOLY(GF) generates a random monic polynomial +-- ++ of random degree over the field {\em GF} + random : PI -> SUP + ++ random(n)$FFPOLY(GF) generates a random monic polynomial + ++ of degree n over the finite field {\em GF}. + random : (PI, PI) -> SUP + ++ random(m,n)$FFPOLY(GF) generates a random monic polynomial + ++ of degree d over the finite field {\em GF}, d between m and n. + leastAffineMultiple: SUP -> SUP + ++ leastAffineMultiple(f) computes the least affine polynomial which + ++ is divisible by the polynomial f over the finite field {\em GF}, + ++ i.e. a polynomial whose exponents are 0 or a power of q, the + ++ size of {\em GF}. + reducedQPowers: SUP -> PrimitiveArray SUP + ++ reducedQPowers(f) + ++ generates \spad{[x,x**q,x**(q**2),...,x**(q**(n-1))]} + ++ reduced modulo f where \spad{q = size()$GF} and \spad{n = degree f}. + -- + -- we intend to implement also the functions + -- cyclotomicPoly: PI -> SUP, order: SUP -> PI, + -- and maybe a new version of irreducible? + + + Implementation ==> add + + import IntegerNumberTheoryFunctions + import DistinctDegreeFactorize(GF, SUP) + + + MM := ModMonic(GF, SUP) + + sizeGF : PI := size()$GF :: PI + + revListToSUP(l:Repr):SUP == + newl:Repr := empty() + -- cannot use map since copy for Record is an XLAM + for t in l repeat newl := cons(copy t, newl) + newl pretend SUP + + listToSUP(l:Repr):SUP == + newl:Repr := [copy t for t in l] + newl pretend SUP + + nextSubset : (L NNI, NNI) -> Union(L NNI, "failed") + -- for a list s of length m with 1 <= s.1 < ... < s.m <= bound, + -- nextSubset(s, bound) yields the immediate successor of s + -- (resp. "failed" if s = [1,...,bound]) + -- where s < t if and only if: + -- (i) #s < #t; or + -- (ii) #s = #t and s < t in the lexicographical order; + -- (we have chosen to fix the signature with NNI instead of PI + -- to avoid coercions in the main functions) + + reducedQPowers(f) == + m:PI:=degree(f)$SUP pretend PI + m1:I:=m-1 + setPoly(f)$MM + e:=reduce(monomial(1,1)$SUP)$MM ** sizeGF + w:=1$MM + qpow:PrimitiveArray SUP:=new(m,0) + qpow.0:=1$SUP + for i in 1..m1 repeat qpow.i:=lift(w:=w*e)$MM + qexp:PrimitiveArray SUP:=new(m,0) + m = 1 => + qexp.(0$I):= (-coefficient(f,0$NNI)$SUP)::SUP + qexp + qexp.0$I:=monomial(1,1)$SUP + h:=qpow.1 + qexp.1:=h + for i in 2..m1 repeat + g:=0$SUP + while h ^= 0 repeat + g:=g + leadingCoefficient(h) * qpow.degree(h) + h:=reductum(h) + qexp.i:=(h:=g) + qexp + + leastAffineMultiple(f) == + -- [LS] p.112 + qexp:=reducedQPowers(f) + n:=degree(f)$SUP + b:Matrix GF:= transpose matrix [entries vectorise + (qexp.i,n) for i in 0..n-1] + col1:Matrix GF:= new(n,1,0) + col1(1,1) := 1 + ns : List Vector GF := nullSpace (horizConcat(col1,b) ) + ---------------------------------------------------------------- + -- perhaps one should use that the first vector in ns is already + -- the right one + ---------------------------------------------------------------- + dim:=n+2 + coeffVector : Vector GF + until empty? ns repeat + newCoeffVector := ns.1 + i : PI :=(n+1) pretend PI + while newCoeffVector(i) = 0 repeat + i := (i - 1) pretend PI + if i < dim then + dim := i + coeffVector := newCoeffVector + ns := rest ns + (coeffVector(1)::SUP) +(+/[monomial(coeffVector.k, _ + sizeGF**((k-2)::NNI))$SUP for k in 2..dim]) + +-- qEulerPhiCyclotomic n == +-- n = 1 => (sizeGF - 1) pretend PI +-- p : PI := characteristic()$GF :: PI +-- (n rem p) = 0 => error +-- "cyclotomic polynomial not defined for this argument value" +-- q : PI := sizeGF +-- -- determine the multiplicative order of q modulo n +-- e : PI := 1 +-- qe : PI := q +-- while (qe rem n) ^= 1 repeat +-- e := e + 1 +-- qe := qe * q +-- ((qe - 1) ** ((eulerPhi(n) quo e) pretend PI) ) pretend PI + + numberOfIrreduciblePoly n == + -- we compute the number Nq(n) of monic irreducible polynomials + -- of degree n over the field GF of order q by the formula + -- Nq(n) = (1/n)* sum(moebiusMu(n/d)*q**d) where the sum extends + -- over all divisors d of n (cf. [LN] p.93, Th. 3.25) + n = 1 => sizeGF + -- the contribution of d = 1 : + lastd : PI := 1 + qd : PI := sizeGF + sum : I := moebiusMu(n) * qd + -- the divisors d > 1 of n : + divisorsOfn : L PI := rest(divisors n) pretend L PI + for d in divisorsOfn repeat + qd := qd * (sizeGF) ** ((d - lastd) pretend PI) + sum := sum + moebiusMu(n quo d) * qd + lastd := d + (sum quo n) :: PI + + numberOfPrimitivePoly n == (eulerPhi((sizeGF ** n) - 1) quo n) :: PI + -- [each root of a primitive polynomial of degree n over a field + -- with q elements is a generator of the multiplicative group + -- of a field of order q**n (definition), and the number of such + -- generators is precisely eulerPhi(q**n - 1)] + + numberOfNormalPoly n == + -- we compute the number Nq(n) of normal polynomials of degree n + -- in GF[X], with GF of order q, by the formula + -- Nq(n) = (1/n) * qPhi(X**n - 1) (cf. [LN] p.124) where, + -- for any polynomial f in GF[X] of positive degree n, + -- qPhi(f) = q**n * (1 - q**(-n1)) *...* (1 - q**(-nr)) = + -- q**n * ((q**(n1)-1) / q**(n1)) *...* ((q**(nr)-1) / q**(n_r)), + -- the ni being the degrees of the distinct irreducible factors + -- of f in its canonical factorization over GF + -- ([LN] p.122, Lemma 3.69). + -- hence, if n = m * p**r where p is the characteristic of GF + -- and gcd(m,p) = 1, we get + -- Nq(n) = (1/n)* q**(n-m) * qPhi(X**m - 1) + -- now X**m - 1 is the product of the (pairwise relatively prime) + -- cyclotomic polynomials Qd(X) for which d divides m + -- ([LN] p.64, Th. 2.45), and each Qd(X) factors into + -- eulerPhi(d)/e (distinct) monic irreducible polynomials in GF[X] + -- of the same degree e, where e is the least positive integer k + -- such that d divides q**k - 1 ([LN] p.65, Th. 2.47) + n = 1 => (sizeGF - 1) :: NNI :: PI + m : PI := n + p : PI := characteristic()$GF :: PI + q : PI := sizeGF + while (m rem p) = 0 repeat -- find m such that + m := (m quo p) :: PI -- n = m * p**r and gcd(m,p) = 1 + m = 1 => + -- know that n is a power of p + (((q ** ((n-1)::NNI) ) * (q - 1) ) quo n) :: PI + prod : I := q - 1 + divisorsOfm : L PI := rest(divisors m) pretend L PI + for d in divisorsOfm repeat + -- determine the multiplicative order of q modulo d + e : PI := 1 + qe : PI := q + while (qe rem d) ^= 1 repeat + e := e + 1 + qe := qe * q + prod := prod * _ + ((qe - 1) ** ((eulerPhi(d) quo e) pretend PI) ) pretend PI + (q**((n-m) pretend PI) * prod quo n) pretend PI + + primitive? f == + -- let GF be a field of order q; a monic polynomial f in GF[X] + -- of degree n is primitive over GF if and only if its constant + -- term is non-zero, f divides X**(q**n - 1) - 1 and, + -- for each prime divisor d of q**n - 1, + -- f does not divide X**((q**n - 1) / d) - 1 + -- (cf. [LN] p.89, Th. 3.16, and p.87, following Th. 3.11) + n : NNI := degree f + n = 0 => false + leadingCoefficient f ^= 1 => false + coefficient(f, 0) = 0 => false + q : PI := sizeGF + qn1: PI := (q**n - 1) :: NNI :: PI + setPoly f + x := reduce(monomial(1,1)$SUP)$MM -- X rem f represented in MM + -- + -- may be improved by tabulating the residues x**(i*q) + -- for i = 0,...,n-1 : + -- + lift(x ** qn1)$MM ^= 1 => false -- X**(q**n - 1) rem f in GF[X] + lrec : L Record(factor:I, exponent:I) := factors(factor qn1) + lfact : L PI := [] -- collect the prime factors + for rec in lrec repeat -- of q**n - 1 + lfact := cons((rec.factor) :: PI, lfact) + for d in lfact repeat + if (expt := (qn1 quo d)) >= n then + lift(x ** expt)$MM = 1 => return false + true + + normal? f == + -- let GF be a field with q elements; a monic irreducible + -- polynomial f in GF[X] of degree n is normal if its roots + -- x, x**q, ... , x**(q**(n-1)) are linearly independent over GF + n : NNI := degree f + n = 0 => false + leadingCoefficient f ^= 1 => false + coefficient(f, 0) = 0 => false + n = 1 => true + not irreducible? f => false + g:=reducedQPowers(f) + l:=[entries vectorise(g.i,n)$SUP for i in 0..(n-1)::NNI] + rank(matrix(l)$Matrix(GF)) = n => true + false + + nextSubset(s, bound) == + m : NNI := #(s) + m = 0 => [1] + -- find the first element s(i) of s such that s(i) + 1 < s(i+1) : + noGap : Boolean := true + i : NNI := 0 + restOfs : L NNI + while noGap and not empty?(restOfs := rest s) repeat + -- after i steps (0 <= i <= m-1) we have s = [s(i), ... , s(m)] + -- and restOfs = [s(i+1), ... , s(m)] + secondOfs := first restOfs -- s(i+1) + firstOfsPlus1 := first s + 1 -- s(i) + 1 + secondOfs = firstOfsPlus1 => + s := restOfs + i := i + 1 + setfirst_!(s, firstOfsPlus1) -- s := [s(i)+1, s(i+1),..., s(m)] + noGap := false + if noGap then -- here s = [s(m)] + firstOfs := first s + firstOfs < bound => setfirst_!(s, firstOfs + 1) -- s := [s(m)+1] + m < bound => + setfirst_!(s, m + 1) -- s := [m+1] + i := m + return "failed" -- (here m = s(m) = bound) + for j in i..1 by -1 repeat -- reconstruct the destroyed + s := cons(j, s) -- initial part of s + s + + nextIrreduciblePoly f == + n : NNI := degree f + n = 0 => error "polynomial must have positive degree" + -- make f monic + if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f + -- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero + -- then fRepr := [[n,fn], ... , [i0,f{i0}]] + fRepr : Repr := f pretend Repr + fcopy : Repr := [] + -- we can not simply write fcopy := copy fRepr because + -- the input(!) f would be modified by assigning + -- a new value to one of its records + for term in fRepr repeat + fcopy := cons(copy term, fcopy) + if term.expnt ^= 0 then + fcopy := cons([0,0]$Rec, fcopy) + tailpol : Repr := [] + headpol : Repr := fcopy -- [[0,f0], ... , [n,fn]] where + -- fi is non-zero for i > 0 + fcopy := reverse fcopy + weight : NNI := (#(fcopy) - 1) :: NNI -- #s(f) as explained above + taillookuplist : L NNI := [] + -- the zeroes in the headlookuplist stand for the fi + -- whose lookup's were not yet computed : + headlookuplist : L NNI := new(weight, 0) + s : L NNI := [] -- we will compute s(f) only if necessary + n1 : NNI := (n - 1) :: NNI + repeat + -- (run through the possible weights) + while not empty? headlookuplist repeat + -- find next polynomial in the above order with fixed weight; + -- assume at this point we have + -- headpol = [[i1,f{i1}], [i2,f{i2}], ... , [n,1]] + -- and tailpol = [[k,fk], ... , [0,f0]] (with k < i1) + term := first headpol + j := first headlookuplist + if j = 0 then j := lookup(term.coeff)$GF + j := j + 1 -- lookup(f{i1})$GF + 1 + j rem sizeGF = 0 => + -- in this case one has to increase f{i2} + tailpol := cons(term, tailpol) -- [[i1,f{i1}],...,[0,f0]] + headpol := rest headpol -- [[i2,f{i2}],...,[n,1]] + taillookuplist := cons(j, taillookuplist) + headlookuplist := rest headlookuplist + -- otherwise set f{i1} := index(j)$GF + setelt(first headpol, coeff, index(j :: PI)$GF) + setfirst_!(headlookuplist, j) + if empty? taillookuplist then + pol := revListToSUP(headpol) + -- + -- may be improved by excluding reciprocal polynomials + -- + irreducible? pol => return pol + else + -- go back to fk + headpol := cons(first tailpol, headpol) -- [[k,fk],...,[n,1]] + tailpol := rest tailpol + headlookuplist := cons(first taillookuplist, headlookuplist) + taillookuplist := rest taillookuplist + -- must search for polynomial with greater weight + if empty? s then -- compute s(f) + restfcopy := rest fcopy + for entry in restfcopy repeat s := cons(entry.expnt, s) + weight = n => return "failed" + s1 := nextSubset(rest s, n1) :: L NNI + s := cons(0, s1) + weight := #s + taillookuplist := [] + headlookuplist := cons(sizeGF, new((weight-1) :: NNI, 1)) + tailpol := [] + headpol := [] -- [[0,0], [s.2,1], ... , [s.weight,1], [n,1]] : + s1 := cons(n, reverse s1) + while not empty? s1 repeat + headpol := cons([first s1, 1]$Rec, headpol) + s1 := rest s1 + headpol := cons([0, 0]$Rec, headpol) + + nextPrimitivePoly f == + n : NNI := degree f + n = 0 => error "polynomial must have positive degree" + -- make f monic + if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f + -- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero + -- then fRepr := [[n,fn], ... , [i0,f{i0}]] + fRepr : Repr := f pretend Repr + fcopy : Repr := [] + -- we can not simply write fcopy := copy fRepr because + -- the input(!) f would be modified by assigning + -- a new value to one of its records + for term in fRepr repeat + fcopy := cons(copy term, fcopy) + if term.expnt ^= 0 then + term := [0,0]$Rec + fcopy := cons(term, fcopy) + fcopy := reverse fcopy + xn : Rec := first fcopy + c0 : GF := term.coeff + l : NNI := lookup(c0)$GF rem sizeGF + n = 1 => + -- the polynomial X + c is primitive if and only if -c + -- is a primitive element of GF + q1 : NNI := (sizeGF - 1) :: NNI + while l < q1 repeat -- find next c such that -c is primitive + l := l + 1 + c := index(l :: PI)$GF + primitive?(-c)$GF => + return [xn, [0,c]$Rec] pretend SUP + "failed" + weight : NNI := (#(fcopy) - 1) :: NNI -- #s(f)+1 as explained above + s : L NNI := [] -- we will compute s(f) only if necessary + n1 : NNI := (n - 1) :: NNI + -- a necessary condition for a monic polynomial f of degree n + -- over GF to be primitive is that (-1)**n * f(0) be a + -- primitive element of GF (cf. [LN] p.90, Th. 3.18) + c : GF := c0 + while l < sizeGF repeat + -- (run through the possible values of the constant term) + noGenerator : Boolean := true + while noGenerator and l < sizeGF repeat + -- find least c >= c0 such that (-1)^n c0 is primitive + primitive?((-1)**n * c)$GF => noGenerator := false + l := l + 1 + c := index(l :: PI)$GF + noGenerator => return "failed" + constterm : Rec := [0, c]$Rec + if c = c0 and weight > 1 then + headpol : Repr := rest reverse fcopy -- [[i0,f{i0}],...,[n,1]] + -- fi is non-zero for i>0 + -- the zeroes in the headlookuplist stand for the fi + -- whose lookup's were not yet computed : + headlookuplist : L NNI := new(weight, 0) + else + -- X**n + c can not be primitive for n > 1 (cf. [LN] p.90, + -- Th. 3.18); next possible polynomial is X**n + X + c + headpol : Repr := [[1,0]$Rec, xn] -- 0*X + X**n + headlookuplist : L NNI := [sizeGF] + s := [0,1] + weight := 2 + tailpol : Repr := [] + taillookuplist : L NNI := [] + notReady : Boolean := true + while notReady repeat + -- (run through the possible weights) + while not empty? headlookuplist repeat + -- find next polynomial in the above order with fixed + -- constant term and weight; assume at this point we have + -- headpol = [[i1,f{i1}], [i2,f{i2}], ... , [n,1]] and + -- tailpol = [[k,fk],...,[k0,fk0]] (k0<... + -- in this case one has to increase f{i2} + tailpol := cons(term, tailpol) -- [[i1,f{i1}],...,[k0,f{k0}]] + headpol := rest headpol -- [[i2,f{i2}],...,[n,1]] + taillookuplist := cons(j, taillookuplist) + headlookuplist := rest headlookuplist + -- otherwise set f{i1} := index(j)$GF + setelt(first headpol, coeff, index(j :: PI)$GF) + setfirst_!(headlookuplist, j) + if empty? taillookuplist then + pol := revListToSUP cons(constterm, headpol) + -- + -- may be improved by excluding reciprocal polynomials + -- + primitive? pol => return pol + else + -- go back to fk + headpol := cons(first tailpol, headpol) -- [[k,fk],...,[n,1]] + tailpol := rest tailpol + headlookuplist := cons(first taillookuplist, + headlookuplist) + taillookuplist := rest taillookuplist + if weight = n then notReady := false + else + -- must search for polynomial with greater weight + if empty? s then -- compute s(f) + restfcopy := rest fcopy + for entry in restfcopy repeat s := cons(entry.expnt, s) + s1 := nextSubset(rest s, n1) :: L NNI + s := cons(0, s1) + weight := #s + taillookuplist := [] + headlookuplist := cons(sizeGF, new((weight-2) :: NNI, 1)) + tailpol := [] + -- headpol = [[s.2,0], [s.3,1], ... , [s.weight,1], [n,1]] : + headpol := [[first s1, 0]$Rec] + while not empty? (s1 := rest s1) repeat + headpol := cons([first s1, 1]$Rec, headpol) + headpol := reverse cons([n, 1]$Rec, headpol) + -- next polynomial must have greater constant term + l := l + 1 + c := index(l :: PI)$GF + "failed" + + nextNormalPoly f == + n : NNI := degree f + n = 0 => error "polynomial must have positive degree" + -- make f monic + if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f + -- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero + -- then fRepr := [[n,fn], ... , [i0,f{i0}]] + fRepr : Repr := f pretend Repr + fcopy : Repr := [] + -- we can not simply write fcopy := copy fRepr because + -- the input(!) f would be modified by assigning + -- a new value to one of its records + for term in fRepr repeat + fcopy := cons(copy term, fcopy) + if term.expnt ^= 0 then + term := [0,0]$Rec + fcopy := cons(term, fcopy) + fcopy := reverse fcopy -- [[n,1], [r,fr], ... , [0,f0]] + xn : Rec := first fcopy + middlepol : Repr := rest fcopy -- [[r,fr], ... , [0,f0]] + a0 : GF := (first middlepol).coeff -- fr + l : NNI := lookup(a0)$GF rem sizeGF + n = 1 => + -- the polynomial X + a is normal if and only if a is not zero + l = sizeGF - 1 => "failed" + [xn, [0, index((l+1) :: PI)$GF]$Rec] pretend SUP + n1 : NNI := (n - 1) :: NNI + n2 : NNI := (n1 - 1) :: NNI + -- if the polynomial X**n + a * X**(n-1) + ... is normal then + -- a = -(x + x**q +...+ x**(q**n)) can not be zero (where q = #GF) + a : GF := a0 + -- if a = 0 then set a := 1 + if l = 0 then + l := 1 + a := 1$GF + while l < sizeGF repeat + -- (run through the possible values of a) + if a = a0 then + -- middlepol = [[0,f0], ... , [m,fm]] with m < n-1 + middlepol := reverse rest middlepol + weight : NNI := #middlepol -- #s(f) as explained above + -- the zeroes in the middlelookuplist stand for the fi + -- whose lookup's were not yet computed : + middlelookuplist : L NNI := new(weight, 0) + s : L NNI := [] -- we will compute s(f) only if necessary + else + middlepol := [[0,0]$Rec] + middlelookuplist : L NNI := [sizeGF] + s : L NNI := [0] + weight : NNI := 1 + headpol : Repr := [xn, [n1, a]$Rec] -- X**n + a * X**(n-1) + tailpol : Repr := [] + taillookuplist : L NNI := [] + notReady : Boolean := true + while notReady repeat + -- (run through the possible weights) + while not empty? middlelookuplist repeat + -- find next polynomial in the above order with fixed + -- a and weight; assume at this point we have + -- middlepol = [[i1,f{i1}], [i2,f{i2}], ... , [m,fm]] and + -- tailpol = [[k,fk],...,[0,f0]] ( with k + -- in this case one has to increase f{i2} + -- tailpol = [[i1,f{i1}],...,[0,f0]] + tailpol := cons(term, tailpol) + middlepol := rest middlepol -- [[i2,f{i2}],...,[m,fm]] + taillookuplist := cons(j, taillookuplist) + middlelookuplist := rest middlelookuplist + -- otherwise set f{i1} := index(j)$GF + setelt(first middlepol, coeff, index(j :: PI)$GF) + setfirst_!(middlelookuplist, j) + if empty? taillookuplist then + pol := listToSUP append(headpol, reverse middlepol) + -- + -- may be improved by excluding reciprocal polynomials + -- + normal? pol => return pol + else + -- go back to fk + -- middlepol = [[k,fk],...,[m,fm]] + middlepol := cons(first tailpol, middlepol) + tailpol := rest tailpol + middlelookuplist := cons(first taillookuplist, + middlelookuplist) + taillookuplist := rest taillookuplist + if weight = n1 then notReady := false + else + -- must search for polynomial with greater weight + if empty? s then -- compute s(f) + restfcopy := rest rest fcopy + for entry in restfcopy repeat s := cons(entry.expnt, s) + s1 := nextSubset(rest s, n2) :: L NNI + s := cons(0, s1) + weight := #s + taillookuplist := [] + middlelookuplist := cons(sizeGF, new((weight-1) :: NNI, 1)) + tailpol := [] + -- middlepol = [[0,0], [s.2,1], ... , [s.weight,1]] : + middlepol := [] + s1 := reverse s1 + while not empty? s1 repeat + middlepol := cons([first s1, 1]$Rec, middlepol) + s1 := rest s1 + middlepol := cons([0,0]$Rec, middlepol) + -- next polynomial must have greater a + l := l + 1 + a := index(l :: PI)$GF + "failed" + + nextNormalPrimitivePoly f == + n : NNI := degree f + n = 0 => error "polynomial must have positive degree" + -- make f monic + if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f + -- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero + -- then fRepr := [[n,fn], ... , [i0,f{i0}]] + fRepr : Repr := f pretend Repr + fcopy : Repr := [] + -- we can not simply write fcopy := copy fRepr because + -- the input(!) f would be modified by assigning + -- a new value to one of its records + for term in fRepr repeat + fcopy := cons(copy term, fcopy) + if term.expnt ^= 0 then + term := [0,0]$Rec + fcopy := cons(term, fcopy) + fcopy := reverse fcopy -- [[n,1], [r,fr], ... , [0,f0]] + xn : Rec := first fcopy + c0 : GF := term.coeff + lc : NNI := lookup(c0)$GF rem sizeGF + n = 1 => + -- the polynomial X + c is primitive if and only if -c + -- is a primitive element of GF + q1 : NNI := (sizeGF - 1) :: NNI + while lc < q1 repeat -- find next c such that -c is primitive + lc := lc + 1 + c := index(lc :: PI)$GF + primitive?(-c)$GF => + return [xn, [0,c]$Rec] pretend SUP + "failed" + n1 : NNI := (n - 1) :: NNI + n2 : NNI := (n1 - 1) :: NNI + middlepol : Repr := rest fcopy -- [[r,fr],...,[i0,f{i0}],[0,f0]] + a0 : GF := (first middlepol).coeff + la : NNI := lookup(a0)$GF rem sizeGF + -- if the polynomial X**n + a * X**(n-1) +...+ c is primitive and + -- normal over GF then (-1)**n * c is a primitive element of GF + -- (cf. [LN] p.90, Th. 3.18), and a = -(x + x**q +...+ x**(q**n)) + -- is not zero (where q = #GF) + c : GF := c0 + a : GF := a0 + -- if a = 0 then set a := 1 + if la = 0 then + la := 1 + a := 1$GF + while lc < sizeGF repeat + -- (run through the possible values of the constant term) + noGenerator : Boolean := true + while noGenerator and lc < sizeGF repeat + -- find least c >= c0 such that (-1)**n * c0 is primitive + primitive?((-1)**n * c)$GF => noGenerator := false + lc := lc + 1 + c := index(lc :: PI)$GF + noGenerator => return "failed" + constterm : Rec := [0, c]$Rec + while la < sizeGF repeat + -- (run through the possible values of a) + headpol : Repr := [xn, [n1, a]$Rec] -- X**n + a X**(n-1) + if c = c0 and a = a0 then + -- middlepol = [[i0,f{i0}], ... , [m,fm]] with m < n-1 + middlepol := rest reverse rest middlepol + weight : NNI := #middlepol + 1 -- #s(f)+1 as explained above + -- the zeroes in the middlelookuplist stand for the fi + -- whose lookup's were not yet computed : + middlelookuplist : L NNI := new((weight-1) :: NNI, 0) + s : L NNI := [] -- we will compute s(f) only if necessary + else + pol := listToSUP append(headpol, [constterm]) + normal? pol and primitive? pol => return pol + middlepol := [[1,0]$Rec] + middlelookuplist : L NNI := [sizeGF] + s : L NNI := [0,1] + weight : NNI := 2 + tailpol : Repr := [] + taillookuplist : L NNI := [] + notReady : Boolean := true + while notReady repeat + -- (run through the possible weights) + while not empty? middlelookuplist repeat + -- find next polynomial in the above order with fixed + -- c, a and weight; assume at this point we have + -- middlepol = [[i1,f{i1}], [i2,f{i2}], ... , [m,fm]] + -- tailpol = [[k,fk],...,[k0,fk0]] (k0<... + -- in this case one has to increase f{i2} + -- tailpol = [[i1,f{i1}],...,[k0,f{k0}]] + tailpol := cons(term, tailpol) + middlepol := rest middlepol -- [[i2,f{i2}],...,[m,fm]] + taillookuplist := cons(j, taillookuplist) + middlelookuplist := rest middlelookuplist + -- otherwise set f{i1} := index(j)$GF + setelt(first middlepol, coeff, index(j :: PI)$GF) + setfirst_!(middlelookuplist, j) + if empty? taillookuplist then + pol := listToSUP append(headpol, reverse + cons(constterm, middlepol)) + -- + -- may be improved by excluding reciprocal polynomials + -- + normal? pol and primitive? pol => return pol + else + -- go back to fk + -- middlepol = [[k,fk],...,[m,fm]] + middlepol := cons(first tailpol, middlepol) + tailpol := rest tailpol + middlelookuplist := cons(first taillookuplist, + middlelookuplist) + taillookuplist := rest taillookuplist + if weight = n1 then notReady := false + else + -- must search for polynomial with greater weight + if empty? s then -- compute s(f) + restfcopy := rest rest fcopy + for entry in restfcopy repeat s := cons(entry.expnt, s) + s1 := nextSubset(rest s, n2) :: L NNI + s := cons(0, s1) + weight := #s + taillookuplist := [] + middlelookuplist := cons(sizeGF, new((weight-2)::NNI, 1)) + tailpol := [] + -- middlepol = [[s.2,0], [s.3,1], ... , [s.weight,1] : + middlepol := [[first s1, 0]$Rec] + while not empty? (s1 := rest s1) repeat + middlepol := cons([first s1, 1]$Rec, middlepol) + middlepol := reverse middlepol + -- next polynomial must have greater a + la := la + 1 + a := index(la :: PI)$GF + -- next polynomial must have greater constant term + lc := lc + 1 + c := index(lc :: PI)$GF + la := 1 + a := 1$GF + "failed" + + nextPrimitiveNormalPoly f == nextNormalPrimitivePoly f + + createIrreduciblePoly n == + x := monomial(1,1)$SUP + n = 1 => x + xn := monomial(1,n)$SUP + n >= sizeGF => nextIrreduciblePoly(xn + x) :: SUP + -- (since in this case there is most no irreducible binomial X+a) + odd? n => nextIrreduciblePoly(xn + 1) :: SUP + nextIrreduciblePoly(xn) :: SUP + + createPrimitivePoly n == + -- (see also the comments in the code of nextPrimitivePoly) + xn := monomial(1,n)$SUP + n = 1 => xn + monomial(-primitiveElement()$GF, 0)$SUP + c0 : GF := (-1)**n * primitiveElement()$GF + constterm : Rec := [0, c0]$Rec + -- try first (probably faster) the polynomials + -- f = X**n + f{n-1}*X**(n-1) +...+ f1*X + c0 for which + -- fi is 0 or 1 for i=1,...,n-1, + -- and this in the order used to define nextPrimitivePoly + s : L NNI := [0,1] + weight : NNI := 2 + s1 : L NNI := [1] + n1 : NNI := (n - 1) :: NNI + notReady : Boolean := true + while notReady repeat + polRepr : Repr := [constterm] + while not empty? s1 repeat + polRepr := cons([first s1, 1]$Rec, polRepr) + s1 := rest s1 + polRepr := cons([n, 1]$Rec, polRepr) + -- + -- may be improved by excluding reciprocal polynomials + -- + primitive? (pol := listToSUP polRepr) => return pol + if weight = n then notReady := false + else + s1 := nextSubset(rest s, n1) :: L NNI + s := cons(0, s1) + weight := #s + -- if there is no primitive f of the above form + -- search now from the beginning, allowing arbitrary + -- coefficients f_i, i = 1,...,n-1 + nextPrimitivePoly(xn + monomial(c0, 0)$SUP) :: SUP + + createNormalPoly n == + n = 1 => monomial(1,1)$SUP + monomial(-1,0)$SUP + -- get a normal polynomial f = X**n + a * X**(n-1) + ... + -- with a = -1 + -- [recall that if f is normal over the field GF of order q + -- then a = -(x + x**q +...+ x**(q**n)) can not be zero; + -- hence the existence of such an f follows from the + -- normal basis theorem ([LN] p.60, Th. 2.35) and the + -- surjectivity of the trace ([LN] p.55, Th. 2.23 (iii))] + nextNormalPoly(monomial(1,n)$SUP + + monomial(-1, (n-1) :: NNI)$SUP) :: SUP + + createNormalPrimitivePoly n == + xn := monomial(1,n)$SUP + n = 1 => xn + monomial(-primitiveElement()$GF, 0)$SUP + n1 : NNI := (n - 1) :: NNI + c0 : GF := (-1)**n * primitiveElement()$GF + constterm := monomial(c0, 0)$SUP + -- try first the polynomials f = X**n + a * X**(n-1) + ... + -- with a = -1 + pol := xn + monomial(-1, n1)$SUP + constterm + normal? pol and primitive? pol => pol + res := nextNormalPrimitivePoly(pol) + res case SUP => res + -- if there is no normal primitive f with a = -1 + -- get now one with arbitrary (non-zero) a + -- (the existence is proved in [LS]) + pol := xn + monomial(1, n1)$SUP + constterm + normal? pol and primitive? pol => pol + nextNormalPrimitivePoly(pol) :: SUP + + createPrimitiveNormalPoly n == createNormalPrimitivePoly n + +-- qAdicExpansion m == +-- ragits : List I := wholeRagits(m :: (RadixExpansion sizeGF)) +-- pol : SUP := 0 +-- expt : NNI := #ragits +-- for i in ragits repeat +-- expt := (expt - 1) :: NNI +-- if i ^= 0 then pol := pol + monomial(index(i::PI)$GF, expt) +-- pol + +-- random == qAdicExpansion(random()$I) + +-- random n == +-- pol := monomial(1,n)$SUP +-- n1 : NNI := (n - 1) :: NNI +-- for i in 0..n1 repeat +-- if (c := random()$GF) ^= 0 then +-- pol := pol + monomial(c, i)$SUP +-- pol + + random n == + polRepr : Repr := [] + n1 : NNI := (n - 1) :: NNI + for i in 0..n1 repeat + if (c := random()$GF) ^= 0 then + polRepr := cons([i, c]$Rec, polRepr) + cons([n, 1$GF]$Rec, polRepr) pretend SUP + + random(m,n) == + if m > n then (m,n) := (n,m) + d : NNI := (n - m) :: NNI + if d > 1 then n := ((random()$I rem (d::PI)) + m) :: PI + random(n) + +@ +<>= +"FFPOLY" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FFPOLY"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"FFPOLY" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FFPOLY2 FiniteFieldPolynomialPackage2} +\pagehead{FiniteFieldPolynomialPackage2}{FFPOLY2} +\pagepic{ps/v104finitefieldpolynomialpackage2.ps}{FFPOLY2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FFPOLY2 FiniteFieldPolynomialPackage2 +++ Authors: J.Grabmeier, A.Scheerhorn +++ Date Created: 26.03.1991 +++ Date Last Updated: +++ Basic Operations: rootOfIrreduciblePoly +++ Related Constructors: FiniteFieldCategory +++ Also See: +++ AMS Classifications: +++ Keywords: finite field, zeros of polynomials, Berlekamp's trace algorithm +++ References: +++ R.Lidl, H.Niederreiter: Finite Field, Encycoldia of Mathematics and +++ Its Applications, Vol. 20, Cambridge Univ. Press, 1983, ISBN 0 521 30240 4 +++ AXIOM Technical Report Series, to appear. +++ Description: +++ FiniteFieldPolynomialPackage2(F,GF) exports some functions concerning +++ finite fields, which depend on a finite field {\em GF} and an +++ algebraic extension F of {\em GF}, e.g. a zero of a polynomial +++ over {\em GF} in F. +FiniteFieldPolynomialPackage2(F,GF):Exports == Implementation where + F:FieldOfPrimeCharacteristic with + coerce: GF -> F + ++ coerce(x) \undocumented{} + lookup: F -> PositiveInteger + ++ lookup(x) \undocumented{} + basis: PositiveInteger -> Vector F + ++ basis(n) \undocumented{} + Frobenius: F -> F + ++ Frobenius(x) \undocumented{} + -- F should be a algebraic extension of the finite field GF, either an + -- algebraic closure of GF or a simple algebraic extension field of GF + GF:FiniteFieldCategory + + I ==> Integer + NNI ==> NonNegativeInteger + PI ==> PositiveInteger + SUP ==> SparseUnivariatePolynomial + MM ==> ModMonic(GF,SUP GF) + OUT ==> OutputForm + M ==> Matrix + V ==> Vector + L ==> List + FFPOLY ==> FiniteFieldPolynomialPackage(GF) + SUPF2 ==> SparseUnivariatePolynomialFunctions2(GF,F) + + Exports ==> with + + rootOfIrreduciblePoly:SUP GF -> F + ++ rootOfIrreduciblePoly(f) computes one root of the monic, + ++ irreducible polynomial f, + ++ which degree must divide the extension degree + ++ of {\em F} over {\em GF}, + ++ i.e. f splits into linear factors over {\em F}. + + + Implementation ==> add + +-- we use berlekamps trace algorithm +-- it is not checked whether the polynomial is irreducible over GF]] + rootOfIrreduciblePoly(pf) == +-- not irreducible(pf)$FFPOLY => +-- error("polynomial has to be irreducible") + sizeGF:=size()$GF + -- if the polynomial is of degree one, we're ready + deg:=degree(pf)$(SUP GF)::PI + deg = 0 => error("no roots") + deg = 1 => -coefficient(pf,0)$(SUP GF)::F + p : SUP F := map(coerce,pf)$SUPF2 + -- compute qexp, qexp(i) = x **(size()GF ** i) mod p + -- with this list it's easier to compute the gcd(p(x),trace(x)) + qexp:=reducedQPowers(pf)$FFPOLY + stillToFactor:=p + -- take linear independent elements, the basis of F over GF + basis:Vector F:=basis(deg)$F + basispointer:I:=1 + -- as p is irreducible over GF, 0 can't be a root of p + -- therefore we can use the predicate zero?(root) for indicating + -- whether a root is found + root:=0$F + while zero?(root)$F repeat + beta:F:=basis.basispointer + -- gcd(trace(x)+gf,p(x)) has degree 0,that's why we skip beta=1 + if beta = 1$F then + basispointer:=basispointer + 1 + beta:= basis.basispointer + basispointer:=basispointer+1 + -- compute the polynomial trace(beta * x) mod p(x) using explist + trModp:SUP F:= map(coerce,qexp.0)$SUPF2 * beta + for i in 1..deg-1 repeat + beta:=Frobenius(beta) + trModp:=trModp +$(SUP F) beta *$(SUP F) map(coerce,qexp.i)$SUPF2 + -- if it is of degree 0, it doesn't help us finding a root + if degree(trModp)$(SUP F) > 0 then + -- for all elements gf of GF do + for j in 1..sizeGF repeat + -- compute gcd(trace(beta * x) + gf,stillToFactor) + h:=gcd(stillToFactor,trModp +$(SUP F) _ + (index(j pretend PI)$GF::F::(SUP F)))$(SUP F) + -- make the gcd polynomial monic + if leadingCoefficient(h)$(SUP F) ^= 1$F then + h:= (inv leadingCoefficient(h)) * h + degh:=degree(h)$(SUP F) + degSTF:=degree(stillToFactor)$(SUP F) + -- if the gcd has degree one we are ready + degh = 1 => root:=-coefficient(h,0)$(SUP F) + -- if the quotient of stillToFactor and the gcd has + -- degree one, we're also ready + degSTF - degh = 1 => + root:= -coefficient(stillToFactor quo h,0)$(SUP F) + -- otherwise the gcd helps us finding a root, only if its + -- degree is between 2 and degree(stillToFactor)-2 + if degh > 1 and degh < degSTF then + 2*degh > degSTF => stillToFactor := stillToFactor quo h + stillToFactor := h + root + +@ +<>= +"FFPOLY2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FFPOLY2"] +"IVECTOR" [color="#88FF44",href="bookvol10.3.pdf#nameddest=IVECTOR"] +"FFPOLY2" -> "IVECTOR" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FFSLPE FiniteFieldSolveLinearPolynomialEquation} +\pagehead{FiniteFieldSolveLinearPolynomialEquation}{FFSLPE} +\pagepic{ps/v104finitefieldsolvelinearpolynomialequation.ps}{FFSLPE}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FFSLPE FiniteFieldSolveLinearPolynomialEquation +++ Author: Davenport +++ Date Created: 1991 +++ Date Last Updated: +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This package solves linear diophantine equations for Bivariate polynomials +++ over finite fields + +FiniteFieldSolveLinearPolynomialEquation(F:FiniteFieldCategory, + FP:UnivariatePolynomialCategory F, + FPP:UnivariatePolynomialCategory FP): with + solveLinearPolynomialEquation: (List FPP, FPP) -> Union(List FPP,"failed") + ++ solveLinearPolynomialEquation([f1, ..., fn], g) + ++ (where the fi are relatively prime to each other) + ++ returns a list of ai such that + ++ \spad{g/prod fi = sum ai/fi} + ++ or returns "failed" if no such list of ai's exists. + == add + oldlp:List FPP := [] + slpePrime: FP := monomial(1,1) + oldtable:Vector List FPP := [] + lp: List FPP + p: FPP + import DistinctDegreeFactorize(F,FP) + solveLinearPolynomialEquation(lp,p) == + if (oldlp ^= lp) then + -- we have to generate a new table + deg:= +/[degree u for u in lp] + ans:Union(Vector List FPP,"failed"):="failed" + slpePrime:=monomial(1,1)+monomial(1,0) -- x+1: our starting guess + while (ans case "failed") repeat + ans:=tablePow(deg,slpePrime,lp)$GenExEuclid(FP,FPP) + if (ans case "failed") then + slpePrime:= nextItem(slpePrime)::FP + while (degree slpePrime > 1) and + not irreducible? slpePrime repeat + slpePrime := nextItem(slpePrime)::FP + oldtable:=(ans:: Vector List FPP) + answer:=solveid(p,slpePrime,oldtable) + answer + +@ +<>= +"FFSLPE" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FFSLPE"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"FFSLPE" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package FLAGG2 FiniteLinearAggregateFunctions2} \pagehead{FiniteLinearAggregateFunctions2}{FLAGG2} \pagepic{ps/v104finitelinearaggregatefunctions2.ps}{FLAGG2}{1.00} @@ -12842,6 +15227,367 @@ FiniteSetAggregateFunctions2(S, A, R, B): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FCPAK1 FortranCodePackage1} +\pagehead{FortranCodePackage1}{FCPAK1} +\pagepic{ps/v104fortrancodepackage1.ps}{FCPAK1}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FCPAK1 FortranCodePackage1 +++ Author: Grant Keady and Godfrey Nolan +++ Date Created: April 1993 +++ Date Last Updated: +++ Basic Operations: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ \spadtype{FortranCodePackage1} provides some utilities for +++ producing useful objects in FortranCode domain. +++ The Package may be used with the FortranCode domain and its +++ \spad{printCode} or possibly via an outputAsFortran. +++ (The package provides items of use in connection with ASPs +++ in the AXIOM-NAG link and, where appropriate, naming accords +++ with that in IRENA.) +++ The easy-to-use functions use Fortran loop variables I1, I2, +++ and it is users' responsibility to check that this is sensible. +++ The advanced functions use SegmentBinding to allow users control +++ over Fortran loop variable names. +-- Later might add functions to build +-- diagonalMatrix from List, i.e. the FC version of the corresponding +-- AXIOM function from MatrixCategory; +-- bandedMatrix, i.e. the full-matrix-FC version of the corresponding +-- AXIOM function in BandedMatrix Domain +-- bandedSymmetricMatrix, i.e. the full-matrix-FC version of the corresponding +-- AXIOM function in BandedSymmetricMatrix Domain + +FortranCodePackage1: Exports == Implementation where + + NNI ==> NonNegativeInteger + PI ==> PositiveInteger + PIN ==> Polynomial(Integer) + SBINT ==> SegmentBinding(Integer) + SEGINT ==> Segment(Integer) + LSBINT ==> List(SegmentBinding(Integer)) + SBPIN ==> SegmentBinding(Polynomial(Integer)) + SEGPIN ==> Segment(Polynomial(Integer)) + LSBPIN ==> List(SegmentBinding(Polynomial(Integer))) + FC ==> FortranCode + EXPRESSION ==> Union(Expression Integer,Expression Float,Expression Complex Integer,Expression Complex Float) + + Exports == with + + zeroVector: (Symbol,PIN) -> FC + ++ zeroVector(s,p) \undocumented{} + + zeroMatrix: (Symbol,PIN,PIN) -> FC + ++ zeroMatrix(s,p,q) uses loop variables in the Fortran, I1 and I2 + + zeroMatrix: (Symbol,SBPIN,SBPIN) -> FC + ++ zeroMatrix(s,b,d) in this version gives the user control + ++ over names of Fortran variables used in loops. + + zeroSquareMatrix: (Symbol,PIN) -> FC + ++ zeroSquareMatrix(s,p) \undocumented{} + + identitySquareMatrix: (Symbol,PIN) -> FC + ++ identitySquareMatrix(s,p) \undocumented{} + + Implementation ==> add + import FC + + zeroVector(fname:Symbol,n:PIN):FC == + ue:Expression(Integer) := 0 + i1:Symbol := "I1"::Symbol + lp1:PIN := 1::PIN + hp1:PIN := n + segp1:SEGPIN:= segment(lp1,hp1)$SEGPIN + segbp1:SBPIN := equation(i1,segp1)$SBPIN + ip1:PIN := i1::PIN + indices:List(PIN) := [ip1] + fa:FC := forLoop(segbp1,assign(fname,indices,ue)$FC)$FC + fa + + zeroMatrix(fname:Symbol,m:PIN,n:PIN):FC == + ue:Expression(Integer) := 0 + i1:Symbol := "I1"::Symbol + lp1:PIN := 1::PIN + hp1:PIN := m + segp1:SEGPIN:= segment(lp1,hp1)$SEGPIN + segbp1:SBPIN := equation(i1,segp1)$SBPIN + i2:Symbol := "I2"::Symbol + hp2:PIN := n + segp2:SEGPIN:= segment(lp1,hp2)$SEGPIN + segbp2:SBPIN := equation(i2,segp2)$SBPIN + ip1:PIN := i1::PIN + ip2:PIN := i2::PIN + indices:List(PIN) := [ip1,ip2] + fa:FC :=forLoop(segbp1,forLoop(segbp2,assign(fname,indices,ue)$FC)$FC)$FC + fa + + zeroMatrix(fname:Symbol,segbp1:SBPIN,segbp2:SBPIN):FC == + ue:Expression(Integer) := 0 + i1:Symbol := variable(segbp1)$SBPIN + i2:Symbol := variable(segbp2)$SBPIN + ip1:PIN := i1::PIN + ip2:PIN := i2::PIN + indices:List(PIN) := [ip1,ip2] + fa:FC :=forLoop(segbp1,forLoop(segbp2,assign(fname,indices,ue)$FC)$FC)$FC + fa + + zeroSquareMatrix(fname:Symbol,n:PIN):FC == + ue:Expression(Integer) := 0 + i1:Symbol := "I1"::Symbol + lp1:PIN := 1::PIN + hp1:PIN := n + segp1:SEGPIN:= segment(lp1,hp1)$SEGPIN + segbp1:SBPIN := equation(i1,segp1)$SBPIN + i2:Symbol := "I2"::Symbol + segbp2:SBPIN := equation(i2,segp1)$SBPIN + ip1:PIN := i1::PIN + ip2:PIN := i2::PIN + indices:List(PIN) := [ip1,ip2] + fa:FC :=forLoop(segbp1,forLoop(segbp2,assign(fname,indices,ue)$FC)$FC)$FC + fa + + identitySquareMatrix(fname:Symbol,n:PIN):FC == + ue:Expression(Integer) := 0 + u1:Expression(Integer) := 1 + i1:Symbol := "I1"::Symbol + lp1:PIN := 1::PIN + hp1:PIN := n + segp1:SEGPIN:= segment(lp1,hp1)$SEGPIN + segbp1:SBPIN := equation(i1,segp1)$SBPIN + i2:Symbol := "I2"::Symbol + segbp2:SBPIN := equation(i2,segp1)$SBPIN + ip1:PIN := i1::PIN + ip2:PIN := i2::PIN + indice1:List(PIN) := [ip1,ip1] + indices:List(PIN) := [ip1,ip2] + fc:FC := forLoop(segbp2,assign(fname,indices,ue)$FC)$FC + f1:FC := assign(fname,indice1,u1)$FC + fl:List(FC) := [fc,f1] + fa:FC := forLoop(segbp1,block(fl)$FC)$FC + fa + +@ +<>= +"FCPAK1" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FCPAK1"] +"ALIST" [color="#88FF44",href="bookvol10.3.pdf#nameddest=ALIST"] +"FCPAK1" -> "ALIST" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FOP FortranOutputStackPackage} +\pagehead{FortranOutputStackPackage}{FOP} +\pagepic{ps/v104fortranoutputstackpackage.ps}{FOP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FOP FortranOutputStackPackage +-- Because of a bug in the compiler: +)bo $noSubsumption:=false + +++ Author: Mike Dewar +++ Date Created: October 1992 +++ Date Last Updated: +++ Basic Operations: +++ Related Domains: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ Examples: +++ References: +++ Description: Code to manipulate Fortran Output Stack +FortranOutputStackPackage() : specification == implementation where + + specification == with + + clearFortranOutputStack : () -> Stack String + ++ clearFortranOutputStack() clears the Fortran output stack + showFortranOutputStack : () -> Stack String + ++ showFortranOutputStack() returns the Fortran output stack + popFortranOutputStack : () -> Void + ++ popFortranOutputStack() pops the Fortran output stack + pushFortranOutputStack : FileName -> Void + ++ pushFortranOutputStack(f) pushes f onto the Fortran output stack + pushFortranOutputStack : String -> Void + ++ pushFortranOutputStack(f) pushes f onto the Fortran output stack + topFortranOutputStack : () -> String + ++ topFortranOutputStack() returns the top element of the Fortran + ++ output stack + + implementation == add + + import MoreSystemCommands + + -- A stack of filenames for Fortran output. We are sharing this with + -- the standard Fortran output code, so want to be a bit careful about + -- how we interact with what the user does independently. We get round + -- potential problems by always examining the top element of the stack + -- before we push. If the user has redirected output then we alter our + -- top value accordingly. + fortranOutputStack : Stack String := empty()@(Stack String) + + topFortranOutputStack():String == string(_$fortranOutputFile$Lisp) + + pushFortranOutputStack(fn:FileName):Void == + if empty? fortranOutputStack then + push!(string(_$fortranOutputFile$Lisp),fortranOutputStack) + else if not(top(fortranOutputStack)=string(_$fortranOutputFile$Lisp)) then + pop! fortranOutputStack + push!(string(_$fortranOutputFile$Lisp),fortranOutputStack) + push!( fn::String,fortranOutputStack) + systemCommand concat(["set output fortran quiet ", fn::String])$String + void() + + pushFortranOutputStack(fn:String):Void == + if empty? fortranOutputStack then + push!(string(_$fortranOutputFile$Lisp),fortranOutputStack) + else if not(top(fortranOutputStack)=string(_$fortranOutputFile$Lisp)) then + pop! fortranOutputStack + push!(string(_$fortranOutputFile$Lisp),fortranOutputStack) + push!( fn,fortranOutputStack) + systemCommand concat(["set output fortran quiet ", fn])$String + void() + + popFortranOutputStack():Void == + if not empty? fortranOutputStack then pop! fortranOutputStack + if empty? fortranOutputStack then push!("CONSOLE",fortranOutputStack) + systemCommand concat(["set output fortran quiet append ",_ + top fortranOutputStack])$String + void() + + clearFortranOutputStack():Stack String == + fortranOutputStack := empty()@(Stack String) + + showFortranOutputStack():Stack String == + fortranOutputStack + +@ +<>= +"FOP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FOP"] +"STRING" [color="#88FF44",href="bookvol10.3.pdf#nameddest=STRING"] +"FOP" -> "STRING" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FORT FortranPackage} +\pagehead{FortranPackage}{FORT} +\pagepic{ps/v104fortranpackage.ps}{FORT}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FORT FortranPackage +-- Because of a bug in the compiler: +)bo $noSubsumption:=true + +++ Author: Mike Dewar +++ Date Created: October 6 1991 +++ Date Last Updated: 13 July 1994 +++ Basic Operations: linkToFortran +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: provides an interface to the boot code for calling Fortran +FortranPackage(): Exports == Implementation where + FST ==> FortranScalarType + SEX ==> SExpression + L ==> List + S ==> Symbol + FOP ==> FortranOutputStackPackage + U ==> Union(array:L S,scalar:S) + + Exports ==> with + linkToFortran: (S, L U, L L U, L S) -> SEX + ++ linkToFortran(s,l,ll,lv) \undocumented{} + linkToFortran: (S, L U, L L U, L S, S) -> SEX + ++ linkToFortran(s,l,ll,lv,t) \undocumented{} + linkToFortran: (S,L S,TheSymbolTable,L S) -> SEX + ++ linkToFortran(s,l,t,lv) \undocumented{} + outputAsFortran: FileName -> Void + ++ outputAsFortran(fn) \undocumented{} + setLegalFortranSourceExtensions: List String -> List String + ++ setLegalFortranSourceExtensions(l) \undocumented{} + + Implementation ==> add + + legalFortranSourceExtensions : List String := ["f"] + + setLegalFortranSourceExtensions(l:List String):List String == + legalFortranSourceExtensions := l + + checkExtension(fn : FileName) : String == + -- Does it end in a legal extension ? + stringFn := fn::String + not member?(extension fn,legalFortranSourceExtensions) => + error [stringFn,"is not a legal Fortran Source File."] + stringFn + + outputAsFortran(fn:FileName):Void == +-- source : String := checkExtension fn + source : String := fn::String + not readable? fn => + popFortranOutputStack()$FOP + error([source,"is not readable"]@List(String)) + target : String := topFortranOutputStack()$FOP + command : String := + concat(["sys rm -f ",target," ; cp ",source," ",target])$String + systemCommand(command)$MoreSystemCommands + void()$Void + + linkToFortran(name:S,args:L U, decls:L L U, res:L(S)):SEX == + makeFort(name,args,decls,res,NIL$Lisp,NIL$Lisp)$Lisp + + linkToFortran(name:S,args:L U, decls:L L U, res:L(S),returnType:S):SEX == + makeFort(name,args,decls,res,returnType,NIL$Lisp)$Lisp + + dimensions(type:FortranType):SEX == + convert([convert(convert(u)@InputForm)@SEX _ + for u in dimensionsOf(type)])@SEX + + ftype(name:S,type:FortranType):SEX == + [name,scalarTypeOf(type),dimensions(type),external? type]$Lisp + + makeAspList(asp:S,syms:TheSymbolTable):SExpression== + symtab : SymbolTable := symbolTableOf(asp,syms) + [asp,returnTypeOf(asp,syms),argumentListOf(asp,syms), _ + [ftype(u,fortranTypeOf(u,symtab)) for u in parametersOf symtab]]$Lisp + + linkToFortran(name:S,aArgs:L S,syms:TheSymbolTable,res:L S):SEX == + arguments : L S := argumentListOf(name,syms)$TheSymbolTable + dummies : L S := setDifference(arguments,aArgs) + symbolTable:SymbolTable := symbolTableOf(name,syms) + symbolList := newTypeLists(symbolTable) + rt:Union(fst: FST,void: "void") := returnTypeOf(name,syms)$TheSymbolTable + + -- Look for arguments which are subprograms + asps :=[makeAspList(u,syms) for u in externalList(symbolTable)$SymbolTable] + rt case fst => + makeFort1(name,arguments,aArgs,dummies,symbolList,res,(rt.fst)::S,asps)$Lisp + makeFort1(name,arguments,aArgs,dummies,symbolList,res,NIL$Lisp,asps)$Lisp + +@ +<>= +"FORT" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FORT"] +"STRING" [color="#88FF44",href="bookvol10.3.pdf#nameddest=STRING"] +"FORT" -> "STRING" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package FRIDEAL2 FractionalIdealFunctions2} \pagehead{FractionalIdealFunctions2}{FRIDEAL2} \pagepic{ps/v104fractionalidealfunctions2.ps}{FRIDEAL2}{1.00} @@ -12893,269 +15639,661 @@ FractionalIdealFunctions2(R1, F1, U1, A1, R2, F2, U2, A2): @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{package FFCAT2 FunctionFieldCategoryFunctions2} -\pagehead{FunctionFieldCategoryFunctions2}{FFCAT2} -\pagepic{ps/v104functionfieldcategoryfunctions2.ps}{FFCAT2}{1.00} +\section{package FFFG FractionFreeFastGaussian} +\pagehead{FractionFreeFastGaussian}{FFFG} +\pagepic{ps/v104fractionfreefastgaussian.ps}{FFFG}{1.00} {\bf Exports:}\\ \begin{tabular}{lllll} \end{tabular} -<>= -)abbrev package FFCAT2 FunctionFieldCategoryFunctions2 -++ Lifts a map from rings to function fields over them -++ Author: Manuel Bronstein -++ Date Created: May 1988 -++ Date Last Updated: 26 Jul 1988 -++ Description: Lifts a map from rings to function fields over them. -FunctionFieldCategoryFunctions2(R1, UP1, UPUP1, F1, R2, UP2, UPUP2, F2): - Exports == Implementation where - R1 : UniqueFactorizationDomain - UP1 : UnivariatePolynomialCategory R1 - UPUP1: UnivariatePolynomialCategory Fraction UP1 - F1 : FunctionFieldCategory(R1, UP1, UPUP1) - R2 : UniqueFactorizationDomain - UP2 : UnivariatePolynomialCategory R2 - UPUP2: UnivariatePolynomialCategory Fraction UP2 - F2 : FunctionFieldCategory(R2, UP2, UPUP2) +<>= +)abbrev package FFFG FractionFreeFastGaussian +++ Author: Martin Rubey +++ Description: +++ This package implements the interpolation algorithm proposed in Beckermann, +++ Bernhard and Labahn, George, Fraction-free computation of matrix rational +++ interpolants and matrix GCDs, SIAM Journal on Matrix Analysis and +++ Applications 22. +++ The packages defined in this file provide fast fraction free rational +++ interpolation algorithms. (see FAMR2, FFFG, FFFGF, NEWTON) +FractionFreeFastGaussian(D, V): Exports == Implementation where + D: Join(IntegralDomain, GcdDomain) + V: AbelianMonoidRing(D, NonNegativeInteger) -- for example, SUP D - Exports ==> with - map: (R1 -> R2, F1) -> F2 - ++ map(f, p) lifts f to F1 and applies it to p. + SUP ==> SparseUnivariatePolynomial - Implementation ==> add - map(f, f1) == - reduce(map(f, lift f1)$MultipleMap(R1, UP1, UPUP1, R2, UP2, UPUP2)) + cFunction ==> (NonNegativeInteger, Vector SUP D) -> D + + CoeffAction ==> (NonNegativeInteger, NonNegativeInteger, V) -> D + + Exports == with + + fffg: (List D, cFunction, List NonNegativeInteger) -> Matrix SUP D + ++ \spad{fffg} is the general algorithm as proposed by Beckermann and + ++ Labahn. + ++ + + ++ The first argument is the list of c_{i,i}. These are the only values + ++ of C explicitely needed in \spad{fffg}. + ++ + ++ The second argument c, computes c_k(M), i.e., c_k(.) is the dual basis + ++ of the vector space V, but also knows about the special multiplication + ++ rule as descibed in Equation (2). Note that the information about f + ++ is therefore encoded in c. + ++ + ++ The third argument is the vector of degree bounds n, as introduced in + ++ Definition 2.1. In particular, the sum of the entries is the order of + ++ the Mahler system computed. + + interpolate: (List D, List D, NonNegativeInteger) -> Fraction SUP D + ++ \spad{interpolate(xlist, ylist, deg} returns the rational function with + ++ numerator degree at most \spad{deg} and denominator degree at most + ++ \spad{#xlist-deg-1} that interpolates the given points using + ++ fraction free arithmetic. Note that rational interpolation does not + ++ guarantee that all given points are interpolated correctly: + ++ unattainable points may make this impossible. @ -<>= -"FFCAT2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FFCAT2"] -"FFCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FFCAT"] -"FFCAT2" -> "FFCAT" + +\begin{verbatim} + The following function could be moved to [[FFFGF]], parallel to + [[generalInterpolation]]. However, the reason for moving + [[generalInterpolation]] for fractions to a separate package was the need of + a generic signature, hence the extra argument [[VF]] to [[FFFGF]]. In the + special case of rational interpolation, this extra argument is not necessary, + since we are always returning a fraction of [[SUP]]s, and ignore [[V]]. In + fact, [[V]] is not needed for [[fffg]] itself, only if we want to specify a + [[CoeffAction]]. + + Thus, maybe it would be better to move [[fffg]] to a separate package? +\end{verbatim} + +<>= + interpolate: (List Fraction D, List Fraction D, NonNegativeInteger) + -> Fraction SUP D + ++ \spad{interpolate(xlist, ylist, deg} returns the rational function with + ++ numerator degree \spad{deg} that interpolates the given points using + ++ fraction free arithmetic. + + generalInterpolation: (List D, CoeffAction, + Vector V, List NonNegativeInteger) -> Matrix SUP D + ++ \spad{generalInterpolation(C, CA, f, eta)} performs Hermite-Pade + ++ approximation using the given action CA of polynomials on the elements + ++ of f. The result is guaranteed to be correct up to order + ++ |eta|-1. Given that eta is a "normal" point, the degrees on the + ++ diagonal are given by eta. The degrees of column i are in this case + ++ eta + e.i - [1,1,...,1], where the degree of zero is -1. + ++ + ++ The first argument C is the list of coefficients c_{k,k} in the + ++ expansion z g(x) = sum_{i=0}^k c_{k,i} g(x). + ++ + ++ The second argument, CA(k, l, f), should return the coefficient of x^k + ++ in z^l f(x). + + generalInterpolation: (List D, CoeffAction, + Vector V, NonNegativeInteger, NonNegativeInteger) + -> Stream Matrix SUP D + ++ \spad{generalInterpolation(C, CA, f, sumEta, maxEta)} applies + ++ \spad{generalInterpolation(C, CA, f, eta)} for all possible \spad{eta} + ++ with maximal entry \spad{maxEta} and sum of entries at most + ++ \spad{sumEta}. + ++ + ++ The first argument C is the list of coefficients c_{k,k} in the + ++ expansion z g(x) = sum_{i=0}^k c_{k,i} g(x). + ++ + ++ The second argument, CA(k, l, f), should return the coefficient of x^k + ++ in z^l f(x). + + generalCoefficient: (CoeffAction, Vector V, + NonNegativeInteger, Vector SUP D) -> D + ++ \spad{generalCoefficient(action, f, k, p)} gives the coefficient of + ++ x^k in p(z)\dot f(x), where the action of z^l on a polynomial in x is + ++ given by action, i.e., action(k, l, f) should return the coefficient + ++ of x^k in z^l f(x). + + ShiftAction: (NonNegativeInteger, NonNegativeInteger, V) -> D + ++ \spad{ShiftAction(k, l, g)} gives the coefficient of x^k in z^l g(x), + ++ where \spad{z*(a+b*x+c*x^2+d*x^3+...) = (b*x+2*c*x^2+3*d*x^3+...)}. In + ++ terms of sequences, z*u(n)=n*u(n). + + ShiftC: NonNegativeInteger -> List D + ++ \spad{ShiftC} gives the coefficients c_{k,k} in the expansion z + ++ g(x) = sum_{i=0}^k c_{k,i} g(x), where z acts on g(x) by + ++ shifting. In fact, the result is [0,1,2,...] + + DiffAction: (NonNegativeInteger, NonNegativeInteger, V) -> D + ++ \spad{DiffAction(k, l, g)} gives the coefficient of x^k in z^l g(x), + ++ where z*(a+b*x+c*x^2+d*x^3+...) = (a*x+b*x^2+c*x^3+...), i.e., + ++ multiplication with x. + + DiffC: NonNegativeInteger -> List D + ++ \spad{DiffC} gives the coefficients c_{k,k} in the expansion z + ++ g(x) = sum_{i=0}^k c_{k,i} g(x), where z acts on g(x) by + ++ shifting. In fact, the result is [0,0,0,...] + + qShiftAction: (D, NonNegativeInteger, NonNegativeInteger, V) -> D + ++ \spad{qShiftAction(q, k, l, g)} gives the coefficient of x^k in z^l + ++ g(x), where z*(a+b*x+c*x^2+d*x^3+...) = + ++ (a+q*b*x+q^2*c*x^2+q^3*d*x^3+...). In terms of sequences, + ++ z*u(n)=q^n*u(n). + + qShiftC: (D, NonNegativeInteger) -> List D + ++ \spad{qShiftC} gives the coefficients c_{k,k} in the expansion z + ++ g(x) = sum_{i=0}^k c_{k,i} g(x), where z acts on g(x) by + ++ shifting. In fact, the result is [1,q,q^2,...] + + Implementation ==> add + +------------------------------------------------------------------------------- +-- Shift Operator +------------------------------------------------------------------------------- + +-- ShiftAction(k, l, f) is the CoeffAction appropriate for the shift operator. + + ShiftAction(k: NonNegativeInteger, l: NonNegativeInteger, f: V): D == + k**l*coefficient(f, k) + + + ShiftC(total: NonNegativeInteger): List D == + [i::D for i in 0..total-1] + +------------------------------------------------------------------------------- +-- q-Shift Operator +------------------------------------------------------------------------------- + +-- q-ShiftAction(k, l, f) is the CoeffAction appropriate for the q-shift operator. + + qShiftAction(q: D, k: NonNegativeInteger, l: NonNegativeInteger, f: V): D == + q**(k*l)*coefficient(f, k) + + + qShiftC(q: D, total: NonNegativeInteger): List D == + [q**i for i in 0..total-1] + +------------------------------------------------------------------------------- +-- Differentiation Operator +------------------------------------------------------------------------------- + +-- DiffAction(k, l, f) is the CoeffAction appropriate for the differentiation +-- operator. + + DiffAction(k: NonNegativeInteger, l: NonNegativeInteger, f: V): D == + coefficient(f, (k-l)::NonNegativeInteger) + + + DiffC(total: NonNegativeInteger): List D == + [0 for i in 1..total] + +------------------------------------------------------------------------------- +-- general - suitable for functions f +------------------------------------------------------------------------------- + +-- get the coefficient of z^k in the scalar product of p and f, the action +-- being defined by coeffAction + + generalCoefficient(coeffAction: CoeffAction, f: Vector V, + k: NonNegativeInteger, p: Vector SUP D): D == + res: D := 0 + for i in 1..#f repeat + +-- Defining a and b and summing only over those coefficients that might be +-- nonzero makes a huge difference in speed + a := f.i + b := p.i + for l in minimumDegree b..degree b repeat + if not zero? coefficient(b, l) + then res := res + coefficient(b, l) * coeffAction(k, l, a) + res + + + generalInterpolation(C: List D, coeffAction: CoeffAction, + f: Vector V, + eta: List NonNegativeInteger): Matrix SUP D == + + c: cFunction := generalCoefficient(coeffAction, f, + (#1-1)::NonNegativeInteger, #2) + fffg(C, c, eta) + + + +------------------------------------------------------------------------------- +-- general - suitable for functions f - trying all possible degree combinations +------------------------------------------------------------------------------- @ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{package PMASSFS FunctionSpaceAssertions} -\pagehead{FunctionSpaceAssertions}{PMASSFS} -\pagepic{ps/v104functionspaceassertions.ps}{PMASSFS}{1.00} -{\bf Exports:}\\ -\begin{tabular}{lllll} -\end{tabular} +The following function returns the lexicographically next vector with +non-negative components smaller than [[p]] with the same sum as [[v]]. -<>= -)abbrev package PMASSFS FunctionSpaceAssertions -++ Assertions for pattern-matching -++ Author: Manuel Bronstein -++ Description: Attaching assertions to symbols for pattern matching; -++ Date Created: 21 Mar 1989 -++ Date Last Updated: 23 May 1990 -++ Keywords: pattern, matching. -FunctionSpaceAssertions(R, F): Exports == Implementation where - R: OrderedSet - F: FunctionSpace R +<>= + nextVector!(p: NonNegativeInteger, v: List NonNegativeInteger) + : Union("failed", List NonNegativeInteger) == + n := #v + pos := position(#1 < p, v) + zero? pos => return "failed" + if pos = 1 then + sum: Integer := v.1 + for i in 2..n repeat + if v.i < p and sum > 0 then + v.i := v.i + 1 + sum := sum - 1 + for j in 1..i-1 repeat + if sum > p then + v.j := p + sum := sum - p + else + v.j := sum::NonNegativeInteger + sum := 0 + return v + else sum := sum + v.i + return "failed" + else + v.pos := v.pos + 1 + v.(pos-1) := (v.(pos-1) - 1)::NonNegativeInteger + + v +@ + +The following function returns the stream of all possible degree vectors, +beginning with [[v]], where the degree vectors are sorted in reverse +lexicographic order. Furthermore, the entries are all less or equal to [[p]] +and their sum equals the sum of the entries of [[v]]. We assume that the +entries of [[v]] are also all less or equal to [[p]]. + +<>= + vectorStream(p: NonNegativeInteger, v: List NonNegativeInteger) + : Stream List NonNegativeInteger == delay + next := nextVector!(p, copy v) + (next case "failed") => empty()$Stream(List NonNegativeInteger) + cons(next, vectorStream(p, next)) +@ + +[[vectorStream2]] skips every second entry of [[vectorStream]]. + +<>= + vectorStream2(p: NonNegativeInteger, v: List NonNegativeInteger) + : Stream List NonNegativeInteger == delay + next := nextVector!(p, copy v) + (next case "failed") => empty()$Stream(List NonNegativeInteger) + next2 := nextVector!(p, copy next) + (next2 case "failed") => cons(next, empty()) + cons(next2, vectorStream2(p, next2)) +@ + +This version of [[generalInterpolation]] returns a stream of solutions, one for +each possible degree vector. Thus, it only needs to apply the previously +defined [[generalInterpolation]] to each degree vector. These are generated by +[[vectorStream]] and [[vectorStream2]] respectively. + +If [[f]] consists of two elements only, we can skip every second degree vector: +note that [[fffg]], and thus also [[generalInterpolation]], returns a matrix +with [[#f]] columns, each corresponding to a solution of the interpolation +problem. More precisely, the $i$\textsuperscript{th} column is a solution with +degrees [[eta]]$-(1,1,\dots,1)+e_i$. Thus, in the case of $2\times 2$ matrices, +[[vectorStream]] would produce solutions corresponding to $(d,0), (d-1,1); +(d-1,1), (d-2, 2); (d-2, 2), (d-3,3)\dots$, i.e., every second matrix is +redundant. + +Although some redundancy exists also for higher dimensional [[f]], the scheme +becomes much more complicated, thus we did not implement it. + +<>= + generalInterpolation(C: List D, coeffAction: CoeffAction, + f: Vector V, + sumEta: NonNegativeInteger, + maxEta: NonNegativeInteger) + : Stream Matrix SUP D == + + <> + + if #f = 2 then + map(generalInterpolation(C, coeffAction, f, #1), + cons(eta, vectorStream2(maxEta, eta))) + $StreamFunctions2(List NonNegativeInteger, + Matrix SUP D) + else + map(generalInterpolation(C, coeffAction, f, #1), + cons(eta, vectorStream(maxEta, eta))) + $StreamFunctions2(List NonNegativeInteger, + Matrix SUP D) +@ + +We need to generate an initial degree vector, being the minimal element in +reverse lexicographic order, i.e., $m, m, \dots, m, k, 0, 0, \dots$, where $m$ +is [[maxEta]] and $k$ is the remainder of [[sumEta]] divided by +[[maxEta]]. This is done by the following code: + +<>= +sum: Integer := sumEta +entry: Integer +eta: List NonNegativeInteger + := [(if sum < maxEta _ + then (entry := sum; sum := 0) _ + else (entry := maxEta; sum := sum - maxEta); _ + entry::NonNegativeInteger) for i in 1..#f] +@ + +We want to generate all vectors with sum of entries being at most +[[sumEta]]. Therefore the following is incorrect. +<>= +-- (sum > 0) => empty()$Stream(Matrix SUP D) +@ + +<>= +------------------------------------------------------------------------------- +-- rational interpolation +------------------------------------------------------------------------------- + + interpolate(x: List Fraction D, y: List Fraction D, d: NonNegativeInteger) + : Fraction SUP D == + gx := splitDenominator(x)$InnerCommonDenominator(D, Fraction D, _ + List D, _ + List Fraction D) + gy := splitDenominator(y)$InnerCommonDenominator(D, Fraction D, _ + List D, _ + List Fraction D) + r := interpolate(gx.num, gy.num, d) + elt(numer r, monomial(gx.den,1))/(gy.den*elt(denom r, monomial(gx.den,1))) + + + interpolate(x: List D, y: List D, d: NonNegativeInteger): Fraction SUP D == +-- berechne Interpolante mit Graden d und N-d-1 + if (N := #x) ~= #y then + error "interpolate: number of points and values must match" + if N <= d then + error "interpolate: numerator degree must be smaller than number of data points" + c: cFunction := y.#1 * elt(#2.2, x.#1) - elt(#2.1, x.#1) + eta: List NonNegativeInteger := [d, (N-d)::NonNegativeInteger] + M := fffg(x, c, eta) + + if zero?(M.(2,1)) then M.(1,2)/M.(2,2) + else M.(1,1)/M.(2,1) + +@ +Because of Lemma~5.3, [[M.1.(2,1)]] and [[M.1.(2,2)]] cannot both vanish, +since [[eta_sigma]] is always $\sigma$-normal by Theorem~7.2 and therefore also +para-normal, see Definition~4.2. + +Because of Lemma~5.1 we have that [[M.1.(*,2)]] is a solution of the +interpolation problem, if [[M.1.(2,1)]] vanishes. + +<>= +------------------------------------------------------------------------------- +-- fffg +------------------------------------------------------------------------------- +@ + +[[recurrence]] computes the new matrix $M$, according to the following formulas +(cf. Table~2 in Beckermann and Labahn): +\[ +\begin{array}{cc} + &\textrm{Increase order}\\ + &\quad\quad\textrm{for $\ell=1\dots m$, $\ell\neq\pi$}\\ + &\quad\quad\quad\quad\mathbf M_{\sigma+1}^{(.,\ell)} := + \left(\mathbf M_{\sigma}^{(.,\ell)}r^{(\pi)} + - \mathbf M_{\sigma}^{(.,\pi)}r^{(\ell)}\right)/d_\sigma\\ + &\textrm{Increase order in column $\pi$}\\ + &\quad\quad\mathbf M_{\sigma+1}^{(.,\pi)} := + \left(z-c_{\sigma,\sigma}\right)\mathbf M_{\sigma}^{(.,\pi)}\\ + &\textrm{Adjust degree constraints:}\\ + &\quad\quad\mathbf M_{\sigma+1}^{(.,\pi)} := + \left(\mathbf M_{\sigma+1}^{(.,\pi)}r^{(\pi)} + - \sum_{\ell\neq\pi}\mathbf M_{\sigma+1}^{(.,\ell)}p^{(\ell)} + \right)/d_\sigma +\end{array} +\] - K ==> Kernel F - PMOPT ==> "%pmoptional" - PMMULT ==> "%pmmultiple" - PMCONST ==> "%pmconstant" +Since we do not need the matrix $\mathbf M_{\sigma}$ anymore, we drop the index +and update the matrix destructively. In the following, we write [[Ck]] for +$c_{\sigma,\sigma}$. - Exports ==> with - assert : (F, String) -> F - ++ assert(x, s) makes the assertion s about x. - ++ Error: if x is not a symbol. - constant: F -> F - ++ constant(x) tells the pattern matcher that x should - ++ match only the symbol 'x and no other quantity. - ++ Error: if x is not a symbol. - optional: F -> F - ++ optional(x) tells the pattern matcher that x can match - ++ an identity (0 in a sum, 1 in a product or exponentiation). - ++ Error: if x is not a symbol. - multiple: F -> F - ++ multiple(x) tells the pattern matcher that x should - ++ preferably match a multi-term quantity in a sum or product. - ++ For matching on lists, multiple(x) tells the pattern matcher - ++ that x should match a list instead of an element of a list. - ++ Error: if x is not a symbol. +<>= +-- a major part of the time is spent here + recurrence(M: Matrix SUP D, pi: NonNegativeInteger, m: NonNegativeInteger, + r: Vector D, d: D, z: SUP D, Ck: D, p: Vector D): Matrix SUP D == - Implementation ==> add - ass : (K, String) -> F - asst : (K, String) -> F - mkk : BasicOperator -> F + rPi: D := qelt(r, pi) + polyf: SUP D := rPi * (z - Ck::SUP D) - mkk op == kernel(op, empty()$List(F)) + for i in 1..m repeat + MiPi: SUP D := qelt(M, i, pi) + newMiPi: SUP D := polyf * MiPi - ass(k, s) == - has?(op := operator k, s) => k::F - mkk assert(copy op, s) +-- update columns ~= pi and calculate their sum + for l in 1..m | l ~= pi repeat + rl: D := qelt(r, l) +-- I need the coercion to SUP D, since exquo returns an element of +-- Union("failed", SUP D)... + Mil: SUP D := ((qelt(M, i, l) * rPi - MiPi * rl) exquo d)::SUP D + qsetelt!(M, i, l, Mil) - asst(k, s) == - has?(op := operator k, s) => k::F - mkk assert(op, s) + pl: D := qelt(p, l) + newMiPi := newMiPi - pl * Mil - assert(x, s) == - retractIfCan(x)@Union(Symbol, "failed") case Symbol => - asst(retract(x)@K, s) - error "assert must be applied to symbols only" +-- update column pi + qsetelt!(M, i, pi, (newMiPi exquo d)::SUP D) - constant x == - retractIfCan(x)@Union(Symbol, "failed") case Symbol => - ass(retract(x)@K, PMCONST) - error "constant must be applied to symbols only" + M - optional x == - retractIfCan(x)@Union(Symbol, "failed") case Symbol => - ass(retract(x)@K, PMOPT) - error "optional must be applied to symbols only" - multiple x == - retractIfCan(x)@Union(Symbol, "failed") case Symbol => - ass(retract(x)@K, PMMULT) - error "multiple must be applied to symbols only" + fffg(C: List D, c: cFunction, eta: List NonNegativeInteger): Matrix SUP D == +-- eta is the vector of degrees. We compute M with degrees eta+e_i-1, i=1..m + z: SUP D := monomial(1, 1) + m: NonNegativeInteger := #eta + M: Matrix SUP D := scalarMatrix(m, 1) + d: D := 1 + K: NonNegativeInteger := reduce(_+, eta) + etak: Vector NonNegativeInteger := zero(m) + r: Vector D := zero(m) + p: Vector D := zero(m) + Lambda: List Integer + lambdaMax: Integer + lambda: NonNegativeInteger + + for k in 1..K repeat +-- k = sigma+1 + + for l in 1..m repeat r.l := c(k, column(M, l)) + + Lambda := [eta.l-etak.l for l in 1..m | r.l ~= 0] + +-- if Lambda is empty, then M, d and etak remain unchanged. Otherwise, we look +-- for the next closest para-normal point. + + (empty? Lambda) => "iterate" + + lambdaMax := reduce(max, Lambda) + lambda := 1 + while eta.lambda-etak.lambda < lambdaMax or r.lambda = 0 repeat + lambda := lambda + 1 + +-- Calculate leading coefficients + + for l in 1..m | l ~= lambda repeat + if etak.l > 0 then + p.l := coefficient(M.(l, lambda), + (etak.l-1)::NonNegativeInteger) + else + p.l := 0 + +-- increase order and adjust degree constraints + + M := recurrence(M, lambda, m, r, d, z, C.k, p) + + d := r.lambda + etak.lambda := etak.lambda + 1 + + M @ -<>= -"PMASSFS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=PMASSFS"] -"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] -"PMASSFS" -> "FS" +<>= +"FFFG" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FFFG"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"FFFG" -> "PFECAT" @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{package PMPREDFS FunctionSpaceAttachPredicates} -\pagehead{FunctionSpaceAttachPredicates}{PMPREDFS} -\pagepic{ps/v104functionspaceattachpredicates.ps}{PMPREDFS}{1.00} +\section{package FFFGF FractionFreeFastGaussianFractions} +\pagehead{FractionFreeFastGaussianFractions}{FFFGF} +\pagepic{ps/v104fractionfreefastgaussianfractions.ps}{FFFGF}{1.00} {\bf Exports:}\\ \begin{tabular}{lllll} \end{tabular} -<>= -)abbrev package PMPREDFS FunctionSpaceAttachPredicates -++ Predicates for pattern-matching. -++ Author: Manuel Bronstein -++ Description: Attaching predicates to symbols for pattern matching. -++ Date Created: 21 Mar 1989 -++ Date Last Updated: 23 May 1990 -++ Keywords: pattern, matching. -FunctionSpaceAttachPredicates(R, F, D): Exports == Implementation where - R: OrderedSet - F: FunctionSpace R - D: Type +<>= +)abbrev package FFFGF FractionFreeFastGaussianFractions +++ Author: Martin Rubey +++ Description: +++ This package lifts the interpolation functions from +++ \spadtype{FractionFreeFastGaussian} to fractions. +++ The packages defined in this file provide fast fraction free rational +++ interpolation algorithms. (see FAMR2, FFFG, FFFGF, NEWTON) +FractionFreeFastGaussianFractions(D, V, VF): Exports == Implementation where + D: Join(IntegralDomain, GcdDomain) + V: FiniteAbelianMonoidRing(D, NonNegativeInteger) + VF: FiniteAbelianMonoidRing(Fraction D, NonNegativeInteger) - K ==> Kernel F - PMPRED ==> "%pmpredicate" + F ==> Fraction D - Exports ==> with - suchThat: (F, D -> Boolean) -> F - ++ suchThat(x, foo) attaches the predicate foo to x; - ++ error if x is not a symbol. - suchThat: (F, List(D -> Boolean)) -> F - ++ suchThat(x, [f1, f2, ..., fn]) attaches the predicate - ++ f1 and f2 and ... and fn to x. - ++ Error: if x is not a symbol. + SUP ==> SparseUnivariatePolynomial - Implementation ==> add - import AnyFunctions1(D -> Boolean) + FFFG ==> FractionFreeFastGaussian - st : (K, List Any) -> F - preds: K -> List Any - mkk : BasicOperator -> F + FAMR2 ==> FiniteAbelianMonoidRingFunctions2 - suchThat(p:F, f:D -> Boolean) == suchThat(p, [f]) - mkk op == kernel(op, empty()$List(F)) + cFunction ==> (NonNegativeInteger, Vector SUP D) -> D - preds k == - (u := property(operator k, PMPRED)) case "failed" => empty() - (u::None) pretend List(Any) + CoeffAction ==> (NonNegativeInteger, NonNegativeInteger, V) -> D +-- coeffAction(k, l, f) is the coefficient of x^k in z^l f(x) - st(k, l) == - mkk assert(setProperty(copy operator k, PMPRED, - concat(preds k, l) pretend None), string(new()$Symbol)) + Exports == with - suchThat(p:F, l:List(D -> Boolean)) == - retractIfCan(p)@Union(Symbol, "failed") case Symbol => - st(retract(p)@K, [f::Any for f in l]) - error "suchThat must be applied to symbols only" + generalInterpolation: (List D, CoeffAction, Vector VF, List NonNegativeInteger) + -> Matrix SUP D + ++ \spad{generalInterpolation(l, CA, f, eta)} performs Hermite-Pade + ++ approximation using the given action CA of polynomials on the elements + ++ of f. The result is guaranteed to be correct up to order + ++ |eta|-1. Given that eta is a "normal" point, the degrees on the + ++ diagonal are given by eta. The degrees of column i are in this case + ++ eta + e.i - [1,1,...,1], where the degree of zero is -1. + + generalInterpolation: (List D, CoeffAction, + Vector VF, NonNegativeInteger, NonNegativeInteger) + -> Stream Matrix SUP D + ++ \spad{generalInterpolation(l, CA, f, sumEta, maxEta)} applies + ++ generalInterpolation(l, CA, f, eta) for all possible eta with maximal + ++ entry maxEta and sum of entries sumEta + + Implementation == add + + multiplyRows!(v: Vector D, M: Matrix SUP D): Matrix SUP D == + n := #v + for i in 1..n repeat + for j in 1..n repeat + M.(i,j) := v.i*M.(i,j) + + M + + generalInterpolation(C: List D, coeffAction: CoeffAction, + f: Vector VF, eta: List NonNegativeInteger): Matrix SUP D == + n := #f + g: Vector V := new(n, 0) + den: Vector D := new(n, 0) + + for i in 1..n repeat + c := coefficients(f.i) + den.i := commonDenominator(c)$CommonDenominator(D, F, List F) + g.i := map(retract(#1*den.i)@D, f.i) + $FAMR2(NonNegativeInteger, Fraction D, VF, D, V) + + M := generalInterpolation(C, coeffAction, g, eta)$FFFG(D, V) + +-- The following is necessary since I'm multiplying each row with a factor, not +-- each column. Possibly I could factor out gcd den, but I'm not sure whether +-- this is efficient. + + multiplyRows!(den, M) + + generalInterpolation(C: List D, coeffAction: CoeffAction, + f: Vector VF, + sumEta: NonNegativeInteger, + maxEta: NonNegativeInteger) + : Stream Matrix SUP D == + + n := #f + g: Vector V := new(n, 0) + den: Vector D := new(n, 0) + + for i in 1..n repeat + c := coefficients(f.i) + den.i := commonDenominator(c)$CommonDenominator(D, F, List F) + g.i := map(retract(#1*den.i)@D, f.i) + $FAMR2(NonNegativeInteger, Fraction D, VF, D, V) + + c: cFunction := generalCoefficient(coeffAction, g, + (#1-1)::NonNegativeInteger, #2)$FFFG(D, V) + + + MS: Stream Matrix SUP D + := generalInterpolation(C, coeffAction, g, sumEta, maxEta)$FFFG(D, V) + +-- The following is necessary since I'm multiplying each row with a factor, not +-- each column. Possibly I could factor out gcd den, but I'm not sure whether +-- this is efficient. + + map(multiplyRows!(den, #1), MS)$Stream(Matrix SUP D) @ -<>= -"PMPREDFS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=PMPREDFS"] -"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] -"PMPREDFS" -> "FS" +<>= +"FFFGF" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FFFGF"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"FFFGF" -> "PFECAT" @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{package SUMFS FunctionSpaceSum} -\pagehead{FunctionSpaceSum}{SUMFS} -\pagepic{ps/v104functionspacesum.ps}{SUMFS}{1.00} +\section{package FRAC2 FractionFunctions2} +\pagehead{FractionFunctions2}{FRAC2} +\pagepic{ps/v104fractionfunctions2.ps}{FRAC2}{1.00} {\bf Exports:}\\ \begin{tabular}{lllll} \end{tabular} -<>= -)abbrev package SUMFS FunctionSpaceSum -++ Top-level sum function -++ Author: Manuel Bronstein -++ Date Created: ??? -++ Date Last Updated: 19 April 1991 -++ Description: computes sums of top-level expressions; -FunctionSpaceSum(R, F): Exports == Implementation where - R: Join(IntegralDomain, OrderedSet, - RetractableTo Integer, LinearlyExplicitRingOver Integer) - F: Join(FunctionSpace R, CombinatorialOpsCategory, - AlgebraicallyClosedField, TranscendentalFunctionCategory) +<>= +)abbrev package FRAC2 FractionFunctions2 +++ Author: +++ Date Created: +++ Date Last Updated: +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: This package extends a map between integral domains to +++ a map between Fractions over those domains by applying the map to the +++ numerators and denominators. +FractionFunctions2(A, B): Exports == Impl where + A, B: IntegralDomain - SE ==> Symbol - K ==> Kernel F + R ==> Fraction A + S ==> Fraction B Exports ==> with - sum: (F, SE) -> F - ++ sum(a(n), n) returns A(n) such that A(n+1) - A(n) = a(n); - sum: (F, SegmentBinding F) -> F - ++ sum(f(n), n = a..b) returns f(a) + f(a+1) + ... + f(b); - - Implementation ==> add - import ElementaryFunctionStructurePackage(R, F) - import GosperSummationMethod(IndexedExponents K, K, R, - SparseMultivariatePolynomial(R, K), F) + map: (A -> B, R) -> S + ++ map(func,frac) applies the function func to the numerator + ++ and denominator of the fraction frac. - innersum: (F, K) -> Union(F, "failed") - notRF? : (F, K) -> Boolean - newk : () -> K - - newk() == kernel(new()$SE) - - sum(x:F, s:SegmentBinding F) == - k := kernel(variable s)@K - (u := innersum(x, k)) case "failed" => summation(x, s) - eval(u::F, k, 1 + hi segment s) - eval(u::F, k, lo segment s) - - sum(x:F, v:SE) == - (u := innersum(x, kernel(v)@K)) case "failed" => summation(x,v) - u::F - - notRF?(f, k) == - for kk in tower f repeat - member?(k, tower(kk::F)) and (symbolIfCan(kk) case "failed") => - return true - false - - innersum(x, k) == - zero? x => 0 - notRF?(f := normalize(x / (x1 := eval(x, k, k::F - 1))), k) => - "failed" - (u := GospersMethod(f, k, newk)) case "failed" => "failed" - x1 * eval(u::F, k, k::F - 1) + Impl ==> add + map(f, r) == map(f, r)$QuotientFieldCategoryFunctions2(A, B, R, S) @ -<>= -"SUMFS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SUMFS"] -"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] -"ACF" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ACF"] -"SUMFS" -> "FS" -"SUMFS" -> "ACF" +<>= +"FRAC2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FRAC2"] +"ALGEBRA" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ALGEBRA"] +"FRAC2" -> "ALGEBRA" @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -13560,6 +16698,1811 @@ component of the gradient failed, it resulted in an infinite loop for @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FFCAT2 FunctionFieldCategoryFunctions2} +\pagehead{FunctionFieldCategoryFunctions2}{FFCAT2} +\pagepic{ps/v104functionfieldcategoryfunctions2.ps}{FFCAT2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FFCAT2 FunctionFieldCategoryFunctions2 +++ Lifts a map from rings to function fields over them +++ Author: Manuel Bronstein +++ Date Created: May 1988 +++ Date Last Updated: 26 Jul 1988 +++ Description: Lifts a map from rings to function fields over them. +FunctionFieldCategoryFunctions2(R1, UP1, UPUP1, F1, R2, UP2, UPUP2, F2): + Exports == Implementation where + R1 : UniqueFactorizationDomain + UP1 : UnivariatePolynomialCategory R1 + UPUP1: UnivariatePolynomialCategory Fraction UP1 + F1 : FunctionFieldCategory(R1, UP1, UPUP1) + R2 : UniqueFactorizationDomain + UP2 : UnivariatePolynomialCategory R2 + UPUP2: UnivariatePolynomialCategory Fraction UP2 + F2 : FunctionFieldCategory(R2, UP2, UPUP2) + + Exports ==> with + map: (R1 -> R2, F1) -> F2 + ++ map(f, p) lifts f to F1 and applies it to p. + + Implementation ==> add + map(f, f1) == + reduce(map(f, lift f1)$MultipleMap(R1, UP1, UPUP1, R2, UP2, UPUP2)) + +@ +<>= +"FFCAT2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FFCAT2"] +"FFCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FFCAT"] +"FFCAT2" -> "FFCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package PMASSFS FunctionSpaceAssertions} +\pagehead{FunctionSpaceAssertions}{PMASSFS} +\pagepic{ps/v104functionspaceassertions.ps}{PMASSFS}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package PMASSFS FunctionSpaceAssertions +++ Assertions for pattern-matching +++ Author: Manuel Bronstein +++ Description: Attaching assertions to symbols for pattern matching; +++ Date Created: 21 Mar 1989 +++ Date Last Updated: 23 May 1990 +++ Keywords: pattern, matching. +FunctionSpaceAssertions(R, F): Exports == Implementation where + R: OrderedSet + F: FunctionSpace R + + K ==> Kernel F + PMOPT ==> "%pmoptional" + PMMULT ==> "%pmmultiple" + PMCONST ==> "%pmconstant" + + Exports ==> with + assert : (F, String) -> F + ++ assert(x, s) makes the assertion s about x. + ++ Error: if x is not a symbol. + constant: F -> F + ++ constant(x) tells the pattern matcher that x should + ++ match only the symbol 'x and no other quantity. + ++ Error: if x is not a symbol. + optional: F -> F + ++ optional(x) tells the pattern matcher that x can match + ++ an identity (0 in a sum, 1 in a product or exponentiation). + ++ Error: if x is not a symbol. + multiple: F -> F + ++ multiple(x) tells the pattern matcher that x should + ++ preferably match a multi-term quantity in a sum or product. + ++ For matching on lists, multiple(x) tells the pattern matcher + ++ that x should match a list instead of an element of a list. + ++ Error: if x is not a symbol. + + Implementation ==> add + ass : (K, String) -> F + asst : (K, String) -> F + mkk : BasicOperator -> F + + mkk op == kernel(op, empty()$List(F)) + + ass(k, s) == + has?(op := operator k, s) => k::F + mkk assert(copy op, s) + + asst(k, s) == + has?(op := operator k, s) => k::F + mkk assert(op, s) + + assert(x, s) == + retractIfCan(x)@Union(Symbol, "failed") case Symbol => + asst(retract(x)@K, s) + error "assert must be applied to symbols only" + + constant x == + retractIfCan(x)@Union(Symbol, "failed") case Symbol => + ass(retract(x)@K, PMCONST) + error "constant must be applied to symbols only" + + optional x == + retractIfCan(x)@Union(Symbol, "failed") case Symbol => + ass(retract(x)@K, PMOPT) + error "optional must be applied to symbols only" + + multiple x == + retractIfCan(x)@Union(Symbol, "failed") case Symbol => + ass(retract(x)@K, PMMULT) + error "multiple must be applied to symbols only" + +@ +<>= +"PMASSFS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=PMASSFS"] +"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] +"PMASSFS" -> "FS" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package PMPREDFS FunctionSpaceAttachPredicates} +\pagehead{FunctionSpaceAttachPredicates}{PMPREDFS} +\pagepic{ps/v104functionspaceattachpredicates.ps}{PMPREDFS}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package PMPREDFS FunctionSpaceAttachPredicates +++ Predicates for pattern-matching. +++ Author: Manuel Bronstein +++ Description: Attaching predicates to symbols for pattern matching. +++ Date Created: 21 Mar 1989 +++ Date Last Updated: 23 May 1990 +++ Keywords: pattern, matching. +FunctionSpaceAttachPredicates(R, F, D): Exports == Implementation where + R: OrderedSet + F: FunctionSpace R + D: Type + + K ==> Kernel F + PMPRED ==> "%pmpredicate" + + Exports ==> with + suchThat: (F, D -> Boolean) -> F + ++ suchThat(x, foo) attaches the predicate foo to x; + ++ error if x is not a symbol. + suchThat: (F, List(D -> Boolean)) -> F + ++ suchThat(x, [f1, f2, ..., fn]) attaches the predicate + ++ f1 and f2 and ... and fn to x. + ++ Error: if x is not a symbol. + + Implementation ==> add + import AnyFunctions1(D -> Boolean) + + st : (K, List Any) -> F + preds: K -> List Any + mkk : BasicOperator -> F + + suchThat(p:F, f:D -> Boolean) == suchThat(p, [f]) + mkk op == kernel(op, empty()$List(F)) + + preds k == + (u := property(operator k, PMPRED)) case "failed" => empty() + (u::None) pretend List(Any) + + st(k, l) == + mkk assert(setProperty(copy operator k, PMPRED, + concat(preds k, l) pretend None), string(new()$Symbol)) + + suchThat(p:F, l:List(D -> Boolean)) == + retractIfCan(p)@Union(Symbol, "failed") case Symbol => + st(retract(p)@K, [f::Any for f in l]) + error "suchThat must be applied to symbols only" + +@ +<>= +"PMPREDFS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=PMPREDFS"] +"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] +"PMPREDFS" -> "FS" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FS2 FunctionSpaceFunctions2} +\pagehead{FunctionSpaceFunctions2}{FS2} +\pagepic{ps/v104functionspacefunctions2.ps}{FS2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FS2 FunctionSpaceFunctions2 +++ Lifting of maps to function spaces +++ Author: Manuel Bronstein +++ Date Created: 22 March 1988 +++ Date Last Updated: 3 May 1994 +++ Description: +++ This package allows a mapping R -> S to be lifted to a mapping +++ from a function space over R to a function space over S; +FunctionSpaceFunctions2(R, A, S, B): Exports == Implementation where + R, S: Join(Ring, OrderedSet) + A : FunctionSpace R + B : FunctionSpace S + + K ==> Kernel A + P ==> SparseMultivariatePolynomial(R, K) + + Exports ==> with + map: (R -> S, A) -> B + ++ map(f, a) applies f to all the constants in R appearing in \spad{a}. + + Implementation ==> add + smpmap: (R -> S, P) -> B + + smpmap(fn, p) == + map(map(map(fn, #1), #1)$ExpressionSpaceFunctions2(A,B),fn(#1)::B, + p)$PolynomialCategoryLifting(IndexedExponents K, K, R, P, B) + + if R has IntegralDomain then + if S has IntegralDomain then + map(f, x) == smpmap(f, numer x) / smpmap(f, denom x) + else + map(f, x) == smpmap(f, numer x) * (recip(smpmap(f, denom x))::B) + else + map(f, x) == smpmap(f, numer x) + +@ +<>= +"FS2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FS2"] +"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] +"FS2" -> "FS" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package SUMFS FunctionSpaceSum} +\pagehead{FunctionSpaceSum}{SUMFS} +\pagepic{ps/v104functionspacesum.ps}{SUMFS}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package SUMFS FunctionSpaceSum +++ Top-level sum function +++ Author: Manuel Bronstein +++ Date Created: ??? +++ Date Last Updated: 19 April 1991 +++ Description: computes sums of top-level expressions; +FunctionSpaceSum(R, F): Exports == Implementation where + R: Join(IntegralDomain, OrderedSet, + RetractableTo Integer, LinearlyExplicitRingOver Integer) + F: Join(FunctionSpace R, CombinatorialOpsCategory, + AlgebraicallyClosedField, TranscendentalFunctionCategory) + + SE ==> Symbol + K ==> Kernel F + + Exports ==> with + sum: (F, SE) -> F + ++ sum(a(n), n) returns A(n) such that A(n+1) - A(n) = a(n); + sum: (F, SegmentBinding F) -> F + ++ sum(f(n), n = a..b) returns f(a) + f(a+1) + ... + f(b); + + Implementation ==> add + import ElementaryFunctionStructurePackage(R, F) + import GosperSummationMethod(IndexedExponents K, K, R, + SparseMultivariatePolynomial(R, K), F) + + innersum: (F, K) -> Union(F, "failed") + notRF? : (F, K) -> Boolean + newk : () -> K + + newk() == kernel(new()$SE) + + sum(x:F, s:SegmentBinding F) == + k := kernel(variable s)@K + (u := innersum(x, k)) case "failed" => summation(x, s) + eval(u::F, k, 1 + hi segment s) - eval(u::F, k, lo segment s) + + sum(x:F, v:SE) == + (u := innersum(x, kernel(v)@K)) case "failed" => summation(x,v) + u::F + + notRF?(f, k) == + for kk in tower f repeat + member?(k, tower(kk::F)) and (symbolIfCan(kk) case "failed") => + return true + false + + innersum(x, k) == + zero? x => 0 + notRF?(f := normalize(x / (x1 := eval(x, k, k::F - 1))), k) => + "failed" + (u := GospersMethod(f, k, newk)) case "failed" => "failed" + x1 * eval(u::F, k, k::F - 1) + +@ +<>= +"SUMFS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SUMFS"] +"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] +"ACF" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ACF"] +"SUMFS" -> "FS" +"SUMFS" -> "ACF" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FS2EXPXP FunctionSpaceToExponentialExpansion} +\pagehead{FunctionSpaceToExponentialExpansion}{FS2EXPXP} +\pagepic{ps/v104functionspacetoexponentialexpansion.ps}{FS2EXPXP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FS2EXPXP FunctionSpaceToExponentialExpansion +++ Author: Clifton J. Williamson +++ Date Created: 17 August 1992 +++ Date Last Updated: 2 December 1994 +++ Basic Operations: +++ Related Domains: ExponentialExpansion, UnivariatePuiseuxSeries(FE,x,cen) +++ Also See: FunctionSpaceToUnivariatePowerSeries +++ AMS Classifications: +++ Keywords: elementary function, power series +++ Examples: +++ References: +++ Description: +++ This package converts expressions in some function space to exponential +++ expansions. +FunctionSpaceToExponentialExpansion(R,FE,x,cen):_ + Exports == Implementation where + R : Join(GcdDomain,OrderedSet,RetractableTo Integer,_ + LinearlyExplicitRingOver Integer) + FE : Join(AlgebraicallyClosedField,TranscendentalFunctionCategory,_ + FunctionSpace R) + x : Symbol + cen : FE + B ==> Boolean + BOP ==> BasicOperator + Expon ==> Fraction Integer + I ==> Integer + NNI ==> NonNegativeInteger + K ==> Kernel FE + L ==> List + RN ==> Fraction Integer + S ==> String + SY ==> Symbol + PCL ==> PolynomialCategoryLifting(IndexedExponents K,K,R,SMP,FE) + POL ==> Polynomial R + SMP ==> SparseMultivariatePolynomial(R,K) + SUP ==> SparseUnivariatePolynomial Polynomial R + UTS ==> UnivariateTaylorSeries(FE,x,cen) + ULS ==> UnivariateLaurentSeries(FE,x,cen) + UPXS ==> UnivariatePuiseuxSeries(FE,x,cen) + EFULS ==> ElementaryFunctionsUnivariateLaurentSeries(FE,UTS,ULS) + EFUPXS ==> ElementaryFunctionsUnivariatePuiseuxSeries(FE,ULS,UPXS,EFULS) + FS2UPS ==> FunctionSpaceToUnivariatePowerSeries(R,FE,RN,UPXS,EFUPXS,x) + EXPUPXS ==> ExponentialOfUnivariatePuiseuxSeries(FE,x,cen) + UPXSSING ==> UnivariatePuiseuxSeriesWithExponentialSingularity(R,FE,x,cen) + XXP ==> ExponentialExpansion(R,FE,x,cen) + Problem ==> Record(func:String,prob:String) + Result ==> Union(%series:UPXS,%problem:Problem) + XResult ==> Union(%expansion:XXP,%problem:Problem) + SIGNEF ==> ElementaryFunctionSign(R,FE) + + Exports ==> with + exprToXXP : (FE,B) -> XResult + ++ exprToXXP(fcn,posCheck?) converts the expression \spad{fcn} to + ++ an exponential expansion. If \spad{posCheck?} is true, + ++ log's of negative numbers are not allowed nor are nth roots of + ++ negative numbers with n even. If \spad{posCheck?} is false, + ++ these are allowed. + localAbs: FE -> FE + ++ localAbs(fcn) = \spad{abs(fcn)} or \spad{sqrt(fcn**2)} depending + ++ on whether or not FE has a function \spad{abs}. This should be + ++ a local function, but the compiler won't allow it. + + Implementation ==> add + + import FS2UPS -- conversion of functional expressions to Puiseux series + import EFUPXS -- partial transcendental funtions on UPXS + + ratIfCan : FE -> Union(RN,"failed") + stateSeriesProblem : (S,S) -> Result + stateProblem : (S,S) -> XResult + newElem : FE -> FE + smpElem : SMP -> FE + k2Elem : K -> FE + iExprToXXP : (FE,B) -> XResult + listToXXP : (L FE,B,XXP,(XXP,XXP) -> XXP) -> XResult + isNonTrivPower : FE -> Union(Record(val:FE,exponent:I),"failed") + negativePowerOK? : UPXS -> Boolean + powerToXXP : (FE,I,B) -> XResult + carefulNthRootIfCan : (UPXS,NNI,B) -> Result + nthRootXXPIfCan : (XXP,NNI,B) -> XResult + nthRootToXXP : (FE,NNI,B) -> XResult + genPowerToXXP : (L FE,B) -> XResult + kernelToXXP : (K,B) -> XResult + genExp : (UPXS,B) -> Result + exponential : (UPXS,B) -> XResult + expToXXP : (FE,B) -> XResult + genLog : (UPXS,B) -> Result + logToXXP : (FE,B) -> XResult + applyIfCan : (UPXS -> Union(UPXS,"failed"),FE,S,B) -> XResult + applyBddIfCan : (FE,UPXS -> Union(UPXS,"failed"),FE,S,B) -> XResult + tranToXXP : (K,FE,B) -> XResult + contOnReals? : S -> B + bddOnReals? : S -> B + opsInvolvingX : FE -> L BOP + opInOpList? : (SY,L BOP) -> B + exponential? : FE -> B + productOfNonZeroes? : FE -> B + atancotToXXP : (FE,FE,B,I) -> XResult + + ZEROCOUNT : RN := 1000/1 + -- number of zeroes to be removed when taking logs or nth roots + +--% retractions + + ratIfCan fcn == retractIfCan(fcn)@Union(RN,"failed") + +--% 'problems' with conversion + + stateSeriesProblem(function,problem) == + -- records the problem which occured in converting an expression + -- to a power series + [[function,problem]] + + stateProblem(function,problem) == + -- records the problem which occured in converting an expression + -- to an exponential expansion + [[function,problem]] + +--% normalizations + + newElem f == + -- rewrites a functional expression; all trig functions are + -- expressed in terms of sin and cos; all hyperbolic trig + -- functions are expressed in terms of exp; all inverse + -- hyperbolic trig functions are expressed in terms of exp + -- and log + smpElem(numer f) / smpElem(denom f) + + smpElem p == map(k2Elem,#1::FE,p)$PCL + + k2Elem k == + -- rewrites a kernel; all trig functions are + -- expressed in terms of sin and cos; all hyperbolic trig + -- functions are expressed in terms of exp + null(args := [newElem a for a in argument k]) => k :: FE + iez := inv(ez := exp(z := first args)) + sinz := sin z; cosz := cos z + is?(k,"tan" :: SY) => sinz / cosz + is?(k,"cot" :: SY) => cosz / sinz + is?(k,"sec" :: SY) => inv cosz + is?(k,"csc" :: SY) => inv sinz + is?(k,"sinh" :: SY) => (ez - iez) / (2 :: FE) + is?(k,"cosh" :: SY) => (ez + iez) / (2 :: FE) + is?(k,"tanh" :: SY) => (ez - iez) / (ez + iez) + is?(k,"coth" :: SY) => (ez + iez) / (ez - iez) + is?(k,"sech" :: SY) => 2 * inv(ez + iez) + is?(k,"csch" :: SY) => 2 * inv(ez - iez) + is?(k,"acosh" :: SY) => log(sqrt(z**2 - 1) + z) + is?(k,"atanh" :: SY) => log((z + 1) / (1 - z)) / (2 :: FE) + is?(k,"acoth" :: SY) => log((z + 1) / (z - 1)) / (2 :: FE) + is?(k,"asech" :: SY) => log((inv z) + sqrt(inv(z**2) - 1)) + is?(k,"acsch" :: SY) => log((inv z) + sqrt(1 + inv(z**2))) + (operator k) args + +--% general conversion function + + exprToXXP(fcn,posCheck?) == iExprToXXP(newElem fcn,posCheck?) + + iExprToXXP(fcn,posCheck?) == + -- converts a functional expression to an exponential expansion + --!! The following line is commented out so that expressions of + --!! the form a**b will be normalized to exp(b * log(a)) even if + --!! 'a' and 'b' do not involve the limiting variable 'x'. + --!! - cjw 1 Dec 94 + --not member?(x,variables fcn) => [monomial(fcn,0)$UPXS :: XXP] + (poly := retractIfCan(fcn)@Union(POL,"failed")) case POL => + [exprToUPS(fcn,false,"real:two sides").%series :: XXP] + (sum := isPlus fcn) case L(FE) => + listToXXP(sum :: L(FE),posCheck?,0,#1 + #2) + (prod := isTimes fcn) case L(FE) => + listToXXP(prod :: L(FE),posCheck?,1,#1 * #2) + (expt := isNonTrivPower fcn) case Record(val:FE,exponent:I) => + power := expt :: Record(val:FE,exponent:I) + powerToXXP(power.val,power.exponent,posCheck?) + (ker := retractIfCan(fcn)@Union(K,"failed")) case K => + kernelToXXP(ker :: K,posCheck?) + error "exprToXXP: neither a sum, product, power, nor kernel" + +--% sums and products + + listToXXP(list,posCheck?,ans,op) == + -- converts each element of a list of expressions to an exponential + -- expansion and returns the sum of these expansions, when 'op' is + + -- and 'ans' is 0, or the product of these expansions, when 'op' is * + -- and 'ans' is 1 + while not null list repeat + (term := iExprToXXP(first list,posCheck?)) case %problem => + return term + ans := op(ans,term.%expansion) + list := rest list + [ans] + +--% nth roots and integral powers + + isNonTrivPower fcn == + -- is the function a power with exponent other than 0 or 1? + (expt := isPower fcn) case "failed" => "failed" + power := expt :: Record(val:FE,exponent:I) +-- one? power.exponent => "failed" + (power.exponent = 1) => "failed" + power + + negativePowerOK? upxs == + -- checks the lower order coefficient of a Puiseux series; + -- the coefficient may be inverted only if + -- (a) the only function involving x is 'log', or + -- (b) the lowest order coefficient is a product of exponentials + -- and functions not involving x + deg := degree upxs + if (coef := coefficient(upxs,deg)) = 0 then + deg := order(upxs,deg + ZEROCOUNT :: Expon) + (coef := coefficient(upxs,deg)) = 0 => + error "inverse of series with many leading zero coefficients" + xOpList := opsInvolvingX coef + -- only function involving x is 'log' + (null xOpList) => true + (null rest xOpList and is?(first xOpList,"log" :: SY)) => true + -- lowest order coefficient is a product of exponentials and + -- functions not involving x + productOfNonZeroes? coef => true + false + + powerToXXP(fcn,n,posCheck?) == + -- converts an integral power to an exponential expansion + (b := iExprToXXP(fcn,posCheck?)) case %problem => b + xxp := b.%expansion + n > 0 => [xxp ** n] + -- a Puiseux series will be reciprocated only if n < 0 and + -- numerator of 'xxp' has exactly one monomial + numberOfMonomials(num := numer xxp) > 1 => [xxp ** n] + negativePowerOK? leadingCoefficient num => + (rec := recip num) case "failed" => error "FS2EXPXP: can't happen" + nn := (-n) :: NNI + [(((denom xxp) ** nn) * ((rec :: UPXSSING) ** nn)) :: XXP] + --!! we may want to create a fraction instead of trying to + --!! reciprocate the numerator + stateProblem("inv","lowest order coefficient involves x") + + carefulNthRootIfCan(ups,n,posCheck?) == + -- similar to 'nthRootIfCan', but it is fussy about the series + -- it takes as an argument. If 'n' is EVEN and 'posCheck?' + -- is truem then the leading coefficient of the series must + -- be POSITIVE. In this case, if 'rightOnly?' is false, the + -- order of the series must be zero. The idea is that the + -- series represents a real function of a real variable, and + -- we want a unique real nth root defined on a neighborhood + -- of zero. + n < 1 => error "nthRoot: n must be positive" + deg := degree ups + if (coef := coefficient(ups,deg)) = 0 then + deg := order(ups,deg + ZEROCOUNT :: Expon) + (coef := coefficient(ups,deg)) = 0 => + error "log of series with many leading zero coefficients" + -- if 'posCheck?' is true, we do not allow nth roots of negative + -- numbers when n in even + if even?(n :: I) then + if posCheck? and ((signum := sign(coef)$SIGNEF) case I) then + (signum :: I) = -1 => + return stateSeriesProblem("nth root","root of negative number") + (ans := nthRootIfCan(ups,n)) case "failed" => + stateSeriesProblem("nth root","no nth root") + [ans :: UPXS] + + nthRootXXPIfCan(xxp,n,posCheck?) == + num := numer xxp; den := denom xxp + not zero?(reductum num) or not zero?(reductum den) => + stateProblem("nth root","several monomials in numerator or denominator") + nInv : RN := 1/n + newNum := + coef : UPXS := + root := carefulNthRootIfCan(leadingCoefficient num,n,posCheck?) + root case %problem => return [root.%problem] + root.%series + deg := (nInv :: FE) * (degree num) + monomial(coef,deg) + newDen := + coef : UPXS := + root := carefulNthRootIfCan(leadingCoefficient den,n,posCheck?) + root case %problem => return [root.%problem] + root.%series + deg := (nInv :: FE) * (degree den) + monomial(coef,deg) + [newNum/newDen] + + nthRootToXXP(arg,n,posCheck?) == + -- converts an nth root to a power series + -- this is not used in the limit package, so the series may + -- have non-zero order, in which case nth roots may not be unique + (result := iExprToXXP(arg,posCheck?)) case %problem => [result.%problem] + ans := nthRootXXPIfCan(result.%expansion,n,posCheck?) + ans case %problem => [ans.%problem] + [ans.%expansion] + +--% general powers f(x) ** g(x) + + genPowerToXXP(args,posCheck?) == + -- converts a power f(x) ** g(x) to an exponential expansion + (logBase := logToXXP(first args,posCheck?)) case %problem => + logBase + (expon := iExprToXXP(second args,posCheck?)) case %problem => + expon + xxp := (expon.%expansion) * (logBase.%expansion) + (f := retractIfCan(xxp)@Union(UPXS,"failed")) case "failed" => + stateProblem("exp","multiply nested exponential") + exponential(f,posCheck?) + +--% kernels + + kernelToXXP(ker,posCheck?) == + -- converts a kernel to a power series + (sym := symbolIfCan(ker)) case Symbol => + (sym :: Symbol) = x => [monomial(1,1)$UPXS :: XXP] + [monomial(ker :: FE,0)$UPXS :: XXP] + empty?(args := argument ker) => [monomial(ker :: FE,0)$UPXS :: XXP] + empty? rest args => + arg := first args + is?(ker,"%paren" :: Symbol) => iExprToXXP(arg,posCheck?) + is?(ker,"log" :: Symbol) => logToXXP(arg,posCheck?) + is?(ker,"exp" :: Symbol) => expToXXP(arg,posCheck?) + tranToXXP(ker,arg,posCheck?) + is?(ker,"%power" :: Symbol) => genPowerToXXP(args,posCheck?) + is?(ker,"nthRoot" :: Symbol) => + n := retract(second args)@I + nthRootToXXP(first args,n :: NNI,posCheck?) + stateProblem(string name ker,"unknown kernel") + +--% exponentials and logarithms + + genExp(ups,posCheck?) == + -- If the series has order zero and the constant term a0 of the + -- series involves x, the function tries to expand exp(a0) as + -- a power series. + (deg := order(ups,1)) < 0 => + -- this "can't happen" + error "exp of function with sigularity" + deg > 0 => [exp(ups)] + lc := coefficient(ups,0); varOpList := opsInvolvingX lc + not opInOpList?("log" :: Symbol,varOpList) => [exp(ups)] + -- try to fix exp(lc) if necessary + expCoef := normalize(exp lc,x)$ElementaryFunctionStructurePackage(R,FE) + result := exprToGenUPS(expCoef,posCheck?,"real:right side")$FS2UPS + --!! will deal with problems in limitPlus in EXPEXPAN + --result case %problem => result + result case %problem => [exp(ups)] + [(result.%series) * exp(ups - monomial(lc,0))] + + exponential(f,posCheck?) == + singPart := truncate(f,0) - (coefficient(f,0) :: UPXS) + taylorPart := f - singPart + expon := exponential(singPart)$EXPUPXS + (coef := genExp(taylorPart,posCheck?)) case %problem => [coef.%problem] + [monomial(coef.%series,expon)$UPXSSING :: XXP] + + expToXXP(arg,posCheck?) == + (result := iExprToXXP(arg,posCheck?)) case %problem => result + xxp := result.%expansion + (f := retractIfCan(xxp)@Union(UPXS,"failed")) case "failed" => + stateProblem("exp","multiply nested exponential") + exponential(f,posCheck?) + + genLog(ups,posCheck?) == + deg := degree ups + if (coef := coefficient(ups,deg)) = 0 then + deg := order(ups,deg + ZEROCOUNT) + (coef := coefficient(ups,deg)) = 0 => + error "log of series with many leading zero coefficients" + -- if 'posCheck?' is true, we do not allow logs of negative numbers + if posCheck? then + if ((signum := sign(coef)$SIGNEF) case I) then + (signum :: I) = -1 => + return stateSeriesProblem("log","negative leading coefficient") + lt := monomial(coef,deg)$UPXS + -- check to see if lowest order coefficient is a negative rational + negRat? : Boolean := + ((rat := ratIfCan coef) case RN) => + (rat :: RN) < 0 => true + false + false + logTerm : FE := + mon : FE := (x :: FE) - (cen :: FE) + pow : FE := mon ** (deg :: FE) + negRat? => log(coef * pow) + term1 : FE := (deg :: FE) * log(mon) + log(coef) + term1 + [monomial(logTerm,0)$UPXS + log(ups/lt)] + + logToXXP(arg,posCheck?) == + (result := iExprToXXP(arg,posCheck?)) case %problem => result + xxp := result.%expansion + num := numer xxp; den := denom xxp + not zero?(reductum num) or not zero?(reductum den) => + stateProblem("log","several monomials in numerator or denominator") + numCoefLog : UPXS := + (res := genLog(leadingCoefficient num,posCheck?)) case %problem => + return [res.%problem] + res.%series + denCoefLog : UPXS := + (res := genLog(leadingCoefficient den,posCheck?)) case %problem => + return [res.%problem] + res.%series + numLog := (exponent degree num) + numCoefLog + denLog := (exponent degree den) + denCoefLog --?? num? + [(numLog - denLog) :: XXP] + +--% other transcendental functions + + applyIfCan(fcn,arg,fcnName,posCheck?) == + -- converts fcn(arg) to an exponential expansion + (xxpArg := iExprToXXP(arg,posCheck?)) case %problem => xxpArg + xxp := xxpArg.%expansion + (f := retractIfCan(xxp)@Union(UPXS,"failed")) case "failed" => + stateProblem(fcnName,"multiply nested exponential") + upxs := f :: UPXS + (deg := order(upxs,1)) < 0 => + stateProblem(fcnName,"essential singularity") + deg > 0 => [fcn(upxs) :: UPXS :: XXP] + lc := coefficient(upxs,0); xOpList := opsInvolvingX lc + null xOpList => [fcn(upxs) :: UPXS :: XXP] + opInOpList?("log" :: SY,xOpList) => + stateProblem(fcnName,"logs in constant coefficient") + contOnReals? fcnName => [fcn(upxs) :: UPXS :: XXP] + stateProblem(fcnName,"x in constant coefficient") + + applyBddIfCan(fe,fcn,arg,fcnName,posCheck?) == + -- converts fcn(arg) to a generalized power series, where the + -- function fcn is bounded for real values + -- if fcn(arg) has an essential singularity as a complex + -- function, we return fcn(arg) as a monomial of degree 0 + (xxpArg := iExprToXXP(arg,posCheck?)) case %problem => + trouble := xxpArg.%problem + trouble.prob = "essential singularity" => [monomial(fe,0)$UPXS :: XXP] + xxpArg + xxp := xxpArg.%expansion + (f := retractIfCan(xxp)@Union(UPXS,"failed")) case "failed" => + stateProblem("exp","multiply nested exponential") + (ans := fcn(f :: UPXS)) case "failed" => [monomial(fe,0)$UPXS :: XXP] + [ans :: UPXS :: XXP] + + CONTFCNS : L S := ["sin","cos","atan","acot","exp","asinh"] + -- functions which are defined and continuous at all real numbers + + BDDFCNS : L S := ["sin","cos","atan","acot"] + -- functions which are bounded on the reals + + contOnReals? fcn == member?(fcn,CONTFCNS) + bddOnReals? fcn == member?(fcn,BDDFCNS) + + opsInvolvingX fcn == + opList := [op for k in tower fcn | unary?(op := operator k) _ + and member?(x,variables first argument k)] + removeDuplicates opList + + opInOpList?(name,opList) == + for op in opList repeat + is?(op,name) => return true + false + + exponential? fcn == + -- is 'fcn' of the form exp(f)? + (ker := retractIfCan(fcn)@Union(K,"failed")) case K => + is?(ker :: K,"exp" :: Symbol) + false + + productOfNonZeroes? fcn == + -- is 'fcn' a product of non-zero terms, where 'non-zero' + -- means an exponential or a function not involving x + exponential? fcn => true + (prod := isTimes fcn) case "failed" => false + for term in (prod :: L(FE)) repeat + (not exponential? term) and member?(x,variables term) => + return false + true + + tranToXXP(ker,arg,posCheck?) == + -- converts op(arg) to a power series for certain functions + -- op in trig or hyperbolic trig categories + -- N.B. when this function is called, 'k2elem' will have been + -- applied, so the following functions cannot appear: + -- tan, cot, sec, csc, sinh, cosh, tanh, coth, sech, csch + -- acosh, atanh, acoth, asech, acsch + is?(ker,"sin" :: SY) => + applyBddIfCan(ker :: FE,sinIfCan,arg,"sin",posCheck?) + is?(ker,"cos" :: SY) => + applyBddIfCan(ker :: FE,cosIfCan,arg,"cos",posCheck?) + is?(ker,"asin" :: SY) => + applyIfCan(asinIfCan,arg,"asin",posCheck?) + is?(ker,"acos" :: SY) => + applyIfCan(acosIfCan,arg,"acos",posCheck?) + is?(ker,"atan" :: SY) => + atancotToXXP(ker :: FE,arg,posCheck?,1) + is?(ker,"acot" :: SY) => + atancotToXXP(ker :: FE,arg,posCheck?,-1) + is?(ker,"asec" :: SY) => + applyIfCan(asecIfCan,arg,"asec",posCheck?) + is?(ker,"acsc" :: SY) => + applyIfCan(acscIfCan,arg,"acsc",posCheck?) + is?(ker,"asinh" :: SY) => + applyIfCan(asinhIfCan,arg,"asinh",posCheck?) + stateProblem(string name ker,"unknown kernel") + + if FE has abs: FE -> FE then + localAbs fcn == abs fcn + else + localAbs fcn == sqrt(fcn * fcn) + + signOfExpression: FE -> FE + signOfExpression arg == localAbs(arg)/arg + + atancotToXXP(fe,arg,posCheck?,plusMinus) == + -- converts atan(f(x)) to a generalized power series + atanFlag : String := "real: right side"; posCheck? : Boolean := true + (result := exprToGenUPS(arg,posCheck?,atanFlag)$FS2UPS) case %problem => + trouble := result.%problem + trouble.prob = "essential singularity" => [monomial(fe,0)$UPXS :: XXP] + [result.%problem] + ups := result.%series; coef := coefficient(ups,0) + -- series involves complex numbers + (ord := order(ups,0)) = 0 and coef * coef = -1 => + y := differentiate(ups)/(1 + ups*ups) + yCoef := coefficient(y,-1) + [(monomial(log yCoef,0)+integrate(y - monomial(yCoef,-1)$UPXS)) :: XXP] + cc : FE := + ord < 0 => + (rn := ratIfCan(ord :: FE)) case "failed" => + -- this condition usually won't occur because exponents will + -- be integers or rational numbers + return stateProblem("atan","branch problem") + lc := coefficient(ups,ord) + (signum := sign(lc)$SIGNEF) case "failed" => + -- can't determine sign + posNegPi2 := signOfExpression(lc) * pi()/(2 :: FE) + plusMinus = 1 => posNegPi2 + pi()/(2 :: FE) - posNegPi2 + (n := signum :: Integer) = -1 => + plusMinus = 1 => -pi()/(2 :: FE) + pi() + plusMinus = 1 => pi()/(2 :: FE) + 0 + atan coef + [((cc :: UPXS) + integrate(differentiate(ups)/(1 + ups*ups))) :: XXP] + +@ +<>= +"FS2EXPXP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FS2EXPXP"] +"ULSCCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ULSCCAT"] +"FS2EXPXP" -> "ULSCCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FS2UPS FunctionSpaceToUnivariatePowerSeries} +\pagehead{FunctionSpaceToUnivariatePowerSeries}{FS2UPS} +\pagepic{ps/v104functionspacetounivariatepowerseries.ps}{FS2UPS}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FS2UPS FunctionSpaceToUnivariatePowerSeries +++ Author: Clifton J. Williamson +++ Date Created: 21 March 1989 +++ Date Last Updated: 2 December 1994 +++ Basic Operations: +++ Related Domains: +++ Also See: +++ AMS Classifications: +++ Keywords: elementary function, power series +++ Examples: +++ References: +++ Description: +++ This package converts expressions in some function space to power +++ series in a variable x with coefficients in that function space. +++ The function \spadfun{exprToUPS} converts expressions to power series +++ whose coefficients do not contain the variable x. The function +++ \spadfun{exprToGenUPS} converts functional expressions to power series +++ whose coefficients may involve functions of \spad{log(x)}. +FunctionSpaceToUnivariatePowerSeries(R,FE,Expon,UPS,TRAN,x):_ + Exports == Implementation where + R : Join(GcdDomain,OrderedSet,RetractableTo Integer,_ + LinearlyExplicitRingOver Integer) + FE : Join(AlgebraicallyClosedField,TranscendentalFunctionCategory,_ + FunctionSpace R) + with + coerce: Expon -> % + ++ coerce(e) converts an 'exponent' e to an 'expression' + Expon : OrderedRing + UPS : Join(UnivariatePowerSeriesCategory(FE,Expon),Field,_ + TranscendentalFunctionCategory) + with + differentiate: % -> % + ++ differentiate(x) returns the derivative of x since we + ++ need to be able to differentiate a power series + integrate: % -> % + ++ integrate(x) returns the integral of x since + ++ we need to be able to integrate a power series + TRAN : PartialTranscendentalFunctions UPS + x : Symbol + B ==> Boolean + BOP ==> BasicOperator + I ==> Integer + NNI ==> NonNegativeInteger + K ==> Kernel FE + L ==> List + RN ==> Fraction Integer + S ==> String + SY ==> Symbol + PCL ==> PolynomialCategoryLifting(IndexedExponents K,K,R,SMP,FE) + POL ==> Polynomial R + SMP ==> SparseMultivariatePolynomial(R,K) + SUP ==> SparseUnivariatePolynomial Polynomial R + Problem ==> Record(func:String,prob:String) + Result ==> Union(%series:UPS,%problem:Problem) + SIGNEF ==> ElementaryFunctionSign(R,FE) + + Exports ==> with + exprToUPS : (FE,B,S) -> Result + ++ exprToUPS(fcn,posCheck?,atanFlag) converts the expression + ++ \spad{fcn} to a power series. If \spad{posCheck?} is true, + ++ log's of negative numbers are not allowed nor are nth roots of + ++ negative numbers with n even. If \spad{posCheck?} is false, + ++ these are allowed. \spad{atanFlag} determines how the case + ++ \spad{atan(f(x))}, where \spad{f(x)} has a pole, will be treated. + ++ The possible values of \spad{atanFlag} are \spad{"complex"}, + ++ \spad{"real: two sides"}, \spad{"real: left side"}, + ++ \spad{"real: right side"}, and \spad{"just do it"}. + ++ If \spad{atanFlag} is \spad{"complex"}, then no series expansion + ++ will be computed because, viewed as a function of a complex + ++ variable, \spad{atan(f(x))} has an essential singularity. + ++ Otherwise, the sign of the leading coefficient of the series + ++ expansion of \spad{f(x)} determines the constant coefficient + ++ in the series expansion of \spad{atan(f(x))}. If this sign cannot + ++ be determined, a series expansion is computed only when + ++ \spad{atanFlag} is \spad{"just do it"}. When the leading term + ++ in the series expansion of \spad{f(x)} is of odd degree (or is a + ++ rational degree with odd numerator), then the constant coefficient + ++ in the series expansion of \spad{atan(f(x))} for values to the + ++ left differs from that for values to the right. If \spad{atanFlag} + ++ is \spad{"real: two sides"}, no series expansion will be computed. + ++ If \spad{atanFlag} is \spad{"real: left side"} the constant + ++ coefficient for values to the left will be used and if \spad{atanFlag} + ++ \spad{"real: right side"} the constant coefficient for values to the + ++ right will be used. + ++ If there is a problem in converting the function to a power series, + ++ a record containing the name of the function that caused the problem + ++ and a brief description of the problem is returned. + ++ When expanding the expression into a series it is assumed that + ++ the series is centered at 0. For a series centered at a, the + ++ user should perform the substitution \spad{x -> x + a} before calling + ++ this function. + + exprToGenUPS : (FE,B,S) -> Result + ++ exprToGenUPS(fcn,posCheck?,atanFlag) converts the expression + ++ \spad{fcn} to a generalized power series. If \spad{posCheck?} + ++ is true, log's of negative numbers are not allowed nor are nth roots + ++ of negative numbers with n even. If \spad{posCheck?} is false, + ++ these are allowed. \spad{atanFlag} determines how the case + ++ \spad{atan(f(x))}, where \spad{f(x)} has a pole, will be treated. + ++ The possible values of \spad{atanFlag} are \spad{"complex"}, + ++ \spad{"real: two sides"}, \spad{"real: left side"}, + ++ \spad{"real: right side"}, and \spad{"just do it"}. + ++ If \spad{atanFlag} is \spad{"complex"}, then no series expansion + ++ will be computed because, viewed as a function of a complex + ++ variable, \spad{atan(f(x))} has an essential singularity. + ++ Otherwise, the sign of the leading coefficient of the series + ++ expansion of \spad{f(x)} determines the constant coefficient + ++ in the series expansion of \spad{atan(f(x))}. If this sign cannot + ++ be determined, a series expansion is computed only when + ++ \spad{atanFlag} is \spad{"just do it"}. When the leading term + ++ in the series expansion of \spad{f(x)} is of odd degree (or is a + ++ rational degree with odd numerator), then the constant coefficient + ++ in the series expansion of \spad{atan(f(x))} for values to the + ++ left differs from that for values to the right. If \spad{atanFlag} + ++ is \spad{"real: two sides"}, no series expansion will be computed. + ++ If \spad{atanFlag} is \spad{"real: left side"} the constant + ++ coefficient for values to the left will be used and if \spad{atanFlag} + ++ \spad{"real: right side"} the constant coefficient for values to the + ++ right will be used. + ++ If there is a problem in converting the function to a power + ++ series, we return a record containing the name of the function + ++ that caused the problem and a brief description of the problem. + ++ When expanding the expression into a series it is assumed that + ++ the series is centered at 0. For a series centered at a, the + ++ user should perform the substitution \spad{x -> x + a} before calling + ++ this function. + localAbs: FE -> FE + ++ localAbs(fcn) = \spad{abs(fcn)} or \spad{sqrt(fcn**2)} depending + ++ on whether or not FE has a function \spad{abs}. This should be + ++ a local function, but the compiler won't allow it. + + Implementation ==> add + + ratIfCan : FE -> Union(RN,"failed") + carefulNthRootIfCan : (UPS,NNI,B,B) -> Result + stateProblem : (S,S) -> Result + polyToUPS : SUP -> UPS + listToUPS : (L FE,(FE,B,S) -> Result,B,S,UPS,(UPS,UPS) -> UPS)_ + -> Result + isNonTrivPower : FE -> Union(Record(val:FE,exponent:I),"failed") + powerToUPS : (FE,I,B,S) -> Result + kernelToUPS : (K,B,S) -> Result + nthRootToUPS : (FE,NNI,B,S) -> Result + logToUPS : (FE,B,S) -> Result + atancotToUPS : (FE,B,S,I) -> Result + applyIfCan : (UPS -> Union(UPS,"failed"),FE,S,B,S) -> Result + tranToUPS : (K,FE,B,S) -> Result + powToUPS : (L FE,B,S) -> Result + newElem : FE -> FE + smpElem : SMP -> FE + k2Elem : K -> FE + contOnReals? : S -> B + bddOnReals? : S -> B + iExprToGenUPS : (FE,B,S) -> Result + opsInvolvingX : FE -> L BOP + opInOpList? : (SY,L BOP) -> B + exponential? : FE -> B + productOfNonZeroes? : FE -> B + powerToGenUPS : (FE,I,B,S) -> Result + kernelToGenUPS : (K,B,S) -> Result + nthRootToGenUPS : (FE,NNI,B,S) -> Result + logToGenUPS : (FE,B,S) -> Result + expToGenUPS : (FE,B,S) -> Result + expGenUPS : (UPS,B,S) -> Result + atancotToGenUPS : (FE,FE,B,S,I) -> Result + genUPSApplyIfCan : (UPS -> Union(UPS,"failed"),FE,S,B,S) -> Result + applyBddIfCan : (FE,UPS -> Union(UPS,"failed"),FE,S,B,S) -> Result + tranToGenUPS : (K,FE,B,S) -> Result + powToGenUPS : (L FE,B,S) -> Result + + ZEROCOUNT : I := 1000 + -- number of zeroes to be removed when taking logs or nth roots + + ratIfCan fcn == retractIfCan(fcn)@Union(RN,"failed") + + carefulNthRootIfCan(ups,n,posCheck?,rightOnly?) == + -- similar to 'nthRootIfCan', but it is fussy about the series + -- it takes as an argument. If 'n' is EVEN and 'posCheck?' + -- is truem then the leading coefficient of the series must + -- be POSITIVE. In this case, if 'rightOnly?' is false, the + -- order of the series must be zero. The idea is that the + -- series represents a real function of a real variable, and + -- we want a unique real nth root defined on a neighborhood + -- of zero. + n < 1 => error "nthRoot: n must be positive" + deg := degree ups + if (coef := coefficient(ups,deg)) = 0 then + deg := order(ups,deg + ZEROCOUNT :: Expon) + (coef := coefficient(ups,deg)) = 0 => + error "log of series with many leading zero coefficients" + -- if 'posCheck?' is true, we do not allow nth roots of negative + -- numbers when n in even + if even?(n :: I) then + if posCheck? and ((signum := sign(coef)$SIGNEF) case I) then + (signum :: I) = -1 => + return stateProblem("nth root","negative leading coefficient") + not rightOnly? and not zero? deg => -- nth root not unique + return stateProblem("nth root","series of non-zero order") + (ans := nthRootIfCan(ups,n)) case "failed" => + stateProblem("nth root","no nth root") + [ans :: UPS] + + stateProblem(function,problem) == + -- records the problem which occured in converting an expression + -- to a power series + [[function,problem]] + + exprToUPS(fcn,posCheck?,atanFlag) == + -- converts a functional expression to a power series + --!! The following line is commented out so that expressions of + --!! the form a**b will be normalized to exp(b * log(a)) even if + --!! 'a' and 'b' do not involve the limiting variable 'x'. + --!! - cjw 1 Dec 94 + --not member?(x,variables fcn) => [monomial(fcn,0)] + (poly := retractIfCan(fcn)@Union(POL,"failed")) case POL => + [polyToUPS univariate(poly :: POL,x)] + (sum := isPlus fcn) case L(FE) => + listToUPS(sum :: L(FE),exprToUPS,posCheck?,atanFlag,0,#1 + #2) + (prod := isTimes fcn) case L(FE) => + listToUPS(prod :: L(FE),exprToUPS,posCheck?,atanFlag,1,#1 * #2) + (expt := isNonTrivPower fcn) case Record(val:FE,exponent:I) => + power := expt :: Record(val:FE,exponent:I) + powerToUPS(power.val,power.exponent,posCheck?,atanFlag) + (ker := retractIfCan(fcn)@Union(K,"failed")) case K => + kernelToUPS(ker :: K,posCheck?,atanFlag) + error "exprToUPS: neither a sum, product, power, nor kernel" + + polyToUPS poly == + -- converts a polynomial to a power series + zero? poly => 0 + -- we don't start with 'ans := 0' as this may lead to an + -- enormous number of leading zeroes in the power series + deg := degree poly + coef := leadingCoefficient(poly) :: FE + ans := monomial(coef,deg :: Expon)$UPS + poly := reductum poly + while not zero? poly repeat + deg := degree poly + coef := leadingCoefficient(poly) :: FE + ans := ans + monomial(coef,deg :: Expon)$UPS + poly := reductum poly + ans + + listToUPS(list,feToUPS,posCheck?,atanFlag,ans,op) == + -- converts each element of a list of expressions to a power + -- series and returns the sum of these series, when 'op' is + + -- and 'ans' is 0, or the product of these series, when 'op' is * + -- and 'ans' is 1 + while not null list repeat + (term := feToUPS(first list,posCheck?,atanFlag)) case %problem => + return term + ans := op(ans,term.%series) + list := rest list + [ans] + + isNonTrivPower fcn == + -- is the function a power with exponent other than 0 or 1? + (expt := isPower fcn) case "failed" => "failed" + power := expt :: Record(val:FE,exponent:I) +-- one? power.exponent => "failed" + (power.exponent = 1) => "failed" + power + + powerToUPS(fcn,n,posCheck?,atanFlag) == + -- converts an integral power to a power series + (b := exprToUPS(fcn,posCheck?,atanFlag)) case %problem => b + n > 0 => [(b.%series) ** n] + -- check lowest order coefficient when n < 0 + ups := b.%series; deg := degree ups + if (coef := coefficient(ups,deg)) = 0 then + deg := order(ups,deg + ZEROCOUNT :: Expon) + (coef := coefficient(ups,deg)) = 0 => + error "inverse of series with many leading zero coefficients" + [ups ** n] + + kernelToUPS(ker,posCheck?,atanFlag) == + -- converts a kernel to a power series + (sym := symbolIfCan(ker)) case Symbol => + (sym :: Symbol) = x => [monomial(1,1)] + [monomial(ker :: FE,0)] + empty?(args := argument ker) => [monomial(ker :: FE,0)] + not member?(x, variables(ker :: FE)) => [monomial(ker :: FE,0)] + empty? rest args => + arg := first args + is?(ker,"abs" :: Symbol) => + nthRootToUPS(arg*arg,2,posCheck?,atanFlag) + is?(ker,"%paren" :: Symbol) => exprToUPS(arg,posCheck?,atanFlag) + is?(ker,"log" :: Symbol) => logToUPS(arg,posCheck?,atanFlag) + is?(ker,"exp" :: Symbol) => + applyIfCan(expIfCan,arg,"exp",posCheck?,atanFlag) + tranToUPS(ker,arg,posCheck?,atanFlag) + is?(ker,"%power" :: Symbol) => powToUPS(args,posCheck?,atanFlag) + is?(ker,"nthRoot" :: Symbol) => + n := retract(second args)@I + nthRootToUPS(first args,n :: NNI,posCheck?,atanFlag) + stateProblem(string name ker,"unknown kernel") + + nthRootToUPS(arg,n,posCheck?,atanFlag) == + -- converts an nth root to a power series + -- this is not used in the limit package, so the series may + -- have non-zero order, in which case nth roots may not be unique + (result := exprToUPS(arg,posCheck?,atanFlag)) case %problem => result + ans := carefulNthRootIfCan(result.%series,n,posCheck?,false) + ans case %problem => ans + [ans.%series] + + logToUPS(arg,posCheck?,atanFlag) == + -- converts a logarithm log(f(x)) to a power series + -- f(x) must have order 0 and if 'posCheck?' is true, + -- then f(x) must have a non-negative leading coefficient + (result := exprToUPS(arg,posCheck?,atanFlag)) case %problem => result + ups := result.%series + not zero? order(ups,1) => + stateProblem("log","series of non-zero order") + coef := coefficient(ups,0) + -- if 'posCheck?' is true, we do not allow logs of negative numbers + if posCheck? then + if ((signum := sign(coef)$SIGNEF) case I) then + (signum :: I) = -1 => + return stateProblem("log","negative leading coefficient") + [logIfCan(ups) :: UPS] + + if FE has abs: FE -> FE then + localAbs fcn == abs fcn + else + localAbs fcn == sqrt(fcn * fcn) + + signOfExpression: FE -> FE + signOfExpression arg == localAbs(arg)/arg + + atancotToUPS(arg,posCheck?,atanFlag,plusMinus) == + -- converts atan(f(x)) to a power series + (result := exprToUPS(arg,posCheck?,atanFlag)) case %problem => result + ups := result.%series; coef := coefficient(ups,0) + (ord := order(ups,0)) = 0 and coef * coef = -1 => + -- series involves complex numbers + return stateProblem("atan","logarithmic singularity") + cc : FE := + ord < 0 => + atanFlag = "complex" => + return stateProblem("atan","essential singularity") + (rn := ratIfCan(ord :: FE)) case "failed" => + -- this condition usually won't occur because exponents will + -- be integers or rational numbers + return stateProblem("atan","branch problem") + if (atanFlag = "real: two sides") and (odd? numer(rn :: RN)) then + -- expansions to the left and right of zero have different + -- constant coefficients + return stateProblem("atan","branch problem") + lc := coefficient(ups,ord) + (signum := sign(lc)$SIGNEF) case "failed" => + -- can't determine sign + atanFlag = "just do it" => + plusMinus = 1 => pi()/(2 :: FE) + 0 + posNegPi2 := signOfExpression(lc) * pi()/(2 :: FE) + plusMinus = 1 => posNegPi2 + pi()/(2 :: FE) - posNegPi2 + --return stateProblem("atan","branch problem") + left? : B := atanFlag = "real: left side"; n := signum :: Integer + (left? and n = 1) or (not left? and n = -1) => + plusMinus = 1 => -pi()/(2 :: FE) + pi() + plusMinus = 1 => pi()/(2 :: FE) + 0 + atan coef + [(cc :: UPS) + integrate(plusMinus * differentiate(ups)/(1 + ups*ups))] + + applyIfCan(fcn,arg,fcnName,posCheck?,atanFlag) == + -- converts fcn(arg) to a power series + (ups := exprToUPS(arg,posCheck?,atanFlag)) case %problem => ups + ans := fcn(ups.%series) + ans case "failed" => stateProblem(fcnName,"essential singularity") + [ans :: UPS] + + tranToUPS(ker,arg,posCheck?,atanFlag) == + -- converts ker to a power series for certain functions + -- in trig or hyperbolic trig categories + is?(ker,"sin" :: SY) => + applyIfCan(sinIfCan,arg,"sin",posCheck?,atanFlag) + is?(ker,"cos" :: SY) => + applyIfCan(cosIfCan,arg,"cos",posCheck?,atanFlag) + is?(ker,"tan" :: SY) => + applyIfCan(tanIfCan,arg,"tan",posCheck?,atanFlag) + is?(ker,"cot" :: SY) => + applyIfCan(cotIfCan,arg,"cot",posCheck?,atanFlag) + is?(ker,"sec" :: SY) => + applyIfCan(secIfCan,arg,"sec",posCheck?,atanFlag) + is?(ker,"csc" :: SY) => + applyIfCan(cscIfCan,arg,"csc",posCheck?,atanFlag) + is?(ker,"asin" :: SY) => + applyIfCan(asinIfCan,arg,"asin",posCheck?,atanFlag) + is?(ker,"acos" :: SY) => + applyIfCan(acosIfCan,arg,"acos",posCheck?,atanFlag) + is?(ker,"atan" :: SY) => atancotToUPS(arg,posCheck?,atanFlag,1) + is?(ker,"acot" :: SY) => atancotToUPS(arg,posCheck?,atanFlag,-1) + is?(ker,"asec" :: SY) => + applyIfCan(asecIfCan,arg,"asec",posCheck?,atanFlag) + is?(ker,"acsc" :: SY) => + applyIfCan(acscIfCan,arg,"acsc",posCheck?,atanFlag) + is?(ker,"sinh" :: SY) => + applyIfCan(sinhIfCan,arg,"sinh",posCheck?,atanFlag) + is?(ker,"cosh" :: SY) => + applyIfCan(coshIfCan,arg,"cosh",posCheck?,atanFlag) + is?(ker,"tanh" :: SY) => + applyIfCan(tanhIfCan,arg,"tanh",posCheck?,atanFlag) + is?(ker,"coth" :: SY) => + applyIfCan(cothIfCan,arg,"coth",posCheck?,atanFlag) + is?(ker,"sech" :: SY) => + applyIfCan(sechIfCan,arg,"sech",posCheck?,atanFlag) + is?(ker,"csch" :: SY) => + applyIfCan(cschIfCan,arg,"csch",posCheck?,atanFlag) + is?(ker,"asinh" :: SY) => + applyIfCan(asinhIfCan,arg,"asinh",posCheck?,atanFlag) + is?(ker,"acosh" :: SY) => + applyIfCan(acoshIfCan,arg,"acosh",posCheck?,atanFlag) + is?(ker,"atanh" :: SY) => + applyIfCan(atanhIfCan,arg,"atanh",posCheck?,atanFlag) + is?(ker,"acoth" :: SY) => + applyIfCan(acothIfCan,arg,"acoth",posCheck?,atanFlag) + is?(ker,"asech" :: SY) => + applyIfCan(asechIfCan,arg,"asech",posCheck?,atanFlag) + is?(ker,"acsch" :: SY) => + applyIfCan(acschIfCan,arg,"acsch",posCheck?,atanFlag) + stateProblem(string name ker,"unknown kernel") + + powToUPS(args,posCheck?,atanFlag) == + -- converts a power f(x) ** g(x) to a power series + (logBase := logToUPS(first args,posCheck?,atanFlag)) case %problem => + logBase + (expon := exprToUPS(second args,posCheck?,atanFlag)) case %problem => + expon + ans := expIfCan((expon.%series) * (logBase.%series)) + ans case "failed" => stateProblem("exp","essential singularity") + [ans :: UPS] + +-- Generalized power series: power series in x, where log(x) and +-- bounded functions of x are allowed to appear in the coefficients +-- of the series. Used for evaluating REAL limits at x = 0. + + newElem f == + -- rewrites a functional expression; all trig functions are + -- expressed in terms of sin and cos; all hyperbolic trig + -- functions are expressed in terms of exp + smpElem(numer f) / smpElem(denom f) + + smpElem p == map(k2Elem,#1::FE,p)$PCL + + k2Elem k == + -- rewrites a kernel; all trig functions are + -- expressed in terms of sin and cos; all hyperbolic trig + -- functions are expressed in terms of exp + null(args := [newElem a for a in argument k]) => k::FE + iez := inv(ez := exp(z := first args)) + sinz := sin z; cosz := cos z + is?(k,"tan" :: Symbol) => sinz / cosz + is?(k,"cot" :: Symbol) => cosz / sinz + is?(k,"sec" :: Symbol) => inv cosz + is?(k,"csc" :: Symbol) => inv sinz + is?(k,"sinh" :: Symbol) => (ez - iez) / (2 :: FE) + is?(k,"cosh" :: Symbol) => (ez + iez) / (2 :: FE) + is?(k,"tanh" :: Symbol) => (ez - iez) / (ez + iez) + is?(k,"coth" :: Symbol) => (ez + iez) / (ez - iez) + is?(k,"sech" :: Symbol) => 2 * inv(ez + iez) + is?(k,"csch" :: Symbol) => 2 * inv(ez - iez) + (operator k) args + + CONTFCNS : L S := ["sin","cos","atan","acot","exp","asinh"] + -- functions which are defined and continuous at all real numbers + + BDDFCNS : L S := ["sin","cos","atan","acot"] + -- functions which are bounded on the reals + + contOnReals? fcn == member?(fcn,CONTFCNS) + bddOnReals? fcn == member?(fcn,BDDFCNS) + + exprToGenUPS(fcn,posCheck?,atanFlag) == + -- converts a functional expression to a generalized power + -- series; "generalized" means that log(x) and bounded functions + -- of x are allowed to appear in the coefficients of the series + iExprToGenUPS(newElem fcn,posCheck?,atanFlag) + + iExprToGenUPS(fcn,posCheck?,atanFlag) == + -- converts a functional expression to a generalized power + -- series without first normalizing the expression + --!! The following line is commented out so that expressions of + --!! the form a**b will be normalized to exp(b * log(a)) even if + --!! 'a' and 'b' do not involve the limiting variable 'x'. + --!! - cjw 1 Dec 94 + --not member?(x,variables fcn) => [monomial(fcn,0)] + (poly := retractIfCan(fcn)@Union(POL,"failed")) case POL => + [polyToUPS univariate(poly :: POL,x)] + (sum := isPlus fcn) case L(FE) => + listToUPS(sum :: L(FE),iExprToGenUPS,posCheck?,atanFlag,0,#1 + #2) + (prod := isTimes fcn) case L(FE) => + listToUPS(prod :: L(FE),iExprToGenUPS,posCheck?,atanFlag,1,#1 * #2) + (expt := isNonTrivPower fcn) case Record(val:FE,exponent:I) => + power := expt :: Record(val:FE,exponent:I) + powerToGenUPS(power.val,power.exponent,posCheck?,atanFlag) + (ker := retractIfCan(fcn)@Union(K,"failed")) case K => + kernelToGenUPS(ker :: K,posCheck?,atanFlag) + error "exprToGenUPS: neither a sum, product, power, nor kernel" + + opsInvolvingX fcn == + opList := [op for k in tower fcn | unary?(op := operator k) _ + and member?(x,variables first argument k)] + removeDuplicates opList + + opInOpList?(name,opList) == + for op in opList repeat + is?(op,name) => return true + false + + exponential? fcn == + -- is 'fcn' of the form exp(f)? + (ker := retractIfCan(fcn)@Union(K,"failed")) case K => + is?(ker :: K,"exp" :: Symbol) + false + + productOfNonZeroes? fcn == + -- is 'fcn' a product of non-zero terms, where 'non-zero' + -- means an exponential or a function not involving x + exponential? fcn => true + (prod := isTimes fcn) case "failed" => false + for term in (prod :: L(FE)) repeat + (not exponential? term) and member?(x,variables term) => + return false + true + + powerToGenUPS(fcn,n,posCheck?,atanFlag) == + -- converts an integral power to a generalized power series + -- if n < 0 and the lowest order coefficient of the series + -- involves x, we are careful about inverting this coefficient + -- the coefficient is inverted only if + -- (a) the only function involving x is 'log', or + -- (b) the lowest order coefficient is a product of exponentials + -- and functions not involving x + (b := exprToGenUPS(fcn,posCheck?,atanFlag)) case %problem => b + n > 0 => [(b.%series) ** n] + -- check lowest order coefficient when n < 0 + ups := b.%series; deg := degree ups + if (coef := coefficient(ups,deg)) = 0 then + deg := order(ups,deg + ZEROCOUNT :: Expon) + (coef := coefficient(ups,deg)) = 0 => + error "inverse of series with many leading zero coefficients" + xOpList := opsInvolvingX coef + -- only function involving x is 'log' + (null xOpList) => [ups ** n] + (null rest xOpList and is?(first xOpList,"log" :: SY)) => + [ups ** n] + -- lowest order coefficient is a product of exponentials and + -- functions not involving x + productOfNonZeroes? coef => [ups ** n] + stateProblem("inv","lowest order coefficient involves x") + + kernelToGenUPS(ker,posCheck?,atanFlag) == + -- converts a kernel to a generalized power series + (sym := symbolIfCan(ker)) case Symbol => + (sym :: Symbol) = x => [monomial(1,1)] + [monomial(ker :: FE,0)] + empty?(args := argument ker) => [monomial(ker :: FE,0)] + empty? rest args => + arg := first args + is?(ker,"abs" :: Symbol) => + nthRootToGenUPS(arg*arg,2,posCheck?,atanFlag) + is?(ker,"%paren" :: Symbol) => iExprToGenUPS(arg,posCheck?,atanFlag) + is?(ker,"log" :: Symbol) => logToGenUPS(arg,posCheck?,atanFlag) + is?(ker,"exp" :: Symbol) => expToGenUPS(arg,posCheck?,atanFlag) + tranToGenUPS(ker,arg,posCheck?,atanFlag) + is?(ker,"%power" :: Symbol) => powToGenUPS(args,posCheck?,atanFlag) + is?(ker,"nthRoot" :: Symbol) => + n := retract(second args)@I + nthRootToGenUPS(first args,n :: NNI,posCheck?,atanFlag) + stateProblem(string name ker,"unknown kernel") + + nthRootToGenUPS(arg,n,posCheck?,atanFlag) == + -- convert an nth root to a power series + -- used for computing right hand limits, so the series may have + -- non-zero order, but may not have a negative leading coefficient + -- when n is even + (result := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => + result + ans := carefulNthRootIfCan(result.%series,n,posCheck?,true) + ans case %problem => ans + [ans.%series] + + logToGenUPS(arg,posCheck?,atanFlag) == + -- converts a logarithm log(f(x)) to a generalized power series + (result := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => + result + ups := result.%series; deg := degree ups + if (coef := coefficient(ups,deg)) = 0 then + deg := order(ups,deg + ZEROCOUNT :: Expon) + (coef := coefficient(ups,deg)) = 0 => + error "log of series with many leading zero coefficients" + -- if 'posCheck?' is true, we do not allow logs of negative numbers + if posCheck? then + if ((signum := sign(coef)$SIGNEF) case I) then + (signum :: I) = -1 => + return stateProblem("log","negative leading coefficient") + -- create logarithmic term, avoiding log's of negative rationals + lt := monomial(coef,deg)$UPS; cen := center lt + -- check to see if lowest order coefficient is a negative rational + negRat? : Boolean := + ((rat := ratIfCan coef) case RN) => + (rat :: RN) < 0 => true + false + false + logTerm : FE := + mon : FE := (x :: FE) - (cen :: FE) + pow : FE := mon ** (deg :: FE) + negRat? => log(coef * pow) + term1 : FE := (deg :: FE) * log(mon) + log(coef) + term1 + [monomial(logTerm,0) + log(ups/lt)] + + expToGenUPS(arg,posCheck?,atanFlag) == + -- converts an exponential exp(f(x)) to a generalized + -- power series + (ups := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => ups + expGenUPS(ups.%series,posCheck?,atanFlag) + + expGenUPS(ups,posCheck?,atanFlag) == + -- computes the exponential of a generalized power series. + -- If the series has order zero and the constant term a0 of the + -- series involves x, the function tries to expand exp(a0) as + -- a power series. + (deg := order(ups,1)) < 0 => + stateProblem("exp","essential singularity") + deg > 0 => [exp ups] + lc := coefficient(ups,0); xOpList := opsInvolvingX lc + not opInOpList?("log" :: SY,xOpList) => [exp ups] + -- try to fix exp(lc) if necessary + expCoef := + normalize(exp lc,x)$ElementaryFunctionStructurePackage(R,FE) + opInOpList?("log" :: SY,opsInvolvingX expCoef) => + stateProblem("exp","logs in constant coefficient") + result := exprToGenUPS(expCoef,posCheck?,atanFlag) + result case %problem => result + [(result.%series) * exp(ups - monomial(lc,0))] + + atancotToGenUPS(fe,arg,posCheck?,atanFlag,plusMinus) == + -- converts atan(f(x)) to a generalized power series + (result := exprToGenUPS(arg,posCheck?,atanFlag)) case %problem => + trouble := result.%problem + trouble.prob = "essential singularity" => [monomial(fe,0)$UPS] + result + ups := result.%series; coef := coefficient(ups,0) + -- series involves complex numbers + (ord := order(ups,0)) = 0 and coef * coef = -1 => + y := differentiate(ups)/(1 + ups*ups) + yCoef := coefficient(y,-1) + [monomial(log yCoef,0) + integrate(y - monomial(yCoef,-1)$UPS)] + cc : FE := + ord < 0 => + atanFlag = "complex" => + return stateProblem("atan","essential singularity") + (rn := ratIfCan(ord :: FE)) case "failed" => + -- this condition usually won't occur because exponents will + -- be integers or rational numbers + return stateProblem("atan","branch problem") + if (atanFlag = "real: two sides") and (odd? numer(rn :: RN)) then + -- expansions to the left and right of zero have different + -- constant coefficients + return stateProblem("atan","branch problem") + lc := coefficient(ups,ord) + (signum := sign(lc)$SIGNEF) case "failed" => + -- can't determine sign + atanFlag = "just do it" => + plusMinus = 1 => pi()/(2 :: FE) + 0 + posNegPi2 := signOfExpression(lc) * pi()/(2 :: FE) + plusMinus = 1 => posNegPi2 + pi()/(2 :: FE) - posNegPi2 + --return stateProblem("atan","branch problem") + left? : B := atanFlag = "real: left side"; n := signum :: Integer + (left? and n = 1) or (not left? and n = -1) => + plusMinus = 1 => -pi()/(2 :: FE) + pi() + plusMinus = 1 => pi()/(2 :: FE) + 0 + atan coef + [(cc :: UPS) + integrate(differentiate(ups)/(1 + ups*ups))] + + genUPSApplyIfCan(fcn,arg,fcnName,posCheck?,atanFlag) == + -- converts fcn(arg) to a generalized power series + (series := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => + series + ups := series.%series + (deg := order(ups,1)) < 0 => + stateProblem(fcnName,"essential singularity") + deg > 0 => [fcn(ups) :: UPS] + lc := coefficient(ups,0); xOpList := opsInvolvingX lc + null xOpList => [fcn(ups) :: UPS] + opInOpList?("log" :: SY,xOpList) => + stateProblem(fcnName,"logs in constant coefficient") + contOnReals? fcnName => [fcn(ups) :: UPS] + stateProblem(fcnName,"x in constant coefficient") + + applyBddIfCan(fe,fcn,arg,fcnName,posCheck?,atanFlag) == + -- converts fcn(arg) to a generalized power series, where the + -- function fcn is bounded for real values + -- if fcn(arg) has an essential singularity as a complex + -- function, we return fcn(arg) as a monomial of degree 0 + (ups := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => + trouble := ups.%problem + trouble.prob = "essential singularity" => [monomial(fe,0)$UPS] + ups + (ans := fcn(ups.%series)) case "failed" => [monomial(fe,0)$UPS] + [ans :: UPS] + + tranToGenUPS(ker,arg,posCheck?,atanFlag) == + -- converts op(arg) to a power series for certain functions + -- op in trig or hyperbolic trig categories + -- N.B. when this function is called, 'k2elem' will have been + -- applied, so the following functions cannot appear: + -- tan, cot, sec, csc, sinh, cosh, tanh, coth, sech, csch + is?(ker,"sin" :: SY) => + applyBddIfCan(ker :: FE,sinIfCan,arg,"sin",posCheck?,atanFlag) + is?(ker,"cos" :: SY) => + applyBddIfCan(ker :: FE,cosIfCan,arg,"cos",posCheck?,atanFlag) + is?(ker,"asin" :: SY) => + genUPSApplyIfCan(asinIfCan,arg,"asin",posCheck?,atanFlag) + is?(ker,"acos" :: SY) => + genUPSApplyIfCan(acosIfCan,arg,"acos",posCheck?,atanFlag) + is?(ker,"atan" :: SY) => + atancotToGenUPS(ker :: FE,arg,posCheck?,atanFlag,1) + is?(ker,"acot" :: SY) => + atancotToGenUPS(ker :: FE,arg,posCheck?,atanFlag,-1) + is?(ker,"asec" :: SY) => + genUPSApplyIfCan(asecIfCan,arg,"asec",posCheck?,atanFlag) + is?(ker,"acsc" :: SY) => + genUPSApplyIfCan(acscIfCan,arg,"acsc",posCheck?,atanFlag) + is?(ker,"asinh" :: SY) => + genUPSApplyIfCan(asinhIfCan,arg,"asinh",posCheck?,atanFlag) + is?(ker,"acosh" :: SY) => + genUPSApplyIfCan(acoshIfCan,arg,"acosh",posCheck?,atanFlag) + is?(ker,"atanh" :: SY) => + genUPSApplyIfCan(atanhIfCan,arg,"atanh",posCheck?,atanFlag) + is?(ker,"acoth" :: SY) => + genUPSApplyIfCan(acothIfCan,arg,"acoth",posCheck?,atanFlag) + is?(ker,"asech" :: SY) => + genUPSApplyIfCan(asechIfCan,arg,"asech",posCheck?,atanFlag) + is?(ker,"acsch" :: SY) => + genUPSApplyIfCan(acschIfCan,arg,"acsch",posCheck?,atanFlag) + stateProblem(string name ker,"unknown kernel") + + powToGenUPS(args,posCheck?,atanFlag) == + -- converts a power f(x) ** g(x) to a generalized power series + (logBase := logToGenUPS(first args,posCheck?,atanFlag)) case %problem => + logBase + expon := iExprToGenUPS(second args,posCheck?,atanFlag) + expon case %problem => expon + expGenUPS((expon.%series) * (logBase.%series),posCheck?,atanFlag) + +@ +<>= +"FS2UPS" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FS2UPS"] +"ACF" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ACF"] +"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] +"FS2UPS" -> "ACF" +"FS2UPS" -> "FS" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package FSUPFACT FunctionSpaceUnivariatePolynomialFactor} +\pagehead{FunctionSpaceUnivariatePolynomialFactor}{FSUPFACT} +\pagepic{ps/v104functionspaceunivariatepolynomialfactor.ps}{FSUPFACT}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package FSUPFACT FunctionSpaceUnivariatePolynomialFactor +++ Used internally by IR2F +++ Author: Manuel Bronstein +++ Date Created: 12 May 1988 +++ Date Last Updated: 22 September 1993 +++ Keywords: function, space, polynomial, factoring +FunctionSpaceUnivariatePolynomialFactor(R, F, UP): + Exports == Implementation where + R : Join(IntegralDomain, OrderedSet, RetractableTo Integer) + F : FunctionSpace R + UP: UnivariatePolynomialCategory F + + Q ==> Fraction Integer + K ==> Kernel F + AN ==> AlgebraicNumber + PQ ==> SparseMultivariatePolynomial(Q, K) + PR ==> SparseMultivariatePolynomial(R, K) + UPQ ==> SparseUnivariatePolynomial Q + UPA ==> SparseUnivariatePolynomial AN + FR ==> Factored UP + FRQ ==> Factored UPQ + FRA ==> Factored UPA + + Exports ==> with + ffactor: UP -> FR + ++ ffactor(p) tries to factor a univariate polynomial p over F + qfactor: UP -> Union(FRQ, "failed") + ++ qfactor(p) tries to factor p over fractions of integers, + ++ returning "failed" if it cannot + UP2ifCan: UP -> Union(overq: UPQ, overan: UPA, failed: Boolean) + ++ UP2ifCan(x) should be local but conditional. + if F has RetractableTo AN then + anfactor: UP -> Union(FRA, "failed") + ++ anfactor(p) tries to factor p over algebraic numbers, + ++ returning "failed" if it cannot + + Implementation ==> add + import AlgFactor(UPA) + import RationalFactorize(UPQ) + + P2QifCan : PR -> Union(PQ, "failed") + UPQ2UP : (SparseUnivariatePolynomial PQ, F) -> UP + PQ2F : (PQ, F) -> F + ffactor0 : UP -> FR + + dummy := kernel(new()$Symbol)$K + + if F has RetractableTo AN then + UPAN2F: UPA -> UP + UPQ2AN: UPQ -> UPA + + UPAN2F p == + map(#1::F, p)$UnivariatePolynomialCategoryFunctions2(AN,UPA,F,UP) + + UPQ2AN p == + map(#1::AN, p)$UnivariatePolynomialCategoryFunctions2(Q,UPQ,AN,UPA) + + ffactor p == + (pq := anfactor p) case FRA => + map(UPAN2F, pq::FRA)$FactoredFunctions2(UPA, UP) + ffactor0 p + + anfactor p == + (q := UP2ifCan p) case overq => + map(UPQ2AN, factor(q.overq))$FactoredFunctions2(UPQ, UPA) + q case overan => factor(q.overan) + "failed" + + UP2ifCan p == + ansq := 0$UPQ ; ansa := 0$UPA + goforq? := true + while p ^= 0 repeat + if goforq? then + rq := retractIfCan(leadingCoefficient p)@Union(Q, "failed") + if rq case Q then + ansq := ansq + monomial(rq::Q, degree p) + ansa := ansa + monomial(rq::Q::AN, degree p) + else + goforq? := false + ra := retractIfCan(leadingCoefficient p)@Union(AN, "failed") + if ra case AN then ansa := ansa + monomial(ra::AN, degree p) + else return [true] + else + ra := retractIfCan(leadingCoefficient p)@Union(AN, "failed") + if ra case AN then ansa := ansa + monomial(ra::AN, degree p) + else return [true] + p := reductum p + goforq? => [ansq] + [ansa] + + else + UPQ2F: UPQ -> UP + + UPQ2F p == + map(#1::F, p)$UnivariatePolynomialCategoryFunctions2(Q,UPQ,F,UP) + + ffactor p == + (pq := qfactor p) case FRQ => + map(UPQ2F, pq::FRQ)$FactoredFunctions2(UPQ, UP) + ffactor0 p + + UP2ifCan p == + ansq := 0$UPQ + while p ^= 0 repeat + rq := retractIfCan(leadingCoefficient p)@Union(Q, "failed") + if rq case Q then ansq := ansq + monomial(rq::Q, degree p) + else return [true] + p := reductum p + [ansq] + + ffactor0 p == + smp := numer(ep := p(dummy::F)) + (q := P2QifCan smp) case "failed" => p::FR + map(UPQ2UP(univariate(#1, dummy), denom(ep)::F), factor(q::PQ + )$MRationalFactorize(IndexedExponents K, K, Integer, + PQ))$FactoredFunctions2(PQ, UP) + + UPQ2UP(p, d) == + map(PQ2F(#1, d), p)$UnivariatePolynomialCategoryFunctions2(PQ, + SparseUnivariatePolynomial PQ, F, UP) + + PQ2F(p, d) == + map(#1::F, #1::F, p)$PolynomialCategoryLifting(IndexedExponents K, + K, Q, PQ, F) / d + + qfactor p == + (q := UP2ifCan p) case overq => factor(q.overq) + "failed" + + P2QifCan p == + and/[retractIfCan(c::F)@Union(Q, "failed") case Q + for c in coefficients p] => + map(#1::PQ, retract(#1::F)@Q :: PQ, + p)$PolynomialCategoryLifting(IndexedExponents K,K,R,PR,PQ) + "failed" + +@ +<>= +"FSUPFACT" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FSUPFACT"] +"FS" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FS"] +"ACF" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ACF"] +"FSUPFACT" -> "FS" +"FSUPFACT" -> "ACF" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter G} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package GENMFACT GeneralizedMultivariateFactorize} @@ -13627,6 +18570,112 @@ GeneralizedMultivariateFactorize(OV,E,S,R,P) : C == T %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter H} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package HB HallBasis} +\pagehead{HallBasis}{HB} +\pagepic{ps/v104hallbasis.ps}{HB}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package HB HallBasis +++ Author : Larry Lambe +++ Date Created : August 1988 +++ Date Last Updated : March 9 1990 +++ Related Constructors: OrderedSetInts, Commutator, FreeNilpotentLie +++ AMS Classification: Primary 17B05, 17B30; Secondary 17A50 +++ Keywords: free Lie algebra, Hall basis, basic commutators +++ Description : Generate a basis for the free Lie algebra on n +++ generators over a ring R with identity up to basic commutators +++ of length c using the algorithm of P. Hall as given in Serre's +++ book Lie Groups -- Lie Algebras + +HallBasis() : Export == Implement where + B ==> Boolean + I ==> Integer + NNI ==> NonNegativeInteger + VI ==> Vector Integer + VLI ==> Vector List Integer + + Export ==> with + lfunc : (I,I) -> I + ++ lfunc(d,n) computes the rank of the nth factor in the + ++ lower central series of the free d-generated free Lie + ++ algebra; This rank is d if n = 1 and binom(d,2) if + ++ n = 2 + inHallBasis? : (I,I,I,I) -> B + ++ inHallBasis?(numberOfGens, leftCandidate, rightCandidate, left) + ++ tests to see if a new element should be added to the P. Hall + ++ basis being constructed. + ++ The list \spad{[leftCandidate,wt,rightCandidate]} + ++ is included in the basis if in the unique factorization of + ++ rightCandidate, we have left factor leftOfRight, and + ++ leftOfRight <= leftCandidate + generate : (NNI,NNI) -> VLI + ++ generate(numberOfGens, maximalWeight) generates a vector of + ++ elements of the form [left,weight,right] which represents a + ++ P. Hall basis element for the free lie algebra on numberOfGens + ++ generators. We only generate those basis elements of weight + ++ less than or equal to maximalWeight + + Implement ==> add + + lfunc(d,n) == + n < 0 => 0 + n = 0 => 1 + n = 1 => d + sum:I := 0 + m:I + for m in 1..(n-1) repeat + if n rem m = 0 then + sum := sum + m * lfunc(d,m) + res := (d**(n::NNI) - sum) quo n + + inHallBasis?(n,i,j,l) == + i >= j => false + j <= n => true + l <= i => true + false + + generate(n:NNI,c:NNI) == + gens:=n + maxweight:=c + siz:I := 0 + for i in 1 .. maxweight repeat siz := siz + lfunc(gens,i) + v:VLI:= new(siz::NNI,[]) + for i in 1..gens repeat v(i) := [0, 1, i] + firstindex:VI := new(maxweight::NNI,0) + wt:I := 1 + firstindex(1) := 1 + numComms:I := gens + newNumComms:I := numComms + done:B := false + while not done repeat + wt := wt + 1 + if wt > maxweight then done := true + else + firstindex(wt) := newNumComms + 1 + leftIndex := 1 + -- cW == complimentaryWeight + cW:I := wt - 1 + while (leftIndex <= numComms) and (v(leftIndex).2 <= cW) repeat + for rightIndex in firstindex(cW)..(firstindex(cW+1) - 1) repeat + if inHallBasis?(gens,leftIndex,rightIndex,v(rightIndex).1) then + newNumComms := newNumComms + 1 + v(newNumComms) := [leftIndex,wt,rightIndex] + leftIndex := leftIndex + 1 + cW := wt - v(leftIndex).2 + numComms := newNumComms + v + +@ +<>= +"HB" [color="#FF4488",href="bookvol10.4.pdf#nameddest=HB"] +"IVECTOR" [color="#88FF44",href="bookvol10.3.pdf#nameddest=IVECTOR"] +"HB" -> "IVECTOR" + +@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter I} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -13828,6 +18877,372 @@ InnerCommonDenominator(R, Q, A, B): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package INBFF InnerNormalBasisFieldFunctions} +\pagehead{InnerNormalBasisFieldFunctions}{INBFF} +\pagepic{ps/v104innernormalbasisfieldfunctions.ps}{INBFF}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package INBFF InnerNormalBasisFieldFunctions +++ Authors: J.Grabmeier, A.Scheerhorn +++ Date Created: 26.03.1991 +++ Date Last Updated: 31 March 1991 +++ Basic Operations: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: finite field, normal basis +++ References: +++ R.Lidl, H.Niederreiter: Finite Field, Encyclopedia of Mathematics and +++ Its Applications, Vol. 20, Cambridge Univ. Press, 1983, ISBN 0 521 30240 4 +++ D.R.Stinson: Some observations on parallel Algorithms for fast +++ exponentiation in GF(2^n), Siam J. Comp., Vol.19, No.4, pp.711-717, +++ August 1990 +++ T.Itoh, S.Tsujii: A fast algorithm for computing multiplicative inverses +++ in GF(2^m) using normal bases, Inf. and Comp. 78, pp.171-177, 1988 +++ J. Grabmeier, A. Scheerhorn: Finite Fields in AXIOM. +++ AXIOM Technical Report Series, ATR/5 NP2522. +++ Description: +++ InnerNormalBasisFieldFunctions(GF) (unexposed): +++ This package has functions used by +++ every normal basis finite field extension domain. + +InnerNormalBasisFieldFunctions(GF): Exports == Implementation where + GF : FiniteFieldCategory -- the ground field + + PI ==> PositiveInteger + NNI ==> NonNegativeInteger + I ==> Integer + SI ==> SingleInteger + SUP ==> SparseUnivariatePolynomial + VGF ==> Vector GF + M ==> Matrix + V ==> Vector + L ==> List + OUT ==> OutputForm + TERM ==> Record(value:GF,index:SI) + MM ==> ModMonic(GF,SUP GF) + + Exports ==> with + + setFieldInfo: (V L TERM,GF) -> Void + ++ setFieldInfo(m,p) initializes the field arithmetic, where m is + ++ the multiplication table and p is the respective normal element + ++ of the ground field GF. + random : PI -> VGF + ++ random(n) creates a vector over the ground field with random entries. + index : (PI,PI) -> VGF + ++ index(n,m) is a index function for vectors of length n over + ++ the ground field. + pol : VGF -> SUP GF + ++ pol(v) turns the vector \spad{[v0,...,vn]} into the polynomial + ++ \spad{v0+v1*x+ ... + vn*x**n}. + xn : NNI -> SUP GF + ++ xn(n) returns the polynomial \spad{x**n-1}. + dAndcExp : (VGF,NNI,SI) -> VGF + ++ dAndcExp(v,n,k) computes \spad{v**e} interpreting v as an element of + ++ normal basis field. A divide and conquer algorithm similar to the + ++ one from D.R.Stinson, + ++ "Some observations on parallel Algorithms for fast exponentiation in + ++ GF(2^n)", Siam J. Computation, Vol.19, No.4, pp.711-717, August 1990 + ++ is used. Argument k is a parameter of this algorithm. + repSq : (VGF,NNI) -> VGF + ++ repSq(v,e) computes \spad{v**e} by repeated squaring, + ++ interpreting v as an element of a normal basis field. + expPot : (VGF,SI,SI) -> VGF + ++ expPot(v,e,d) returns the sum from \spad{i = 0} to + ++ \spad{e - 1} of \spad{v**(q**i*d)}, interpreting + ++ v as an element of a normal basis field and where q is + ++ the size of the ground field. + ++ Note: for a description of the algorithm, see T.Itoh and S.Tsujii, + ++ "A fast algorithm for computing multiplicative inverses in GF(2^m) + ++ using normal bases", + ++ Information and Computation 78, pp.171-177, 1988. + qPot : (VGF,I) -> VGF + ++ qPot(v,e) computes \spad{v**(q**e)}, interpreting v as an element of + ++ normal basis field, q the size of the ground field. + ++ This is done by a cyclic e-shift of the vector v. + +-- the semantic of the following functions is obvious from the finite field +-- context, for description see category FAXF + "**" :(VGF,I) -> VGF + ++ x**n \undocumented{} + ++ See \axiomFunFrom{**}{DivisionRing} + "*" :(VGF,VGF) -> VGF + ++ x*y \undocumented{} + ++ See \axiomFunFrom{*}{SemiGroup} + "/" :(VGF,VGF) -> VGF + ++ x/y \undocumented{} + ++ See \axiomFunFrom{/}{Field} + norm :(VGF,PI) -> VGF + ++ norm(x,n) \undocumented{} + ++ See \axiomFunFrom{norm}{FiniteAlgebraicExtensionField} + trace :(VGF,PI) -> VGF + ++ trace(x,n) \undocumented{} + ++ See \axiomFunFrom{trace}{FiniteAlgebraicExtensionField} + inv : VGF -> VGF + ++ inv x \undocumented{} + ++ See \axiomFunFrom{inv}{DivisionRing} + lookup : VGF -> PI + ++ lookup(x) \undocumented{} + ++ See \axiomFunFrom{lookup}{Finite} + normal? : VGF -> Boolean + ++ normal?(x) \undocumented{} + ++ See \axiomFunFrom{normal?}{FiniteAlgebraicExtensionField} + basis : PI -> V VGF + ++ basis(n) \undocumented{} + ++ See \axiomFunFrom{basis}{FiniteAlgebraicExtensionField} + normalElement:PI -> VGF + ++ normalElement(n) \undocumented{} + ++ See \axiomFunFrom{normalElement}{FiniteAlgebraicExtensionField} + minimalPolynomial: VGF -> SUP GF + ++ minimalPolynomial(x) \undocumented{} + ++ See \axiomFunFrom{minimalPolynomial}{FiniteAlgebraicExtensionField} + + Implementation ==> add + +-- global variables =================================================== + + sizeGF:NNI:=size()$GF + -- the size of the ground field + + multTable:V L TERM:=new(1,nil()$(L TERM))$(V L TERM) + -- global variable containing the multiplication table + + trGen:GF:=1$GF + -- controls the imbedding of the ground field + + logq:List SI:=[0,10::SI,16::SI,20::SI,23::SI,0,28::SI,_ + 30::SI,32::SI,0,35::SI] + -- logq.i is about 10*log2(i) for the values <12 which + -- can match sizeGF. It's used by "**" + + expTable:L L SI:=[[],_ + [4::SI,12::SI,48::SI,160::SI,480::SI,0],_ + [8::SI,72::SI,432::SI,0],_ + [18::SI,216::SI,0],_ + [32::SI,480::SI,0],[],_ + [72::SI,0],[98::SI,0],[128::SI,0],[],[200::SI,0]] + -- expT is used by "**" to optimize the parameter k + -- before calling dAndcExp(..,..,k) + +-- functions =========================================================== + +-- computes a**(-1) = a**((q**extDeg)-2) +-- see reference of function expPot + inv(a) == + b:VGF:=qPot(expPot(a,(#a-1)::NNI::SI,1::SI)$$,1)$$ + erg:VGF:=inv((a *$$ b).1 *$GF trGen)$GF *$VGF b + +-- "**" decides which exponentiation algorithm will be used, in order to +-- get the fastest computation. If dAndcExp is used, it chooses the +-- optimal parameter k for that algorithm. + a ** ex == + e:NNI:=positiveRemainder(ex,sizeGF**((#a)::PI)-1)$I :: NNI + zero?(e)$NNI => new(#a,trGen)$VGF +-- one?(e)$NNI => copy(a)$VGF + (e = 1)$NNI => copy(a)$VGF +-- inGroundField?(a) => new(#a,((a.1*trGen) **$GF e))$VGF + e1:SI:=(length(e)$I)::SI + sizeGF >$I 11 => + q1:SI:=(length(sizeGF)$I)::SI + logqe:SI:=(e1 quo$SI q1) +$SI 1$SI + 10::SI * (logqe + sizeGF-2) > 15::SI * e1 => +-- print("repeatedSquaring"::OUT) + repSq(a,e) +-- print("divAndConquer(a,e,1)"::OUT) + dAndcExp(a,e,1) + logqe:SI:=((10::SI *$SI e1) quo$SI (logq.sizeGF)) +$SI 1$SI + k:SI:=1$SI + expT:List SI:=expTable.sizeGF + while (logqe >= expT.k) and not zero? expT.k repeat k:=k +$SI 1$SI + mult:I:=(sizeGF-1) *$I sizeGF **$I ((k-1)pretend NNI) +$I_ + ((logqe +$SI k -$SI 1$SI) quo$SI k)::I -$I 2 + (10*mult) >= (15 * (e1::I)) => +-- print("repeatedSquaring(a,e)"::OUT) + repSq(a,e) +-- print(hconcat(["divAndConquer(a,e,"::OUT,k::OUT,")"::OUT])$OUT) + dAndcExp(a,e,k) + +-- computes a**e by repeated squaring + repSq(b,e) == + a:=copy(b)$VGF +-- one? e => a + (e = 1) => a + odd?(e)$I => a * repSq(a*a,(e quo 2) pretend NNI) + repSq(a*a,(e quo 2) pretend NNI) + +-- computes a**e using the divide and conquer algorithm similar to the +-- one from D.R.Stinson, +-- "Some observations on parallel Algorithms for fast exponentiation in +-- GF(2^n)", Siam J. Computation, Vol.19, No.4, pp.711-717, August 1990 + dAndcExp(a,e,k) == + plist:List VGF:=[copy(a)$VGF] + qk:I:=sizeGF**(k pretend NNI) + for j in 2..(qk-1) repeat + if positiveRemainder(j,sizeGF)=0 then b:=qPot(plist.(j quo sizeGF),1)$$ + else b:=a *$$ last(plist)$(List VGF) + plist:=concat(plist,b) + l:List NNI:=nil() + ex:I:=e + while not(ex = 0) repeat + l:=concat(l,positiveRemainder(ex,qk) pretend NNI) + ex:=ex quo qk + if first(l)=0 then erg:VGF:=new(#a,trGen)$VGF + else erg:VGF:=plist.(first(l)) + i:SI:=k + for j in rest(l) repeat + if j^=0 then erg:=erg *$$ qPot(plist.j,i)$$ + i:=i+k + erg + + a * b == + e:SI:=(#a)::SI + erg:=zero(#a)$VGF + for t in multTable.1 repeat + for j in 1..e repeat + y:=t.value -- didn't work without defining x and y + x:=t.index + k:SI:=addmod(x,j::SI,e)$SI +$SI 1$SI + erg.k:=erg.k +$GF a.j *$GF b.j *$GF y + for i in 1..e-1 repeat + for j in i+1..e repeat + for t in multTable.(j-i+1) repeat + y:=t.value -- didn't work without defining x and y + x:=t.index + k:SI:=addmod(x,i::SI,e)$SI +$SI 1$SI + erg.k:GF:=erg.k +$GF (a.i *$GF b.j +$GF a.j *$GF b.i) *$GF y + erg + + lookup(x) == + erg:I:=0 + for j in (#x)..1 by -1 repeat + erg:=(erg * sizeGF) + (lookup(x.j)$GF rem sizeGF) + erg=0 => (sizeGF**(#x)) :: PI + erg :: PI + +-- computes the norm of a over GF**d, d must devide extdeg +-- see reference of function expPot below + norm(a,d) == + dSI:=d::SI + r:=divide((#a)::SI,dSI) + not(r.remainder = 0) => error "norm: 2.arg must divide extdeg" + expPot(a,r.quotient,dSI)$$ + +-- computes expPot(a,e,d) = sum form i=0 to e-1 over a**(q**id)) +-- see T.Itoh and S.Tsujii, +-- "A fast algorithm for computing multiplicative inverses in GF(2^m) +-- using normal bases", +-- Information and Computation 78, pp.171-177, 1988 + expPot(a,e,d) == + deg:SI:=(#a)::SI + e=1 => copy(a)$VGF + k2:SI:=d + y:=copy(a) + if bit?(e,0) then + erg:=copy(y) + qpot:SI:=k2 + else + erg:=new(#a,inv(trGen)$GF)$VGF + qpot:SI:=0 + for k in 1..length(e) repeat + y:= y *$$ qPot(y,k2) + k2:=addmod(k2,k2,deg)$SI + if bit?(e,k) then + erg:=erg *$$ qPot(y,qpot) + qpot:=addmod(qpot,k2,deg)$SI + erg + +-- computes qPot(a,n) = a**(q**n), q=size of GF + qPot(e,n) == + ei:=(#e)::SI + m:SI:= positiveRemainder(n::SI,ei)$SI + zero?(m) => e + e1:=zero(#e)$VGF + for i in m+1..ei repeat e1.i:=e.(i-m) + for i in 1..m repeat e1.i:=e.(ei+i-m) + e1 + + trace(a,d) == + dSI:=d::SI + r:=divide((#a)::SI,dSI)$SI + not(r.remainder = 0) => error "trace: 2.arg must divide extdeg" + v:=copy(a.(1..dSI))$VGF + sSI:SI:=r.quotient + for i in 1..dSI repeat + for j in 1..sSI-1 repeat + v.i:=v.i+a.(i+j::SI*dSI) + v + + random(n) == + v:=zero(n)$VGF + for i in 1..n repeat v.i:=random()$GF + v + + + xn(m) == monomial(1,m)$(SUP GF) - 1$(SUP GF) + + normal?(x) == + gcd(xn(#x),pol(x))$(SUP GF) = 1 => true + false + + x:VGF / y:VGF == x *$$ inv(y)$$ + + + setFieldInfo(m,n) == + multTable:=m + trGen:=n + void()$Void + + minimalPolynomial(x) == + dx:=#x + y:=new(#x,inv(trGen)$GF)$VGF + m:=zero(dx,dx+1)$(M GF) + for i in 1..dx+1 repeat + dy:=#y + for j in 1..dy repeat + for k in 0..((dx quo dy)-1) repeat + qsetelt_!(m,j+k*dy,i,y.j)$(M GF) + y:=y *$$ x + v:=first nullSpace(m)$(M GF) + pol(v)$$ + + basis(n) == + bas:(V VGF):=new(n,zero(n)$VGF)$(V VGF) + for i in 1..n repeat + uniti:=zero(n)$VGF + qsetelt_!(uniti,i,1$GF)$VGF + qsetelt_!(bas,i,uniti)$(V VGF) + bas + + normalElement(n) == + v:=zero(n)$VGF + qsetelt_!(v,1,1$GF) + v +-- normalElement(n) == index(n,1)$$ + + index(degm,n) == + m:I:=n rem$I (sizeGF ** degm) + erg:=zero(degm)$VGF + for j in 1..degm repeat + erg.j:=index((sizeGF+(m rem sizeGF)) pretend PI)$GF + m:=m quo sizeGF + erg + + pol(x) == + +/[monomial(x.i,(i-1)::NNI)$(SUP GF) for i in 1..(#x)::I] + +@ +<>= +"INBFF" [color="#FF4488",href="bookvol10.4.pdf#nameddest=INBFF"] +"IVECTOR" [color="#88FF44",href="bookvol10.3.pdf#nameddest=IVECTOR"] +"INBFF" -> "IVECTOR" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package ITRIGMNP InnerTrigonometricManipulations} \pagehead{InnerTrigonometricManipulations}{ITRIGMNP} \pagepic{ps/v104innertrigonometricmanipulations.ps}{ITRIGMNP}{1.00} @@ -14171,6 +19586,86 @@ IntegerCombinatoricFunctions(I:IntegerNumberSystem): with @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package IRREDFFX IrredPolyOverFiniteField} +\pagehead{IrredPolyOverFiniteField}{IRREDFFX} +\pagepic{ps/v104irredpolyoverfinitefield.ps}{IRREDFFX}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package IRREDFFX IrredPolyOverFiniteField +++ Author: Robert S. Sutor (original) +++ Date Created: ??? +++ Date Last Updated: 29 May 1990 +++ Description: +++ This package exports the function generateIrredPoly that computes +++ a monic irreducible polynomial of degree n over a finite field. + +IrredPolyOverFiniteField(GF:FiniteFieldCategory): Exports == Impl where + N ==> PositiveInteger + Z ==> Integer + SUP ==> SparseUnivariatePolynomial GF + QR ==> Record(quotient: Z, remainder: Z) + + Exports ==> with + generateIrredPoly: N -> SUP + ++ generateIrredPoly(n) generates an irreducible univariate + ++ polynomial of the given degree n over the finite field. + + Impl ==> add + import DistinctDegreeFactorize(GF, SUP) + + getIrredPoly : (Z, N) -> SUP + qAdicExpansion: Z -> SUP + + p := characteristic()$GF :: N + q := size()$GF :: N + + qAdicExpansion(z : Z): SUP == + -- expands z as a sum of powers of q, with coefficients in GF + -- z = HornerEval(qAdicExpansion z,q) + qr := divide(z, q) + zero?(qr.remainder) => monomial(1, 1) * qAdicExpansion(qr.quotient) + r := index(qr.remainder pretend N)$GF :: SUP + zero?(qr.quotient) => r + r + monomial(1, 1) * qAdicExpansion(qr.quotient) + + getIrredPoly(start : Z, n : N) : SUP == + -- idea is to iterate over possibly irreducible monic polynomials + -- until we find an irreducible one. The obviously reducible ones + -- are avoided. + mon := monomial(1, n)$SUP + pol: SUP := 0 + found: Boolean := false + end: Z := q**n - 1 + while not ((end < start) or found) repeat + if gcd(start, p) = 1 then + if irreducible?(pol := mon + qAdicExpansion(start)) then + found := true + start := start + 1 + zero? pol => error "no irreducible poly found" + pol + + generateIrredPoly(n : N) : SUP == + -- want same poly every time +-- one?(n) => monomial(1, 1)$SUP + (n = 1) => monomial(1, 1)$SUP +-- one?(gcd(p, n)) or (n < q) => + (gcd(p, n) = 1) or (n < q) => + odd?(n) => getIrredPoly(2, n) + getIrredPoly(1, n) + getIrredPoly(q + 1, n) + +@ +<>= +"IRREDFFX" [color="#FF4488",href="bookvol10.4.pdf#nameddest=IRREDFFX"] +"FPC" [color="#4488FF",href="bookvol10.2.pdf#nameddest=FPC"] +"IRREDFFX" -> "FPC" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter J} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -14179,6 +19674,73 @@ IntegerCombinatoricFunctions(I:IntegerNumberSystem): with %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter L} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package LPEFRAC LinearPolynomialEquationByFractions} +\pagehead{LinearPolynomialEquationByFractions}{LPEFRAC} +\pagepic{ps/v104linearpolynomialequationbyfractions.ps}{LPEFRAC}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package LPEFRAC LinearPolynomialEquationByFractions +++ Author: James Davenport +++ Date Created: +++ Date Last Updated: +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ Given a PolynomialFactorizationExplicit ring, this package +++ provides a defaulting rule for the \spad{solveLinearPolynomialEquation} +++ operation, by moving into the field of fractions, and solving it there +++ via the \spad{multiEuclidean} operation. +LinearPolynomialEquationByFractions(R:PolynomialFactorizationExplicit): with + solveLinearPolynomialEquationByFractions: ( _ + List SparseUnivariatePolynomial R, _ + SparseUnivariatePolynomial R) -> _ + Union(List SparseUnivariatePolynomial R, "failed") + ++ solveLinearPolynomialEquationByFractions([f1, ..., fn], g) + ++ (where the fi are relatively prime to each other) + ++ returns a list of ai such that + ++ \spad{g/prod fi = sum ai/fi} + ++ or returns "failed" if no such exists. + == add + SupR ==> SparseUnivariatePolynomial R + F ==> Fraction R + SupF ==> SparseUnivariatePolynomial F + import UnivariatePolynomialCategoryFunctions2(R,SupR,F,SupF) + lp : List SupR + pp: SupR + pF: SupF + pullback : SupF -> Union(SupR,"failed") + pullback(pF) == + pF = 0 => 0 + c:=retractIfCan leadingCoefficient pF + c case "failed" => "failed" + r:=pullback reductum pF + r case "failed" => "failed" + monomial(c,degree pF) + r + solveLinearPolynomialEquationByFractions(lp,pp) == + lpF:List SupF:=[map(#1@R::F,u) for u in lp] + pF:SupF:=map(#1@R::F,pp) + ans:= solveLinearPolynomialEquation(lpF,pF)$F + ans case "failed" => "failed" + [(vv:= pullback v; + vv case "failed" => return "failed"; + vv) + for v in ans] + +@ +<>= +"LPEFRAC" [color="#FF4488",href="bookvol10.4.pdf#nameddest=LPEFRAC"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"LPEFRAC" -> "PFECAT" + +@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter M} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -14899,8 +20461,710 @@ MultipleMap(R1,UP1,UPUP1,R2,UP2,UPUP2): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package MCALCFN MultiVariableCalculusFunctions} +\pagehead{MultiVariableCalculusFunctions}{MCALCFN} +\pagepic{ps/v104multivariablecalculusfunctions.ps}{MCALCFN}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package MCALCFN MultiVariableCalculusFunctions +++ Author: Themos Tsikas, Grant Keady +++ Date Created: December 1992 +++ Date Last Updated: June 1993 +++ Basic Operations: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ \spadtype{MultiVariableCalculusFunctions} Package provides several +++ functions for multivariable calculus. +++ These include gradient, hessian and jacobian, +++ divergence and laplacian. +++ Various forms for banded and sparse storage of matrices are +++ included. +MultiVariableCalculusFunctions(S,F,FLAF,FLAS) : Exports == Implementation where + PI ==> PositiveInteger + NNI ==> NonNegativeInteger + + S: SetCategory + F: PartialDifferentialRing(S) + FLAS: FiniteLinearAggregate(S) + with finiteAggregate + FLAF: FiniteLinearAggregate(F) + + Exports ==> with + gradient: (F,FLAS) -> Vector F + ++ \spad{gradient(v,xlist)} + ++ computes the gradient, the vector of first partial derivatives, + ++ of the scalar field v, + ++ v a function of the variables listed in xlist. + divergence: (FLAF,FLAS) -> F + ++ \spad{divergence(vf,xlist)} + ++ computes the divergence of the vector field vf, + ++ vf a vector function of the variables listed in xlist. + laplacian: (F,FLAS) -> F + ++ \spad{laplacian(v,xlist)} + ++ computes the laplacian of the scalar field v, + ++ v a function of the variables listed in xlist. + hessian: (F,FLAS) -> Matrix F + ++ \spad{hessian(v,xlist)} + ++ computes the hessian, the matrix of second partial derivatives, + ++ of the scalar field v, + ++ v a function of the variables listed in xlist. + bandedHessian: (F,FLAS,NNI) -> Matrix F + ++ \spad{bandedHessian(v,xlist,k)} + ++ computes the hessian, the matrix of second partial derivatives, + ++ of the scalar field v, + ++ v a function of the variables listed in xlist, + ++ k is the semi-bandwidth, the number of nonzero subdiagonals, + ++ 2*k+1 being actual bandwidth. + ++ Stores the nonzero band in lower triangle in a matrix, + ++ dimensions k+1 by #xlist, + ++ whose rows are the vectors formed by diagonal, subdiagonal, etc. + ++ of the real, full-matrix, hessian. + ++ (The notation conforms to LAPACK/NAG-F07 conventions.) + -- At one stage it seemed a good idea to help the ASP domains + -- with the types of their input arguments and this led to the + -- standard Gradient|Hessian|Jacobian functions. + --standardJacobian: (Vector(F),List(S)) -> Matrix F + -- ++ \spad{jacobian(vf,xlist)} + -- ++ computes the jacobian, the matrix of first partial derivatives, + -- ++ of the vector field vf, + -- ++ vf a vector function of the variables listed in xlist. + jacobian: (FLAF,FLAS) -> Matrix F + ++ \spad{jacobian(vf,xlist)} + ++ computes the jacobian, the matrix of first partial derivatives, + ++ of the vector field vf, + ++ vf a vector function of the variables listed in xlist. + bandedJacobian: (FLAF,FLAS,NNI,NNI) -> Matrix F + ++ \spad{bandedJacobian(vf,xlist,kl,ku)} + ++ computes the jacobian, the matrix of first partial derivatives, + ++ of the vector field vf, + ++ vf a vector function of the variables listed in xlist, + ++ kl is the number of nonzero subdiagonals, + ++ ku is the number of nonzero superdiagonals, + ++ kl+ku+1 being actual bandwidth. + ++ Stores the nonzero band in a matrix, + ++ dimensions kl+ku+1 by #xlist. + ++ The upper triangle is in the top ku rows, + ++ the diagonal is in row ku+1, + ++ the lower triangle in the last kl rows. + ++ Entries in a column in the band store correspond to entries + ++ in same column of full store. + ++ (The notation conforms to LAPACK/NAG-F07 conventions.) + + Implementation ==> add + localGradient(v:F,xlist:List(S)):Vector(F) == + vector([D(v,x) for x in xlist]) + gradient(v,xflas) == + --xlist:List(S) := [xflas(i) for i in 1 .. maxIndex(xflas)] + xlist:List(S) := parts(xflas) + localGradient(v,xlist) + localDivergence(vf:Vector(F),xlist:List(S)):F == + i: PI + n: NNI + ans: F + -- Perhaps should report error if two args of min different + n:= min(#(xlist),((maxIndex(vf))::NNI))$NNI + ans:= 0 + for i in 1 .. n repeat ans := ans + D(vf(i),xlist(i)) + ans + divergence(vf,xflas) == + xlist:List(S) := parts(xflas) + i: PI + n: NNI + ans: F + -- Perhaps should report error if two args of min different + n:= min(#(xlist),((maxIndex(vf))::NNI))$NNI + ans:= 0 + for i in 1 .. n repeat ans := ans + D(vf(i),xlist(i)) + ans + laplacian(v,xflas) == + xlist:List(S) := parts(xflas) + gv:Vector(F) := localGradient(v,xlist) + localDivergence(gv,xlist) + hessian(v,xflas) == + xlist:List(S) := parts(xflas) + matrix([[D(v,[x,y]) for x in xlist] for y in xlist]) + --standardJacobian(vf,xlist) == + -- i: PI + -- matrix([[D(vf(i),x) for x in xlist] for i in 1 .. maxIndex(vf)]) + jacobian(vf,xflas) == + xlist:List(S) := parts(xflas) + i: PI + matrix([[D(vf(i),x) for x in xlist] for i in 1 .. maxIndex(vf)]) + bandedHessian(v,xflas,k) == + xlist:List(S) := parts(xflas) + j,iw: PI + n: NNI + bandM: Matrix F + n:= #(xlist) + bandM:= new(k+1,n,0) + for j in 1 .. n repeat setelt(bandM,1,j,D(v,xlist(j),2)) + for iw in 2 .. (k+1) repeat (_ + for j in 1 .. (n-iw+1) repeat (_ + setelt(bandM,iw,j,D(v,[xlist(j),xlist(j+iw-1)])) ) ) + bandM + jacobian(vf,xflas) == + xlist:List(S) := parts(xflas) + i: PI + matrix([[D(vf(i),x) for x in xlist] for i in 1 .. maxIndex(vf)]) + bandedJacobian(vf,xflas,kl,ku) == + xlist:List(S) := parts(xflas) + j,iw: PI + n: NNI + bandM: Matrix F + n:= #(xlist) + bandM:= new(kl+ku+1,n,0) + for j in 1 .. n repeat setelt(bandM,ku+1,j,D(vf(j),xlist(j))) + for iw in (ku+2) .. (ku+kl+1) repeat (_ + for j in 1 .. (n-iw+ku+1) repeat (_ + setelt(bandM,iw,j,D(vf(j+iw-1-ku),xlist(j))) ) ) + for iw in 1 .. ku repeat (_ + for j in (ku+2-iw) .. n repeat (_ + setelt(bandM,iw,j,D(vf(j+iw-1-ku),xlist(j))) ) ) + bandM + +@ +<>= +"MCALCFN" [color="#FF4488",href="bookvol10.4.pdf#nameddest=MCALCFN"] +"IVECTOR" [color="#88FF44",href="bookvol10.3.pdf#nameddest=IVECTOR"] +"MCALCFN" -> "IVECTOR" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter N} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NAGF02 NagEigenPackage} +\pagehead{NagEigenPackage}{NAGF02} +\pagepic{ps/v104nageigenpackage.ps}{NAGF02}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NAGF02 NagEigenPackage +++ Author: Godfrey Nolan and Mike Dewar +++ Date Created: Jan 1994 +++ Date Last Updated: Thu May 12 17:45:20 1994 +++ Description: +++ This package uses the NAG Library to compute +++ \begin{items} +++ \item eigenvalues and eigenvectors of a matrix +++ \item eigenvalues and eigenvectors of generalized matrix +++ eigenvalue problems +++ \item singular values and singular vectors of a matrix. +++ \end{items} +++ See \downlink{Manual Page}{manpageXXf02}. + +NagEigenPackage(): Exports == Implementation where + S ==> Symbol + FOP ==> FortranOutputStackPackage + + Exports ==> with + f02aaf : (Integer,Integer,Matrix DoubleFloat,Integer) -> Result + ++ f02aaf(ia,n,a,ifail) + ++ calculates all the eigenvalue. + ++ See \downlink{Manual Page}{manpageXXf02aaf}. + f02abf : (Matrix DoubleFloat,Integer,Integer,Integer,_ + Integer) -> Result + ++ f02abf(a,ia,n,iv,ifail) + ++ calculates all the eigenvalues of a real + ++ symmetric matrix. + ++ See \downlink{Manual Page}{manpageXXf02abf}. + f02adf : (Integer,Integer,Integer,Matrix DoubleFloat,_ + Matrix DoubleFloat,Integer) -> Result + ++ f02adf(ia,ib,n,a,b,ifail) + ++ calculates all the eigenvalues of Ax=(lambda)Bx, where A + ++ is a real symmetric matrix and B is a real symmetric positive- + ++ definite matrix. + ++ See \downlink{Manual Page}{manpageXXf02adf}. + f02aef : (Integer,Integer,Integer,Integer,_ + Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result + ++ f02aef(ia,ib,n,iv,a,b,ifail) + ++ calculates all the eigenvalues of + ++ Ax=(lambda)Bx, where A is a real symmetric matrix and B is a + ++ real symmetric positive-definite matrix. + ++ See \downlink{Manual Page}{manpageXXf02aef}. + f02aff : (Integer,Integer,Matrix DoubleFloat,Integer) -> Result + ++ f02aff(ia,n,a,ifail) + ++ calculates all the eigenvalues of a real unsymmetric + ++ matrix. + ++ See \downlink{Manual Page}{manpageXXf02aff}. + f02agf : (Integer,Integer,Integer,Integer,_ + Matrix DoubleFloat,Integer) -> Result + ++ f02agf(ia,n,ivr,ivi,a,ifail) + ++ calculates all the eigenvalues of a real + ++ unsymmetric matrix. + ++ See \downlink{Manual Page}{manpageXXf02agf}. + f02ajf : (Integer,Integer,Integer,Matrix DoubleFloat,_ + Matrix DoubleFloat,Integer) -> Result + ++ f02ajf(iar,iai,n,ar,ai,ifail) + ++ calculates all the eigenvalue. + ++ See \downlink{Manual Page}{manpageXXf02ajf}. + f02akf : (Integer,Integer,Integer,Integer,_ + Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result + ++ f02akf(iar,iai,n,ivr,ivi,ar,ai,ifail) + ++ calculates all the eigenvalues of a + ++ complex matrix. + ++ See \downlink{Manual Page}{manpageXXf02akf}. + f02awf : (Integer,Integer,Integer,Matrix DoubleFloat,_ + Matrix DoubleFloat,Integer) -> Result + ++ f02awf(iar,iai,n,ar,ai,ifail) + ++ calculates all the eigenvalues of a complex Hermitian + ++ matrix. + ++ See \downlink{Manual Page}{manpageXXf02awf}. + f02axf : (Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer,_ + Integer,Integer,Integer,Integer) -> Result + ++ f02axf(ar,iar,ai,iai,n,ivr,ivi,ifail) + ++ calculates all the eigenvalues of a + ++ complex Hermitian matrix. + ++ See \downlink{Manual Page}{manpageXXf02axf}. + f02bbf : (Integer,Integer,DoubleFloat,DoubleFloat,_ + Integer,Integer,Matrix DoubleFloat,Integer) -> Result + ++ f02bbf(ia,n,alb,ub,m,iv,a,ifail) + ++ calculates selected eigenvalues of a real + ++ symmetric matrix by reduction to tridiagonal form, bisection and + ++ inverse iteration, where the selected eigenvalues lie within a + ++ given interval. + ++ See \downlink{Manual Page}{manpageXXf02bbf}. + f02bjf : (Integer,Integer,Integer,DoubleFloat,_ + Boolean,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result + ++ f02bjf(n,ia,ib,eps1,matv,iv,a,b,ifail) + ++ calculates all the eigenvalues and, if required, all the + ++ eigenvectors of the generalized eigenproblem Ax=(lambda)Bx + ++ where A and B are real, square matrices, using the QZ algorithm. + ++ See \downlink{Manual Page}{manpageXXf02bjf}. + f02fjf : (Integer,Integer,DoubleFloat,Integer,_ + Integer,Integer,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp27(DOT)),Union(fn:FileName,fp:Asp28(IMAGE))) -> Result + ++ f02fjf(n,k,tol,novecs,nrx,lwork,lrwork,liwork,m,noits,x,ifail,dot,image) + ++ finds eigenvalues of a real sparse symmetric + ++ or generalized symmetric eigenvalue problem. + ++ See \downlink{Manual Page}{manpageXXf02fjf}. + f02fjf : (Integer,Integer,DoubleFloat,Integer,_ + Integer,Integer,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp27(DOT)),Union(fn:FileName,fp:Asp28(IMAGE)),FileName) -> Result + ++ f02fjf(n,k,tol,novecs,nrx,lwork,lrwork,liwork,m,noits,x,ifail,dot,image,monit) + ++ finds eigenvalues of a real sparse symmetric + ++ or generalized symmetric eigenvalue problem. + ++ See \downlink{Manual Page}{manpageXXf02fjf}. + f02wef : (Integer,Integer,Integer,Integer,_ + Integer,Boolean,Integer,Boolean,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result + ++ f02wef(m,n,lda,ncolb,ldb,wantq,ldq,wantp,ldpt,a,b,ifail) + ++ returns all, or part, of the singular value decomposition + ++ of a general real matrix. + ++ See \downlink{Manual Page}{manpageXXf02wef}. + f02xef : (Integer,Integer,Integer,Integer,_ + Integer,Boolean,Integer,Boolean,Integer,Matrix Complex DoubleFloat,Matrix Complex DoubleFloat,Integer) -> Result + ++ f02xef(m,n,lda,ncolb,ldb,wantq,ldq,wantp,ldph,a,b,ifail) + ++ returns all, or part, of the singular value decomposition + ++ of a general complex matrix. + ++ See \downlink{Manual Page}{manpageXXf02xef}. + Implementation ==> add + + import Lisp + import DoubleFloat + import Any + import Record + import Integer + import Matrix DoubleFloat + import Boolean + import NAGLinkSupportPackage + import FortranPackage + import AnyFunctions1(Integer) + import AnyFunctions1(Boolean) + import AnyFunctions1(Matrix DoubleFloat) + import AnyFunctions1(Matrix Complex DoubleFloat) + import AnyFunctions1(DoubleFloat) + + + f02aaf(iaArg:Integer,nArg:Integer,aArg:Matrix DoubleFloat,_ + ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02aaf",_ + ["ia"::S,"n"::S,"ifail"::S,"r"::S,"a"::S,"e"::S]$Lisp,_ + ["r"::S,"e"::S]$Lisp,_ + [["double"::S,["r"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp_ + ,["e"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"ia"::S,"n"::S,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["r"::S,"a"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,nArg::Any,ifailArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02abf(aArg:Matrix DoubleFloat,iaArg:Integer,nArg:Integer,_ + ivArg:Integer,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02abf",_ + ["ia"::S,"n"::S,"iv"::S,"ifail"::S,"a"::S,"r"::S,"v"::S,"e"::S]$Lisp,_ + ["r"::S,"v"::S,"e"::S]$Lisp,_ + [["double"::S,["a"::S,"ia"::S,"n"::S]$Lisp_ + ,["r"::S,"n"::S]$Lisp,["v"::S,"iv"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"ia"::S,"n"::S,"iv"::S,"ifail"::S_ + ]$Lisp_ + ]$Lisp,_ + ["r"::S,"v"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,nArg::Any,ivArg::Any,ifailArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02adf(iaArg:Integer,ibArg:Integer,nArg:Integer,_ + aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02adf",_ + ["ia"::S,"ib"::S,"n"::S,"ifail"::S,"r"::S,"a"::S,"b"::S,"de"::S]$Lisp,_ + ["r"::S,"de"::S]$Lisp,_ + [["double"::S,["r"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp_ + ,["b"::S,"ib"::S,"n"::S]$Lisp,["de"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"ia"::S,"ib"::S,"n"::S,"ifail"::S_ + ]$Lisp_ + ]$Lisp,_ + ["r"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,ibArg::Any,nArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02aef(iaArg:Integer,ibArg:Integer,nArg:Integer,_ + ivArg:Integer,aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,_ + ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02aef",_ + ["ia"::S,"ib"::S,"n"::S,"iv"::S,"ifail"::S_ + ,"r"::S,"v"::S,"a"::S,"b"::S,"dl"::S_ + ,"e"::S]$Lisp,_ + ["r"::S,"v"::S,"dl"::S,"e"::S]$Lisp,_ + [["double"::S,["r"::S,"n"::S]$Lisp,["v"::S,"iv"::S,"n"::S]$Lisp_ + ,["a"::S,"ia"::S,"n"::S]$Lisp,["b"::S,"ib"::S,"n"::S]$Lisp,["dl"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp_ + ]$Lisp_ + ,["integer"::S,"ia"::S,"ib"::S,"n"::S,"iv"::S_ + ,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["r"::S,"v"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,ibArg::Any,nArg::Any,ivArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02aff(iaArg:Integer,nArg:Integer,aArg:Matrix DoubleFloat,_ + ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02aff",_ + ["ia"::S,"n"::S,"ifail"::S,"rr"::S,"ri"::S,"intger"::S,"a"::S]$Lisp,_ + ["rr"::S,"ri"::S,"intger"::S]$Lisp,_ + [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_ + ,["a"::S,"ia"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"ia"::S,"n"::S,["intger"::S,"n"::S]$Lisp_ + ,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["rr"::S,"ri"::S,"intger"::S,"a"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,nArg::Any,ifailArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02agf(iaArg:Integer,nArg:Integer,ivrArg:Integer,_ + iviArg:Integer,aArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02agf",_ + ["ia"::S,"n"::S,"ivr"::S,"ivi"::S,"ifail"::S_ + ,"rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S_ + ,"a"::S]$Lisp,_ + ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S]$Lisp,_ + [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_ + ,["vr"::S,"ivr"::S,"n"::S]$Lisp,["vi"::S,"ivi"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"ia"::S,"n"::S,"ivr"::S,"ivi"::S_ + ,["intger"::S,"n"::S]$Lisp,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S,"a"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,nArg::Any,ivrArg::Any,iviArg::Any,ifailArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02ajf(iarArg:Integer,iaiArg:Integer,nArg:Integer,_ + arArg:Matrix DoubleFloat,aiArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02ajf",_ + ["iar"::S,"iai"::S,"n"::S,"ifail"::S,"rr"::S,"ri"::S,"ar"::S,"ai"::S,"intger"::S_ + ]$Lisp,_ + ["rr"::S,"ri"::S,"intger"::S]$Lisp,_ + [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_ + ,["ar"::S,"iar"::S,"n"::S]$Lisp,["ai"::S,"iai"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ifail"::S_ + ,["intger"::S,"n"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["rr"::S,"ri"::S,"ar"::S,"ai"::S,"ifail"::S]$Lisp,_ + [([iarArg::Any,iaiArg::Any,nArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02akf(iarArg:Integer,iaiArg:Integer,nArg:Integer,_ + ivrArg:Integer,iviArg:Integer,arArg:Matrix DoubleFloat,_ + aiArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02akf",_ + ["iar"::S,"iai"::S,"n"::S,"ivr"::S,"ivi"::S_ + ,"ifail"::S,"rr"::S,"ri"::S,"vr"::S,"vi"::S,"ar"::S_ + ,"ai"::S,"intger"::S]$Lisp,_ + ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S]$Lisp,_ + [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_ + ,["vr"::S,"ivr"::S,"n"::S]$Lisp,["vi"::S,"ivi"::S,"n"::S]$Lisp,["ar"::S,"iar"::S,"n"::S]$Lisp,["ai"::S,"iai"::S,"n"::S]$Lisp_ + ]$Lisp_ + ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ivr"::S_ + ,"ivi"::S,"ifail"::S,["intger"::S,"n"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"ar"::S,"ai"::S,"ifail"::S]$Lisp,_ + [([iarArg::Any,iaiArg::Any,nArg::Any,ivrArg::Any,iviArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02awf(iarArg:Integer,iaiArg:Integer,nArg:Integer,_ + arArg:Matrix DoubleFloat,aiArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02awf",_ + ["iar"::S,"iai"::S,"n"::S,"ifail"::S,"r"::S,"ar"::S,"ai"::S,"wk1"::S,"wk2"::S_ + ,"wk3"::S]$Lisp,_ + ["r"::S,"wk1"::S,"wk2"::S,"wk3"::S]$Lisp,_ + [["double"::S,["r"::S,"n"::S]$Lisp,["ar"::S,"iar"::S,"n"::S]$Lisp_ + ,["ai"::S,"iai"::S,"n"::S]$Lisp,["wk1"::S,"n"::S]$Lisp,["wk2"::S,"n"::S]$Lisp,["wk3"::S,"n"::S]$Lisp_ + ]$Lisp_ + ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ifail"::S_ + ]$Lisp_ + ]$Lisp,_ + ["r"::S,"ar"::S,"ai"::S,"ifail"::S]$Lisp,_ + [([iarArg::Any,iaiArg::Any,nArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02axf(arArg:Matrix DoubleFloat,iarArg:Integer,aiArg:Matrix DoubleFloat,_ + iaiArg:Integer,nArg:Integer,ivrArg:Integer,_ + iviArg:Integer,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02axf",_ + ["iar"::S,"iai"::S,"n"::S,"ivr"::S,"ivi"::S_ + ,"ifail"::S,"ar"::S,"ai"::S,"r"::S,"vr"::S,"vi"::S_ + ,"wk1"::S,"wk2"::S,"wk3"::S]$Lisp,_ + ["r"::S,"vr"::S,"vi"::S,"wk1"::S,"wk2"::S,"wk3"::S]$Lisp,_ + [["double"::S,["ar"::S,"iar"::S,"n"::S]$Lisp_ + ,["ai"::S,"iai"::S,"n"::S]$Lisp,["r"::S,"n"::S]$Lisp,["vr"::S,"ivr"::S,"n"::S]$Lisp,["vi"::S,"ivi"::S,"n"::S]$Lisp,["wk1"::S,"n"::S]$Lisp_ + ,["wk2"::S,"n"::S]$Lisp,["wk3"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ivr"::S_ + ,"ivi"::S,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["r"::S,"vr"::S,"vi"::S,"ifail"::S]$Lisp,_ + [([iarArg::Any,iaiArg::Any,nArg::Any,ivrArg::Any,iviArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02bbf(iaArg:Integer,nArg:Integer,albArg:DoubleFloat,_ + ubArg:DoubleFloat,mArg:Integer,ivArg:Integer,_ + aArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02bbf",_ + ["ia"::S,"n"::S,"alb"::S,"ub"::S,"m"::S_ + ,"iv"::S,"mm"::S,"ifail"::S,"r"::S,"v"::S,"icount"::S,"a"::S,"d"::S_ + ,"e"::S,"e2"::S,"x"::S,"g"::S,"c"::S_ + ]$Lisp,_ + ["mm"::S,"r"::S,"v"::S,"icount"::S,"d"::S,"e"::S,"e2"::S,"x"::S,"g"::S,"c"::S]$Lisp,_ + [["double"::S,"alb"::S,"ub"::S,["r"::S,"m"::S]$Lisp_ + ,["v"::S,"iv"::S,"m"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp,["d"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp,["e2"::S,"n"::S]$Lisp_ + ,["x"::S,"n"::S,7$Lisp]$Lisp,["g"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"ia"::S,"n"::S,"m"::S,"iv"::S_ + ,"mm"::S,["icount"::S,"m"::S]$Lisp,"ifail"::S]$Lisp_ + ,["logical"::S,["c"::S,"n"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["mm"::S,"r"::S,"v"::S,"icount"::S,"a"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,nArg::Any,albArg::Any,ubArg::Any,mArg::Any,ivArg::Any,ifailArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02bjf(nArg:Integer,iaArg:Integer,ibArg:Integer,_ + eps1Arg:DoubleFloat,matvArg:Boolean,ivArg:Integer,_ + aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f02bjf",_ + ["n"::S,"ia"::S,"ib"::S,"eps1"::S,"matv"::S_ + ,"iv"::S,"ifail"::S,"alfr"::S,"alfi"::S,"beta"::S,"v"::S,"iter"::S_ + ,"a"::S,"b"::S]$Lisp,_ + ["alfr"::S,"alfi"::S,"beta"::S,"v"::S,"iter"::S]$Lisp,_ + [["double"::S,"eps1"::S,["alfr"::S,"n"::S]$Lisp_ + ,["alfi"::S,"n"::S]$Lisp,["beta"::S,"n"::S]$Lisp,["v"::S,"iv"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp,["b"::S,"ib"::S,"n"::S]$Lisp_ + ]$Lisp_ + ,["integer"::S,"n"::S,"ia"::S,"ib"::S,"iv"::S_ + ,["iter"::S,"n"::S]$Lisp,"ifail"::S]$Lisp_ + ,["logical"::S,"matv"::S]$Lisp_ + ]$Lisp,_ + ["alfr"::S,"alfi"::S,"beta"::S,"v"::S,"iter"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,iaArg::Any,ibArg::Any,eps1Arg::Any,matvArg::Any,ivArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02fjf(nArg:Integer,kArg:Integer,tolArg:DoubleFloat,_ + novecsArg:Integer,nrxArg:Integer,lworkArg:Integer,_ + lrworkArg:Integer,liworkArg:Integer,mArg:Integer,_ + noitsArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer,_ + dotArg:Union(fn:FileName,fp:Asp27(DOT)),imageArg:Union(fn:FileName,fp:Asp28(IMAGE))): Result == + pushFortranOutputStack(dotFilename := aspFilename "dot")$FOP + if dotArg case fn + then outputAsFortran(dotArg.fn) + else outputAsFortran(dotArg.fp) + popFortranOutputStack()$FOP + pushFortranOutputStack(imageFilename := aspFilename "image")$FOP + if imageArg case fn + then outputAsFortran(imageArg.fn) + else outputAsFortran(imageArg.fp) + popFortranOutputStack()$FOP + pushFortranOutputStack(monitFilename := aspFilename "monit")$FOP + outputAsFortran()$Asp29(MONIT) + popFortranOutputStack()$FOP + [(invokeNagman([dotFilename,imageFilename,monitFilename]$Lisp,_ + "f02fjf",_ + ["n"::S,"k"::S,"tol"::S,"novecs"::S,"nrx"::S_ + ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S_ + ,"ifail"::S,"dot"::S,"image"::S,"monit"::S,"d"::S,"x"::S,"work"::S,"rwork"::S,"iwork"::S_ + ]$Lisp,_ + ["d"::S,"work"::S,"rwork"::S,"iwork"::S,"dot"::S,"image"::S,"monit"::S]$Lisp,_ + [["double"::S,"tol"::S,["d"::S,"k"::S]$Lisp_ + ,["x"::S,"nrx"::S,"k"::S]$Lisp,["work"::S,"lwork"::S]$Lisp,["rwork"::S,"lrwork"::S]$Lisp,"dot"::S,"image"::S,"monit"::S_ + ]$Lisp_ + ,["integer"::S,"n"::S,"k"::S,"novecs"::S,"nrx"::S_ + ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["d"::S,"m"::S,"noits"::S,"x"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,kArg::Any,tolArg::Any,novecsArg::Any,nrxArg::Any,lworkArg::Any,lrworkArg::Any,liworkArg::Any,mArg::Any,noitsArg::Any,ifailArg::Any,xArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02fjf(nArg:Integer,kArg:Integer,tolArg:DoubleFloat,_ + novecsArg:Integer,nrxArg:Integer,lworkArg:Integer,_ + lrworkArg:Integer,liworkArg:Integer,mArg:Integer,_ + noitsArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer,_ + dotArg:Union(fn:FileName,fp:Asp27(DOT)),imageArg:Union(fn:FileName,fp:Asp28(IMAGE)),monitArg:FileName): Result == + pushFortranOutputStack(dotFilename := aspFilename "dot")$FOP + if dotArg case fn + then outputAsFortran(dotArg.fn) + else outputAsFortran(dotArg.fp) + popFortranOutputStack()$FOP + pushFortranOutputStack(imageFilename := aspFilename "image")$FOP + if imageArg case fn + then outputAsFortran(imageArg.fn) + else outputAsFortran(imageArg.fp) + popFortranOutputStack()$FOP + pushFortranOutputStack(monitFilename := aspFilename "monit")$FOP + outputAsFortran(monitArg) + [(invokeNagman([dotFilename,imageFilename,monitFilename]$Lisp,_ + "f02fjf",_ + ["n"::S,"k"::S,"tol"::S,"novecs"::S,"nrx"::S_ + ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S_ + ,"ifail"::S,"dot"::S,"image"::S,"monit"::S,"d"::S,"x"::S,"work"::S,"rwork"::S,"iwork"::S_ + ]$Lisp,_ + ["d"::S,"work"::S,"rwork"::S,"iwork"::S,"dot"::S,"image"::S,"monit"::S]$Lisp,_ + [["double"::S,"tol"::S,["d"::S,"k"::S]$Lisp_ + ,["x"::S,"nrx"::S,"k"::S]$Lisp,["work"::S,"lwork"::S]$Lisp,["rwork"::S,"lrwork"::S]$Lisp,"dot"::S,"image"::S,"monit"::S_ + ]$Lisp_ + ,["integer"::S,"n"::S,"k"::S,"novecs"::S,"nrx"::S_ + ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["d"::S,"m"::S,"noits"::S,"x"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,kArg::Any,tolArg::Any,novecsArg::Any,nrxArg::Any,lworkArg::Any,lrworkArg::Any,liworkArg::Any,mArg::Any,noitsArg::Any,ifailArg::Any,xArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02wef(mArg:Integer,nArg:Integer,ldaArg:Integer,_ + ncolbArg:Integer,ldbArg:Integer,wantqArg:Boolean,_ + ldqArg:Integer,wantpArg:Boolean,ldptArg:Integer,_ + aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result == + workLength : Integer := + mArg >= nArg => + wantqArg and wantpArg => + max(max(nArg**2 + 5*(nArg - 1),nArg + ncolbArg),4) + wantqArg => + max(max(nArg**2 + 4*(nArg - 1),nArg + ncolbArg),4) + wantpArg => + zero? ncolbArg => max(3*(nArg - 1),2) + max(5*(nArg - 1),2) + zero? ncolbArg => max(2*(nArg - 1),2) + max(3*(nArg - 1),2) + wantqArg and wantpArg => + max(mArg**2 + 5*(mArg - 1),2) + wantqArg => + max(3*(mArg - 1),1) + wantpArg => + zero? ncolbArg => max(mArg**2+3*(mArg - 1),2) + max(mArg**2+5*(mArg - 1),2) + zero? ncolbArg => max(2*(mArg - 1),1) + max(3*(mArg - 1),1) + + [(invokeNagman(NIL$Lisp,_ + "f02wef",_ + ["m"::S,"n"::S,"lda"::S,"ncolb"::S,"ldb"::S_ + ,"wantq"::S,"ldq"::S,"wantp"::S,"ldpt"::S,"ifail"::S_ + ,"q"::S,"sv"::S,"pt"::S,"work"::S,"a"::S_ + ,"b"::S]$Lisp,_ + ["q"::S,"sv"::S,"pt"::S,"work"::S]$Lisp,_ + [["double"::S,["q"::S,"ldq"::S,"m"::S]$Lisp_ + ,["sv"::S,"m"::S]$Lisp,["pt"::S,"ldpt"::S,"n"::S]$Lisp,["work"::S,workLength]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp_ + ]$Lisp_ + ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_ + ,"ldb"::S,"ldq"::S,"ldpt"::S,"ifail"::S]$Lisp_ + ,["logical"::S,"wantq"::S,"wantp"::S]$Lisp_ + ]$Lisp,_ + ["q"::S,"sv"::S,"pt"::S,"work"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ + [([mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,wantqArg::Any,ldqArg::Any,wantpArg::Any,ldptArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f02xef(mArg:Integer,nArg:Integer,ldaArg:Integer,_ + ncolbArg:Integer,ldbArg:Integer,wantqArg:Boolean,_ + ldqArg:Integer,wantpArg:Boolean,ldphArg:Integer,_ + aArg:Matrix Complex DoubleFloat,bArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == + -- This segment added by hand, to deal with an assumed size array GDN + tem : Integer := (min(mArg,nArg)-1) + rLen : Integer := + zero? ncolbArg and not wantqArg and not wantpArg => 2*tem + zero? ncolbArg and wantpArg and not wantqArg => 3*tem + not wantpArg => + ncolbArg >0 or wantqArg => 3*tem + 5*tem + cLen : Integer := + mArg >= nArg => + wantqArg and wantpArg => 2*(nArg + max(nArg**2,ncolbArg)) + wantqArg and not wantpArg => 2*(nArg + max(nArg**2+nArg,ncolbArg)) + 2*(nArg + max(nArg,ncolbArg)) + wantpArg => 2*(mArg**2 + mArg) + 2*mArg + svLength : Integer := + min(mArg,nArg) + [(invokeNagman(NIL$Lisp,_ + "f02xef",_ + ["m"::S,"n"::S,"lda"::S,"ncolb"::S,"ldb"::S_ + ,"wantq"::S,"ldq"::S,"wantp"::S,"ldph"::S,"ifail"::S_ + ,"q"::S,"sv"::S,"ph"::S,"rwork"::S,"a"::S_ + ,"b"::S,"cwork"::S]$Lisp,_ + ["q"::S,"sv"::S,"ph"::S,"rwork"::S,"cwork"::S]$Lisp,_ + [["double"::S,["sv"::S,svLength]$Lisp,["rwork"::S,rLen]$Lisp_ + ]$Lisp_ + ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_ + ,"ldb"::S,"ldq"::S,"ldph"::S,"ifail"::S]$Lisp_ + ,["logical"::S,"wantq"::S,"wantp"::S]$Lisp_ + ,["double complex"::S,["q"::S,"ldq"::S,"m"::S]$Lisp,["ph"::S,"ldph"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp,["cwork"::S,cLen]$Lisp]$Lisp_ + ]$Lisp,_ + ["q"::S,"sv"::S,"ph"::S,"rwork"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ + [([mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,wantqArg::Any,ldqArg::Any,wantpArg::Any,ldphArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + +@ +<>= +"NAGF02" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NAGF02"] +"ALIST" [color="#88FF44",href="bookvol10.3.pdf#nameddest=ALIST"] +"NAGE02" -> "ALIST" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package NAGE02 NagFittingPackage} \pagehead{NagFittingPackage}{NAGE02} \pagepic{ps/v104nagfittingpackage.ps}{NAGE02}{1.00} @@ -15449,6 +21713,464 @@ NagFittingPackage(): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NAGF04 NagLinearEquationSolvingPackage} +\pagehead{NagLinearEquationSolvingPackage}{NAGF04} +\pagepic{ps/v104naglinearequationsolvingpackage.ps}{NAGF04}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NAGF04 NagLinearEquationSolvingPackage +++ Author: Godfrey Nolan and Mike Dewar +++ Date Created: Jan 1994 +++ Date Last Updated: Thu May 12 17:45:31 1994 +++ Description: +++ This package uses the NAG Library to solve the matrix equation +++ \axiom{AX=B}, where \axiom{B} +++ may be a single vector or a matrix of multiple right-hand sides. +++ The matrix \axiom{A} may be real, complex, symmetric, Hermitian positive- +++ definite, or sparse. It may also be rectangular, in which case a +++ least-squares solution is obtained. +++ See \downlink{Manual Page}{manpageXXf04}. +NagLinearEquationSolvingPackage(): Exports == Implementation where + S ==> Symbol + FOP ==> FortranOutputStackPackage + + Exports ==> with + f04adf : (Integer,Matrix Complex DoubleFloat,Integer,Integer,_ + Integer,Integer,Matrix Complex DoubleFloat,Integer) -> Result + ++ f04adf(ia,b,ib,n,m,ic,a,ifail) + ++ calculates the approximate solution of a set of complex + ++ linear equations with multiple right-hand sides, using an LU + ++ factorization with partial pivoting. + ++ See \downlink{Manual Page}{manpageXXf04adf}. + f04arf : (Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,_ + Integer) -> Result + ++ f04arf(ia,b,n,a,ifail) + ++ calculates the approximate solution of a set of real + ++ linear equations with a single right-hand side, using an LU + ++ factorization with partial pivoting. + ++ See \downlink{Manual Page}{manpageXXf04arf}. + f04asf : (Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,_ + Integer) -> Result + ++ f04asf(ia,b,n,a,ifail) + ++ calculates the accurate solution of a set of real + ++ symmetric positive-definite linear equations with a single right- + ++ hand side, Ax=b, using a Cholesky factorization and iterative + ++ refinement. + ++ See \downlink{Manual Page}{manpageXXf04asf}. + f04atf : (Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer,_ + Integer,Integer) -> Result + ++ f04atf(a,ia,b,n,iaa,ifail) + ++ calculates the accurate solution of a set of real linear + ++ equations with a single right-hand side, using an LU + ++ factorization with partial pivoting, and iterative refinement. + ++ See \downlink{Manual Page}{manpageXXf04atf}. + f04axf : (Integer,Matrix DoubleFloat,Integer,Matrix Integer,_ + Matrix Integer,Integer,Matrix Integer,Matrix DoubleFloat) -> Result + ++ f04axf(n,a,licn,icn,ikeep,mtype,idisp,rhs) + ++ calculates the approximate solution of a set of real + ++ sparse linear equations with a single right-hand side, Ax=b or + ++ T + ++ A x=b, where A has been factorized by F01BRF or F01BSF. + ++ See \downlink{Manual Page}{manpageXXf04axf}. + f04faf : (Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,_ + Matrix DoubleFloat,Integer) -> Result + ++ f04faf(job,n,d,e,b,ifail) + ++ calculates the approximate solution of a set of real + ++ symmetric positive-definite tridiagonal linear equations. + ++ See \downlink{Manual Page}{manpageXXf04faf}. + f04jgf : (Integer,Integer,Integer,DoubleFloat,_ + Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result + ++ f04jgf(m,n,nra,tol,lwork,a,b,ifail) + ++ finds the solution of a linear least-squares problem, Ax=b + ++ , where A is a real m by n (m>=n) matrix and b is an m element + ++ vector. If the matrix of observations is not of full rank, then + ++ the minimal least-squares solution is returned. + ++ See \downlink{Manual Page}{manpageXXf04jgf}. + f04maf : (Integer,Integer,Matrix DoubleFloat,Integer,_ + Matrix Integer,Integer,Matrix Integer,Matrix DoubleFloat,Matrix Integer,Matrix Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix Integer,Integer) -> Result + ++ f04maf(n,nz,avals,licn,irn,lirn,icn,wkeep,ikeep,inform,b,acc,noits,ifail) + ++ e a sparse symmetric positive-definite system of linear + ++ equations, Ax=b, using a pre-conditioned conjugate gradient + ++ method, where A has been factorized by F01MAF. + ++ See \downlink{Manual Page}{manpageXXf04maf}. + f04mbf : (Integer,Matrix DoubleFloat,Boolean,DoubleFloat,_ + Integer,Integer,Integer,Integer,DoubleFloat,Integer,Union(fn:FileName,fp:Asp28(APROD)),Union(fn:FileName,fp:Asp34(MSOLVE))) -> Result + ++ f04mbf(n,b,precon,shift,itnlim,msglvl,lrwork,liwork,rtol,ifail,aprod,msolve) + ++ solves a system of real sparse symmetric linear equations + ++ using a Lanczos algorithm. + ++ See \downlink{Manual Page}{manpageXXf04mbf}. + f04mcf : (Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,_ + Matrix Integer,Integer,Matrix DoubleFloat,Integer,Integer,Integer,Integer) -> Result + ++ f04mcf(n,al,lal,d,nrow,ir,b,nrb,iselct,nrx,ifail) + ++ computes the approximate solution of a system of real + ++ linear equations with multiple right-hand sides, AX=B, where A + ++ is a symmetric positive-definite variable-bandwidth matrix, which + ++ has previously been factorized by F01MCF. Related systems may + ++ also be solved. + ++ See \downlink{Manual Page}{manpageXXf04mcf}. + f04qaf : (Integer,Integer,DoubleFloat,DoubleFloat,_ + DoubleFloat,DoubleFloat,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp30(APROD))) -> Result + ++ f04qaf(m,n,damp,atol,btol,conlim,itnlim,msglvl,lrwork,liwork,b,ifail,aprod) + ++ solves sparse unsymmetric equations, sparse linear least- + ++ squares problems and sparse damped linear least-squares problems, + ++ using a Lanczos algorithm. + ++ See \downlink{Manual Page}{manpageXXf04qaf}. + Implementation ==> add + + import Lisp + import DoubleFloat + import Any + import Record + import Integer + import Matrix DoubleFloat + import Boolean + import NAGLinkSupportPackage + import FortranPackage + import AnyFunctions1(Integer) + import AnyFunctions1(DoubleFloat) + import AnyFunctions1(Boolean) + import AnyFunctions1(Matrix Complex DoubleFloat) + import AnyFunctions1(Matrix DoubleFloat) + import AnyFunctions1(Matrix Integer) + + + f04adf(iaArg:Integer,bArg:Matrix Complex DoubleFloat,ibArg:Integer,_ + nArg:Integer,mArg:Integer,icArg:Integer,_ + aArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f04adf",_ + ["ia"::S,"ib"::S,"n"::S,"m"::S,"ic"::S_ + ,"ifail"::S,"b"::S,"c"::S,"a"::S,"wkspce"::S]$Lisp,_ + ["c"::S,"wkspce"::S]$Lisp,_ + [["double"::S,["wkspce"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"ia"::S,"ib"::S,"n"::S,"m"::S_ + ,"ic"::S,"ifail"::S]$Lisp_ + ,["double complex"::S,["b"::S,"ib"::S,"m"::S]$Lisp,["c"::S,"ic"::S,"m"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["c"::S,"a"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,ibArg::Any,nArg::Any,mArg::Any,icArg::Any,ifailArg::Any,bArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04arf(iaArg:Integer,bArg:Matrix DoubleFloat,nArg:Integer,_ + aArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f04arf",_ + ["ia"::S,"n"::S,"ifail"::S,"b"::S,"c"::S,"a"::S,"wkspce"::S]$Lisp,_ + ["c"::S,"wkspce"::S]$Lisp,_ + [["double"::S,["b"::S,"n"::S]$Lisp,["c"::S,"n"::S]$Lisp_ + ,["a"::S,"ia"::S,"n"::S]$Lisp,["wkspce"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"ia"::S,"n"::S,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["c"::S,"a"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,nArg::Any,ifailArg::Any,bArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04asf(iaArg:Integer,bArg:Matrix DoubleFloat,nArg:Integer,_ + aArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f04asf",_ + ["ia"::S,"n"::S,"ifail"::S,"b"::S,"c"::S,"a"::S,"wk1"::S,"wk2"::S_ + ]$Lisp,_ + ["c"::S,"wk1"::S,"wk2"::S]$Lisp,_ + [["double"::S,["b"::S,"n"::S]$Lisp,["c"::S,"n"::S]$Lisp_ + ,["a"::S,"ia"::S,"n"::S]$Lisp,["wk1"::S,"n"::S]$Lisp,["wk2"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"ia"::S,"n"::S,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["c"::S,"a"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,nArg::Any,ifailArg::Any,bArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04atf(aArg:Matrix DoubleFloat,iaArg:Integer,bArg:Matrix DoubleFloat,_ + nArg:Integer,iaaArg:Integer,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f04atf",_ + ["ia"::S,"n"::S,"iaa"::S,"ifail"::S,"a"::S,"b"::S,"c"::S,"aa"::S,"wks1"::S_ + ,"wks2"::S]$Lisp,_ + ["c"::S,"aa"::S,"wks1"::S,"wks2"::S]$Lisp,_ + [["double"::S,["a"::S,"ia"::S,"n"::S]$Lisp_ + ,["b"::S,"n"::S]$Lisp,["c"::S,"n"::S]$Lisp,["aa"::S,"iaa"::S,"n"::S]$Lisp,["wks1"::S,"n"::S]$Lisp,["wks2"::S,"n"::S]$Lisp_ + ]$Lisp_ + ,["integer"::S,"ia"::S,"n"::S,"iaa"::S,"ifail"::S_ + ]$Lisp_ + ]$Lisp,_ + ["c"::S,"aa"::S,"ifail"::S]$Lisp,_ + [([iaArg::Any,nArg::Any,iaaArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04axf(nArg:Integer,aArg:Matrix DoubleFloat,licnArg:Integer,_ + icnArg:Matrix Integer,ikeepArg:Matrix Integer,mtypeArg:Integer,_ + idispArg:Matrix Integer,rhsArg:Matrix DoubleFloat): Result == + [(invokeNagman(NIL$Lisp,_ + "f04axf",_ + ["n"::S,"licn"::S,"mtype"::S,"resid"::S,"a"::S,"icn"::S,"ikeep"::S,"idisp"::S,"rhs"::S_ + ,"w"::S]$Lisp,_ + ["resid"::S,"w"::S]$Lisp,_ + [["double"::S,["a"::S,"licn"::S]$Lisp,"resid"::S_ + ,["rhs"::S,"n"::S]$Lisp,["w"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"n"::S,"licn"::S,["icn"::S,"licn"::S]$Lisp_ + ,["ikeep"::S,["*"::S,"n"::S,5$Lisp]$Lisp]$Lisp,"mtype"::S,["idisp"::S,2$Lisp]$Lisp]$Lisp_ + ]$Lisp,_ + ["resid"::S,"rhs"::S]$Lisp,_ + [([nArg::Any,licnArg::Any,mtypeArg::Any,aArg::Any,icnArg::Any,ikeepArg::Any,idispArg::Any,rhsArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04faf(jobArg:Integer,nArg:Integer,dArg:Matrix DoubleFloat,_ + eArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f04faf",_ + ["job"::S,"n"::S,"ifail"::S,"d"::S,"e"::S,"b"::S]$Lisp,_ + []$Lisp,_ + [["double"::S,["d"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp_ + ,["b"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"job"::S,"n"::S,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["d"::S,"e"::S,"b"::S,"ifail"::S]$Lisp,_ + [([jobArg::Any,nArg::Any,ifailArg::Any,dArg::Any,eArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04jgf(mArg:Integer,nArg:Integer,nraArg:Integer,_ + tolArg:DoubleFloat,lworkArg:Integer,aArg:Matrix DoubleFloat,_ + bArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f04jgf",_ + ["m"::S,"n"::S,"nra"::S,"tol"::S,"lwork"::S_ + ,"svd"::S,"sigma"::S,"irank"::S,"ifail"::S,"work"::S,"a"::S,"b"::S]$Lisp,_ + ["svd"::S,"sigma"::S,"irank"::S,"work"::S]$Lisp,_ + [["double"::S,"tol"::S,"sigma"::S,["work"::S,"lwork"::S]$Lisp_ + ,["a"::S,"nra"::S,"n"::S]$Lisp,["b"::S,"m"::S]$Lisp]$Lisp_ + ,["integer"::S,"m"::S,"n"::S,"nra"::S,"lwork"::S_ + ,"irank"::S,"ifail"::S]$Lisp_ + ,["logical"::S,"svd"::S]$Lisp_ + ]$Lisp,_ + ["svd"::S,"sigma"::S,"irank"::S,"work"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ + [([mArg::Any,nArg::Any,nraArg::Any,tolArg::Any,lworkArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04maf(nArg:Integer,nzArg:Integer,avalsArg:Matrix DoubleFloat,_ + licnArg:Integer,irnArg:Matrix Integer,lirnArg:Integer,_ + icnArg:Matrix Integer,wkeepArg:Matrix DoubleFloat,ikeepArg:Matrix Integer,_ + informArg:Matrix Integer,bArg:Matrix DoubleFloat,accArg:Matrix DoubleFloat,_ + noitsArg:Matrix Integer,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f04maf",_ + ["n"::S,"nz"::S,"licn"::S,"lirn"::S,"ifail"::S_ + ,"avals"::S,"irn"::S,"icn"::S,"wkeep"::S,"ikeep"::S_ + ,"inform"::S,"work"::S,"b"::S,"acc"::S,"noits"::S_ + ]$Lisp,_ + ["work"::S]$Lisp,_ + [["double"::S,["avals"::S,"licn"::S]$Lisp,["wkeep"::S,["*"::S,3$Lisp,"n"::S]$Lisp]$Lisp_ + ,["work"::S,["*"::S,3$Lisp,"n"::S]$Lisp]$Lisp,["b"::S,"n"::S]$Lisp,["acc"::S,2$Lisp]$Lisp_ + ]$Lisp_ + ,["integer"::S,"n"::S,"nz"::S,"licn"::S,["irn"::S,"lirn"::S]$Lisp_ + ,"lirn"::S,["icn"::S,"licn"::S]$Lisp,["ikeep"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp,["inform"::S,4$Lisp]$Lisp_ + ,["noits"::S,2$Lisp]$Lisp,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["work"::S,"b"::S,"acc"::S,"noits"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,nzArg::Any,licnArg::Any,lirnArg::Any,ifailArg::Any,avalsArg::Any,irnArg::Any,icnArg::Any,wkeepArg::Any,ikeepArg::Any,informArg::Any,bArg::Any,accArg::Any,noitsArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04mbf(nArg:Integer,bArg:Matrix DoubleFloat,preconArg:Boolean,_ + shiftArg:DoubleFloat,itnlimArg:Integer,msglvlArg:Integer,_ + lrworkArg:Integer,liworkArg:Integer,rtolArg:DoubleFloat,_ + ifailArg:Integer,aprodArg:Union(fn:FileName,fp:Asp28(APROD)),msolveArg:Union(fn:FileName,fp:Asp34(MSOLVE))): Result == +-- if both asps are AXIOM generated we do not need lrwork liwork +-- and will set to 1. +-- else believe the user but check that they are >0. + if (aprodArg case fp) and (msolveArg case fp) + then + lrworkArg:=1 + liworkArg:=1 + else + lrworkArg:=max(1,lrworkArg) + liworkArg:=max(1,liworkArg) + pushFortranOutputStack(aprodFilename := aspFilename "aprod")$FOP + if aprodArg case fn + then outputAsFortran(aprodArg.fn) + else outputAsFortran(aprodArg.fp) + popFortranOutputStack()$FOP + pushFortranOutputStack(msolveFilename := aspFilename "msolve")$FOP + if msolveArg case fn + then outputAsFortran(msolveArg.fn) + else outputAsFortran(msolveArg.fp) + popFortranOutputStack()$FOP + [(invokeNagman([aprodFilename,msolveFilename]$Lisp,_ + "f04mbf",_ + ["n"::S,"precon"::S,"shift"::S,"itnlim"::S,"msglvl"::S_ + ,"lrwork"::S,"liwork"::S,"itn"::S,"anorm"::S,"acond"::S_ + ,"rnorm"::S,"xnorm"::S,"inform"::S,"rtol"::S,"ifail"::S_ + ,"aprod"::S,"msolve"::S,"b"::S,"x"::S,"work"::S,"rwork"::S,"iwork"::S_ + ]$Lisp,_ + ["x"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"xnorm"::S,"inform"::S,"work"::S,"rwork"::S,"iwork"::S,"aprod"::S,"msolve"::S]$Lisp,_ + [["double"::S,["b"::S,"n"::S]$Lisp,"shift"::S_ + ,["x"::S,"n"::S]$Lisp,"anorm"::S,"acond"::S,"rnorm"::S,"xnorm"::S,"rtol"::S,["work"::S,"n"::S,5$Lisp]$Lisp,["rwork"::S,"lrwork"::S]$Lisp_ + ,"aprod"::S,"msolve"::S]$Lisp_ + ,["integer"::S,"n"::S,"itnlim"::S,"msglvl"::S_ + ,"lrwork"::S,"liwork"::S,"itn"::S,"inform"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_ + ,["logical"::S,"precon"::S]$Lisp_ + ]$Lisp,_ + ["x"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"xnorm"::S,"inform"::S,"rtol"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,preconArg::Any,shiftArg::Any,itnlimArg::Any,msglvlArg::Any,lrworkArg::Any,liworkArg::Any,rtolArg::Any,ifailArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04mcf(nArg:Integer,alArg:Matrix DoubleFloat,lalArg:Integer,_ + dArg:Matrix DoubleFloat,nrowArg:Matrix Integer,irArg:Integer,_ + bArg:Matrix DoubleFloat,nrbArg:Integer,iselctArg:Integer,_ + nrxArg:Integer,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f04mcf",_ + ["n"::S,"lal"::S,"ir"::S,"nrb"::S,"iselct"::S_ + ,"nrx"::S,"ifail"::S,"al"::S,"d"::S,"nrow"::S,"b"::S,"x"::S_ + ]$Lisp,_ + ["x"::S]$Lisp,_ + [["double"::S,["al"::S,"lal"::S]$Lisp,["d"::S,"n"::S]$Lisp_ + ,["b"::S,"nrb"::S,"ir"::S]$Lisp,["x"::S,"nrx"::S,"ir"::S]$Lisp]$Lisp_ + ,["integer"::S,"n"::S,"lal"::S,["nrow"::S,"n"::S]$Lisp_ + ,"ir"::S,"nrb"::S,"iselct"::S,"nrx"::S,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["x"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,lalArg::Any,irArg::Any,nrbArg::Any,iselctArg::Any,nrxArg::Any,ifailArg::Any,alArg::Any,dArg::Any,nrowArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f04qaf(mArg:Integer,nArg:Integer,dampArg:DoubleFloat,_ + atolArg:DoubleFloat,btolArg:DoubleFloat,conlimArg:DoubleFloat,_ + itnlimArg:Integer,msglvlArg:Integer,lrworkArg:Integer,_ + liworkArg:Integer,bArg:Matrix DoubleFloat,ifailArg:Integer,_ + aprodArg:Union(fn:FileName,fp:Asp30(APROD))): Result == + pushFortranOutputStack(aprodFilename := aspFilename "aprod")$FOP + if aprodArg case fn + then outputAsFortran(aprodArg.fn) + else outputAsFortran(aprodArg.fp) + popFortranOutputStack()$FOP + [(invokeNagman([aprodFilename]$Lisp,_ + "f04qaf",_ + ["m"::S,"n"::S,"damp"::S,"atol"::S,"btol"::S_ + ,"conlim"::S,"itnlim"::S,"msglvl"::S,"lrwork"::S,"liwork"::S_ + ,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S_ + ,"xnorm"::S,"inform"::S,"ifail"::S,"aprod"::S,"x"::S,"se"::S,"b"::S,"work"::S,"rwork"::S_ + ,"iwork"::S]$Lisp,_ + ["x"::S,"se"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S,"xnorm"::S,"inform"::S,"work"::S,"rwork"::S,"iwork"::S,"aprod"::S]$Lisp,_ + [["double"::S,"damp"::S,"atol"::S,"btol"::S_ + ,"conlim"::S,["x"::S,"n"::S]$Lisp,["se"::S,"n"::S]$Lisp,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S,"xnorm"::S,["b"::S,"m"::S]$Lisp_ + ,["work"::S,"n"::S,2$Lisp]$Lisp,["rwork"::S,"lrwork"::S]$Lisp,"aprod"::S]$Lisp_ + ,["integer"::S,"m"::S,"n"::S,"itnlim"::S,"msglvl"::S_ + ,"lrwork"::S,"liwork"::S,"itn"::S,"inform"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["x"::S,"se"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S,"xnorm"::S,"inform"::S,"b"::S,"ifail"::S]$Lisp,_ + [([mArg::Any,nArg::Any,dampArg::Any,atolArg::Any,btolArg::Any,conlimArg::Any,itnlimArg::Any,msglvlArg::Any,lrworkArg::Any,liworkArg::Any,ifailArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + +@ +<>= +"NAGF04" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NAGF04"] +"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"] +"NAGF04" -> "COMPCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NAGSP NAGLinkSupportPackage} +\pagehead{NAGLinkSupportPackage}{NAGSP} +\pagepic{ps/v104naglinksupportpackage.ps}{NAGSP}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NAGSP NAGLinkSupportPackage +++ Author: Mike Dewar and Godfrey Nolan +++ Date Created: March 1993 +++ Date Last Updated: March 4 1994 +++ October 6 1994 +++ Basic Operations: +++ Related Domains: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ Examples: +++ References: +++ Description: Support functions for the NAG Library Link functions +NAGLinkSupportPackage() : exports == implementation where + + exports ==> with + fortranCompilerName : () -> String + ++ fortranCompilerName() returns the name of the currently selected + ++ Fortran compiler + fortranLinkerArgs : () -> String + ++ fortranLinkerArgs() returns the current linker arguments + aspFilename : String -> String + ++ aspFilename("f") returns a String consisting of "f" suffixed with + ++ an extension identifying the current AXIOM session. + dimensionsOf : (Symbol, Matrix DoubleFloat) -> SExpression + ++ dimensionsOf(s,m) \undocumented{} + dimensionsOf : (Symbol, Matrix Integer) -> SExpression + ++ dimensionsOf(s,m) \undocumented{} + checkPrecision : () -> Boolean + ++ checkPrecision() \undocumented{} + restorePrecision : () -> Void + ++ restorePrecision() \undocumented{} + + implementation ==> add + makeAs: (Symbol,Symbol) -> Symbol + changeVariables: (Expression Integer,Symbol) -> Expression Integer + changeVariablesF: (Expression Float,Symbol) -> Expression Float + + import String + import Symbol + + checkPrecision():Boolean == + (_$fortranPrecision$Lisp = "single"::Symbol) and (_$nagEnforceDouble$Lisp) => + systemCommand("set fortran precision double")$MoreSystemCommands + if _$nagMessages$Lisp then + print("*** Warning: Resetting fortran precision to double")$PrintPackage + true + false + + restorePrecision():Void == + systemCommand("set fortran precision single")$MoreSystemCommands + if _$nagMessages$Lisp then + print("** Warning: Restoring fortran precision to single")$PrintPackage + void()$Void + + uniqueId : String := "" + counter : Integer := 0 + getUniqueId():String == + if uniqueId = "" then + uniqueId := concat(getEnv("HOST")$Lisp,getEnv("SPADNUM")$Lisp) + concat(uniqueId,string (counter:=counter+1)) + + fortranCompilerName() == string _$fortranCompilerName$Lisp + fortranLinkerArgs() == string _$fortranLibraries$Lisp + + aspFilename(f:String):String == concat ["/tmp/",f,getUniqueId(),".f"] + + dimensionsOf(u:Symbol,m:Matrix DoubleFloat):SExpression == + [u,nrows m,ncols m]$Lisp + dimensionsOf(u:Symbol,m:Matrix Integer):SExpression == + [u,nrows m,ncols m]$Lisp + +@ +<>= +"NAGSP" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NAGSP"] +"ALIST" [color="#88FF44",href="bookvol10.3.pdf#nameddest=ALIST"] +"NAGSP" -> "ALIST" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package NAGD01 NagIntegrationPackage} \pagehead{NagIntegrationPackage}{NAGD01} \pagepic{ps/v104nagintegrationpackage.ps}{NAGD01}{1.00} @@ -16145,6 +22867,451 @@ NagInterpolationPackage(): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NAGF07 NagLapack} +\pagehead{NagLapack}{NAGF07} +\pagepic{ps/v104naglapack.ps}{NAGF07}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NAGF07 NagLapack +++ Author: Godfrey Nolan and Mike Dewar +++ Date Created: Jan 1994 +++ Date Last Updated: Thu May 12 17:45:42 1994 +++ Description: +++ This package uses the NAG Library to compute matrix +++ factorizations, and to solve systems of linear equations +++ following the matrix factorizations. +++ See \downlink{Manual Page}{manpageXXf07}. +NagLapack(): Exports == Implementation where + S ==> Symbol + FOP ==> FortranOutputStackPackage + + Exports ==> with + f07adf : (Integer,Integer,Integer,Matrix DoubleFloat) -> Result + ++ f07adf(m,n,lda,a) + ++ (DGETRF) computes the LU factorization of a real m by n + ++ matrix. + ++ See \downlink{Manual Page}{manpageXXf07adf}. + f07aef : (String,Integer,Integer,Matrix DoubleFloat,_ + Integer,Matrix Integer,Integer,Matrix DoubleFloat) -> Result + ++ f07aef(trans,n,nrhs,a,lda,ipiv,ldb,b) + ++ (DGETRS) solves a real system of linear equations with + ++ T + ++ multiple right-hand sides, AX=B or A X=B, where A has been + ++ factorized by F07ADF (DGETRF). + ++ See \downlink{Manual Page}{manpageXXf07aef}. + f07fdf : (String,Integer,Integer,Matrix DoubleFloat) -> Result + ++ f07fdf(uplo,n,lda,a) + ++ (DPOTRF) computes the Cholesky factorization of a real + ++ symmetric positive-definite matrix. + ++ See \downlink{Manual Page}{manpageXXf07fdf}. + f07fef : (String,Integer,Integer,Matrix DoubleFloat,_ + Integer,Integer,Matrix DoubleFloat) -> Result + ++ f07fef(uplo,n,nrhs,a,lda,ldb,b) + ++ (DPOTRS) solves a real symmetric positive-definite system + ++ of linear equations with multiple right-hand sides, AX=B, where A + ++ has been factorized by F07FDF (DPOTRF). + ++ See \downlink{Manual Page}{manpageXXf07fef}. + Implementation ==> add + + import Lisp + import DoubleFloat + import Any + import Record + import Integer + import Matrix DoubleFloat + import Boolean + import NAGLinkSupportPackage + import AnyFunctions1(Integer) + import AnyFunctions1(Matrix DoubleFloat) + import AnyFunctions1(String) + import AnyFunctions1(Matrix Integer) + + + f07adf(mArg:Integer,nArg:Integer,ldaArg:Integer,_ + aArg:Matrix DoubleFloat): Result == + [(invokeNagman(NIL$Lisp,_ + "f07adf",_ + ["m"::S,"n"::S,"lda"::S,"info"::S,"ipiv"::S,"a"::S]$Lisp,_ + ["ipiv"::S,"info"::S]$Lisp,_ + [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ + ]$Lisp_ + ,["integer"::S,"m"::S,"n"::S,"lda"::S,["ipiv"::S,"m"::S]$Lisp_ + ,"info"::S]$Lisp_ + ]$Lisp,_ + ["ipiv"::S,"info"::S,"a"::S]$Lisp,_ + [([mArg::Any,nArg::Any,ldaArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f07aef(transArg:String,nArg:Integer,nrhsArg:Integer,_ + aArg:Matrix DoubleFloat,ldaArg:Integer,ipivArg:Matrix Integer,_ + ldbArg:Integer,bArg:Matrix DoubleFloat): Result == + [(invokeNagman(NIL$Lisp,_ + "f07aef",_ + ["trans"::S,"n"::S,"nrhs"::S,"lda"::S,"ldb"::S_ + ,"info"::S,"a"::S,"ipiv"::S,"b"::S]$Lisp,_ + ["info"::S]$Lisp,_ + [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ + ,["b"::S,"ldb"::S,"nrhs"::S]$Lisp]$Lisp_ + ,["integer"::S,"n"::S,"nrhs"::S,"lda"::S,["ipiv"::S,"n"::S]$Lisp_ + ,"ldb"::S,"info"::S]$Lisp_ + ,["character"::S,"trans"::S]$Lisp_ + ]$Lisp,_ + ["info"::S,"b"::S]$Lisp,_ + [([transArg::Any,nArg::Any,nrhsArg::Any,ldaArg::Any,ldbArg::Any,aArg::Any,ipivArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f07fdf(uploArg:String,nArg:Integer,ldaArg:Integer,_ + aArg:Matrix DoubleFloat): Result == + [(invokeNagman(NIL$Lisp,_ + "f07fdf",_ + ["uplo"::S,"n"::S,"lda"::S,"info"::S,"a"::S]$Lisp,_ + ["info"::S]$Lisp,_ + [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ + ]$Lisp_ + ,["integer"::S,"n"::S,"lda"::S,"info"::S]$Lisp_ + ,["character"::S,"uplo"::S]$Lisp_ + ]$Lisp,_ + ["info"::S,"a"::S]$Lisp,_ + [([uploArg::Any,nArg::Any,ldaArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f07fef(uploArg:String,nArg:Integer,nrhsArg:Integer,_ + aArg:Matrix DoubleFloat,ldaArg:Integer,ldbArg:Integer,_ + bArg:Matrix DoubleFloat): Result == + [(invokeNagman(NIL$Lisp,_ + "f07fef",_ + ["uplo"::S,"n"::S,"nrhs"::S,"lda"::S,"ldb"::S_ + ,"info"::S,"a"::S,"b"::S]$Lisp,_ + ["info"::S]$Lisp,_ + [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ + ,["b"::S,"ldb"::S,"nrhs"::S]$Lisp]$Lisp_ + ,["integer"::S,"n"::S,"nrhs"::S,"lda"::S,"ldb"::S_ + ,"info"::S]$Lisp_ + ,["character"::S,"uplo"::S]$Lisp_ + ]$Lisp,_ + ["info"::S,"b"::S]$Lisp,_ + [([uploArg::Any,nArg::Any,nrhsArg::Any,ldaArg::Any,ldbArg::Any,aArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + +@ +<>= +"NAGF07" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NAGF07"] +"ALIST" [color="#88FF44",href="bookvol10.3.pdf#nameddest=ALIST"] +"NAGF07" -> "ALIST" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NAGF01 NagMatrixOperationsPackage} +\pagehead{NagMatrixOperationsPackage}{NAGF01} +\pagepic{ps/v104nagmatrixoperationspackage.ps}{NAGF01}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NAGF01 NagMatrixOperationsPackage +++ Author: Godfrey Nolan and Mike Dewar +++ Date Created: Jan 1994 +++ Date Last Updated: Thu May 12 17:45:15 1994 +++ Description: +++ This package uses the NAG Library to provide facilities for matrix +++ factorizations and associated transformations. +++ See \downlink{Manual Page}{manpageXXf01}. +NagMatrixOperationsPackage(): Exports == Implementation where + S ==> Symbol + FOP ==> FortranOutputStackPackage + + Exports ==> with + f01brf : (Integer,Integer,Integer,Integer,_ + DoubleFloat,Boolean,Boolean,List Boolean,Matrix DoubleFloat,Matrix Integer,Matrix Integer,Integer) -> Result + ++ f01brf(n,nz,licn,lirn,pivot,lblock,grow,abort,a,irn,icn,ifail) + ++ factorizes a real sparse matrix. The routine either forms + ++ the LU factorization of a permutation of the entire matrix, or, + ++ optionally, first permutes the matrix to block lower triangular + ++ form and then only factorizes the diagonal blocks. + ++ See \downlink{Manual Page}{manpageXXf01brf}. + f01bsf : (Integer,Integer,Integer,Matrix Integer,_ + Matrix Integer,Matrix Integer,Matrix Integer,Boolean,DoubleFloat,Boolean,Matrix Integer,Matrix DoubleFloat,Integer) -> Result + ++ f01bsf(n,nz,licn,ivect,jvect,icn,ikeep,grow,eta,abort,idisp,avals,ifail) + ++ factorizes a real sparse matrix using the pivotal sequence + ++ previously obtained by F01BRF when a matrix of the same sparsity + ++ pattern was factorized. + ++ See \downlink{Manual Page}{manpageXXf01bsf}. + f01maf : (Integer,Integer,Integer,Integer,_ + List Boolean,Matrix DoubleFloat,Matrix Integer,Matrix Integer,DoubleFloat,DoubleFloat,Integer) -> Result + ++ f01maf(n,nz,licn,lirn,abort,avals,irn,icn,droptl,densw,ifail) + ++ computes an incomplete Cholesky factorization of a real + ++ sparse symmetric positive-definite matrix A. + ++ See \downlink{Manual Page}{manpageXXf01maf}. + f01mcf : (Integer,Matrix DoubleFloat,Integer,Matrix Integer,_ + Integer) -> Result + ++ f01mcf(n,avals,lal,nrow,ifail) + ++ computes the Cholesky factorization of a real symmetric + ++ positive-definite variable-bandwidth matrix. + ++ See \downlink{Manual Page}{manpageXXf01mcf}. + f01qcf : (Integer,Integer,Integer,Matrix DoubleFloat,_ + Integer) -> Result + ++ f01qcf(m,n,lda,a,ifail) + ++ finds the QR factorization of the real m by n matrix A, + ++ where m>=n. + ++ See \downlink{Manual Page}{manpageXXf01qcf}. + f01qdf : (String,String,Integer,Integer,_ + Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer,Integer,Matrix DoubleFloat,Integer) -> Result + ++ f01qdf(trans,wheret,m,n,a,lda,zeta,ncolb,ldb,b,ifail) + ++ performs one of the transformations + ++ See \downlink{Manual Page}{manpageXXf01qdf}. + f01qef : (String,Integer,Integer,Integer,_ + Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result + ++ f01qef(wheret,m,n,ncolq,lda,zeta,a,ifail) + ++ returns the first ncolq columns of the real m by m + ++ orthogonal matrix Q, where Q is given as the product of + ++ Householder transformation matrices. + ++ See \downlink{Manual Page}{manpageXXf01qef}. + f01rcf : (Integer,Integer,Integer,Matrix Complex DoubleFloat,_ + Integer) -> Result + ++ f01rcf(m,n,lda,a,ifail) + ++ finds the QR factorization of the complex m by n matrix A, + ++ where m>=n. + ++ See \downlink{Manual Page}{manpageXXf01rcf}. + f01rdf : (String,String,Integer,Integer,_ + Matrix Complex DoubleFloat,Integer,Matrix Complex DoubleFloat,Integer,Integer,Matrix Complex DoubleFloat,Integer) -> Result + ++ f01rdf(trans,wheret,m,n,a,lda,theta,ncolb,ldb,b,ifail) + ++ performs one of the transformations + ++ See \downlink{Manual Page}{manpageXXf01rdf}. + f01ref : (String,Integer,Integer,Integer,_ + Integer,Matrix Complex DoubleFloat,Matrix Complex DoubleFloat,Integer) -> Result + ++ f01ref(wheret,m,n,ncolq,lda,theta,a,ifail) + ++ returns the first ncolq columns of the complex m by m + ++ unitary matrix Q, where Q is given as the product of Householder + ++ transformation matrices. + ++ See \downlink{Manual Page}{manpageXXf01ref}. + Implementation ==> add + + import Lisp + import DoubleFloat + import Any + import Record + import Integer + import Matrix DoubleFloat + import Boolean + import NAGLinkSupportPackage + import AnyFunctions1(Integer) + import AnyFunctions1(DoubleFloat) + import AnyFunctions1(Boolean) + import AnyFunctions1(String) + import AnyFunctions1(List Boolean) + import AnyFunctions1(Matrix DoubleFloat) + import AnyFunctions1(Matrix Complex DoubleFloat) + import AnyFunctions1(Matrix Integer) + + + f01brf(nArg:Integer,nzArg:Integer,licnArg:Integer,_ + lirnArg:Integer,pivotArg:DoubleFloat,lblockArg:Boolean,_ + growArg:Boolean,abortArg:List Boolean,aArg:Matrix DoubleFloat,_ + irnArg:Matrix Integer,icnArg:Matrix Integer,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01brf",_ + ["n"::S,"nz"::S,"licn"::S,"lirn"::S,"pivot"::S_ + ,"lblock"::S,"grow"::S,"ifail"::S,"abort"::S,"ikeep"::S,"w"::S,"idisp"::S,"a"::S_ + ,"irn"::S,"icn"::S,"iw"::S]$Lisp,_ + ["ikeep"::S,"w"::S,"idisp"::S,"iw"::S]$Lisp,_ + [["double"::S,"pivot"::S,["w"::S,"n"::S]$Lisp_ + ,["a"::S,"licn"::S]$Lisp]$Lisp_ + ,["integer"::S,"n"::S,"nz"::S,"licn"::S,"lirn"::S_ + ,["ikeep"::S,["*"::S,5$Lisp,"n"::S]$Lisp]$Lisp,["idisp"::S,10$Lisp]$Lisp,["irn"::S,"lirn"::S]$Lisp,["icn"::S,"licn"::S]$Lisp_ + ,"ifail"::S,["iw"::S,["*"::S,8$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_ + ,["logical"::S,"lblock"::S,"grow"::S,["abort"::S,4$Lisp]$Lisp]$Lisp_ + ]$Lisp,_ + ["ikeep"::S,"w"::S,"idisp"::S,"a"::S,"irn"::S,"icn"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,nzArg::Any,licnArg::Any,lirnArg::Any,pivotArg::Any,lblockArg::Any,growArg::Any,ifailArg::Any,abortArg::Any,aArg::Any,irnArg::Any,icnArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f01bsf(nArg:Integer,nzArg:Integer,licnArg:Integer,_ + ivectArg:Matrix Integer,jvectArg:Matrix Integer,icnArg:Matrix Integer,_ + ikeepArg:Matrix Integer,growArg:Boolean,etaArg:DoubleFloat,_ + abortArg:Boolean,idispArg:Matrix Integer,avalsArg:Matrix DoubleFloat,_ + ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01bsf",_ + ["n"::S,"nz"::S,"licn"::S,"grow"::S,"eta"::S_ + ,"abort"::S,"rpmin"::S,"ifail"::S,"ivect"::S,"jvect"::S,"icn"::S,"ikeep"::S,"idisp"::S_ + ,"w"::S,"avals"::S,"iw"::S]$Lisp,_ + ["w"::S,"rpmin"::S,"iw"::S]$Lisp,_ + [["double"::S,"eta"::S,["w"::S,"n"::S]$Lisp_ + ,"rpmin"::S,["avals"::S,"licn"::S]$Lisp]$Lisp_ + ,["integer"::S,"n"::S,"nz"::S,"licn"::S,["ivect"::S,"nz"::S]$Lisp_ + ,["jvect"::S,"nz"::S]$Lisp,["icn"::S,"licn"::S]$Lisp,["ikeep"::S,["*"::S,5$Lisp,"n"::S]$Lisp]$Lisp_ + ,["idisp"::S,2$Lisp]$Lisp,"ifail"::S,["iw"::S,["*"::S,8$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_ + ,["logical"::S,"grow"::S,"abort"::S]$Lisp_ + ]$Lisp,_ + ["w"::S,"rpmin"::S,"avals"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,nzArg::Any,licnArg::Any,growArg::Any,etaArg::Any,abortArg::Any,ifailArg::Any,ivectArg::Any,jvectArg::Any,icnArg::Any,ikeepArg::Any,idispArg::Any,avalsArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f01maf(nArg:Integer,nzArg:Integer,licnArg:Integer,_ + lirnArg:Integer,abortArg:List Boolean,avalsArg:Matrix DoubleFloat,_ + irnArg:Matrix Integer,icnArg:Matrix Integer,droptlArg:DoubleFloat,_ + denswArg:DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01maf",_ + ["n"::S,"nz"::S,"licn"::S,"lirn"::S,"droptl"::S_ + ,"densw"::S,"ifail"::S,"abort"::S,"wkeep"::S,"ikeep"::S,"inform"::S,"avals"::S_ + ,"irn"::S,"icn"::S,"iwork"::S]$Lisp,_ + ["wkeep"::S,"ikeep"::S,"inform"::S,"iwork"::S]$Lisp,_ + [["double"::S,["wkeep"::S,["*"::S,3$Lisp,"n"::S]$Lisp]$Lisp_ + ,["avals"::S,"licn"::S]$Lisp,"droptl"::S,"densw"::S]$Lisp_ + ,["integer"::S,"n"::S,"nz"::S,"licn"::S,"lirn"::S_ + ,["ikeep"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp,["inform"::S,4$Lisp]$Lisp,["irn"::S,"lirn"::S]$Lisp,["icn"::S,"licn"::S]$Lisp_ + ,"ifail"::S,["iwork"::S,["*"::S,6$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_ + ,["logical"::S,["abort"::S,3$Lisp]$Lisp]$Lisp_ + ]$Lisp,_ + ["wkeep"::S,"ikeep"::S,"inform"::S,"avals"::S,"irn"::S,"icn"::S,"droptl"::S,"densw"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,nzArg::Any,licnArg::Any,lirnArg::Any,droptlArg::Any,denswArg::Any,ifailArg::Any,abortArg::Any,avalsArg::Any,irnArg::Any,icnArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f01mcf(nArg:Integer,avalsArg:Matrix DoubleFloat,lalArg:Integer,_ + nrowArg:Matrix Integer,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01mcf",_ + ["n"::S,"lal"::S,"ifail"::S,"avals"::S,"nrow"::S,"al"::S,"d"::S]$Lisp,_ + ["al"::S,"d"::S]$Lisp,_ + [["double"::S,["avals"::S,"lal"::S]$Lisp,["al"::S,"lal"::S]$Lisp_ + ,["d"::S,"n"::S]$Lisp]$Lisp_ + ,["integer"::S,"n"::S,"lal"::S,["nrow"::S,"n"::S]$Lisp_ + ,"ifail"::S]$Lisp_ + ]$Lisp,_ + ["al"::S,"d"::S,"ifail"::S]$Lisp,_ + [([nArg::Any,lalArg::Any,ifailArg::Any,avalsArg::Any,nrowArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f01qcf(mArg:Integer,nArg:Integer,ldaArg:Integer,_ + aArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01qcf",_ + ["m"::S,"n"::S,"lda"::S,"ifail"::S,"zeta"::S,"a"::S]$Lisp,_ + ["zeta"::S]$Lisp,_ + [["double"::S,["zeta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp_ + ]$Lisp_ + ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ifail"::S_ + ]$Lisp_ + ]$Lisp,_ + ["zeta"::S,"a"::S,"ifail"::S]$Lisp,_ + [([mArg::Any,nArg::Any,ldaArg::Any,ifailArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f01qdf(transArg:String,wheretArg:String,mArg:Integer,_ + nArg:Integer,aArg:Matrix DoubleFloat,ldaArg:Integer,_ + zetaArg:Matrix DoubleFloat,ncolbArg:Integer,ldbArg:Integer,_ + bArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01qdf",_ + ["trans"::S,"wheret"::S,"m"::S,"n"::S,"lda"::S_ + ,"ncolb"::S,"ldb"::S,"ifail"::S,"a"::S,"zeta"::S,"b"::S,"work"::S]$Lisp,_ + ["work"::S]$Lisp,_ + [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ + ,["zeta"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp,["work"::S,"ncolb"::S]$Lisp]$Lisp_ + ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_ + ,"ldb"::S,"ifail"::S]$Lisp_ + ,["character"::S,"trans"::S,"wheret"::S]$Lisp_ + ]$Lisp,_ + ["b"::S,"ifail"::S]$Lisp,_ + [([transArg::Any,wheretArg::Any,mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,ifailArg::Any,aArg::Any,zetaArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f01qef(wheretArg:String,mArg:Integer,nArg:Integer,_ + ncolqArg:Integer,ldaArg:Integer,zetaArg:Matrix DoubleFloat,_ + aArg:Matrix DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01qef",_ + ["wheret"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_ + ,"ifail"::S,"zeta"::S,"a"::S,"work"::S]$Lisp,_ + ["work"::S]$Lisp,_ + [["double"::S,["zeta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"ncolq"::S]$Lisp_ + ,["work"::S,"ncolq"::S]$Lisp]$Lisp_ + ,["integer"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_ + ,"ifail"::S]$Lisp_ + ,["character"::S,"wheret"::S]$Lisp_ + ]$Lisp,_ + ["a"::S,"ifail"::S]$Lisp,_ + [([wheretArg::Any,mArg::Any,nArg::Any,ncolqArg::Any,ldaArg::Any,ifailArg::Any,zetaArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f01rcf(mArg:Integer,nArg:Integer,ldaArg:Integer,_ + aArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01rcf",_ + ["m"::S,"n"::S,"lda"::S,"ifail"::S,"theta"::S,"a"::S]$Lisp,_ + ["theta"::S]$Lisp,_ + [["integer"::S,"m"::S,"n"::S,"lda"::S,"ifail"::S_ + ]$Lisp_ + ,["double complex"::S,["theta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["theta"::S,"a"::S,"ifail"::S]$Lisp,_ + [([mArg::Any,nArg::Any,ldaArg::Any,ifailArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f01rdf(transArg:String,wheretArg:String,mArg:Integer,_ + nArg:Integer,aArg:Matrix Complex DoubleFloat,ldaArg:Integer,_ + thetaArg:Matrix Complex DoubleFloat,ncolbArg:Integer,ldbArg:Integer,_ + bArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01rdf",_ + ["trans"::S,"wheret"::S,"m"::S,"n"::S,"lda"::S_ + ,"ncolb"::S,"ldb"::S,"ifail"::S,"a"::S,"theta"::S,"b"::S,"work"::S]$Lisp,_ + ["work"::S]$Lisp,_ + [["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_ + ,"ldb"::S,"ifail"::S]$Lisp_ + ,["character"::S,"trans"::S,"wheret"::S]$Lisp_ + ,["double complex"::S,["a"::S,"lda"::S,"n"::S]$Lisp,["theta"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp,["work"::S,"ncolb"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["b"::S,"ifail"::S]$Lisp,_ + [([transArg::Any,wheretArg::Any,mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,ifailArg::Any,aArg::Any,thetaArg::Any,bArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + + f01ref(wheretArg:String,mArg:Integer,nArg:Integer,_ + ncolqArg:Integer,ldaArg:Integer,thetaArg:Matrix Complex DoubleFloat,_ + aArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == + [(invokeNagman(NIL$Lisp,_ + "f01ref",_ + ["wheret"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_ + ,"ifail"::S,"theta"::S,"a"::S,"work"::S]$Lisp,_ + ["work"::S]$Lisp,_ + [["integer"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_ + ,"ifail"::S]$Lisp_ + ,["character"::S,"wheret"::S]$Lisp_ + ,["double complex"::S,["theta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp,["work"::S,"ncolq"::S]$Lisp]$Lisp_ + ]$Lisp,_ + ["a"::S,"ifail"::S]$Lisp,_ + [([wheretArg::Any,mArg::Any,nArg::Any,ncolqArg::Any,ldaArg::Any,ifailArg::Any,thetaArg::Any,aArg::Any ])_ + @List Any]$Lisp)$Lisp)_ + pretend List (Record(key:Symbol,entry:Any))]$Result + +@ +<>= +"NAGF01" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NAGF01"] +"COMPCAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=COMPCAT"] +"NAGF01" -> "COMPCAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package NAGE04 NagOptimisationPackage} \pagehead{NagOptimisationPackage}{NAGE04} \pagepic{ps/v104nagoptimisationpackage.ps}{NAGE04}{1.00} @@ -17619,6 +24786,60 @@ NagSeriesSummationPackage(): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package NEWTON NewtonInterpolation} +\pagehead{NewtonInterpolation}{NEWTON} +\pagepic{ps/v104newtoninterpolation.ps}{NEWTON}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package NEWTON NewtonInterpolation +++ Description: +++ This package exports Newton interpolation for the special case where the +++ result is known to be in the original integral domain +++ The packages defined in this file provide fast fraction free rational +++ interpolation algorithms. (see FAMR2, FFFG, FFFGF, NEWTON) +NewtonInterpolation F: Exports == Implementation where + F: IntegralDomain + Exports == with + + newton: List F -> SparseUnivariatePolynomial F + + ++ \spad{newton}(l) returns the interpolating polynomial for the values + ++ l, where the x-coordinates are assumed to be [1,2,3,...,n] and the + ++ coefficients of the interpolating polynomial are known to be in the + ++ domain F. I.e., it is a very streamlined version for a special case of + ++ interpolation. + + Implementation == add + + differences(yl: List F): List F == + [y2-y1 for y1 in yl for y2 in rest yl] + + z: SparseUnivariatePolynomial(F) := monomial(1,1) + +-- we assume x=[1,2,3,...,n] + newtonAux(k: F, fact: F, yl: List F): SparseUnivariatePolynomial(F) == + if empty? rest yl + then ((yl.1) exquo fact)::F::SparseUnivariatePolynomial(F) + else ((yl.1) exquo fact)::F::SparseUnivariatePolynomial(F) + + (z-k::SparseUnivariatePolynomial(F)) _ + * newtonAux(k+1$F, fact*k, differences yl) + + + newton yl == newtonAux(1$F, 1$F, yl) + +@ +<>= +"NEWTON" [color="#FF4488",href="bookvol10.4.pdf#nameddest=NEWTON"] +"ALGEBRA" [color="#4488FF",href="bookvol10.2.pdf#nameddest=ALGEBRA"] +"NEWTON" -> "ALGEBRA" + +@ + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package NONE1 NoneFunctions1} \pagehead{NoneFunctions1}{NONE1} \pagepic{ps/v104nonefunctions1.ps}{NONE1}{1.00} @@ -18156,8 +25377,130 @@ PrimitiveArrayFunctions2(A, B): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package PUSHVAR PushVariables} +\pagehead{PushVariables}{PUSHVAR} +\pagepic{ps/v104pushvariables.ps}{PUSHVAR}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package PUSHVAR PushVariables +++ This package \undocumented{} +PushVariables(R,E,OV,PPR):C == T where + E : OrderedAbelianMonoidSup + OV: OrderedSet with + convert: % -> Symbol + ++ convert(x) converts x to a symbol + variable: Symbol -> Union(%, "failed") + ++ variable(s) makes an element from symbol s or fails + R : Ring + PR ==> Polynomial R + PPR: PolynomialCategory(PR,E,OV) + SUP ==> SparseUnivariatePolynomial + C == with + pushdown : (PPR, OV) -> PPR + ++ pushdown(p,v) \undocumented{} + pushdown : (PPR, List OV) -> PPR + ++ pushdown(p,lv) \undocumented{} + pushup : (PPR, OV) -> PPR + ++ pushup(p,v) \undocumented{} + pushup : (PPR, List OV) -> PPR + ++ pushup(p,lv) \undocumented{} + map : ((PR -> PPR), PPR) -> PPR + ++ map(f,p) \undocumented{} + + T == add + pushdown(g:PPR,x:OV) : PPR == + eval(g,x,monomial(1,convert x,1)$PR) + + pushdown(g:PPR, lv:List OV) : PPR == + vals:=[monomial(1,convert x,1)$PR for x in lv] + eval(g,lv,vals) + + map(f:(PR -> PPR), p: PPR) : PPR == + ground? p => f(retract p) + v:=mainVariable(p)::OV + multivariate(map(map(f,#1),univariate(p,v)),v) + + ---- push back the variable ---- + pushupCoef(c:PR, lv:List OV): PPR == + ground? c => c::PPR + v:=mainVariable(c)::Symbol + v2 := variable(v)$OV + uc := univariate(c,v) + ppr : PPR := 0 + v2 case OV => + while not zero? uc repeat + ppr := ppr + monomial(1,v2,degree(uc))$PPR * + pushupCoef(leadingCoefficient uc, lv) + uc := reductum uc + ppr + while not zero? uc repeat + ppr := ppr + monomial(1,v,degree(uc))$PR * + pushupCoef(leadingCoefficient uc, lv) + uc := reductum uc + ppr + + pushup(f:PPR,x:OV) :PPR == + map(pushupCoef(#1,[x]), f) + + pushup(g:PPR, lv:List OV) : PPR == + map(pushupCoef(#1, lv), g) + +@ +<>= +"PUSHVAR" [color="#FF4488",href="bookvol10.4.pdf#nameddest=PUSHVAR"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"PUSHVAR" -> "PFECAT" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter Q} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package QFCAT2 QuotientFieldCategoryFunctions2} +\pagehead{QuotientFieldCategoryFunctions2}{QFCAT2} +\pagepic{ps/v104quotientfieldcategoryfunctions2.ps}{QFCAT2}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package QFCAT2 QuotientFieldCategoryFunctions2 +++ Author: +++ Date Created: +++ Date Last Updated: +++ Basic Functions: +++ Related Constructors: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ References: +++ Description: +++ This package extends a function between integral domains +++ to a mapping between their quotient fields. +QuotientFieldCategoryFunctions2(A, B, R, S): Exports == Impl where + A, B: IntegralDomain + R : QuotientFieldCategory(A) + S : QuotientFieldCategory(B) + + Exports ==> with + map: (A -> B, R) -> S + ++ map(func,frac) applies the function func to the numerator + ++ and denominator of frac. + + Impl ==> add + map(f, r) == f(numer r) / f(denom r) + +@ +<>= +"QFCAT2" [color="#FF4488",href="bookvol10.4.pdf#nameddest=QFCAT2"] +"PFECAT" [color="#4488FF",href="bookvol10.2.pdf#nameddest=PFECAT"] +"QFCAT2" -> "PFECAT" + +@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter R} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -18692,29 +26035,29 @@ RepeatedSquaring(S): Exports == Implementation where %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Chapter S} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{package SAEFACT SimpleAlgebraicExtensionAlgFactor} -\pagehead{SimpleAlgebraicExtensionAlgFactor}{SAEFACT} -\pagepic{ps/v104simplealgebraicextensionalgfactor.ps}{SAEFACT}{1.00} +\section{package SAERFFC SAERationalFunctionAlgFactor} +\pagehead{SAERationalFunctionAlgFactor}{SAERFFC} +\pagepic{ps/v104saerationalfunctionalgfactor.ps}{SAERFFC}{1.00} {\bf Exports:}\\ \begin{tabular}{lllll} \end{tabular} -<>= -)abbrev package SAEFACT SimpleAlgebraicExtensionAlgFactor -++ Factorisation in a simple algebraic extension; +<>= +)abbrev package SAERFFC SAERationalFunctionAlgFactor +++ Factorisation in UP SAE FRAC POLY INT ++ Author: Patrizia Gianni ++ Date Created: ??? ++ Date Last Updated: ??? ++ Description: ++ Factorization of univariate polynomials with coefficients in an -++ algebraic extension of the rational numbers (\spadtype{Fraction Integer}). +++ algebraic extension of \spadtype{Fraction Polynomial Integer}. ++ Keywords: factorization, algebraic extension, univariate polynomial -SimpleAlgebraicExtensionAlgFactor(UP,SAE,UPA):Exports==Implementation where - UP : UnivariatePolynomialCategory Fraction Integer +SAERationalFunctionAlgFactor(UP, SAE, UPA): Exports == Implementation where + UP : UnivariatePolynomialCategory Fraction Polynomial Integer SAE : Join(Field, CharacteristicZero, - MonogenicAlgebra(Fraction Integer, UP)) + MonogenicAlgebra(Fraction Polynomial Integer, UP)) UPA: UnivariatePolynomialCategory SAE Exports ==> with @@ -18723,38 +26066,89 @@ SimpleAlgebraicExtensionAlgFactor(UP,SAE,UPA):Exports==Implementation where Implementation ==> add factor q == - factor(q, factor$RationalFactorize(UP) - )$InnerAlgFactor(Fraction Integer, UP, SAE, UPA) + factor(q, factor$RationalFunctionFactor(UP) + )$InnerAlgFactor(Fraction Polynomial Integer, UP, SAE, UPA) @ -<>= -"SAEFACT" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SAEFACT"] +<>= +"SAERFFC" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SAERFFC"] @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{package SAERFFC SAERationalFunctionAlgFactor} -\pagehead{SAERationalFunctionAlgFactor}{SAERFFC} -\pagepic{ps/v104saerationalfunctionalgfactor.ps}{SAERFFC}{1.00} +\section{package FORMULA1 ScriptFormulaFormat1} +\pagehead{ScriptFormulaFormat1}{FORMULA1} +\pagepic{ps/v104scriptformulaformat1.ps}{FORMULA1}{1.00} {\bf Exports:}\\ \begin{tabular}{lllll} \end{tabular} -<>= -)abbrev package SAERFFC SAERationalFunctionAlgFactor -++ Factorisation in UP SAE FRAC POLY INT +<>= +)abbrev package FORMULA1 ScriptFormulaFormat1 +++ Author: Robert S. Sutor +++ Date Created: 1987 through 1990 +++ Change History: +++ Basic Operations: coerce +++ Related Constructors: ScriptFormulaFormat +++ Also See: TexFormat, TexFormat1 +++ AMS Classifications: +++ Keywords: output, format, SCRIPT, BookMaster, formula +++ References: +++ SCRIPT Mathematical Formula Formatter User's Guide, SH20-6453, +++ IBM Corporation, Publishing Systems Information Development, +++ Dept. G68, P.O. Box 1900, Boulder, Colorado, USA 80301-9191. +++ Description: +++ \spadtype{ScriptFormulaFormat1} provides a utility coercion for +++ changing to SCRIPT formula format anything that has a coercion to +++ the standard output format. + +ScriptFormulaFormat1(S : SetCategory): public == private where + public == with + coerce: S -> ScriptFormulaFormat() + ++ coerce(s) provides a direct coercion from an expression s of domain S + ++ to SCRIPT formula format. This allows the user to skip the step of + ++ first manually coercing the object to standard output format + ++ before it is coerced to SCRIPT formula format. + + private == add + import ScriptFormulaFormat() + + coerce(s : S): ScriptFormulaFormat == + coerce(s :: OutputForm)$ScriptFormulaFormat + +@ +<>= +"FORMULA1" [color="#FF4488",href="bookvol10.4.pdf#nameddest=FORMULA1"] +"BASTYPE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=BASTYPE"] +"KOERCE" [color="#4488FF",href="bookvol10.2.pdf#nameddest=KOERCE"] +"FORMULA1" -> "BASTYPE" +"FORMULA1" -> "KOERCE" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package SAEFACT SimpleAlgebraicExtensionAlgFactor} +\pagehead{SimpleAlgebraicExtensionAlgFactor}{SAEFACT} +\pagepic{ps/v104simplealgebraicextensionalgfactor.ps}{SAEFACT}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package SAEFACT SimpleAlgebraicExtensionAlgFactor +++ Factorisation in a simple algebraic extension; ++ Author: Patrizia Gianni ++ Date Created: ??? ++ Date Last Updated: ??? ++ Description: ++ Factorization of univariate polynomials with coefficients in an -++ algebraic extension of \spadtype{Fraction Polynomial Integer}. +++ algebraic extension of the rational numbers (\spadtype{Fraction Integer}). ++ Keywords: factorization, algebraic extension, univariate polynomial -SAERationalFunctionAlgFactor(UP, SAE, UPA): Exports == Implementation where - UP : UnivariatePolynomialCategory Fraction Polynomial Integer +SimpleAlgebraicExtensionAlgFactor(UP,SAE,UPA):Exports==Implementation where + UP : UnivariatePolynomialCategory Fraction Integer SAE : Join(Field, CharacteristicZero, - MonogenicAlgebra(Fraction Polynomial Integer, UP)) + MonogenicAlgebra(Fraction Integer, UP)) UPA: UnivariatePolynomialCategory SAE Exports ==> with @@ -18763,12 +26157,12 @@ SAERationalFunctionAlgFactor(UP, SAE, UPA): Exports == Implementation where Implementation ==> add factor q == - factor(q, factor$RationalFunctionFactor(UP) - )$InnerAlgFactor(Fraction Polynomial Integer, UP, SAE, UPA) + factor(q, factor$RationalFactorize(UP) + )$InnerAlgFactor(Fraction Integer, UP, SAE, UPA) @ -<>= -"SAERFFC" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SAERFFC"] +<>= +"SAEFACT" [color="#FF4488",href="bookvol10.4.pdf#nameddest=SAEFACT"] @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -18971,6 +26365,63 @@ TangentExpansions(R:Field): Exports == Implementation where @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\section{package TEMUTL TemplateUtilities} +\pagehead{TemplateUtilities}{TEMUTL} +\pagepic{ps/v104templateutilities.ps}{TEMUTL}{1.00} + +{\bf Exports:}\\ +\begin{tabular}{lllll} +\end{tabular} + +<>= +)abbrev package TEMUTL TemplateUtilities +++ Author: Mike Dewar +++ Date Created: October 1992 +++ Date Last Updated: +++ Basic Operations: +++ Related Domains: +++ Also See: +++ AMS Classifications: +++ Keywords: +++ Examples: +++ References: +++ Description: This package provides functions for template manipulation +TemplateUtilities(): Exports == Implementation where + + Exports == with + interpretString : String -> Any + ++ interpretString(s) treats a string as a piece of AXIOM input, by + ++ parsing and interpreting it. + stripCommentsAndBlanks : String -> String + ++ stripCommentsAndBlanks(s) treats s as a piece of AXIOM input, and + ++ removes comments, and leading and trailing blanks. + + Implementation == add + + import InputForm + + stripC(s:String,u:String):String == + i : Integer := position(u,s,1) + i = 0 => s + delete(s,i..) + + stripCommentsAndBlanks(s:String):String == + trim(stripC(stripC(s,"++"),"--"),char " ") + + parse(s:String):InputForm == + ncParseFromString(s)$Lisp::InputForm + + interpretString(s:String):Any == + interpret parse s + +@ +<>= +"TEMUTL" [color="#FF4488",href="bookvol10.4.pdf#nameddest=TEMUTL"] +"STRING" [color="#88FF44",href="bookvol10.3.pdf#nameddest=STRING"] +"TEMUTL" -> "STRING" + +@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{package DRAW TopLevelDrawFunctions} \pagehead{TopLevelDrawFunctions}{DRAW} \pagepic{ps/v104topleveldrawfunctions.ps}{DRAW}{1.00} @@ -20768,6 +28219,7 @@ UnivariatePolynomialCommonDenominator(R, Q, UP): Exports == Impl where <> <> +<> <> <> <> @@ -20790,28 +28242,55 @@ UnivariatePolynomialCommonDenominator(R, Q, UP): Exports == Impl where <> <> <> +<> +<> <> <> <> +<> +<> +<> +<> <> +<> +<> +<> +<> +<> <> <> <> +<> +<> +<> <> +<> +<> +<> +<> <> <> <> +<> <> -<> +<> +<> +<> <> +<> + <> <> <> +<> <> <> +<> + +<> <> <> @@ -20820,16 +28299,23 @@ UnivariatePolynomialCommonDenominator(R, Q, UP): Exports == Impl where <> <> <> +<> +<> <> +<> +<> <> <> +<> +<> <> <> <> <> <> <> +<> <> <> <> @@ -20843,6 +28329,9 @@ UnivariatePolynomialCommonDenominator(R, Q, UP): Exports == Impl where <> <> <> +<> + +<> <> <> @@ -20852,11 +28341,13 @@ UnivariatePolynomialCommonDenominator(R, Q, UP): Exports == Impl where <> <> +<> <> -<> +p<> <> <> +<> <> <> <> diff --git a/books/ps/v104FactoredFunctions2.ps b/books/ps/v104FactoredFunctions2.ps new file mode 100644 index 0000000..8bb2b3b --- /dev/null +++ b/books/ps/v104FactoredFunctions2.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 +% FR2 +gsave +[ /Rect [ 13 72 67 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FR2) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 67 108 moveto +13 108 lineto +13 72 lineto +67 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 67 108 moveto +13 108 lineto +13 72 lineto +67 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +28.5 85.9 moveto 23 (FR2) alignedtext +grestore +% ALGEBRA +gsave +[ /Rect [ 0 0 80 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 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 (ALGEBRA) alignedtext +grestore +% FR2->ALGEBRA +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/v104discretelogarithmpackage.ps b/books/ps/v104discretelogarithmpackage.ps new file mode 100644 index 0000000..44910b8 --- /dev/null +++ b/books/ps/v104discretelogarithmpackage.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 +% DLP +gsave +[ /Rect [ 11 72 65 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=DLP) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 65 108 moveto +11 108 lineto +11 72 lineto +65 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 65 108 moveto +11 108 lineto +11 72 lineto +65 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +25 85.9 moveto 26 (DLP) alignedtext +grestore +% OAMONS +gsave +[ /Rect [ 0 0 76 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=OAMONS) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 76 36 moveto +2.82205e-14 36 lineto +7.17829e-15 1.06581e-14 lineto +76 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 76 36 moveto +2.82205e-14 36 lineto +7.17829e-15 1.06581e-14 lineto +76 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 13.9 moveto 61 (OAMONS) alignedtext +grestore +% DLP->OAMONS +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/v104expressionspacefunctions1.ps b/books/ps/v104expressionspacefunctions1.ps new file mode 100644 index 0000000..fca65a6 --- /dev/null +++ b/books/ps/v104expressionspacefunctions1.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 +% ES1 +gsave +[ /Rect [ 8 72 62 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=ES1) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 62 108 moveto +8 108 lineto +8 72 lineto +62 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 62 108 moveto +8 108 lineto +8 72 lineto +62 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +23.5 85.9 moveto 23 (ES1) alignedtext +grestore +% EVALAB +gsave +[ /Rect [ 0 0 70 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=EVALAB) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 70 36 moveto +2.13163e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +70 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 70 36 moveto +2.13163e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +70 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 54 (EVALAB) alignedtext +grestore +% ES1->EVALAB +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/v104expressionspacefunctions2.ps b/books/ps/v104expressionspacefunctions2.ps new file mode 100644 index 0000000..cbaea37 --- /dev/null +++ b/books/ps/v104expressionspacefunctions2.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 +% ES2 +gsave +[ /Rect [ 8 72 62 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=ES2) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 62 108 moveto +8 108 lineto +8 72 lineto +62 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 62 108 moveto +8 108 lineto +8 72 lineto +62 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +23.5 85.9 moveto 23 (ES2) alignedtext +grestore +% EVALAB +gsave +[ /Rect [ 0 0 70 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=EVALAB) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 70 36 moveto +2.13163e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +70 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 70 36 moveto +2.13163e-14 36 lineto +7.10543e-15 1.06581e-14 lineto +70 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 54 (EVALAB) alignedtext +grestore +% ES2->EVALAB +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/v104factoredfunctionutilities.ps b/books/ps/v104factoredfunctionutilities.ps new file mode 100644 index 0000000..67b3640 --- /dev/null +++ b/books/ps/v104factoredfunctionutilities.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 +% FRAC2 +gsave +[ /Rect [ 11 72 69 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FRAC2) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 69 108 moveto +11 108 lineto +11 72 lineto +69 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 69 108 moveto +11 108 lineto +11 72 lineto +69 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +18.5 85.9 moveto 43 (FRAC2) alignedtext +grestore +% ALGEBRA +gsave +[ /Rect [ 0 0 80 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 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 (ALGEBRA) alignedtext +grestore +% FRAC2->ALGEBRA +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/v104factoringutilities.ps b/books/ps/v104factoringutilities.ps new file mode 100644 index 0000000..934f27a --- /dev/null +++ b/books/ps/v104factoringutilities.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 +% FACUTIL +gsave +[ /Rect [ 0 72 74 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FACUTIL) >> + /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 (FACUTIL) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 4 0 70 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 70 36 moveto +4 36 lineto +4 1.06581e-14 lineto +70 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 70 36 moveto +4 36 lineto +4 1.06581e-14 lineto +70 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +11.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% FACUTIL->PFECAT +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/v104finiteabelianmonoidringfunctions2.ps b/books/ps/v104finiteabelianmonoidringfunctions2.ps new file mode 100644 index 0000000..4b5aa4f --- /dev/null +++ b/books/ps/v104finiteabelianmonoidringfunctions2.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 104 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 68 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 +% FAMR2 +gsave +[ /Rect [ 0 72 60 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FAMR2) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +1.45335e-14 108 lineto +5.55112e-16 72 lineto +60 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +1.45335e-14 108 lineto +5.55112e-16 72 lineto +60 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 45 (FAMR2) alignedtext +grestore +% FAMR +gsave +[ /Rect [ 3 0 57 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FAMR) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 57 36 moveto +3 36 lineto +3 1.06581e-14 lineto +57 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 57 36 moveto +3 36 lineto +3 1.06581e-14 lineto +57 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +11 13.9 moveto 38 (FAMR) alignedtext +grestore +% FAMR2->FAMR +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 30 72 moveto +30 64 30 55 30 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 33.5001 46 moveto +30 36 lineto +26.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 33.5001 46 moveto +30 36 lineto +26.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 104 152 +end +restore +%%EOF diff --git a/books/ps/v104finitefieldfunctions.ps b/books/ps/v104finitefieldfunctions.ps new file mode 100644 index 0000000..33b3e45 --- /dev/null +++ b/books/ps/v104finitefieldfunctions.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 +% FFF +gsave +[ /Rect [ 6 72 60 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FFF) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +21.5 85.9 moveto 23 (FFF) 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 +% FFF->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/v104finitefieldhomomorphisms.ps b/books/ps/v104finitefieldhomomorphisms.ps new file mode 100644 index 0000000..1b9f204 --- /dev/null +++ b/books/ps/v104finitefieldhomomorphisms.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 108 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 72 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 +% FFHOM +gsave +[ /Rect [ 0 72 64 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FFHOM) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 64 108 moveto +2.13163e-14 108 lineto +3.55271e-15 72 lineto +64 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 64 108 moveto +2.13163e-14 108 lineto +3.55271e-15 72 lineto +64 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 48 (FFHOM) alignedtext +grestore +% FAXF +gsave +[ /Rect [ 5 0 59 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FAXF) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 59 36 moveto +5 36 lineto +5 1.06581e-14 lineto +59 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 59 36 moveto +5 36 lineto +5 1.06581e-14 lineto +59 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +15 13.9 moveto 34 (FAXF) alignedtext +grestore +% FFHOM->FAXF +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 32 72 moveto +32 64 32 55 32 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 35.5001 46 moveto +32 36 lineto +28.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 35.5001 46 moveto +32 36 lineto +28.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 108 152 +end +restore +%%EOF diff --git a/books/ps/v104finitefieldpolynomialpackage.ps b/books/ps/v104finitefieldpolynomialpackage.ps new file mode 100644 index 0000000..8be262e --- /dev/null +++ b/books/ps/v104finitefieldpolynomialpackage.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 +% FFPOLY +gsave +[ /Rect [ 0 72 66 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FFPOLY) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 66 108 moveto +2.13163e-14 108 lineto +0 72 lineto +66 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 66 108 moveto +2.13163e-14 108 lineto +0 72 lineto +66 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 50 (FFPOLY) 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 +% FFPOLY->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/v104finitefieldpolynomialpackage2.ps b/books/ps/v104finitefieldpolynomialpackage2.ps new file mode 100644 index 0000000..2fd40fb --- /dev/null +++ b/books/ps/v104finitefieldpolynomialpackage2.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 +% FFPOLY2 +gsave +[ /Rect [ 3 72 75 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FFPOLY2) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 75 108 moveto +3 108 lineto +3 72 lineto +75 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 75 108 moveto +3 108 lineto +3 72 lineto +75 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +11 85.9 moveto 56 (FFPOLY2) 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 +% FFPOLY2->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/v104finitefieldsolvelinearpolynomialequation.ps b/books/ps/v104finitefieldsolvelinearpolynomialequation.ps new file mode 100644 index 0000000..e21f3de --- /dev/null +++ b/books/ps/v104finitefieldsolvelinearpolynomialequation.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 +% FFSLPE +gsave +[ /Rect [ 2 72 64 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FFSLPE) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 64 108 moveto +2 108 lineto +2 72 lineto +64 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 64 108 moveto +2 108 lineto +2 72 lineto +64 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +9.5 85.9 moveto 47 (FFSLPE) 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 +% FFSLPE->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/v104fortrancodepackage1.ps b/books/ps/v104fortrancodepackage1.ps new file mode 100644 index 0000000..7e0093e --- /dev/null +++ b/books/ps/v104fortrancodepackage1.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 +% FCPAK1 +gsave +[ /Rect [ 0 72 66 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FCPAK1) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 66 108 moveto +2.13163e-14 108 lineto +0 72 lineto +66 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 66 108 moveto +2.13163e-14 108 lineto +0 72 lineto +66 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 50 (FCPAK1) alignedtext +grestore +% ALIST +gsave +[ /Rect [ 6 0 60 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 60 36 moveto +6 36 lineto +6 1.06581e-14 lineto +60 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 60 36 moveto +6 36 lineto +6 1.06581e-14 lineto +60 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +13.5 13.9 moveto 39 (ALIST) alignedtext +grestore +% FCPAK1->ALIST +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/v104fortranoutputstackpackage.ps b/books/ps/v104fortranoutputstackpackage.ps new file mode 100644 index 0000000..44d0c44 --- /dev/null +++ b/books/ps/v104fortranoutputstackpackage.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 +% FOP +gsave +[ /Rect [ 6 72 60 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FOP) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +20 85.9 moveto 26 (FOP) alignedtext +grestore +% STRING +gsave +[ /Rect [ 0 0 66 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=STRING) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 66 36 moveto +2.13163e-14 36 lineto +0 1.06581e-14 lineto +66 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 66 36 moveto +2.13163e-14 36 lineto +0 1.06581e-14 lineto +66 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 50 (STRING) alignedtext +grestore +% FOP->STRING +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/v104fortranpackage.ps b/books/ps/v104fortranpackage.ps new file mode 100644 index 0000000..00558e0 --- /dev/null +++ b/books/ps/v104fortranpackage.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 +% FORT +gsave +[ /Rect [ 6 72 60 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FORT) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +15.5 85.9 moveto 35 (FORT) alignedtext +grestore +% STRING +gsave +[ /Rect [ 0 0 66 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=STRING) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 66 36 moveto +2.13163e-14 36 lineto +0 1.06581e-14 lineto +66 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 66 36 moveto +2.13163e-14 36 lineto +0 1.06581e-14 lineto +66 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 13.9 moveto 50 (STRING) alignedtext +grestore +% FORT->STRING +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/v104fractionfreefastgaussian.ps b/books/ps/v104fractionfreefastgaussian.ps new file mode 100644 index 0000000..deb08df --- /dev/null +++ b/books/ps/v104fractionfreefastgaussian.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 +% FFFG +gsave +[ /Rect [ 6 72 60 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FFFG) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +6 108 lineto +6 72 lineto +60 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +16.5 85.9 moveto 33 (FFFG) 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 +% FFFG->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/v104fractionfreefastgaussianfractions.ps b/books/ps/v104fractionfreefastgaussianfractions.ps new file mode 100644 index 0000000..1688dcc --- /dev/null +++ b/books/ps/v104fractionfreefastgaussianfractions.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 +% FFFGF +gsave +[ /Rect [ 5 72 61 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FFFGF) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 61 108 moveto +5 108 lineto +5 72 lineto +61 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 61 108 moveto +5 108 lineto +5 72 lineto +61 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +12.5 85.9 moveto 41 (FFFGF) 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 +% FFFGF->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/v104fractionfunctions2.ps b/books/ps/v104fractionfunctions2.ps new file mode 100644 index 0000000..67b3640 --- /dev/null +++ b/books/ps/v104fractionfunctions2.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 +% FRAC2 +gsave +[ /Rect [ 11 72 69 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FRAC2) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 69 108 moveto +11 108 lineto +11 72 lineto +69 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 69 108 moveto +11 108 lineto +11 72 lineto +69 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +18.5 85.9 moveto 43 (FRAC2) alignedtext +grestore +% ALGEBRA +gsave +[ /Rect [ 0 0 80 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 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 (ALGEBRA) alignedtext +grestore +% FRAC2->ALGEBRA +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/v104functionspacefunctions2.ps b/books/ps/v104functionspacefunctions2.ps new file mode 100644 index 0000000..285389c --- /dev/null +++ b/books/ps/v104functionspacefunctions2.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 +% FS2 +gsave +[ /Rect [ 0 72 54 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FS2) >> + /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 +16 85.9 moveto 22 (FS2) alignedtext +grestore +% FS +gsave +[ /Rect [ 0 0 54 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FS) >> + /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 +19.5 13.9 moveto 15 (FS) alignedtext +grestore +% FS2->FS +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/v104functionspacetoexponentialexpansion.ps b/books/ps/v104functionspacetoexponentialexpansion.ps new file mode 100644 index 0000000..239cf00 --- /dev/null +++ b/books/ps/v104functionspacetoexponentialexpansion.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 +% FS2EXPXP +gsave +[ /Rect [ 0 72 80 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FS2EXPXP) >> + /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 (FS2EXPXP) alignedtext +grestore +% ULSCCAT +gsave +[ /Rect [ 1 0 79 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=ULSCCAT) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 79 36 moveto +1 36 lineto +1 1.06581e-14 lineto +79 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 79 36 moveto +1 36 lineto +1 1.06581e-14 lineto +79 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8.5 13.9 moveto 63 (ULSCCAT) alignedtext +grestore +% FS2EXPXP->ULSCCAT +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/v104functionspacetounivariatepowerseries.ps b/books/ps/v104functionspacetounivariatepowerseries.ps new file mode 100644 index 0000000..acd7839 --- /dev/null +++ b/books/ps/v104functionspacetounivariatepowerseries.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 170 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 134 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 +% FS2UPS +gsave +[ /Rect [ 32 72 94 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FS2UPS) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 94 108 moveto +32 108 lineto +32 72 lineto +94 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 94 108 moveto +32 108 lineto +32 72 lineto +94 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +39.5 85.9 moveto 47 (FS2UPS) alignedtext +grestore +% ACF +gsave +[ /Rect [ 0 0 54 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 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 +13.5 13.9 moveto 27 (ACF) alignedtext +grestore +% FS2UPS->ACF +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 54 72 moveto +50 64 45 54 40 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 43.2598 43.7166 moveto +36 36 lineto +36.8631 46.5596 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 43.2598 43.7166 moveto +36 36 lineto +36.8631 46.5596 lineto +closepath stroke +grestore +% FS +gsave +[ /Rect [ 72 0 126 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FS) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 126 36 moveto +72 36 lineto +72 1.06581e-14 lineto +126 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 126 36 moveto +72 36 lineto +72 1.06581e-14 lineto +126 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +91.5 13.9 moveto 15 (FS) alignedtext +grestore +% FS2UPS->FS +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 72 72 moveto +76 64 81 54 86 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 89.1369 46.5596 moveto +90 36 lineto +82.7402 43.7166 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 89.1369 46.5596 moveto +90 36 lineto +82.7402 43.7166 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 170 152 +end +restore +%%EOF diff --git a/books/ps/v104functionspaceunivariatepolynomialfactor.ps b/books/ps/v104functionspaceunivariatepolynomialfactor.ps new file mode 100644 index 0000000..1321651 --- /dev/null +++ b/books/ps/v104functionspaceunivariatepolynomialfactor.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 170 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 134 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 +% FSUPFACT +gsave +[ /Rect [ 21 72 105 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FSUPFACT) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 105 108 moveto +21 108 lineto +21 72 lineto +105 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 105 108 moveto +21 108 lineto +21 72 lineto +105 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +29 85.9 moveto 68 (FSUPFACT) alignedtext +grestore +% FS +gsave +[ /Rect [ 0 0 54 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FS) >> + /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 +19.5 13.9 moveto 15 (FS) alignedtext +grestore +% FSUPFACT->FS +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 54 72 moveto +50 64 45 54 40 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 43.2598 43.7166 moveto +36 36 lineto +36.8631 46.5596 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 43.2598 43.7166 moveto +36 36 lineto +36.8631 46.5596 lineto +closepath stroke +grestore +% ACF +gsave +[ /Rect [ 72 0 126 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 126 36 moveto +72 36 lineto +72 1.06581e-14 lineto +126 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 126 36 moveto +72 36 lineto +72 1.06581e-14 lineto +126 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +85.5 13.9 moveto 27 (ACF) alignedtext +grestore +% FSUPFACT->ACF +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 72 72 moveto +76 64 81 54 86 45 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 89.1369 46.5596 moveto +90 36 lineto +82.7402 43.7166 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 89.1369 46.5596 moveto +90 36 lineto +82.7402 43.7166 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 170 152 +end +restore +%%EOF diff --git a/books/ps/v104hallbasis.ps b/books/ps/v104hallbasis.ps new file mode 100644 index 0000000..0f7bb8f --- /dev/null +++ b/books/ps/v104hallbasis.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 +% HB +gsave +[ /Rect [ 12 72 66 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=HB) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 66 108 moveto +12 108 lineto +12 72 lineto +66 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 66 108 moveto +12 108 lineto +12 72 lineto +66 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +29.5 85.9 moveto 19 (HB) 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 +% HB->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/v104innernormalbasisfieldfunctions.ps b/books/ps/v104innernormalbasisfieldfunctions.ps new file mode 100644 index 0000000..f2158cb --- /dev/null +++ b/books/ps/v104innernormalbasisfieldfunctions.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 +% INBFF +gsave +[ /Rect [ 12 72 66 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=INBFF) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 66 108 moveto +12 108 lineto +12 72 lineto +66 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 66 108 moveto +12 108 lineto +12 72 lineto +66 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +20 85.9 moveto 38 (INBFF) 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 +% INBFF->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/v104irredpolyoverfinitefield.ps b/books/ps/v104irredpolyoverfinitefield.ps new file mode 100644 index 0000000..415a0d6 --- /dev/null +++ b/books/ps/v104irredpolyoverfinitefield.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 126 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 90 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 +% IRREDFFX +gsave +[ /Rect [ 0 72 82 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=IRREDFFX) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 82 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +82 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 82 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +82 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 66 (IRREDFFX) alignedtext +grestore +% FPC +gsave +[ /Rect [ 14 0 68 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=FPC) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 68 36 moveto +14 36 lineto +14 1.06581e-14 lineto +68 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 68 36 moveto +14 36 lineto +14 1.06581e-14 lineto +68 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +28.5 13.9 moveto 25 (FPC) alignedtext +grestore +% IRREDFFX->FPC +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 41 72 moveto +41 64 41 55 41 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 44.5001 46 moveto +41 36 lineto +37.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 44.5001 46 moveto +41 36 lineto +37.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 126 152 +end +restore +%%EOF diff --git a/books/ps/v104linearpolynomialequationbyfractions.ps b/books/ps/v104linearpolynomialequationbyfractions.ps new file mode 100644 index 0000000..5dc8117 --- /dev/null +++ b/books/ps/v104linearpolynomialequationbyfractions.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 +% LPEFRAC +gsave +[ /Rect [ 0 72 76 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=LPEFRAC) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +2.82205e-14 108 lineto +7.17829e-15 72 lineto +76 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +2.82205e-14 108 lineto +7.17829e-15 72 lineto +76 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 61 (LPEFRAC) 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 +% LPEFRAC->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/v104multivariablecalculusfunctions.ps b/books/ps/v104multivariablecalculusfunctions.ps new file mode 100644 index 0000000..fff5d90 --- /dev/null +++ b/books/ps/v104multivariablecalculusfunctions.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 +% MCALCFN +gsave +[ /Rect [ 0 72 84 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=MCALCFN) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 84 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +84 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 84 108 moveto +2.84217e-14 108 lineto +7.10543e-15 72 lineto +84 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +8 85.9 moveto 68 (MCALCFN) alignedtext +grestore +% IVECTOR +gsave +[ /Rect [ 3 0 81 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 81 36 moveto +3 36 lineto +3 1.06581e-14 lineto +81 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 81 36 moveto +3 36 lineto +3 1.06581e-14 lineto +81 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +11 13.9 moveto 62 (IVECTOR) alignedtext +grestore +% MCALCFN->IVECTOR +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/v104nageigenpackage.ps b/books/ps/v104nageigenpackage.ps new file mode 100644 index 0000000..feef799 --- /dev/null +++ b/books/ps/v104nageigenpackage.ps @@ -0,0 +1,301 @@ +%!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 198 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 162 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 +% NAGF02 +gsave +[ /Rect [ 0 72 68 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NAGF02) >> + /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 (NAGF02) alignedtext +grestore +% ALIST +gsave +[ /Rect [ 93 0 147 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 147 36 moveto +93 36 lineto +93 1.06581e-14 lineto +147 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 147 36 moveto +93 36 lineto +93 1.06581e-14 lineto +147 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +100.5 13.9 moveto 39 (ALIST) alignedtext +grestore +% NAGE02 +gsave +0.000 0.000 1.000 nodecolor +newpath 154 108 moveto +86 108 lineto +86 72 lineto +154 72 lineto +closepath fill +1 setlinewidth +filled +0.000 0.000 1.000 nodecolor +newpath 154 108 moveto +86 108 lineto +86 72 lineto +154 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +93.5 85.9 moveto 53 (NAGE02) alignedtext +grestore +% NAGE02->ALIST +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 120 72 moveto +120 64 120 55 120 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 123.5 46 moveto +120 36 lineto +116.5 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 123.5 46 moveto +120 36 lineto +116.5 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 198 152 +end +restore +%%EOF diff --git a/books/ps/v104naglapack.ps b/books/ps/v104naglapack.ps new file mode 100644 index 0000000..2ea01d4 --- /dev/null +++ b/books/ps/v104naglapack.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 +% NAGF07 +gsave +[ /Rect [ 0 72 68 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NAGF07) >> + /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 (NAGF07) alignedtext +grestore +% ALIST +gsave +[ /Rect [ 7 0 61 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 61 36 moveto +7 36 lineto +7 1.06581e-14 lineto +61 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 61 36 moveto +7 36 lineto +7 1.06581e-14 lineto +61 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +14.5 13.9 moveto 39 (ALIST) alignedtext +grestore +% NAGF07->ALIST +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/v104naglinearequationsolvingpackage.ps b/books/ps/v104naglinearequationsolvingpackage.ps new file mode 100644 index 0000000..ca49e8a --- /dev/null +++ b/books/ps/v104naglinearequationsolvingpackage.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 +% NAGF04 +gsave +[ /Rect [ 8 72 76 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NAGF04) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +8 108 lineto +8 72 lineto +76 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +8 108 lineto +8 72 lineto +76 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +15.5 85.9 moveto 53 (NAGF04) 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 +% NAGF04->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/v104naglinksupportpackage.ps b/books/ps/v104naglinksupportpackage.ps new file mode 100644 index 0000000..9c0e8d8 --- /dev/null +++ b/books/ps/v104naglinksupportpackage.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 104 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 68 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 +% NAGSP +gsave +[ /Rect [ 0 72 60 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NAGSP) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +1.45335e-14 108 lineto +5.55112e-16 72 lineto +60 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 60 108 moveto +1.45335e-14 108 lineto +5.55112e-16 72 lineto +60 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +7.5 85.9 moveto 45 (NAGSP) alignedtext +grestore +% ALIST +gsave +[ /Rect [ 3 0 57 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 57 36 moveto +3 36 lineto +3 1.06581e-14 lineto +57 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 57 36 moveto +3 36 lineto +3 1.06581e-14 lineto +57 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +10.5 13.9 moveto 39 (ALIST) alignedtext +grestore +% NAGSP->ALIST +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 30 72 moveto +30 64 30 55 30 46 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 33.5001 46 moveto +30 36 lineto +26.5001 46 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 33.5001 46 moveto +30 36 lineto +26.5001 46 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 104 152 +end +restore +%%EOF diff --git a/books/ps/v104nagmatrixoperationspackage.ps b/books/ps/v104nagmatrixoperationspackage.ps new file mode 100644 index 0000000..79eb1bf --- /dev/null +++ b/books/ps/v104nagmatrixoperationspackage.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 +% NAGF01 +gsave +[ /Rect [ 8 72 76 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NAGF01) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +8 108 lineto +8 72 lineto +76 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 76 108 moveto +8 108 lineto +8 72 lineto +76 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +16 85.9 moveto 52 (NAGF01) 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 +% NAGF01->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/v104newtoninterpolation.ps b/books/ps/v104newtoninterpolation.ps new file mode 100644 index 0000000..d973f8d --- /dev/null +++ b/books/ps/v104newtoninterpolation.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 +% NEWTON +gsave +[ /Rect [ 1 72 79 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=NEWTON) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 79 108 moveto +1 108 lineto +1 72 lineto +79 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 79 108 moveto +1 108 lineto +1 72 lineto +79 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +9 85.9 moveto 62 (NEWTON) alignedtext +grestore +% ALGEBRA +gsave +[ /Rect [ 0 0 80 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 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 (ALGEBRA) alignedtext +grestore +% NEWTON->ALGEBRA +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/v104pushvariables.ps b/books/ps/v104pushvariables.ps new file mode 100644 index 0000000..ac020ed --- /dev/null +++ b/books/ps/v104pushvariables.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 +% PUSHVAR +gsave +[ /Rect [ 0 72 78 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=PUSHVAR) >> + /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 (PUSHVAR) alignedtext +grestore +% PFECAT +gsave +[ /Rect [ 6 0 72 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 72 36 moveto +6 36 lineto +6 1.06581e-14 lineto +72 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 72 36 moveto +6 36 lineto +6 1.06581e-14 lineto +72 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +13.5 13.9 moveto 51 (PFECAT) alignedtext +grestore +% PUSHVAR->PFECAT +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/v104quotientfieldcategoryfunctions2.ps b/books/ps/v104quotientfieldcategoryfunctions2.ps new file mode 100644 index 0000000..861f65f --- /dev/null +++ b/books/ps/v104quotientfieldcategoryfunctions2.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 +% QFCAT2 +gsave +[ /Rect [ 0 72 68 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=QFCAT2) >> + /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 (QFCAT2) 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 +% QFCAT2->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/v104scriptformulaformat1.ps b/books/ps/v104scriptformulaformat1.ps new file mode 100644 index 0000000..d521fe3 --- /dev/null +++ b/books/ps/v104scriptformulaformat1.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 212 152 +%%PageOrientation: Portrait +0 0 1 beginpage +gsave +36 36 176 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 +% FORMULA1 +gsave +[ /Rect [ 40 72 130 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=FORMULA1) >> + /Subtype /Link +/ANN pdfmark +0.939 0.733 1.000 nodecolor +newpath 130 108 moveto +40 108 lineto +40 72 lineto +130 72 lineto +closepath fill +1 setlinewidth +filled +0.939 0.733 1.000 nodecolor +newpath 130 108 moveto +40 108 lineto +40 72 lineto +130 72 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +47.5 85.9 moveto 75 (FORMULA1) alignedtext +grestore +% BASTYPE +gsave +[ /Rect [ 0 0 78 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=BASTYPE) >> + /Subtype /Link +/ANN pdfmark +0.606 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.606 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 (BASTYPE) alignedtext +grestore +% FORMULA1->BASTYPE +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 73 72 moveto +68 64 61 54 55 44 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 58.268 42.625 moveto +50 36 lineto +52.332 46.335 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 58.268 42.625 moveto +50 36 lineto +52.332 46.335 lineto +closepath stroke +grestore +% KOERCE +gsave +[ /Rect [ 96 0 168 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.2.pdf#nameddest=KOERCE) >> + /Subtype /Link +/ANN pdfmark +0.606 0.733 1.000 nodecolor +newpath 168 36 moveto +96 36 lineto +96 1.06581e-14 lineto +168 0 lineto +closepath fill +1 setlinewidth +filled +0.606 0.733 1.000 nodecolor +newpath 168 36 moveto +96 36 lineto +96 1.06581e-14 lineto +168 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +103.5 13.9 moveto 57 (KOERCE) alignedtext +grestore +% FORMULA1->KOERCE +gsave +1 setlinewidth +0.000 0.000 0.000 edgecolor +newpath 97 72 moveto +102 64 109 54 115 44 curveto +stroke +0.000 0.000 0.000 edgecolor +newpath 117.668 46.335 moveto +120 36 lineto +111.732 42.625 lineto +closepath fill +1 setlinewidth +solid +0.000 0.000 0.000 edgecolor +newpath 117.668 46.335 moveto +120 36 lineto +111.732 42.625 lineto +closepath stroke +grestore +endpage +showpage +grestore +%%PageTrailer +%%EndPage: 1 +%%Trailer +%%Pages: 1 +%%BoundingBox: 36 36 212 152 +end +restore +%%EOF diff --git a/books/ps/v104templateutilities.ps b/books/ps/v104templateutilities.ps new file mode 100644 index 0000000..866eba2 --- /dev/null +++ b/books/ps/v104templateutilities.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 +% TEMUTL +gsave +[ /Rect [ 0 72 74 108 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.4.pdf#nameddest=TEMUTL) >> + /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 (TEMUTL) alignedtext +grestore +% STRING +gsave +[ /Rect [ 4 0 70 36 ] + /Border [ 0 0 0 ] + /Action << /Subtype /URI /URI (bookvol10.3.pdf#nameddest=STRING) >> + /Subtype /Link +/ANN pdfmark +0.273 0.733 1.000 nodecolor +newpath 70 36 moveto +4 36 lineto +4 1.06581e-14 lineto +70 0 lineto +closepath fill +1 setlinewidth +filled +0.273 0.733 1.000 nodecolor +newpath 70 36 moveto +4 36 lineto +4 1.06581e-14 lineto +70 0 lineto +closepath stroke +0.000 0.000 0.000 nodecolor +14.00 /Times-Roman set_font +12 13.9 moveto 50 (STRING) alignedtext +grestore +% TEMUTL->STRING +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/changelog b/changelog index bcfdf21..69b9825 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,65 @@ +20090128 tpd src/axiom-website/patches.html 20090128.01.tpd.patch +20090128 tpd src/algebra/Makefile remove spad files +20090128 tpd src/algebra/funcpkgs.spad removed +20090128 tpd books/ps/v104functionspaceunivariatepolynomialfactor.ps added +20090128 tpd src/algebra/fspace.spad removed +20090128 tpd books/ps/v104functionspacefunctions2.ps added +20090128 tpd books/ps/v104expressionspacefunctions2.ps added +20090128 tpd books/ps/v104expressionspacefunctions1.ps added +20090128 tpd src/algebra/fs2ups.spad removed +20090128 tpd books/ps/v104functionspacetounivariatepowerseries.ps added +20090128 tpd src/algebra/fs2expxp.spad removed +20090128 tpd books/ps/v104functionspacetoexponentialexpansion.ps added +20090128 tpd src/algebra/fr.spad removed +20090128 tpd books/ps/v104FactoredFunctions2.ps added +20090128 tpd books/ps/v104factoredfunctionutilities.ps added +20090128 tpd src/algebra/fraction.spad removed +20090128 tpd books/ps/v104fractionfunctions2.ps added +20090128 tpd books/ps/v104linearpolynomialequationbyfractions.ps added +20090128 tpd books/ps/v104quotientfieldcategoryfunctions2.ps removed +20090128 tpd src/algebra/fortpak.spad removed +20090128 tpd books/ps/v104multivariablecalculusfunctions.ps added +20090128 tpd books/ps/v104templateutilities.ps added +20090128 tpd books/ps/v104fortranoutputstackpackage.ps added +20090128 tpd books/ps/v104fortranpackage.ps added +20090128 tpd books/ps/v104naglinksupportpackage.ps added +20090128 tpd books/ps/v104fortrancodepackage1.ps added +20090128 tpd src/algebra/formula.spad removed +20090128 tpd books/ps/v104scriptformulaformat1.ps added +20090128 tpd src/algebra/fnla.spad removed +20090128 tpd books/ps/v104hallbasis.ps added +20090128 tpd src/algebra/ffx.spad removed +20090128 tpd books/ps/v104irredpolyoverfinitefield.ps added +20090128 tpd src/algebra/ffpoly.spad removed +20090128 tpd books/ps/v104finitefieldpolynomialpackage.ps added +20090128 tpd src/algebra/ffpoly2.spad removed +20090128 tpd books/ps/v104finitefieldpolynomialpackage2.ps added +20090128 tpd src/algebra/ffnb.spad removed +20090128 tpd books/ps/v104innernormalbasisfieldfunctions.ps added +20090128 tpd ps/v104innernormalbasisfieldfunctions.ps added +20090128 tpd src/algebra/ffhom.spad removed +20090128 tpd books/ps/v104finitefieldhomomorphisms.ps added +20090128 tpd src/algebra/fff.spad removed +20090128 tpd books/ps/v104finitefieldfunctions.ps added +20090128 tpd src/algebra/fffg.spad removed +20090128 tpd books/ps/v104newtoninterpolation.ps added +20090128 tpd books/ps/v104fractionfreefastgaussianfractions.ps added +20090128 tpd books/ps/v104fractionfreefastgaussian.ps added +20090128 tpd books/ps/v104finiteabelianmonoidringfunctions2.ps added +20090128 tpd src/algebra/ffcat.spad removed +20090128 tpd books/ps/v104finitefieldsolvelinearpolynomialequation.ps added +20090128 tpd books/ps/v104discretelogarithmpackage.ps added +20090128 tpd src/algebra/facutil.spad removed +20090128 tpd books/ps/v104pushvariables.ps added +20090128 tpd books/ps/v104factoringutilities.ps added +20080128 tpd src/algebra/f07.spad removed +20090128 tpd books/ps/v104naglapack.ps added +20090128 tpd src/algebra/f04.spad removed +20090128 tpd books/ps/v104naglinearequationsolvingpackage.ps added +20090128 tpd src/algebra/f02.spad removed +20090128 tpd books/ps/v104nageigenpackage.ps added +20090128 tpd src/algebra/f01.spad removed +20090128 tpd books/ps/v104nagmatrixoperationspackage.ps added 20090127 tpd src/axiom-website/patches.html 20090127.01.tpd.patch 20090127 tpd books/bookvol10.4 add packages 20090127 tpd src/algebra/Makefile remove spad files diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index 75ac33c..19de3f1 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -15771,41 +15771,6 @@ We need to figure out which mlift.spad to keep. <>= SPADFILES= \ - ${OUTSRC}/c02.spad ${OUTSRC}/c05.spad ${OUTSRC}/c06.spad \ - ${OUTSRC}/carten.spad \ - ${OUTSRC}/cden.spad ${OUTSRC}/clip.spad \ - ${OUTSRC}/cmplxrt.spad \ - ${OUTSRC}/combfunc.spad ${OUTSRC}/combinat.spad ${OUTSRC}/complet.spad \ - ${OUTSRC}/contfrac.spad ${OUTSRC}/cont.spad \ - ${OUTSRC}/coordsys.spad ${OUTSRC}/cra.spad ${OUTSRC}/crfp.spad \ - ${OUTSRC}/curve.spad ${OUTSRC}/cycles.spad ${OUTSRC}/cyclotom.spad \ - ${OUTSRC}/d01agents.spad ${OUTSRC}/d01package.spad \ - ${OUTSRC}/d01.spad \ - ${OUTSRC}/d01weights.spad ${OUTSRC}/d02agents.spad \ - ${OUTSRC}/d02package.spad ${OUTSRC}/d02.spad \ - ${OUTSRC}/d03agents.spad ${OUTSRC}/d03package.spad \ - ${OUTSRC}/d03.spad ${OUTSRC}/ddfact.spad \ - ${OUTSRC}/defaults.spad ${OUTSRC}/defintef.spad ${OUTSRC}/defintrf.spad \ - ${OUTSRC}/degred.spad \ - ${OUTSRC}/divisor.spad ${OUTSRC}/drawopt.spad \ - ${OUTSRC}/drawpak.spad ${OUTSRC}/draw.spad \ - ${OUTSRC}/e01.spad ${OUTSRC}/e02.spad ${OUTSRC}/e04agents.spad \ - ${OUTSRC}/e04package.spad ${OUTSRC}/e04.spad \ - ${OUTSRC}/efstruc.spad ${OUTSRC}/efuls.spad ${OUTSRC}/efupxs.spad \ - ${OUTSRC}/eigen.spad ${OUTSRC}/elemntry.spad ${OUTSRC}/elfuts.spad \ - ${OUTSRC}/equation2.spad ${OUTSRC}/error.spad \ - ${OUTSRC}/expr2ups.spad \ - ${OUTSRC}/exprode.spad ${OUTSRC}/expr.spad \ - ${OUTSRC}/f01.spad ${OUTSRC}/f02.spad ${OUTSRC}/f04.spad \ - ${OUTSRC}/f07.spad ${OUTSRC}/facutil.spad ${OUTSRC}/ffcat.spad \ - ${OUTSRC}/fff.spad ${OUTSRC}/ffhom.spad \ - ${OUTSRC}/ffnb.spad ${OUTSRC}/ffpoly2.spad ${OUTSRC}/ffpoly.spad \ - ${OUTSRC}/ffx.spad \ - ${OUTSRC}/fnla.spad ${OUTSRC}/formula.spad \ - ${OUTSRC}/fortpak.spad \ - ${OUTSRC}/fraction.spad \ - ${OUTSRC}/fr.spad ${OUTSRC}/fs2expxp.spad ${OUTSRC}/fs2ups.spad \ - ${OUTSRC}/fspace.spad ${OUTSRC}/funcpkgs.spad \ ${OUTSRC}/galfact.spad ${OUTSRC}/galfactu.spad ${OUTSRC}/galpolyu.spad \ ${OUTSRC}/galutil.spad ${OUTSRC}/gaussfac.spad ${OUTSRC}/gaussian.spad \ ${OUTSRC}/gbeuclid.spad ${OUTSRC}/gbintern.spad ${OUTSRC}/gb.spad \ @@ -15914,41 +15879,7 @@ ALDORFILES= \ <>= DOCFILES= \ - ${DOC}/c02.spad.dvi ${DOC}/c05.spad.dvi ${DOC}/c06.spad.dvi \ - ${DOC}/carten.spad.dvi \ - ${DOC}/cden.spad.dvi ${DOC}/clip.spad.dvi \ - ${DOC}/cmplxrt.spad.dvi \ - ${DOC}/combfunc.spad.dvi ${DOC}/combinat.spad.dvi ${DOC}/complet.spad.dvi \ - ${DOC}/contfrac.spad.dvi ${DOC}/cont.spad.dvi \ - ${DOC}/coordsys.spad.dvi ${DOC}/cra.spad.dvi ${DOC}/crfp.spad.dvi \ - ${DOC}/curve.spad.dvi ${DOC}/cycles.spad.dvi ${DOC}/cyclotom.spad.dvi \ - ${DOC}/d01agents.spad.dvi ${DOC}/d01package.spad.dvi \ - ${DOC}/d01.spad.dvi \ - ${DOC}/d01weights.spad.dvi ${DOC}/d02agents.spad.dvi \ - ${DOC}/d02package.spad.dvi ${DOC}/d02.spad.dvi \ - ${DOC}/d03agents.spad.dvi ${DOC}/d03package.spad.dvi \ - ${DOC}/d03.spad.dvi ${DOC}/ddfact.spad.dvi \ - ${DOC}/defaults.spad.dvi ${DOC}/defintef.spad.dvi ${DOC}/defintrf.spad.dvi \ - ${DOC}/degred.spad.dvi \ - ${DOC}/divisor.spad.dvi ${DOC}/drawopt.spad.dvi \ - ${DOC}/drawpak.spad.dvi ${DOC}/draw.spad.dvi \ - ${DOC}/e01.spad.dvi ${DOC}/e02.spad.dvi ${DOC}/e04agents.spad.dvi \ - ${DOC}/e04package.spad.dvi ${DOC}/e04.spad.dvi \ - ${DOC}/efstruc.spad.dvi ${DOC}/efuls.spad.dvi ${DOC}/efupxs.spad.dvi \ - ${DOC}/eigen.spad.dvi ${DOC}/elemntry.spad.dvi ${DOC}/elfuts.spad.dvi \ - ${DOC}/equation2.spad.dvi ${DOC}/error.spad.dvi \ - ${DOC}/exposed.lsp.dvi ${DOC}/expr2ups.spad.dvi \ - ${DOC}/exprode.spad.dvi ${DOC}/expr.spad.dvi \ - ${DOC}/f01.spad.dvi ${DOC}/f02.spad.dvi ${DOC}/f04.spad.dvi \ - ${DOC}/f07.spad.dvi ${DOC}/facutil.spad.dvi ${DOC}/ffcat.spad.dvi \ - ${DOC}/fff.spad.dvi ${DOC}/ffhom.spad.dvi \ - ${DOC}/ffnb.spad.dvi ${DOC}/ffpoly2.spad.dvi ${DOC}/ffpoly.spad.dvi \ - ${DOC}/ffrac.as.dvi ${DOC}/ffx.spad.dvi \ - ${DOC}/fnla.spad.dvi ${DOC}/formula.spad.dvi \ - ${DOC}/fortpak.spad.dvi \ - ${DOC}/fraction.spad.dvi \ - ${DOC}/fr.spad.dvi ${DOC}/fs2expxp.spad.dvi ${DOC}/fs2ups.spad.dvi \ - ${DOC}/fspace.spad.dvi ${DOC}/funcpkgs.spad.dvi \ + ${DOC}/exposed.lsp.dvi \ ${DOC}/galfact.spad.dvi ${DOC}/galfactu.spad.dvi ${DOC}/galpolyu.spad.dvi \ ${DOC}/galutil.spad.dvi ${DOC}/gaussfac.spad.dvi ${DOC}/gaussian.spad.dvi \ ${DOC}/gbeuclid.spad.dvi ${DOC}/gbintern.spad.dvi ${DOC}/gb.spad.dvi \ @@ -16889,13 +16820,13 @@ ${HELP}/ContinuedFraction.help: ${BOOKS}/bookvol10.3.pamphlet @${TANGLE} -R"ContinuedFraction.input" ${BOOKS}/bookvol10.3.pamphlet \ >${INPUT}/ContinuedFraction.input -${HELP}/CycleIndicators.help: ${IN}/cycles.spad.pamphlet +${HELP}/CycleIndicators.help: ${BOOKS}/bookvol10.4.pamphlet @echo 7012 create CycleIndicators.help from \ - ${IN}/cycles.spad.pamphlet - @${TANGLE} -R"CycleIndicators.help" ${IN}/cycles.spad.pamphlet \ + ${BOOKS}/bookvol10.4.pamphlet + @${TANGLE} -R"CycleIndicators.help" ${BOOKS}/bookvol10.4.pamphlet \ >${HELP}/CycleIndicators.help @cp ${HELP}/CycleIndicators.help ${HELP}/CYCLES.help - @${TANGLE} -R"CycleIndicators.input" ${IN}/cycles.spad.pamphlet \ + @${TANGLE} -R"CycleIndicators.input" ${BOOKS}/bookvol10.4.pamphlet \ >${INPUT}/CycleIndicators.input ${HELP}/DeRhamComplex.help: ${BOOKS}/bookvol10.3.pamphlet @@ -16967,12 +16898,13 @@ ${HELP}/Factored.help: ${BOOKS}/bookvol10.3.pamphlet @${TANGLE} -R"Factored.input" ${BOOKS}/bookvol10.3.pamphlet \ >${INPUT}/Factored.input -${HELP}/FactoredFunctions2.help: ${IN}/fr.spad.pamphlet - @echo 7020 create FactoredFunctions2.help from ${IN}/fr.spad.pamphlet - @${TANGLE} -R"FactoredFunctions2.help" ${IN}/fr.spad.pamphlet \ +${HELP}/FactoredFunctions2.help: ${BOOKS}/bookvol10.4.pamphlet + @echo 7020 create FactoredFunctions2.help from \ + ${BOOKS}/bookvol10.4.pamphlet + @${TANGLE} -R"FactoredFunctions2.help" ${BOOKS}/bookvol10.4.pamphlet \ >${HELP}/FactoredFunctions2.help @cp ${HELP}/FactoredFunctions2.help ${HELP}/FR2.help - @${TANGLE} -R"FactoredFunctions2.input" ${IN}/fr.spad.pamphlet \ + @${TANGLE} -R"FactoredFunctions2.input" ${BOOKS}/bookvol10.4.pamphlet \ >${INPUT}/FactoredFunctions2.input ${HELP}/File.help: ${BOOKS}/bookvol10.3.pamphlet diff --git a/src/algebra/f01.spad.pamphlet b/src/algebra/f01.spad.pamphlet deleted file mode 100644 index 2799673..0000000 --- a/src/algebra/f01.spad.pamphlet +++ /dev/null @@ -1,343 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra f01.spad} -\author{Godfrey Nolan, Mike Dewar} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NAGF01 NagMatrixOperationsPackage} -<>= -)abbrev package NAGF01 NagMatrixOperationsPackage -++ Author: Godfrey Nolan and Mike Dewar -++ Date Created: Jan 1994 -++ Date Last Updated: Thu May 12 17:45:15 1994 -++ Description: -++ This package uses the NAG Library to provide facilities for matrix -++ factorizations and associated transformations. -++ See \downlink{Manual Page}{manpageXXf01}. -NagMatrixOperationsPackage(): Exports == Implementation where - S ==> Symbol - FOP ==> FortranOutputStackPackage - - Exports ==> with - f01brf : (Integer,Integer,Integer,Integer,_ - DoubleFloat,Boolean,Boolean,List Boolean,Matrix DoubleFloat,Matrix Integer,Matrix Integer,Integer) -> Result - ++ f01brf(n,nz,licn,lirn,pivot,lblock,grow,abort,a,irn,icn,ifail) - ++ factorizes a real sparse matrix. The routine either forms - ++ the LU factorization of a permutation of the entire matrix, or, - ++ optionally, first permutes the matrix to block lower triangular - ++ form and then only factorizes the diagonal blocks. - ++ See \downlink{Manual Page}{manpageXXf01brf}. - f01bsf : (Integer,Integer,Integer,Matrix Integer,_ - Matrix Integer,Matrix Integer,Matrix Integer,Boolean,DoubleFloat,Boolean,Matrix Integer,Matrix DoubleFloat,Integer) -> Result - ++ f01bsf(n,nz,licn,ivect,jvect,icn,ikeep,grow,eta,abort,idisp,avals,ifail) - ++ factorizes a real sparse matrix using the pivotal sequence - ++ previously obtained by F01BRF when a matrix of the same sparsity - ++ pattern was factorized. - ++ See \downlink{Manual Page}{manpageXXf01bsf}. - f01maf : (Integer,Integer,Integer,Integer,_ - List Boolean,Matrix DoubleFloat,Matrix Integer,Matrix Integer,DoubleFloat,DoubleFloat,Integer) -> Result - ++ f01maf(n,nz,licn,lirn,abort,avals,irn,icn,droptl,densw,ifail) - ++ computes an incomplete Cholesky factorization of a real - ++ sparse symmetric positive-definite matrix A. - ++ See \downlink{Manual Page}{manpageXXf01maf}. - f01mcf : (Integer,Matrix DoubleFloat,Integer,Matrix Integer,_ - Integer) -> Result - ++ f01mcf(n,avals,lal,nrow,ifail) - ++ computes the Cholesky factorization of a real symmetric - ++ positive-definite variable-bandwidth matrix. - ++ See \downlink{Manual Page}{manpageXXf01mcf}. - f01qcf : (Integer,Integer,Integer,Matrix DoubleFloat,_ - Integer) -> Result - ++ f01qcf(m,n,lda,a,ifail) - ++ finds the QR factorization of the real m by n matrix A, - ++ where m>=n. - ++ See \downlink{Manual Page}{manpageXXf01qcf}. - f01qdf : (String,String,Integer,Integer,_ - Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer,Integer,Matrix DoubleFloat,Integer) -> Result - ++ f01qdf(trans,wheret,m,n,a,lda,zeta,ncolb,ldb,b,ifail) - ++ performs one of the transformations - ++ See \downlink{Manual Page}{manpageXXf01qdf}. - f01qef : (String,Integer,Integer,Integer,_ - Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result - ++ f01qef(wheret,m,n,ncolq,lda,zeta,a,ifail) - ++ returns the first ncolq columns of the real m by m - ++ orthogonal matrix Q, where Q is given as the product of - ++ Householder transformation matrices. - ++ See \downlink{Manual Page}{manpageXXf01qef}. - f01rcf : (Integer,Integer,Integer,Matrix Complex DoubleFloat,_ - Integer) -> Result - ++ f01rcf(m,n,lda,a,ifail) - ++ finds the QR factorization of the complex m by n matrix A, - ++ where m>=n. - ++ See \downlink{Manual Page}{manpageXXf01rcf}. - f01rdf : (String,String,Integer,Integer,_ - Matrix Complex DoubleFloat,Integer,Matrix Complex DoubleFloat,Integer,Integer,Matrix Complex DoubleFloat,Integer) -> Result - ++ f01rdf(trans,wheret,m,n,a,lda,theta,ncolb,ldb,b,ifail) - ++ performs one of the transformations - ++ See \downlink{Manual Page}{manpageXXf01rdf}. - f01ref : (String,Integer,Integer,Integer,_ - Integer,Matrix Complex DoubleFloat,Matrix Complex DoubleFloat,Integer) -> Result - ++ f01ref(wheret,m,n,ncolq,lda,theta,a,ifail) - ++ returns the first ncolq columns of the complex m by m - ++ unitary matrix Q, where Q is given as the product of Householder - ++ transformation matrices. - ++ See \downlink{Manual Page}{manpageXXf01ref}. - Implementation ==> add - - import Lisp - import DoubleFloat - import Any - import Record - import Integer - import Matrix DoubleFloat - import Boolean - import NAGLinkSupportPackage - import AnyFunctions1(Integer) - import AnyFunctions1(DoubleFloat) - import AnyFunctions1(Boolean) - import AnyFunctions1(String) - import AnyFunctions1(List Boolean) - import AnyFunctions1(Matrix DoubleFloat) - import AnyFunctions1(Matrix Complex DoubleFloat) - import AnyFunctions1(Matrix Integer) - - - f01brf(nArg:Integer,nzArg:Integer,licnArg:Integer,_ - lirnArg:Integer,pivotArg:DoubleFloat,lblockArg:Boolean,_ - growArg:Boolean,abortArg:List Boolean,aArg:Matrix DoubleFloat,_ - irnArg:Matrix Integer,icnArg:Matrix Integer,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01brf",_ - ["n"::S,"nz"::S,"licn"::S,"lirn"::S,"pivot"::S_ - ,"lblock"::S,"grow"::S,"ifail"::S,"abort"::S,"ikeep"::S,"w"::S,"idisp"::S,"a"::S_ - ,"irn"::S,"icn"::S,"iw"::S]$Lisp,_ - ["ikeep"::S,"w"::S,"idisp"::S,"iw"::S]$Lisp,_ - [["double"::S,"pivot"::S,["w"::S,"n"::S]$Lisp_ - ,["a"::S,"licn"::S]$Lisp]$Lisp_ - ,["integer"::S,"n"::S,"nz"::S,"licn"::S,"lirn"::S_ - ,["ikeep"::S,["*"::S,5$Lisp,"n"::S]$Lisp]$Lisp,["idisp"::S,10$Lisp]$Lisp,["irn"::S,"lirn"::S]$Lisp,["icn"::S,"licn"::S]$Lisp_ - ,"ifail"::S,["iw"::S,["*"::S,8$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_ - ,["logical"::S,"lblock"::S,"grow"::S,["abort"::S,4$Lisp]$Lisp]$Lisp_ - ]$Lisp,_ - ["ikeep"::S,"w"::S,"idisp"::S,"a"::S,"irn"::S,"icn"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,nzArg::Any,licnArg::Any,lirnArg::Any,pivotArg::Any,lblockArg::Any,growArg::Any,ifailArg::Any,abortArg::Any,aArg::Any,irnArg::Any,icnArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f01bsf(nArg:Integer,nzArg:Integer,licnArg:Integer,_ - ivectArg:Matrix Integer,jvectArg:Matrix Integer,icnArg:Matrix Integer,_ - ikeepArg:Matrix Integer,growArg:Boolean,etaArg:DoubleFloat,_ - abortArg:Boolean,idispArg:Matrix Integer,avalsArg:Matrix DoubleFloat,_ - ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01bsf",_ - ["n"::S,"nz"::S,"licn"::S,"grow"::S,"eta"::S_ - ,"abort"::S,"rpmin"::S,"ifail"::S,"ivect"::S,"jvect"::S,"icn"::S,"ikeep"::S,"idisp"::S_ - ,"w"::S,"avals"::S,"iw"::S]$Lisp,_ - ["w"::S,"rpmin"::S,"iw"::S]$Lisp,_ - [["double"::S,"eta"::S,["w"::S,"n"::S]$Lisp_ - ,"rpmin"::S,["avals"::S,"licn"::S]$Lisp]$Lisp_ - ,["integer"::S,"n"::S,"nz"::S,"licn"::S,["ivect"::S,"nz"::S]$Lisp_ - ,["jvect"::S,"nz"::S]$Lisp,["icn"::S,"licn"::S]$Lisp,["ikeep"::S,["*"::S,5$Lisp,"n"::S]$Lisp]$Lisp_ - ,["idisp"::S,2$Lisp]$Lisp,"ifail"::S,["iw"::S,["*"::S,8$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_ - ,["logical"::S,"grow"::S,"abort"::S]$Lisp_ - ]$Lisp,_ - ["w"::S,"rpmin"::S,"avals"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,nzArg::Any,licnArg::Any,growArg::Any,etaArg::Any,abortArg::Any,ifailArg::Any,ivectArg::Any,jvectArg::Any,icnArg::Any,ikeepArg::Any,idispArg::Any,avalsArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f01maf(nArg:Integer,nzArg:Integer,licnArg:Integer,_ - lirnArg:Integer,abortArg:List Boolean,avalsArg:Matrix DoubleFloat,_ - irnArg:Matrix Integer,icnArg:Matrix Integer,droptlArg:DoubleFloat,_ - denswArg:DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01maf",_ - ["n"::S,"nz"::S,"licn"::S,"lirn"::S,"droptl"::S_ - ,"densw"::S,"ifail"::S,"abort"::S,"wkeep"::S,"ikeep"::S,"inform"::S,"avals"::S_ - ,"irn"::S,"icn"::S,"iwork"::S]$Lisp,_ - ["wkeep"::S,"ikeep"::S,"inform"::S,"iwork"::S]$Lisp,_ - [["double"::S,["wkeep"::S,["*"::S,3$Lisp,"n"::S]$Lisp]$Lisp_ - ,["avals"::S,"licn"::S]$Lisp,"droptl"::S,"densw"::S]$Lisp_ - ,["integer"::S,"n"::S,"nz"::S,"licn"::S,"lirn"::S_ - ,["ikeep"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp,["inform"::S,4$Lisp]$Lisp,["irn"::S,"lirn"::S]$Lisp,["icn"::S,"licn"::S]$Lisp_ - ,"ifail"::S,["iwork"::S,["*"::S,6$Lisp,"n"::S]$Lisp]$Lisp]$Lisp_ - ,["logical"::S,["abort"::S,3$Lisp]$Lisp]$Lisp_ - ]$Lisp,_ - ["wkeep"::S,"ikeep"::S,"inform"::S,"avals"::S,"irn"::S,"icn"::S,"droptl"::S,"densw"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,nzArg::Any,licnArg::Any,lirnArg::Any,droptlArg::Any,denswArg::Any,ifailArg::Any,abortArg::Any,avalsArg::Any,irnArg::Any,icnArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f01mcf(nArg:Integer,avalsArg:Matrix DoubleFloat,lalArg:Integer,_ - nrowArg:Matrix Integer,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01mcf",_ - ["n"::S,"lal"::S,"ifail"::S,"avals"::S,"nrow"::S,"al"::S,"d"::S]$Lisp,_ - ["al"::S,"d"::S]$Lisp,_ - [["double"::S,["avals"::S,"lal"::S]$Lisp,["al"::S,"lal"::S]$Lisp_ - ,["d"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"n"::S,"lal"::S,["nrow"::S,"n"::S]$Lisp_ - ,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["al"::S,"d"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,lalArg::Any,ifailArg::Any,avalsArg::Any,nrowArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f01qcf(mArg:Integer,nArg:Integer,ldaArg:Integer,_ - aArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01qcf",_ - ["m"::S,"n"::S,"lda"::S,"ifail"::S,"zeta"::S,"a"::S]$Lisp,_ - ["zeta"::S]$Lisp,_ - [["double"::S,["zeta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp_ - ]$Lisp_ - ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ifail"::S_ - ]$Lisp_ - ]$Lisp,_ - ["zeta"::S,"a"::S,"ifail"::S]$Lisp,_ - [([mArg::Any,nArg::Any,ldaArg::Any,ifailArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f01qdf(transArg:String,wheretArg:String,mArg:Integer,_ - nArg:Integer,aArg:Matrix DoubleFloat,ldaArg:Integer,_ - zetaArg:Matrix DoubleFloat,ncolbArg:Integer,ldbArg:Integer,_ - bArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01qdf",_ - ["trans"::S,"wheret"::S,"m"::S,"n"::S,"lda"::S_ - ,"ncolb"::S,"ldb"::S,"ifail"::S,"a"::S,"zeta"::S,"b"::S,"work"::S]$Lisp,_ - ["work"::S]$Lisp,_ - [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ - ,["zeta"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp,["work"::S,"ncolb"::S]$Lisp]$Lisp_ - ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_ - ,"ldb"::S,"ifail"::S]$Lisp_ - ,["character"::S,"trans"::S,"wheret"::S]$Lisp_ - ]$Lisp,_ - ["b"::S,"ifail"::S]$Lisp,_ - [([transArg::Any,wheretArg::Any,mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,ifailArg::Any,aArg::Any,zetaArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f01qef(wheretArg:String,mArg:Integer,nArg:Integer,_ - ncolqArg:Integer,ldaArg:Integer,zetaArg:Matrix DoubleFloat,_ - aArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01qef",_ - ["wheret"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_ - ,"ifail"::S,"zeta"::S,"a"::S,"work"::S]$Lisp,_ - ["work"::S]$Lisp,_ - [["double"::S,["zeta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"ncolq"::S]$Lisp_ - ,["work"::S,"ncolq"::S]$Lisp]$Lisp_ - ,["integer"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_ - ,"ifail"::S]$Lisp_ - ,["character"::S,"wheret"::S]$Lisp_ - ]$Lisp,_ - ["a"::S,"ifail"::S]$Lisp,_ - [([wheretArg::Any,mArg::Any,nArg::Any,ncolqArg::Any,ldaArg::Any,ifailArg::Any,zetaArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f01rcf(mArg:Integer,nArg:Integer,ldaArg:Integer,_ - aArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01rcf",_ - ["m"::S,"n"::S,"lda"::S,"ifail"::S,"theta"::S,"a"::S]$Lisp,_ - ["theta"::S]$Lisp,_ - [["integer"::S,"m"::S,"n"::S,"lda"::S,"ifail"::S_ - ]$Lisp_ - ,["double complex"::S,["theta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["theta"::S,"a"::S,"ifail"::S]$Lisp,_ - [([mArg::Any,nArg::Any,ldaArg::Any,ifailArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f01rdf(transArg:String,wheretArg:String,mArg:Integer,_ - nArg:Integer,aArg:Matrix Complex DoubleFloat,ldaArg:Integer,_ - thetaArg:Matrix Complex DoubleFloat,ncolbArg:Integer,ldbArg:Integer,_ - bArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01rdf",_ - ["trans"::S,"wheret"::S,"m"::S,"n"::S,"lda"::S_ - ,"ncolb"::S,"ldb"::S,"ifail"::S,"a"::S,"theta"::S,"b"::S,"work"::S]$Lisp,_ - ["work"::S]$Lisp,_ - [["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_ - ,"ldb"::S,"ifail"::S]$Lisp_ - ,["character"::S,"trans"::S,"wheret"::S]$Lisp_ - ,["double complex"::S,["a"::S,"lda"::S,"n"::S]$Lisp,["theta"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp,["work"::S,"ncolb"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["b"::S,"ifail"::S]$Lisp,_ - [([transArg::Any,wheretArg::Any,mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,ifailArg::Any,aArg::Any,thetaArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f01ref(wheretArg:String,mArg:Integer,nArg:Integer,_ - ncolqArg:Integer,ldaArg:Integer,thetaArg:Matrix Complex DoubleFloat,_ - aArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f01ref",_ - ["wheret"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_ - ,"ifail"::S,"theta"::S,"a"::S,"work"::S]$Lisp,_ - ["work"::S]$Lisp,_ - [["integer"::S,"m"::S,"n"::S,"ncolq"::S,"lda"::S_ - ,"ifail"::S]$Lisp_ - ,["character"::S,"wheret"::S]$Lisp_ - ,["double complex"::S,["theta"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp,["work"::S,"ncolq"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["a"::S,"ifail"::S]$Lisp,_ - [([wheretArg::Any,mArg::Any,nArg::Any,ncolqArg::Any,ldaArg::Any,ifailArg::Any,thetaArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - -@ -\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/f02.spad.pamphlet b/src/algebra/f02.spad.pamphlet deleted file mode 100644 index 36c0a08..0000000 --- a/src/algebra/f02.spad.pamphlet +++ /dev/null @@ -1,565 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra f02.spad} -\author{Godfrey Nolan, Mike Dewar} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NAGF02 NagEigenPackage} -<>= -)abbrev package NAGF02 NagEigenPackage -++ Author: Godfrey Nolan and Mike Dewar -++ Date Created: Jan 1994 -++ Date Last Updated: Thu May 12 17:45:20 1994 -++ Description: -++ This package uses the NAG Library to compute -++ \begin{items} -++ \item eigenvalues and eigenvectors of a matrix -++ \item eigenvalues and eigenvectors of generalized matrix -++ eigenvalue problems -++ \item singular values and singular vectors of a matrix. -++ \end{items} -++ See \downlink{Manual Page}{manpageXXf02}. - -NagEigenPackage(): Exports == Implementation where - S ==> Symbol - FOP ==> FortranOutputStackPackage - - Exports ==> with - f02aaf : (Integer,Integer,Matrix DoubleFloat,Integer) -> Result - ++ f02aaf(ia,n,a,ifail) - ++ calculates all the eigenvalue. - ++ See \downlink{Manual Page}{manpageXXf02aaf}. - f02abf : (Matrix DoubleFloat,Integer,Integer,Integer,_ - Integer) -> Result - ++ f02abf(a,ia,n,iv,ifail) - ++ calculates all the eigenvalues of a real - ++ symmetric matrix. - ++ See \downlink{Manual Page}{manpageXXf02abf}. - f02adf : (Integer,Integer,Integer,Matrix DoubleFloat,_ - Matrix DoubleFloat,Integer) -> Result - ++ f02adf(ia,ib,n,a,b,ifail) - ++ calculates all the eigenvalues of Ax=(lambda)Bx, where A - ++ is a real symmetric matrix and B is a real symmetric positive- - ++ definite matrix. - ++ See \downlink{Manual Page}{manpageXXf02adf}. - f02aef : (Integer,Integer,Integer,Integer,_ - Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result - ++ f02aef(ia,ib,n,iv,a,b,ifail) - ++ calculates all the eigenvalues of - ++ Ax=(lambda)Bx, where A is a real symmetric matrix and B is a - ++ real symmetric positive-definite matrix. - ++ See \downlink{Manual Page}{manpageXXf02aef}. - f02aff : (Integer,Integer,Matrix DoubleFloat,Integer) -> Result - ++ f02aff(ia,n,a,ifail) - ++ calculates all the eigenvalues of a real unsymmetric - ++ matrix. - ++ See \downlink{Manual Page}{manpageXXf02aff}. - f02agf : (Integer,Integer,Integer,Integer,_ - Matrix DoubleFloat,Integer) -> Result - ++ f02agf(ia,n,ivr,ivi,a,ifail) - ++ calculates all the eigenvalues of a real - ++ unsymmetric matrix. - ++ See \downlink{Manual Page}{manpageXXf02agf}. - f02ajf : (Integer,Integer,Integer,Matrix DoubleFloat,_ - Matrix DoubleFloat,Integer) -> Result - ++ f02ajf(iar,iai,n,ar,ai,ifail) - ++ calculates all the eigenvalue. - ++ See \downlink{Manual Page}{manpageXXf02ajf}. - f02akf : (Integer,Integer,Integer,Integer,_ - Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result - ++ f02akf(iar,iai,n,ivr,ivi,ar,ai,ifail) - ++ calculates all the eigenvalues of a - ++ complex matrix. - ++ See \downlink{Manual Page}{manpageXXf02akf}. - f02awf : (Integer,Integer,Integer,Matrix DoubleFloat,_ - Matrix DoubleFloat,Integer) -> Result - ++ f02awf(iar,iai,n,ar,ai,ifail) - ++ calculates all the eigenvalues of a complex Hermitian - ++ matrix. - ++ See \downlink{Manual Page}{manpageXXf02awf}. - f02axf : (Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer,_ - Integer,Integer,Integer,Integer) -> Result - ++ f02axf(ar,iar,ai,iai,n,ivr,ivi,ifail) - ++ calculates all the eigenvalues of a - ++ complex Hermitian matrix. - ++ See \downlink{Manual Page}{manpageXXf02axf}. - f02bbf : (Integer,Integer,DoubleFloat,DoubleFloat,_ - Integer,Integer,Matrix DoubleFloat,Integer) -> Result - ++ f02bbf(ia,n,alb,ub,m,iv,a,ifail) - ++ calculates selected eigenvalues of a real - ++ symmetric matrix by reduction to tridiagonal form, bisection and - ++ inverse iteration, where the selected eigenvalues lie within a - ++ given interval. - ++ See \downlink{Manual Page}{manpageXXf02bbf}. - f02bjf : (Integer,Integer,Integer,DoubleFloat,_ - Boolean,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result - ++ f02bjf(n,ia,ib,eps1,matv,iv,a,b,ifail) - ++ calculates all the eigenvalues and, if required, all the - ++ eigenvectors of the generalized eigenproblem Ax=(lambda)Bx - ++ where A and B are real, square matrices, using the QZ algorithm. - ++ See \downlink{Manual Page}{manpageXXf02bjf}. - f02fjf : (Integer,Integer,DoubleFloat,Integer,_ - Integer,Integer,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp27(DOT)),Union(fn:FileName,fp:Asp28(IMAGE))) -> Result - ++ f02fjf(n,k,tol,novecs,nrx,lwork,lrwork,liwork,m,noits,x,ifail,dot,image) - ++ finds eigenvalues of a real sparse symmetric - ++ or generalized symmetric eigenvalue problem. - ++ See \downlink{Manual Page}{manpageXXf02fjf}. - f02fjf : (Integer,Integer,DoubleFloat,Integer,_ - Integer,Integer,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp27(DOT)),Union(fn:FileName,fp:Asp28(IMAGE)),FileName) -> Result - ++ f02fjf(n,k,tol,novecs,nrx,lwork,lrwork,liwork,m,noits,x,ifail,dot,image,monit) - ++ finds eigenvalues of a real sparse symmetric - ++ or generalized symmetric eigenvalue problem. - ++ See \downlink{Manual Page}{manpageXXf02fjf}. - f02wef : (Integer,Integer,Integer,Integer,_ - Integer,Boolean,Integer,Boolean,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result - ++ f02wef(m,n,lda,ncolb,ldb,wantq,ldq,wantp,ldpt,a,b,ifail) - ++ returns all, or part, of the singular value decomposition - ++ of a general real matrix. - ++ See \downlink{Manual Page}{manpageXXf02wef}. - f02xef : (Integer,Integer,Integer,Integer,_ - Integer,Boolean,Integer,Boolean,Integer,Matrix Complex DoubleFloat,Matrix Complex DoubleFloat,Integer) -> Result - ++ f02xef(m,n,lda,ncolb,ldb,wantq,ldq,wantp,ldph,a,b,ifail) - ++ returns all, or part, of the singular value decomposition - ++ of a general complex matrix. - ++ See \downlink{Manual Page}{manpageXXf02xef}. - Implementation ==> add - - import Lisp - import DoubleFloat - import Any - import Record - import Integer - import Matrix DoubleFloat - import Boolean - import NAGLinkSupportPackage - import FortranPackage - import AnyFunctions1(Integer) - import AnyFunctions1(Boolean) - import AnyFunctions1(Matrix DoubleFloat) - import AnyFunctions1(Matrix Complex DoubleFloat) - import AnyFunctions1(DoubleFloat) - - - f02aaf(iaArg:Integer,nArg:Integer,aArg:Matrix DoubleFloat,_ - ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02aaf",_ - ["ia"::S,"n"::S,"ifail"::S,"r"::S,"a"::S,"e"::S]$Lisp,_ - ["r"::S,"e"::S]$Lisp,_ - [["double"::S,["r"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp_ - ,["e"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"ia"::S,"n"::S,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["r"::S,"a"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,nArg::Any,ifailArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02abf(aArg:Matrix DoubleFloat,iaArg:Integer,nArg:Integer,_ - ivArg:Integer,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02abf",_ - ["ia"::S,"n"::S,"iv"::S,"ifail"::S,"a"::S,"r"::S,"v"::S,"e"::S]$Lisp,_ - ["r"::S,"v"::S,"e"::S]$Lisp,_ - [["double"::S,["a"::S,"ia"::S,"n"::S]$Lisp_ - ,["r"::S,"n"::S]$Lisp,["v"::S,"iv"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"ia"::S,"n"::S,"iv"::S,"ifail"::S_ - ]$Lisp_ - ]$Lisp,_ - ["r"::S,"v"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,nArg::Any,ivArg::Any,ifailArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02adf(iaArg:Integer,ibArg:Integer,nArg:Integer,_ - aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02adf",_ - ["ia"::S,"ib"::S,"n"::S,"ifail"::S,"r"::S,"a"::S,"b"::S,"de"::S]$Lisp,_ - ["r"::S,"de"::S]$Lisp,_ - [["double"::S,["r"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp_ - ,["b"::S,"ib"::S,"n"::S]$Lisp,["de"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"ia"::S,"ib"::S,"n"::S,"ifail"::S_ - ]$Lisp_ - ]$Lisp,_ - ["r"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,ibArg::Any,nArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02aef(iaArg:Integer,ibArg:Integer,nArg:Integer,_ - ivArg:Integer,aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,_ - ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02aef",_ - ["ia"::S,"ib"::S,"n"::S,"iv"::S,"ifail"::S_ - ,"r"::S,"v"::S,"a"::S,"b"::S,"dl"::S_ - ,"e"::S]$Lisp,_ - ["r"::S,"v"::S,"dl"::S,"e"::S]$Lisp,_ - [["double"::S,["r"::S,"n"::S]$Lisp,["v"::S,"iv"::S,"n"::S]$Lisp_ - ,["a"::S,"ia"::S,"n"::S]$Lisp,["b"::S,"ib"::S,"n"::S]$Lisp,["dl"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp_ - ]$Lisp_ - ,["integer"::S,"ia"::S,"ib"::S,"n"::S,"iv"::S_ - ,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["r"::S,"v"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,ibArg::Any,nArg::Any,ivArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02aff(iaArg:Integer,nArg:Integer,aArg:Matrix DoubleFloat,_ - ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02aff",_ - ["ia"::S,"n"::S,"ifail"::S,"rr"::S,"ri"::S,"intger"::S,"a"::S]$Lisp,_ - ["rr"::S,"ri"::S,"intger"::S]$Lisp,_ - [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_ - ,["a"::S,"ia"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"ia"::S,"n"::S,["intger"::S,"n"::S]$Lisp_ - ,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["rr"::S,"ri"::S,"intger"::S,"a"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,nArg::Any,ifailArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02agf(iaArg:Integer,nArg:Integer,ivrArg:Integer,_ - iviArg:Integer,aArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02agf",_ - ["ia"::S,"n"::S,"ivr"::S,"ivi"::S,"ifail"::S_ - ,"rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S_ - ,"a"::S]$Lisp,_ - ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S]$Lisp,_ - [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_ - ,["vr"::S,"ivr"::S,"n"::S]$Lisp,["vi"::S,"ivi"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"ia"::S,"n"::S,"ivr"::S,"ivi"::S_ - ,["intger"::S,"n"::S]$Lisp,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S,"a"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,nArg::Any,ivrArg::Any,iviArg::Any,ifailArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02ajf(iarArg:Integer,iaiArg:Integer,nArg:Integer,_ - arArg:Matrix DoubleFloat,aiArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02ajf",_ - ["iar"::S,"iai"::S,"n"::S,"ifail"::S,"rr"::S,"ri"::S,"ar"::S,"ai"::S,"intger"::S_ - ]$Lisp,_ - ["rr"::S,"ri"::S,"intger"::S]$Lisp,_ - [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_ - ,["ar"::S,"iar"::S,"n"::S]$Lisp,["ai"::S,"iai"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ifail"::S_ - ,["intger"::S,"n"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["rr"::S,"ri"::S,"ar"::S,"ai"::S,"ifail"::S]$Lisp,_ - [([iarArg::Any,iaiArg::Any,nArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02akf(iarArg:Integer,iaiArg:Integer,nArg:Integer,_ - ivrArg:Integer,iviArg:Integer,arArg:Matrix DoubleFloat,_ - aiArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02akf",_ - ["iar"::S,"iai"::S,"n"::S,"ivr"::S,"ivi"::S_ - ,"ifail"::S,"rr"::S,"ri"::S,"vr"::S,"vi"::S,"ar"::S_ - ,"ai"::S,"intger"::S]$Lisp,_ - ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"intger"::S]$Lisp,_ - [["double"::S,["rr"::S,"n"::S]$Lisp,["ri"::S,"n"::S]$Lisp_ - ,["vr"::S,"ivr"::S,"n"::S]$Lisp,["vi"::S,"ivi"::S,"n"::S]$Lisp,["ar"::S,"iar"::S,"n"::S]$Lisp,["ai"::S,"iai"::S,"n"::S]$Lisp_ - ]$Lisp_ - ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ivr"::S_ - ,"ivi"::S,"ifail"::S,["intger"::S,"n"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["rr"::S,"ri"::S,"vr"::S,"vi"::S,"ar"::S,"ai"::S,"ifail"::S]$Lisp,_ - [([iarArg::Any,iaiArg::Any,nArg::Any,ivrArg::Any,iviArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02awf(iarArg:Integer,iaiArg:Integer,nArg:Integer,_ - arArg:Matrix DoubleFloat,aiArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02awf",_ - ["iar"::S,"iai"::S,"n"::S,"ifail"::S,"r"::S,"ar"::S,"ai"::S,"wk1"::S,"wk2"::S_ - ,"wk3"::S]$Lisp,_ - ["r"::S,"wk1"::S,"wk2"::S,"wk3"::S]$Lisp,_ - [["double"::S,["r"::S,"n"::S]$Lisp,["ar"::S,"iar"::S,"n"::S]$Lisp_ - ,["ai"::S,"iai"::S,"n"::S]$Lisp,["wk1"::S,"n"::S]$Lisp,["wk2"::S,"n"::S]$Lisp,["wk3"::S,"n"::S]$Lisp_ - ]$Lisp_ - ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ifail"::S_ - ]$Lisp_ - ]$Lisp,_ - ["r"::S,"ar"::S,"ai"::S,"ifail"::S]$Lisp,_ - [([iarArg::Any,iaiArg::Any,nArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02axf(arArg:Matrix DoubleFloat,iarArg:Integer,aiArg:Matrix DoubleFloat,_ - iaiArg:Integer,nArg:Integer,ivrArg:Integer,_ - iviArg:Integer,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02axf",_ - ["iar"::S,"iai"::S,"n"::S,"ivr"::S,"ivi"::S_ - ,"ifail"::S,"ar"::S,"ai"::S,"r"::S,"vr"::S,"vi"::S_ - ,"wk1"::S,"wk2"::S,"wk3"::S]$Lisp,_ - ["r"::S,"vr"::S,"vi"::S,"wk1"::S,"wk2"::S,"wk3"::S]$Lisp,_ - [["double"::S,["ar"::S,"iar"::S,"n"::S]$Lisp_ - ,["ai"::S,"iai"::S,"n"::S]$Lisp,["r"::S,"n"::S]$Lisp,["vr"::S,"ivr"::S,"n"::S]$Lisp,["vi"::S,"ivi"::S,"n"::S]$Lisp,["wk1"::S,"n"::S]$Lisp_ - ,["wk2"::S,"n"::S]$Lisp,["wk3"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"iar"::S,"iai"::S,"n"::S,"ivr"::S_ - ,"ivi"::S,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["r"::S,"vr"::S,"vi"::S,"ifail"::S]$Lisp,_ - [([iarArg::Any,iaiArg::Any,nArg::Any,ivrArg::Any,iviArg::Any,ifailArg::Any,arArg::Any,aiArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02bbf(iaArg:Integer,nArg:Integer,albArg:DoubleFloat,_ - ubArg:DoubleFloat,mArg:Integer,ivArg:Integer,_ - aArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02bbf",_ - ["ia"::S,"n"::S,"alb"::S,"ub"::S,"m"::S_ - ,"iv"::S,"mm"::S,"ifail"::S,"r"::S,"v"::S,"icount"::S,"a"::S,"d"::S_ - ,"e"::S,"e2"::S,"x"::S,"g"::S,"c"::S_ - ]$Lisp,_ - ["mm"::S,"r"::S,"v"::S,"icount"::S,"d"::S,"e"::S,"e2"::S,"x"::S,"g"::S,"c"::S]$Lisp,_ - [["double"::S,"alb"::S,"ub"::S,["r"::S,"m"::S]$Lisp_ - ,["v"::S,"iv"::S,"m"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp,["d"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp,["e2"::S,"n"::S]$Lisp_ - ,["x"::S,"n"::S,7$Lisp]$Lisp,["g"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"ia"::S,"n"::S,"m"::S,"iv"::S_ - ,"mm"::S,["icount"::S,"m"::S]$Lisp,"ifail"::S]$Lisp_ - ,["logical"::S,["c"::S,"n"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["mm"::S,"r"::S,"v"::S,"icount"::S,"a"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,nArg::Any,albArg::Any,ubArg::Any,mArg::Any,ivArg::Any,ifailArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02bjf(nArg:Integer,iaArg:Integer,ibArg:Integer,_ - eps1Arg:DoubleFloat,matvArg:Boolean,ivArg:Integer,_ - aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f02bjf",_ - ["n"::S,"ia"::S,"ib"::S,"eps1"::S,"matv"::S_ - ,"iv"::S,"ifail"::S,"alfr"::S,"alfi"::S,"beta"::S,"v"::S,"iter"::S_ - ,"a"::S,"b"::S]$Lisp,_ - ["alfr"::S,"alfi"::S,"beta"::S,"v"::S,"iter"::S]$Lisp,_ - [["double"::S,"eps1"::S,["alfr"::S,"n"::S]$Lisp_ - ,["alfi"::S,"n"::S]$Lisp,["beta"::S,"n"::S]$Lisp,["v"::S,"iv"::S,"n"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp,["b"::S,"ib"::S,"n"::S]$Lisp_ - ]$Lisp_ - ,["integer"::S,"n"::S,"ia"::S,"ib"::S,"iv"::S_ - ,["iter"::S,"n"::S]$Lisp,"ifail"::S]$Lisp_ - ,["logical"::S,"matv"::S]$Lisp_ - ]$Lisp,_ - ["alfr"::S,"alfi"::S,"beta"::S,"v"::S,"iter"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,iaArg::Any,ibArg::Any,eps1Arg::Any,matvArg::Any,ivArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02fjf(nArg:Integer,kArg:Integer,tolArg:DoubleFloat,_ - novecsArg:Integer,nrxArg:Integer,lworkArg:Integer,_ - lrworkArg:Integer,liworkArg:Integer,mArg:Integer,_ - noitsArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer,_ - dotArg:Union(fn:FileName,fp:Asp27(DOT)),imageArg:Union(fn:FileName,fp:Asp28(IMAGE))): Result == - pushFortranOutputStack(dotFilename := aspFilename "dot")$FOP - if dotArg case fn - then outputAsFortran(dotArg.fn) - else outputAsFortran(dotArg.fp) - popFortranOutputStack()$FOP - pushFortranOutputStack(imageFilename := aspFilename "image")$FOP - if imageArg case fn - then outputAsFortran(imageArg.fn) - else outputAsFortran(imageArg.fp) - popFortranOutputStack()$FOP - pushFortranOutputStack(monitFilename := aspFilename "monit")$FOP - outputAsFortran()$Asp29(MONIT) - popFortranOutputStack()$FOP - [(invokeNagman([dotFilename,imageFilename,monitFilename]$Lisp,_ - "f02fjf",_ - ["n"::S,"k"::S,"tol"::S,"novecs"::S,"nrx"::S_ - ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S_ - ,"ifail"::S,"dot"::S,"image"::S,"monit"::S,"d"::S,"x"::S,"work"::S,"rwork"::S,"iwork"::S_ - ]$Lisp,_ - ["d"::S,"work"::S,"rwork"::S,"iwork"::S,"dot"::S,"image"::S,"monit"::S]$Lisp,_ - [["double"::S,"tol"::S,["d"::S,"k"::S]$Lisp_ - ,["x"::S,"nrx"::S,"k"::S]$Lisp,["work"::S,"lwork"::S]$Lisp,["rwork"::S,"lrwork"::S]$Lisp,"dot"::S,"image"::S,"monit"::S_ - ]$Lisp_ - ,["integer"::S,"n"::S,"k"::S,"novecs"::S,"nrx"::S_ - ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["d"::S,"m"::S,"noits"::S,"x"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,kArg::Any,tolArg::Any,novecsArg::Any,nrxArg::Any,lworkArg::Any,lrworkArg::Any,liworkArg::Any,mArg::Any,noitsArg::Any,ifailArg::Any,xArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02fjf(nArg:Integer,kArg:Integer,tolArg:DoubleFloat,_ - novecsArg:Integer,nrxArg:Integer,lworkArg:Integer,_ - lrworkArg:Integer,liworkArg:Integer,mArg:Integer,_ - noitsArg:Integer,xArg:Matrix DoubleFloat,ifailArg:Integer,_ - dotArg:Union(fn:FileName,fp:Asp27(DOT)),imageArg:Union(fn:FileName,fp:Asp28(IMAGE)),monitArg:FileName): Result == - pushFortranOutputStack(dotFilename := aspFilename "dot")$FOP - if dotArg case fn - then outputAsFortran(dotArg.fn) - else outputAsFortran(dotArg.fp) - popFortranOutputStack()$FOP - pushFortranOutputStack(imageFilename := aspFilename "image")$FOP - if imageArg case fn - then outputAsFortran(imageArg.fn) - else outputAsFortran(imageArg.fp) - popFortranOutputStack()$FOP - pushFortranOutputStack(monitFilename := aspFilename "monit")$FOP - outputAsFortran(monitArg) - [(invokeNagman([dotFilename,imageFilename,monitFilename]$Lisp,_ - "f02fjf",_ - ["n"::S,"k"::S,"tol"::S,"novecs"::S,"nrx"::S_ - ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S_ - ,"ifail"::S,"dot"::S,"image"::S,"monit"::S,"d"::S,"x"::S,"work"::S,"rwork"::S,"iwork"::S_ - ]$Lisp,_ - ["d"::S,"work"::S,"rwork"::S,"iwork"::S,"dot"::S,"image"::S,"monit"::S]$Lisp,_ - [["double"::S,"tol"::S,["d"::S,"k"::S]$Lisp_ - ,["x"::S,"nrx"::S,"k"::S]$Lisp,["work"::S,"lwork"::S]$Lisp,["rwork"::S,"lrwork"::S]$Lisp,"dot"::S,"image"::S,"monit"::S_ - ]$Lisp_ - ,["integer"::S,"n"::S,"k"::S,"novecs"::S,"nrx"::S_ - ,"lwork"::S,"lrwork"::S,"liwork"::S,"m"::S,"noits"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["d"::S,"m"::S,"noits"::S,"x"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,kArg::Any,tolArg::Any,novecsArg::Any,nrxArg::Any,lworkArg::Any,lrworkArg::Any,liworkArg::Any,mArg::Any,noitsArg::Any,ifailArg::Any,xArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02wef(mArg:Integer,nArg:Integer,ldaArg:Integer,_ - ncolbArg:Integer,ldbArg:Integer,wantqArg:Boolean,_ - ldqArg:Integer,wantpArg:Boolean,ldptArg:Integer,_ - aArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result == - workLength : Integer := - mArg >= nArg => - wantqArg and wantpArg => - max(max(nArg**2 + 5*(nArg - 1),nArg + ncolbArg),4) - wantqArg => - max(max(nArg**2 + 4*(nArg - 1),nArg + ncolbArg),4) - wantpArg => - zero? ncolbArg => max(3*(nArg - 1),2) - max(5*(nArg - 1),2) - zero? ncolbArg => max(2*(nArg - 1),2) - max(3*(nArg - 1),2) - wantqArg and wantpArg => - max(mArg**2 + 5*(mArg - 1),2) - wantqArg => - max(3*(mArg - 1),1) - wantpArg => - zero? ncolbArg => max(mArg**2+3*(mArg - 1),2) - max(mArg**2+5*(mArg - 1),2) - zero? ncolbArg => max(2*(mArg - 1),1) - max(3*(mArg - 1),1) - - [(invokeNagman(NIL$Lisp,_ - "f02wef",_ - ["m"::S,"n"::S,"lda"::S,"ncolb"::S,"ldb"::S_ - ,"wantq"::S,"ldq"::S,"wantp"::S,"ldpt"::S,"ifail"::S_ - ,"q"::S,"sv"::S,"pt"::S,"work"::S,"a"::S_ - ,"b"::S]$Lisp,_ - ["q"::S,"sv"::S,"pt"::S,"work"::S]$Lisp,_ - [["double"::S,["q"::S,"ldq"::S,"m"::S]$Lisp_ - ,["sv"::S,"m"::S]$Lisp,["pt"::S,"ldpt"::S,"n"::S]$Lisp,["work"::S,workLength]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp_ - ]$Lisp_ - ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_ - ,"ldb"::S,"ldq"::S,"ldpt"::S,"ifail"::S]$Lisp_ - ,["logical"::S,"wantq"::S,"wantp"::S]$Lisp_ - ]$Lisp,_ - ["q"::S,"sv"::S,"pt"::S,"work"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ - [([mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,wantqArg::Any,ldqArg::Any,wantpArg::Any,ldptArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f02xef(mArg:Integer,nArg:Integer,ldaArg:Integer,_ - ncolbArg:Integer,ldbArg:Integer,wantqArg:Boolean,_ - ldqArg:Integer,wantpArg:Boolean,ldphArg:Integer,_ - aArg:Matrix Complex DoubleFloat,bArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == - -- This segment added by hand, to deal with an assumed size array GDN - tem : Integer := (min(mArg,nArg)-1) - rLen : Integer := - zero? ncolbArg and not wantqArg and not wantpArg => 2*tem - zero? ncolbArg and wantpArg and not wantqArg => 3*tem - not wantpArg => - ncolbArg >0 or wantqArg => 3*tem - 5*tem - cLen : Integer := - mArg >= nArg => - wantqArg and wantpArg => 2*(nArg + max(nArg**2,ncolbArg)) - wantqArg and not wantpArg => 2*(nArg + max(nArg**2+nArg,ncolbArg)) - 2*(nArg + max(nArg,ncolbArg)) - wantpArg => 2*(mArg**2 + mArg) - 2*mArg - svLength : Integer := - min(mArg,nArg) - [(invokeNagman(NIL$Lisp,_ - "f02xef",_ - ["m"::S,"n"::S,"lda"::S,"ncolb"::S,"ldb"::S_ - ,"wantq"::S,"ldq"::S,"wantp"::S,"ldph"::S,"ifail"::S_ - ,"q"::S,"sv"::S,"ph"::S,"rwork"::S,"a"::S_ - ,"b"::S,"cwork"::S]$Lisp,_ - ["q"::S,"sv"::S,"ph"::S,"rwork"::S,"cwork"::S]$Lisp,_ - [["double"::S,["sv"::S,svLength]$Lisp,["rwork"::S,rLen]$Lisp_ - ]$Lisp_ - ,["integer"::S,"m"::S,"n"::S,"lda"::S,"ncolb"::S_ - ,"ldb"::S,"ldq"::S,"ldph"::S,"ifail"::S]$Lisp_ - ,["logical"::S,"wantq"::S,"wantp"::S]$Lisp_ - ,["double complex"::S,["q"::S,"ldq"::S,"m"::S]$Lisp,["ph"::S,"ldph"::S,"n"::S]$Lisp,["a"::S,"lda"::S,"n"::S]$Lisp,["b"::S,"ldb"::S,"ncolb"::S]$Lisp,["cwork"::S,cLen]$Lisp]$Lisp_ - ]$Lisp,_ - ["q"::S,"sv"::S,"ph"::S,"rwork"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ - [([mArg::Any,nArg::Any,ldaArg::Any,ncolbArg::Any,ldbArg::Any,wantqArg::Any,ldqArg::Any,wantpArg::Any,ldphArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - -@ -\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/f04.spad.pamphlet b/src/algebra/f04.spad.pamphlet deleted file mode 100644 index bbd3374..0000000 --- a/src/algebra/f04.spad.pamphlet +++ /dev/null @@ -1,409 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra f04.spad} -\author{Godfrey Nolan, Mike Dewar} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NAGF04 NagLinearEquationSolvingPackage} -<>= -)abbrev package NAGF04 NagLinearEquationSolvingPackage -++ Author: Godfrey Nolan and Mike Dewar -++ Date Created: Jan 1994 -++ Date Last Updated: Thu May 12 17:45:31 1994 -++ Description: -++ This package uses the NAG Library to solve the matrix equation -++ \axiom{AX=B}, where \axiom{B} -++ may be a single vector or a matrix of multiple right-hand sides. -++ The matrix \axiom{A} may be real, complex, symmetric, Hermitian positive- -++ definite, or sparse. It may also be rectangular, in which case a -++ least-squares solution is obtained. -++ See \downlink{Manual Page}{manpageXXf04}. -NagLinearEquationSolvingPackage(): Exports == Implementation where - S ==> Symbol - FOP ==> FortranOutputStackPackage - - Exports ==> with - f04adf : (Integer,Matrix Complex DoubleFloat,Integer,Integer,_ - Integer,Integer,Matrix Complex DoubleFloat,Integer) -> Result - ++ f04adf(ia,b,ib,n,m,ic,a,ifail) - ++ calculates the approximate solution of a set of complex - ++ linear equations with multiple right-hand sides, using an LU - ++ factorization with partial pivoting. - ++ See \downlink{Manual Page}{manpageXXf04adf}. - f04arf : (Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,_ - Integer) -> Result - ++ f04arf(ia,b,n,a,ifail) - ++ calculates the approximate solution of a set of real - ++ linear equations with a single right-hand side, using an LU - ++ factorization with partial pivoting. - ++ See \downlink{Manual Page}{manpageXXf04arf}. - f04asf : (Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,_ - Integer) -> Result - ++ f04asf(ia,b,n,a,ifail) - ++ calculates the accurate solution of a set of real - ++ symmetric positive-definite linear equations with a single right- - ++ hand side, Ax=b, using a Cholesky factorization and iterative - ++ refinement. - ++ See \downlink{Manual Page}{manpageXXf04asf}. - f04atf : (Matrix DoubleFloat,Integer,Matrix DoubleFloat,Integer,_ - Integer,Integer) -> Result - ++ f04atf(a,ia,b,n,iaa,ifail) - ++ calculates the accurate solution of a set of real linear - ++ equations with a single right-hand side, using an LU - ++ factorization with partial pivoting, and iterative refinement. - ++ See \downlink{Manual Page}{manpageXXf04atf}. - f04axf : (Integer,Matrix DoubleFloat,Integer,Matrix Integer,_ - Matrix Integer,Integer,Matrix Integer,Matrix DoubleFloat) -> Result - ++ f04axf(n,a,licn,icn,ikeep,mtype,idisp,rhs) - ++ calculates the approximate solution of a set of real - ++ sparse linear equations with a single right-hand side, Ax=b or - ++ T - ++ A x=b, where A has been factorized by F01BRF or F01BSF. - ++ See \downlink{Manual Page}{manpageXXf04axf}. - f04faf : (Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,_ - Matrix DoubleFloat,Integer) -> Result - ++ f04faf(job,n,d,e,b,ifail) - ++ calculates the approximate solution of a set of real - ++ symmetric positive-definite tridiagonal linear equations. - ++ See \downlink{Manual Page}{manpageXXf04faf}. - f04jgf : (Integer,Integer,Integer,DoubleFloat,_ - Integer,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result - ++ f04jgf(m,n,nra,tol,lwork,a,b,ifail) - ++ finds the solution of a linear least-squares problem, Ax=b - ++ , where A is a real m by n (m>=n) matrix and b is an m element - ++ vector. If the matrix of observations is not of full rank, then - ++ the minimal least-squares solution is returned. - ++ See \downlink{Manual Page}{manpageXXf04jgf}. - f04maf : (Integer,Integer,Matrix DoubleFloat,Integer,_ - Matrix Integer,Integer,Matrix Integer,Matrix DoubleFloat,Matrix Integer,Matrix Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix Integer,Integer) -> Result - ++ f04maf(n,nz,avals,licn,irn,lirn,icn,wkeep,ikeep,inform,b,acc,noits,ifail) - ++ e a sparse symmetric positive-definite system of linear - ++ equations, Ax=b, using a pre-conditioned conjugate gradient - ++ method, where A has been factorized by F01MAF. - ++ See \downlink{Manual Page}{manpageXXf04maf}. - f04mbf : (Integer,Matrix DoubleFloat,Boolean,DoubleFloat,_ - Integer,Integer,Integer,Integer,DoubleFloat,Integer,Union(fn:FileName,fp:Asp28(APROD)),Union(fn:FileName,fp:Asp34(MSOLVE))) -> Result - ++ f04mbf(n,b,precon,shift,itnlim,msglvl,lrwork,liwork,rtol,ifail,aprod,msolve) - ++ solves a system of real sparse symmetric linear equations - ++ using a Lanczos algorithm. - ++ See \downlink{Manual Page}{manpageXXf04mbf}. - f04mcf : (Integer,Matrix DoubleFloat,Integer,Matrix DoubleFloat,_ - Matrix Integer,Integer,Matrix DoubleFloat,Integer,Integer,Integer,Integer) -> Result - ++ f04mcf(n,al,lal,d,nrow,ir,b,nrb,iselct,nrx,ifail) - ++ computes the approximate solution of a system of real - ++ linear equations with multiple right-hand sides, AX=B, where A - ++ is a symmetric positive-definite variable-bandwidth matrix, which - ++ has previously been factorized by F01MCF. Related systems may - ++ also be solved. - ++ See \downlink{Manual Page}{manpageXXf04mcf}. - f04qaf : (Integer,Integer,DoubleFloat,DoubleFloat,_ - DoubleFloat,DoubleFloat,Integer,Integer,Integer,Integer,Matrix DoubleFloat,Integer,Union(fn:FileName,fp:Asp30(APROD))) -> Result - ++ f04qaf(m,n,damp,atol,btol,conlim,itnlim,msglvl,lrwork,liwork,b,ifail,aprod) - ++ solves sparse unsymmetric equations, sparse linear least- - ++ squares problems and sparse damped linear least-squares problems, - ++ using a Lanczos algorithm. - ++ See \downlink{Manual Page}{manpageXXf04qaf}. - Implementation ==> add - - import Lisp - import DoubleFloat - import Any - import Record - import Integer - import Matrix DoubleFloat - import Boolean - import NAGLinkSupportPackage - import FortranPackage - import AnyFunctions1(Integer) - import AnyFunctions1(DoubleFloat) - import AnyFunctions1(Boolean) - import AnyFunctions1(Matrix Complex DoubleFloat) - import AnyFunctions1(Matrix DoubleFloat) - import AnyFunctions1(Matrix Integer) - - - f04adf(iaArg:Integer,bArg:Matrix Complex DoubleFloat,ibArg:Integer,_ - nArg:Integer,mArg:Integer,icArg:Integer,_ - aArg:Matrix Complex DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f04adf",_ - ["ia"::S,"ib"::S,"n"::S,"m"::S,"ic"::S_ - ,"ifail"::S,"b"::S,"c"::S,"a"::S,"wkspce"::S]$Lisp,_ - ["c"::S,"wkspce"::S]$Lisp,_ - [["double"::S,["wkspce"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"ia"::S,"ib"::S,"n"::S,"m"::S_ - ,"ic"::S,"ifail"::S]$Lisp_ - ,["double complex"::S,["b"::S,"ib"::S,"m"::S]$Lisp,["c"::S,"ic"::S,"m"::S]$Lisp,["a"::S,"ia"::S,"n"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["c"::S,"a"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,ibArg::Any,nArg::Any,mArg::Any,icArg::Any,ifailArg::Any,bArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04arf(iaArg:Integer,bArg:Matrix DoubleFloat,nArg:Integer,_ - aArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f04arf",_ - ["ia"::S,"n"::S,"ifail"::S,"b"::S,"c"::S,"a"::S,"wkspce"::S]$Lisp,_ - ["c"::S,"wkspce"::S]$Lisp,_ - [["double"::S,["b"::S,"n"::S]$Lisp,["c"::S,"n"::S]$Lisp_ - ,["a"::S,"ia"::S,"n"::S]$Lisp,["wkspce"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"ia"::S,"n"::S,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["c"::S,"a"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,nArg::Any,ifailArg::Any,bArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04asf(iaArg:Integer,bArg:Matrix DoubleFloat,nArg:Integer,_ - aArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f04asf",_ - ["ia"::S,"n"::S,"ifail"::S,"b"::S,"c"::S,"a"::S,"wk1"::S,"wk2"::S_ - ]$Lisp,_ - ["c"::S,"wk1"::S,"wk2"::S]$Lisp,_ - [["double"::S,["b"::S,"n"::S]$Lisp,["c"::S,"n"::S]$Lisp_ - ,["a"::S,"ia"::S,"n"::S]$Lisp,["wk1"::S,"n"::S]$Lisp,["wk2"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"ia"::S,"n"::S,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["c"::S,"a"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,nArg::Any,ifailArg::Any,bArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04atf(aArg:Matrix DoubleFloat,iaArg:Integer,bArg:Matrix DoubleFloat,_ - nArg:Integer,iaaArg:Integer,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f04atf",_ - ["ia"::S,"n"::S,"iaa"::S,"ifail"::S,"a"::S,"b"::S,"c"::S,"aa"::S,"wks1"::S_ - ,"wks2"::S]$Lisp,_ - ["c"::S,"aa"::S,"wks1"::S,"wks2"::S]$Lisp,_ - [["double"::S,["a"::S,"ia"::S,"n"::S]$Lisp_ - ,["b"::S,"n"::S]$Lisp,["c"::S,"n"::S]$Lisp,["aa"::S,"iaa"::S,"n"::S]$Lisp,["wks1"::S,"n"::S]$Lisp,["wks2"::S,"n"::S]$Lisp_ - ]$Lisp_ - ,["integer"::S,"ia"::S,"n"::S,"iaa"::S,"ifail"::S_ - ]$Lisp_ - ]$Lisp,_ - ["c"::S,"aa"::S,"ifail"::S]$Lisp,_ - [([iaArg::Any,nArg::Any,iaaArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04axf(nArg:Integer,aArg:Matrix DoubleFloat,licnArg:Integer,_ - icnArg:Matrix Integer,ikeepArg:Matrix Integer,mtypeArg:Integer,_ - idispArg:Matrix Integer,rhsArg:Matrix DoubleFloat): Result == - [(invokeNagman(NIL$Lisp,_ - "f04axf",_ - ["n"::S,"licn"::S,"mtype"::S,"resid"::S,"a"::S,"icn"::S,"ikeep"::S,"idisp"::S,"rhs"::S_ - ,"w"::S]$Lisp,_ - ["resid"::S,"w"::S]$Lisp,_ - [["double"::S,["a"::S,"licn"::S]$Lisp,"resid"::S_ - ,["rhs"::S,"n"::S]$Lisp,["w"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"n"::S,"licn"::S,["icn"::S,"licn"::S]$Lisp_ - ,["ikeep"::S,["*"::S,"n"::S,5$Lisp]$Lisp]$Lisp,"mtype"::S,["idisp"::S,2$Lisp]$Lisp]$Lisp_ - ]$Lisp,_ - ["resid"::S,"rhs"::S]$Lisp,_ - [([nArg::Any,licnArg::Any,mtypeArg::Any,aArg::Any,icnArg::Any,ikeepArg::Any,idispArg::Any,rhsArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04faf(jobArg:Integer,nArg:Integer,dArg:Matrix DoubleFloat,_ - eArg:Matrix DoubleFloat,bArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f04faf",_ - ["job"::S,"n"::S,"ifail"::S,"d"::S,"e"::S,"b"::S]$Lisp,_ - []$Lisp,_ - [["double"::S,["d"::S,"n"::S]$Lisp,["e"::S,"n"::S]$Lisp_ - ,["b"::S,"n"::S]$Lisp]$Lisp_ - ,["integer"::S,"job"::S,"n"::S,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["d"::S,"e"::S,"b"::S,"ifail"::S]$Lisp,_ - [([jobArg::Any,nArg::Any,ifailArg::Any,dArg::Any,eArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04jgf(mArg:Integer,nArg:Integer,nraArg:Integer,_ - tolArg:DoubleFloat,lworkArg:Integer,aArg:Matrix DoubleFloat,_ - bArg:Matrix DoubleFloat,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f04jgf",_ - ["m"::S,"n"::S,"nra"::S,"tol"::S,"lwork"::S_ - ,"svd"::S,"sigma"::S,"irank"::S,"ifail"::S,"work"::S,"a"::S,"b"::S]$Lisp,_ - ["svd"::S,"sigma"::S,"irank"::S,"work"::S]$Lisp,_ - [["double"::S,"tol"::S,"sigma"::S,["work"::S,"lwork"::S]$Lisp_ - ,["a"::S,"nra"::S,"n"::S]$Lisp,["b"::S,"m"::S]$Lisp]$Lisp_ - ,["integer"::S,"m"::S,"n"::S,"nra"::S,"lwork"::S_ - ,"irank"::S,"ifail"::S]$Lisp_ - ,["logical"::S,"svd"::S]$Lisp_ - ]$Lisp,_ - ["svd"::S,"sigma"::S,"irank"::S,"work"::S,"a"::S,"b"::S,"ifail"::S]$Lisp,_ - [([mArg::Any,nArg::Any,nraArg::Any,tolArg::Any,lworkArg::Any,ifailArg::Any,aArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04maf(nArg:Integer,nzArg:Integer,avalsArg:Matrix DoubleFloat,_ - licnArg:Integer,irnArg:Matrix Integer,lirnArg:Integer,_ - icnArg:Matrix Integer,wkeepArg:Matrix DoubleFloat,ikeepArg:Matrix Integer,_ - informArg:Matrix Integer,bArg:Matrix DoubleFloat,accArg:Matrix DoubleFloat,_ - noitsArg:Matrix Integer,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f04maf",_ - ["n"::S,"nz"::S,"licn"::S,"lirn"::S,"ifail"::S_ - ,"avals"::S,"irn"::S,"icn"::S,"wkeep"::S,"ikeep"::S_ - ,"inform"::S,"work"::S,"b"::S,"acc"::S,"noits"::S_ - ]$Lisp,_ - ["work"::S]$Lisp,_ - [["double"::S,["avals"::S,"licn"::S]$Lisp,["wkeep"::S,["*"::S,3$Lisp,"n"::S]$Lisp]$Lisp_ - ,["work"::S,["*"::S,3$Lisp,"n"::S]$Lisp]$Lisp,["b"::S,"n"::S]$Lisp,["acc"::S,2$Lisp]$Lisp_ - ]$Lisp_ - ,["integer"::S,"n"::S,"nz"::S,"licn"::S,["irn"::S,"lirn"::S]$Lisp_ - ,"lirn"::S,["icn"::S,"licn"::S]$Lisp,["ikeep"::S,["*"::S,2$Lisp,"n"::S]$Lisp]$Lisp,["inform"::S,4$Lisp]$Lisp_ - ,["noits"::S,2$Lisp]$Lisp,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["work"::S,"b"::S,"acc"::S,"noits"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,nzArg::Any,licnArg::Any,lirnArg::Any,ifailArg::Any,avalsArg::Any,irnArg::Any,icnArg::Any,wkeepArg::Any,ikeepArg::Any,informArg::Any,bArg::Any,accArg::Any,noitsArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04mbf(nArg:Integer,bArg:Matrix DoubleFloat,preconArg:Boolean,_ - shiftArg:DoubleFloat,itnlimArg:Integer,msglvlArg:Integer,_ - lrworkArg:Integer,liworkArg:Integer,rtolArg:DoubleFloat,_ - ifailArg:Integer,aprodArg:Union(fn:FileName,fp:Asp28(APROD)),msolveArg:Union(fn:FileName,fp:Asp34(MSOLVE))): Result == --- if both asps are AXIOM generated we do not need lrwork liwork --- and will set to 1. --- else believe the user but check that they are >0. - if (aprodArg case fp) and (msolveArg case fp) - then - lrworkArg:=1 - liworkArg:=1 - else - lrworkArg:=max(1,lrworkArg) - liworkArg:=max(1,liworkArg) - pushFortranOutputStack(aprodFilename := aspFilename "aprod")$FOP - if aprodArg case fn - then outputAsFortran(aprodArg.fn) - else outputAsFortran(aprodArg.fp) - popFortranOutputStack()$FOP - pushFortranOutputStack(msolveFilename := aspFilename "msolve")$FOP - if msolveArg case fn - then outputAsFortran(msolveArg.fn) - else outputAsFortran(msolveArg.fp) - popFortranOutputStack()$FOP - [(invokeNagman([aprodFilename,msolveFilename]$Lisp,_ - "f04mbf",_ - ["n"::S,"precon"::S,"shift"::S,"itnlim"::S,"msglvl"::S_ - ,"lrwork"::S,"liwork"::S,"itn"::S,"anorm"::S,"acond"::S_ - ,"rnorm"::S,"xnorm"::S,"inform"::S,"rtol"::S,"ifail"::S_ - ,"aprod"::S,"msolve"::S,"b"::S,"x"::S,"work"::S,"rwork"::S,"iwork"::S_ - ]$Lisp,_ - ["x"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"xnorm"::S,"inform"::S,"work"::S,"rwork"::S,"iwork"::S,"aprod"::S,"msolve"::S]$Lisp,_ - [["double"::S,["b"::S,"n"::S]$Lisp,"shift"::S_ - ,["x"::S,"n"::S]$Lisp,"anorm"::S,"acond"::S,"rnorm"::S,"xnorm"::S,"rtol"::S,["work"::S,"n"::S,5$Lisp]$Lisp,["rwork"::S,"lrwork"::S]$Lisp_ - ,"aprod"::S,"msolve"::S]$Lisp_ - ,["integer"::S,"n"::S,"itnlim"::S,"msglvl"::S_ - ,"lrwork"::S,"liwork"::S,"itn"::S,"inform"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_ - ,["logical"::S,"precon"::S]$Lisp_ - ]$Lisp,_ - ["x"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"xnorm"::S,"inform"::S,"rtol"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,preconArg::Any,shiftArg::Any,itnlimArg::Any,msglvlArg::Any,lrworkArg::Any,liworkArg::Any,rtolArg::Any,ifailArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04mcf(nArg:Integer,alArg:Matrix DoubleFloat,lalArg:Integer,_ - dArg:Matrix DoubleFloat,nrowArg:Matrix Integer,irArg:Integer,_ - bArg:Matrix DoubleFloat,nrbArg:Integer,iselctArg:Integer,_ - nrxArg:Integer,ifailArg:Integer): Result == - [(invokeNagman(NIL$Lisp,_ - "f04mcf",_ - ["n"::S,"lal"::S,"ir"::S,"nrb"::S,"iselct"::S_ - ,"nrx"::S,"ifail"::S,"al"::S,"d"::S,"nrow"::S,"b"::S,"x"::S_ - ]$Lisp,_ - ["x"::S]$Lisp,_ - [["double"::S,["al"::S,"lal"::S]$Lisp,["d"::S,"n"::S]$Lisp_ - ,["b"::S,"nrb"::S,"ir"::S]$Lisp,["x"::S,"nrx"::S,"ir"::S]$Lisp]$Lisp_ - ,["integer"::S,"n"::S,"lal"::S,["nrow"::S,"n"::S]$Lisp_ - ,"ir"::S,"nrb"::S,"iselct"::S,"nrx"::S,"ifail"::S]$Lisp_ - ]$Lisp,_ - ["x"::S,"ifail"::S]$Lisp,_ - [([nArg::Any,lalArg::Any,irArg::Any,nrbArg::Any,iselctArg::Any,nrxArg::Any,ifailArg::Any,alArg::Any,dArg::Any,nrowArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f04qaf(mArg:Integer,nArg:Integer,dampArg:DoubleFloat,_ - atolArg:DoubleFloat,btolArg:DoubleFloat,conlimArg:DoubleFloat,_ - itnlimArg:Integer,msglvlArg:Integer,lrworkArg:Integer,_ - liworkArg:Integer,bArg:Matrix DoubleFloat,ifailArg:Integer,_ - aprodArg:Union(fn:FileName,fp:Asp30(APROD))): Result == - pushFortranOutputStack(aprodFilename := aspFilename "aprod")$FOP - if aprodArg case fn - then outputAsFortran(aprodArg.fn) - else outputAsFortran(aprodArg.fp) - popFortranOutputStack()$FOP - [(invokeNagman([aprodFilename]$Lisp,_ - "f04qaf",_ - ["m"::S,"n"::S,"damp"::S,"atol"::S,"btol"::S_ - ,"conlim"::S,"itnlim"::S,"msglvl"::S,"lrwork"::S,"liwork"::S_ - ,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S_ - ,"xnorm"::S,"inform"::S,"ifail"::S,"aprod"::S,"x"::S,"se"::S,"b"::S,"work"::S,"rwork"::S_ - ,"iwork"::S]$Lisp,_ - ["x"::S,"se"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S,"xnorm"::S,"inform"::S,"work"::S,"rwork"::S,"iwork"::S,"aprod"::S]$Lisp,_ - [["double"::S,"damp"::S,"atol"::S,"btol"::S_ - ,"conlim"::S,["x"::S,"n"::S]$Lisp,["se"::S,"n"::S]$Lisp,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S,"xnorm"::S,["b"::S,"m"::S]$Lisp_ - ,["work"::S,"n"::S,2$Lisp]$Lisp,["rwork"::S,"lrwork"::S]$Lisp,"aprod"::S]$Lisp_ - ,["integer"::S,"m"::S,"n"::S,"itnlim"::S,"msglvl"::S_ - ,"lrwork"::S,"liwork"::S,"itn"::S,"inform"::S,"ifail"::S,["iwork"::S,"liwork"::S]$Lisp]$Lisp_ - ]$Lisp,_ - ["x"::S,"se"::S,"itn"::S,"anorm"::S,"acond"::S,"rnorm"::S,"arnorm"::S,"xnorm"::S,"inform"::S,"b"::S,"ifail"::S]$Lisp,_ - [([mArg::Any,nArg::Any,dampArg::Any,atolArg::Any,btolArg::Any,conlimArg::Any,itnlimArg::Any,msglvlArg::Any,lrworkArg::Any,liworkArg::Any,ifailArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - -@ -\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/f07.spad.pamphlet b/src/algebra/f07.spad.pamphlet deleted file mode 100644 index 7b94a78..0000000 --- a/src/algebra/f07.spad.pamphlet +++ /dev/null @@ -1,182 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra f07.spad} -\author{Godfrey Nolan, Mike Dewar} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package NAGF07 NagLapack} -<>= -)abbrev package NAGF07 NagLapack -++ Author: Godfrey Nolan and Mike Dewar -++ Date Created: Jan 1994 -++ Date Last Updated: Thu May 12 17:45:42 1994 -++ Description: -++ This package uses the NAG Library to compute matrix -++ factorizations, and to solve systems of linear equations -++ following the matrix factorizations. -++ See \downlink{Manual Page}{manpageXXf07}. -NagLapack(): Exports == Implementation where - S ==> Symbol - FOP ==> FortranOutputStackPackage - - Exports ==> with - f07adf : (Integer,Integer,Integer,Matrix DoubleFloat) -> Result - ++ f07adf(m,n,lda,a) - ++ (DGETRF) computes the LU factorization of a real m by n - ++ matrix. - ++ See \downlink{Manual Page}{manpageXXf07adf}. - f07aef : (String,Integer,Integer,Matrix DoubleFloat,_ - Integer,Matrix Integer,Integer,Matrix DoubleFloat) -> Result - ++ f07aef(trans,n,nrhs,a,lda,ipiv,ldb,b) - ++ (DGETRS) solves a real system of linear equations with - ++ T - ++ multiple right-hand sides, AX=B or A X=B, where A has been - ++ factorized by F07ADF (DGETRF). - ++ See \downlink{Manual Page}{manpageXXf07aef}. - f07fdf : (String,Integer,Integer,Matrix DoubleFloat) -> Result - ++ f07fdf(uplo,n,lda,a) - ++ (DPOTRF) computes the Cholesky factorization of a real - ++ symmetric positive-definite matrix. - ++ See \downlink{Manual Page}{manpageXXf07fdf}. - f07fef : (String,Integer,Integer,Matrix DoubleFloat,_ - Integer,Integer,Matrix DoubleFloat) -> Result - ++ f07fef(uplo,n,nrhs,a,lda,ldb,b) - ++ (DPOTRS) solves a real symmetric positive-definite system - ++ of linear equations with multiple right-hand sides, AX=B, where A - ++ has been factorized by F07FDF (DPOTRF). - ++ See \downlink{Manual Page}{manpageXXf07fef}. - Implementation ==> add - - import Lisp - import DoubleFloat - import Any - import Record - import Integer - import Matrix DoubleFloat - import Boolean - import NAGLinkSupportPackage - import AnyFunctions1(Integer) - import AnyFunctions1(Matrix DoubleFloat) - import AnyFunctions1(String) - import AnyFunctions1(Matrix Integer) - - - f07adf(mArg:Integer,nArg:Integer,ldaArg:Integer,_ - aArg:Matrix DoubleFloat): Result == - [(invokeNagman(NIL$Lisp,_ - "f07adf",_ - ["m"::S,"n"::S,"lda"::S,"info"::S,"ipiv"::S,"a"::S]$Lisp,_ - ["ipiv"::S,"info"::S]$Lisp,_ - [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ - ]$Lisp_ - ,["integer"::S,"m"::S,"n"::S,"lda"::S,["ipiv"::S,"m"::S]$Lisp_ - ,"info"::S]$Lisp_ - ]$Lisp,_ - ["ipiv"::S,"info"::S,"a"::S]$Lisp,_ - [([mArg::Any,nArg::Any,ldaArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f07aef(transArg:String,nArg:Integer,nrhsArg:Integer,_ - aArg:Matrix DoubleFloat,ldaArg:Integer,ipivArg:Matrix Integer,_ - ldbArg:Integer,bArg:Matrix DoubleFloat): Result == - [(invokeNagman(NIL$Lisp,_ - "f07aef",_ - ["trans"::S,"n"::S,"nrhs"::S,"lda"::S,"ldb"::S_ - ,"info"::S,"a"::S,"ipiv"::S,"b"::S]$Lisp,_ - ["info"::S]$Lisp,_ - [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ - ,["b"::S,"ldb"::S,"nrhs"::S]$Lisp]$Lisp_ - ,["integer"::S,"n"::S,"nrhs"::S,"lda"::S,["ipiv"::S,"n"::S]$Lisp_ - ,"ldb"::S,"info"::S]$Lisp_ - ,["character"::S,"trans"::S]$Lisp_ - ]$Lisp,_ - ["info"::S,"b"::S]$Lisp,_ - [([transArg::Any,nArg::Any,nrhsArg::Any,ldaArg::Any,ldbArg::Any,aArg::Any,ipivArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f07fdf(uploArg:String,nArg:Integer,ldaArg:Integer,_ - aArg:Matrix DoubleFloat): Result == - [(invokeNagman(NIL$Lisp,_ - "f07fdf",_ - ["uplo"::S,"n"::S,"lda"::S,"info"::S,"a"::S]$Lisp,_ - ["info"::S]$Lisp,_ - [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ - ]$Lisp_ - ,["integer"::S,"n"::S,"lda"::S,"info"::S]$Lisp_ - ,["character"::S,"uplo"::S]$Lisp_ - ]$Lisp,_ - ["info"::S,"a"::S]$Lisp,_ - [([uploArg::Any,nArg::Any,ldaArg::Any,aArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - - f07fef(uploArg:String,nArg:Integer,nrhsArg:Integer,_ - aArg:Matrix DoubleFloat,ldaArg:Integer,ldbArg:Integer,_ - bArg:Matrix DoubleFloat): Result == - [(invokeNagman(NIL$Lisp,_ - "f07fef",_ - ["uplo"::S,"n"::S,"nrhs"::S,"lda"::S,"ldb"::S_ - ,"info"::S,"a"::S,"b"::S]$Lisp,_ - ["info"::S]$Lisp,_ - [["double"::S,["a"::S,"lda"::S,"n"::S]$Lisp_ - ,["b"::S,"ldb"::S,"nrhs"::S]$Lisp]$Lisp_ - ,["integer"::S,"n"::S,"nrhs"::S,"lda"::S,"ldb"::S_ - ,"info"::S]$Lisp_ - ,["character"::S,"uplo"::S]$Lisp_ - ]$Lisp,_ - ["info"::S,"b"::S]$Lisp,_ - [([uploArg::Any,nArg::Any,nrhsArg::Any,ldaArg::Any,ldbArg::Any,aArg::Any,bArg::Any ])_ - @List Any]$Lisp)$Lisp)_ - pretend List (Record(key:Symbol,entry:Any))]$Result - -@ -\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/facutil.spad.pamphlet b/src/algebra/facutil.spad.pamphlet deleted file mode 100644 index 2b7de8d..0000000 --- a/src/algebra/facutil.spad.pamphlet +++ /dev/null @@ -1,218 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra facutil.spad} -\author{Barry Trager} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package FACUTIL FactoringUtilities} -<>= -)abbrev package FACUTIL FactoringUtilities -++ Author: Barry Trager -++ Date Created: March 12, 1992 -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This package provides utilities used by the factorizers -++ which operate on polynomials represented as univariate polynomials -++ with multivariate coefficients. - -FactoringUtilities(E,OV,R,P) : C == T where - E : OrderedAbelianMonoidSup - OV : OrderedSet - R : Ring - P : PolynomialCategory(R,E,OV) - - SUP ==> SparseUnivariatePolynomial - NNI ==> NonNegativeInteger - Z ==> Integer - - C == with - completeEval : (SUP P,List OV,List R) -> SUP R - ++ completeEval(upoly, lvar, lval) evaluates the polynomial upoly - ++ with each variable in lvar replaced by the corresponding value - ++ in lval. Substitutions are done for all variables in upoly - ++ producing a univariate polynomial over R. - degree : (SUP P,List OV) -> List NNI - ++ degree(upoly, lvar) returns a list containing the maximum - ++ degree for each variable in lvar. - variables : SUP P -> List OV - ++ variables(upoly) returns the list of variables for the coefficients - ++ of upoly. - lowerPolynomial: SUP P -> SUP R - ++ lowerPolynomial(upoly) converts upoly to be a univariate polynomial - ++ over R. An error if the coefficients contain variables. - raisePolynomial: SUP R -> SUP P - ++ raisePolynomial(rpoly) converts rpoly from a univariate polynomial - ++ over r to be a univariate polynomial with polynomial coefficients. - normalDeriv : (SUP P,Z) -> SUP P - ++ normalDeriv(poly,i) computes the ith derivative of poly divided - ++ by i!. - ran : Z -> R - ++ ran(k) computes a random integer between -k and k as a member of R. - - T == add - - lowerPolynomial(f:SUP P) : SUP R == - zero? f => 0$SUP(R) - monomial(ground leadingCoefficient f, degree f)$SUP(R) + - lowerPolynomial(reductum f) - - raisePolynomial(u:SUP R) : SUP P == - zero? u => 0$SUP(P) - monomial(leadingCoefficient(u)::P, degree u)$SUP(P) + - raisePolynomial(reductum u) - - completeEval(f:SUP P,lvar:List OV,lval:List R) : SUP R == - zero? f => 0$SUP(R) - monomial(ground eval(leadingCoefficient f,lvar,lval),degree f)$SUP(R) + - completeEval(reductum f,lvar,lval) - - degree(f:SUP P,lvar:List OV) : List NNI == - coefs := coefficients f - ldeg:= ["max"/[degree(fc,xx) for fc in coefs] for xx in lvar] - - variables(f:SUP P) : List OV == - "setUnion"/[variables cf for cf in coefficients f] - - if R has FiniteFieldCategory then - ran(k:Z):R == random()$R - else - ran(k:Z):R == (random(2*k+1)$Z -k)::R - - -- Compute the normalized m derivative - normalDeriv(f:SUP P,m:Z) : SUP P== - (n1:Z:=degree f) < m => 0$SUP(P) - n1=m => (leadingCoefficient f)::SUP(P) - k:=binomial(n1,m) - ris:SUP:=0$SUP(P) - n:Z:=n1 - while n>= m repeat - while n1>n repeat - k:=(k*(n1-m)) quo n1 - n1:=n1-1 - ris:=ris+monomial(k*leadingCoefficient f,(n-m)::NNI) - f:=reductum f - n:=degree f - ris - -@ -\section{package PUSHVAR PushVariables} -<>= -)abbrev package PUSHVAR PushVariables -++ This package \undocumented{} -PushVariables(R,E,OV,PPR):C == T where - E : OrderedAbelianMonoidSup - OV: OrderedSet with - convert: % -> Symbol - ++ convert(x) converts x to a symbol - variable: Symbol -> Union(%, "failed") - ++ variable(s) makes an element from symbol s or fails - R : Ring - PR ==> Polynomial R - PPR: PolynomialCategory(PR,E,OV) - SUP ==> SparseUnivariatePolynomial - C == with - pushdown : (PPR, OV) -> PPR - ++ pushdown(p,v) \undocumented{} - pushdown : (PPR, List OV) -> PPR - ++ pushdown(p,lv) \undocumented{} - pushup : (PPR, OV) -> PPR - ++ pushup(p,v) \undocumented{} - pushup : (PPR, List OV) -> PPR - ++ pushup(p,lv) \undocumented{} - map : ((PR -> PPR), PPR) -> PPR - ++ map(f,p) \undocumented{} - - T == add - pushdown(g:PPR,x:OV) : PPR == - eval(g,x,monomial(1,convert x,1)$PR) - - pushdown(g:PPR, lv:List OV) : PPR == - vals:=[monomial(1,convert x,1)$PR for x in lv] - eval(g,lv,vals) - - map(f:(PR -> PPR), p: PPR) : PPR == - ground? p => f(retract p) - v:=mainVariable(p)::OV - multivariate(map(map(f,#1),univariate(p,v)),v) - - ---- push back the variable ---- - pushupCoef(c:PR, lv:List OV): PPR == - ground? c => c::PPR - v:=mainVariable(c)::Symbol - v2 := variable(v)$OV - uc := univariate(c,v) - ppr : PPR := 0 - v2 case OV => - while not zero? uc repeat - ppr := ppr + monomial(1,v2,degree(uc))$PPR * - pushupCoef(leadingCoefficient uc, lv) - uc := reductum uc - ppr - while not zero? uc repeat - ppr := ppr + monomial(1,v,degree(uc))$PR * - pushupCoef(leadingCoefficient uc, lv) - uc := reductum uc - ppr - - pushup(f:PPR,x:OV) :PPR == - map(pushupCoef(#1,[x]), f) - - pushup(g:PPR, lv:List OV) : PPR == - map(pushupCoef(#1, lv), g) - -@ -\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/ffcat.spad.pamphlet b/src/algebra/ffcat.spad.pamphlet deleted file mode 100644 index c45858b..0000000 --- a/src/algebra/ffcat.spad.pamphlet +++ /dev/null @@ -1,202 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra ffcat.spad} -\author{Johannes Grabmeier, Alfred Scheerhorn, Barry Trager, James Davenport} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\begin{verbatim} --- 28.01.93: AS and JG:another Error in discreteLog(.,.) in FFIEDLC corrected. --- 08.05.92: AS Error in discreteLog(.,.) in FFIEDLC corrected. --- 03.04.92: AS Barry Trager added package FFSLPE and some functions to FFIELDC --- 25.02.92: AS added following functions in FAXF: impl.of mrepresents, --- linearAssociatedExp,linearAssociatedLog, linearAssociatedOrder --- 18.02.92: AS: more efficient version of degree added, --- first version of degree in FAXF set into comments --- 18.06.91: AS: general version of minimalPolynomial added --- 08.05.91: JG, AS implementation of missing functions in FFC and FAXF --- 04.05.91: JG: comments --- 04.04.91: JG: old version of charthRoot in FFC was dropped - --- Fields with finite characteristic -\end{verbatim} -\section{package DLP DiscreteLogarithmPackage} -<>= -)abbrev package DLP DiscreteLogarithmPackage -++ Author: J. Grabmeier, A. Scheerhorn -++ Date Created: 12 March 1991 -++ Date Last Updated: 31 March 1991 -++ Basic Operations: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: discrete logarithm -++ References: -++ J. Grabmeier, A. Scheerhorn: Finite Fields in AXIOM. -++ AXIOM Technical Report Series, ATR/5 NP2522. -++ Description: -++ DiscreteLogarithmPackage implements help functions for discrete logarithms -++ in monoids using small cyclic groups. - -DiscreteLogarithmPackage(M): public == private where - M : Join(Monoid,Finite) with - "**": (M,Integer) -> M - ++ x ** n returns x raised to the integer power n - public ==> with - shanksDiscLogAlgorithm:(M,M,NonNegativeInteger)-> _ - Union(NonNegativeInteger,"failed") - ++ shanksDiscLogAlgorithm(b,a,p) computes s with \spad{b**s = a} for - ++ assuming that \spad{a} and b are elements in a 'small' cyclic group of - ++ order p by Shank's algorithm. - ++ Note: this is a subroutine of the function \spadfun{discreteLog}. - I ==> Integer - PI ==> PositiveInteger - NNI ==> NonNegativeInteger - SUP ==> SparseUnivariatePolynomial - DLP ==> DiscreteLogarithmPackage - - private ==> add - shanksDiscLogAlgorithm(logbase,c,p) == - limit:Integer:= 30 - -- for logarithms up to cyclic groups of order limit a full - -- logarithm table is computed - p < limit => - a:M:=1 - disclog:Integer:=0 - found:Boolean:=false - for i in 0..p-1 while not found repeat - a = c => - disclog:=i - found:=true - a:=a*logbase - not found => - messagePrint("discreteLog: second argument not in cyclic group_ - generated by first argument")$OutputForm - "failed" - disclog pretend NonNegativeInteger - l:Integer:=length(p)$Integer - if odd?(l)$Integer then n:Integer:= shift(p,-(l quo 2)) - else n:Integer:= shift(1,(l quo 2)) - a:M:=1 - exptable : Table(PI,NNI) :=table()$Table(PI,NNI) - for i in (0::NNI)..(n-1)::NNI repeat - insert_!([lookup(a),i::NNI]$Record(key:PI,entry:NNI),_ - exptable)$Table(PI,NNI) - a:=a*logbase - found := false - end := (p-1) quo n - disclog:Integer:=0 - a := c - b := logbase ** (-n) - for i in 0..end while not found repeat - rho:= search(lookup(a),exptable)_ - $Table(PositiveInteger,NNI) - rho case NNI => - found := true - disclog:= n * i + rho pretend Integer - a := a * b - not found => - messagePrint("discreteLog: second argument not in cyclic group_ - generated by first argument")$OutputForm - "failed" - disclog pretend NonNegativeInteger - -@ -\section{package FFSLPE FiniteFieldSolveLinearPolynomialEquation} -<>= -)abbrev package FFSLPE FiniteFieldSolveLinearPolynomialEquation -++ Author: Davenport -++ Date Created: 1991 -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This package solves linear diophantine equations for Bivariate polynomials -++ over finite fields - -FiniteFieldSolveLinearPolynomialEquation(F:FiniteFieldCategory, - FP:UnivariatePolynomialCategory F, - FPP:UnivariatePolynomialCategory FP): with - solveLinearPolynomialEquation: (List FPP, FPP) -> Union(List FPP,"failed") - ++ solveLinearPolynomialEquation([f1, ..., fn], g) - ++ (where the fi are relatively prime to each other) - ++ returns a list of ai such that - ++ \spad{g/prod fi = sum ai/fi} - ++ or returns "failed" if no such list of ai's exists. - == add - oldlp:List FPP := [] - slpePrime: FP := monomial(1,1) - oldtable:Vector List FPP := [] - lp: List FPP - p: FPP - import DistinctDegreeFactorize(F,FP) - solveLinearPolynomialEquation(lp,p) == - if (oldlp ^= lp) then - -- we have to generate a new table - deg:= +/[degree u for u in lp] - ans:Union(Vector List FPP,"failed"):="failed" - slpePrime:=monomial(1,1)+monomial(1,0) -- x+1: our starting guess - while (ans case "failed") repeat - ans:=tablePow(deg,slpePrime,lp)$GenExEuclid(FP,FPP) - if (ans case "failed") then - slpePrime:= nextItem(slpePrime)::FP - while (degree slpePrime > 1) and - not irreducible? slpePrime repeat - slpePrime := nextItem(slpePrime)::FP - oldtable:=(ans:: Vector List FPP) - answer:=solveid(p,slpePrime,oldtable) - answer - -@ -\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/fff.spad.pamphlet b/src/algebra/fff.spad.pamphlet deleted file mode 100644 index 858b950..0000000 --- a/src/algebra/fff.spad.pamphlet +++ /dev/null @@ -1,304 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra fff.spad} -\author{Johannes Grabmeier, Alfred Scheerhorn} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\begin{verbatim} --- 12.03.92: AS: generalized createLowComplexityTable --- 25.02.92: AS: added functions: --- createLowComplexityTable: PI -> Union(Vector List TERM,"failed") --- createLowComplexityNormalBasis: PI -> Union(SUP, V L TERM) - --- Finite Field Functions -\end{verbatim} -\section{package FFF FiniteFieldFunctions} -<>= -)abbrev package FFF FiniteFieldFunctions -++ Author: J. Grabmeier, A. Scheerhorn -++ Date Created: 21 March 1991 -++ Date Last Updated: 31 March 1991 -++ Basic Operations: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ References: -++ Lidl, R. & Niederreiter, H., "Finite Fields", -++ Encycl. of Math. 20, Addison-Wesley, 1983 -++ J. Grabmeier, A. Scheerhorn: Finite Fields in AXIOM. -++ AXIOM Technical Report Series, ATR/5 NP2522. -++ Description: -++ FiniteFieldFunctions(GF) is a package with functions -++ concerning finite extension fields of the finite ground field {\em GF}, -++ e.g. Zech logarithms. -++ Keywords: finite field, Zech logarithm, Jacobi logarithm, normal basis - -FiniteFieldFunctions(GF): Exports == Implementation where - GF : FiniteFieldCategory -- the ground field - - PI ==> PositiveInteger - NNI ==> NonNegativeInteger - I ==> Integer - SI ==> SingleInteger - SUP ==> SparseUnivariatePolynomial GF - V ==> Vector - M ==> Matrix - L ==> List - OUT ==> OutputForm - SAE ==> SimpleAlgebraicExtension - ARR ==> PrimitiveArray(SI) - TERM ==> Record(value:GF,index:SI) - MM ==> ModMonic(GF,SUP) - PF ==> PrimeField - - Exports ==> with - - createZechTable: SUP -> ARR - ++ createZechTable(f) generates a Zech logarithm table for the cyclic - ++ group representation of a extension of the ground field by the - ++ primitive polynomial {\em f(x)}, i.e. \spad{Z(i)}, - ++ defined by {\em x**Z(i) = 1+x**i} is stored at index i. - ++ This is needed in particular - ++ to perform addition of field elements in finite fields represented - ++ in this way. See \spadtype{FFCGP}, \spadtype{FFCGX}. - createMultiplicationTable: SUP -> V L TERM - ++ createMultiplicationTable(f) generates a multiplication - ++ table for the normal basis of the field extension determined - ++ by {\em f}. This is needed to perform multiplications - ++ between elements represented as coordinate vectors to this basis. - ++ See \spadtype{FFNBP}, \spadtype{FFNBX}. - createMultiplicationMatrix: V L TERM -> M GF - ++ createMultiplicationMatrix(m) forms the multiplication table - ++ {\em m} into a matrix over the ground field. - -- only useful for the user to visualise the multiplication table - -- in a nice form - sizeMultiplication: V L TERM -> NNI - ++ sizeMultiplication(m) returns the number of entries - ++ of the multiplication table {\em m}. - -- the time of the multiplication of field elements depends - -- on this size - createLowComplexityTable: PI -> Union(Vector List TERM,"failed") - ++ createLowComplexityTable(n) tries to find - ++ a low complexity normal basis of degree {\em n} over {\em GF} - ++ and returns its multiplication matrix - ++ Fails, if it does not find a low complexity basis - createLowComplexityNormalBasis: PI -> Union(SUP, V L TERM) - ++ createLowComplexityNormalBasis(n) tries to find a - ++ a low complexity normal basis of degree {\em n} over {\em GF} - ++ and returns its multiplication matrix - ++ If no low complexity basis is found it calls - ++ \axiomFunFrom{createNormalPoly}{FiniteFieldPolynomialPackage}(n) to produce a normal - ++ polynomial of degree {\em n} over {\em GF} - - Implementation ==> add - - - createLowComplexityNormalBasis(n) == - (u:=createLowComplexityTable(n)) case "failed" => - createNormalPoly(n)$FiniteFieldPolynomialPackage(GF) - u::(V L TERM) - --- try to find a low complexity normal basis multiplication table --- of the field of extension degree n --- the algorithm is from: --- Wassermann A., Konstruktion von Normalbasen, --- Bayreuther Mathematische Schriften 31 (1989),1-9. - - createLowComplexityTable(n) == - q:=size()$GF - -- this algorithm works only for prime fields - p:=characteristic()$GF - -- search of a suitable parameter k - k:NNI:=0 - for i in 1..n-1 while (k=0) repeat - if prime?(i*n+1) and not(p = (i*n+1)) then - primitive?(q::PF(i*n+1))$PF(i*n+1) => - a:NNI:=1 - k:=i - t1:PF(k*n+1):=(q::PF(k*n+1))**n - gcd(n,a:=discreteLog(q::PF(n*i+1))$PF(n*i+1))$I = 1 => - k:=i - t1:=primitiveElement()$PF(k*n+1)**n - k = 0 => "failed" - -- initialize some start values - multmat:M PF(p):=zero(n,n) - p1:=(k*n+1) - pkn:=q::PF(p1) - t:=t1 pretend PF(p1) - if odd?(k) then - jt:I:=(n quo 2)+1 - vt:I:=positiveRemainder((k-a) quo 2,k)+1 - else - jt:I:=1 - vt:I:=(k quo 2)+1 - -- compute matrix - vec:Vector I:=zero(p1 pretend NNI) - for x in 1..k repeat - for l in 1..n repeat - vec.((t**(x-1) * pkn**(l-1)) pretend Integer+1):=_ - positiveRemainder(l,p1) - lvj:M I:=zero(k::NNI,n) - for v in 1..k repeat - for j in 1..n repeat - if (j^=jt) or (v^=vt) then - help:PF(p1):=t**(v-1)*pkn**(j-1)+1@PF(p1) - setelt(lvj,v,j,vec.(help pretend I +1)) - for j in 1..n repeat - if j^=jt then - for v in 1..k repeat - lvjh:=elt(lvj,v,j) - setelt(multmat,j,lvjh,elt(multmat,j,lvjh)+1) - for i in 1..n repeat - setelt(multmat,jt,i,positiveRemainder(-k,p)::PF(p)) - for v in 1..k repeat - if v^=vt then - lvjh:=elt(lvj,v,jt) - setelt(multmat,jt,lvjh,elt(multmat,jt,lvjh)+1) - -- multmat - m:=nrows(multmat)$(M PF(p)) - multtable:V L TERM:=new(m,nil()$(L TERM))$(V L TERM) - for i in 1..m repeat - l:L TERM:=nil()$(L TERM) - v:V PF(p):=row(multmat,i) - for j in (1::I)..(m::I) repeat - if (v.j ^= 0) then - -- take -v.j to get trace 1 instead of -1 - term:TERM:=[(convert(-v.j)@I)::GF,(j-2) pretend SI]$TERM - l:=cons(term,l)$(L TERM) - qsetelt_!(multtable,i,copy l)$(V L TERM) - multtable - - sizeMultiplication(m) == - s:NNI:=0 - for i in 1..#m repeat - s := s + #(m.i) - s - - createMultiplicationTable(f:SUP) == - sizeGF:NNI:=size()$GF -- the size of the ground field - m:PI:=degree(f)$SUP pretend PI - m=1 => - [[[-coefficient(f,0)$SUP,(-1)::SI]$TERM]$(L TERM)]::(V L TERM) - m1:I:=m-1 - -- initialize basis change matrices - setPoly(f)$MM - e:=reduce(monomial(1,1)$SUP)$MM ** sizeGF - w:=1$MM - qpow:PrimitiveArray(MM):=new(m,0) - qpow.0:=1$MM - for i in 1..m1 repeat - qpow.i:=(w:=w*e) - -- qpow.i = x**(i*q) - qexp:PrimitiveArray(MM):=new(m,0) - qexp.0:=reduce(monomial(1,1)$SUP)$MM - mat:M GF:=zero(m,m)$(M GF) - qsetelt_!(mat,2,1,1$GF)$(M GF) - h:=qpow.1 - qexp.1:=h - setColumn_!(mat,2,Vectorise(h)$MM)$(M GF) - for i in 2..m1 repeat - g:=0$MM - while h ^= 0 repeat - g:=g + leadingCoefficient(h) * qpow.degree(h)$MM - h:=reductum(h)$MM - qexp.i:=g - setColumn_!(mat,i+1,Vectorise(h:=g)$MM)$(M GF) - -- loop invariant: qexp.i = x**(q**i) - mat1:=inverse(mat)$(M GF) - mat1 = "failed" => - error "createMultiplicationTable: polynomial must be normal" - mat:=mat1 :: (M GF) - -- initialize multiplication table - multtable:V L TERM:=new(m,nil()$(L TERM))$(V L TERM) - for i in 1..m repeat - l:L TERM:=nil()$(L TERM) - v:V GF:=mat *$(M GF) Vectorise(qexp.(i-1) *$MM qexp.0)$MM - for j in (1::SI)..(m::SI) repeat - if (v.j ^= 0$GF) then - term:TERM:=[(v.j),j-(2::SI)]$TERM - l:=cons(term,l)$(L TERM) - qsetelt_!(multtable,i,copy l)$(V L TERM) - multtable - - - createZechTable(f:SUP) == - sizeGF:NNI:=size()$GF -- the size of the ground field - m:=degree(f)$SUP::PI - qm1:SI:=(sizeGF ** m -1) pretend SI - zechlog:ARR:=new(((sizeGF ** m + 1) quo 2)::NNI,-1::SI)$ARR - helparr:ARR:=new(sizeGF ** m::NNI,0$SI)$ARR - primElement:=reduce(monomial(1,1)$SUP)$SAE(GF,SUP,f) - a:=primElement - for i in 1..qm1-1 repeat - helparr.(lookup(a -$SAE(GF,SUP,f) 1$SAE(GF,SUP,f)_ - )$SAE(GF,SUP,f)):=i::SI - a:=a * primElement - characteristic() = 2 => - a:=primElement - for i in 1..(qm1 quo 2) repeat - zechlog.i:=helparr.lookup(a)$SAE(GF,SUP,f) - a:=a * primElement - zechlog - a:=1$SAE(GF,SUP,f) - for i in 0..((qm1-2) quo 2) repeat - zechlog.i:=helparr.lookup(a)$SAE(GF,SUP,f) - a:=a * primElement - zechlog - - createMultiplicationMatrix(m) == - n:NNI:=#m - mat:M GF:=zero(n,n)$(M GF) - for i in 1..n repeat - for t in m.i repeat - qsetelt_!(mat,i,t.index+2,t.value) - mat - -@ -\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/fffg.spad.pamphlet b/src/algebra/fffg.spad.pamphlet deleted file mode 100644 index 8402fb0..0000000 --- a/src/algebra/fffg.spad.pamphlet +++ /dev/null @@ -1,700 +0,0 @@ -\documentclass{article} -\usepackage{axiom,amsthm,amsmath,amssymb} -\newtheorem{ToDo}{ToDo}[section] -\begin{document} -\title{fffg.spad} -\author{Martin Rubey} -\maketitle -\begin{abstract} - The packages defined in this file provide fast fraction free rational - interpolation algorithms. -\end{abstract} -\tableofcontents -\section{package FAMR2 FiniteAbelianMonoidRingFunctions2} -<>= -)abbrev package FAMR2 FiniteAbelianMonoidRingFunctions2 -++ Author: Martin Rubey -++ Description: -++ This package provides a mapping function for \spadtype{FiniteAbelianMonoidRing} -FiniteAbelianMonoidRingFunctions2(E: OrderedAbelianMonoid, - R1: Ring, - A1: FiniteAbelianMonoidRing(R1, E), - R2: Ring, - A2: FiniteAbelianMonoidRing(R2, E)) _ - : Exports == Implementation where - Exports == with - - map: (R1 -> R2, A1) -> A2 - ++ \spad{map}(f, a) applies the map f to each coefficient in a. It is - ++ assumed that f maps 0 to 0 - - Implementation == add - - map(f: R1 -> R2, a: A1): A2 == - if zero? a then 0$A2 - else - monomial(f leadingCoefficient a, degree a)$A2 + map(f, reductum a) - -@ - -\section{package FFFG FractionFreeFastGaussian} -<>= -)abbrev package FFFG FractionFreeFastGaussian -++ Author: Martin Rubey -++ Description: -++ This package implements the interpolation algorithm proposed in Beckermann, -++ Bernhard and Labahn, George, Fraction-free computation of matrix rational -++ interpolants and matrix GCDs, SIAM Journal on Matrix Analysis and -++ Applications 22. -FractionFreeFastGaussian(D, V): Exports == Implementation where - D: Join(IntegralDomain, GcdDomain) - V: AbelianMonoidRing(D, NonNegativeInteger) -- for example, SUP D - - SUP ==> SparseUnivariatePolynomial - - cFunction ==> (NonNegativeInteger, Vector SUP D) -> D - - CoeffAction ==> (NonNegativeInteger, NonNegativeInteger, V) -> D - - Exports == with - - fffg: (List D, cFunction, List NonNegativeInteger) -> Matrix SUP D - ++ \spad{fffg} is the general algorithm as proposed by Beckermann and - ++ Labahn. - ++ - - ++ The first argument is the list of c_{i,i}. These are the only values - ++ of C explicitely needed in \spad{fffg}. - ++ - ++ The second argument c, computes c_k(M), i.e., c_k(.) is the dual basis - ++ of the vector space V, but also knows about the special multiplication - ++ rule as descibed in Equation (2). Note that the information about f - ++ is therefore encoded in c. - ++ - ++ The third argument is the vector of degree bounds n, as introduced in - ++ Definition 2.1. In particular, the sum of the entries is the order of - ++ the Mahler system computed. - - interpolate: (List D, List D, NonNegativeInteger) -> Fraction SUP D - ++ \spad{interpolate(xlist, ylist, deg} returns the rational function with - ++ numerator degree at most \spad{deg} and denominator degree at most - ++ \spad{#xlist-deg-1} that interpolates the given points using - ++ fraction free arithmetic. Note that rational interpolation does not - ++ guarantee that all given points are interpolated correctly: - ++ unattainable points may make this impossible. - -@ - -\begin{ToDo} - The following function could be moved to [[FFFGF]], parallel to - [[generalInterpolation]]. However, the reason for moving - [[generalInterpolation]] for fractions to a separate package was the need of - a generic signature, hence the extra argument [[VF]] to [[FFFGF]]. In the - special case of rational interpolation, this extra argument is not necessary, - since we are always returning a fraction of [[SUP]]s, and ignore [[V]]. In - fact, [[V]] is not needed for [[fffg]] itself, only if we want to specify a - [[CoeffAction]]. - - Thus, maybe it would be better to move [[fffg]] to a separate package? -\end{ToDo} - -<>= - interpolate: (List Fraction D, List Fraction D, NonNegativeInteger) - -> Fraction SUP D - ++ \spad{interpolate(xlist, ylist, deg} returns the rational function with - ++ numerator degree \spad{deg} that interpolates the given points using - ++ fraction free arithmetic. - - generalInterpolation: (List D, CoeffAction, - Vector V, List NonNegativeInteger) -> Matrix SUP D - ++ \spad{generalInterpolation(C, CA, f, eta)} performs Hermite-Pade - ++ approximation using the given action CA of polynomials on the elements - ++ of f. The result is guaranteed to be correct up to order - ++ |eta|-1. Given that eta is a "normal" point, the degrees on the - ++ diagonal are given by eta. The degrees of column i are in this case - ++ eta + e.i - [1,1,...,1], where the degree of zero is -1. - ++ - ++ The first argument C is the list of coefficients c_{k,k} in the - ++ expansion z g(x) = sum_{i=0}^k c_{k,i} g(x). - ++ - ++ The second argument, CA(k, l, f), should return the coefficient of x^k - ++ in z^l f(x). - - generalInterpolation: (List D, CoeffAction, - Vector V, NonNegativeInteger, NonNegativeInteger) - -> Stream Matrix SUP D - ++ \spad{generalInterpolation(C, CA, f, sumEta, maxEta)} applies - ++ \spad{generalInterpolation(C, CA, f, eta)} for all possible \spad{eta} - ++ with maximal entry \spad{maxEta} and sum of entries at most - ++ \spad{sumEta}. - ++ - ++ The first argument C is the list of coefficients c_{k,k} in the - ++ expansion z g(x) = sum_{i=0}^k c_{k,i} g(x). - ++ - ++ The second argument, CA(k, l, f), should return the coefficient of x^k - ++ in z^l f(x). - - generalCoefficient: (CoeffAction, Vector V, - NonNegativeInteger, Vector SUP D) -> D - ++ \spad{generalCoefficient(action, f, k, p)} gives the coefficient of - ++ x^k in p(z)\dot f(x), where the action of z^l on a polynomial in x is - ++ given by action, i.e., action(k, l, f) should return the coefficient - ++ of x^k in z^l f(x). - - ShiftAction: (NonNegativeInteger, NonNegativeInteger, V) -> D - ++ \spad{ShiftAction(k, l, g)} gives the coefficient of x^k in z^l g(x), - ++ where \spad{z*(a+b*x+c*x^2+d*x^3+...) = (b*x+2*c*x^2+3*d*x^3+...)}. In - ++ terms of sequences, z*u(n)=n*u(n). - - ShiftC: NonNegativeInteger -> List D - ++ \spad{ShiftC} gives the coefficients c_{k,k} in the expansion z - ++ g(x) = sum_{i=0}^k c_{k,i} g(x), where z acts on g(x) by - ++ shifting. In fact, the result is [0,1,2,...] - - DiffAction: (NonNegativeInteger, NonNegativeInteger, V) -> D - ++ \spad{DiffAction(k, l, g)} gives the coefficient of x^k in z^l g(x), - ++ where z*(a+b*x+c*x^2+d*x^3+...) = (a*x+b*x^2+c*x^3+...), i.e., - ++ multiplication with x. - - DiffC: NonNegativeInteger -> List D - ++ \spad{DiffC} gives the coefficients c_{k,k} in the expansion z - ++ g(x) = sum_{i=0}^k c_{k,i} g(x), where z acts on g(x) by - ++ shifting. In fact, the result is [0,0,0,...] - - qShiftAction: (D, NonNegativeInteger, NonNegativeInteger, V) -> D - ++ \spad{qShiftAction(q, k, l, g)} gives the coefficient of x^k in z^l - ++ g(x), where z*(a+b*x+c*x^2+d*x^3+...) = - ++ (a+q*b*x+q^2*c*x^2+q^3*d*x^3+...). In terms of sequences, - ++ z*u(n)=q^n*u(n). - - qShiftC: (D, NonNegativeInteger) -> List D - ++ \spad{qShiftC} gives the coefficients c_{k,k} in the expansion z - ++ g(x) = sum_{i=0}^k c_{k,i} g(x), where z acts on g(x) by - ++ shifting. In fact, the result is [1,q,q^2,...] - - Implementation ==> add - -------------------------------------------------------------------------------- --- Shift Operator -------------------------------------------------------------------------------- - --- ShiftAction(k, l, f) is the CoeffAction appropriate for the shift operator. - - ShiftAction(k: NonNegativeInteger, l: NonNegativeInteger, f: V): D == - k**l*coefficient(f, k) - - - ShiftC(total: NonNegativeInteger): List D == - [i::D for i in 0..total-1] - -------------------------------------------------------------------------------- --- q-Shift Operator -------------------------------------------------------------------------------- - --- q-ShiftAction(k, l, f) is the CoeffAction appropriate for the q-shift operator. - - qShiftAction(q: D, k: NonNegativeInteger, l: NonNegativeInteger, f: V): D == - q**(k*l)*coefficient(f, k) - - - qShiftC(q: D, total: NonNegativeInteger): List D == - [q**i for i in 0..total-1] - -------------------------------------------------------------------------------- --- Differentiation Operator -------------------------------------------------------------------------------- - --- DiffAction(k, l, f) is the CoeffAction appropriate for the differentiation --- operator. - - DiffAction(k: NonNegativeInteger, l: NonNegativeInteger, f: V): D == - coefficient(f, (k-l)::NonNegativeInteger) - - - DiffC(total: NonNegativeInteger): List D == - [0 for i in 1..total] - -------------------------------------------------------------------------------- --- general - suitable for functions f -------------------------------------------------------------------------------- - --- get the coefficient of z^k in the scalar product of p and f, the action --- being defined by coeffAction - - generalCoefficient(coeffAction: CoeffAction, f: Vector V, - k: NonNegativeInteger, p: Vector SUP D): D == - res: D := 0 - for i in 1..#f repeat - --- Defining a and b and summing only over those coefficients that might be --- nonzero makes a huge difference in speed - a := f.i - b := p.i - for l in minimumDegree b..degree b repeat - if not zero? coefficient(b, l) - then res := res + coefficient(b, l) * coeffAction(k, l, a) - res - - - generalInterpolation(C: List D, coeffAction: CoeffAction, - f: Vector V, - eta: List NonNegativeInteger): Matrix SUP D == - - c: cFunction := generalCoefficient(coeffAction, f, - (#1-1)::NonNegativeInteger, #2) - fffg(C, c, eta) - - - -------------------------------------------------------------------------------- --- general - suitable for functions f - trying all possible degree combinations -------------------------------------------------------------------------------- - -@ - -The following function returns the lexicographically next vector with -non-negative components smaller than [[p]] with the same sum as [[v]]. - -<>= - nextVector!(p: NonNegativeInteger, v: List NonNegativeInteger) - : Union("failed", List NonNegativeInteger) == - n := #v - pos := position(#1 < p, v) - zero? pos => return "failed" - if pos = 1 then - sum: Integer := v.1 - for i in 2..n repeat - if v.i < p and sum > 0 then - v.i := v.i + 1 - sum := sum - 1 - for j in 1..i-1 repeat - if sum > p then - v.j := p - sum := sum - p - else - v.j := sum::NonNegativeInteger - sum := 0 - return v - else sum := sum + v.i - return "failed" - else - v.pos := v.pos + 1 - v.(pos-1) := (v.(pos-1) - 1)::NonNegativeInteger - - v -@ - -The following function returns the stream of all possible degree vectors, -beginning with [[v]], where the degree vectors are sorted in reverse -lexicographic order. Furthermore, the entries are all less or equal to [[p]] -and their sum equals the sum of the entries of [[v]]. We assume that the -entries of [[v]] are also all less or equal to [[p]]. - -<>= - vectorStream(p: NonNegativeInteger, v: List NonNegativeInteger) - : Stream List NonNegativeInteger == delay - next := nextVector!(p, copy v) - (next case "failed") => empty()$Stream(List NonNegativeInteger) - cons(next, vectorStream(p, next)) -@ - -[[vectorStream2]] skips every second entry of [[vectorStream]]. - -<>= - vectorStream2(p: NonNegativeInteger, v: List NonNegativeInteger) - : Stream List NonNegativeInteger == delay - next := nextVector!(p, copy v) - (next case "failed") => empty()$Stream(List NonNegativeInteger) - next2 := nextVector!(p, copy next) - (next2 case "failed") => cons(next, empty()) - cons(next2, vectorStream2(p, next2)) -@ - -This version of [[generalInterpolation]] returns a stream of solutions, one for -each possible degree vector. Thus, it only needs to apply the previously -defined [[generalInterpolation]] to each degree vector. These are generated by -[[vectorStream]] and [[vectorStream2]] respectively. - -If [[f]] consists of two elements only, we can skip every second degree vector: -note that [[fffg]], and thus also [[generalInterpolation]], returns a matrix -with [[#f]] columns, each corresponding to a solution of the interpolation -problem. More precisely, the $i$\textsuperscript{th} column is a solution with -degrees [[eta]]$-(1,1,\dots,1)+e_i$. Thus, in the case of $2\times 2$ matrices, -[[vectorStream]] would produce solutions corresponding to $(d,0), (d-1,1); -(d-1,1), (d-2, 2); (d-2, 2), (d-3,3)\dots$, i.e., every second matrix is -redundant. - -Although some redundancy exists also for higher dimensional [[f]], the scheme -becomes much more complicated, thus we did not implement it. - -<>= - generalInterpolation(C: List D, coeffAction: CoeffAction, - f: Vector V, - sumEta: NonNegativeInteger, - maxEta: NonNegativeInteger) - : Stream Matrix SUP D == - - <> - - if #f = 2 then - map(generalInterpolation(C, coeffAction, f, #1), - cons(eta, vectorStream2(maxEta, eta))) - $StreamFunctions2(List NonNegativeInteger, - Matrix SUP D) - else - map(generalInterpolation(C, coeffAction, f, #1), - cons(eta, vectorStream(maxEta, eta))) - $StreamFunctions2(List NonNegativeInteger, - Matrix SUP D) -@ - -We need to generate an initial degree vector, being the minimal element in -reverse lexicographic order, i.e., $m, m, \dots, m, k, 0, 0, \dots$, where $m$ -is [[maxEta]] and $k$ is the remainder of [[sumEta]] divided by -[[maxEta]]. This is done by the following code: - -<>= -sum: Integer := sumEta -entry: Integer -eta: List NonNegativeInteger - := [(if sum < maxEta _ - then (entry := sum; sum := 0) _ - else (entry := maxEta; sum := sum - maxEta); _ - entry::NonNegativeInteger) for i in 1..#f] -@ - -We want to generate all vectors with sum of entries being at most -[[sumEta]]. Therefore the following is incorrect. -<>= --- (sum > 0) => empty()$Stream(Matrix SUP D) -@ - -<>= -------------------------------------------------------------------------------- --- rational interpolation -------------------------------------------------------------------------------- - - interpolate(x: List Fraction D, y: List Fraction D, d: NonNegativeInteger) - : Fraction SUP D == - gx := splitDenominator(x)$InnerCommonDenominator(D, Fraction D, _ - List D, _ - List Fraction D) - gy := splitDenominator(y)$InnerCommonDenominator(D, Fraction D, _ - List D, _ - List Fraction D) - r := interpolate(gx.num, gy.num, d) - elt(numer r, monomial(gx.den,1))/(gy.den*elt(denom r, monomial(gx.den,1))) - - - interpolate(x: List D, y: List D, d: NonNegativeInteger): Fraction SUP D == --- berechne Interpolante mit Graden d und N-d-1 - if (N := #x) ~= #y then - error "interpolate: number of points and values must match" - if N <= d then - error "interpolate: numerator degree must be smaller than number of data points" - c: cFunction := y.#1 * elt(#2.2, x.#1) - elt(#2.1, x.#1) - eta: List NonNegativeInteger := [d, (N-d)::NonNegativeInteger] - M := fffg(x, c, eta) - - if zero?(M.(2,1)) then M.(1,2)/M.(2,2) - else M.(1,1)/M.(2,1) - -@ -Because of Lemma~5.3, [[M.1.(2,1)]] and [[M.1.(2,2)]] cannot both vanish, -since [[eta_sigma]] is always $\sigma$-normal by Theorem~7.2 and therefore also -para-normal, see Definition~4.2. - -Because of Lemma~5.1 we have that [[M.1.(*,2)]] is a solution of the -interpolation problem, if [[M.1.(2,1)]] vanishes. - -<>= -------------------------------------------------------------------------------- --- fffg -------------------------------------------------------------------------------- -@ - -[[recurrence]] computes the new matrix $M$, according to the following formulas -(cf. Table~2 in Beckermann and Labahn): -\begin{align*} - &\text{Increase order}\\ - &\quad\quad\text{for $\ell=1\dots m$, $\ell\neq\pi$}\\ - &\quad\quad\quad\quad\mathbf M_{\sigma+1}^{(.,\ell)} := - \left(\mathbf M_{\sigma}^{(.,\ell)}r^{(\pi)} - - \mathbf M_{\sigma}^{(.,\pi)}r^{(\ell)}\right)/d_\sigma\\ - &\text{Increase order in column $\pi$}\\ - &\quad\quad\mathbf M_{\sigma+1}^{(.,\pi)} := - \left(z-c_{\sigma,\sigma}\right)\mathbf M_{\sigma}^{(.,\pi)}\\ - &\text{Adjust degree constraints:}\\ - &\quad\quad\mathbf M_{\sigma+1}^{(.,\pi)} := - \left(\mathbf M_{\sigma+1}^{(.,\pi)}r^{(\pi)} - - \sum_{\ell\neq\pi}\mathbf M_{\sigma+1}^{(.,\ell)}p^{(\ell)} - \right)/d_\sigma -\end{align*} - -Since we do not need the matrix $\mathbf M_{\sigma}$ anymore, we drop the index -and update the matrix destructively. In the following, we write [[Ck]] for -$c_{\sigma,\sigma}$. - -<>= --- a major part of the time is spent here - recurrence(M: Matrix SUP D, pi: NonNegativeInteger, m: NonNegativeInteger, - r: Vector D, d: D, z: SUP D, Ck: D, p: Vector D): Matrix SUP D == - - rPi: D := qelt(r, pi) - polyf: SUP D := rPi * (z - Ck::SUP D) - - for i in 1..m repeat - MiPi: SUP D := qelt(M, i, pi) - newMiPi: SUP D := polyf * MiPi - --- update columns ~= pi and calculate their sum - for l in 1..m | l ~= pi repeat - rl: D := qelt(r, l) --- I need the coercion to SUP D, since exquo returns an element of --- Union("failed", SUP D)... - Mil: SUP D := ((qelt(M, i, l) * rPi - MiPi * rl) exquo d)::SUP D - qsetelt!(M, i, l, Mil) - - pl: D := qelt(p, l) - newMiPi := newMiPi - pl * Mil - --- update column pi - qsetelt!(M, i, pi, (newMiPi exquo d)::SUP D) - - M - - - fffg(C: List D, c: cFunction, eta: List NonNegativeInteger): Matrix SUP D == --- eta is the vector of degrees. We compute M with degrees eta+e_i-1, i=1..m - z: SUP D := monomial(1, 1) - m: NonNegativeInteger := #eta - M: Matrix SUP D := scalarMatrix(m, 1) - d: D := 1 - K: NonNegativeInteger := reduce(_+, eta) - etak: Vector NonNegativeInteger := zero(m) - r: Vector D := zero(m) - p: Vector D := zero(m) - Lambda: List Integer - lambdaMax: Integer - lambda: NonNegativeInteger - - for k in 1..K repeat --- k = sigma+1 - - for l in 1..m repeat r.l := c(k, column(M, l)) - - Lambda := [eta.l-etak.l for l in 1..m | r.l ~= 0] - --- if Lambda is empty, then M, d and etak remain unchanged. Otherwise, we look --- for the next closest para-normal point. - - (empty? Lambda) => "iterate" - - lambdaMax := reduce(max, Lambda) - lambda := 1 - while eta.lambda-etak.lambda < lambdaMax or r.lambda = 0 repeat - lambda := lambda + 1 - --- Calculate leading coefficients - - for l in 1..m | l ~= lambda repeat - if etak.l > 0 then - p.l := coefficient(M.(l, lambda), - (etak.l-1)::NonNegativeInteger) - else - p.l := 0 - --- increase order and adjust degree constraints - - M := recurrence(M, lambda, m, r, d, z, C.k, p) - - d := r.lambda - etak.lambda := etak.lambda + 1 - - M - -@ -%$ - -\section{package FFFGF FractionFreeFastGaussianFractions} -<>= -)abbrev package FFFGF FractionFreeFastGaussianFractions -++ Author: Martin Rubey -++ Description: -++ This package lifts the interpolation functions from -++ \spadtype{FractionFreeFastGaussian} to fractions. -FractionFreeFastGaussianFractions(D, V, VF): Exports == Implementation where - D: Join(IntegralDomain, GcdDomain) - V: FiniteAbelianMonoidRing(D, NonNegativeInteger) - VF: FiniteAbelianMonoidRing(Fraction D, NonNegativeInteger) - - F ==> Fraction D - - SUP ==> SparseUnivariatePolynomial - - FFFG ==> FractionFreeFastGaussian - - FAMR2 ==> FiniteAbelianMonoidRingFunctions2 - - cFunction ==> (NonNegativeInteger, Vector SUP D) -> D - - CoeffAction ==> (NonNegativeInteger, NonNegativeInteger, V) -> D --- coeffAction(k, l, f) is the coefficient of x^k in z^l f(x) - - Exports == with - - generalInterpolation: (List D, CoeffAction, Vector VF, List NonNegativeInteger) - -> Matrix SUP D - ++ \spad{generalInterpolation(l, CA, f, eta)} performs Hermite-Pade - ++ approximation using the given action CA of polynomials on the elements - ++ of f. The result is guaranteed to be correct up to order - ++ |eta|-1. Given that eta is a "normal" point, the degrees on the - ++ diagonal are given by eta. The degrees of column i are in this case - ++ eta + e.i - [1,1,...,1], where the degree of zero is -1. - - generalInterpolation: (List D, CoeffAction, - Vector VF, NonNegativeInteger, NonNegativeInteger) - -> Stream Matrix SUP D - ++ \spad{generalInterpolation(l, CA, f, sumEta, maxEta)} applies - ++ generalInterpolation(l, CA, f, eta) for all possible eta with maximal - ++ entry maxEta and sum of entries sumEta - - Implementation == add - - multiplyRows!(v: Vector D, M: Matrix SUP D): Matrix SUP D == - n := #v - for i in 1..n repeat - for j in 1..n repeat - M.(i,j) := v.i*M.(i,j) - - M - - generalInterpolation(C: List D, coeffAction: CoeffAction, - f: Vector VF, eta: List NonNegativeInteger): Matrix SUP D == - n := #f - g: Vector V := new(n, 0) - den: Vector D := new(n, 0) - - for i in 1..n repeat - c := coefficients(f.i) - den.i := commonDenominator(c)$CommonDenominator(D, F, List F) - g.i := map(retract(#1*den.i)@D, f.i) - $FAMR2(NonNegativeInteger, Fraction D, VF, D, V) - - M := generalInterpolation(C, coeffAction, g, eta)$FFFG(D, V) - --- The following is necessary since I'm multiplying each row with a factor, not --- each column. Possibly I could factor out gcd den, but I'm not sure whether --- this is efficient. - - multiplyRows!(den, M) - - generalInterpolation(C: List D, coeffAction: CoeffAction, - f: Vector VF, - sumEta: NonNegativeInteger, - maxEta: NonNegativeInteger) - : Stream Matrix SUP D == - - n := #f - g: Vector V := new(n, 0) - den: Vector D := new(n, 0) - - for i in 1..n repeat - c := coefficients(f.i) - den.i := commonDenominator(c)$CommonDenominator(D, F, List F) - g.i := map(retract(#1*den.i)@D, f.i) - $FAMR2(NonNegativeInteger, Fraction D, VF, D, V) - - c: cFunction := generalCoefficient(coeffAction, g, - (#1-1)::NonNegativeInteger, #2)$FFFG(D, V) - - - MS: Stream Matrix SUP D - := generalInterpolation(C, coeffAction, g, sumEta, maxEta)$FFFG(D, V) - --- The following is necessary since I'm multiplying each row with a factor, not --- each column. Possibly I could factor out gcd den, but I'm not sure whether --- this is efficient. - - map(multiplyRows!(den, #1), MS)$Stream(Matrix SUP D) - -@ - - -\section{package NEWTON NewtonInterpolation} -<>= -)abbrev package NEWTON NewtonInterpolation -++ Description: -++ This package exports Newton interpolation for the special case where the -++ result is known to be in the original integral domain -NewtonInterpolation F: Exports == Implementation where - F: IntegralDomain - Exports == with - - newton: List F -> SparseUnivariatePolynomial F - - ++ \spad{newton}(l) returns the interpolating polynomial for the values - ++ l, where the x-coordinates are assumed to be [1,2,3,...,n] and the - ++ coefficients of the interpolating polynomial are known to be in the - ++ domain F. I.e., it is a very streamlined version for a special case of - ++ interpolation. - - Implementation == add - - differences(yl: List F): List F == - [y2-y1 for y1 in yl for y2 in rest yl] - - z: SparseUnivariatePolynomial(F) := monomial(1,1) - --- we assume x=[1,2,3,...,n] - newtonAux(k: F, fact: F, yl: List F): SparseUnivariatePolynomial(F) == - if empty? rest yl - then ((yl.1) exquo fact)::F::SparseUnivariatePolynomial(F) - else ((yl.1) exquo fact)::F::SparseUnivariatePolynomial(F) - + (z-k::SparseUnivariatePolynomial(F)) _ - * newtonAux(k+1$F, fact*k, differences yl) - - - newton yl == newtonAux(1$F, 1$F, yl) - -@ -%$ - -\section{License} -<>= ---Copyright (c) 2006-2007, Martin Rubey --- ---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. --- ---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. -@ - -<<*>>= -<> - -<> -<> -<> -<> -@ -\end{document} diff --git a/src/algebra/ffhom.spad.pamphlet b/src/algebra/ffhom.spad.pamphlet deleted file mode 100644 index 50bf7ef..0000000 --- a/src/algebra/ffhom.spad.pamphlet +++ /dev/null @@ -1,431 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra ffhom.spad} -\author{Johannes Grabmeier, Alfred Scheerhorn} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\begin{verbatim} --- 28.01.93: AS and JG: setting of init? flag in --- functions initialize put at the --- end to avoid errors with interruption. --- 12.05.92 JG: long lines --- 17.02.92 AS: convertWRTdifferentDefPol12 and convertWRTdifferentDefPol21 --- simplified. --- 17.02.92 AS: initialize() modified set up of basis change --- matrices between normal and polynomial rep. --- New version uses reducedQPowers and is more efficient. --- 24.07.92 JG: error messages improved -\end{verbatim} -\section{package FFHOM FiniteFieldHomomorphisms} -<>= -)abbrev package FFHOM FiniteFieldHomomorphisms -++ Authors: J.Grabmeier, A.Scheerhorn -++ Date Created: 26.03.1991 -++ Date Last Updated: -++ Basic Operations: -++ Related Constructors: FiniteFieldCategory, FiniteAlgebraicExtensionField -++ Also See: -++ AMS Classifications: -++ Keywords: finite field, homomorphism, isomorphism -++ References: -++ R.Lidl, H.Niederreiter: Finite Field, Encycoldia of Mathematics and -++ Its Applications, Vol. 20, Cambridge Univ. Press, 1983, ISBN 0 521 30240 4 -++ J. Grabmeier, A. Scheerhorn: Finite Fields in AXIOM. -++ AXIOM Technical Report Series, ATR/5 NP2522. -++ Description: -++ FiniteFieldHomomorphisms(F1,GF,F2) exports coercion functions of -++ elements between the fields {\em F1} and {\em F2}, which both must be -++ finite simple algebraic extensions of the finite ground field {\em GF}. -FiniteFieldHomomorphisms(F1,GF,F2): Exports == Implementation where - F1: FiniteAlgebraicExtensionField(GF) - GF: FiniteFieldCategory - F2: FiniteAlgebraicExtensionField(GF) - -- the homorphism can only convert elements w.r.t. the last extension . - -- Adding a function 'groundField()' which returns the groundfield of GF - -- as a variable of type FiniteFieldCategory in the new compiler, one - -- could build up 'convert' recursively to get an homomorphism w.r.t - -- the whole extension. - - I ==> Integer - NNI ==> NonNegativeInteger - SI ==> SingleInteger - PI ==> PositiveInteger - SUP ==> SparseUnivariatePolynomial - M ==> Matrix GF - FFP ==> FiniteFieldExtensionByPolynomial - FFPOL2 ==> FiniteFieldPolynomialPackage2 - FFPOLY ==> FiniteFieldPolynomialPackage - OUT ==> OutputForm - - Exports ==> with - - coerce: F1 -> F2 - ++ coerce(x) is the homomorphic image of x from - ++ {\em F1} in {\em F2}. Thus {\em coerce} is a - ++ field homomorphism between the fields extensions - ++ {\em F1} and {\em F2} both over ground field {\em GF} - ++ (the second argument to the package). - ++ Error: if the extension degree of {\em F1} doesn't divide - ++ the extension degree of {\em F2}. - ++ Note that the other coercion function in the - ++ \spadtype{FiniteFieldHomomorphisms} is a left inverse. - - coerce: F2 -> F1 - ++ coerce(x) is the homomorphic image of x from - ++ {\em F2} in {\em F1}, where {\em coerce} is a - ++ field homomorphism between the fields extensions - ++ {\em F2} and {\em F1} both over ground field {\em GF} - ++ (the second argument to the package). - ++ Error: if the extension degree of {\em F2} doesn't divide - ++ the extension degree of {\em F1}. - ++ Note that the other coercion function in the - ++ \spadtype{FiniteFieldHomomorphisms} is a left inverse. - -- coerce(coerce(x:F1)@F2)@F1 = x and coerce(coerce(y:F2)@F1)@F2 = y - - Implementation ==> add - --- global variables =================================================== - - degree1:NNI:= extensionDegree()$F1 - degree2:NNI:= extensionDegree()$F2 - -- the degrees of the last extension - - -- a necessary condition for the one field being an subfield of - -- the other one is, that the respective extension degrees are - -- multiples - if max(degree1,degree2) rem min(degree1,degree2) ^= 0 then - error "FFHOM: one extension degree must divide the other one" - - conMat1to2:M:= zero(degree2,degree1)$M - -- conversion Matix for the conversion direction F1 -> F2 - conMat2to1:M:= zero(degree1,degree2)$M - -- conversion Matix for the conversion direction F2 -> F1 - - repType1:=representationType()$F1 - repType2:=representationType()$F2 - -- the representation types of the fields - - init?:Boolean:=true - -- gets false after initialization - - defPol1:=definingPolynomial()$F1 - defPol2:=definingPolynomial()$F2 - -- the defining polynomials of the fields - - --- functions ========================================================== - - - compare: (SUP GF,SUP GF) -> Boolean - -- compares two polynomials - - convertWRTsameDefPol12: F1 -> F2 - convertWRTsameDefPol21: F2 -> F1 - -- homomorphism if the last extension of F1 and F2 was build up - -- using the same defining polynomials - - convertWRTdifferentDefPol12: F1 -> F2 - convertWRTdifferentDefPol21: F2 -> F1 - -- homomorphism if the last extension of F1 and F2 was build up - -- with different defining polynomials - - initialize: () -> Void - -- computes the conversion matrices - - compare(g:(SUP GF),f:(SUP GF)) == - degree(f)$(SUP GF) >$NNI degree(g)$(SUP GF) => true - degree(f)$(SUP GF) <$NNI degree(g)$(SUP GF) => false - equal:Integer:=0 - for i in degree(f)$(SUP GF)..0 by -1 while equal=0 repeat - not zero?(coefficient(f,i)$(SUP GF))$GF and _ - zero?(coefficient(g,i)$(SUP GF))$GF => equal:=1 - not zero?(coefficient(g,i)$(SUP GF))$GF and _ - zero?(coefficient(f,i)$(SUP GF))$GF => equal:=(-1) - (f1:=lookup(coefficient(f,i)$(SUP GF))$GF) >$PositiveInteger _ - (g1:=lookup(coefficient(g,i)$(SUP GF))$GF) => equal:=1 - f1 <$PositiveInteger g1 => equal:=(-1) - equal=1 => true - false - - initialize() == - -- 1) in the case of equal def. polynomials initialize is called only - -- if one of the rep. types is "normal" and the other one is "polynomial" - -- we have to compute the basis change matrix 'mat', which i-th - -- column are the coordinates of a**(q**i), the i-th component of - -- the normal basis ('a' the root of the def. polynomial and q the - -- size of the groundfield) - defPol1 =$(SUP GF) defPol2 => - -- new code using reducedQPowers - mat:=zero(degree1,degree1)$M - arr:=reducedQPowers(defPol1)$FFPOLY(GF) - for i in 1..degree1 repeat - setColumn_!(mat,i,vectorise(arr.(i-1),degree1)$SUP(GF))$M - -- old code - -- here one of the representation types must be "normal" - --a:=basis()$FFP(GF,defPol1).2 -- the root of the def. polynomial - --setColumn_!(mat,1,coordinates(a)$FFP(GF,defPol1))$M - --for i in 2..degree1 repeat - -- a:= a **$FFP(GF,defPol1) size()$GF - -- setColumn_!(mat,i,coordinates(a)$FFP(GF,defPol1))$M - --for the direction "normal" -> "polynomial" we have to multiply the - -- coordinate vector of an element of the normal basis field with - -- the matrix 'mat'. In this case 'mat' is the correct conversion - -- matrix for the conversion of F1 to F2, its inverse the correct - -- inversion matrix for the conversion of F2 to F1 - repType1 = "normal" => -- repType2 = "polynomial" - conMat1to2:=copy(mat) - conMat2to1:=copy(inverse(mat)$M :: M) - --we finish the function for one case, hence reset initialization flag - init? := false - void()$Void - -- print("'normal' <=> 'polynomial' matrices initialized"::OUT) - -- in the other case we have to change the matrices - -- repType2 = "normal" and repType1 = "polynomial" - conMat2to1:=copy(mat) - conMat1to2:=copy(inverse(mat)$M :: M) - -- print("'normal' <=> 'polynomial' matrices initialized"::OUT) - --we finish the function for one case, hence reset initialization flag - init? := false - void()$Void - -- 2) in the case of different def. polynomials we have to order the - -- fields to get the same isomorphism, if the package is called with - -- the fields F1 and F2 swapped. - dPbig:= defPol2 - rTbig:= repType2 - dPsmall:= defPol1 - rTsmall:= repType1 - degbig:=degree2 - degsmall:=degree1 - if compare(defPol2,defPol1) then - degsmall:=degree2 - degbig:=degree1 - dPbig:= defPol1 - rTbig:= repType1 - dPsmall:= defPol2 - rTsmall:= repType2 - -- 3) in every case we need a conversion between the polynomial - -- represented fields. Therefore we compute 'root' as a root of the - -- 'smaller' def. polynomial in the 'bigger' field. - -- We compute the matrix 'matsb', which i-th column are the coordinates - -- of the (i-1)-th power of root, i=1..degsmall. Multiplying a - -- coordinate vector of an element of the 'smaller' field by this - -- matrix, we got the coordinates of the corresponding element in the - -- 'bigger' field. - -- compute the root of dPsmall in the 'big' field - root:=rootOfIrreduciblePoly(dPsmall)$FFPOL2(FFP(GF,dPbig),GF) - -- set up matrix for polynomial conversion - matsb:=zero(degbig,degsmall)$M - qsetelt_!(matsb,1,1,1$GF)$M - a:=root - for i in 2..degsmall repeat - setColumn_!(matsb,i,coordinates(a)$FFP(GF,dPbig))$M - a := a *$FFP(GF,dPbig) root - -- the conversion from 'big' to 'small': we can't invert matsb - -- directly, because it has degbig rows and degsmall columns and - -- may be no square matrix. Therfore we construct a square matrix - -- mat from degsmall linear independent rows of matsb and invert it. - -- Now we get the conversion matrix 'matbs' for the conversion from - -- 'big' to 'small' by putting the columns of mat at the indices - -- of the linear independent rows of matsb to columns of matbs. - ra:I:=1 -- the rank - mat:M:=transpose(row(matsb,1))$M -- has already rank 1 - rowind:I:=2 - iVec:Vector I:=new(degsmall,1$I)$(Vector I) - while ra < degsmall repeat - if rank(vertConcat(mat,transpose(row(matsb,rowind))$M)$M)$M > ra then - mat:=vertConcat(mat,transpose(row(matsb,rowind))$M)$M - ra:=ra+1 - iVec.ra := rowind - rowind:=rowind + 1 - mat:=inverse(mat)$M :: M - matbs:=zero(degsmall,degbig)$M - for i in 1..degsmall repeat - setColumn_!(matbs,iVec.i,column(mat,i)$M)$M - -- print(matsb::OUT) - -- print(matbs::OUT) - -- 4) if the 'bigger' field is "normal" we have to compose the - -- polynomial conversion with a conversion from polynomial to normal - -- between the FFP(GF,dPbig) and FFNBP(GF,dPbig) the 'bigger' - -- field. Therefore we compute a conversion matrix 'mat' as in 1) - -- Multiplying with the inverse of 'mat' yields the desired - -- conversion from polynomial to normal. Multiplying this matrix by - -- the above computed 'matsb' we got the matrix for converting form - -- 'small polynomial' to 'big normal'. - -- set up matrix 'mat' for polynomial to normal - if rTbig = "normal" then - arr:=reducedQPowers(dPbig)$FFPOLY(GF) - mat:=zero(degbig,degbig)$M - for i in 1..degbig repeat - setColumn_!(mat,i,vectorise(arr.(i-1),degbig)$SUP(GF))$M - -- old code - --a:=basis()$FFP(GF,dPbig).2 -- the root of the def.Polynomial - --setColumn_!(mat,1,coordinates(a)$FFP(GF,dPbig))$M - --for i in 2..degbig repeat - -- a:= a **$FFP(GF,dPbig) size()$GF - -- setColumn_!(mat,i,coordinates(a)$FFP(GF,dPbig))$M - -- print(inverse(mat)$M::OUT) - matsb:= (inverse(mat)$M :: M) * matsb - -- print("inv *.."::OUT) - matbs:=matbs * mat - -- 5) if the 'smaller' field is "normal" we have first to convert - -- from 'small normal' to 'small polynomial', that is from - -- FFNBP(GF,dPsmall) to FFP(GF,dPsmall). Therefore we compute a - -- conversion matrix 'mat' as in 1). Multiplying with 'mat' - -- yields the desired conversion from normal to polynomial. - -- Multiplying the above computed 'matsb' with 'mat' we got the - -- matrix for converting form 'small normal' to 'big normal'. - -- set up matrix 'mat' for normal to polynomial - if rTsmall = "normal" then - arr:=reducedQPowers(dPsmall)$FFPOLY(GF) - mat:=zero(degsmall,degsmall)$M - for i in 1..degsmall repeat - setColumn_!(mat,i,vectorise(arr.(i-1),degsmall)$SUP(GF))$M - -- old code - --b:FFP(GF,dPsmall):=basis()$FFP(GF,dPsmall).2 - --setColumn_!(mat,1,coordinates(b)$FFP(GF,dPsmall))$M - --for i in 2..degsmall repeat - -- b:= b **$FFP(GF,dPsmall) size()$GF - -- setColumn_!(mat,i,coordinates(b)$FFP(GF,dPsmall))$M - -- print(mat::OUT) - matsb:= matsb * mat - matbs:= (inverse(mat) :: M) * matbs - -- now 'matsb' is the corret conversion matrix for 'small' to 'big' - -- and 'matbs' the corret one for 'big' to 'small'. - -- depending on the above ordering the conversion matrices are - -- initialized - dPbig =$(SUP GF) defPol2 => - conMat1to2 :=matsb - conMat2to1 :=matbs - -- print(conMat1to2::OUT) - -- print(conMat2to1::OUT) - -- print("conversion matrices initialized"::OUT) - --we finish the function for one case, hence reset initialization flag - init? := false - void()$Void - conMat1to2 :=matbs - conMat2to1 :=matsb - -- print(conMat1to2::OUT) - -- print(conMat2to1::OUT) - -- print("conversion matrices initialized"::OUT) - --we finish the function for one case, hence reset initialization flag - init? := false - void()$Void - - - coerce(x:F1) == - inGroundField?(x)$F1 => retract(x)$F1 :: F2 - -- if x is already in GF then we can use a simple coercion - defPol1 =$(SUP GF) defPol2 => convertWRTsameDefPol12(x) - convertWRTdifferentDefPol12(x) - - convertWRTsameDefPol12(x:F1) == - repType1 = repType2 => x pretend F2 - -- same groundfields, same defining polynomials, same - -- representation types --> F1 = F2, x is already in F2 - repType1 = "cyclic" => - x = 0$F1 => 0$F2 - -- the SI corresponding to the cyclic representation is the exponent of - -- the primitiveElement, therefore we exponentiate the primitiveElement - -- of F2 by it. - primitiveElement()$F2 **$F2 (x pretend SI) - repType2 = "cyclic" => - x = 0$F1 => 0$F2 - -- to get the exponent, we have to take the discrete logarithm of the - -- element in the given field. - (discreteLog(x)$F1 pretend SI) pretend F2 - -- here one of the representation types is "normal" - if init? then initialize() - -- here a conversion matrix is necessary, (see initialize()) - represents(conMat1to2 *$(Matrix GF) coordinates(x)$F1)$F2 - - convertWRTdifferentDefPol12(x:F1) == - if init? then initialize() - -- if we want to convert into a 'smaller' field, we have to test, - -- whether the element is in the subfield of the 'bigger' field, which - -- corresponds to the 'smaller' field - if degree1 > degree2 then - if positiveRemainder(degree2,degree(x)$F1)^= 0 then - error "coerce: element doesn't belong to smaller field" - represents(conMat1to2 *$(Matrix GF) coordinates(x)$F1)$F2 - --- the three functions below equal the three functions above up to --- '1' exchanged by '2' in all domain and variable names - - - coerce(x:F2) == - inGroundField?(x)$F2 => retract(x)$F2 :: F1 - -- if x is already in GF then we can use a simple coercion - defPol1 =$(SUP GF) defPol2 => convertWRTsameDefPol21(x) - convertWRTdifferentDefPol21(x) - - convertWRTsameDefPol21(x:F2) == - repType1 = repType2 => x pretend F1 - -- same groundfields, same defining polynomials, - -- same representation types --> F1 = F2, that is: - -- x is already in F1 - repType2 = "cyclic" => - x = 0$F2 => 0$F1 - primitiveElement()$F1 **$F1 (x pretend SI) - repType1 = "cyclic" => - x = 0$F2 => 0$F1 - (discreteLog(x)$F2 pretend SI) pretend F1 - -- here one of the representation types is "normal" - if init? then initialize() - represents(conMat2to1 *$(Matrix GF) coordinates(x)$F2)$F1 - - convertWRTdifferentDefPol21(x:F2) == - if init? then initialize() - if degree2 > degree1 then - if positiveRemainder(degree1,degree(x)$F2)^= 0 then - error "coerce: element doesn't belong to smaller field" - represents(conMat2to1 *$(Matrix GF) coordinates(x)$F2)$F1 - -@ -\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/ffnb.spad.pamphlet b/src/algebra/ffnb.spad.pamphlet deleted file mode 100644 index b9321b8..0000000 --- a/src/algebra/ffnb.spad.pamphlet +++ /dev/null @@ -1,425 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra ffnb.spad} -\author{Johannes Grabmeier, Alfred Scheerhorn} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\begin{verbatim} --- 28.01.93: AS and JG: setting of initlog?, initmult?, and initelt? flags in --- functions initializeLog, initializeMult and initializeElt put at the --- end to avoid errors with interruption. --- factorsOfCyclicGroupSize() changed. --- 12.05.92: JG: long lines --- 25.02.92: AS: parametrization of FFNBP changed, compatible to old --- parametrization. Along with this some changes concerning --- global variables and deletion of impl. of represents. --- 25.02.92: AS: parameter in implementation of FFNB,FFNBX changed: --- Extension now generated by --- createLowComplexityNormalBasis(extdeg)$FFF(GF) --- 25.02.92: AS added following functions in FFNBP: degree, --- linearAssociatedExp,linearAssociatedLog,linearAssociatedOrder --- 19.02.92: AS: FFNBP trace + norm added. --- 18.02.92: AS: INBFF normalElement corrected. The old one returned a wrong --- result for a FFNBP(FFNBP(..)) domain. -\end{verbatim} -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{package INBFF InnerNormalBasisFieldFunctions} -<>= -)abbrev package INBFF InnerNormalBasisFieldFunctions -++ Authors: J.Grabmeier, A.Scheerhorn -++ Date Created: 26.03.1991 -++ Date Last Updated: 31 March 1991 -++ Basic Operations: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: finite field, normal basis -++ References: -++ R.Lidl, H.Niederreiter: Finite Field, Encyclopedia of Mathematics and -++ Its Applications, Vol. 20, Cambridge Univ. Press, 1983, ISBN 0 521 30240 4 -++ D.R.Stinson: Some observations on parallel Algorithms for fast -++ exponentiation in GF(2^n), Siam J. Comp., Vol.19, No.4, pp.711-717, -++ August 1990 -++ T.Itoh, S.Tsujii: A fast algorithm for computing multiplicative inverses -++ in GF(2^m) using normal bases, Inf. and Comp. 78, pp.171-177, 1988 -++ J. Grabmeier, A. Scheerhorn: Finite Fields in AXIOM. -++ AXIOM Technical Report Series, ATR/5 NP2522. -++ Description: -++ InnerNormalBasisFieldFunctions(GF) (unexposed): -++ This package has functions used by -++ every normal basis finite field extension domain. - -InnerNormalBasisFieldFunctions(GF): Exports == Implementation where - GF : FiniteFieldCategory -- the ground field - - PI ==> PositiveInteger - NNI ==> NonNegativeInteger - I ==> Integer - SI ==> SingleInteger - SUP ==> SparseUnivariatePolynomial - VGF ==> Vector GF - M ==> Matrix - V ==> Vector - L ==> List - OUT ==> OutputForm - TERM ==> Record(value:GF,index:SI) - MM ==> ModMonic(GF,SUP GF) - - Exports ==> with - - setFieldInfo: (V L TERM,GF) -> Void - ++ setFieldInfo(m,p) initializes the field arithmetic, where m is - ++ the multiplication table and p is the respective normal element - ++ of the ground field GF. - random : PI -> VGF - ++ random(n) creates a vector over the ground field with random entries. - index : (PI,PI) -> VGF - ++ index(n,m) is a index function for vectors of length n over - ++ the ground field. - pol : VGF -> SUP GF - ++ pol(v) turns the vector \spad{[v0,...,vn]} into the polynomial - ++ \spad{v0+v1*x+ ... + vn*x**n}. - xn : NNI -> SUP GF - ++ xn(n) returns the polynomial \spad{x**n-1}. - dAndcExp : (VGF,NNI,SI) -> VGF - ++ dAndcExp(v,n,k) computes \spad{v**e} interpreting v as an element of - ++ normal basis field. A divide and conquer algorithm similar to the - ++ one from D.R.Stinson, - ++ "Some observations on parallel Algorithms for fast exponentiation in - ++ GF(2^n)", Siam J. Computation, Vol.19, No.4, pp.711-717, August 1990 - ++ is used. Argument k is a parameter of this algorithm. - repSq : (VGF,NNI) -> VGF - ++ repSq(v,e) computes \spad{v**e} by repeated squaring, - ++ interpreting v as an element of a normal basis field. - expPot : (VGF,SI,SI) -> VGF - ++ expPot(v,e,d) returns the sum from \spad{i = 0} to - ++ \spad{e - 1} of \spad{v**(q**i*d)}, interpreting - ++ v as an element of a normal basis field and where q is - ++ the size of the ground field. - ++ Note: for a description of the algorithm, see T.Itoh and S.Tsujii, - ++ "A fast algorithm for computing multiplicative inverses in GF(2^m) - ++ using normal bases", - ++ Information and Computation 78, pp.171-177, 1988. - qPot : (VGF,I) -> VGF - ++ qPot(v,e) computes \spad{v**(q**e)}, interpreting v as an element of - ++ normal basis field, q the size of the ground field. - ++ This is done by a cyclic e-shift of the vector v. - --- the semantic of the following functions is obvious from the finite field --- context, for description see category FAXF - "**" :(VGF,I) -> VGF - ++ x**n \undocumented{} - ++ See \axiomFunFrom{**}{DivisionRing} - "*" :(VGF,VGF) -> VGF - ++ x*y \undocumented{} - ++ See \axiomFunFrom{*}{SemiGroup} - "/" :(VGF,VGF) -> VGF - ++ x/y \undocumented{} - ++ See \axiomFunFrom{/}{Field} - norm :(VGF,PI) -> VGF - ++ norm(x,n) \undocumented{} - ++ See \axiomFunFrom{norm}{FiniteAlgebraicExtensionField} - trace :(VGF,PI) -> VGF - ++ trace(x,n) \undocumented{} - ++ See \axiomFunFrom{trace}{FiniteAlgebraicExtensionField} - inv : VGF -> VGF - ++ inv x \undocumented{} - ++ See \axiomFunFrom{inv}{DivisionRing} - lookup : VGF -> PI - ++ lookup(x) \undocumented{} - ++ See \axiomFunFrom{lookup}{Finite} - normal? : VGF -> Boolean - ++ normal?(x) \undocumented{} - ++ See \axiomFunFrom{normal?}{FiniteAlgebraicExtensionField} - basis : PI -> V VGF - ++ basis(n) \undocumented{} - ++ See \axiomFunFrom{basis}{FiniteAlgebraicExtensionField} - normalElement:PI -> VGF - ++ normalElement(n) \undocumented{} - ++ See \axiomFunFrom{normalElement}{FiniteAlgebraicExtensionField} - minimalPolynomial: VGF -> SUP GF - ++ minimalPolynomial(x) \undocumented{} - ++ See \axiomFunFrom{minimalPolynomial}{FiniteAlgebraicExtensionField} - - Implementation ==> add - --- global variables =================================================== - - sizeGF:NNI:=size()$GF - -- the size of the ground field - - multTable:V L TERM:=new(1,nil()$(L TERM))$(V L TERM) - -- global variable containing the multiplication table - - trGen:GF:=1$GF - -- controls the imbedding of the ground field - - logq:List SI:=[0,10::SI,16::SI,20::SI,23::SI,0,28::SI,_ - 30::SI,32::SI,0,35::SI] - -- logq.i is about 10*log2(i) for the values <12 which - -- can match sizeGF. It's used by "**" - - expTable:L L SI:=[[],_ - [4::SI,12::SI,48::SI,160::SI,480::SI,0],_ - [8::SI,72::SI,432::SI,0],_ - [18::SI,216::SI,0],_ - [32::SI,480::SI,0],[],_ - [72::SI,0],[98::SI,0],[128::SI,0],[],[200::SI,0]] - -- expT is used by "**" to optimize the parameter k - -- before calling dAndcExp(..,..,k) - --- functions =========================================================== - --- computes a**(-1) = a**((q**extDeg)-2) --- see reference of function expPot - inv(a) == - b:VGF:=qPot(expPot(a,(#a-1)::NNI::SI,1::SI)$$,1)$$ - erg:VGF:=inv((a *$$ b).1 *$GF trGen)$GF *$VGF b - --- "**" decides which exponentiation algorithm will be used, in order to --- get the fastest computation. If dAndcExp is used, it chooses the --- optimal parameter k for that algorithm. - a ** ex == - e:NNI:=positiveRemainder(ex,sizeGF**((#a)::PI)-1)$I :: NNI - zero?(e)$NNI => new(#a,trGen)$VGF --- one?(e)$NNI => copy(a)$VGF - (e = 1)$NNI => copy(a)$VGF --- inGroundField?(a) => new(#a,((a.1*trGen) **$GF e))$VGF - e1:SI:=(length(e)$I)::SI - sizeGF >$I 11 => - q1:SI:=(length(sizeGF)$I)::SI - logqe:SI:=(e1 quo$SI q1) +$SI 1$SI - 10::SI * (logqe + sizeGF-2) > 15::SI * e1 => --- print("repeatedSquaring"::OUT) - repSq(a,e) --- print("divAndConquer(a,e,1)"::OUT) - dAndcExp(a,e,1) - logqe:SI:=((10::SI *$SI e1) quo$SI (logq.sizeGF)) +$SI 1$SI - k:SI:=1$SI - expT:List SI:=expTable.sizeGF - while (logqe >= expT.k) and not zero? expT.k repeat k:=k +$SI 1$SI - mult:I:=(sizeGF-1) *$I sizeGF **$I ((k-1)pretend NNI) +$I_ - ((logqe +$SI k -$SI 1$SI) quo$SI k)::I -$I 2 - (10*mult) >= (15 * (e1::I)) => --- print("repeatedSquaring(a,e)"::OUT) - repSq(a,e) --- print(hconcat(["divAndConquer(a,e,"::OUT,k::OUT,")"::OUT])$OUT) - dAndcExp(a,e,k) - --- computes a**e by repeated squaring - repSq(b,e) == - a:=copy(b)$VGF --- one? e => a - (e = 1) => a - odd?(e)$I => a * repSq(a*a,(e quo 2) pretend NNI) - repSq(a*a,(e quo 2) pretend NNI) - --- computes a**e using the divide and conquer algorithm similar to the --- one from D.R.Stinson, --- "Some observations on parallel Algorithms for fast exponentiation in --- GF(2^n)", Siam J. Computation, Vol.19, No.4, pp.711-717, August 1990 - dAndcExp(a,e,k) == - plist:List VGF:=[copy(a)$VGF] - qk:I:=sizeGF**(k pretend NNI) - for j in 2..(qk-1) repeat - if positiveRemainder(j,sizeGF)=0 then b:=qPot(plist.(j quo sizeGF),1)$$ - else b:=a *$$ last(plist)$(List VGF) - plist:=concat(plist,b) - l:List NNI:=nil() - ex:I:=e - while not(ex = 0) repeat - l:=concat(l,positiveRemainder(ex,qk) pretend NNI) - ex:=ex quo qk - if first(l)=0 then erg:VGF:=new(#a,trGen)$VGF - else erg:VGF:=plist.(first(l)) - i:SI:=k - for j in rest(l) repeat - if j^=0 then erg:=erg *$$ qPot(plist.j,i)$$ - i:=i+k - erg - - a * b == - e:SI:=(#a)::SI - erg:=zero(#a)$VGF - for t in multTable.1 repeat - for j in 1..e repeat - y:=t.value -- didn't work without defining x and y - x:=t.index - k:SI:=addmod(x,j::SI,e)$SI +$SI 1$SI - erg.k:=erg.k +$GF a.j *$GF b.j *$GF y - for i in 1..e-1 repeat - for j in i+1..e repeat - for t in multTable.(j-i+1) repeat - y:=t.value -- didn't work without defining x and y - x:=t.index - k:SI:=addmod(x,i::SI,e)$SI +$SI 1$SI - erg.k:GF:=erg.k +$GF (a.i *$GF b.j +$GF a.j *$GF b.i) *$GF y - erg - - lookup(x) == - erg:I:=0 - for j in (#x)..1 by -1 repeat - erg:=(erg * sizeGF) + (lookup(x.j)$GF rem sizeGF) - erg=0 => (sizeGF**(#x)) :: PI - erg :: PI - --- computes the norm of a over GF**d, d must devide extdeg --- see reference of function expPot below - norm(a,d) == - dSI:=d::SI - r:=divide((#a)::SI,dSI) - not(r.remainder = 0) => error "norm: 2.arg must divide extdeg" - expPot(a,r.quotient,dSI)$$ - --- computes expPot(a,e,d) = sum form i=0 to e-1 over a**(q**id)) --- see T.Itoh and S.Tsujii, --- "A fast algorithm for computing multiplicative inverses in GF(2^m) --- using normal bases", --- Information and Computation 78, pp.171-177, 1988 - expPot(a,e,d) == - deg:SI:=(#a)::SI - e=1 => copy(a)$VGF - k2:SI:=d - y:=copy(a) - if bit?(e,0) then - erg:=copy(y) - qpot:SI:=k2 - else - erg:=new(#a,inv(trGen)$GF)$VGF - qpot:SI:=0 - for k in 1..length(e) repeat - y:= y *$$ qPot(y,k2) - k2:=addmod(k2,k2,deg)$SI - if bit?(e,k) then - erg:=erg *$$ qPot(y,qpot) - qpot:=addmod(qpot,k2,deg)$SI - erg - --- computes qPot(a,n) = a**(q**n), q=size of GF - qPot(e,n) == - ei:=(#e)::SI - m:SI:= positiveRemainder(n::SI,ei)$SI - zero?(m) => e - e1:=zero(#e)$VGF - for i in m+1..ei repeat e1.i:=e.(i-m) - for i in 1..m repeat e1.i:=e.(ei+i-m) - e1 - - trace(a,d) == - dSI:=d::SI - r:=divide((#a)::SI,dSI)$SI - not(r.remainder = 0) => error "trace: 2.arg must divide extdeg" - v:=copy(a.(1..dSI))$VGF - sSI:SI:=r.quotient - for i in 1..dSI repeat - for j in 1..sSI-1 repeat - v.i:=v.i+a.(i+j::SI*dSI) - v - - random(n) == - v:=zero(n)$VGF - for i in 1..n repeat v.i:=random()$GF - v - - - xn(m) == monomial(1,m)$(SUP GF) - 1$(SUP GF) - - normal?(x) == - gcd(xn(#x),pol(x))$(SUP GF) = 1 => true - false - - x:VGF / y:VGF == x *$$ inv(y)$$ - - - setFieldInfo(m,n) == - multTable:=m - trGen:=n - void()$Void - - minimalPolynomial(x) == - dx:=#x - y:=new(#x,inv(trGen)$GF)$VGF - m:=zero(dx,dx+1)$(M GF) - for i in 1..dx+1 repeat - dy:=#y - for j in 1..dy repeat - for k in 0..((dx quo dy)-1) repeat - qsetelt_!(m,j+k*dy,i,y.j)$(M GF) - y:=y *$$ x - v:=first nullSpace(m)$(M GF) - pol(v)$$ - - basis(n) == - bas:(V VGF):=new(n,zero(n)$VGF)$(V VGF) - for i in 1..n repeat - uniti:=zero(n)$VGF - qsetelt_!(uniti,i,1$GF)$VGF - qsetelt_!(bas,i,uniti)$(V VGF) - bas - - normalElement(n) == - v:=zero(n)$VGF - qsetelt_!(v,1,1$GF) - v --- normalElement(n) == index(n,1)$$ - - index(degm,n) == - m:I:=n rem$I (sizeGF ** degm) - erg:=zero(degm)$VGF - for j in 1..degm repeat - erg.j:=index((sizeGF+(m rem sizeGF)) pretend PI)$GF - m:=m quo sizeGF - erg - - pol(x) == - +/[monomial(x.i,(i-1)::NNI)$(SUP GF) for i in 1..(#x)::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/ffpoly.spad.pamphlet b/src/algebra/ffpoly.spad.pamphlet deleted file mode 100644 index eba9538..0000000 --- a/src/algebra/ffpoly.spad.pamphlet +++ /dev/null @@ -1,1036 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra ffpoly.spad} -\author{Alexandre Bouyer, Johannes Grabmeier, Alfred Scheerhorn, Robert Sutor, Barry Trager} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package FFPOLY FiniteFieldPolynomialPackage} -<>= -)abbrev package FFPOLY FiniteFieldPolynomialPackage -++ Author: A. Bouyer, J. Grabmeier, A. Scheerhorn, R. Sutor, B. Trager -++ Date Created: January 1991 -++ Date Last Updated: 1 June 1994 -++ Basic Operations: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: finite field, polynomial, irreducible polynomial, normal -++ polynomial, primitive polynomial, random polynomials -++ References: -++ [LS] Lenstra, H. W. & Schoof, R. J., "Primitivive Normal Bases -++ for Finite Fields", Math. Comp. 48, 1987, pp. 217-231 -++ [LN] Lidl, R. & Niederreiter, H., "Finite Fields", -++ Encycl. of Math. 20, Addison-Wesley, 1983 -++ J. Grabmeier, A. Scheerhorn: Finite Fields in Axiom. -++ Axiom Technical Report Series, to appear. -++ Description: -++ This package provides a number of functions for generating, counting -++ and testing irreducible, normal, primitive, random polynomials -++ over finite fields. - -FiniteFieldPolynomialPackage GF : Exports == Implementation where - - GF : FiniteFieldCategory - - I ==> Integer - L ==> List - NNI ==> NonNegativeInteger - PI ==> PositiveInteger - Rec ==> Record(expnt:NNI, coeff:GF) - Repr ==> L Rec - SUP ==> SparseUnivariatePolynomial GF - - Exports ==> with - -- qEulerPhiCyclotomic : PI -> PI --- ++ qEulerPhiCyclotomic(n)$FFPOLY(GF) yields the q-Euler's function --- ++ of the n-th cyclotomic polynomial over the field {\em GF} of --- ++ order q (cf. [LN] p.122); --- ++ error if n is a multiple of the field characteristic. - primitive? : SUP -> Boolean - ++ primitive?(f) tests whether the polynomial f over a finite - ++ field is primitive, i.e. all its roots are primitive. - normal? : SUP -> Boolean - ++ normal?(f) tests whether the polynomial f over a finite field is - ++ normal, i.e. its roots are linearly independent over the field. - numberOfIrreduciblePoly : PI -> PI - ++ numberOfIrreduciblePoly(n)$FFPOLY(GF) yields the number of - ++ monic irreducible univariate polynomials of degree n - ++ over the finite field {\em GF}. - numberOfPrimitivePoly : PI -> PI - ++ numberOfPrimitivePoly(n)$FFPOLY(GF) yields the number of - ++ primitive polynomials of degree n over the finite field {\em GF}. - numberOfNormalPoly : PI -> PI - ++ numberOfNormalPoly(n)$FFPOLY(GF) yields the number of - ++ normal polynomials of degree n over the finite field {\em GF}. - createIrreduciblePoly : PI -> SUP - ++ createIrreduciblePoly(n)$FFPOLY(GF) generates a monic irreducible - ++ univariate polynomial of degree n over the finite field {\em GF}. - createPrimitivePoly : PI -> SUP - ++ createPrimitivePoly(n)$FFPOLY(GF) generates a primitive polynomial - ++ of degree n over the finite field {\em GF}. - createNormalPoly : PI -> SUP - ++ createNormalPoly(n)$FFPOLY(GF) generates a normal polynomial - ++ of degree n over the finite field {\em GF}. - createNormalPrimitivePoly : PI -> SUP - ++ createNormalPrimitivePoly(n)$FFPOLY(GF) generates a normal and - ++ primitive polynomial of degree n over the field {\em GF}. - ++ Note: this function is equivalent to createPrimitiveNormalPoly(n) - createPrimitiveNormalPoly : PI -> SUP - ++ createPrimitiveNormalPoly(n)$FFPOLY(GF) generates a normal and - ++ primitive polynomial of degree n over the field {\em GF}. - ++ polynomial of degree n over the field {\em GF}. - nextIrreduciblePoly : SUP -> Union(SUP, "failed") - ++ nextIrreduciblePoly(f) yields the next monic irreducible polynomial - ++ over a finite field {\em GF} of the same degree as f in the following - ++ order, or "failed" if there are no greater ones. - ++ Error: if f has degree 0. - ++ Note: the input polynomial f is made monic. - ++ Also, \spad{f < g} if - ++ the number of monomials of f is less - ++ than this number for g. - ++ If f and g have the same number of monomials, - ++ the lists of exponents are compared lexicographically. - ++ If these lists are also equal, the lists of coefficients - ++ are compared according to the lexicographic ordering induced by - ++ the ordering of the elements of {\em GF} given by {\em lookup}. - nextPrimitivePoly : SUP -> Union(SUP, "failed") - ++ nextPrimitivePoly(f) yields the next primitive polynomial over - ++ a finite field {\em GF} of the same degree as f in the following - ++ order, or "failed" if there are no greater ones. - ++ Error: if f has degree 0. - ++ Note: the input polynomial f is made monic. - ++ Also, \spad{f < g} if the {\em lookup} of the constant term - ++ of f is less than - ++ this number for g. - ++ If these values are equal, then \spad{f < g} if - ++ if the number of monomials of f is less than that for g or if - ++ the lists of exponents of f are lexicographically less than the - ++ corresponding list for g. - ++ If these lists are also equal, the lists of coefficients are - ++ compared according to the lexicographic ordering induced by - ++ the ordering of the elements of {\em GF} given by {\em lookup}. - nextNormalPoly : SUP -> Union(SUP, "failed") - ++ nextNormalPoly(f) yields the next normal polynomial over - ++ a finite field {\em GF} of the same degree as f in the following - ++ order, or "failed" if there are no greater ones. - ++ Error: if f has degree 0. - ++ Note: the input polynomial f is made monic. - ++ Also, \spad{f < g} if the {\em lookup} of the coefficient - ++ of the term of degree - ++ {\em n-1} of f is less than that for g. - ++ In case these numbers are equal, \spad{f < g} if - ++ if the number of monomials of f is less that for g or if - ++ the list of exponents of f are lexicographically less than the - ++ corresponding list for g. - ++ If these lists are also equal, the lists of coefficients are - ++ compared according to the lexicographic ordering induced by - ++ the ordering of the elements of {\em GF} given by {\em lookup}. - nextNormalPrimitivePoly : SUP -> Union(SUP, "failed") - ++ nextNormalPrimitivePoly(f) yields the next normal primitive polynomial - ++ over a finite field {\em GF} of the same degree as f in the following - ++ order, or "failed" if there are no greater ones. - ++ Error: if f has degree 0. - ++ Note: the input polynomial f is made monic. - ++ Also, \spad{f < g} if the {\em lookup} of the constant - ++ term of f is less than - ++ this number for g or if - ++ {\em lookup} of the coefficient of the term of degree {\em n-1} - ++ of f is less than this number for g. - ++ Otherwise, \spad{f < g} - ++ if the number of monomials of f is less than - ++ that for g or if the lists of exponents for f are - ++ lexicographically less than those for g. - ++ If these lists are also equal, the lists of coefficients are - ++ compared according to the lexicographic ordering induced by - ++ the ordering of the elements of {\em GF} given by {\em lookup}. - ++ This operation is equivalent to nextPrimitiveNormalPoly(f). - nextPrimitiveNormalPoly : SUP -> Union(SUP, "failed") - ++ nextPrimitiveNormalPoly(f) yields the next primitive normal polynomial - ++ over a finite field {\em GF} of the same degree as f in the following - ++ order, or "failed" if there are no greater ones. - ++ Error: if f has degree 0. - ++ Note: the input polynomial f is made monic. - ++ Also, \spad{f < g} if the {\em lookup} of the - ++ constant term of f is less than - ++ this number for g or, in case these numbers are equal, if the - ++ {\em lookup} of the coefficient of the term of degree {\em n-1} - ++ of f is less than this number for g. - ++ If these numbers are equals, \spad{f < g} - ++ if the number of monomials of f is less than - ++ that for g, or if the lists of exponents for f are lexicographically - ++ less than those for g. - ++ If these lists are also equal, the lists of coefficients are - ++ coefficients according to the lexicographic ordering induced by - ++ the ordering of the elements of {\em GF} given by {\em lookup}. - ++ This operation is equivalent to nextNormalPrimitivePoly(f). --- random : () -> SUP --- ++ random()$FFPOLY(GF) generates a random monic polynomial --- ++ of random degree over the field {\em GF} - random : PI -> SUP - ++ random(n)$FFPOLY(GF) generates a random monic polynomial - ++ of degree n over the finite field {\em GF}. - random : (PI, PI) -> SUP - ++ random(m,n)$FFPOLY(GF) generates a random monic polynomial - ++ of degree d over the finite field {\em GF}, d between m and n. - leastAffineMultiple: SUP -> SUP - ++ leastAffineMultiple(f) computes the least affine polynomial which - ++ is divisible by the polynomial f over the finite field {\em GF}, - ++ i.e. a polynomial whose exponents are 0 or a power of q, the - ++ size of {\em GF}. - reducedQPowers: SUP -> PrimitiveArray SUP - ++ reducedQPowers(f) - ++ generates \spad{[x,x**q,x**(q**2),...,x**(q**(n-1))]} - ++ reduced modulo f where \spad{q = size()$GF} and \spad{n = degree f}. - -- - -- we intend to implement also the functions - -- cyclotomicPoly: PI -> SUP, order: SUP -> PI, - -- and maybe a new version of irreducible? - - - Implementation ==> add - - import IntegerNumberTheoryFunctions - import DistinctDegreeFactorize(GF, SUP) - - - MM := ModMonic(GF, SUP) - - sizeGF : PI := size()$GF :: PI - - revListToSUP(l:Repr):SUP == - newl:Repr := empty() - -- cannot use map since copy for Record is an XLAM - for t in l repeat newl := cons(copy t, newl) - newl pretend SUP - - listToSUP(l:Repr):SUP == - newl:Repr := [copy t for t in l] - newl pretend SUP - - nextSubset : (L NNI, NNI) -> Union(L NNI, "failed") - -- for a list s of length m with 1 <= s.1 < ... < s.m <= bound, - -- nextSubset(s, bound) yields the immediate successor of s - -- (resp. "failed" if s = [1,...,bound]) - -- where s < t if and only if: - -- (i) #s < #t; or - -- (ii) #s = #t and s < t in the lexicographical order; - -- (we have chosen to fix the signature with NNI instead of PI - -- to avoid coercions in the main functions) - - reducedQPowers(f) == - m:PI:=degree(f)$SUP pretend PI - m1:I:=m-1 - setPoly(f)$MM - e:=reduce(monomial(1,1)$SUP)$MM ** sizeGF - w:=1$MM - qpow:PrimitiveArray SUP:=new(m,0) - qpow.0:=1$SUP - for i in 1..m1 repeat qpow.i:=lift(w:=w*e)$MM - qexp:PrimitiveArray SUP:=new(m,0) - m = 1 => - qexp.(0$I):= (-coefficient(f,0$NNI)$SUP)::SUP - qexp - qexp.0$I:=monomial(1,1)$SUP - h:=qpow.1 - qexp.1:=h - for i in 2..m1 repeat - g:=0$SUP - while h ^= 0 repeat - g:=g + leadingCoefficient(h) * qpow.degree(h) - h:=reductum(h) - qexp.i:=(h:=g) - qexp - - leastAffineMultiple(f) == - -- [LS] p.112 - qexp:=reducedQPowers(f) - n:=degree(f)$SUP - b:Matrix GF:= transpose matrix [entries vectorise - (qexp.i,n) for i in 0..n-1] - col1:Matrix GF:= new(n,1,0) - col1(1,1) := 1 - ns : List Vector GF := nullSpace (horizConcat(col1,b) ) - ---------------------------------------------------------------- - -- perhaps one should use that the first vector in ns is already - -- the right one - ---------------------------------------------------------------- - dim:=n+2 - coeffVector : Vector GF - until empty? ns repeat - newCoeffVector := ns.1 - i : PI :=(n+1) pretend PI - while newCoeffVector(i) = 0 repeat - i := (i - 1) pretend PI - if i < dim then - dim := i - coeffVector := newCoeffVector - ns := rest ns - (coeffVector(1)::SUP) +(+/[monomial(coeffVector.k, _ - sizeGF**((k-2)::NNI))$SUP for k in 2..dim]) - --- qEulerPhiCyclotomic n == --- n = 1 => (sizeGF - 1) pretend PI --- p : PI := characteristic()$GF :: PI --- (n rem p) = 0 => error --- "cyclotomic polynomial not defined for this argument value" --- q : PI := sizeGF --- -- determine the multiplicative order of q modulo n --- e : PI := 1 --- qe : PI := q --- while (qe rem n) ^= 1 repeat --- e := e + 1 --- qe := qe * q --- ((qe - 1) ** ((eulerPhi(n) quo e) pretend PI) ) pretend PI - - numberOfIrreduciblePoly n == - -- we compute the number Nq(n) of monic irreducible polynomials - -- of degree n over the field GF of order q by the formula - -- Nq(n) = (1/n)* sum(moebiusMu(n/d)*q**d) where the sum extends - -- over all divisors d of n (cf. [LN] p.93, Th. 3.25) - n = 1 => sizeGF - -- the contribution of d = 1 : - lastd : PI := 1 - qd : PI := sizeGF - sum : I := moebiusMu(n) * qd - -- the divisors d > 1 of n : - divisorsOfn : L PI := rest(divisors n) pretend L PI - for d in divisorsOfn repeat - qd := qd * (sizeGF) ** ((d - lastd) pretend PI) - sum := sum + moebiusMu(n quo d) * qd - lastd := d - (sum quo n) :: PI - - numberOfPrimitivePoly n == (eulerPhi((sizeGF ** n) - 1) quo n) :: PI - -- [each root of a primitive polynomial of degree n over a field - -- with q elements is a generator of the multiplicative group - -- of a field of order q**n (definition), and the number of such - -- generators is precisely eulerPhi(q**n - 1)] - - numberOfNormalPoly n == - -- we compute the number Nq(n) of normal polynomials of degree n - -- in GF[X], with GF of order q, by the formula - -- Nq(n) = (1/n) * qPhi(X**n - 1) (cf. [LN] p.124) where, - -- for any polynomial f in GF[X] of positive degree n, - -- qPhi(f) = q**n * (1 - q**(-n1)) *...* (1 - q**(-nr)) = - -- q**n * ((q**(n1)-1) / q**(n1)) *...* ((q**(nr)-1) / q**(n_r)), - -- the ni being the degrees of the distinct irreducible factors - -- of f in its canonical factorization over GF - -- ([LN] p.122, Lemma 3.69). - -- hence, if n = m * p**r where p is the characteristic of GF - -- and gcd(m,p) = 1, we get - -- Nq(n) = (1/n)* q**(n-m) * qPhi(X**m - 1) - -- now X**m - 1 is the product of the (pairwise relatively prime) - -- cyclotomic polynomials Qd(X) for which d divides m - -- ([LN] p.64, Th. 2.45), and each Qd(X) factors into - -- eulerPhi(d)/e (distinct) monic irreducible polynomials in GF[X] - -- of the same degree e, where e is the least positive integer k - -- such that d divides q**k - 1 ([LN] p.65, Th. 2.47) - n = 1 => (sizeGF - 1) :: NNI :: PI - m : PI := n - p : PI := characteristic()$GF :: PI - q : PI := sizeGF - while (m rem p) = 0 repeat -- find m such that - m := (m quo p) :: PI -- n = m * p**r and gcd(m,p) = 1 - m = 1 => - -- know that n is a power of p - (((q ** ((n-1)::NNI) ) * (q - 1) ) quo n) :: PI - prod : I := q - 1 - divisorsOfm : L PI := rest(divisors m) pretend L PI - for d in divisorsOfm repeat - -- determine the multiplicative order of q modulo d - e : PI := 1 - qe : PI := q - while (qe rem d) ^= 1 repeat - e := e + 1 - qe := qe * q - prod := prod * _ - ((qe - 1) ** ((eulerPhi(d) quo e) pretend PI) ) pretend PI - (q**((n-m) pretend PI) * prod quo n) pretend PI - - primitive? f == - -- let GF be a field of order q; a monic polynomial f in GF[X] - -- of degree n is primitive over GF if and only if its constant - -- term is non-zero, f divides X**(q**n - 1) - 1 and, - -- for each prime divisor d of q**n - 1, - -- f does not divide X**((q**n - 1) / d) - 1 - -- (cf. [LN] p.89, Th. 3.16, and p.87, following Th. 3.11) - n : NNI := degree f - n = 0 => false - leadingCoefficient f ^= 1 => false - coefficient(f, 0) = 0 => false - q : PI := sizeGF - qn1: PI := (q**n - 1) :: NNI :: PI - setPoly f - x := reduce(monomial(1,1)$SUP)$MM -- X rem f represented in MM - -- - -- may be improved by tabulating the residues x**(i*q) - -- for i = 0,...,n-1 : - -- - lift(x ** qn1)$MM ^= 1 => false -- X**(q**n - 1) rem f in GF[X] - lrec : L Record(factor:I, exponent:I) := factors(factor qn1) - lfact : L PI := [] -- collect the prime factors - for rec in lrec repeat -- of q**n - 1 - lfact := cons((rec.factor) :: PI, lfact) - for d in lfact repeat - if (expt := (qn1 quo d)) >= n then - lift(x ** expt)$MM = 1 => return false - true - - normal? f == - -- let GF be a field with q elements; a monic irreducible - -- polynomial f in GF[X] of degree n is normal if its roots - -- x, x**q, ... , x**(q**(n-1)) are linearly independent over GF - n : NNI := degree f - n = 0 => false - leadingCoefficient f ^= 1 => false - coefficient(f, 0) = 0 => false - n = 1 => true - not irreducible? f => false - g:=reducedQPowers(f) - l:=[entries vectorise(g.i,n)$SUP for i in 0..(n-1)::NNI] - rank(matrix(l)$Matrix(GF)) = n => true - false - - nextSubset(s, bound) == - m : NNI := #(s) - m = 0 => [1] - -- find the first element s(i) of s such that s(i) + 1 < s(i+1) : - noGap : Boolean := true - i : NNI := 0 - restOfs : L NNI - while noGap and not empty?(restOfs := rest s) repeat - -- after i steps (0 <= i <= m-1) we have s = [s(i), ... , s(m)] - -- and restOfs = [s(i+1), ... , s(m)] - secondOfs := first restOfs -- s(i+1) - firstOfsPlus1 := first s + 1 -- s(i) + 1 - secondOfs = firstOfsPlus1 => - s := restOfs - i := i + 1 - setfirst_!(s, firstOfsPlus1) -- s := [s(i)+1, s(i+1),..., s(m)] - noGap := false - if noGap then -- here s = [s(m)] - firstOfs := first s - firstOfs < bound => setfirst_!(s, firstOfs + 1) -- s := [s(m)+1] - m < bound => - setfirst_!(s, m + 1) -- s := [m+1] - i := m - return "failed" -- (here m = s(m) = bound) - for j in i..1 by -1 repeat -- reconstruct the destroyed - s := cons(j, s) -- initial part of s - s - - nextIrreduciblePoly f == - n : NNI := degree f - n = 0 => error "polynomial must have positive degree" - -- make f monic - if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f - -- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero - -- then fRepr := [[n,fn], ... , [i0,f{i0}]] - fRepr : Repr := f pretend Repr - fcopy : Repr := [] - -- we can not simply write fcopy := copy fRepr because - -- the input(!) f would be modified by assigning - -- a new value to one of its records - for term in fRepr repeat - fcopy := cons(copy term, fcopy) - if term.expnt ^= 0 then - fcopy := cons([0,0]$Rec, fcopy) - tailpol : Repr := [] - headpol : Repr := fcopy -- [[0,f0], ... , [n,fn]] where - -- fi is non-zero for i > 0 - fcopy := reverse fcopy - weight : NNI := (#(fcopy) - 1) :: NNI -- #s(f) as explained above - taillookuplist : L NNI := [] - -- the zeroes in the headlookuplist stand for the fi - -- whose lookup's were not yet computed : - headlookuplist : L NNI := new(weight, 0) - s : L NNI := [] -- we will compute s(f) only if necessary - n1 : NNI := (n - 1) :: NNI - repeat - -- (run through the possible weights) - while not empty? headlookuplist repeat - -- find next polynomial in the above order with fixed weight; - -- assume at this point we have - -- headpol = [[i1,f{i1}], [i2,f{i2}], ... , [n,1]] - -- and tailpol = [[k,fk], ... , [0,f0]] (with k < i1) - term := first headpol - j := first headlookuplist - if j = 0 then j := lookup(term.coeff)$GF - j := j + 1 -- lookup(f{i1})$GF + 1 - j rem sizeGF = 0 => - -- in this case one has to increase f{i2} - tailpol := cons(term, tailpol) -- [[i1,f{i1}],...,[0,f0]] - headpol := rest headpol -- [[i2,f{i2}],...,[n,1]] - taillookuplist := cons(j, taillookuplist) - headlookuplist := rest headlookuplist - -- otherwise set f{i1} := index(j)$GF - setelt(first headpol, coeff, index(j :: PI)$GF) - setfirst_!(headlookuplist, j) - if empty? taillookuplist then - pol := revListToSUP(headpol) - -- - -- may be improved by excluding reciprocal polynomials - -- - irreducible? pol => return pol - else - -- go back to fk - headpol := cons(first tailpol, headpol) -- [[k,fk],...,[n,1]] - tailpol := rest tailpol - headlookuplist := cons(first taillookuplist, headlookuplist) - taillookuplist := rest taillookuplist - -- must search for polynomial with greater weight - if empty? s then -- compute s(f) - restfcopy := rest fcopy - for entry in restfcopy repeat s := cons(entry.expnt, s) - weight = n => return "failed" - s1 := nextSubset(rest s, n1) :: L NNI - s := cons(0, s1) - weight := #s - taillookuplist := [] - headlookuplist := cons(sizeGF, new((weight-1) :: NNI, 1)) - tailpol := [] - headpol := [] -- [[0,0], [s.2,1], ... , [s.weight,1], [n,1]] : - s1 := cons(n, reverse s1) - while not empty? s1 repeat - headpol := cons([first s1, 1]$Rec, headpol) - s1 := rest s1 - headpol := cons([0, 0]$Rec, headpol) - - nextPrimitivePoly f == - n : NNI := degree f - n = 0 => error "polynomial must have positive degree" - -- make f monic - if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f - -- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero - -- then fRepr := [[n,fn], ... , [i0,f{i0}]] - fRepr : Repr := f pretend Repr - fcopy : Repr := [] - -- we can not simply write fcopy := copy fRepr because - -- the input(!) f would be modified by assigning - -- a new value to one of its records - for term in fRepr repeat - fcopy := cons(copy term, fcopy) - if term.expnt ^= 0 then - term := [0,0]$Rec - fcopy := cons(term, fcopy) - fcopy := reverse fcopy - xn : Rec := first fcopy - c0 : GF := term.coeff - l : NNI := lookup(c0)$GF rem sizeGF - n = 1 => - -- the polynomial X + c is primitive if and only if -c - -- is a primitive element of GF - q1 : NNI := (sizeGF - 1) :: NNI - while l < q1 repeat -- find next c such that -c is primitive - l := l + 1 - c := index(l :: PI)$GF - primitive?(-c)$GF => - return [xn, [0,c]$Rec] pretend SUP - "failed" - weight : NNI := (#(fcopy) - 1) :: NNI -- #s(f)+1 as explained above - s : L NNI := [] -- we will compute s(f) only if necessary - n1 : NNI := (n - 1) :: NNI - -- a necessary condition for a monic polynomial f of degree n - -- over GF to be primitive is that (-1)**n * f(0) be a - -- primitive element of GF (cf. [LN] p.90, Th. 3.18) - c : GF := c0 - while l < sizeGF repeat - -- (run through the possible values of the constant term) - noGenerator : Boolean := true - while noGenerator and l < sizeGF repeat - -- find least c >= c0 such that (-1)^n c0 is primitive - primitive?((-1)**n * c)$GF => noGenerator := false - l := l + 1 - c := index(l :: PI)$GF - noGenerator => return "failed" - constterm : Rec := [0, c]$Rec - if c = c0 and weight > 1 then - headpol : Repr := rest reverse fcopy -- [[i0,f{i0}],...,[n,1]] - -- fi is non-zero for i>0 - -- the zeroes in the headlookuplist stand for the fi - -- whose lookup's were not yet computed : - headlookuplist : L NNI := new(weight, 0) - else - -- X**n + c can not be primitive for n > 1 (cf. [LN] p.90, - -- Th. 3.18); next possible polynomial is X**n + X + c - headpol : Repr := [[1,0]$Rec, xn] -- 0*X + X**n - headlookuplist : L NNI := [sizeGF] - s := [0,1] - weight := 2 - tailpol : Repr := [] - taillookuplist : L NNI := [] - notReady : Boolean := true - while notReady repeat - -- (run through the possible weights) - while not empty? headlookuplist repeat - -- find next polynomial in the above order with fixed - -- constant term and weight; assume at this point we have - -- headpol = [[i1,f{i1}], [i2,f{i2}], ... , [n,1]] and - -- tailpol = [[k,fk],...,[k0,fk0]] (k0<... - -- in this case one has to increase f{i2} - tailpol := cons(term, tailpol) -- [[i1,f{i1}],...,[k0,f{k0}]] - headpol := rest headpol -- [[i2,f{i2}],...,[n,1]] - taillookuplist := cons(j, taillookuplist) - headlookuplist := rest headlookuplist - -- otherwise set f{i1} := index(j)$GF - setelt(first headpol, coeff, index(j :: PI)$GF) - setfirst_!(headlookuplist, j) - if empty? taillookuplist then - pol := revListToSUP cons(constterm, headpol) - -- - -- may be improved by excluding reciprocal polynomials - -- - primitive? pol => return pol - else - -- go back to fk - headpol := cons(first tailpol, headpol) -- [[k,fk],...,[n,1]] - tailpol := rest tailpol - headlookuplist := cons(first taillookuplist, - headlookuplist) - taillookuplist := rest taillookuplist - if weight = n then notReady := false - else - -- must search for polynomial with greater weight - if empty? s then -- compute s(f) - restfcopy := rest fcopy - for entry in restfcopy repeat s := cons(entry.expnt, s) - s1 := nextSubset(rest s, n1) :: L NNI - s := cons(0, s1) - weight := #s - taillookuplist := [] - headlookuplist := cons(sizeGF, new((weight-2) :: NNI, 1)) - tailpol := [] - -- headpol = [[s.2,0], [s.3,1], ... , [s.weight,1], [n,1]] : - headpol := [[first s1, 0]$Rec] - while not empty? (s1 := rest s1) repeat - headpol := cons([first s1, 1]$Rec, headpol) - headpol := reverse cons([n, 1]$Rec, headpol) - -- next polynomial must have greater constant term - l := l + 1 - c := index(l :: PI)$GF - "failed" - - nextNormalPoly f == - n : NNI := degree f - n = 0 => error "polynomial must have positive degree" - -- make f monic - if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f - -- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero - -- then fRepr := [[n,fn], ... , [i0,f{i0}]] - fRepr : Repr := f pretend Repr - fcopy : Repr := [] - -- we can not simply write fcopy := copy fRepr because - -- the input(!) f would be modified by assigning - -- a new value to one of its records - for term in fRepr repeat - fcopy := cons(copy term, fcopy) - if term.expnt ^= 0 then - term := [0,0]$Rec - fcopy := cons(term, fcopy) - fcopy := reverse fcopy -- [[n,1], [r,fr], ... , [0,f0]] - xn : Rec := first fcopy - middlepol : Repr := rest fcopy -- [[r,fr], ... , [0,f0]] - a0 : GF := (first middlepol).coeff -- fr - l : NNI := lookup(a0)$GF rem sizeGF - n = 1 => - -- the polynomial X + a is normal if and only if a is not zero - l = sizeGF - 1 => "failed" - [xn, [0, index((l+1) :: PI)$GF]$Rec] pretend SUP - n1 : NNI := (n - 1) :: NNI - n2 : NNI := (n1 - 1) :: NNI - -- if the polynomial X**n + a * X**(n-1) + ... is normal then - -- a = -(x + x**q +...+ x**(q**n)) can not be zero (where q = #GF) - a : GF := a0 - -- if a = 0 then set a := 1 - if l = 0 then - l := 1 - a := 1$GF - while l < sizeGF repeat - -- (run through the possible values of a) - if a = a0 then - -- middlepol = [[0,f0], ... , [m,fm]] with m < n-1 - middlepol := reverse rest middlepol - weight : NNI := #middlepol -- #s(f) as explained above - -- the zeroes in the middlelookuplist stand for the fi - -- whose lookup's were not yet computed : - middlelookuplist : L NNI := new(weight, 0) - s : L NNI := [] -- we will compute s(f) only if necessary - else - middlepol := [[0,0]$Rec] - middlelookuplist : L NNI := [sizeGF] - s : L NNI := [0] - weight : NNI := 1 - headpol : Repr := [xn, [n1, a]$Rec] -- X**n + a * X**(n-1) - tailpol : Repr := [] - taillookuplist : L NNI := [] - notReady : Boolean := true - while notReady repeat - -- (run through the possible weights) - while not empty? middlelookuplist repeat - -- find next polynomial in the above order with fixed - -- a and weight; assume at this point we have - -- middlepol = [[i1,f{i1}], [i2,f{i2}], ... , [m,fm]] and - -- tailpol = [[k,fk],...,[0,f0]] ( with k - -- in this case one has to increase f{i2} - -- tailpol = [[i1,f{i1}],...,[0,f0]] - tailpol := cons(term, tailpol) - middlepol := rest middlepol -- [[i2,f{i2}],...,[m,fm]] - taillookuplist := cons(j, taillookuplist) - middlelookuplist := rest middlelookuplist - -- otherwise set f{i1} := index(j)$GF - setelt(first middlepol, coeff, index(j :: PI)$GF) - setfirst_!(middlelookuplist, j) - if empty? taillookuplist then - pol := listToSUP append(headpol, reverse middlepol) - -- - -- may be improved by excluding reciprocal polynomials - -- - normal? pol => return pol - else - -- go back to fk - -- middlepol = [[k,fk],...,[m,fm]] - middlepol := cons(first tailpol, middlepol) - tailpol := rest tailpol - middlelookuplist := cons(first taillookuplist, - middlelookuplist) - taillookuplist := rest taillookuplist - if weight = n1 then notReady := false - else - -- must search for polynomial with greater weight - if empty? s then -- compute s(f) - restfcopy := rest rest fcopy - for entry in restfcopy repeat s := cons(entry.expnt, s) - s1 := nextSubset(rest s, n2) :: L NNI - s := cons(0, s1) - weight := #s - taillookuplist := [] - middlelookuplist := cons(sizeGF, new((weight-1) :: NNI, 1)) - tailpol := [] - -- middlepol = [[0,0], [s.2,1], ... , [s.weight,1]] : - middlepol := [] - s1 := reverse s1 - while not empty? s1 repeat - middlepol := cons([first s1, 1]$Rec, middlepol) - s1 := rest s1 - middlepol := cons([0,0]$Rec, middlepol) - -- next polynomial must have greater a - l := l + 1 - a := index(l :: PI)$GF - "failed" - - nextNormalPrimitivePoly f == - n : NNI := degree f - n = 0 => error "polynomial must have positive degree" - -- make f monic - if (lcf := leadingCoefficient f) ^= 1 then f := (inv lcf) * f - -- if f = fn*X**n + ... + f{i0}*X**{i0} with the fi non-zero - -- then fRepr := [[n,fn], ... , [i0,f{i0}]] - fRepr : Repr := f pretend Repr - fcopy : Repr := [] - -- we can not simply write fcopy := copy fRepr because - -- the input(!) f would be modified by assigning - -- a new value to one of its records - for term in fRepr repeat - fcopy := cons(copy term, fcopy) - if term.expnt ^= 0 then - term := [0,0]$Rec - fcopy := cons(term, fcopy) - fcopy := reverse fcopy -- [[n,1], [r,fr], ... , [0,f0]] - xn : Rec := first fcopy - c0 : GF := term.coeff - lc : NNI := lookup(c0)$GF rem sizeGF - n = 1 => - -- the polynomial X + c is primitive if and only if -c - -- is a primitive element of GF - q1 : NNI := (sizeGF - 1) :: NNI - while lc < q1 repeat -- find next c such that -c is primitive - lc := lc + 1 - c := index(lc :: PI)$GF - primitive?(-c)$GF => - return [xn, [0,c]$Rec] pretend SUP - "failed" - n1 : NNI := (n - 1) :: NNI - n2 : NNI := (n1 - 1) :: NNI - middlepol : Repr := rest fcopy -- [[r,fr],...,[i0,f{i0}],[0,f0]] - a0 : GF := (first middlepol).coeff - la : NNI := lookup(a0)$GF rem sizeGF - -- if the polynomial X**n + a * X**(n-1) +...+ c is primitive and - -- normal over GF then (-1)**n * c is a primitive element of GF - -- (cf. [LN] p.90, Th. 3.18), and a = -(x + x**q +...+ x**(q**n)) - -- is not zero (where q = #GF) - c : GF := c0 - a : GF := a0 - -- if a = 0 then set a := 1 - if la = 0 then - la := 1 - a := 1$GF - while lc < sizeGF repeat - -- (run through the possible values of the constant term) - noGenerator : Boolean := true - while noGenerator and lc < sizeGF repeat - -- find least c >= c0 such that (-1)**n * c0 is primitive - primitive?((-1)**n * c)$GF => noGenerator := false - lc := lc + 1 - c := index(lc :: PI)$GF - noGenerator => return "failed" - constterm : Rec := [0, c]$Rec - while la < sizeGF repeat - -- (run through the possible values of a) - headpol : Repr := [xn, [n1, a]$Rec] -- X**n + a X**(n-1) - if c = c0 and a = a0 then - -- middlepol = [[i0,f{i0}], ... , [m,fm]] with m < n-1 - middlepol := rest reverse rest middlepol - weight : NNI := #middlepol + 1 -- #s(f)+1 as explained above - -- the zeroes in the middlelookuplist stand for the fi - -- whose lookup's were not yet computed : - middlelookuplist : L NNI := new((weight-1) :: NNI, 0) - s : L NNI := [] -- we will compute s(f) only if necessary - else - pol := listToSUP append(headpol, [constterm]) - normal? pol and primitive? pol => return pol - middlepol := [[1,0]$Rec] - middlelookuplist : L NNI := [sizeGF] - s : L NNI := [0,1] - weight : NNI := 2 - tailpol : Repr := [] - taillookuplist : L NNI := [] - notReady : Boolean := true - while notReady repeat - -- (run through the possible weights) - while not empty? middlelookuplist repeat - -- find next polynomial in the above order with fixed - -- c, a and weight; assume at this point we have - -- middlepol = [[i1,f{i1}], [i2,f{i2}], ... , [m,fm]] - -- tailpol = [[k,fk],...,[k0,fk0]] (k0<... - -- in this case one has to increase f{i2} - -- tailpol = [[i1,f{i1}],...,[k0,f{k0}]] - tailpol := cons(term, tailpol) - middlepol := rest middlepol -- [[i2,f{i2}],...,[m,fm]] - taillookuplist := cons(j, taillookuplist) - middlelookuplist := rest middlelookuplist - -- otherwise set f{i1} := index(j)$GF - setelt(first middlepol, coeff, index(j :: PI)$GF) - setfirst_!(middlelookuplist, j) - if empty? taillookuplist then - pol := listToSUP append(headpol, reverse - cons(constterm, middlepol)) - -- - -- may be improved by excluding reciprocal polynomials - -- - normal? pol and primitive? pol => return pol - else - -- go back to fk - -- middlepol = [[k,fk],...,[m,fm]] - middlepol := cons(first tailpol, middlepol) - tailpol := rest tailpol - middlelookuplist := cons(first taillookuplist, - middlelookuplist) - taillookuplist := rest taillookuplist - if weight = n1 then notReady := false - else - -- must search for polynomial with greater weight - if empty? s then -- compute s(f) - restfcopy := rest rest fcopy - for entry in restfcopy repeat s := cons(entry.expnt, s) - s1 := nextSubset(rest s, n2) :: L NNI - s := cons(0, s1) - weight := #s - taillookuplist := [] - middlelookuplist := cons(sizeGF, new((weight-2)::NNI, 1)) - tailpol := [] - -- middlepol = [[s.2,0], [s.3,1], ... , [s.weight,1] : - middlepol := [[first s1, 0]$Rec] - while not empty? (s1 := rest s1) repeat - middlepol := cons([first s1, 1]$Rec, middlepol) - middlepol := reverse middlepol - -- next polynomial must have greater a - la := la + 1 - a := index(la :: PI)$GF - -- next polynomial must have greater constant term - lc := lc + 1 - c := index(lc :: PI)$GF - la := 1 - a := 1$GF - "failed" - - nextPrimitiveNormalPoly f == nextNormalPrimitivePoly f - - createIrreduciblePoly n == - x := monomial(1,1)$SUP - n = 1 => x - xn := monomial(1,n)$SUP - n >= sizeGF => nextIrreduciblePoly(xn + x) :: SUP - -- (since in this case there is most no irreducible binomial X+a) - odd? n => nextIrreduciblePoly(xn + 1) :: SUP - nextIrreduciblePoly(xn) :: SUP - - createPrimitivePoly n == - -- (see also the comments in the code of nextPrimitivePoly) - xn := monomial(1,n)$SUP - n = 1 => xn + monomial(-primitiveElement()$GF, 0)$SUP - c0 : GF := (-1)**n * primitiveElement()$GF - constterm : Rec := [0, c0]$Rec - -- try first (probably faster) the polynomials - -- f = X**n + f{n-1}*X**(n-1) +...+ f1*X + c0 for which - -- fi is 0 or 1 for i=1,...,n-1, - -- and this in the order used to define nextPrimitivePoly - s : L NNI := [0,1] - weight : NNI := 2 - s1 : L NNI := [1] - n1 : NNI := (n - 1) :: NNI - notReady : Boolean := true - while notReady repeat - polRepr : Repr := [constterm] - while not empty? s1 repeat - polRepr := cons([first s1, 1]$Rec, polRepr) - s1 := rest s1 - polRepr := cons([n, 1]$Rec, polRepr) - -- - -- may be improved by excluding reciprocal polynomials - -- - primitive? (pol := listToSUP polRepr) => return pol - if weight = n then notReady := false - else - s1 := nextSubset(rest s, n1) :: L NNI - s := cons(0, s1) - weight := #s - -- if there is no primitive f of the above form - -- search now from the beginning, allowing arbitrary - -- coefficients f_i, i = 1,...,n-1 - nextPrimitivePoly(xn + monomial(c0, 0)$SUP) :: SUP - - createNormalPoly n == - n = 1 => monomial(1,1)$SUP + monomial(-1,0)$SUP - -- get a normal polynomial f = X**n + a * X**(n-1) + ... - -- with a = -1 - -- [recall that if f is normal over the field GF of order q - -- then a = -(x + x**q +...+ x**(q**n)) can not be zero; - -- hence the existence of such an f follows from the - -- normal basis theorem ([LN] p.60, Th. 2.35) and the - -- surjectivity of the trace ([LN] p.55, Th. 2.23 (iii))] - nextNormalPoly(monomial(1,n)$SUP - + monomial(-1, (n-1) :: NNI)$SUP) :: SUP - - createNormalPrimitivePoly n == - xn := monomial(1,n)$SUP - n = 1 => xn + monomial(-primitiveElement()$GF, 0)$SUP - n1 : NNI := (n - 1) :: NNI - c0 : GF := (-1)**n * primitiveElement()$GF - constterm := monomial(c0, 0)$SUP - -- try first the polynomials f = X**n + a * X**(n-1) + ... - -- with a = -1 - pol := xn + monomial(-1, n1)$SUP + constterm - normal? pol and primitive? pol => pol - res := nextNormalPrimitivePoly(pol) - res case SUP => res - -- if there is no normal primitive f with a = -1 - -- get now one with arbitrary (non-zero) a - -- (the existence is proved in [LS]) - pol := xn + monomial(1, n1)$SUP + constterm - normal? pol and primitive? pol => pol - nextNormalPrimitivePoly(pol) :: SUP - - createPrimitiveNormalPoly n == createNormalPrimitivePoly n - --- qAdicExpansion m == --- ragits : List I := wholeRagits(m :: (RadixExpansion sizeGF)) --- pol : SUP := 0 --- expt : NNI := #ragits --- for i in ragits repeat --- expt := (expt - 1) :: NNI --- if i ^= 0 then pol := pol + monomial(index(i::PI)$GF, expt) --- pol - --- random == qAdicExpansion(random()$I) - --- random n == --- pol := monomial(1,n)$SUP --- n1 : NNI := (n - 1) :: NNI --- for i in 0..n1 repeat --- if (c := random()$GF) ^= 0 then --- pol := pol + monomial(c, i)$SUP --- pol - - random n == - polRepr : Repr := [] - n1 : NNI := (n - 1) :: NNI - for i in 0..n1 repeat - if (c := random()$GF) ^= 0 then - polRepr := cons([i, c]$Rec, polRepr) - cons([n, 1$GF]$Rec, polRepr) pretend SUP - - random(m,n) == - if m > n then (m,n) := (n,m) - d : NNI := (n - m) :: NNI - if d > 1 then n := ((random()$I rem (d::PI)) + m) :: PI - random(n) - -@ -\begin{verbatim} --- 12.05.92: JG: long lines --- 25.02.92: AS: normal? changed. Now using reducedQPowers --- 05.04.91: JG: error in createNormalPrimitivePoly was corrected -\end{verbatim} -\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/ffpoly2.spad.pamphlet b/src/algebra/ffpoly2.spad.pamphlet deleted file mode 100644 index 1271362..0000000 --- a/src/algebra/ffpoly2.spad.pamphlet +++ /dev/null @@ -1,172 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra ffpoly2.spad} -\author{Johannes Grabmeier, Alfred Scheerhorn} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package FFPOLY2 FiniteFieldPolynomialPackage2} -<>= -)abbrev package FFPOLY2 FiniteFieldPolynomialPackage2 -++ Authors: J.Grabmeier, A.Scheerhorn -++ Date Created: 26.03.1991 -++ Date Last Updated: -++ Basic Operations: rootOfIrreduciblePoly -++ Related Constructors: FiniteFieldCategory -++ Also See: -++ AMS Classifications: -++ Keywords: finite field, zeros of polynomials, Berlekamp's trace algorithm -++ References: -++ R.Lidl, H.Niederreiter: Finite Field, Encycoldia of Mathematics and -++ Its Applications, Vol. 20, Cambridge Univ. Press, 1983, ISBN 0 521 30240 4 -++ AXIOM Technical Report Series, to appear. -++ Description: -++ FiniteFieldPolynomialPackage2(F,GF) exports some functions concerning -++ finite fields, which depend on a finite field {\em GF} and an -++ algebraic extension F of {\em GF}, e.g. a zero of a polynomial -++ over {\em GF} in F. -FiniteFieldPolynomialPackage2(F,GF):Exports == Implementation where - F:FieldOfPrimeCharacteristic with - coerce: GF -> F - ++ coerce(x) \undocumented{} - lookup: F -> PositiveInteger - ++ lookup(x) \undocumented{} - basis: PositiveInteger -> Vector F - ++ basis(n) \undocumented{} - Frobenius: F -> F - ++ Frobenius(x) \undocumented{} - -- F should be a algebraic extension of the finite field GF, either an - -- algebraic closure of GF or a simple algebraic extension field of GF - GF:FiniteFieldCategory - - I ==> Integer - NNI ==> NonNegativeInteger - PI ==> PositiveInteger - SUP ==> SparseUnivariatePolynomial - MM ==> ModMonic(GF,SUP GF) - OUT ==> OutputForm - M ==> Matrix - V ==> Vector - L ==> List - FFPOLY ==> FiniteFieldPolynomialPackage(GF) - SUPF2 ==> SparseUnivariatePolynomialFunctions2(GF,F) - - Exports ==> with - - rootOfIrreduciblePoly:SUP GF -> F - ++ rootOfIrreduciblePoly(f) computes one root of the monic, - ++ irreducible polynomial f, which degree must divide the extension degree - ++ of {\em F} over {\em GF}, - ++ i.e. f splits into linear factors over {\em F}. - - - Implementation ==> add - --- we use berlekamps trace algorithm --- it is not checked whether the polynomial is irreducible over GF]] - rootOfIrreduciblePoly(pf) == --- not irreducible(pf)$FFPOLY => --- error("polynomial has to be irreducible") - sizeGF:=size()$GF - -- if the polynomial is of degree one, we're ready - deg:=degree(pf)$(SUP GF)::PI - deg = 0 => error("no roots") - deg = 1 => -coefficient(pf,0)$(SUP GF)::F - p : SUP F := map(coerce,pf)$SUPF2 - -- compute qexp, qexp(i) = x **(size()GF ** i) mod p - -- with this list it's easier to compute the gcd(p(x),trace(x)) - qexp:=reducedQPowers(pf)$FFPOLY - stillToFactor:=p - -- take linear independent elements, the basis of F over GF - basis:Vector F:=basis(deg)$F - basispointer:I:=1 - -- as p is irreducible over GF, 0 can't be a root of p - -- therefore we can use the predicate zero?(root) for indicating - -- whether a root is found - root:=0$F - while zero?(root)$F repeat - beta:F:=basis.basispointer - -- gcd(trace(x)+gf,p(x)) has degree 0,that's why we skip beta=1 - if beta = 1$F then - basispointer:=basispointer + 1 - beta:= basis.basispointer - basispointer:=basispointer+1 - -- compute the polynomial trace(beta * x) mod p(x) using explist - trModp:SUP F:= map(coerce,qexp.0)$SUPF2 * beta - for i in 1..deg-1 repeat - beta:=Frobenius(beta) - trModp:=trModp +$(SUP F) beta *$(SUP F) map(coerce,qexp.i)$SUPF2 - -- if it is of degree 0, it doesn't help us finding a root - if degree(trModp)$(SUP F) > 0 then - -- for all elements gf of GF do - for j in 1..sizeGF repeat - -- compute gcd(trace(beta * x) + gf,stillToFactor) - h:=gcd(stillToFactor,trModp +$(SUP F) _ - (index(j pretend PI)$GF::F::(SUP F)))$(SUP F) - -- make the gcd polynomial monic - if leadingCoefficient(h)$(SUP F) ^= 1$F then - h:= (inv leadingCoefficient(h)) * h - degh:=degree(h)$(SUP F) - degSTF:=degree(stillToFactor)$(SUP F) - -- if the gcd has degree one we are ready - degh = 1 => root:=-coefficient(h,0)$(SUP F) - -- if the quotient of stillToFactor and the gcd has - -- degree one, we're also ready - degSTF - degh = 1 => - root:= -coefficient(stillToFactor quo h,0)$(SUP F) - -- otherwise the gcd helps us finding a root, only if its - -- degree is between 2 and degree(stillToFactor)-2 - if degh > 1 and degh < degSTF then - 2*degh > degSTF => stillToFactor := stillToFactor quo h - stillToFactor := h - root - -@ -\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/ffx.spad.pamphlet b/src/algebra/ffx.spad.pamphlet deleted file mode 100644 index 66ccd76..0000000 --- a/src/algebra/ffx.spad.pamphlet +++ /dev/null @@ -1,120 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra ffx.spad} -\author{Robert Sutor} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package IRREDFFX IrredPolyOverFiniteField} -<>= -)abbrev package IRREDFFX IrredPolyOverFiniteField -++ Author: Robert S. Sutor (original) -++ Date Created: ??? -++ Date Last Updated: 29 May 1990 -++ Description: -++ This package exports the function generateIrredPoly that computes -++ a monic irreducible polynomial of degree n over a finite field. - -IrredPolyOverFiniteField(GF:FiniteFieldCategory): Exports == Impl where - N ==> PositiveInteger - Z ==> Integer - SUP ==> SparseUnivariatePolynomial GF - QR ==> Record(quotient: Z, remainder: Z) - - Exports ==> with - generateIrredPoly: N -> SUP - ++ generateIrredPoly(n) generates an irreducible univariate - ++ polynomial of the given degree n over the finite field. - - Impl ==> add - import DistinctDegreeFactorize(GF, SUP) - - getIrredPoly : (Z, N) -> SUP - qAdicExpansion: Z -> SUP - - p := characteristic()$GF :: N - q := size()$GF :: N - - qAdicExpansion(z : Z): SUP == - -- expands z as a sum of powers of q, with coefficients in GF - -- z = HornerEval(qAdicExpansion z,q) - qr := divide(z, q) - zero?(qr.remainder) => monomial(1, 1) * qAdicExpansion(qr.quotient) - r := index(qr.remainder pretend N)$GF :: SUP - zero?(qr.quotient) => r - r + monomial(1, 1) * qAdicExpansion(qr.quotient) - - getIrredPoly(start : Z, n : N) : SUP == - -- idea is to iterate over possibly irreducible monic polynomials - -- until we find an irreducible one. The obviously reducible ones - -- are avoided. - mon := monomial(1, n)$SUP - pol: SUP := 0 - found: Boolean := false - end: Z := q**n - 1 - while not ((end < start) or found) repeat - if gcd(start, p) = 1 then - if irreducible?(pol := mon + qAdicExpansion(start)) then - found := true - start := start + 1 - zero? pol => error "no irreducible poly found" - pol - - generateIrredPoly(n : N) : SUP == - -- want same poly every time --- one?(n) => monomial(1, 1)$SUP - (n = 1) => monomial(1, 1)$SUP --- one?(gcd(p, n)) or (n < q) => - (gcd(p, n) = 1) or (n < q) => - odd?(n) => getIrredPoly(2, n) - getIrredPoly(1, n) - getIrredPoly(q + 1, n) - -@ -\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/fnla.spad.pamphlet b/src/algebra/fnla.spad.pamphlet deleted file mode 100644 index 3336490..0000000 --- a/src/algebra/fnla.spad.pamphlet +++ /dev/null @@ -1,147 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra fnla.spad} -\author{Larry Lambe} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package HB HallBasis} -<>= -)abbrev package HB HallBasis -++ Author : Larry Lambe -++ Date Created : August 1988 -++ Date Last Updated : March 9 1990 -++ Related Constructors: OrderedSetInts, Commutator, FreeNilpotentLie -++ AMS Classification: Primary 17B05, 17B30; Secondary 17A50 -++ Keywords: free Lie algebra, Hall basis, basic commutators -++ Description : Generate a basis for the free Lie algebra on n -++ generators over a ring R with identity up to basic commutators -++ of length c using the algorithm of P. Hall as given in Serre's -++ book Lie Groups -- Lie Algebras - -HallBasis() : Export == Implement where - B ==> Boolean - I ==> Integer - NNI ==> NonNegativeInteger - VI ==> Vector Integer - VLI ==> Vector List Integer - - Export ==> with - lfunc : (I,I) -> I - ++ lfunc(d,n) computes the rank of the nth factor in the - ++ lower central series of the free d-generated free Lie - ++ algebra; This rank is d if n = 1 and binom(d,2) if - ++ n = 2 - inHallBasis? : (I,I,I,I) -> B - ++ inHallBasis?(numberOfGens, leftCandidate, rightCandidate, left) - ++ tests to see if a new element should be added to the P. Hall - ++ basis being constructed. - ++ The list \spad{[leftCandidate,wt,rightCandidate]} - ++ is included in the basis if in the unique factorization of - ++ rightCandidate, we have left factor leftOfRight, and - ++ leftOfRight <= leftCandidate - generate : (NNI,NNI) -> VLI - ++ generate(numberOfGens, maximalWeight) generates a vector of - ++ elements of the form [left,weight,right] which represents a - ++ P. Hall basis element for the free lie algebra on numberOfGens - ++ generators. We only generate those basis elements of weight - ++ less than or equal to maximalWeight - - Implement ==> add - - lfunc(d,n) == - n < 0 => 0 - n = 0 => 1 - n = 1 => d - sum:I := 0 - m:I - for m in 1..(n-1) repeat - if n rem m = 0 then - sum := sum + m * lfunc(d,m) - res := (d**(n::NNI) - sum) quo n - - inHallBasis?(n,i,j,l) == - i >= j => false - j <= n => true - l <= i => true - false - - generate(n:NNI,c:NNI) == - gens:=n - maxweight:=c - siz:I := 0 - for i in 1 .. maxweight repeat siz := siz + lfunc(gens,i) - v:VLI:= new(siz::NNI,[]) - for i in 1..gens repeat v(i) := [0, 1, i] - firstindex:VI := new(maxweight::NNI,0) - wt:I := 1 - firstindex(1) := 1 - numComms:I := gens - newNumComms:I := numComms - done:B := false - while not done repeat - wt := wt + 1 - if wt > maxweight then done := true - else - firstindex(wt) := newNumComms + 1 - leftIndex := 1 - -- cW == complimentaryWeight - cW:I := wt - 1 - while (leftIndex <= numComms) and (v(leftIndex).2 <= cW) repeat - for rightIndex in firstindex(cW)..(firstindex(cW+1) - 1) repeat - if inHallBasis?(gens,leftIndex,rightIndex,v(rightIndex).1) then - newNumComms := newNumComms + 1 - v(newNumComms) := [leftIndex,wt,rightIndex] - leftIndex := leftIndex + 1 - cW := wt - v(leftIndex).2 - numComms := newNumComms - v - -@ -\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/formula.spad.pamphlet b/src/algebra/formula.spad.pamphlet deleted file mode 100644 index 9298bb7..0000000 --- a/src/algebra/formula.spad.pamphlet +++ /dev/null @@ -1,89 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra formula.spad} -\author{Robert S. Sutor} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package FORMULA1 ScriptFormulaFormat1} -<>= -)abbrev package FORMULA1 ScriptFormulaFormat1 -++ Author: Robert S. Sutor -++ Date Created: 1987 through 1990 -++ Change History: -++ Basic Operations: coerce -++ Related Constructors: ScriptFormulaFormat -++ Also See: TexFormat, TexFormat1 -++ AMS Classifications: -++ Keywords: output, format, SCRIPT, BookMaster, formula -++ References: -++ SCRIPT Mathematical Formula Formatter User's Guide, SH20-6453, -++ IBM Corporation, Publishing Systems Information Development, -++ Dept. G68, P.O. Box 1900, Boulder, Colorado, USA 80301-9191. -++ Description: -++ \spadtype{ScriptFormulaFormat1} provides a utility coercion for -++ changing to SCRIPT formula format anything that has a coercion to -++ the standard output format. - -ScriptFormulaFormat1(S : SetCategory): public == private where - public == with - coerce: S -> ScriptFormulaFormat() - ++ coerce(s) provides a direct coercion from an expression s of domain S to - ++ SCRIPT formula format. This allows the user to skip the step of - ++ first manually coercing the object to standard output format - ++ before it is coerced to SCRIPT formula format. - - private == add - import ScriptFormulaFormat() - - coerce(s : S): ScriptFormulaFormat == - coerce(s :: OutputForm)$ScriptFormulaFormat - -@ -\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/fortpak.spad.pamphlet b/src/algebra/fortpak.spad.pamphlet deleted file mode 100644 index 5f3fb1e..0000000 --- a/src/algebra/fortpak.spad.pamphlet +++ /dev/null @@ -1,659 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra fortpak.spad} -\author{Grant Keady, Godfrey Nolan, Mike Dewar, Themos Tsikas} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package FCPAK1 FortranCodePackage1} -<>= -)abbrev package FCPAK1 FortranCodePackage1 -++ Author: Grant Keady and Godfrey Nolan -++ Date Created: April 1993 -++ Date Last Updated: -++ Basic Operations: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ \spadtype{FortranCodePackage1} provides some utilities for -++ producing useful objects in FortranCode domain. -++ The Package may be used with the FortranCode domain and its -++ \spad{printCode} or possibly via an outputAsFortran. -++ (The package provides items of use in connection with ASPs -++ in the AXIOM-NAG link and, where appropriate, naming accords -++ with that in IRENA.) -++ The easy-to-use functions use Fortran loop variables I1, I2, -++ and it is users' responsibility to check that this is sensible. -++ The advanced functions use SegmentBinding to allow users control -++ over Fortran loop variable names. --- Later might add functions to build --- diagonalMatrix from List, i.e. the FC version of the corresponding --- AXIOM function from MatrixCategory; --- bandedMatrix, i.e. the full-matrix-FC version of the corresponding --- AXIOM function in BandedMatrix Domain --- bandedSymmetricMatrix, i.e. the full-matrix-FC version of the corresponding --- AXIOM function in BandedSymmetricMatrix Domain - -FortranCodePackage1: Exports == Implementation where - - NNI ==> NonNegativeInteger - PI ==> PositiveInteger - PIN ==> Polynomial(Integer) - SBINT ==> SegmentBinding(Integer) - SEGINT ==> Segment(Integer) - LSBINT ==> List(SegmentBinding(Integer)) - SBPIN ==> SegmentBinding(Polynomial(Integer)) - SEGPIN ==> Segment(Polynomial(Integer)) - LSBPIN ==> List(SegmentBinding(Polynomial(Integer))) - FC ==> FortranCode - EXPRESSION ==> Union(Expression Integer,Expression Float,Expression Complex Integer,Expression Complex Float) - - Exports == with - - zeroVector: (Symbol,PIN) -> FC - ++ zeroVector(s,p) \undocumented{} - - zeroMatrix: (Symbol,PIN,PIN) -> FC - ++ zeroMatrix(s,p,q) uses loop variables in the Fortran, I1 and I2 - - zeroMatrix: (Symbol,SBPIN,SBPIN) -> FC - ++ zeroMatrix(s,b,d) in this version gives the user control - ++ over names of Fortran variables used in loops. - - zeroSquareMatrix: (Symbol,PIN) -> FC - ++ zeroSquareMatrix(s,p) \undocumented{} - - identitySquareMatrix: (Symbol,PIN) -> FC - ++ identitySquareMatrix(s,p) \undocumented{} - - Implementation ==> add - import FC - - zeroVector(fname:Symbol,n:PIN):FC == - ue:Expression(Integer) := 0 - i1:Symbol := "I1"::Symbol - lp1:PIN := 1::PIN - hp1:PIN := n - segp1:SEGPIN:= segment(lp1,hp1)$SEGPIN - segbp1:SBPIN := equation(i1,segp1)$SBPIN - ip1:PIN := i1::PIN - indices:List(PIN) := [ip1] - fa:FC := forLoop(segbp1,assign(fname,indices,ue)$FC)$FC - fa - - zeroMatrix(fname:Symbol,m:PIN,n:PIN):FC == - ue:Expression(Integer) := 0 - i1:Symbol := "I1"::Symbol - lp1:PIN := 1::PIN - hp1:PIN := m - segp1:SEGPIN:= segment(lp1,hp1)$SEGPIN - segbp1:SBPIN := equation(i1,segp1)$SBPIN - i2:Symbol := "I2"::Symbol - hp2:PIN := n - segp2:SEGPIN:= segment(lp1,hp2)$SEGPIN - segbp2:SBPIN := equation(i2,segp2)$SBPIN - ip1:PIN := i1::PIN - ip2:PIN := i2::PIN - indices:List(PIN) := [ip1,ip2] - fa:FC :=forLoop(segbp1,forLoop(segbp2,assign(fname,indices,ue)$FC)$FC)$FC - fa - - zeroMatrix(fname:Symbol,segbp1:SBPIN,segbp2:SBPIN):FC == - ue:Expression(Integer) := 0 - i1:Symbol := variable(segbp1)$SBPIN - i2:Symbol := variable(segbp2)$SBPIN - ip1:PIN := i1::PIN - ip2:PIN := i2::PIN - indices:List(PIN) := [ip1,ip2] - fa:FC :=forLoop(segbp1,forLoop(segbp2,assign(fname,indices,ue)$FC)$FC)$FC - fa - - zeroSquareMatrix(fname:Symbol,n:PIN):FC == - ue:Expression(Integer) := 0 - i1:Symbol := "I1"::Symbol - lp1:PIN := 1::PIN - hp1:PIN := n - segp1:SEGPIN:= segment(lp1,hp1)$SEGPIN - segbp1:SBPIN := equation(i1,segp1)$SBPIN - i2:Symbol := "I2"::Symbol - segbp2:SBPIN := equation(i2,segp1)$SBPIN - ip1:PIN := i1::PIN - ip2:PIN := i2::PIN - indices:List(PIN) := [ip1,ip2] - fa:FC :=forLoop(segbp1,forLoop(segbp2,assign(fname,indices,ue)$FC)$FC)$FC - fa - - identitySquareMatrix(fname:Symbol,n:PIN):FC == - ue:Expression(Integer) := 0 - u1:Expression(Integer) := 1 - i1:Symbol := "I1"::Symbol - lp1:PIN := 1::PIN - hp1:PIN := n - segp1:SEGPIN:= segment(lp1,hp1)$SEGPIN - segbp1:SBPIN := equation(i1,segp1)$SBPIN - i2:Symbol := "I2"::Symbol - segbp2:SBPIN := equation(i2,segp1)$SBPIN - ip1:PIN := i1::PIN - ip2:PIN := i2::PIN - indice1:List(PIN) := [ip1,ip1] - indices:List(PIN) := [ip1,ip2] - fc:FC := forLoop(segbp2,assign(fname,indices,ue)$FC)$FC - f1:FC := assign(fname,indice1,u1)$FC - fl:List(FC) := [fc,f1] - fa:FC := forLoop(segbp1,block(fl)$FC)$FC - fa - -@ -\section{package NAGSP NAGLinkSupportPackage} -<>= -)abbrev package NAGSP NAGLinkSupportPackage -++ Author: Mike Dewar and Godfrey Nolan -++ Date Created: March 1993 -++ Date Last Updated: March 4 1994 -++ October 6 1994 -++ Basic Operations: -++ Related Domains: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ Examples: -++ References: -++ Description: Support functions for the NAG Library Link functions -NAGLinkSupportPackage() : exports == implementation where - - exports ==> with - fortranCompilerName : () -> String - ++ fortranCompilerName() returns the name of the currently selected - ++ Fortran compiler - fortranLinkerArgs : () -> String - ++ fortranLinkerArgs() returns the current linker arguments - aspFilename : String -> String - ++ aspFilename("f") returns a String consisting of "f" suffixed with - ++ an extension identifying the current AXIOM session. - dimensionsOf : (Symbol, Matrix DoubleFloat) -> SExpression - ++ dimensionsOf(s,m) \undocumented{} - dimensionsOf : (Symbol, Matrix Integer) -> SExpression - ++ dimensionsOf(s,m) \undocumented{} - checkPrecision : () -> Boolean - ++ checkPrecision() \undocumented{} - restorePrecision : () -> Void - ++ restorePrecision() \undocumented{} - - implementation ==> add - makeAs: (Symbol,Symbol) -> Symbol - changeVariables: (Expression Integer,Symbol) -> Expression Integer - changeVariablesF: (Expression Float,Symbol) -> Expression Float - - import String - import Symbol - - checkPrecision():Boolean == - (_$fortranPrecision$Lisp = "single"::Symbol) and (_$nagEnforceDouble$Lisp) => - systemCommand("set fortran precision double")$MoreSystemCommands - if _$nagMessages$Lisp then - print("*** Warning: Resetting fortran precision to double")$PrintPackage - true - false - - restorePrecision():Void == - systemCommand("set fortran precision single")$MoreSystemCommands - if _$nagMessages$Lisp then - print("** Warning: Restoring fortran precision to single")$PrintPackage - void()$Void - - uniqueId : String := "" - counter : Integer := 0 - getUniqueId():String == - if uniqueId = "" then - uniqueId := concat(getEnv("HOST")$Lisp,getEnv("SPADNUM")$Lisp) - concat(uniqueId,string (counter:=counter+1)) - - fortranCompilerName() == string _$fortranCompilerName$Lisp - fortranLinkerArgs() == string _$fortranLibraries$Lisp - - aspFilename(f:String):String == concat ["/tmp/",f,getUniqueId(),".f"] - - dimensionsOf(u:Symbol,m:Matrix DoubleFloat):SExpression == - [u,nrows m,ncols m]$Lisp - dimensionsOf(u:Symbol,m:Matrix Integer):SExpression == - [u,nrows m,ncols m]$Lisp - -@ -\section{package FORT FortranPackage} -<>= -)abbrev package FORT FortranPackage --- Because of a bug in the compiler: -)bo $noSubsumption:=true - -++ Author: Mike Dewar -++ Date Created: October 6 1991 -++ Date Last Updated: 13 July 1994 -++ Basic Operations: linkToFortran -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: provides an interface to the boot code for calling Fortran -FortranPackage(): Exports == Implementation where - FST ==> FortranScalarType - SEX ==> SExpression - L ==> List - S ==> Symbol - FOP ==> FortranOutputStackPackage - U ==> Union(array:L S,scalar:S) - - Exports ==> with - linkToFortran: (S, L U, L L U, L S) -> SEX - ++ linkToFortran(s,l,ll,lv) \undocumented{} - linkToFortran: (S, L U, L L U, L S, S) -> SEX - ++ linkToFortran(s,l,ll,lv,t) \undocumented{} - linkToFortran: (S,L S,TheSymbolTable,L S) -> SEX - ++ linkToFortran(s,l,t,lv) \undocumented{} - outputAsFortran: FileName -> Void - ++ outputAsFortran(fn) \undocumented{} - setLegalFortranSourceExtensions: List String -> List String - ++ setLegalFortranSourceExtensions(l) \undocumented{} - - Implementation ==> add - - legalFortranSourceExtensions : List String := ["f"] - - setLegalFortranSourceExtensions(l:List String):List String == - legalFortranSourceExtensions := l - - checkExtension(fn : FileName) : String == - -- Does it end in a legal extension ? - stringFn := fn::String - not member?(extension fn,legalFortranSourceExtensions) => - error [stringFn,"is not a legal Fortran Source File."] - stringFn - - outputAsFortran(fn:FileName):Void == --- source : String := checkExtension fn - source : String := fn::String - not readable? fn => - popFortranOutputStack()$FOP - error([source,"is not readable"]@List(String)) - target : String := topFortranOutputStack()$FOP - command : String := - concat(["sys rm -f ",target," ; cp ",source," ",target])$String - systemCommand(command)$MoreSystemCommands - void()$Void - - linkToFortran(name:S,args:L U, decls:L L U, res:L(S)):SEX == - makeFort(name,args,decls,res,NIL$Lisp,NIL$Lisp)$Lisp - - linkToFortran(name:S,args:L U, decls:L L U, res:L(S),returnType:S):SEX == - makeFort(name,args,decls,res,returnType,NIL$Lisp)$Lisp - - dimensions(type:FortranType):SEX == - convert([convert(convert(u)@InputForm)@SEX _ - for u in dimensionsOf(type)])@SEX - - ftype(name:S,type:FortranType):SEX == - [name,scalarTypeOf(type),dimensions(type),external? type]$Lisp - - makeAspList(asp:S,syms:TheSymbolTable):SExpression== - symtab : SymbolTable := symbolTableOf(asp,syms) - [asp,returnTypeOf(asp,syms),argumentListOf(asp,syms), _ - [ftype(u,fortranTypeOf(u,symtab)) for u in parametersOf symtab]]$Lisp - - linkToFortran(name:S,aArgs:L S,syms:TheSymbolTable,res:L S):SEX == - arguments : L S := argumentListOf(name,syms)$TheSymbolTable - dummies : L S := setDifference(arguments,aArgs) - symbolTable:SymbolTable := symbolTableOf(name,syms) - symbolList := newTypeLists(symbolTable) - rt:Union(fst: FST,void: "void") := returnTypeOf(name,syms)$TheSymbolTable - - -- Look for arguments which are subprograms - asps :=[makeAspList(u,syms) for u in externalList(symbolTable)$SymbolTable] - rt case fst => - makeFort1(name,arguments,aArgs,dummies,symbolList,res,(rt.fst)::S,asps)$Lisp - makeFort1(name,arguments,aArgs,dummies,symbolList,res,NIL$Lisp,asps)$Lisp - -@ -\section{package FOP FortranOutputStackPackage} -<>= -)abbrev package FOP FortranOutputStackPackage --- Because of a bug in the compiler: -)bo $noSubsumption:=false - -++ Author: Mike Dewar -++ Date Created: October 1992 -++ Date Last Updated: -++ Basic Operations: -++ Related Domains: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ Examples: -++ References: -++ Description: Code to manipulate Fortran Output Stack -FortranOutputStackPackage() : specification == implementation where - - specification == with - - clearFortranOutputStack : () -> Stack String - ++ clearFortranOutputStack() clears the Fortran output stack - showFortranOutputStack : () -> Stack String - ++ showFortranOutputStack() returns the Fortran output stack - popFortranOutputStack : () -> Void - ++ popFortranOutputStack() pops the Fortran output stack - pushFortranOutputStack : FileName -> Void - ++ pushFortranOutputStack(f) pushes f onto the Fortran output stack - pushFortranOutputStack : String -> Void - ++ pushFortranOutputStack(f) pushes f onto the Fortran output stack - topFortranOutputStack : () -> String - ++ topFortranOutputStack() returns the top element of the Fortran - ++ output stack - - implementation == add - - import MoreSystemCommands - - -- A stack of filenames for Fortran output. We are sharing this with - -- the standard Fortran output code, so want to be a bit careful about - -- how we interact with what the user does independently. We get round - -- potential problems by always examining the top element of the stack - -- before we push. If the user has redirected output then we alter our - -- top value accordingly. - fortranOutputStack : Stack String := empty()@(Stack String) - - topFortranOutputStack():String == string(_$fortranOutputFile$Lisp) - - pushFortranOutputStack(fn:FileName):Void == - if empty? fortranOutputStack then - push!(string(_$fortranOutputFile$Lisp),fortranOutputStack) - else if not(top(fortranOutputStack)=string(_$fortranOutputFile$Lisp)) then - pop! fortranOutputStack - push!(string(_$fortranOutputFile$Lisp),fortranOutputStack) - push!( fn::String,fortranOutputStack) - systemCommand concat(["set output fortran quiet ", fn::String])$String - void() - - pushFortranOutputStack(fn:String):Void == - if empty? fortranOutputStack then - push!(string(_$fortranOutputFile$Lisp),fortranOutputStack) - else if not(top(fortranOutputStack)=string(_$fortranOutputFile$Lisp)) then - pop! fortranOutputStack - push!(string(_$fortranOutputFile$Lisp),fortranOutputStack) - push!( fn,fortranOutputStack) - systemCommand concat(["set output fortran quiet ", fn])$String - void() - - popFortranOutputStack():Void == - if not empty? fortranOutputStack then pop! fortranOutputStack - if empty? fortranOutputStack then push!("CONSOLE",fortranOutputStack) - systemCommand concat(["set output fortran quiet append ",_ - top fortranOutputStack])$String - void() - - clearFortranOutputStack():Stack String == - fortranOutputStack := empty()@(Stack String) - - showFortranOutputStack():Stack String == - fortranOutputStack - -@ -\section{package TEMUTL TemplateUtilities} -<>= -)abbrev package TEMUTL TemplateUtilities -++ Author: Mike Dewar -++ Date Created: October 1992 -++ Date Last Updated: -++ Basic Operations: -++ Related Domains: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ Examples: -++ References: -++ Description: This package provides functions for template manipulation -TemplateUtilities(): Exports == Implementation where - - Exports == with - interpretString : String -> Any - ++ interpretString(s) treats a string as a piece of AXIOM input, by - ++ parsing and interpreting it. - stripCommentsAndBlanks : String -> String - ++ stripCommentsAndBlanks(s) treats s as a piece of AXIOM input, and - ++ removes comments, and leading and trailing blanks. - - Implementation == add - - import InputForm - - stripC(s:String,u:String):String == - i : Integer := position(u,s,1) - i = 0 => s - delete(s,i..) - - stripCommentsAndBlanks(s:String):String == - trim(stripC(stripC(s,"++"),"--"),char " ") - - parse(s:String):InputForm == - ncParseFromString(s)$Lisp::InputForm - - interpretString(s:String):Any == - interpret parse s - -@ -\section{package MCALCFN MultiVariableCalculusFunctions} -<>= -)abbrev package MCALCFN MultiVariableCalculusFunctions -++ Author: Themos Tsikas, Grant Keady -++ Date Created: December 1992 -++ Date Last Updated: June 1993 -++ Basic Operations: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ \spadtype{MultiVariableCalculusFunctions} Package provides several -++ functions for multivariable calculus. -++ These include gradient, hessian and jacobian, -++ divergence and laplacian. -++ Various forms for banded and sparse storage of matrices are -++ included. -MultiVariableCalculusFunctions(S,F,FLAF,FLAS) : Exports == Implementation where - PI ==> PositiveInteger - NNI ==> NonNegativeInteger - - S: SetCategory - F: PartialDifferentialRing(S) - FLAS: FiniteLinearAggregate(S) - with finiteAggregate - FLAF: FiniteLinearAggregate(F) - - Exports ==> with - gradient: (F,FLAS) -> Vector F - ++ \spad{gradient(v,xlist)} - ++ computes the gradient, the vector of first partial derivatives, - ++ of the scalar field v, - ++ v a function of the variables listed in xlist. - divergence: (FLAF,FLAS) -> F - ++ \spad{divergence(vf,xlist)} - ++ computes the divergence of the vector field vf, - ++ vf a vector function of the variables listed in xlist. - laplacian: (F,FLAS) -> F - ++ \spad{laplacian(v,xlist)} - ++ computes the laplacian of the scalar field v, - ++ v a function of the variables listed in xlist. - hessian: (F,FLAS) -> Matrix F - ++ \spad{hessian(v,xlist)} - ++ computes the hessian, the matrix of second partial derivatives, - ++ of the scalar field v, - ++ v a function of the variables listed in xlist. - bandedHessian: (F,FLAS,NNI) -> Matrix F - ++ \spad{bandedHessian(v,xlist,k)} - ++ computes the hessian, the matrix of second partial derivatives, - ++ of the scalar field v, - ++ v a function of the variables listed in xlist, - ++ k is the semi-bandwidth, the number of nonzero subdiagonals, - ++ 2*k+1 being actual bandwidth. - ++ Stores the nonzero band in lower triangle in a matrix, - ++ dimensions k+1 by #xlist, - ++ whose rows are the vectors formed by diagonal, subdiagonal, etc. - ++ of the real, full-matrix, hessian. - ++ (The notation conforms to LAPACK/NAG-F07 conventions.) - -- At one stage it seemed a good idea to help the ASP domains - -- with the types of their input arguments and this led to the - -- standard Gradient|Hessian|Jacobian functions. - --standardJacobian: (Vector(F),List(S)) -> Matrix F - -- ++ \spad{jacobian(vf,xlist)} - -- ++ computes the jacobian, the matrix of first partial derivatives, - -- ++ of the vector field vf, - -- ++ vf a vector function of the variables listed in xlist. - jacobian: (FLAF,FLAS) -> Matrix F - ++ \spad{jacobian(vf,xlist)} - ++ computes the jacobian, the matrix of first partial derivatives, - ++ of the vector field vf, - ++ vf a vector function of the variables listed in xlist. - bandedJacobian: (FLAF,FLAS,NNI,NNI) -> Matrix F - ++ \spad{bandedJacobian(vf,xlist,kl,ku)} - ++ computes the jacobian, the matrix of first partial derivatives, - ++ of the vector field vf, - ++ vf a vector function of the variables listed in xlist, - ++ kl is the number of nonzero subdiagonals, - ++ ku is the number of nonzero superdiagonals, - ++ kl+ku+1 being actual bandwidth. - ++ Stores the nonzero band in a matrix, - ++ dimensions kl+ku+1 by #xlist. - ++ The upper triangle is in the top ku rows, - ++ the diagonal is in row ku+1, - ++ the lower triangle in the last kl rows. - ++ Entries in a column in the band store correspond to entries - ++ in same column of full store. - ++ (The notation conforms to LAPACK/NAG-F07 conventions.) - - Implementation ==> add - localGradient(v:F,xlist:List(S)):Vector(F) == - vector([D(v,x) for x in xlist]) - gradient(v,xflas) == - --xlist:List(S) := [xflas(i) for i in 1 .. maxIndex(xflas)] - xlist:List(S) := parts(xflas) - localGradient(v,xlist) - localDivergence(vf:Vector(F),xlist:List(S)):F == - i: PI - n: NNI - ans: F - -- Perhaps should report error if two args of min different - n:= min(#(xlist),((maxIndex(vf))::NNI))$NNI - ans:= 0 - for i in 1 .. n repeat ans := ans + D(vf(i),xlist(i)) - ans - divergence(vf,xflas) == - xlist:List(S) := parts(xflas) - i: PI - n: NNI - ans: F - -- Perhaps should report error if two args of min different - n:= min(#(xlist),((maxIndex(vf))::NNI))$NNI - ans:= 0 - for i in 1 .. n repeat ans := ans + D(vf(i),xlist(i)) - ans - laplacian(v,xflas) == - xlist:List(S) := parts(xflas) - gv:Vector(F) := localGradient(v,xlist) - localDivergence(gv,xlist) - hessian(v,xflas) == - xlist:List(S) := parts(xflas) - matrix([[D(v,[x,y]) for x in xlist] for y in xlist]) - --standardJacobian(vf,xlist) == - -- i: PI - -- matrix([[D(vf(i),x) for x in xlist] for i in 1 .. maxIndex(vf)]) - jacobian(vf,xflas) == - xlist:List(S) := parts(xflas) - i: PI - matrix([[D(vf(i),x) for x in xlist] for i in 1 .. maxIndex(vf)]) - bandedHessian(v,xflas,k) == - xlist:List(S) := parts(xflas) - j,iw: PI - n: NNI - bandM: Matrix F - n:= #(xlist) - bandM:= new(k+1,n,0) - for j in 1 .. n repeat setelt(bandM,1,j,D(v,xlist(j),2)) - for iw in 2 .. (k+1) repeat (_ - for j in 1 .. (n-iw+1) repeat (_ - setelt(bandM,iw,j,D(v,[xlist(j),xlist(j+iw-1)])) ) ) - bandM - jacobian(vf,xflas) == - xlist:List(S) := parts(xflas) - i: PI - matrix([[D(vf(i),x) for x in xlist] for i in 1 .. maxIndex(vf)]) - bandedJacobian(vf,xflas,kl,ku) == - xlist:List(S) := parts(xflas) - j,iw: PI - n: NNI - bandM: Matrix F - n:= #(xlist) - bandM:= new(kl+ku+1,n,0) - for j in 1 .. n repeat setelt(bandM,ku+1,j,D(vf(j),xlist(j))) - for iw in (ku+2) .. (ku+kl+1) repeat (_ - for j in 1 .. (n-iw+ku+1) repeat (_ - setelt(bandM,iw,j,D(vf(j+iw-1-ku),xlist(j))) ) ) - for iw in 1 .. ku repeat (_ - for j in (ku+2-iw) .. n repeat (_ - setelt(bandM,iw,j,D(vf(j+iw-1-ku),xlist(j))) ) ) - bandM - -@ -\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/fr.spad.pamphlet b/src/algebra/fr.spad.pamphlet deleted file mode 100644 index 21d9687..0000000 --- a/src/algebra/fr.spad.pamphlet +++ /dev/null @@ -1,260 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra fr.spad} -\author{Robert S. Sutor, Johnannes Grabmeier} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package FRUTIL FactoredFunctionUtilities} -<>= -)abbrev package FRUTIL FactoredFunctionUtilities -++ Author: -++ Date Created: -++ Change History: -++ Basic Operations: refine, mergeFactors -++ Related Constructors: Factored -++ Also See: -++ AMS Classifications: 11A51, 11Y05 -++ Keywords: factor -++ References: -++ Description: -++ \spadtype{FactoredFunctionUtilities} implements some utility -++ functions for manipulating factored objects. -FactoredFunctionUtilities(R): Exports == Implementation where - R: IntegralDomain - FR ==> Factored R - - Exports ==> with - refine: (FR, R-> FR) -> FR - ++ refine(u,fn) is used to apply the function \userfun{fn} to - ++ each factor of \spadvar{u} and then build a new factored - ++ object from the results. For example, if \spadvar{u} were - ++ created by calling \spad{nilFactor(10,2)} then - ++ \spad{refine(u,factor)} would create a factored object equal - ++ to that created by \spad{factor(100)} or - ++ \spad{primeFactor(2,2) * primeFactor(5,2)}. - - mergeFactors: (FR,FR) -> FR - ++ mergeFactors(u,v) is used when the factorizations of \spadvar{u} - ++ and \spadvar{v} are known to be disjoint, e.g. resulting from a - ++ content/primitive part split. Essentially, it creates a new - ++ factored object by multiplying the units together and appending - ++ the lists of factors. - - Implementation ==> add - fg: FR - func: R -> FR - fUnion ==> Union("nil", "sqfr", "irred", "prime") - FF ==> Record(flg: fUnion, fctr: R, xpnt: Integer) - - mergeFactors(f,g) == - makeFR(unit(f)*unit(g),append(factorList f,factorList g)) - - refine(f, func) == - u := unit(f) - l: List FF := empty() - for item in factorList f repeat - fitem := func item.fctr - u := u*unit(fitem) ** (item.xpnt :: NonNegativeInteger) - if item.xpnt = 1 then - l := concat(factorList fitem,l) - else l := concat([[v.flg,v.fctr,v.xpnt*item.xpnt] - for v in factorList fitem],l) - makeFR(u,l) - -@ -\section{package FR2 FactoredFunctions2} -<>= --- fr.spad.pamphlet FactoredFunctions2.input -)spool FactoredFunctions2.output -)set message test on -)set message auto off -)clear all ---S 1 of 6 -double(x) == x + x ---R ---R Type: Void ---E 1 - ---S 2 of 6 -f := factor(720) ---R ---R ---R 4 2 ---R (2) 2 3 5 ---R Type: Factored Integer ---E 2 - ---S 3 of 6 -map(double,f) ---R ---R Compiling function double with type Integer -> Integer ---R ---R 4 2 ---R (3) 2 4 6 10 ---R Type: Factored Integer ---E 3 - ---S 4 of 6 -makePoly(b) == x + b ---R ---R Type: Void ---E 4 - ---S 5 of 6 -g := map(makePoly,f) ---R ---R Compiling function makePoly with type Integer -> Polynomial Integer ---R ---R 4 2 ---R (5) (x + 1)(x + 2) (x + 3) (x + 5) ---R Type: Factored Polynomial Integer ---E 5 - ---S 6 of 6 -nthFlag(g,1) ---R ---R ---R (6) "nil" ---R Type: Union("nil",...) ---E 6 -)spool -)lisp (bye) -@ - -<>= -==================================================================== -FactoredFunctions2 examples -==================================================================== - -The FactoredFunctions2 package implements one operation, map, for -applying an operation to every base in a factored object and to the unit. - - double(x) == x + x - Type: Void - - f := factor(720) - 4 2 - 2 3 5 - Type: Factored Integer - -Actually, the map operation used in this example comes from Factored -itself, since double takes an integer argument and returns an integer -result. - - map(double,f) - 4 2 - 2 4 6 10 - Type: Factored Integer - -If we want to use an operation that returns an object that has a type -different from the operation's argument, the map in Factored cannot be -used and we use the one in FactoredFunctions2. - - makePoly(b) == x + b - 4 2 - (x + 1)(x + 2) (x + 3) (x + 5) - Type: Factored Polynomial Integer - -In fact, the "2" in the name of the package means that we might -be using factored objects of two different types. - - g := map(makePoly,f) - -It is important to note that both versions of map destroy any information -known about the bases (the fact that they are prime, for instance). - -The flags for each base are set to "nil" in the object returned by map. - - nthFlag(g,1) - "nil" - Type: Union("nil",...) - -See Also: -o )help Factored -o )show FactoredFunctions2 -o $AXIOM/doc/src/algebra/fr.spad.dvi - -@ -<>= -)abbrev package FR2 FactoredFunctions2 -++ Author: Robert S. Sutor -++ Date Created: 1987 -++ Change History: -++ Basic Operations: map -++ Related Constructors: Factored -++ Also See: -++ AMS Classifications: 11A51, 11Y05 -++ Keywords: map, factor -++ References: -++ Description: -++ \spadtype{FactoredFunctions2} contains functions that involve -++ factored objects whose underlying domains may not be the same. -++ For example, \spadfun{map} might be used to coerce an object of -++ type \spadtype{Factored(Integer)} to -++ \spadtype{Factored(Complex(Integer))}. -FactoredFunctions2(R, S): Exports == Implementation where - R: IntegralDomain - S: IntegralDomain - - Exports ==> with - map: (R -> S, Factored R) -> Factored S - ++ map(fn,u) is used to apply the function \userfun{fn} to every - ++ factor of \spadvar{u}. The new factored object will have all its - ++ information flags set to "nil". This function is used, for - ++ example, to coerce every factor base to another type. - - Implementation ==> add - map(func, f) == - func(unit f) * - _*/[nilFactor(func(g.factor), g.exponent) for g in factors f] - -@ -\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/fraction.spad.pamphlet b/src/algebra/fraction.spad.pamphlet deleted file mode 100644 index 47c7743..0000000 --- a/src/algebra/fraction.spad.pamphlet +++ /dev/null @@ -1,169 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra fraction.spad} -\author{Dave Barton, Barry Trager, James Davenport} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package QFCAT2 QuotientFieldCategoryFunctions2} -<>= -)abbrev package QFCAT2 QuotientFieldCategoryFunctions2 -++ Author: -++ Date Created: -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ This package extends a function between integral domains -++ to a mapping between their quotient fields. -QuotientFieldCategoryFunctions2(A, B, R, S): Exports == Impl where - A, B: IntegralDomain - R : QuotientFieldCategory(A) - S : QuotientFieldCategory(B) - - Exports ==> with - map: (A -> B, R) -> S - ++ map(func,frac) applies the function func to the numerator - ++ and denominator of frac. - - Impl ==> add - map(f, r) == f(numer r) / f(denom r) - -@ -\section{package LPEFRAC LinearPolynomialEquationByFractions} -<>= -)abbrev package LPEFRAC LinearPolynomialEquationByFractions -++ Author: James Davenport -++ Date Created: -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: -++ Given a PolynomialFactorizationExplicit ring, this package -++ provides a defaulting rule for the \spad{solveLinearPolynomialEquation} -++ operation, by moving into the field of fractions, and solving it there -++ via the \spad{multiEuclidean} operation. -LinearPolynomialEquationByFractions(R:PolynomialFactorizationExplicit): with - solveLinearPolynomialEquationByFractions: ( _ - List SparseUnivariatePolynomial R, _ - SparseUnivariatePolynomial R) -> _ - Union(List SparseUnivariatePolynomial R, "failed") - ++ solveLinearPolynomialEquationByFractions([f1, ..., fn], g) - ++ (where the fi are relatively prime to each other) - ++ returns a list of ai such that - ++ \spad{g/prod fi = sum ai/fi} - ++ or returns "failed" if no such exists. - == add - SupR ==> SparseUnivariatePolynomial R - F ==> Fraction R - SupF ==> SparseUnivariatePolynomial F - import UnivariatePolynomialCategoryFunctions2(R,SupR,F,SupF) - lp : List SupR - pp: SupR - pF: SupF - pullback : SupF -> Union(SupR,"failed") - pullback(pF) == - pF = 0 => 0 - c:=retractIfCan leadingCoefficient pF - c case "failed" => "failed" - r:=pullback reductum pF - r case "failed" => "failed" - monomial(c,degree pF) + r - solveLinearPolynomialEquationByFractions(lp,pp) == - lpF:List SupF:=[map(#1@R::F,u) for u in lp] - pF:SupF:=map(#1@R::F,pp) - ans:= solveLinearPolynomialEquation(lpF,pF)$F - ans case "failed" => "failed" - [(vv:= pullback v; - vv case "failed" => return "failed"; - vv) - for v in ans] - -@ -\section{package FRAC2 FractionFunctions2} -<>= -)abbrev package FRAC2 FractionFunctions2 -++ Author: -++ Date Created: -++ Date Last Updated: -++ Basic Functions: -++ Related Constructors: -++ Also See: -++ AMS Classifications: -++ Keywords: -++ References: -++ Description: This package extends a map between integral domains to -++ a map between Fractions over those domains by applying the map to the -++ numerators and denominators. -FractionFunctions2(A, B): Exports == Impl where - A, B: IntegralDomain - - R ==> Fraction A - S ==> Fraction B - - Exports ==> with - map: (A -> B, R) -> S - ++ map(func,frac) applies the function func to the numerator - ++ and denominator of the fraction frac. - - Impl ==> add - map(f, r) == map(f, r)$QuotientFieldCategoryFunctions2(A, B, R, 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/fs2expxp.spad.pamphlet b/src/algebra/fs2expxp.spad.pamphlet deleted file mode 100644 index fed8008..0000000 --- a/src/algebra/fs2expxp.spad.pamphlet +++ /dev/null @@ -1,598 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra fs2expxp.spad} -\author{Clifton J. Williamson} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package FS2EXPXP FunctionSpaceToExponentialExpansion} -<>= -)abbrev package FS2EXPXP FunctionSpaceToExponentialExpansion -++ Author: Clifton J. Williamson -++ Date Created: 17 August 1992 -++ Date Last Updated: 2 December 1994 -++ Basic Operations: -++ Related Domains: ExponentialExpansion, UnivariatePuiseuxSeries(FE,x,cen) -++ Also See: FunctionSpaceToUnivariatePowerSeries -++ AMS Classifications: -++ Keywords: elementary function, power series -++ Examples: -++ References: -++ Description: -++ This package converts expressions in some function space to exponential -++ expansions. -FunctionSpaceToExponentialExpansion(R,FE,x,cen):_ - Exports == Implementation where - R : Join(GcdDomain,OrderedSet,RetractableTo Integer,_ - LinearlyExplicitRingOver Integer) - FE : Join(AlgebraicallyClosedField,TranscendentalFunctionCategory,_ - FunctionSpace R) - x : Symbol - cen : FE - B ==> Boolean - BOP ==> BasicOperator - Expon ==> Fraction Integer - I ==> Integer - NNI ==> NonNegativeInteger - K ==> Kernel FE - L ==> List - RN ==> Fraction Integer - S ==> String - SY ==> Symbol - PCL ==> PolynomialCategoryLifting(IndexedExponents K,K,R,SMP,FE) - POL ==> Polynomial R - SMP ==> SparseMultivariatePolynomial(R,K) - SUP ==> SparseUnivariatePolynomial Polynomial R - UTS ==> UnivariateTaylorSeries(FE,x,cen) - ULS ==> UnivariateLaurentSeries(FE,x,cen) - UPXS ==> UnivariatePuiseuxSeries(FE,x,cen) - EFULS ==> ElementaryFunctionsUnivariateLaurentSeries(FE,UTS,ULS) - EFUPXS ==> ElementaryFunctionsUnivariatePuiseuxSeries(FE,ULS,UPXS,EFULS) - FS2UPS ==> FunctionSpaceToUnivariatePowerSeries(R,FE,RN,UPXS,EFUPXS,x) - EXPUPXS ==> ExponentialOfUnivariatePuiseuxSeries(FE,x,cen) - UPXSSING ==> UnivariatePuiseuxSeriesWithExponentialSingularity(R,FE,x,cen) - XXP ==> ExponentialExpansion(R,FE,x,cen) - Problem ==> Record(func:String,prob:String) - Result ==> Union(%series:UPXS,%problem:Problem) - XResult ==> Union(%expansion:XXP,%problem:Problem) - SIGNEF ==> ElementaryFunctionSign(R,FE) - - Exports ==> with - exprToXXP : (FE,B) -> XResult - ++ exprToXXP(fcn,posCheck?) converts the expression \spad{fcn} to - ++ an exponential expansion. If \spad{posCheck?} is true, - ++ log's of negative numbers are not allowed nor are nth roots of - ++ negative numbers with n even. If \spad{posCheck?} is false, - ++ these are allowed. - localAbs: FE -> FE - ++ localAbs(fcn) = \spad{abs(fcn)} or \spad{sqrt(fcn**2)} depending - ++ on whether or not FE has a function \spad{abs}. This should be - ++ a local function, but the compiler won't allow it. - - Implementation ==> add - - import FS2UPS -- conversion of functional expressions to Puiseux series - import EFUPXS -- partial transcendental funtions on UPXS - - ratIfCan : FE -> Union(RN,"failed") - stateSeriesProblem : (S,S) -> Result - stateProblem : (S,S) -> XResult - newElem : FE -> FE - smpElem : SMP -> FE - k2Elem : K -> FE - iExprToXXP : (FE,B) -> XResult - listToXXP : (L FE,B,XXP,(XXP,XXP) -> XXP) -> XResult - isNonTrivPower : FE -> Union(Record(val:FE,exponent:I),"failed") - negativePowerOK? : UPXS -> Boolean - powerToXXP : (FE,I,B) -> XResult - carefulNthRootIfCan : (UPXS,NNI,B) -> Result - nthRootXXPIfCan : (XXP,NNI,B) -> XResult - nthRootToXXP : (FE,NNI,B) -> XResult - genPowerToXXP : (L FE,B) -> XResult - kernelToXXP : (K,B) -> XResult - genExp : (UPXS,B) -> Result - exponential : (UPXS,B) -> XResult - expToXXP : (FE,B) -> XResult - genLog : (UPXS,B) -> Result - logToXXP : (FE,B) -> XResult - applyIfCan : (UPXS -> Union(UPXS,"failed"),FE,S,B) -> XResult - applyBddIfCan : (FE,UPXS -> Union(UPXS,"failed"),FE,S,B) -> XResult - tranToXXP : (K,FE,B) -> XResult - contOnReals? : S -> B - bddOnReals? : S -> B - opsInvolvingX : FE -> L BOP - opInOpList? : (SY,L BOP) -> B - exponential? : FE -> B - productOfNonZeroes? : FE -> B - atancotToXXP : (FE,FE,B,I) -> XResult - - ZEROCOUNT : RN := 1000/1 - -- number of zeroes to be removed when taking logs or nth roots - ---% retractions - - ratIfCan fcn == retractIfCan(fcn)@Union(RN,"failed") - ---% 'problems' with conversion - - stateSeriesProblem(function,problem) == - -- records the problem which occured in converting an expression - -- to a power series - [[function,problem]] - - stateProblem(function,problem) == - -- records the problem which occured in converting an expression - -- to an exponential expansion - [[function,problem]] - ---% normalizations - - newElem f == - -- rewrites a functional expression; all trig functions are - -- expressed in terms of sin and cos; all hyperbolic trig - -- functions are expressed in terms of exp; all inverse - -- hyperbolic trig functions are expressed in terms of exp - -- and log - smpElem(numer f) / smpElem(denom f) - - smpElem p == map(k2Elem,#1::FE,p)$PCL - - k2Elem k == - -- rewrites a kernel; all trig functions are - -- expressed in terms of sin and cos; all hyperbolic trig - -- functions are expressed in terms of exp - null(args := [newElem a for a in argument k]) => k :: FE - iez := inv(ez := exp(z := first args)) - sinz := sin z; cosz := cos z - is?(k,"tan" :: SY) => sinz / cosz - is?(k,"cot" :: SY) => cosz / sinz - is?(k,"sec" :: SY) => inv cosz - is?(k,"csc" :: SY) => inv sinz - is?(k,"sinh" :: SY) => (ez - iez) / (2 :: FE) - is?(k,"cosh" :: SY) => (ez + iez) / (2 :: FE) - is?(k,"tanh" :: SY) => (ez - iez) / (ez + iez) - is?(k,"coth" :: SY) => (ez + iez) / (ez - iez) - is?(k,"sech" :: SY) => 2 * inv(ez + iez) - is?(k,"csch" :: SY) => 2 * inv(ez - iez) - is?(k,"acosh" :: SY) => log(sqrt(z**2 - 1) + z) - is?(k,"atanh" :: SY) => log((z + 1) / (1 - z)) / (2 :: FE) - is?(k,"acoth" :: SY) => log((z + 1) / (z - 1)) / (2 :: FE) - is?(k,"asech" :: SY) => log((inv z) + sqrt(inv(z**2) - 1)) - is?(k,"acsch" :: SY) => log((inv z) + sqrt(1 + inv(z**2))) - (operator k) args - ---% general conversion function - - exprToXXP(fcn,posCheck?) == iExprToXXP(newElem fcn,posCheck?) - - iExprToXXP(fcn,posCheck?) == - -- converts a functional expression to an exponential expansion - --!! The following line is commented out so that expressions of - --!! the form a**b will be normalized to exp(b * log(a)) even if - --!! 'a' and 'b' do not involve the limiting variable 'x'. - --!! - cjw 1 Dec 94 - --not member?(x,variables fcn) => [monomial(fcn,0)$UPXS :: XXP] - (poly := retractIfCan(fcn)@Union(POL,"failed")) case POL => - [exprToUPS(fcn,false,"real:two sides").%series :: XXP] - (sum := isPlus fcn) case L(FE) => - listToXXP(sum :: L(FE),posCheck?,0,#1 + #2) - (prod := isTimes fcn) case L(FE) => - listToXXP(prod :: L(FE),posCheck?,1,#1 * #2) - (expt := isNonTrivPower fcn) case Record(val:FE,exponent:I) => - power := expt :: Record(val:FE,exponent:I) - powerToXXP(power.val,power.exponent,posCheck?) - (ker := retractIfCan(fcn)@Union(K,"failed")) case K => - kernelToXXP(ker :: K,posCheck?) - error "exprToXXP: neither a sum, product, power, nor kernel" - ---% sums and products - - listToXXP(list,posCheck?,ans,op) == - -- converts each element of a list of expressions to an exponential - -- expansion and returns the sum of these expansions, when 'op' is + - -- and 'ans' is 0, or the product of these expansions, when 'op' is * - -- and 'ans' is 1 - while not null list repeat - (term := iExprToXXP(first list,posCheck?)) case %problem => - return term - ans := op(ans,term.%expansion) - list := rest list - [ans] - ---% nth roots and integral powers - - isNonTrivPower fcn == - -- is the function a power with exponent other than 0 or 1? - (expt := isPower fcn) case "failed" => "failed" - power := expt :: Record(val:FE,exponent:I) --- one? power.exponent => "failed" - (power.exponent = 1) => "failed" - power - - negativePowerOK? upxs == - -- checks the lower order coefficient of a Puiseux series; - -- the coefficient may be inverted only if - -- (a) the only function involving x is 'log', or - -- (b) the lowest order coefficient is a product of exponentials - -- and functions not involving x - deg := degree upxs - if (coef := coefficient(upxs,deg)) = 0 then - deg := order(upxs,deg + ZEROCOUNT :: Expon) - (coef := coefficient(upxs,deg)) = 0 => - error "inverse of series with many leading zero coefficients" - xOpList := opsInvolvingX coef - -- only function involving x is 'log' - (null xOpList) => true - (null rest xOpList and is?(first xOpList,"log" :: SY)) => true - -- lowest order coefficient is a product of exponentials and - -- functions not involving x - productOfNonZeroes? coef => true - false - - powerToXXP(fcn,n,posCheck?) == - -- converts an integral power to an exponential expansion - (b := iExprToXXP(fcn,posCheck?)) case %problem => b - xxp := b.%expansion - n > 0 => [xxp ** n] - -- a Puiseux series will be reciprocated only if n < 0 and - -- numerator of 'xxp' has exactly one monomial - numberOfMonomials(num := numer xxp) > 1 => [xxp ** n] - negativePowerOK? leadingCoefficient num => - (rec := recip num) case "failed" => error "FS2EXPXP: can't happen" - nn := (-n) :: NNI - [(((denom xxp) ** nn) * ((rec :: UPXSSING) ** nn)) :: XXP] - --!! we may want to create a fraction instead of trying to - --!! reciprocate the numerator - stateProblem("inv","lowest order coefficient involves x") - - carefulNthRootIfCan(ups,n,posCheck?) == - -- similar to 'nthRootIfCan', but it is fussy about the series - -- it takes as an argument. If 'n' is EVEN and 'posCheck?' - -- is truem then the leading coefficient of the series must - -- be POSITIVE. In this case, if 'rightOnly?' is false, the - -- order of the series must be zero. The idea is that the - -- series represents a real function of a real variable, and - -- we want a unique real nth root defined on a neighborhood - -- of zero. - n < 1 => error "nthRoot: n must be positive" - deg := degree ups - if (coef := coefficient(ups,deg)) = 0 then - deg := order(ups,deg + ZEROCOUNT :: Expon) - (coef := coefficient(ups,deg)) = 0 => - error "log of series with many leading zero coefficients" - -- if 'posCheck?' is true, we do not allow nth roots of negative - -- numbers when n in even - if even?(n :: I) then - if posCheck? and ((signum := sign(coef)$SIGNEF) case I) then - (signum :: I) = -1 => - return stateSeriesProblem("nth root","root of negative number") - (ans := nthRootIfCan(ups,n)) case "failed" => - stateSeriesProblem("nth root","no nth root") - [ans :: UPXS] - - nthRootXXPIfCan(xxp,n,posCheck?) == - num := numer xxp; den := denom xxp - not zero?(reductum num) or not zero?(reductum den) => - stateProblem("nth root","several monomials in numerator or denominator") - nInv : RN := 1/n - newNum := - coef : UPXS := - root := carefulNthRootIfCan(leadingCoefficient num,n,posCheck?) - root case %problem => return [root.%problem] - root.%series - deg := (nInv :: FE) * (degree num) - monomial(coef,deg) - newDen := - coef : UPXS := - root := carefulNthRootIfCan(leadingCoefficient den,n,posCheck?) - root case %problem => return [root.%problem] - root.%series - deg := (nInv :: FE) * (degree den) - monomial(coef,deg) - [newNum/newDen] - - nthRootToXXP(arg,n,posCheck?) == - -- converts an nth root to a power series - -- this is not used in the limit package, so the series may - -- have non-zero order, in which case nth roots may not be unique - (result := iExprToXXP(arg,posCheck?)) case %problem => [result.%problem] - ans := nthRootXXPIfCan(result.%expansion,n,posCheck?) - ans case %problem => [ans.%problem] - [ans.%expansion] - ---% general powers f(x) ** g(x) - - genPowerToXXP(args,posCheck?) == - -- converts a power f(x) ** g(x) to an exponential expansion - (logBase := logToXXP(first args,posCheck?)) case %problem => - logBase - (expon := iExprToXXP(second args,posCheck?)) case %problem => - expon - xxp := (expon.%expansion) * (logBase.%expansion) - (f := retractIfCan(xxp)@Union(UPXS,"failed")) case "failed" => - stateProblem("exp","multiply nested exponential") - exponential(f,posCheck?) - ---% kernels - - kernelToXXP(ker,posCheck?) == - -- converts a kernel to a power series - (sym := symbolIfCan(ker)) case Symbol => - (sym :: Symbol) = x => [monomial(1,1)$UPXS :: XXP] - [monomial(ker :: FE,0)$UPXS :: XXP] - empty?(args := argument ker) => [monomial(ker :: FE,0)$UPXS :: XXP] - empty? rest args => - arg := first args - is?(ker,"%paren" :: Symbol) => iExprToXXP(arg,posCheck?) - is?(ker,"log" :: Symbol) => logToXXP(arg,posCheck?) - is?(ker,"exp" :: Symbol) => expToXXP(arg,posCheck?) - tranToXXP(ker,arg,posCheck?) - is?(ker,"%power" :: Symbol) => genPowerToXXP(args,posCheck?) - is?(ker,"nthRoot" :: Symbol) => - n := retract(second args)@I - nthRootToXXP(first args,n :: NNI,posCheck?) - stateProblem(string name ker,"unknown kernel") - ---% exponentials and logarithms - - genExp(ups,posCheck?) == - -- If the series has order zero and the constant term a0 of the - -- series involves x, the function tries to expand exp(a0) as - -- a power series. - (deg := order(ups,1)) < 0 => - -- this "can't happen" - error "exp of function with sigularity" - deg > 0 => [exp(ups)] - lc := coefficient(ups,0); varOpList := opsInvolvingX lc - not opInOpList?("log" :: Symbol,varOpList) => [exp(ups)] - -- try to fix exp(lc) if necessary - expCoef := normalize(exp lc,x)$ElementaryFunctionStructurePackage(R,FE) - result := exprToGenUPS(expCoef,posCheck?,"real:right side")$FS2UPS - --!! will deal with problems in limitPlus in EXPEXPAN - --result case %problem => result - result case %problem => [exp(ups)] - [(result.%series) * exp(ups - monomial(lc,0))] - - exponential(f,posCheck?) == - singPart := truncate(f,0) - (coefficient(f,0) :: UPXS) - taylorPart := f - singPart - expon := exponential(singPart)$EXPUPXS - (coef := genExp(taylorPart,posCheck?)) case %problem => [coef.%problem] - [monomial(coef.%series,expon)$UPXSSING :: XXP] - - expToXXP(arg,posCheck?) == - (result := iExprToXXP(arg,posCheck?)) case %problem => result - xxp := result.%expansion - (f := retractIfCan(xxp)@Union(UPXS,"failed")) case "failed" => - stateProblem("exp","multiply nested exponential") - exponential(f,posCheck?) - - genLog(ups,posCheck?) == - deg := degree ups - if (coef := coefficient(ups,deg)) = 0 then - deg := order(ups,deg + ZEROCOUNT) - (coef := coefficient(ups,deg)) = 0 => - error "log of series with many leading zero coefficients" - -- if 'posCheck?' is true, we do not allow logs of negative numbers - if posCheck? then - if ((signum := sign(coef)$SIGNEF) case I) then - (signum :: I) = -1 => - return stateSeriesProblem("log","negative leading coefficient") - lt := monomial(coef,deg)$UPXS - -- check to see if lowest order coefficient is a negative rational - negRat? : Boolean := - ((rat := ratIfCan coef) case RN) => - (rat :: RN) < 0 => true - false - false - logTerm : FE := - mon : FE := (x :: FE) - (cen :: FE) - pow : FE := mon ** (deg :: FE) - negRat? => log(coef * pow) - term1 : FE := (deg :: FE) * log(mon) - log(coef) + term1 - [monomial(logTerm,0)$UPXS + log(ups/lt)] - - logToXXP(arg,posCheck?) == - (result := iExprToXXP(arg,posCheck?)) case %problem => result - xxp := result.%expansion - num := numer xxp; den := denom xxp - not zero?(reductum num) or not zero?(reductum den) => - stateProblem("log","several monomials in numerator or denominator") - numCoefLog : UPXS := - (res := genLog(leadingCoefficient num,posCheck?)) case %problem => - return [res.%problem] - res.%series - denCoefLog : UPXS := - (res := genLog(leadingCoefficient den,posCheck?)) case %problem => - return [res.%problem] - res.%series - numLog := (exponent degree num) + numCoefLog - denLog := (exponent degree den) + denCoefLog --?? num? - [(numLog - denLog) :: XXP] - ---% other transcendental functions - - applyIfCan(fcn,arg,fcnName,posCheck?) == - -- converts fcn(arg) to an exponential expansion - (xxpArg := iExprToXXP(arg,posCheck?)) case %problem => xxpArg - xxp := xxpArg.%expansion - (f := retractIfCan(xxp)@Union(UPXS,"failed")) case "failed" => - stateProblem(fcnName,"multiply nested exponential") - upxs := f :: UPXS - (deg := order(upxs,1)) < 0 => - stateProblem(fcnName,"essential singularity") - deg > 0 => [fcn(upxs) :: UPXS :: XXP] - lc := coefficient(upxs,0); xOpList := opsInvolvingX lc - null xOpList => [fcn(upxs) :: UPXS :: XXP] - opInOpList?("log" :: SY,xOpList) => - stateProblem(fcnName,"logs in constant coefficient") - contOnReals? fcnName => [fcn(upxs) :: UPXS :: XXP] - stateProblem(fcnName,"x in constant coefficient") - - applyBddIfCan(fe,fcn,arg,fcnName,posCheck?) == - -- converts fcn(arg) to a generalized power series, where the - -- function fcn is bounded for real values - -- if fcn(arg) has an essential singularity as a complex - -- function, we return fcn(arg) as a monomial of degree 0 - (xxpArg := iExprToXXP(arg,posCheck?)) case %problem => - trouble := xxpArg.%problem - trouble.prob = "essential singularity" => [monomial(fe,0)$UPXS :: XXP] - xxpArg - xxp := xxpArg.%expansion - (f := retractIfCan(xxp)@Union(UPXS,"failed")) case "failed" => - stateProblem("exp","multiply nested exponential") - (ans := fcn(f :: UPXS)) case "failed" => [monomial(fe,0)$UPXS :: XXP] - [ans :: UPXS :: XXP] - - CONTFCNS : L S := ["sin","cos","atan","acot","exp","asinh"] - -- functions which are defined and continuous at all real numbers - - BDDFCNS : L S := ["sin","cos","atan","acot"] - -- functions which are bounded on the reals - - contOnReals? fcn == member?(fcn,CONTFCNS) - bddOnReals? fcn == member?(fcn,BDDFCNS) - - opsInvolvingX fcn == - opList := [op for k in tower fcn | unary?(op := operator k) _ - and member?(x,variables first argument k)] - removeDuplicates opList - - opInOpList?(name,opList) == - for op in opList repeat - is?(op,name) => return true - false - - exponential? fcn == - -- is 'fcn' of the form exp(f)? - (ker := retractIfCan(fcn)@Union(K,"failed")) case K => - is?(ker :: K,"exp" :: Symbol) - false - - productOfNonZeroes? fcn == - -- is 'fcn' a product of non-zero terms, where 'non-zero' - -- means an exponential or a function not involving x - exponential? fcn => true - (prod := isTimes fcn) case "failed" => false - for term in (prod :: L(FE)) repeat - (not exponential? term) and member?(x,variables term) => - return false - true - - tranToXXP(ker,arg,posCheck?) == - -- converts op(arg) to a power series for certain functions - -- op in trig or hyperbolic trig categories - -- N.B. when this function is called, 'k2elem' will have been - -- applied, so the following functions cannot appear: - -- tan, cot, sec, csc, sinh, cosh, tanh, coth, sech, csch - -- acosh, atanh, acoth, asech, acsch - is?(ker,"sin" :: SY) => - applyBddIfCan(ker :: FE,sinIfCan,arg,"sin",posCheck?) - is?(ker,"cos" :: SY) => - applyBddIfCan(ker :: FE,cosIfCan,arg,"cos",posCheck?) - is?(ker,"asin" :: SY) => - applyIfCan(asinIfCan,arg,"asin",posCheck?) - is?(ker,"acos" :: SY) => - applyIfCan(acosIfCan,arg,"acos",posCheck?) - is?(ker,"atan" :: SY) => - atancotToXXP(ker :: FE,arg,posCheck?,1) - is?(ker,"acot" :: SY) => - atancotToXXP(ker :: FE,arg,posCheck?,-1) - is?(ker,"asec" :: SY) => - applyIfCan(asecIfCan,arg,"asec",posCheck?) - is?(ker,"acsc" :: SY) => - applyIfCan(acscIfCan,arg,"acsc",posCheck?) - is?(ker,"asinh" :: SY) => - applyIfCan(asinhIfCan,arg,"asinh",posCheck?) - stateProblem(string name ker,"unknown kernel") - - if FE has abs: FE -> FE then - localAbs fcn == abs fcn - else - localAbs fcn == sqrt(fcn * fcn) - - signOfExpression: FE -> FE - signOfExpression arg == localAbs(arg)/arg - - atancotToXXP(fe,arg,posCheck?,plusMinus) == - -- converts atan(f(x)) to a generalized power series - atanFlag : String := "real: right side"; posCheck? : Boolean := true - (result := exprToGenUPS(arg,posCheck?,atanFlag)$FS2UPS) case %problem => - trouble := result.%problem - trouble.prob = "essential singularity" => [monomial(fe,0)$UPXS :: XXP] - [result.%problem] - ups := result.%series; coef := coefficient(ups,0) - -- series involves complex numbers - (ord := order(ups,0)) = 0 and coef * coef = -1 => - y := differentiate(ups)/(1 + ups*ups) - yCoef := coefficient(y,-1) - [(monomial(log yCoef,0)+integrate(y - monomial(yCoef,-1)$UPXS)) :: XXP] - cc : FE := - ord < 0 => - (rn := ratIfCan(ord :: FE)) case "failed" => - -- this condition usually won't occur because exponents will - -- be integers or rational numbers - return stateProblem("atan","branch problem") - lc := coefficient(ups,ord) - (signum := sign(lc)$SIGNEF) case "failed" => - -- can't determine sign - posNegPi2 := signOfExpression(lc) * pi()/(2 :: FE) - plusMinus = 1 => posNegPi2 - pi()/(2 :: FE) - posNegPi2 - (n := signum :: Integer) = -1 => - plusMinus = 1 => -pi()/(2 :: FE) - pi() - plusMinus = 1 => pi()/(2 :: FE) - 0 - atan coef - [((cc :: UPXS) + integrate(differentiate(ups)/(1 + ups*ups))) :: XXP] - -@ -\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/fs2ups.spad.pamphlet b/src/algebra/fs2ups.spad.pamphlet deleted file mode 100644 index 9751dd4..0000000 --- a/src/algebra/fs2ups.spad.pamphlet +++ /dev/null @@ -1,812 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra fs2ups.spad} -\author{Clifton J. Williamson} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package FS2UPS FunctionSpaceToUnivariatePowerSeries} -<>= -)abbrev package FS2UPS FunctionSpaceToUnivariatePowerSeries -++ Author: Clifton J. Williamson -++ Date Created: 21 March 1989 -++ Date Last Updated: 2 December 1994 -++ Basic Operations: -++ Related Domains: -++ Also See: -++ AMS Classifications: -++ Keywords: elementary function, power series -++ Examples: -++ References: -++ Description: -++ This package converts expressions in some function space to power -++ series in a variable x with coefficients in that function space. -++ The function \spadfun{exprToUPS} converts expressions to power series -++ whose coefficients do not contain the variable x. The function -++ \spadfun{exprToGenUPS} converts functional expressions to power series -++ whose coefficients may involve functions of \spad{log(x)}. -FunctionSpaceToUnivariatePowerSeries(R,FE,Expon,UPS,TRAN,x):_ - Exports == Implementation where - R : Join(GcdDomain,OrderedSet,RetractableTo Integer,_ - LinearlyExplicitRingOver Integer) - FE : Join(AlgebraicallyClosedField,TranscendentalFunctionCategory,_ - FunctionSpace R) - with - coerce: Expon -> % - ++ coerce(e) converts an 'exponent' e to an 'expression' - Expon : OrderedRing - UPS : Join(UnivariatePowerSeriesCategory(FE,Expon),Field,_ - TranscendentalFunctionCategory) - with - differentiate: % -> % - ++ differentiate(x) returns the derivative of x since we - ++ need to be able to differentiate a power series - integrate: % -> % - ++ integrate(x) returns the integral of x since - ++ we need to be able to integrate a power series - TRAN : PartialTranscendentalFunctions UPS - x : Symbol - B ==> Boolean - BOP ==> BasicOperator - I ==> Integer - NNI ==> NonNegativeInteger - K ==> Kernel FE - L ==> List - RN ==> Fraction Integer - S ==> String - SY ==> Symbol - PCL ==> PolynomialCategoryLifting(IndexedExponents K,K,R,SMP,FE) - POL ==> Polynomial R - SMP ==> SparseMultivariatePolynomial(R,K) - SUP ==> SparseUnivariatePolynomial Polynomial R - Problem ==> Record(func:String,prob:String) - Result ==> Union(%series:UPS,%problem:Problem) - SIGNEF ==> ElementaryFunctionSign(R,FE) - - Exports ==> with - exprToUPS : (FE,B,S) -> Result - ++ exprToUPS(fcn,posCheck?,atanFlag) converts the expression - ++ \spad{fcn} to a power series. If \spad{posCheck?} is true, - ++ log's of negative numbers are not allowed nor are nth roots of - ++ negative numbers with n even. If \spad{posCheck?} is false, - ++ these are allowed. \spad{atanFlag} determines how the case - ++ \spad{atan(f(x))}, where \spad{f(x)} has a pole, will be treated. - ++ The possible values of \spad{atanFlag} are \spad{"complex"}, - ++ \spad{"real: two sides"}, \spad{"real: left side"}, - ++ \spad{"real: right side"}, and \spad{"just do it"}. - ++ If \spad{atanFlag} is \spad{"complex"}, then no series expansion - ++ will be computed because, viewed as a function of a complex - ++ variable, \spad{atan(f(x))} has an essential singularity. - ++ Otherwise, the sign of the leading coefficient of the series - ++ expansion of \spad{f(x)} determines the constant coefficient - ++ in the series expansion of \spad{atan(f(x))}. If this sign cannot - ++ be determined, a series expansion is computed only when - ++ \spad{atanFlag} is \spad{"just do it"}. When the leading term - ++ in the series expansion of \spad{f(x)} is of odd degree (or is a - ++ rational degree with odd numerator), then the constant coefficient - ++ in the series expansion of \spad{atan(f(x))} for values to the - ++ left differs from that for values to the right. If \spad{atanFlag} - ++ is \spad{"real: two sides"}, no series expansion will be computed. - ++ If \spad{atanFlag} is \spad{"real: left side"} the constant - ++ coefficient for values to the left will be used and if \spad{atanFlag} - ++ \spad{"real: right side"} the constant coefficient for values to the - ++ right will be used. - ++ If there is a problem in converting the function to a power series, - ++ a record containing the name of the function that caused the problem - ++ and a brief description of the problem is returned. - ++ When expanding the expression into a series it is assumed that - ++ the series is centered at 0. For a series centered at a, the - ++ user should perform the substitution \spad{x -> x + a} before calling - ++ this function. - - exprToGenUPS : (FE,B,S) -> Result - ++ exprToGenUPS(fcn,posCheck?,atanFlag) converts the expression - ++ \spad{fcn} to a generalized power series. If \spad{posCheck?} - ++ is true, log's of negative numbers are not allowed nor are nth roots - ++ of negative numbers with n even. If \spad{posCheck?} is false, - ++ these are allowed. \spad{atanFlag} determines how the case - ++ \spad{atan(f(x))}, where \spad{f(x)} has a pole, will be treated. - ++ The possible values of \spad{atanFlag} are \spad{"complex"}, - ++ \spad{"real: two sides"}, \spad{"real: left side"}, - ++ \spad{"real: right side"}, and \spad{"just do it"}. - ++ If \spad{atanFlag} is \spad{"complex"}, then no series expansion - ++ will be computed because, viewed as a function of a complex - ++ variable, \spad{atan(f(x))} has an essential singularity. - ++ Otherwise, the sign of the leading coefficient of the series - ++ expansion of \spad{f(x)} determines the constant coefficient - ++ in the series expansion of \spad{atan(f(x))}. If this sign cannot - ++ be determined, a series expansion is computed only when - ++ \spad{atanFlag} is \spad{"just do it"}. When the leading term - ++ in the series expansion of \spad{f(x)} is of odd degree (or is a - ++ rational degree with odd numerator), then the constant coefficient - ++ in the series expansion of \spad{atan(f(x))} for values to the - ++ left differs from that for values to the right. If \spad{atanFlag} - ++ is \spad{"real: two sides"}, no series expansion will be computed. - ++ If \spad{atanFlag} is \spad{"real: left side"} the constant - ++ coefficient for values to the left will be used and if \spad{atanFlag} - ++ \spad{"real: right side"} the constant coefficient for values to the - ++ right will be used. - ++ If there is a problem in converting the function to a power - ++ series, we return a record containing the name of the function - ++ that caused the problem and a brief description of the problem. - ++ When expanding the expression into a series it is assumed that - ++ the series is centered at 0. For a series centered at a, the - ++ user should perform the substitution \spad{x -> x + a} before calling - ++ this function. - localAbs: FE -> FE - ++ localAbs(fcn) = \spad{abs(fcn)} or \spad{sqrt(fcn**2)} depending - ++ on whether or not FE has a function \spad{abs}. This should be - ++ a local function, but the compiler won't allow it. - - Implementation ==> add - - ratIfCan : FE -> Union(RN,"failed") - carefulNthRootIfCan : (UPS,NNI,B,B) -> Result - stateProblem : (S,S) -> Result - polyToUPS : SUP -> UPS - listToUPS : (L FE,(FE,B,S) -> Result,B,S,UPS,(UPS,UPS) -> UPS)_ - -> Result - isNonTrivPower : FE -> Union(Record(val:FE,exponent:I),"failed") - powerToUPS : (FE,I,B,S) -> Result - kernelToUPS : (K,B,S) -> Result - nthRootToUPS : (FE,NNI,B,S) -> Result - logToUPS : (FE,B,S) -> Result - atancotToUPS : (FE,B,S,I) -> Result - applyIfCan : (UPS -> Union(UPS,"failed"),FE,S,B,S) -> Result - tranToUPS : (K,FE,B,S) -> Result - powToUPS : (L FE,B,S) -> Result - newElem : FE -> FE - smpElem : SMP -> FE - k2Elem : K -> FE - contOnReals? : S -> B - bddOnReals? : S -> B - iExprToGenUPS : (FE,B,S) -> Result - opsInvolvingX : FE -> L BOP - opInOpList? : (SY,L BOP) -> B - exponential? : FE -> B - productOfNonZeroes? : FE -> B - powerToGenUPS : (FE,I,B,S) -> Result - kernelToGenUPS : (K,B,S) -> Result - nthRootToGenUPS : (FE,NNI,B,S) -> Result - logToGenUPS : (FE,B,S) -> Result - expToGenUPS : (FE,B,S) -> Result - expGenUPS : (UPS,B,S) -> Result - atancotToGenUPS : (FE,FE,B,S,I) -> Result - genUPSApplyIfCan : (UPS -> Union(UPS,"failed"),FE,S,B,S) -> Result - applyBddIfCan : (FE,UPS -> Union(UPS,"failed"),FE,S,B,S) -> Result - tranToGenUPS : (K,FE,B,S) -> Result - powToGenUPS : (L FE,B,S) -> Result - - ZEROCOUNT : I := 1000 - -- number of zeroes to be removed when taking logs or nth roots - - ratIfCan fcn == retractIfCan(fcn)@Union(RN,"failed") - - carefulNthRootIfCan(ups,n,posCheck?,rightOnly?) == - -- similar to 'nthRootIfCan', but it is fussy about the series - -- it takes as an argument. If 'n' is EVEN and 'posCheck?' - -- is truem then the leading coefficient of the series must - -- be POSITIVE. In this case, if 'rightOnly?' is false, the - -- order of the series must be zero. The idea is that the - -- series represents a real function of a real variable, and - -- we want a unique real nth root defined on a neighborhood - -- of zero. - n < 1 => error "nthRoot: n must be positive" - deg := degree ups - if (coef := coefficient(ups,deg)) = 0 then - deg := order(ups,deg + ZEROCOUNT :: Expon) - (coef := coefficient(ups,deg)) = 0 => - error "log of series with many leading zero coefficients" - -- if 'posCheck?' is true, we do not allow nth roots of negative - -- numbers when n in even - if even?(n :: I) then - if posCheck? and ((signum := sign(coef)$SIGNEF) case I) then - (signum :: I) = -1 => - return stateProblem("nth root","negative leading coefficient") - not rightOnly? and not zero? deg => -- nth root not unique - return stateProblem("nth root","series of non-zero order") - (ans := nthRootIfCan(ups,n)) case "failed" => - stateProblem("nth root","no nth root") - [ans :: UPS] - - stateProblem(function,problem) == - -- records the problem which occured in converting an expression - -- to a power series - [[function,problem]] - - exprToUPS(fcn,posCheck?,atanFlag) == - -- converts a functional expression to a power series - --!! The following line is commented out so that expressions of - --!! the form a**b will be normalized to exp(b * log(a)) even if - --!! 'a' and 'b' do not involve the limiting variable 'x'. - --!! - cjw 1 Dec 94 - --not member?(x,variables fcn) => [monomial(fcn,0)] - (poly := retractIfCan(fcn)@Union(POL,"failed")) case POL => - [polyToUPS univariate(poly :: POL,x)] - (sum := isPlus fcn) case L(FE) => - listToUPS(sum :: L(FE),exprToUPS,posCheck?,atanFlag,0,#1 + #2) - (prod := isTimes fcn) case L(FE) => - listToUPS(prod :: L(FE),exprToUPS,posCheck?,atanFlag,1,#1 * #2) - (expt := isNonTrivPower fcn) case Record(val:FE,exponent:I) => - power := expt :: Record(val:FE,exponent:I) - powerToUPS(power.val,power.exponent,posCheck?,atanFlag) - (ker := retractIfCan(fcn)@Union(K,"failed")) case K => - kernelToUPS(ker :: K,posCheck?,atanFlag) - error "exprToUPS: neither a sum, product, power, nor kernel" - - polyToUPS poly == - -- converts a polynomial to a power series - zero? poly => 0 - -- we don't start with 'ans := 0' as this may lead to an - -- enormous number of leading zeroes in the power series - deg := degree poly - coef := leadingCoefficient(poly) :: FE - ans := monomial(coef,deg :: Expon)$UPS - poly := reductum poly - while not zero? poly repeat - deg := degree poly - coef := leadingCoefficient(poly) :: FE - ans := ans + monomial(coef,deg :: Expon)$UPS - poly := reductum poly - ans - - listToUPS(list,feToUPS,posCheck?,atanFlag,ans,op) == - -- converts each element of a list of expressions to a power - -- series and returns the sum of these series, when 'op' is + - -- and 'ans' is 0, or the product of these series, when 'op' is * - -- and 'ans' is 1 - while not null list repeat - (term := feToUPS(first list,posCheck?,atanFlag)) case %problem => - return term - ans := op(ans,term.%series) - list := rest list - [ans] - - isNonTrivPower fcn == - -- is the function a power with exponent other than 0 or 1? - (expt := isPower fcn) case "failed" => "failed" - power := expt :: Record(val:FE,exponent:I) --- one? power.exponent => "failed" - (power.exponent = 1) => "failed" - power - - powerToUPS(fcn,n,posCheck?,atanFlag) == - -- converts an integral power to a power series - (b := exprToUPS(fcn,posCheck?,atanFlag)) case %problem => b - n > 0 => [(b.%series) ** n] - -- check lowest order coefficient when n < 0 - ups := b.%series; deg := degree ups - if (coef := coefficient(ups,deg)) = 0 then - deg := order(ups,deg + ZEROCOUNT :: Expon) - (coef := coefficient(ups,deg)) = 0 => - error "inverse of series with many leading zero coefficients" - [ups ** n] - - kernelToUPS(ker,posCheck?,atanFlag) == - -- converts a kernel to a power series - (sym := symbolIfCan(ker)) case Symbol => - (sym :: Symbol) = x => [monomial(1,1)] - [monomial(ker :: FE,0)] - empty?(args := argument ker) => [monomial(ker :: FE,0)] - not member?(x, variables(ker :: FE)) => [monomial(ker :: FE,0)] - empty? rest args => - arg := first args - is?(ker,"abs" :: Symbol) => - nthRootToUPS(arg*arg,2,posCheck?,atanFlag) - is?(ker,"%paren" :: Symbol) => exprToUPS(arg,posCheck?,atanFlag) - is?(ker,"log" :: Symbol) => logToUPS(arg,posCheck?,atanFlag) - is?(ker,"exp" :: Symbol) => - applyIfCan(expIfCan,arg,"exp",posCheck?,atanFlag) - tranToUPS(ker,arg,posCheck?,atanFlag) - is?(ker,"%power" :: Symbol) => powToUPS(args,posCheck?,atanFlag) - is?(ker,"nthRoot" :: Symbol) => - n := retract(second args)@I - nthRootToUPS(first args,n :: NNI,posCheck?,atanFlag) - stateProblem(string name ker,"unknown kernel") - - nthRootToUPS(arg,n,posCheck?,atanFlag) == - -- converts an nth root to a power series - -- this is not used in the limit package, so the series may - -- have non-zero order, in which case nth roots may not be unique - (result := exprToUPS(arg,posCheck?,atanFlag)) case %problem => result - ans := carefulNthRootIfCan(result.%series,n,posCheck?,false) - ans case %problem => ans - [ans.%series] - - logToUPS(arg,posCheck?,atanFlag) == - -- converts a logarithm log(f(x)) to a power series - -- f(x) must have order 0 and if 'posCheck?' is true, - -- then f(x) must have a non-negative leading coefficient - (result := exprToUPS(arg,posCheck?,atanFlag)) case %problem => result - ups := result.%series - not zero? order(ups,1) => - stateProblem("log","series of non-zero order") - coef := coefficient(ups,0) - -- if 'posCheck?' is true, we do not allow logs of negative numbers - if posCheck? then - if ((signum := sign(coef)$SIGNEF) case I) then - (signum :: I) = -1 => - return stateProblem("log","negative leading coefficient") - [logIfCan(ups) :: UPS] - - if FE has abs: FE -> FE then - localAbs fcn == abs fcn - else - localAbs fcn == sqrt(fcn * fcn) - - signOfExpression: FE -> FE - signOfExpression arg == localAbs(arg)/arg - - atancotToUPS(arg,posCheck?,atanFlag,plusMinus) == - -- converts atan(f(x)) to a power series - (result := exprToUPS(arg,posCheck?,atanFlag)) case %problem => result - ups := result.%series; coef := coefficient(ups,0) - (ord := order(ups,0)) = 0 and coef * coef = -1 => - -- series involves complex numbers - return stateProblem("atan","logarithmic singularity") - cc : FE := - ord < 0 => - atanFlag = "complex" => - return stateProblem("atan","essential singularity") - (rn := ratIfCan(ord :: FE)) case "failed" => - -- this condition usually won't occur because exponents will - -- be integers or rational numbers - return stateProblem("atan","branch problem") - if (atanFlag = "real: two sides") and (odd? numer(rn :: RN)) then - -- expansions to the left and right of zero have different - -- constant coefficients - return stateProblem("atan","branch problem") - lc := coefficient(ups,ord) - (signum := sign(lc)$SIGNEF) case "failed" => - -- can't determine sign - atanFlag = "just do it" => - plusMinus = 1 => pi()/(2 :: FE) - 0 - posNegPi2 := signOfExpression(lc) * pi()/(2 :: FE) - plusMinus = 1 => posNegPi2 - pi()/(2 :: FE) - posNegPi2 - --return stateProblem("atan","branch problem") - left? : B := atanFlag = "real: left side"; n := signum :: Integer - (left? and n = 1) or (not left? and n = -1) => - plusMinus = 1 => -pi()/(2 :: FE) - pi() - plusMinus = 1 => pi()/(2 :: FE) - 0 - atan coef - [(cc :: UPS) + integrate(plusMinus * differentiate(ups)/(1 + ups*ups))] - - applyIfCan(fcn,arg,fcnName,posCheck?,atanFlag) == - -- converts fcn(arg) to a power series - (ups := exprToUPS(arg,posCheck?,atanFlag)) case %problem => ups - ans := fcn(ups.%series) - ans case "failed" => stateProblem(fcnName,"essential singularity") - [ans :: UPS] - - tranToUPS(ker,arg,posCheck?,atanFlag) == - -- converts ker to a power series for certain functions - -- in trig or hyperbolic trig categories - is?(ker,"sin" :: SY) => - applyIfCan(sinIfCan,arg,"sin",posCheck?,atanFlag) - is?(ker,"cos" :: SY) => - applyIfCan(cosIfCan,arg,"cos",posCheck?,atanFlag) - is?(ker,"tan" :: SY) => - applyIfCan(tanIfCan,arg,"tan",posCheck?,atanFlag) - is?(ker,"cot" :: SY) => - applyIfCan(cotIfCan,arg,"cot",posCheck?,atanFlag) - is?(ker,"sec" :: SY) => - applyIfCan(secIfCan,arg,"sec",posCheck?,atanFlag) - is?(ker,"csc" :: SY) => - applyIfCan(cscIfCan,arg,"csc",posCheck?,atanFlag) - is?(ker,"asin" :: SY) => - applyIfCan(asinIfCan,arg,"asin",posCheck?,atanFlag) - is?(ker,"acos" :: SY) => - applyIfCan(acosIfCan,arg,"acos",posCheck?,atanFlag) - is?(ker,"atan" :: SY) => atancotToUPS(arg,posCheck?,atanFlag,1) - is?(ker,"acot" :: SY) => atancotToUPS(arg,posCheck?,atanFlag,-1) - is?(ker,"asec" :: SY) => - applyIfCan(asecIfCan,arg,"asec",posCheck?,atanFlag) - is?(ker,"acsc" :: SY) => - applyIfCan(acscIfCan,arg,"acsc",posCheck?,atanFlag) - is?(ker,"sinh" :: SY) => - applyIfCan(sinhIfCan,arg,"sinh",posCheck?,atanFlag) - is?(ker,"cosh" :: SY) => - applyIfCan(coshIfCan,arg,"cosh",posCheck?,atanFlag) - is?(ker,"tanh" :: SY) => - applyIfCan(tanhIfCan,arg,"tanh",posCheck?,atanFlag) - is?(ker,"coth" :: SY) => - applyIfCan(cothIfCan,arg,"coth",posCheck?,atanFlag) - is?(ker,"sech" :: SY) => - applyIfCan(sechIfCan,arg,"sech",posCheck?,atanFlag) - is?(ker,"csch" :: SY) => - applyIfCan(cschIfCan,arg,"csch",posCheck?,atanFlag) - is?(ker,"asinh" :: SY) => - applyIfCan(asinhIfCan,arg,"asinh",posCheck?,atanFlag) - is?(ker,"acosh" :: SY) => - applyIfCan(acoshIfCan,arg,"acosh",posCheck?,atanFlag) - is?(ker,"atanh" :: SY) => - applyIfCan(atanhIfCan,arg,"atanh",posCheck?,atanFlag) - is?(ker,"acoth" :: SY) => - applyIfCan(acothIfCan,arg,"acoth",posCheck?,atanFlag) - is?(ker,"asech" :: SY) => - applyIfCan(asechIfCan,arg,"asech",posCheck?,atanFlag) - is?(ker,"acsch" :: SY) => - applyIfCan(acschIfCan,arg,"acsch",posCheck?,atanFlag) - stateProblem(string name ker,"unknown kernel") - - powToUPS(args,posCheck?,atanFlag) == - -- converts a power f(x) ** g(x) to a power series - (logBase := logToUPS(first args,posCheck?,atanFlag)) case %problem => - logBase - (expon := exprToUPS(second args,posCheck?,atanFlag)) case %problem => - expon - ans := expIfCan((expon.%series) * (logBase.%series)) - ans case "failed" => stateProblem("exp","essential singularity") - [ans :: UPS] - --- Generalized power series: power series in x, where log(x) and --- bounded functions of x are allowed to appear in the coefficients --- of the series. Used for evaluating REAL limits at x = 0. - - newElem f == - -- rewrites a functional expression; all trig functions are - -- expressed in terms of sin and cos; all hyperbolic trig - -- functions are expressed in terms of exp - smpElem(numer f) / smpElem(denom f) - - smpElem p == map(k2Elem,#1::FE,p)$PCL - - k2Elem k == - -- rewrites a kernel; all trig functions are - -- expressed in terms of sin and cos; all hyperbolic trig - -- functions are expressed in terms of exp - null(args := [newElem a for a in argument k]) => k::FE - iez := inv(ez := exp(z := first args)) - sinz := sin z; cosz := cos z - is?(k,"tan" :: Symbol) => sinz / cosz - is?(k,"cot" :: Symbol) => cosz / sinz - is?(k,"sec" :: Symbol) => inv cosz - is?(k,"csc" :: Symbol) => inv sinz - is?(k,"sinh" :: Symbol) => (ez - iez) / (2 :: FE) - is?(k,"cosh" :: Symbol) => (ez + iez) / (2 :: FE) - is?(k,"tanh" :: Symbol) => (ez - iez) / (ez + iez) - is?(k,"coth" :: Symbol) => (ez + iez) / (ez - iez) - is?(k,"sech" :: Symbol) => 2 * inv(ez + iez) - is?(k,"csch" :: Symbol) => 2 * inv(ez - iez) - (operator k) args - - CONTFCNS : L S := ["sin","cos","atan","acot","exp","asinh"] - -- functions which are defined and continuous at all real numbers - - BDDFCNS : L S := ["sin","cos","atan","acot"] - -- functions which are bounded on the reals - - contOnReals? fcn == member?(fcn,CONTFCNS) - bddOnReals? fcn == member?(fcn,BDDFCNS) - - exprToGenUPS(fcn,posCheck?,atanFlag) == - -- converts a functional expression to a generalized power - -- series; "generalized" means that log(x) and bounded functions - -- of x are allowed to appear in the coefficients of the series - iExprToGenUPS(newElem fcn,posCheck?,atanFlag) - - iExprToGenUPS(fcn,posCheck?,atanFlag) == - -- converts a functional expression to a generalized power - -- series without first normalizing the expression - --!! The following line is commented out so that expressions of - --!! the form a**b will be normalized to exp(b * log(a)) even if - --!! 'a' and 'b' do not involve the limiting variable 'x'. - --!! - cjw 1 Dec 94 - --not member?(x,variables fcn) => [monomial(fcn,0)] - (poly := retractIfCan(fcn)@Union(POL,"failed")) case POL => - [polyToUPS univariate(poly :: POL,x)] - (sum := isPlus fcn) case L(FE) => - listToUPS(sum :: L(FE),iExprToGenUPS,posCheck?,atanFlag,0,#1 + #2) - (prod := isTimes fcn) case L(FE) => - listToUPS(prod :: L(FE),iExprToGenUPS,posCheck?,atanFlag,1,#1 * #2) - (expt := isNonTrivPower fcn) case Record(val:FE,exponent:I) => - power := expt :: Record(val:FE,exponent:I) - powerToGenUPS(power.val,power.exponent,posCheck?,atanFlag) - (ker := retractIfCan(fcn)@Union(K,"failed")) case K => - kernelToGenUPS(ker :: K,posCheck?,atanFlag) - error "exprToGenUPS: neither a sum, product, power, nor kernel" - - opsInvolvingX fcn == - opList := [op for k in tower fcn | unary?(op := operator k) _ - and member?(x,variables first argument k)] - removeDuplicates opList - - opInOpList?(name,opList) == - for op in opList repeat - is?(op,name) => return true - false - - exponential? fcn == - -- is 'fcn' of the form exp(f)? - (ker := retractIfCan(fcn)@Union(K,"failed")) case K => - is?(ker :: K,"exp" :: Symbol) - false - - productOfNonZeroes? fcn == - -- is 'fcn' a product of non-zero terms, where 'non-zero' - -- means an exponential or a function not involving x - exponential? fcn => true - (prod := isTimes fcn) case "failed" => false - for term in (prod :: L(FE)) repeat - (not exponential? term) and member?(x,variables term) => - return false - true - - powerToGenUPS(fcn,n,posCheck?,atanFlag) == - -- converts an integral power to a generalized power series - -- if n < 0 and the lowest order coefficient of the series - -- involves x, we are careful about inverting this coefficient - -- the coefficient is inverted only if - -- (a) the only function involving x is 'log', or - -- (b) the lowest order coefficient is a product of exponentials - -- and functions not involving x - (b := exprToGenUPS(fcn,posCheck?,atanFlag)) case %problem => b - n > 0 => [(b.%series) ** n] - -- check lowest order coefficient when n < 0 - ups := b.%series; deg := degree ups - if (coef := coefficient(ups,deg)) = 0 then - deg := order(ups,deg + ZEROCOUNT :: Expon) - (coef := coefficient(ups,deg)) = 0 => - error "inverse of series with many leading zero coefficients" - xOpList := opsInvolvingX coef - -- only function involving x is 'log' - (null xOpList) => [ups ** n] - (null rest xOpList and is?(first xOpList,"log" :: SY)) => - [ups ** n] - -- lowest order coefficient is a product of exponentials and - -- functions not involving x - productOfNonZeroes? coef => [ups ** n] - stateProblem("inv","lowest order coefficient involves x") - - kernelToGenUPS(ker,posCheck?,atanFlag) == - -- converts a kernel to a generalized power series - (sym := symbolIfCan(ker)) case Symbol => - (sym :: Symbol) = x => [monomial(1,1)] - [monomial(ker :: FE,0)] - empty?(args := argument ker) => [monomial(ker :: FE,0)] - empty? rest args => - arg := first args - is?(ker,"abs" :: Symbol) => - nthRootToGenUPS(arg*arg,2,posCheck?,atanFlag) - is?(ker,"%paren" :: Symbol) => iExprToGenUPS(arg,posCheck?,atanFlag) - is?(ker,"log" :: Symbol) => logToGenUPS(arg,posCheck?,atanFlag) - is?(ker,"exp" :: Symbol) => expToGenUPS(arg,posCheck?,atanFlag) - tranToGenUPS(ker,arg,posCheck?,atanFlag) - is?(ker,"%power" :: Symbol) => powToGenUPS(args,posCheck?,atanFlag) - is?(ker,"nthRoot" :: Symbol) => - n := retract(second args)@I - nthRootToGenUPS(first args,n :: NNI,posCheck?,atanFlag) - stateProblem(string name ker,"unknown kernel") - - nthRootToGenUPS(arg,n,posCheck?,atanFlag) == - -- convert an nth root to a power series - -- used for computing right hand limits, so the series may have - -- non-zero order, but may not have a negative leading coefficient - -- when n is even - (result := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => - result - ans := carefulNthRootIfCan(result.%series,n,posCheck?,true) - ans case %problem => ans - [ans.%series] - - logToGenUPS(arg,posCheck?,atanFlag) == - -- converts a logarithm log(f(x)) to a generalized power series - (result := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => - result - ups := result.%series; deg := degree ups - if (coef := coefficient(ups,deg)) = 0 then - deg := order(ups,deg + ZEROCOUNT :: Expon) - (coef := coefficient(ups,deg)) = 0 => - error "log of series with many leading zero coefficients" - -- if 'posCheck?' is true, we do not allow logs of negative numbers - if posCheck? then - if ((signum := sign(coef)$SIGNEF) case I) then - (signum :: I) = -1 => - return stateProblem("log","negative leading coefficient") - -- create logarithmic term, avoiding log's of negative rationals - lt := monomial(coef,deg)$UPS; cen := center lt - -- check to see if lowest order coefficient is a negative rational - negRat? : Boolean := - ((rat := ratIfCan coef) case RN) => - (rat :: RN) < 0 => true - false - false - logTerm : FE := - mon : FE := (x :: FE) - (cen :: FE) - pow : FE := mon ** (deg :: FE) - negRat? => log(coef * pow) - term1 : FE := (deg :: FE) * log(mon) - log(coef) + term1 - [monomial(logTerm,0) + log(ups/lt)] - - expToGenUPS(arg,posCheck?,atanFlag) == - -- converts an exponential exp(f(x)) to a generalized - -- power series - (ups := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => ups - expGenUPS(ups.%series,posCheck?,atanFlag) - - expGenUPS(ups,posCheck?,atanFlag) == - -- computes the exponential of a generalized power series. - -- If the series has order zero and the constant term a0 of the - -- series involves x, the function tries to expand exp(a0) as - -- a power series. - (deg := order(ups,1)) < 0 => - stateProblem("exp","essential singularity") - deg > 0 => [exp ups] - lc := coefficient(ups,0); xOpList := opsInvolvingX lc - not opInOpList?("log" :: SY,xOpList) => [exp ups] - -- try to fix exp(lc) if necessary - expCoef := - normalize(exp lc,x)$ElementaryFunctionStructurePackage(R,FE) - opInOpList?("log" :: SY,opsInvolvingX expCoef) => - stateProblem("exp","logs in constant coefficient") - result := exprToGenUPS(expCoef,posCheck?,atanFlag) - result case %problem => result - [(result.%series) * exp(ups - monomial(lc,0))] - - atancotToGenUPS(fe,arg,posCheck?,atanFlag,plusMinus) == - -- converts atan(f(x)) to a generalized power series - (result := exprToGenUPS(arg,posCheck?,atanFlag)) case %problem => - trouble := result.%problem - trouble.prob = "essential singularity" => [monomial(fe,0)$UPS] - result - ups := result.%series; coef := coefficient(ups,0) - -- series involves complex numbers - (ord := order(ups,0)) = 0 and coef * coef = -1 => - y := differentiate(ups)/(1 + ups*ups) - yCoef := coefficient(y,-1) - [monomial(log yCoef,0) + integrate(y - monomial(yCoef,-1)$UPS)] - cc : FE := - ord < 0 => - atanFlag = "complex" => - return stateProblem("atan","essential singularity") - (rn := ratIfCan(ord :: FE)) case "failed" => - -- this condition usually won't occur because exponents will - -- be integers or rational numbers - return stateProblem("atan","branch problem") - if (atanFlag = "real: two sides") and (odd? numer(rn :: RN)) then - -- expansions to the left and right of zero have different - -- constant coefficients - return stateProblem("atan","branch problem") - lc := coefficient(ups,ord) - (signum := sign(lc)$SIGNEF) case "failed" => - -- can't determine sign - atanFlag = "just do it" => - plusMinus = 1 => pi()/(2 :: FE) - 0 - posNegPi2 := signOfExpression(lc) * pi()/(2 :: FE) - plusMinus = 1 => posNegPi2 - pi()/(2 :: FE) - posNegPi2 - --return stateProblem("atan","branch problem") - left? : B := atanFlag = "real: left side"; n := signum :: Integer - (left? and n = 1) or (not left? and n = -1) => - plusMinus = 1 => -pi()/(2 :: FE) - pi() - plusMinus = 1 => pi()/(2 :: FE) - 0 - atan coef - [(cc :: UPS) + integrate(differentiate(ups)/(1 + ups*ups))] - - genUPSApplyIfCan(fcn,arg,fcnName,posCheck?,atanFlag) == - -- converts fcn(arg) to a generalized power series - (series := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => - series - ups := series.%series - (deg := order(ups,1)) < 0 => - stateProblem(fcnName,"essential singularity") - deg > 0 => [fcn(ups) :: UPS] - lc := coefficient(ups,0); xOpList := opsInvolvingX lc - null xOpList => [fcn(ups) :: UPS] - opInOpList?("log" :: SY,xOpList) => - stateProblem(fcnName,"logs in constant coefficient") - contOnReals? fcnName => [fcn(ups) :: UPS] - stateProblem(fcnName,"x in constant coefficient") - - applyBddIfCan(fe,fcn,arg,fcnName,posCheck?,atanFlag) == - -- converts fcn(arg) to a generalized power series, where the - -- function fcn is bounded for real values - -- if fcn(arg) has an essential singularity as a complex - -- function, we return fcn(arg) as a monomial of degree 0 - (ups := iExprToGenUPS(arg,posCheck?,atanFlag)) case %problem => - trouble := ups.%problem - trouble.prob = "essential singularity" => [monomial(fe,0)$UPS] - ups - (ans := fcn(ups.%series)) case "failed" => [monomial(fe,0)$UPS] - [ans :: UPS] - - tranToGenUPS(ker,arg,posCheck?,atanFlag) == - -- converts op(arg) to a power series for certain functions - -- op in trig or hyperbolic trig categories - -- N.B. when this function is called, 'k2elem' will have been - -- applied, so the following functions cannot appear: - -- tan, cot, sec, csc, sinh, cosh, tanh, coth, sech, csch - is?(ker,"sin" :: SY) => - applyBddIfCan(ker :: FE,sinIfCan,arg,"sin",posCheck?,atanFlag) - is?(ker,"cos" :: SY) => - applyBddIfCan(ker :: FE,cosIfCan,arg,"cos",posCheck?,atanFlag) - is?(ker,"asin" :: SY) => - genUPSApplyIfCan(asinIfCan,arg,"asin",posCheck?,atanFlag) - is?(ker,"acos" :: SY) => - genUPSApplyIfCan(acosIfCan,arg,"acos",posCheck?,atanFlag) - is?(ker,"atan" :: SY) => - atancotToGenUPS(ker :: FE,arg,posCheck?,atanFlag,1) - is?(ker,"acot" :: SY) => - atancotToGenUPS(ker :: FE,arg,posCheck?,atanFlag,-1) - is?(ker,"asec" :: SY) => - genUPSApplyIfCan(asecIfCan,arg,"asec",posCheck?,atanFlag) - is?(ker,"acsc" :: SY) => - genUPSApplyIfCan(acscIfCan,arg,"acsc",posCheck?,atanFlag) - is?(ker,"asinh" :: SY) => - genUPSApplyIfCan(asinhIfCan,arg,"asinh",posCheck?,atanFlag) - is?(ker,"acosh" :: SY) => - genUPSApplyIfCan(acoshIfCan,arg,"acosh",posCheck?,atanFlag) - is?(ker,"atanh" :: SY) => - genUPSApplyIfCan(atanhIfCan,arg,"atanh",posCheck?,atanFlag) - is?(ker,"acoth" :: SY) => - genUPSApplyIfCan(acothIfCan,arg,"acoth",posCheck?,atanFlag) - is?(ker,"asech" :: SY) => - genUPSApplyIfCan(asechIfCan,arg,"asech",posCheck?,atanFlag) - is?(ker,"acsch" :: SY) => - genUPSApplyIfCan(acschIfCan,arg,"acsch",posCheck?,atanFlag) - stateProblem(string name ker,"unknown kernel") - - powToGenUPS(args,posCheck?,atanFlag) == - -- converts a power f(x) ** g(x) to a generalized power series - (logBase := logToGenUPS(first args,posCheck?,atanFlag)) case %problem => - logBase - expon := iExprToGenUPS(second args,posCheck?,atanFlag) - expon case %problem => expon - expGenUPS((expon.%series) * (logBase.%series),posCheck?,atanFlag) - -@ -\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/fspace.spad.pamphlet b/src/algebra/fspace.spad.pamphlet deleted file mode 100644 index 6c6861a..0000000 --- a/src/algebra/fspace.spad.pamphlet +++ /dev/null @@ -1,146 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra fspace.spad} -\author{Manuel Bronstein} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package ES1 ExpressionSpaceFunctions1} -<>= -)abbrev package ES1 ExpressionSpaceFunctions1 -++ Lifting of maps from expression spaces to kernels over them -++ Author: Manuel Bronstein -++ Date Created: 23 March 1988 -++ Date Last Updated: 19 April 1991 -++ Description: -++ This package allows a map from any expression space into any object -++ to be lifted to a kernel over the expression set, using a given -++ property of the operator of the kernel. --- should not be exposed -ExpressionSpaceFunctions1(F:ExpressionSpace, S:Type): with - map: (F -> S, String, Kernel F) -> S - ++ map(f, p, k) uses the property p of the operator - ++ of k, in order to lift f and apply it to k. - - == add - -- prop contains an evaluation function List S -> S - map(F2S, prop, k) == - args := [F2S x for x in argument k]$List(S) - (p := property(operator k, prop)) case None => - ((p::None) pretend (List S -> S)) args - error "Operator does not have required property" - -@ -\section{package ES2 ExpressionSpaceFunctions2} -<>= -)abbrev package ES2 ExpressionSpaceFunctions2 -++ Lifting of maps from expression spaces to kernels over them -++ Author: Manuel Bronstein -++ Date Created: 23 March 1988 -++ Date Last Updated: 19 April 1991 -++ Description: -++ This package allows a mapping E -> F to be lifted to a kernel over E; -++ This lifting can fail if the operator of the kernel cannot be applied -++ in F; Do not use this package with E = F, since this may -++ drop some properties of the operators. -ExpressionSpaceFunctions2(E:ExpressionSpace, F:ExpressionSpace): with - map: (E -> F, Kernel E) -> F - ++ map(f, k) returns \spad{g = op(f(a1),...,f(an))} where - ++ \spad{k = op(a1,...,an)}. - == add - map(f, k) == - (operator(operator k)$F) [f x for x in argument k]$List(F) - -@ -\section{package FS2 FunctionSpaceFunctions2} -<>= -)abbrev package FS2 FunctionSpaceFunctions2 -++ Lifting of maps to function spaces -++ Author: Manuel Bronstein -++ Date Created: 22 March 1988 -++ Date Last Updated: 3 May 1994 -++ Description: -++ This package allows a mapping R -> S to be lifted to a mapping -++ from a function space over R to a function space over S; -FunctionSpaceFunctions2(R, A, S, B): Exports == Implementation where - R, S: Join(Ring, OrderedSet) - A : FunctionSpace R - B : FunctionSpace S - - K ==> Kernel A - P ==> SparseMultivariatePolynomial(R, K) - - Exports ==> with - map: (R -> S, A) -> B - ++ map(f, a) applies f to all the constants in R appearing in \spad{a}. - - Implementation ==> add - smpmap: (R -> S, P) -> B - - smpmap(fn, p) == - map(map(map(fn, #1), #1)$ExpressionSpaceFunctions2(A,B),fn(#1)::B, - p)$PolynomialCategoryLifting(IndexedExponents K, K, R, P, B) - - if R has IntegralDomain then - if S has IntegralDomain then - map(f, x) == smpmap(f, numer x) / smpmap(f, denom x) - else - map(f, x) == smpmap(f, numer x) * (recip(smpmap(f, denom x))::B) - else - map(f, x) == smpmap(f, numer x) - -@ -\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. -@ -<<*>>= -<> - --- SPAD files for the functional world should be compiled in the --- following order: --- --- op kl FSPACE expr funcpkgs - -<> -<> -<> -@ -\eject -\begin{thebibliography}{99} -\bibitem{1} nothing -\end{thebibliography} -\end{document} diff --git a/src/algebra/funcpkgs.spad.pamphlet b/src/algebra/funcpkgs.spad.pamphlet deleted file mode 100644 index 41f979e..0000000 --- a/src/algebra/funcpkgs.spad.pamphlet +++ /dev/null @@ -1,193 +0,0 @@ -\documentclass{article} -\usepackage{axiom} -\begin{document} -\title{\$SPAD/src/algebra funcpkgs.spad} -\author{Manuel Bronstein} -\maketitle -\begin{abstract} -\end{abstract} -\eject -\tableofcontents -\eject -\section{package FSUPFACT FunctionSpaceUnivariatePolynomialFactor} -<>= -)abbrev package FSUPFACT FunctionSpaceUnivariatePolynomialFactor -++ Used internally by IR2F -++ Author: Manuel Bronstein -++ Date Created: 12 May 1988 -++ Date Last Updated: 22 September 1993 -++ Keywords: function, space, polynomial, factoring -FunctionSpaceUnivariatePolynomialFactor(R, F, UP): - Exports == Implementation where - R : Join(IntegralDomain, OrderedSet, RetractableTo Integer) - F : FunctionSpace R - UP: UnivariatePolynomialCategory F - - Q ==> Fraction Integer - K ==> Kernel F - AN ==> AlgebraicNumber - PQ ==> SparseMultivariatePolynomial(Q, K) - PR ==> SparseMultivariatePolynomial(R, K) - UPQ ==> SparseUnivariatePolynomial Q - UPA ==> SparseUnivariatePolynomial AN - FR ==> Factored UP - FRQ ==> Factored UPQ - FRA ==> Factored UPA - - Exports ==> with - ffactor: UP -> FR - ++ ffactor(p) tries to factor a univariate polynomial p over F - qfactor: UP -> Union(FRQ, "failed") - ++ qfactor(p) tries to factor p over fractions of integers, - ++ returning "failed" if it cannot - UP2ifCan: UP -> Union(overq: UPQ, overan: UPA, failed: Boolean) - ++ UP2ifCan(x) should be local but conditional. - if F has RetractableTo AN then - anfactor: UP -> Union(FRA, "failed") - ++ anfactor(p) tries to factor p over algebraic numbers, - ++ returning "failed" if it cannot - - Implementation ==> add - import AlgFactor(UPA) - import RationalFactorize(UPQ) - - P2QifCan : PR -> Union(PQ, "failed") - UPQ2UP : (SparseUnivariatePolynomial PQ, F) -> UP - PQ2F : (PQ, F) -> F - ffactor0 : UP -> FR - - dummy := kernel(new()$Symbol)$K - - if F has RetractableTo AN then - UPAN2F: UPA -> UP - UPQ2AN: UPQ -> UPA - - UPAN2F p == - map(#1::F, p)$UnivariatePolynomialCategoryFunctions2(AN,UPA,F,UP) - - UPQ2AN p == - map(#1::AN, p)$UnivariatePolynomialCategoryFunctions2(Q,UPQ,AN,UPA) - - ffactor p == - (pq := anfactor p) case FRA => - map(UPAN2F, pq::FRA)$FactoredFunctions2(UPA, UP) - ffactor0 p - - anfactor p == - (q := UP2ifCan p) case overq => - map(UPQ2AN, factor(q.overq))$FactoredFunctions2(UPQ, UPA) - q case overan => factor(q.overan) - "failed" - - UP2ifCan p == - ansq := 0$UPQ ; ansa := 0$UPA - goforq? := true - while p ^= 0 repeat - if goforq? then - rq := retractIfCan(leadingCoefficient p)@Union(Q, "failed") - if rq case Q then - ansq := ansq + monomial(rq::Q, degree p) - ansa := ansa + monomial(rq::Q::AN, degree p) - else - goforq? := false - ra := retractIfCan(leadingCoefficient p)@Union(AN, "failed") - if ra case AN then ansa := ansa + monomial(ra::AN, degree p) - else return [true] - else - ra := retractIfCan(leadingCoefficient p)@Union(AN, "failed") - if ra case AN then ansa := ansa + monomial(ra::AN, degree p) - else return [true] - p := reductum p - goforq? => [ansq] - [ansa] - - else - UPQ2F: UPQ -> UP - - UPQ2F p == - map(#1::F, p)$UnivariatePolynomialCategoryFunctions2(Q,UPQ,F,UP) - - ffactor p == - (pq := qfactor p) case FRQ => - map(UPQ2F, pq::FRQ)$FactoredFunctions2(UPQ, UP) - ffactor0 p - - UP2ifCan p == - ansq := 0$UPQ - while p ^= 0 repeat - rq := retractIfCan(leadingCoefficient p)@Union(Q, "failed") - if rq case Q then ansq := ansq + monomial(rq::Q, degree p) - else return [true] - p := reductum p - [ansq] - - ffactor0 p == - smp := numer(ep := p(dummy::F)) - (q := P2QifCan smp) case "failed" => p::FR - map(UPQ2UP(univariate(#1, dummy), denom(ep)::F), factor(q::PQ - )$MRationalFactorize(IndexedExponents K, K, Integer, - PQ))$FactoredFunctions2(PQ, UP) - - UPQ2UP(p, d) == - map(PQ2F(#1, d), p)$UnivariatePolynomialCategoryFunctions2(PQ, - SparseUnivariatePolynomial PQ, F, UP) - - PQ2F(p, d) == - map(#1::F, #1::F, p)$PolynomialCategoryLifting(IndexedExponents K, - K, Q, PQ, F) / d - - qfactor p == - (q := UP2ifCan p) case overq => factor(q.overq) - "failed" - - P2QifCan p == - and/[retractIfCan(c::F)@Union(Q, "failed") case Q - for c in coefficients p] => - map(#1::PQ, retract(#1::F)@Q :: PQ, - p)$PolynomialCategoryLifting(IndexedExponents K,K,R,PR,PQ) - "failed" - -@ -\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/axiom-website/patches.html b/src/axiom-website/patches.html index ede6c95..94f28f0 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -911,5 +911,7 @@ download.html add binaries
bookvol10.4 add packages
20090127.01.tpd.patch bookvol10.4 add packages
+20090128.01.tpd.patch +bookvol10.4 add packages