I wrote:
>
> Currently FriCAS use strings as names of operator properties.
> I plan to change this to symbols -- currently I am testing
> a patch.
The patch passed tests. Included below:
diff -ru trunk.bb/src/algebra/algfunc.spad.pamphlet
trunk/src/algebra/algfunc.spad.pamphlet
--- trunk.bb/src/algebra/algfunc.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/algfunc.spad.pamphlet 2008-09-30 05:24:02.000000000
+0200
@@ -308,9 +308,8 @@
P ==> SparseMultivariatePolynomial(R, K)
UP ==> SparseUnivariatePolynomial F
UPR ==> SparseUnivariatePolynomial R
- ALGOP ==> "%alg"
- SPECIALDISP ==> "%specialDisp"
- SPECIALDIFF ==> "%specialDiff"
+ SPECIALDISP ==> "%specialDisp"::Symbol
+ SPECIALDIFF ==> "%specialDiff"::Symbol
Exports ==> with
rootOf : (UP, SE) -> F
@@ -344,6 +343,9 @@
-- un-export when the compiler accepts conditional local functions!
Implementation ==> add
+
+ ALGOP := "%alg"::Symbol
+
ialg : List F -> F
dvalg: (List F, SE) -> F
dalg : List F -> OutputForm
diff -ru trunk.bb/src/algebra/combfunc.spad.pamphlet
trunk/src/algebra/combfunc.spad.pamphlet
--- trunk.bb/src/algebra/combfunc.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/combfunc.spad.pamphlet 2008-09-30 05:31:11.000000000
+0200
@@ -67,9 +67,9 @@
POWER ==> "%power"::Symbol
OPEXP ==> "exp"::Symbol
- SPECIALDIFF ==> "%specialDiff"
- SPECIALDISP ==> "%specialDisp"
- SPECIALEQUAL ==> "%specialEqual"
+ SPECIALDIFF ==> "%specialDiff"::Symbol
+ SPECIALDISP ==> "%specialDisp"::Symbol
+ SPECIALEQUAL ==> "%specialEqual"::Symbol
Exports ==> with
belong? : OP -> Boolean
@@ -169,6 +169,9 @@
++ ipow(l) should be local but conditional;
Implementation ==> add
+
+ COMB := "comb"::Symbol
+
ifact : F -> F
iiipow : List F -> F
iperm : List F -> F
@@ -252,7 +255,7 @@
oppow [expr.val, (expr.exponent)*y]
oppow [x, y]
- belong? op == has?(op, "comb")
+ belong? op == has?(op, COMB)
fourth l == third rest l
dvpow1 l == second(l) * first(l) ** (second l - 1)
factorials x == facts(x, variables x)
@@ -685,7 +688,7 @@
OP ==> BasicOperator
K ==> Kernel F
SE ==> Symbol
- SPECIALDIFF ==> "%specialDiff"
+ SPECIALDIFF ==> "%specialDiff"::Symbol
Exports ==> with
belong? : OP -> Boolean
@@ -755,6 +758,9 @@
++ iiAiryBi(x) should be local but conditional;
Implementation ==> add
+
+ SPECIAL := "special"::Symbol
+
iabs : F -> F
iGamma : F -> F
iBeta : (F, F) -> F
@@ -793,7 +799,7 @@
airyAi(x) == opAiryAi(x)
airyBi(x) == opAiryBi(x)
- belong? op == has?(op, "special")
+ belong? op == has?(op, SPECIAL)
operator op ==
is?(op, "abs"::Symbol) => opabs
diff -ru trunk.bb/src/algebra/constant.spad.pamphlet
trunk/src/algebra/constant.spad.pamphlet
--- trunk.bb/src/algebra/constant.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/constant.spad.pamphlet 2008-09-30 04:47:36.000000000
+0200
@@ -23,7 +23,6 @@
FE ==> Expression Z
K ==> Kernel %
P ==> SparseMultivariatePolynomial(Z, K)
- ALGOP ==> "%alg"
SUP ==> SparseUnivariatePolynomial
Exports ==> Join(ExpressionSpace, AlgebraicallyClosedField,
@@ -61,6 +60,8 @@
Rep := FE
+ ALGOP := "%alg"::Symbol
+
-- private
mainRatDenom(f:%):% ==
ratDenom(f::Rep::FE)$AlgebraicManipulations(Integer, FE)::Rep::%
diff -ru trunk.bb/src/algebra/efstruc.spad.pamphlet
trunk/src/algebra/efstruc.spad.pamphlet
--- trunk.bb/src/algebra/efstruc.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/efstruc.spad.pamphlet 2008-09-30 04:55:28.000000000
+0200
@@ -165,6 +165,9 @@
import AlgebraicManipulations(R, F)
import InnerCommonDenominator(Z, Q, Vector Z, Vector Q)
+ HTRIG := "htrig"::Symbol
+ TRIG := "trig"::Symbol
+
k2Elem : (K, List SY) -> F
realElem : (F, List SY) -> F
smpElem : (SMP, List SY) -> F
@@ -299,14 +302,14 @@
is?(k, "%paren"::SY) or is?(k, "%box"::SY) =>
empty? rest args => z
kf
- if has?(op := operator k, "htrig") then iez := inv(ez := exp z)
+ if has?(op := operator k, HTRIG) then iez := inv(ez := exp z)
is?(k, "sinh"::SY) => (ez - iez) / (2::F)
is?(k, "cosh"::SY) => (ez + iez) / (2::F)
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)
- if has?(op, "trig") then tz2 := tan(z / (2::F))
+ if has?(op, TRIG) then tz2 := tan(z / (2::F))
is?(k, "sin"::SY) => 2 * tz2 / (1 + tz2**2)
is?(k, "cos"::SY) => (1 - tz2**2) / (1 + tz2**2)
is?(k, "sec"::SY) => (1 + tz2**2) / (1 - tz2**2)
@@ -807,6 +810,8 @@
import ElementaryFunctionStructurePackage(R, F)
import ElementaryFunctionStructurePackage(Complex R, FG)
+ RTRIG := "rtrig"::Symbol
+
s1 := sqrt(-1::F)
ipi := pi()$F * s1
@@ -849,13 +854,13 @@
explogs2trigs locexplogs eval(f, l.ker, l.val)
locexplogs f ==
- any?(has?(#1, "rtrig"),
+ any?(has?(#1, RTRIG),
operators(g := realElementary f))$List(BasicOperator) =>
localexplogs(f, g, variables g)
F2FG g
complexNormalize(f, x) ==
- any?(has?(operator #1, "rtrig"),
+ any?(has?(operator #1, RTRIG),
[k for k in tower(g := realElementary(f, x))
| member?(x, variables(k::F))]$List(K))$List(K) =>
FG2F(rischNormalize(localexplogs(f, g, [x]), x).func)
@@ -863,7 +868,7 @@
complexNormalize f ==
l := variables(g := realElementary f)
- any?(has?(#1, "rtrig"), operators g)$List(BasicOperator) =>
+ any?(has?(#1, RTRIG), operators g)$List(BasicOperator) =>
h := localexplogs(f, g, l)
for x in l repeat h := rischNormalize(h, x).func
FG2F h
@@ -871,14 +876,14 @@
g
complexElementary(f, x) ==
- any?(has?(operator #1, "rtrig"),
+ any?(has?(operator #1, RTRIG),
[k for k in tower(g := realElementary(f, x))
| member?(x, variables(k::F))]$List(K))$List(K) =>
FG2F localexplogs(f, g, [x])
g
complexElementary f ==
- any?(has?(#1, "rtrig"),
+ any?(has?(#1, RTRIG),
operators(g := realElementary f))$List(BasicOperator) =>
FG2F localexplogs(f, g, variables g)
g
@@ -947,6 +952,8 @@
import InnerTrigonometricManipulations(R, FR, F)
import ElementaryFunctionStructurePackage(Complex R, F)
+ RTRIG := "rtrig"::Symbol
+
rreal?: Complex R -> Boolean
kreal?: Kernel F -> Boolean
localexplogs : (F, F, List SY) -> F
@@ -969,20 +976,20 @@
| is?(k, "tan"::SY) or is?(k, "cot"::SY)], lx)
complexElementary f ==
- any?(has?(#1, "rtrig"),
+ any?(has?(#1, RTRIG),
operators(g := realElementary f))$List(BasicOperator) =>
localexplogs(f, g, variables g)
g
complexElementary(f, x) ==
- any?(has?(operator #1, "rtrig"),
+ any?(has?(operator #1, RTRIG),
[k for k in tower(g := realElementary(f, x))
| member?(x, variables(k::F))]$List(K))$List(K) =>
localexplogs(f, g, [x])
g
complexNormalize(f, x) ==
- any?(has?(operator #1, "rtrig"),
+ any?(has?(operator #1, RTRIG),
[k for k in tower(g := realElementary(f, x))
| member?(x, variables(k::F))]$List(K))$List(K) =>
(rischNormalize(localexplogs(f, g, [x]), x).func)
@@ -990,7 +997,7 @@
complexNormalize f ==
l := variables(g := realElementary f)
- any?(has?(#1, "rtrig"), operators g)$List(BasicOperator) =>
+ any?(has?(#1, RTRIG), operators g)$List(BasicOperator) =>
h := localexplogs(f, g, l)
for x in l repeat h := rischNormalize(h, x).func
h
diff -ru trunk.bb/src/algebra/elemntry.spad.pamphlet
trunk/src/algebra/elemntry.spad.pamphlet
--- trunk.bb/src/algebra/elemntry.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/elemntry.spad.pamphlet 2008-09-30 04:42:00.000000000
+0200
@@ -151,6 +151,9 @@
++ localReal?(x) should be local but conditional
Implementation ==> add
+
+ ELEM := "elem"::Symbol
+
ipi : List F -> F
iexp : F -> F
ilog : F -> F
@@ -279,7 +282,7 @@
posrem(n, m) == ((r := n rem m) < 0 => r + m; r)
valueOrPole rec == (rec.pole => INV; rec.func)
- belong? op == has?(op, "elem")
+ belong? op == has?(op, ELEM)
operator op ==
is?(op, "pi"::Symbol) => oppi
diff -ru trunk.bb/src/algebra/expr.spad.pamphlet
trunk/src/algebra/expr.spad.pamphlet
--- trunk.bb/src/algebra/expr.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/expr.spad.pamphlet 2008-09-30 14:57:30.000000000
+0200
@@ -31,8 +31,6 @@
FSF ==> FunctionalSpecialFunction(R, %)
ESD ==> ExpressionSpace_&(%)
FSD ==> FunctionSpace_&(%, R)
- SYMBOL ==> "%symbol"
- ALGOP ==> "%alg"
POWER ==> "%power"::Symbol
SUP ==> SparseUnivariatePolynomial
@@ -60,6 +58,10 @@
Implementation ==> add
import KernelFunctions2(R, %)
+ SYMBOL := "%symbol"::Symbol
+ ALGOP := "%alg"::Symbol
+
+
retNotUnit : % -> R
retNotUnitIfCan: % -> Union(R, "failed")
@@ -597,7 +599,6 @@
D: Type
K ==> Kernel F
- PMPRED ==> "%pmpredicate"
Exports ==> with
suchThat: (F, D -> Boolean) -> F
@@ -611,6 +612,8 @@
Implementation ==> add
import AnyFunctions1(D -> Boolean)
+ PMPRED := "%pmpredicate"::Symbol
+
st : (K, List Any) -> F
preds: K -> List Any
mkk : BasicOperator -> F
@@ -622,9 +625,15 @@
(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))
+
+ -- Looks fishy, but we try to preserve meaning
st(k, l) ==
- mkk assert(setProperty(copy operator k, PMPRED,
- concat(preds k, l) pretend None), string(new()$Symbol))
+ kk := copy operator k
+ setProperty(kk, PMPRED, concat(preds k, l) pretend None)
+ kernel(kk, empty()$List(F))
suchThat(p:F, l:List(D -> Boolean)) ==
retractIfCan(p)@Union(Symbol, "failed") case Symbol =>
@@ -646,14 +655,14 @@
F: FunctionSpace R
K ==> Kernel F
- PMOPT ==> "%pmoptional"
- PMMULT ==> "%pmmultiple"
- PMCONST ==> "%pmconstant"
+ PMOPT ==> "%pmoptional"::Symbol
+ PMMULT ==> "%pmmultiple"::Symbol
+ PMCONST ==> "%pmconstant"::Symbol
Exports ==> with
- assert : (F, String) -> F
- ++ assert(x, s) makes the assertion s about x.
- ++ Error: if x is not a symbol.
+-- 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.
@@ -670,8 +679,8 @@
++ Error: if x is not a symbol.
Implementation ==> add
- ass : (K, String) -> F
- asst : (K, String) -> F
+ ass : (K, Symbol) -> F
+ asst : (K, Symbol) -> F
mkk : BasicOperator -> F
mkk op == kernel(op, empty()$List(F))
@@ -684,10 +693,10 @@
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"
+-- 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 =>
@@ -708,7 +717,7 @@
\section{package PMPRED AttachPredicates}
<<package PMPRED AttachPredicates>>=
)abbrev package PMPRED AttachPredicates
-++ Predicates for pattern-matching
+++ Predicates for pattern-matching, unused
++ Author: Manuel Bronstein
++ Description: Attaching predicates to symbols for pattern matching.
++ Date Created: 21 Mar 1989
@@ -734,7 +743,7 @@
\section{package PMASS PatternMatchAssertions}
<<package PMASS PatternMatchAssertions>>=
)abbrev package PMASS PatternMatchAssertions
-++ Assertions for pattern-matching
+++ Assertions for pattern-matching, unused
++ Author: Manuel Bronstein
++ Description: Attaching assertions to symbols for pattern matching.
++ Date Created: 21 Mar 1989
@@ -744,8 +753,8 @@
FE ==> Expression Integer
Exports ==> with
- assert : (Symbol, String) -> FE
- ++ assert(x, s) makes the assertion s about x.
+-- assert : (Symbol, String) -> FE
+-- ++ assert(x, s) makes the assertion s about x.
constant: Symbol -> FE
++ constant(x) tells the pattern matcher that x should
++ match only the symbol 'x and no other quantity.
@@ -764,7 +773,7 @@
constant x == constant(x::FE)
multiple x == multiple(x::FE)
optional x == optional(x::FE)
- assert(x, s) == assert(x::FE, s)
+-- assert(x, s) == assert(x::FE, s)
@
\section{domain HACKPI Pi}
diff -ru trunk.bb/src/algebra/fspace.spad.pamphlet
trunk/src/algebra/fspace.spad.pamphlet
--- trunk.bb/src/algebra/fspace.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/fspace.spad.pamphlet 2008-09-30 05:27:41.000000000
+0200
@@ -26,7 +26,6 @@
SY ==> Symbol
PAREN ==> "%paren"::SY
BOX ==> "%box"::SY
- DUMMYVAR ==> "%dummyVar"
Defn ==> Join(OrderedSet, RetractableTo K,
InnerEvalable(K, %), Evalable %) with
@@ -162,6 +161,7 @@
add
+ DUMMYVAR := "%dummyVar"::Symbol
-- the 7 functions not provided are:
-- kernels minPoly definingPolynomial
-- coerce:K -> % eval:(%, List K, List %) -> %
@@ -337,7 +337,7 @@
++ 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 -> S, Symbol, 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.
@@ -394,13 +394,9 @@
MP ==> SparseMultivariatePolynomial(R, K)
QF==> PolynomialCategoryQuotientFunctions(IndexedExponents K,K,R,MP,%)
- ODD ==> "odd"
- EVEN ==> "even"
-
- SPECIALDIFF ==> "%specialDiff"
- SPECIALDISP ==> "%specialDisp"
- SPECIALEQUAL ==> "%specialEqual"
- SPECIALINPUT ==> "%specialInput"
+ SPECIALDISP ==> "%specialDisp"::Symbol
+ SPECIALEQUAL ==> "%specialEqual"::Symbol
+ SPECIALINPUT ==> "%specialInput"::Symbol
Definition ==> Join(ExpressionSpace, RetractableTo SY, Patternable R,
FullyPatternMatchable R, FullyRetractableTo R) with
@@ -524,6 +520,10 @@
add
import BasicOperatorFunctions1(%)
+ ODD := "odd"::Symbol
+ EVEN := "even"::Symbol
+ SPECIALDIFF := "%specialDiff"::Symbol
+
-- these are needed in Ring only, but need to be declared here
-- because of compiler bug: if they are declared inside the Ring
-- case, then they are not visible inside the IntegralDomain case.
diff -ru trunk.bb/src/algebra/intef.spad.pamphlet
trunk/src/algebra/intef.spad.pamphlet
--- trunk.bb/src/algebra/intef.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/intef.spad.pamphlet 2008-09-30 05:41:46.000000000
+0200
@@ -40,7 +40,6 @@
U3 ==> Union(Record(mainpart:F, limitedlogs:LLG), "failed")
ANS ==> Record(special:F, integrand:F)
FAIL==> error "failed - cannot handle that integrand"
- ALGOP ==> "%alg"
OPDIFF ==> "%diff"::SE
Exports ==> with
@@ -76,6 +75,9 @@
import PolynomialCategoryQuotientFunctions(IndexedExponents K,
K, R, P, F)
+ PRIM := "prim"::Symbol
+ ALGOP := "%alg"::Symbol
+
alglfint : (F, K, List K, SE) -> IR
alglfextint : (F, K, List K, SE, F) -> U2
alglflimint : (F, K, List K, SE, List F) -> U3
@@ -99,7 +101,7 @@
tryChangeVar: (F, K, SE) -> Union(IR, "failed")
droponex : (F, F, K, F) -> Union(F, "failed")
- prim?(k, x) == is?(k, "log"::SE) or has?(operator k, "prim")
+ prim?(k, x) == is?(k, "log"::SE) or has?(operator k, PRIM)
tanint(f, x, k) ==
eta' := differentiate(eta := first argument k, x)
diff -ru trunk.bb/src/algebra/integrat.spad.pamphlet
trunk/src/algebra/integrat.spad.pamphlet
--- trunk.bb/src/algebra/integrat.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/integrat.spad.pamphlet 2008-09-30 11:30:47.000000000
+0200
@@ -54,6 +54,8 @@
import ElementaryFunctionStructurePackage(G, FG)
import InnerTrigonometricManipulations(R, F, FG)
+ RTRIG := "rtrig"::Symbol
+
K2KG: Kernel F -> Kernel FG
K2KG k == retract(tan F2FG first argument k)@Kernel(FG)
@@ -71,7 +73,7 @@
internalIntegrate(f, x) ==
f := distribute(f, x::F)
- any?(has?(operator #1, "rtrig"),
+ any?(has?(operator #1, RTRIG),
[k for k in tower(g := realElementary(f, x))
| member?(x, variables(k::F))]$List(Kernel F))$List(Kernel F) =>
h := trigs2explogs(F2FG g, [K2KG k for k in tower f
@@ -109,7 +111,6 @@
SE ==> Symbol
IR ==> IntegrationResult F
FG ==> Expression G
- ALGOP ==> "%alg"
TANTEMP ==> "%temptan"::SE
Exports ==> with
@@ -132,6 +133,11 @@
import PolynomialCategoryQuotientFunctions(IndexedExponents K,
K, R, SparseMultivariatePolynomial(R, K), F)
+ RTRIG := "rtrig"::Symbol
+ HTRIG := "htrig"::Symbol
+ ELEM := "elem"::Symbol
+ ALGOP := "%alg"::Symbol
+
K2KG : K -> Kernel FG
postSubst : (F, List F, List K, B, List K, SE) -> F
rinteg : (IR, F, SE, B, B) -> Union(F, List F)
@@ -198,13 +204,13 @@
f := distribute(f, x::F)
tf := [k for k in tower f | member?(x,
variables(k::F)@List(SE))]$List(K)
ltf := select(is?(operator #1, "tan"::SE), tf)
- ht := any?(has?(operator #1, "htrig"), tf)
+ ht := any?(has?(operator #1, HTRIG), tf)
rec := rischNormalize(realElementary(f, x), x)
g := rootSimp(rec.func)
tg := [k for k in tower g | member?(x, variables(k::F))]$List(K)
ltg := select(is?(operator #1, "tan"::SE), tg)
- rtg := any?(has?(operator #1, "rtrig"), tg)
- el := any?(has?(operator #1, "elem"), tg)
+ rtg := any?(has?(operator #1, RTRIG), tg)
+ el := any?(has?(operator #1, ELEM), tg)
i:IR
if (comp := goComplex?(rtg, tg, ltg)) then
i := map(FG2F, lfintegrate(trigs2explogs(F2FG g,
diff -ru trunk.bb/src/algebra/kl.spad.pamphlet
trunk/src/algebra/kl.spad.pamphlet
--- trunk.bb/src/algebra/kl.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/kl.spad.pamphlet 2008-09-30 04:00:08.000000000 +0200
@@ -159,15 +159,6 @@
N ==> NonNegativeInteger
OP ==> BasicOperator
- SYMBOL ==> "%symbol"
- PMPRED ==> "%pmpredicate"
- PMOPT ==> "%pmoptional"
- PMMULT ==> "%pmmultiple"
- PMCONST ==> "%pmconstant"
- SPECIALDISP ==> "%specialDisp"
- SPECIALEQUAL ==> "%specialEqual"
- SPECIALINPUT ==> "%specialInput"
-
Exports ==> Join(CachableSet, Patternable S) with
name : % -> Symbol
++ name(op(a1,...,an)) returns the name of op.
@@ -197,6 +188,16 @@
Rep := Record(op:OP, arg:List S, nest:N, posit:N)
+ SYMBOL := "%symbol"::Symbol
+ PMPRED := "%pmpredicate"::Symbol
+ PMOPT := "%pmoptional"::Symbol
+ PMMULT := "%pmmultiple"::Symbol
+ PMCONST := "%pmconstant"::Symbol
+ SPECIALDISP := "%specialDisp"::Symbol
+ SPECIALEQUAL := "%specialEqual"::Symbol
+ SPECIALINPUT := "%specialInput"::Symbol
+
+
clearCache()
B2Z : Boolean -> Integer
diff -ru trunk.bb/src/algebra/laplace.spad.pamphlet
trunk/src/algebra/laplace.spad.pamphlet
--- trunk.bb/src/algebra/laplace.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/laplace.spad.pamphlet 2008-09-30 05:30:24.000000000
+0200
@@ -30,8 +30,7 @@
OFE ==> OrderedCompletion F
EQ ==> Equation OFE
- ALGOP ==> "%alg"
- SPECIALDIFF ==> "%specialDiff"
+ SPECIALDIFF ==> "%specialDiff"::Symbol
Exports ==> with
laplace: (F, SE, SE) -> F
@@ -49,6 +48,8 @@
import FunctionSpaceIntegration(R, F)
import TrigonometricManipulations(R, F)
+ ALGOP := "%alg"::Symbol
+
locallaplace : (F, SE, F, SE, F) -> F
lapkernel : (F, SE, F, F) -> Union(F, "failed")
intlaplace : (F, F, F, SE, F) -> Union(F, "failed")
diff -ru trunk.bb/src/algebra/limitps.spad.pamphlet
trunk/src/algebra/limitps.spad.pamphlet
--- trunk.bb/src/algebra/limitps.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/limitps.spad.pamphlet 2008-09-30 13:07:04.000000000
+0200
@@ -563,8 +563,6 @@
P ==> SparseMultivariatePolynomial(R, K)
U ==> Union(Z, "failed")
FS2 ==> FunctionSpaceFunctions2
- POSIT ==> "positive"
- NEGAT ==> "negative"
Exports ==> with
sign: F -> U
@@ -700,8 +698,8 @@
us::Z
kerSign k ==
- has?(op := operator k, "NEGAT") => -1
- has?(op, "POSIT") or is?(op, "pi"::SY) or is?(op,"exp"::SY) or
+ op := operator k
+ is?(op, "pi"::SY) or is?(op,"exp"::SY) or
is?(op,"cosh"::SY) or is?(op,"sech"::SY) => 1
empty?(arg := argument k) => "failed"
(s := sign first arg) case "failed" =>
diff -ru trunk.bb/src/algebra/liouv.spad.pamphlet
trunk/src/algebra/liouv.spad.pamphlet
--- trunk.bb/src/algebra/liouv.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/liouv.spad.pamphlet 2008-09-30 05:25:22.000000000
+0200
@@ -31,10 +31,10 @@
INP ==> InputForm
INV ==> error "Invalid argument"
- SPECIALDIFF ==> "%specialDiff"
- SPECIALDISP ==> "%specialDisp"
- SPECIALINPUT ==> "%specialInput"
- SPECIALEQUAL ==> "%specialEqual"
+ SPECIALDIFF ==> "%specialDiff"::Symbol
+ SPECIALDISP ==> "%specialDisp"::Symbol
+ SPECIALINPUT ==> "%specialInput"::Symbol
+ SPECIALEQUAL ==> "%specialEqual"::Symbol
Exports ==> with
belong? : OP -> Boolean
@@ -60,6 +60,9 @@
++ respect to x from \spad{a} to b.
Implementation ==> add
+
+ PRIM := "prim"::Symbol
+
iei : F -> F
isi : F -> F
ici : F -> F
@@ -91,7 +94,7 @@
li x == opli x
dilog x == opli2 x
- belong? op == has?(op, "prim")
+ belong? op == has?(op, PRIM)
isi x == kernel(opsi, x)
ici x == kernel(opci, x)
ierf x == (zero? x => 0; kernel(operf, x))
diff -ru trunk.bb/src/algebra/manip.spad.pamphlet
trunk/src/algebra/manip.spad.pamphlet
--- trunk.bb/src/algebra/manip.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/manip.spad.pamphlet 2008-09-30 04:28:14.000000000
+0200
@@ -210,7 +210,6 @@
P ==> SparseMultivariatePolynomial(R, K)
RF ==> Fraction P
REC ==> Record(ker:List K, exponent: List Z)
- ALGOP ==> "%alg"
NTHR ==> "nthRoot"
Exports ==> with
@@ -257,6 +256,8 @@
Implementation ==> add
import PolynomialCategoryQuotientFunctions(IndexedExponents K,K,R,P,F)
+ ALGOP := "%alg"::Symbol
+
innerRF : (F, List K) -> F
rootExpand : K -> F
algkernels : List K -> List K
diff -ru trunk.bb/src/algebra/odeef.spad.pamphlet
trunk/src/algebra/odeef.spad.pamphlet
--- trunk.bb/src/algebra/odeef.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/odeef.spad.pamphlet 2008-09-30 04:27:20.000000000
+0200
@@ -105,7 +105,6 @@
LQ ==> LinearOrdinaryDifferentialOperator1 RF
REC ==> Record(particular: F, basis: List F)
U ==> Union(REC, "failed")
- ALGOP ==> "%alg"
Exports ==> with
solve: (L, F, SY) -> U
@@ -143,6 +142,8 @@
import PolynomialCategoryQuotientFunctions(IndexedExponents K,
K, R, P, F)
+ ALGOP := "%alg"::Symbol
+
upmp : (P, List K) -> P2
downmp : (P2, List K, List P) -> P
xpart : (F, SY) -> F
diff -ru trunk.bb/src/algebra/oderf.spad.pamphlet
trunk/src/algebra/oderf.spad.pamphlet
--- trunk.bb/src/algebra/oderf.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/oderf.spad.pamphlet 2008-09-30 05:32:35.000000000
+0200
@@ -71,7 +71,6 @@
Q ==> Fraction Z
K ==> Kernel F
UPQ ==> SparseUnivariatePolynomial Q
- ALGOP ==> "%alg"
Exports ==> with
integerBound: UP -> Z
diff -ru trunk.bb/src/algebra/opalg.spad.pamphlet
trunk/src/algebra/opalg.spad.pamphlet
--- trunk.bb/src/algebra/opalg.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/opalg.spad.pamphlet 2008-09-30 03:55:21.000000000
+0200
@@ -24,9 +24,6 @@
RM ==> Record(coef:R, monom:FG)
TERM ==> List RM
FAB ==> FreeAbelianGroup TERM
- OPADJ ==> "%opAdjoint"
- OPEVAL ==> "%opEval"
- INVEVAL ==> "%invEval"
Exports ==> Join(Ring, RetractableTo R, RetractableTo OP,
Eltable(M, M)) with
@@ -65,6 +62,11 @@
Rep := FAB
+ OPADJ := "%opAdjoint"::Symbol
+ OPEVAL := "%opEval"::Symbol
+ INVEVAL := "%invEval"::Symbol
+
+
inv : TERM -> $
termeval : (TERM, M) -> M
rmeval : (RM, M) -> M
diff -ru trunk.bb/src/algebra/op.spad.pamphlet
trunk/src/algebra/op.spad.pamphlet
--- trunk.bb/src/algebra/op.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/op.spad.pamphlet 2008-09-30 05:40:35.000000000 +0200
@@ -22,15 +22,9 @@
++ Keywords: operator, kernel.
BasicOperator(): Exports == Implementation where
O ==> OutputForm
- P ==> AssociationList(String, None)
- L ==> List Record(key:String, entry:None)
+ P ==> AssociationList(Symbol, None)
+ L ==> List Record(key:Symbol, entry:None)
SEX ==> InputForm
--- some internal properties
- LESS? ==> "%less?"
- EQUAL? ==> "%equal?"
- WEIGHT ==> "%weight"
- DISPLAY ==> "%display"
- SEXPR ==> "%input"
Exports ==> OrderedSet with
name : $ -> Symbol
@@ -88,18 +82,18 @@
++ it has one attached, "failed" otherwise.
is? : ($, Symbol) -> Boolean
++ is?(op, s) tests if the name of op is s.
- has? : ($, String) -> Boolean
+ has? : ($, Symbol) -> Boolean
++ has?(op, s) tests if property s is attached to op.
- assert : ($, String) -> $
+ assert : ($, Symbol) -> $
++ assert(op, s) attaches property s to op.
++ Argument op is modified "in place", i.e. no copy is made.
- deleteProperty_!: ($, String) -> $
+ deleteProperty_!: ($, Symbol) -> $
++ deleteProperty!(op, s) unattaches property s from op.
++ Argument op is modified "in place", i.e. no copy is made.
- property : ($, String) -> Union(None, "failed")
+ property : ($, Symbol) -> Union(None, "failed")
++ property(op, s) returns the value of property s if
++ it is attached to op, and "failed" otherwise.
- setProperty : ($, String, None) -> $
+ setProperty : ($, Symbol, None) -> $
++ setProperty(op, s, v) attaches property s to op,
++ and sets its value to v.
++ Argument op is modified "in place", i.e. no copy is made.
@@ -111,6 +105,14 @@
-- if narg < 0 then the operator ahs variable arity.
Rep := Record(opname:Symbol, narg:SingleInteger, props:P)
+ -- some internal properties
+ LESS? := "%less?"::Symbol
+ EQUAL? := "%equal?"::Symbol
+ WEIGHT := "%weight"::Symbol
+ DISPLAY := "%display"::Symbol
+ SEXPR := "%input"::Symbol
+
+
oper: (Symbol, SingleInteger, P) -> $
is?(op, s) == name(op) = s
@@ -159,7 +161,7 @@
(EQ$Lisp)(op1, op2) => true
name(op1) ^= name(op2) => false
op1.narg ^= op2.narg => false
- brace(keys properties op1)^=$Set(String) brace(keys properties op2) =>
false
+ brace(keys properties op1)^=$Set(Symbol) brace(keys properties op2) =>
false
(func := property(op1, EQUAL?)) case None =>
((func::None) pretend (($, $) -> Boolean)) (op1, op2)
true
@@ -176,8 +178,8 @@
(w1 := weight op1) ^= (w2 := weight op2) => w1 < w2
op1.narg ^= op2.narg => op1.narg < op2.narg
name(op1) ^= name(op2) => name(op1) < name(op2)
- n1 := #(k1 := brace(keys(properties op1))$Set(String))
- n2 := #(k2 := brace(keys(properties op2))$Set(String))
+ n1 := #(k1 := brace(keys(properties op1))$Set(Symbol))
+ n2 := #(k2 := brace(keys(properties op2))$Set(Symbol))
n1 ^= n2 => n1 < n2
not zero?(n1 := #(d1 := difference(k1, k2))) =>
n1 ^= (n2 := #(d2 := difference(k2, k1))) => n1 < n2
@@ -202,9 +204,6 @@
++ Keywords: operator.
BasicOperatorFunctions1(A:SetCategory): Exports == Implementation where
OP ==> BasicOperator
- EVAL ==> "%eval"
- CONST ==> "%constant"
- DIFF ==> "%diff"
Exports ==> with
evaluate : (OP, List A) -> Union(A, "failed")
@@ -243,6 +242,11 @@
++ nullary operator always returning \spad{a}, "failed" otherwise.
Implementation ==> add
+
+ EVAL := "%eval"::Symbol
+ CONST := "%constant"::Symbol
+ DIFF := "%diff"::Symbol
+
evaluate(op:OP, func:A -> A) == evaluate(op, func first #1)
evaluate op ==
@@ -323,10 +327,10 @@
OP ==> BasicOperator
O ==> OutputForm
POWER ==> "%power"::Symbol
- ALGOP ==> "%alg"
- EVEN ==> "even"
- ODD ==> "odd"
- DUMMYVAR ==> "%dummyVar"
+ ALGOP ==> "%alg"::Symbol
+ EVEN ==> "even"::Symbol
+ ODD ==> "odd"::Symbol
+ DUMMYVAR ==> "%dummyVar"::Symbol
Exports ==> with
operator: Symbol -> OP
@@ -474,19 +478,19 @@
input(oproot,
convert [convert("**"::Symbol)@InputForm, first #1, 1 / second #1])
for op in algop repeat assert(op, ALGOP)
- for op in rtrigop repeat assert(op, "rtrig")
- for op in htrigop repeat assert(op, "htrig")
- for op in trigop repeat assert(op, "trig")
- for op in elemop repeat assert(op, "elem")
- for op in primop repeat assert(op, "prim")
- for op in combop repeat assert(op, "comb")
- for op in specop repeat assert(op, "special")
- for op in anyop repeat assert(op, "any")
+ for op in rtrigop repeat assert(op, "rtrig"::Symbol)
+ for op in htrigop repeat assert(op, "htrig"::Symbol)
+ for op in trigop repeat assert(op, "trig"::Symbol)
+ for op in elemop repeat assert(op, "elem"::Symbol)
+ for op in primop repeat assert(op, "prim"::Symbol)
+ for op in combop repeat assert(op, "comb"::Symbol)
+ for op in specop repeat assert(op, "special"::Symbol)
+ for op in anyop repeat assert(op, "any"::Symbol)
for op in evenop repeat assert(op, EVEN)
for op in oddop repeat assert(op, ODD)
for op in dummyvarop1 repeat setDummyVar(op, 1)
for op in dummyvarop2 repeat setDummyVar(op, 2)
- assert(oppren, "linear")
+ assert(oppren, "linear"::Symbol)
void
@
diff -ru trunk.bb/src/algebra/pfo.spad.pamphlet
trunk/src/algebra/pfo.spad.pamphlet
--- trunk.bb/src/algebra/pfo.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/pfo.spad.pamphlet 2008-09-30 04:26:06.000000000 +0200
@@ -239,7 +239,6 @@
Q ==> Fraction Integer
UP ==> SparseUnivariatePolynomial Q
K ==> Kernel F
- ALGOP ==> "%alg"
Exports ==> with
bringDown: F -> Q
@@ -254,6 +253,8 @@
import PolynomialCategoryQuotientFunctions(IndexedExponents K,
K, R, SparseMultivariatePolynomial(R, K), F)
+ ALGOP := "%alg"::Symbol
+
K2Z : K -> F
redmap := table()$AssociationList(K, Z)
@@ -315,7 +316,6 @@
RC0 ==> Record(ncurve:UPUPQ, disc:Z)
ID ==> FractionalIdeal(UP, QF, UPUP, R)
SMP ==> SparseMultivariatePolynomial(R0,K)
- ALGOP ==> "%alg"
Exports ==> with
order : FD -> Union(N, "failed")
@@ -332,6 +332,8 @@
import PointsOfFiniteOrderTools(UPQ, UPUPQ)
import UnivariatePolynomialCommonDenominator(Z, Q, UPQ)
+ ALGOP := "%alg"::Symbol
+
raise : (UPQ, K) -> F
raise2 : (UP2, K) -> UP
qmod : F -> Q
diff -ru trunk.bb/src/algebra/rdeef.spad.pamphlet
trunk/src/algebra/rdeef.spad.pamphlet
--- trunk.bb/src/algebra/rdeef.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/rdeef.spad.pamphlet 2008-09-30 04:24:14.000000000
+0200
@@ -25,7 +25,6 @@
IR ==> IntegrationResult F
ANS ==> Record(special:F, integrand:F)
U ==> Union(ANS, "failed")
- ALGOP ==> "%alg"
Exp ==> with
varselect: (List K, SE) -> List K
@@ -57,6 +56,9 @@
++ on any remaining unintegrable part.
Impl ==> add
+
+ ALGOP := "%alg"::Symbol
+
better?: (K, K) -> Boolean
union(l1, l2) == setUnion(l1, l2)
@@ -180,7 +182,6 @@
UEX ==> Union(Record(ratpart:F, coeff:F), "failed")
PSOL==> Record(ans:F, right:F, sol?:Boolean)
FAIL==> error("Function not supported by Risch d.e.")
- ALGOP ==> "%alg"
Exports ==> with
rischDE: (Z, F, F, SE, (F, LF) -> U, (F, F) -> UEX) -> PSOL
@@ -201,6 +202,8 @@
import PolynomialCategoryQuotientFunctions(IndexedExponents K,
K, R, P, F)
+ ALGOP := "%alg"::Symbol
+
RF2GP: RF -> GP
makeData : (F, SE, K) -> Data
normal0 : (Z, F, F, SE) -> UF
diff -ru trunk.bb/src/algebra/rec.spad.pamphlet
trunk/src/algebra/rec.spad.pamphlet
--- trunk.bb/src/algebra/rec.spad.pamphlet 2008-09-30 02:33:31.000000000
+0200
+++ trunk/src/algebra/rec.spad.pamphlet 2008-09-30 14:16:16.000000000 +0200
@@ -83,8 +83,8 @@
opADE := operator("rootOfADE"::Symbol)$BasicOperator
- setProperty(oprecur, "%dummyVar", 2 pretend None)
- setProperty(opADE, "%dummyVar", 2 pretend None)
+ setProperty(oprecur, "%dummyVar"::Symbol, 2 pretend None)
+ setProperty(opADE, "%dummyVar"::Symbol, 2 pretend None)
@
Setting these properties implies that the second and third arguments of oprecur
@@ -334,7 +334,7 @@
": ",
commaSeparate vals]))
- setProperty(oprecur, "%specialDisp",
+ setProperty(oprecur, "%specialDisp"::Symbol,
ddrec@(List F -> OutputForm) pretend None)
@
@@ -491,7 +491,7 @@
(op(displayVariable l))::OutputForm, ": ",
commaSeparate vals]))
- setProperty(opADE, "%specialDisp",
+ setProperty(opADE, "%specialDisp"::Symbol,
ddADE@(List F -> OutputForm) pretend None)
@
%$
--
Waldek Hebisch
[EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/fricas-devel?hl=en
-~----------~----~----~----~------~----~------~--~---