Changes http://wiki.axiom-developer.org/MantepseSpad/diff
--

??changed:
-This page was renamed to mantepse.spad.pamphlet. You can delete this one if no 
longer needed.
-
+This is the first part of the code from [mantepse.spad.pamphlet].
+
+\begin{axiom}
+)lib RECOP FAMR2 FFFG FFFGF NEWTON
+\end{axiom}
+\begin{spad}
+)abbrev domain UFPS UnivariateFormalPowerSeries
+UnivariateFormalPowerSeries(Coef: Ring) == 
+    UnivariateTaylorSeries(Coef, 'x, 0$Coef)
+
+)abbrev package UFPS1 UnivariateFormalPowerSeriesFunctions
+UnivariateFormalPowerSeriesFunctions(Coef: Ring): Exports == Implementation 
+  where
+
+    UFPS ==> UnivariateFormalPowerSeries Coef
+
+    Exports == with
+
+      hadamard: (UFPS, UFPS) -> UFPS
+
+    Implementation == add
+
+      hadamard(f, g) ==
+        series map(#1*#2, coefficients f, coefficients g)
+                  $StreamFunctions3(Coef, Coef, Coef) 
+
+)abbrev domain GOPT GuessOption
+++ Author: Martin Rubey
+++ Description: GuessOption is a domain whose elements are various options used
+++ by \spadtype{Guess}.
+GuessOption(): Exports == Implementation where 
+
+  Exports == SetCategory with
+
+    maxDerivative: Integer -> %
+      ++ maxDerivative(d) specifies the maximum derivative in an algebraic
+      ++ differential equation. maxDerivative(-1) specifies that the maximum
+      ++ derivative can be arbitrary. This option is expressed in the form
+      ++ \spad{maxDerivative == d}.
+
+    maxShift: Integer -> %
+      ++ maxShift(d) specifies the maximum shift in a recurrence
+      ++ equation. maxShift(-1) specifies that the maximum shift can be
+      ++ arbitrary. This option is expressed in the form \spad{maxShift == d}.
+  
+    maxPower: Integer -> %
+      ++ maxPower(d) specifies the maximum degree in an algebraic differential
+      ++ equation. For example, the degree of (f'')^3 f' is 4. maxPower(-1)
+      ++ specifies that the maximum exponent can be arbitrary. This option is
+      ++ expressed in the form \spad{maxPower == d}.
+
+    homogeneous: Boolean -> %
+      ++ homogeneous(d) specifies whether we allow only homogeneous algebraic
+      ++ differential equations. This option is expressed in the form
+      ++ \spad{homogeneous == d}.
+
+    maxLevel: Integer -> %
+      ++ maxLevel(d) specifies the maximum number of recursion levels operators
+      ++ guessProduct and guessSum will be applied.  maxLevel(-1) specifies
+      ++ that all levels are tried. This option is expressed in the form
+      ++ \spad{maxLevel == d}.
+
+    maxDegree: Integer -> %
+      ++ maxDegree(d) specifies the maximum degree of the coefficient
+      ++ polynomial in an algebraic differential equation or a recursion with
+      ++ polynomial coefficients.  maxDegree(-1) specifies that the maximum
+      ++ degree can be arbitrary. This option is expressed in the form
+      ++ \spad{maxDegree == d}.
+
+    allDegrees: Boolean -> %
+      ++ allDegrees(d) specifies whether all possibilities of the degree vector
+      ++ - taking into account maxDegree - should be tried. This is mainly
+      ++ interesting for rational interpolation. This option is expressed in
+      ++ the form \spad{allDegrees == d}.
+
+    safety: NonNegativeInteger -> %
+      ++ safety(d) specifies the number of values reserved for testing any
+      ++ solutions found. This option is expressed in the form \spad{safety ==
+      ++ d}.
+
+    one: Boolean -> %
+      ++ one(d) specifies whether we are happy with one solution. This option
+      ++ is expressed in the form \spad{one == d}.
+
+    debug: Boolean -> %
+      ++ debug(d) specifies whether we want additional output on the
+      ++ progress. This option is expressed in the form \spad{debug == d}.
+
+    functionName: Symbol -> %
+      ++ functionName(d) specifies the name of the function given by the
+      ++ algebraic differential equation or recurrence. This option is
+      ++ expressed in the form \spad{functionName == d}.
+
+    variableName: Symbol -> %
+      ++ variableName(d) specifies the variable used in by the algebraic
+      ++ differential equation. This option is expressed in the form
+      ++ \spad{variableName == d}.
+
+    indexName: Symbol -> %
+      ++ indexName(d) specifies the index variable used for the formulas. This
+      ++ option is expressed in the form \spad{indexName == d}.
+
+    displayAsGF: Boolean -> %
+      ++ displayAsGF(d) specifies whether the result is a generating function
+      ++ or a recurrence. This option should not be set by the user, but rather
+      ++ by the HP-specification.
+
+    option : (List %, Symbol) -> Union(Any, "failed")
+      ++ option() is not to be used at the top level; 
+      ++ option determines internally which drawing options are indicated in 
+      ++ a draw command.
+
+    option?: (List %, Symbol) -> Boolean
+      ++ option?() is not to be used at the top level;
+      ++ option? internally returns true for drawing options which are 
+      ++ indicated in a draw command, or false for those which are not.
+
+    checkOptions: List % -> Void
+      ++ checkOptions checks whether an option is given twice
+  
+  Implementation ==> add
+    import AnyFunctions1(Boolean)
+    import AnyFunctions1(Symbol)
+    import AnyFunctions1(Integer)
+    import AnyFunctions1(NonNegativeInteger)
+
+    Rep := Record(keyword: Symbol, value: Any)
+  
+    maxLevel d      == ["maxLevel"::Symbol,      d::Any]
+    maxDerivative d == ["maxDerivative"::Symbol, d::Any]
+    maxShift d      == maxDerivative d
+    maxDegree d     == ["maxDegree"::Symbol,     d::Any]
+    allDegrees d    == ["allDegrees"::Symbol,    d::Any]
+    maxPower d      == ["maxPower"::Symbol,      d::Any]
+    safety d        == ["safety"::Symbol,        d::Any]
+    homogeneous d   == ["homogeneous"::Symbol,   d::Any]
+    debug d         == ["debug"::Symbol,         d::Any]
+    one d           == ["one"::Symbol,           d::Any]
+    functionName d  == ["functionName"::Symbol,  d::Any]
+    variableName d  == ["variableName"::Symbol,  d::Any]
+    indexName d     == ["indexName"::Symbol,     d::Any]
+    displayAsGF d   == ["displayAsGF"::Symbol,   d::Any]
+
+    coerce(x:%):OutputForm == x.keyword::OutputForm = x.value::OutputForm
+    x:% = y:%              == x.keyword = y.keyword and x.value = y.value
+
+    option?(l, s) ==
+      for x in l repeat
+        x.keyword = s => return true
+      false
+
+    option(l, s) ==
+      for x in l repeat
+        x.keyword = s => return(x.value)
+      "failed"
+
+    checkOptions l ==
+      if not empty? l then
+        if find((first l).keyword = #1.keyword, rest l) case "failed"
+        then checkOptions rest l
+        else error "GuessOption: Option specified twice"
+
+)abbrev package GOPT0 GuessOptionFunctions0
+++ Author: Martin Rubey 
+++ Description: GuessOptionFunctions0 provides operations that extract the
+++ values of options for \spadtype{Guess}.
+GuessOptionFunctions0(): Exports == Implementation where 
+
+  LGOPT ==> List GuessOption
+
+  Exports == SetCategory with
+
+    maxLevel: LGOPT -> Integer
+      ++ maxLevel returns the specified maxLevel or -1 as default.
+
+    maxPower: LGOPT -> Integer
+      ++ maxPower returns the specified maxPower or -1 as default.
+
+    maxDerivative: LGOPT -> Integer
+      ++ maxDerivative returns the specified maxDerivative or -1 as default.
+
+    maxShift: LGOPT -> Integer
+      ++ maxShift returns the specified maxShift or -1 as default.
+  
+    maxDegree: LGOPT -> Integer
+      ++ maxDegree returns the specified maxDegree or -1 as default.
+
+    allDegrees: LGOPT -> Boolean
+      ++ allDegrees returns whether all possibilities of the degree vector
+      ++ should be tried, the default being false.
+
+    safety: LGOPT -> NonNegativeInteger
+      ++ safety returns the specified safety or 1 as default.
+
+    one: LGOPT -> Boolean
+      ++ one returns whether we need only one solution, default being true.
+
+    homogeneous: LGOPT -> Boolean
+      ++ homogeneous returns whether we allow only homogeneous algebraic
+[104 more lines...]

--
forwarded from http://wiki.axiom-developer.org/[EMAIL PROTECTED]

Reply via email to