aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/algfunc.spad.pamphlet12
-rw-r--r--src/algebra/combfunc.spad.pamphlet84
-rw-r--r--src/algebra/drawopt.spad.pamphlet91
-rw-r--r--src/algebra/efstruc.spad.pamphlet62
-rw-r--r--src/algebra/elemntry.spad.pamphlet110
-rw-r--r--src/algebra/expr.spad.pamphlet6
-rw-r--r--src/algebra/exprode.spad.pamphlet12
-rw-r--r--src/algebra/float.spad.pamphlet4
-rw-r--r--src/algebra/gaussian.spad.pamphlet10
-rw-r--r--src/algebra/intaux.spad.pamphlet9
-rw-r--r--src/algebra/irexpand.spad.pamphlet4
-rw-r--r--src/algebra/laplace.spad.pamphlet4
-rw-r--r--src/algebra/limitps.spad.pamphlet4
-rw-r--r--src/algebra/liouv.spad.pamphlet38
-rw-r--r--src/algebra/list.spad.pamphlet4
-rw-r--r--src/algebra/lmdict.spad.pamphlet4
-rw-r--r--src/algebra/manip.spad.pamphlet43
-rw-r--r--src/algebra/matcat.spad.pamphlet4
-rw-r--r--src/algebra/matrix.spad.pamphlet8
-rw-r--r--src/algebra/mkfunc.spad.pamphlet4
-rw-r--r--src/algebra/mset.spad.pamphlet4
-rw-r--r--src/algebra/oct.spad.pamphlet16
-rw-r--r--src/algebra/op.spad.pamphlet136
-rw-r--r--src/algebra/patmatch1.spad.pamphlet6
-rw-r--r--src/algebra/pattern.spad.pamphlet4
-rw-r--r--src/algebra/quat.spad.pamphlet8
-rw-r--r--src/algebra/sets.spad.pamphlet4
-rw-r--r--src/algebra/strap/LIST.lsp56
-rw-r--r--src/algebra/strap/VECTOR.lsp51
-rw-r--r--src/algebra/transsolve.spad.pamphlet58
-rw-r--r--src/algebra/vector.spad.pamphlet4
31 files changed, 458 insertions, 406 deletions
diff --git a/src/algebra/algfunc.spad.pamphlet b/src/algebra/algfunc.spad.pamphlet
index 7925927f..fbbe96dc 100644
--- a/src/algebra/algfunc.spad.pamphlet
+++ b/src/algebra/algfunc.spad.pamphlet
@@ -348,8 +348,8 @@ AlgebraicFunction(R, F): Exports == Implementation where
dvalg: (List F, SE) -> F
dalg : List F -> OutputForm
- opalg := operator("rootOf"::Symbol)$CommonOperators
- oproot := operator("nthRoot"::Symbol)$CommonOperators
+ opalg := operator('rootOf)$CommonOperators
+ oproot := operator('nthRoot)$CommonOperators
belong? op == has?(op, ALGOP)
dalg l == second(l)::OutputForm
@@ -373,8 +373,8 @@ AlgebraicFunction(R, F): Exports == Implementation where
inrootof(numer f, x)
operator op ==
- is?(op, "rootOf"::Symbol) => opalg
- is?(op, "nthRoot"::Symbol) => oproot
+ is?(op,'rootOf) => opalg
+ is?(op,'nthRoot) => oproot
error "Unknown operator"
if R has AlgebraicallyClosedField then
@@ -416,7 +416,7 @@ AlgebraicFunction(R, F): Exports == Implementation where
if R has RetractableTo Integer then
import PolynomialRoots(IndexedExponents K, K, R, P, F)
- dumvar := "%%var"::Symbol::F
+ dumvar := '%%var::F
lzero : List F -> F
dvroot : List F -> F
@@ -531,6 +531,8 @@ AlgebraicFunction(R, F): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/combfunc.spad.pamphlet b/src/algebra/combfunc.spad.pamphlet
index aa560163..979b6fa2 100644
--- a/src/algebra/combfunc.spad.pamphlet
+++ b/src/algebra/combfunc.spad.pamphlet
@@ -70,8 +70,8 @@ CombinatorialFunction(R, F): Exports == Implementation where
SMP ==> SparseMultivariatePolynomial(R, K)
Z ==> Integer
- POWER ==> "%power"::Symbol
- OPEXP ==> "exp"::Symbol
+ POWER ==> '%power
+ OPEXP ==> 'exp
SPECIALDIFF ==> "%specialDiff"
SPECIALDISP ==> "%specialDisp"
SPECIALEQUAL ==> "%specialEqual"
@@ -172,14 +172,14 @@ thus introducing the same dummy variable for all products and summations, which
caused nested products and summations to fail. (Issue~\#72)
<<package COMBF CombinatorialFunction>>=
- opfact := operator("factorial"::Symbol)$CommonOperators
- opperm := operator("permutation"::Symbol)$CommonOperators
- opbinom := operator("binomial"::Symbol)$CommonOperators
- opsum := operator("summation"::Symbol)$CommonOperators
- opdsum := operator("%defsum"::Symbol)$CommonOperators
- opprod := operator("product"::Symbol)$CommonOperators
- opdprod := operator("%defprod"::Symbol)$CommonOperators
- oppow := operator(POWER::Symbol)$CommonOperators
+ opfact := operator('factorial)$CommonOperators
+ opperm := operator('permutation)$CommonOperators
+ opbinom := operator('binomial)$CommonOperators
+ opsum := operator('summation)$CommonOperators
+ opdsum := operator('%defsum)$CommonOperators
+ opprod := operator('product)$CommonOperators
+ opdprod := operator('%defprod)$CommonOperators
+ oppow := operator(POWER)$CommonOperators
factorial x == opfact x
binomial(x, y) == opbinom [x, y]
@@ -410,13 +410,13 @@ dummy variable is introduced to make the indexing variable \lq local\rq.
(operator k) args
operator op ==
- is?(op, "factorial"::Symbol) => opfact
- is?(op, "permutation"::Symbol) => opperm
- is?(op, "binomial"::Symbol) => opbinom
- is?(op, "summation"::Symbol) => opsum
- is?(op, "%defsum"::Symbol) => opdsum
- is?(op, "product"::Symbol) => opprod
- is?(op, "%defprod"::Symbol) => opdprod
+ is?(op,'factorial) => opfact
+ is?(op,'permutation) => opperm
+ is?(op,'binomial) => opbinom
+ is?(op,'summation) => opsum
+ is?(op,'%defsum) => opdsum
+ is?(op,'product) => opprod
+ is?(op,'%defprod) => opdprod
is?(op, POWER) => oppow
error "Not a combinatorial operator"
@@ -670,18 +670,18 @@ FunctionalSpecialFunction(R, F): Exports == Implementation where
iabs : F -> F
iGamma: F -> F
- opabs := operator("abs"::Symbol)$CommonOperators
- opGamma := operator("Gamma"::Symbol)$CommonOperators
- opGamma2 := operator("Gamma2"::Symbol)$CommonOperators
- opBeta := operator("Beta"::Symbol)$CommonOperators
- opdigamma := operator("digamma"::Symbol)$CommonOperators
- oppolygamma := operator("polygamma"::Symbol)$CommonOperators
- opBesselJ := operator("besselJ"::Symbol)$CommonOperators
- opBesselY := operator("besselY"::Symbol)$CommonOperators
- opBesselI := operator("besselI"::Symbol)$CommonOperators
- opBesselK := operator("besselK"::Symbol)$CommonOperators
- opAiryAi := operator("airyAi"::Symbol)$CommonOperators
- opAiryBi := operator("airyBi"::Symbol)$CommonOperators
+ opabs := operator('abs)$CommonOperators
+ opGamma := operator('Gamma)$CommonOperators
+ opGamma2 := operator('Gamma2)$CommonOperators
+ opBeta := operator('Beta)$CommonOperators
+ opdigamma := operator('digamma)$CommonOperators
+ oppolygamma := operator('polygamma)$CommonOperators
+ opBesselJ := operator('besselJ)$CommonOperators
+ opBesselY := operator('besselY)$CommonOperators
+ opBesselI := operator('besselI)$CommonOperators
+ opBesselK := operator('besselK)$CommonOperators
+ opAiryAi := operator('airyAi)$CommonOperators
+ opAiryBi := operator('airyBi)$CommonOperators
abs x == opabs x
Gamma(x) == opGamma(x)
@@ -699,18 +699,18 @@ FunctionalSpecialFunction(R, F): Exports == Implementation where
belong? op == has?(op, "special")
operator op ==
- is?(op, "abs"::Symbol) => opabs
- is?(op, "Gamma"::Symbol) => opGamma
- is?(op, "Gamma2"::Symbol) => opGamma2
- is?(op, "Beta"::Symbol) => opBeta
- is?(op, "digamma"::Symbol) => opdigamma
- is?(op, "polygamma"::Symbol)=> oppolygamma
- is?(op, "besselJ"::Symbol) => opBesselJ
- is?(op, "besselY"::Symbol) => opBesselY
- is?(op, "besselI"::Symbol) => opBesselI
- is?(op, "besselK"::Symbol) => opBesselK
- is?(op, "airyAi"::Symbol) => opAiryAi
- is?(op, "airyBi"::Symbol) => opAiryBi
+ is?(op,'abs) => opabs
+ is?(op,'Gamma) => opGamma
+ is?(op,'Gamma2) => opGamma2
+ is?(op,'Beta) => opBeta
+ is?(op,'digamma) => opdigamma
+ is?(op,'polygamma)=> oppolygamma
+ is?(op,'besselJ) => opBesselJ
+ is?(op,'besselY) => opBesselY
+ is?(op,'besselI) => opBesselI
+ is?(op,'besselK) => opBesselK
+ is?(op,'airyAi) => opAiryAi
+ is?(op,'airyBi) => opAiryBi
error "Not a special operator"
@@ -864,6 +864,8 @@ FunctionSpaceSum(R, F): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/drawopt.spad.pamphlet b/src/algebra/drawopt.spad.pamphlet
index 107d5d3d..21acd672 100644
--- a/src/algebra/drawopt.spad.pamphlet
+++ b/src/algebra/drawopt.spad.pamphlet
@@ -164,48 +164,47 @@ DrawOption(): Exports == Implementation where
-- these lists will become tuples in a later version
lengthI tup == # tup
- viewpoint vp ==
- ["viewpoint"::Symbol, vp::Any]
-
- title s == ["title"::Symbol, s::Any]
- style s == ["style"::Symbol, s::Any]
- toScale b == ["toScale"::Symbol, b::Any]
- clip(b:Boolean) == ["clipBoolean"::Symbol, b::Any]
- adaptive b == ["adaptive"::Symbol, b::Any]
-
- pointColor(x:Float) == ["pointColorFloat"::Symbol, x::Any]
- pointColor(c:PAL) == ["pointColorPalette"::Symbol, c::Any]
- curveColor(x:Float) == ["curveColorFloat"::Symbol, x::Any]
- curveColor(c:PAL) == ["curveColorPalette"::Symbol, c::Any]
- colorFunction(f:SF -> SF) == ["colorFunction1"::Symbol, f::Any]
- colorFunction(f:(SF,SF) -> SF) == ["colorFunction2"::Symbol, f::Any]
- colorFunction(f:(SF,SF,SF) -> SF) == ["colorFunction3"::Symbol, f::Any]
+ viewpoint vp == ['viewpoint, vp::Any]
+
+ title s == ['title, s::Any]
+ style s == ['style, s::Any]
+ toScale b == ['toScale, b::Any]
+ clip(b:Boolean) == ['clipBoolean, b::Any]
+ adaptive b == ['adaptive, b::Any]
+
+ pointColor(x:Float) == ['pointColorFloat, x::Any]
+ pointColor(c:PAL) == ['pointColorPalette, c::Any]
+ curveColor(x:Float) == ['curveColorFloat, x::Any]
+ curveColor(c:PAL) == ['curveColorPalette, c::Any]
+ colorFunction(f:SF -> SF) == ['colorFunction1, f::Any]
+ colorFunction(f:(SF,SF) -> SF) == ['colorFunction2, f::Any]
+ colorFunction(f:(SF,SF,SF) -> SF) == ['colorFunction3, f::Any]
clip(tup:List SEG) ==
length tup > 3 =>
error "clip: at most 3 segments may be specified"
- ["clipSegment"::Symbol, tup::Any]
- coordinates f == ["coordinates"::Symbol, f::Any]
- tubeRadius x == ["tubeRadius"::Symbol, x::Any]
+ ['clipSegment, tup::Any]
+ coordinates f == ['coordinates, f::Any]
+ tubeRadius x == ['tubeRadius, x::Any]
range(tup:List Segment Float) ==
((n := length tup) > 3) =>
error "range: at most 3 segments may be specified"
n < 2 =>
error "range: at least 2 segments may be specified"
- ["rangeFloat"::Symbol, tup::Any]
+ ['rangeFloat, tup::Any]
range(tup:List Segment Fraction Integer) ==
((n := lengthR tup) > 3) =>
error "range: at most 3 segments may be specified"
n < 2 =>
error "range: at least 2 segments may be specified"
- ["rangeRat"::Symbol, tup::Any]
-
- ranges s == ["ranges"::Symbol, s::Any]
- space s == ["space"::Symbol, s::Any]
- var1Steps s == ["var1Steps"::Symbol, s::Any]
- var2Steps s == ["var2Steps"::Symbol, s::Any]
- tubePoints s == ["tubePoints"::Symbol, s::Any]
- coord s == ["coord"::Symbol, s::Any]
- unit s == ["unit"::Symbol, s::Any]
+ ['rangeRat, tup::Any]
+
+ ranges s == ['ranges, s::Any]
+ space s == ['space, s::Any]
+ var1Steps s == ['var1Steps, s::Any]
+ var2Steps s == ['var2Steps, s::Any]
+ tubePoints s == ['tubePoints, s::Any]
+ coord s == ['coord, s::Any]
+ unit s == ['unit, s::Any]
coerce(x:%):OutputForm == x.keyword::OutputForm = x.value::OutputForm
x:% = y:% == x.keyword = y.keyword and x.value = y.value
@@ -336,84 +335,84 @@ DrawOptionFunctions0(): Exports == Implementation where
Implementation ==> add
adaptive(l,s) ==
- (u := option(l, "adaptive"::Symbol)$DrawOptionFunctions1(Boolean))
+ (u := option(l,'adaptive)$DrawOptionFunctions1(Boolean))
case "failed" => s
u::Boolean
clipBoolean(l,s) ==
- (u := option(l, "clipBoolean"::Symbol)$DrawOptionFunctions1(Boolean))
+ (u := option(l,'clipBoolean)$DrawOptionFunctions1(Boolean))
case "failed" => s
u::Boolean
title(l, s) ==
- (u := option(l, "title"::Symbol)$DrawOptionFunctions1(String))
+ (u := option(l,'title)$DrawOptionFunctions1(String))
case "failed" => s
u::String
viewpoint(l, vp) ==
- (u := option(l, "viewpoint"::Symbol)$DrawOptionFunctions1(VIEWPT))
+ (u := option(l,'viewpoint)$DrawOptionFunctions1(VIEWPT))
case "failed" => vp
u::VIEWPT
style(l, s) ==
- (u := option(l, "style"::Symbol)$DrawOptionFunctions1(String))
+ (u := option(l,'style)$DrawOptionFunctions1(String))
case "failed" => s
u::String
toScale(l,s) ==
- (u := option(l, "toScale"::Symbol)$DrawOptionFunctions1(Boolean))
+ (u := option(l,'toScale)$DrawOptionFunctions1(Boolean))
case "failed" => s
u::Boolean
pointColorPalette(l,s) ==
- (u := option(l, "pointColorPalette"::Symbol)$DrawOptionFunctions1(PAL))
+ (u := option(l,'pointColorPalette)$DrawOptionFunctions1(PAL))
case "failed" => s
u::PAL
curveColorPalette(l,s) ==
- (u := option(l, "curveColorPalette"::Symbol)$DrawOptionFunctions1(PAL))
+ (u := option(l,'curveColorPalette)$DrawOptionFunctions1(PAL))
case "failed" => s
u::PAL
ranges(l, s) ==
- (u := option(l, "ranges"::Symbol)$DrawOptionFunctions1(RANGE))
+ (u := option(l,'ranges)$DrawOptionFunctions1(RANGE))
case "failed" => s
u::RANGE
space(l) ==
- (u := option(l, "space"::Symbol)$DrawOptionFunctions1(SPACE3))
+ (u := option(l,'space)$DrawOptionFunctions1(SPACE3))
case "failed" => create3Space()$SPACE3
u::SPACE3
var1Steps(l,s) ==
- (u := option(l, "var1Steps"::Symbol)$DrawOptionFunctions1(PositiveInteger))
+ (u := option(l,'var1Steps)$DrawOptionFunctions1(PositiveInteger))
case "failed" => s
u::PositiveInteger
var2Steps(l,s) ==
- (u := option(l, "var2Steps"::Symbol)$DrawOptionFunctions1(PositiveInteger))
+ (u := option(l,'var2Steps)$DrawOptionFunctions1(PositiveInteger))
case "failed" => s
u::PositiveInteger
tubePoints(l,s) ==
- (u := option(l, "tubePoints"::Symbol)$DrawOptionFunctions1(PositiveInteger))
+ (u := option(l,'tubePoints)$DrawOptionFunctions1(PositiveInteger))
case "failed" => s
u::PositiveInteger
tubeRadius(l,s) ==
- (u := option(l, "tubeRadius"::Symbol)$DrawOptionFunctions1(Float))
+ (u := option(l,'tubeRadius)$DrawOptionFunctions1(Float))
case "failed" => s
u::Float
coord(l,s) ==
- (u := option(l, "coord"::Symbol)$DrawOptionFunctions1(POINT->POINT))
+ (u := option(l,'coord)$DrawOptionFunctions1(POINT->POINT))
case "failed" => s
u::(POINT->POINT)
units(l,s) ==
- (u := option(l, "unit"::Symbol)$DrawOptionFunctions1(UNIT))
+ (u := option(l,'unit)$DrawOptionFunctions1(UNIT))
case "failed" => s
u::UNIT
@@ -422,6 +421,8 @@ DrawOptionFunctions0(): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/efstruc.spad.pamphlet b/src/algebra/efstruc.spad.pamphlet
index a73963fd..d10c7744 100644
--- a/src/algebra/efstruc.spad.pamphlet
+++ b/src/algebra/efstruc.spad.pamphlet
@@ -573,10 +573,10 @@ InnerTrigonometricManipulations(R,F,FG): Exports == Implementation where
for a in argument k]$List(FG)) => kf
im := complex(0, 1)$GR :: FG
z := first args
- is?(k, "tan"::Symbol) =>
+ is?(k,'tan) =>
e := (member?(k, l) => exp(im * z) ** 2; exp(2 * im * z))
- im * (e - 1) /$FG (e + 1)
- is?(k, "atan"::Symbol) =>
+ is?(k,'atan) =>
im * log((1 -$FG im *$FG z)/$FG (1 +$FG im *$FG z))$FG / (2::FG)
(operator k) args
@@ -589,33 +589,33 @@ InnerTrigonometricManipulations(R,F,FG): Exports == Implementation where
"and"/[zero? imag x for x in arg] =>
complex(op [real x for x in arg]$List(F), 0)
a := first arg
- is?(op, "exp"::Symbol) => exp a
- is?(op, "log"::Symbol) => log a
- is?(op, "sin"::Symbol) => sin a
- is?(op, "cos"::Symbol) => cos a
- is?(op, "tan"::Symbol) => tan a
- is?(op, "cot"::Symbol) => cot a
- is?(op, "sec"::Symbol) => sec a
- is?(op, "csc"::Symbol) => csc a
- is?(op, "asin"::Symbol) => asin a
- is?(op, "acos"::Symbol) => acos a
- is?(op, "atan"::Symbol) => atan a
- is?(op, "acot"::Symbol) => acot a
- is?(op, "asec"::Symbol) => asec a
- is?(op, "acsc"::Symbol) => acsc a
- is?(op, "sinh"::Symbol) => sinh a
- is?(op, "cosh"::Symbol) => cosh a
- is?(op, "tanh"::Symbol) => tanh a
- is?(op, "coth"::Symbol) => coth a
- is?(op, "sech"::Symbol) => sech a
- is?(op, "csch"::Symbol) => csch a
- is?(op, "asinh"::Symbol) => asinh a
- is?(op, "acosh"::Symbol) => acosh a
- is?(op, "atanh"::Symbol) => atanh a
- is?(op, "acoth"::Symbol) => acoth a
- is?(op, "asech"::Symbol) => asech a
- is?(op, "acsch"::Symbol) => acsch a
- is?(op, "abs"::Symbol) => sqrt(norm a)::GF
+ is?(op,'exp) => exp a
+ is?(op,'log) => log a
+ is?(op,'sin) => sin a
+ is?(op,'cos) => cos a
+ is?(op,'tan) => tan a
+ is?(op,'cot) => cot a
+ is?(op,'sec) => sec a
+ is?(op,'csc) => csc a
+ is?(op,'asin) => asin a
+ is?(op,'acos) => acos a
+ is?(op,'atan) => atan a
+ is?(op,'acot) => acot a
+ is?(op,'asec) => asec a
+ is?(op,'acsc) => acsc a
+ is?(op,'sinh) => sinh a
+ is?(op,'cosh) => cosh a
+ is?(op,'tanh) => tanh a
+ is?(op,'coth) => coth a
+ is?(op,'sech) => sech a
+ is?(op,'csch) => csch a
+ is?(op,'asinh) => asinh a
+ is?(op,'acosh) => acosh a
+ is?(op,'atanh) => atanh a
+ is?(op,'acoth) => acoth a
+ is?(op,'asech) => asech a
+ is?(op,'acsch) => acsch a
+ is?(op,'abs) => sqrt(norm a)::GF
nth and is?(op, NTHR) => nthRoot(a, retract(second arg)@Z)
error "ker2trigs: cannot convert kernel to gaussian function"
@@ -633,7 +633,7 @@ InnerTrigonometricManipulations(R,F,FG): Exports == Implementation where
arg := [explogs2trigs x for x in argument k]
num := univariate(numer f, k)
den := univariate(denom f, k)
- is?(op, "exp"::Symbol) =>
+ is?(op,'exp) =>
e := exp real first arg
y := imag first arg
g := complex(e * cos y, e * sin y)$GF
@@ -915,6 +915,8 @@ ComplexTrigonometricManipulations(R, F): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/elemntry.spad.pamphlet b/src/algebra/elemntry.spad.pamphlet
index 52da98a3..9a9bdeb2 100644
--- a/src/algebra/elemntry.spad.pamphlet
+++ b/src/algebra/elemntry.spad.pamphlet
@@ -185,33 +185,33 @@ ElementaryFunction(R, F): Exports == Implementation where
iisqrt1 : () -> F
valueOrPole : Record(func:F, pole:B) -> F
- oppi := operator("pi"::Symbol)$CommonOperators
- oplog := operator("log"::Symbol)$CommonOperators
- opexp := operator("exp"::Symbol)$CommonOperators
- opsin := operator("sin"::Symbol)$CommonOperators
- opcos := operator("cos"::Symbol)$CommonOperators
- optan := operator("tan"::Symbol)$CommonOperators
- opcot := operator("cot"::Symbol)$CommonOperators
- opsec := operator("sec"::Symbol)$CommonOperators
- opcsc := operator("csc"::Symbol)$CommonOperators
- opasin := operator("asin"::Symbol)$CommonOperators
- opacos := operator("acos"::Symbol)$CommonOperators
- opatan := operator("atan"::Symbol)$CommonOperators
- opacot := operator("acot"::Symbol)$CommonOperators
- opasec := operator("asec"::Symbol)$CommonOperators
- opacsc := operator("acsc"::Symbol)$CommonOperators
- opsinh := operator("sinh"::Symbol)$CommonOperators
- opcosh := operator("cosh"::Symbol)$CommonOperators
- optanh := operator("tanh"::Symbol)$CommonOperators
- opcoth := operator("coth"::Symbol)$CommonOperators
- opsech := operator("sech"::Symbol)$CommonOperators
- opcsch := operator("csch"::Symbol)$CommonOperators
- opasinh := operator("asinh"::Symbol)$CommonOperators
- opacosh := operator("acosh"::Symbol)$CommonOperators
- opatanh := operator("atanh"::Symbol)$CommonOperators
- opacoth := operator("acoth"::Symbol)$CommonOperators
- opasech := operator("asech"::Symbol)$CommonOperators
- opacsch := operator("acsch"::Symbol)$CommonOperators
+ oppi := operator('pi)$CommonOperators
+ oplog := operator('log)$CommonOperators
+ opexp := operator('exp)$CommonOperators
+ opsin := operator('sin)$CommonOperators
+ opcos := operator('cos)$CommonOperators
+ optan := operator('tan)$CommonOperators
+ opcot := operator('cot)$CommonOperators
+ opsec := operator('sec)$CommonOperators
+ opcsc := operator('csc)$CommonOperators
+ opasin := operator('asin)$CommonOperators
+ opacos := operator('acos)$CommonOperators
+ opatan := operator('atan)$CommonOperators
+ opacot := operator('acot)$CommonOperators
+ opasec := operator('asec)$CommonOperators
+ opacsc := operator('acsc)$CommonOperators
+ opsinh := operator('sinh)$CommonOperators
+ opcosh := operator('cosh)$CommonOperators
+ optanh := operator('tanh)$CommonOperators
+ opcoth := operator('coth)$CommonOperators
+ opsech := operator('sech)$CommonOperators
+ opcsch := operator('csch)$CommonOperators
+ opasinh := operator('asinh)$CommonOperators
+ opacosh := operator('acosh)$CommonOperators
+ opatanh := operator('atanh)$CommonOperators
+ opacoth := operator('acoth)$CommonOperators
+ opasech := operator('asech)$CommonOperators
+ opacsch := operator('acsch)$CommonOperators
-- Pi is a domain...
Pie, isqrt1, isqrt2, isqrt3: F
@@ -282,33 +282,33 @@ ElementaryFunction(R, F): Exports == Implementation where
belong? op == has?(op, "elem")
operator op ==
- is?(op, "pi"::Symbol) => oppi
- is?(op, "log"::Symbol) => oplog
- is?(op, "exp"::Symbol) => opexp
- is?(op, "sin"::Symbol) => opsin
- is?(op, "cos"::Symbol) => opcos
- is?(op, "tan"::Symbol) => optan
- is?(op, "cot"::Symbol) => opcot
- is?(op, "sec"::Symbol) => opsec
- is?(op, "csc"::Symbol) => opcsc
- is?(op, "asin"::Symbol) => opasin
- is?(op, "acos"::Symbol) => opacos
- is?(op, "atan"::Symbol) => opatan
- is?(op, "acot"::Symbol) => opacot
- is?(op, "asec"::Symbol) => opasec
- is?(op, "acsc"::Symbol) => opacsc
- is?(op, "sinh"::Symbol) => opsinh
- is?(op, "cosh"::Symbol) => opcosh
- is?(op, "tanh"::Symbol) => optanh
- is?(op, "coth"::Symbol) => opcoth
- is?(op, "sech"::Symbol) => opsech
- is?(op, "csch"::Symbol) => opcsch
- is?(op, "asinh"::Symbol) => opasinh
- is?(op, "acosh"::Symbol) => opacosh
- is?(op, "atanh"::Symbol) => opatanh
- is?(op, "acoth"::Symbol) => opacoth
- is?(op, "asech"::Symbol) => opasech
- is?(op, "acsch"::Symbol) => opacsch
+ is?(op,'pi) => oppi
+ is?(op,'log) => oplog
+ is?(op,'exp) => opexp
+ is?(op,'sin) => opsin
+ is?(op,'cos) => opcos
+ is?(op,'tan) => optan
+ is?(op,'cot) => opcot
+ is?(op,'sec) => opsec
+ is?(op,'csc) => opcsc
+ is?(op,'asin) => opasin
+ is?(op,'acos) => opacos
+ is?(op,'atan) => opatan
+ is?(op,'acot) => opacot
+ is?(op,'asec) => opasec
+ is?(op,'acsc) => opacsc
+ is?(op,'sinh) => opsinh
+ is?(op,'cosh) => opcosh
+ is?(op,'tanh) => optanh
+ is?(op,'coth) => opcoth
+ is?(op,'sech) => opsech
+ is?(op,'csch) => opcsch
+ is?(op,'asinh) => opasinh
+ is?(op,'acosh) => opacosh
+ is?(op,'atanh) => opatanh
+ is?(op,'acoth) => opacoth
+ is?(op,'asech) => opasech
+ is?(op,'acsch) => opacsch
error "Not an elementary operator"
dropfun x ==
@@ -869,6 +869,8 @@ ElementaryFunction(R, F): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/expr.spad.pamphlet b/src/algebra/expr.spad.pamphlet
index b781f423..6c73da2a 100644
--- a/src/algebra/expr.spad.pamphlet
+++ b/src/algebra/expr.spad.pamphlet
@@ -33,7 +33,7 @@ Expression(R:OrderedSet): Exports == Implementation where
FSD ==> FunctionSpace_&(%, R)
SYMBOL ==> "%symbol"
ALGOP ==> "%alg"
- POWER ==> "%power"::Symbol
+ POWER ==> '%power
SUP ==> SparseUnivariatePolynomial
Exports ==> FunctionSpace R with
@@ -791,7 +791,7 @@ Pi(): Exports == Implementation where
Implementation ==> RF add
Rep := RF
- sympi := "%pi"::Symbol
+ sympi := '%pi
p2sf: UP -> DoubleFloat
p2f : UP -> Float
@@ -861,6 +861,8 @@ PiCoercions(R:Join(OrderedSet, IntegralDomain)): with
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/exprode.spad.pamphlet b/src/algebra/exprode.spad.pamphlet
index 3aa24347..0259de07 100644
--- a/src/algebra/exprode.spad.pamphlet
+++ b/src/algebra/exprode.spad.pamphlet
@@ -96,10 +96,10 @@ ExpressionSpaceODESolver(R, F): Exports == Implementation where
findEq : (K, SY, List F) -> F
localInteger: F -> F
- opelt := operator("elt"::Symbol)$OP
- --opex := operator("exquo"::Symbol)$OP
- opex := operator("fixedPointExquo"::Symbol)$OP
- opint := operator("integer"::Symbol)$OP
+ opelt := operator('elt)$OP
+ --opex := operator('exquo)$OP
+ opex := operator('fixedPointExquo)$OP
+ opint := operator('integer)$OP
Rint? := R has IntegerNumberSystem
@@ -107,7 +107,7 @@ ExpressionSpaceODESolver(R, F): Exports == Implementation where
diffRhs(f, g) == diffRhsK(retract(f)@K, g)
k2exquo k ==
- is?(op := operator k, "%diff"::Symbol) =>
+ is?(op := operator k,'%diff) =>
error "Improper differential equation"
kernel(op, [div2exquo f for f in argument k]$List(F))
@@ -214,6 +214,8 @@ ExpressionSpaceODESolver(R, F): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/float.spad.pamphlet b/src/algebra/float.spad.pamphlet
index 9e38598f..4ca77fdd 100644
--- a/src/algebra/float.spad.pamphlet
+++ b/src/algebra/float.spad.pamphlet
@@ -971,7 +971,7 @@ Float():
- (coerce(-f)@OutputForm)
convert(f):InputForm ==
- convert [convert("float"::Symbol), convert mantissa f,
+ convert [convert('float), convert mantissa f,
convert exponent f, convert base()]$List(InputForm)
-- Conversion routines
@@ -1022,6 +1022,8 @@ Float():
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/gaussian.spad.pamphlet b/src/algebra/gaussian.spad.pamphlet
index a7d5c1dd..fba0d687 100644
--- a/src/algebra/gaussian.spad.pamphlet
+++ b/src/algebra/gaussian.spad.pamphlet
@@ -167,7 +167,7 @@ ComplexCategory(R:CommutativeRing): Category ==
re := (r := real x)::OutputForm
ie := (i := imag x)::OutputForm
zero? i => re
- outi := "%i"::Symbol::OutputForm
+ outi := '%i::OutputForm
ip :=
-- one? i => outi
(i = 1) => outi
@@ -210,7 +210,7 @@ ComplexCategory(R:CommutativeRing): Category ==
if R has ConvertibleTo InputForm then
convert(x:%):InputForm ==
- convert([convert("complex"::Symbol), convert real x,
+ convert([convert('complex), convert real x,
convert imag x]$List(InputForm))@InputForm
if R has ConvertibleTo Pattern Integer then
@@ -476,7 +476,7 @@ ComplexPattern(R, S, CS) : C == T where
T == add
- ipat : Pattern R := patternVariable("%i"::Symbol, true, false, false)
+ ipat : Pattern R := patternVariable('%i, true, false, false)
convert(cs) ==
zero? imag cs => convert real cs
@@ -516,7 +516,7 @@ ComplexPatternMatch(R, S, CS) : C == T where
import PatternMatchResultFunctions2(R, PS, CS)
import PatternMatchResultFunctions2(R, CS, PS)
- ivar : PS := "%i"::Symbol::PS
+ ivar : PS := '%i::PS
makeComplex(p:PS):CS ==
up := univariate p
@@ -788,6 +788,8 @@ ComplexIntegerSolveLinearPolynomialEquation(R,CR): C == T
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/intaux.spad.pamphlet b/src/algebra/intaux.spad.pamphlet
index d2452f79..d7b72256 100644
--- a/src/algebra/intaux.spad.pamphlet
+++ b/src/algebra/intaux.spad.pamphlet
@@ -99,13 +99,12 @@ IntegrationResult(F:Field): Exports == Implementation where
-- deg 1 minimal poly doesn't get sigma
lastc := - coefficient(rec.coeff, 0) / coefficient(rec.coeff, 1)
lg := (rec.logand) lastc
- logandp := prefix("log"::Symbol::O, [lg::O])
+ logandp := prefix('log::O, [lg::O])
(cc := Q2F(rec.scalar) * lastc) = 1 => logandp
cc = -1 => - logandp
cc::O * logandp
coeffp:O := (outputForm(rec.coeff, alpha) = 0::Z::O)@O
- logandp :=
- alpha * prefix("log"::Symbol::O, [outputForm(rec.logand, alpha)])
+ logandp := alpha * prefix('log::O, [outputForm(rec.logand, alpha)])
if (cc := Q2F(rec.scalar)) ~= 1 then
logandp := cc::O * logandp
sum(logandp, coeffp)
@@ -179,7 +178,7 @@ IntegrationResult(F:Field): Exports == Implementation where
reduce("+", l)
NE2O ne ==
- int((ne.integrand)::O * hconcat ["d"::Symbol::O, (ne.intvar)::O])
+ int((ne.integrand)::O * hconcat ['d::O, (ne.intvar)::O])
@
\section{package IR2 IntegrationResultFunctions2}
@@ -252,6 +251,8 @@ IntegrationResultFunctions2(E, F): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/irexpand.spad.pamphlet b/src/algebra/irexpand.spad.pamphlet
index e725ca76..c01605cb 100644
--- a/src/algebra/irexpand.spad.pamphlet
+++ b/src/algebra/irexpand.spad.pamphlet
@@ -78,7 +78,7 @@ IntegrationResultToFunction(R, F): Exports == Implementation where
evenRoots x ==
[first argument k for k in tower x |
- is?(k,"nthRoot"::Symbol) and even?(retract(second argument k)@Z)
+ is?(k,'nthRoot) and even?(retract(second argument k)@Z)
and (not empty? variables first argument k)]
expand i ==
@@ -295,6 +295,8 @@ IntegrationResultRFToFunction(R): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/laplace.spad.pamphlet b/src/algebra/laplace.spad.pamphlet
index 74921607..949253cc 100644
--- a/src/algebra/laplace.spad.pamphlet
+++ b/src/algebra/laplace.spad.pamphlet
@@ -60,7 +60,7 @@ LaplaceTransform(R, F): Exports == Implementation where
aexp : (F, SE) -> Union(Record(coef:F, coef1:F, coef0:F), "failed")
algebraic? : (F, SE) -> Boolean
- oplap := operator("laplace"::Symbol, 3)$BasicOperator
+ oplap := operator('laplace, 3)$BasicOperator
laplace(f,t,s) == locallaplace(complexElementary(f,t),t,t::F,s,s::F)
@@ -318,6 +318,8 @@ InverseLaplaceTransform(R, F): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/limitps.spad.pamphlet b/src/algebra/limitps.spad.pamphlet
index 9e8b3b53..faf927cc 100644
--- a/src/algebra/limitps.spad.pamphlet
+++ b/src/algebra/limitps.spad.pamphlet
@@ -608,7 +608,7 @@ ElementaryFunctionSign(R,F): Exports == Implementation where
--abort if there are any variables
not empty? variables f => "failed"
-- abort in the presence of algebraic numbers
- member?(coerce("rootOf")::Symbol,map(name,operators f)$ListFunctions2(BasicOperator,Symbol)) => "failed"
+ member?('rootOf,map(name,operators f)$ListFunctions2(BasicOperator,Symbol)) => "failed"
-- In the last resort try interval evaluation where feasible.
if R has ConvertibleTo Float then
import Interval(Float)
@@ -726,6 +726,8 @@ ElementaryFunctionSign(R,F): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/liouv.spad.pamphlet b/src/algebra/liouv.spad.pamphlet
index 6be5415c..ee4bd756 100644
--- a/src/algebra/liouv.spad.pamphlet
+++ b/src/algebra/liouv.spad.pamphlet
@@ -75,14 +75,14 @@ LiouvillianFunction(R, F): Exports == Implementation where
dummy := new()$SE :: F
- opint := operator("integral"::Symbol)$CommonOperators
- opdint := operator("%defint"::Symbol)$CommonOperators
- opei := operator("Ei"::Symbol)$CommonOperators
- opli := operator("li"::Symbol)$CommonOperators
- opsi := operator("Si"::Symbol)$CommonOperators
- opci := operator("Ci"::Symbol)$CommonOperators
- opli2 := operator("dilog"::Symbol)$CommonOperators
- operf := operator("erf"::Symbol)$CommonOperators
+ opint := operator('integral)$CommonOperators
+ opdint := operator('%defint)$CommonOperators
+ opei := operator('Ei)$CommonOperators
+ opli := operator('li)$CommonOperators
+ opsi := operator('Si)$CommonOperators
+ opci := operator('Ci)$CommonOperators
+ opli2 := operator('dilog)$CommonOperators
+ operf := operator('erf)$CommonOperators
Si x == opsi x
Ci x == opci x
@@ -136,23 +136,23 @@ LiouvillianFunction(R, F): Exports == Implementation where
ili x ==
x = 1 => INV
- is?(x, "exp"::Symbol) => Ei first argument(retract(x)@K)
+ is?(x,'exp) => Ei first argument(retract(x)@K)
kernel(opli, x)
iei x ==
x = 0 => INV
- is?(x, "log"::Symbol) => li first argument(retract(x)@K)
+ is?(x,'log) => li first argument(retract(x)@K)
kernel(opei, x)
operator op ==
- is?(op, "integral"::Symbol) => opint
- is?(op, "%defint"::Symbol) => opdint
- is?(op, "Ei"::Symbol) => opei
- is?(op, "Si"::Symbol) => opsi
- is?(op, "Ci"::Symbol) => opci
- is?(op, "li"::Symbol) => opli
- is?(op, "erf"::Symbol) => operf
- is?(op, "dilog"::Symbol) => opli2
+ is?(op,'integral) => opint
+ is?(op,'%defint) => opdint
+ is?(op,'Ei) => opei
+ is?(op,'Si) => opsi
+ is?(op,'Ci) => opci
+ is?(op,'li) => opli
+ is?(op,'erf) => operf
+ is?(op,'dilog) => opli2
error "Not a Liouvillian operator"
evaluate(opei, iei)$BasicOperatorFunctions1(F)
@@ -200,6 +200,8 @@ LiouvillianFunction(R, F): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/list.spad.pamphlet b/src/algebra/list.spad.pamphlet
index 57fabad7..c14d11b3 100644
--- a/src/algebra/list.spad.pamphlet
+++ b/src/algebra/list.spad.pamphlet
@@ -340,7 +340,7 @@ List(S:Type): Exports == Implementation where
if S has ConvertibleTo InputForm then
convert(x:%):InputForm ==
- convert concat(convert("construct"::Symbol)@InputForm,
+ convert concat(convert('construct)@InputForm,
[convert a for a in (x pretend List S)]$List(InputForm))
@
@@ -625,6 +625,8 @@ AssociationList(Key:SetCategory, Entry:SetCategory):
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/lmdict.spad.pamphlet b/src/algebra/lmdict.spad.pamphlet
index 557f7aaf..1d8cc8a1 100644
--- a/src/algebra/lmdict.spad.pamphlet
+++ b/src/algebra/lmdict.spad.pamphlet
@@ -66,7 +66,7 @@ ListMultiDictionary(S:SetCategory): MultiDictionary(S) with
if S has ConvertibleTo InputForm then
convert(lmd:%):InputForm ==
- convert [convert("dictionary"::Symbol)@InputForm,
+ convert [convert('dictionary)@InputForm,
convert(parts lmd)@InputForm]
map(f, s) == dictionary map(f, parts s)
@@ -159,6 +159,8 @@ ListMultiDictionary(S:SetCategory): MultiDictionary(S) with
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/manip.spad.pamphlet b/src/algebra/manip.spad.pamphlet
index afdb165c..e112a811 100644
--- a/src/algebra/manip.spad.pamphlet
+++ b/src/algebra/manip.spad.pamphlet
@@ -420,7 +420,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where
K ==> Kernel F
P ==> SparseMultivariatePolynomial(R, K)
UP ==> SparseUnivariatePolynomial P
- POWER ==> "%power"::Symbol
+ POWER ==> '%power
POW ==> Record(val: F,exponent: Z)
PRODUCT ==> Record(coef : Z, var : K)
FPR ==> Fraction Polynomial R
@@ -593,11 +593,11 @@ TranscendentalManipulations(R, F): Exports == Implementation where
sum : F := 0
arg : F := 1
for term in l repeat
- is?(term,"log"::Symbol) =>
+ is?(term,'log) =>
arg := arg * simplifyLog(first(argument(first(kernels(term)))))
-- Now look for multiples, including negative ones.
prod : Union(PRODUCT, "failed") := isMult(term)
- (prod case PRODUCT) and is?(prod.var,"log"::Symbol) =>
+ (prod case PRODUCT) and is?(prod.var,'log) =>
arg := arg * simplifyLog ((first argument(prod.var))**(prod.coef))
sum := sum+term
sum+log(arg)
@@ -606,11 +606,11 @@ TranscendentalManipulations(R, F): Exports == Implementation where
simplifyLog1(numerator e)/simplifyLog1(denominator e)
simplifyLog1(e:F):F ==
- freeOf?(e,"log"::Symbol) => e
+ freeOf?(e,'log) => e
-- Check for n*log(u)
prod : Union(PRODUCT, "failed") := isMult(e)
- (prod case PRODUCT) and is?(prod.var,"log"::Symbol) =>
+ (prod case PRODUCT) and is?(prod.var,'log) =>
log simplifyLog ((first argument(prod.var))**(prod.coef))
termList : Union(List(F),"failed") := isTimes(e)
@@ -635,7 +635,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where
i : NonNegativeInteger := 0
while (not(foundLog) and (i < #terms)) repeat
i := i+1
- if is?(terms.i,"log"::Symbol) then
+ if is?(terms.i,'log) then
args : List F := argument(retract(terms.i)@K)
setelt(terms,i, log simplifyLog1(first(args)**(*/exprs)))
foundLog := true
@@ -678,7 +678,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where
lpow := select(is?(#1, POWER)$K, lk := variables p)$List(K)
for k in lk repeat
d := degree(p, k)
- if is?(k, "exp"::Symbol) then
+ if is?(k, 'exp) then
exponent := exponent + d * first argument k
else if not is?(k, POWER) then
-- Expand arguments to functions as well ... MCD 23/1/97
@@ -747,7 +747,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where
arg := [htrigs x for x in argument k]$List(F)
num := univariate(numer f, k)
den := univariate(denom f, k)
- is?(op, "exp"::Symbol) =>
+ is?(op,'exp) =>
g1 := cosh(a := first arg) + sinh(a)
g2 := cosh(a) - sinh(a)
supexp(num,g1,g2,b:= (degree num)::Z quo 2)/supexp(den,g1,g2,b)
@@ -770,7 +770,7 @@ TranscendentalManipulations(R, F): Exports == Implementation where
logexpand k ==
nullary?(op := operator k) => k::F
- is?(op, "log"::Symbol) =>
+ is?(op,'log) =>
exlog(numer(x := expandLog first argument k)) - exlog denom x
op [expandLog x for x in argument k]$List(F)
@@ -778,24 +778,23 @@ TranscendentalManipulations(R, F): Exports == Implementation where
nullary?(op := operator k) => k::F
is?(op, POWER) => expandpow k
arg := first argument k
- is?(op, "sec"::Symbol) => inv expand cos arg
- is?(op, "csc"::Symbol) => inv expand sin arg
- is?(op, "log"::Symbol) =>
- exlog(numer(x := expand arg)) - exlog denom x
+ is?(op,'sec) => inv expand cos arg
+ is?(op,'csc) => inv expand sin arg
+ is?(op,'log) => exlog(numer(x := expand arg)) - exlog denom x
num := numer arg
den := denom arg
(b := (reductum num) / den) ~= 0 =>
a := (leadingMonomial num) / den
- is?(op, "exp"::Symbol) => exp(expand a) * expand(exp b)
- is?(op, "sin"::Symbol) =>
+ is?(op,'exp) => exp(expand a) * expand(exp b)
+ is?(op,'sin) =>
sin(expand a) * expand(cos b) + cos(expand a) * expand(sin b)
- is?(op, "cos"::Symbol) =>
+ is?(op,'cos) =>
cos(expand a) * expand(cos b) - sin(expand a) * expand(sin b)
- is?(op, "tan"::Symbol) =>
+ is?(op,'tan) =>
ta := tan expand a
tb := expand tan b
(ta + tb) / (1 - ta * tb)
- is?(op, "cot"::Symbol) =>
+ is?(op,'cot) =>
cta := cot expand a
ctb := expand cot b
(cta * ctb - 1) / (ctb + cta)
@@ -815,16 +814,18 @@ TranscendentalManipulations(R, F): Exports == Implementation where
-- pass3 groups exponentials together
simplify0 x ==
simplifyExp eval(eval(x,
- ["tan"::Symbol,"cot"::Symbol,"sec"::Symbol,"csc"::Symbol,
- "tanh"::Symbol,"coth"::Symbol,"sech"::Symbol,"csch"::Symbol],
+ ['tan,'cot,'sec,'csc,
+ 'tanh,'coth,'sech,'csch],
[t2t,c2t,s2c,c2s,th2th,ch2th,sh2ch,ch2sh]),
- ["sin"::Symbol, "sinh"::Symbol], [2, 2], [s2c2, sh2ch2])
+ ['sin, 'sinh], [2, 2], [s2c2, sh2ch2])
@
\section{License}
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/matcat.spad.pamphlet b/src/algebra/matcat.spad.pamphlet
index 90b62b28..f3fdb8dc 100644
--- a/src/algebra/matcat.spad.pamphlet
+++ b/src/algebra/matcat.spad.pamphlet
@@ -486,7 +486,7 @@ MatrixCategory(R,Row,Col): Category == Definition where
--if R has ConvertibleTo InputForm then
--convert(x:%):InputForm ==
- --convert [convert("matrix"::Symbol)@InputForm,
+ --convert [convert('matrix)@InputForm,
--convert listOfLists x]$List(InputForm)
if Col has shallowlyMutable then
@@ -861,6 +861,8 @@ SquareMatrixCategory(ndim,R,Row,Col): Category == Definition where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/matrix.spad.pamphlet b/src/algebra/matrix.spad.pamphlet
index d017dc19..a456deec 100644
--- a/src/algebra/matrix.spad.pamphlet
+++ b/src/algebra/matrix.spad.pamphlet
@@ -249,7 +249,7 @@ Matrix(R): Exports == Implementation where
if R has ConvertibleTo InputForm then
convert(x:$):InputForm ==
- convert [convert("matrix"::Symbol)@InputForm,
+ convert [convert('matrix)@InputForm,
convert listOfLists x]$List(InputForm)
@
@@ -336,7 +336,7 @@ RectangularMatrix(m,n,R): Exports == Implementation where
if R has ConvertibleTo InputForm then
convert(x:$):InputForm ==
- convert [convert("rectangularMatrix"::Symbol)@InputForm,
+ convert [convert('rectangularMatrix)@InputForm,
convert(x::Matrix(R))]$List(InputForm)
@
@@ -478,7 +478,7 @@ SquareMatrix(ndim,R): Exports == Implementation where
if R has ConvertibleTo InputForm then
convert(x:$):InputForm ==
- convert [convert("squareMatrix"::Symbol)@InputForm,
+ convert [convert('squareMatrix)@InputForm,
convert(rep x)@InputForm]$List(InputForm)
@@ -487,6 +487,8 @@ SquareMatrix(ndim,R): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/mkfunc.spad.pamphlet b/src/algebra/mkfunc.spad.pamphlet
index 9ea17c28..08192d77 100644
--- a/src/algebra/mkfunc.spad.pamphlet
+++ b/src/algebra/mkfunc.spad.pamphlet
@@ -130,7 +130,7 @@ InputForm():
l := destruct s
l2 := [flatten0(x, sy, n := n+1) for x in rest l]
[concat(concat [u.lst for u in l2], conv([convert(
- "LET"::Symbol)@%, a, conv(concat(first l,
+ "%LET"::Symbol)@%, a, conv(concat(first l,
[u.symb for u in l2]))@%]$List(%))@%), a]
strsym s ==
@@ -471,6 +471,8 @@ MakeFloatCompiledFunction(S): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/mset.spad.pamphlet b/src/algebra/mset.spad.pamphlet
index 42d505f4..6e6a1d44 100644
--- a/src/algebra/mset.spad.pamphlet
+++ b/src/algebra/mset.spad.pamphlet
@@ -98,7 +98,7 @@ Multiset(S: SetCategory): MultisetAggregate S with
if S has ConvertibleTo InputForm then
convert(ms:%):InputForm ==
- convert [convert("multiset"::Symbol)@InputForm,
+ convert [convert('multiset)@InputForm,
convert(parts ms)@InputForm]
members(ms:%):List S == keys ms.table
@@ -298,6 +298,8 @@ Multiset(S: SetCategory): MultisetAggregate S with
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/oct.spad.pamphlet b/src/algebra/oct.spad.pamphlet
index 680cb040..fbaa68ed 100644
--- a/src/algebra/oct.spad.pamphlet
+++ b/src/algebra/oct.spad.pamphlet
@@ -155,7 +155,7 @@ OctonionCategory(R: CommutativeRing): Category ==
y := octon(0$R,0$R,imagj(x),imagk(x),imagE(x),
imagI(x),imagJ(x),imagK(x))
z :=
- part := "i"::Symbol::OutputForm
+ part := 'i::OutputForm
-- one? imagi(x) => part
(imagi(x) = 1) => part
(imagi(x) :: OutputForm) * part
@@ -166,7 +166,7 @@ OctonionCategory(R: CommutativeRing): Category ==
y := octon(0$R,0$R,0$R,imagk(x),imagE(x),
imagI(x),imagJ(x),imagK(x))
z :=
- part := "j"::Symbol::OutputForm
+ part := 'j::OutputForm
-- one? imagj(x) => part
(imagj(x) = 1) => part
(imagj(x) :: OutputForm) * part
@@ -177,7 +177,7 @@ OctonionCategory(R: CommutativeRing): Category ==
y := octon(0$R,0$R,0$R,0$R,imagE(x),
imagI(x),imagJ(x),imagK(x))
z :=
- part := "k"::Symbol::OutputForm
+ part := 'k::OutputForm
-- one? imagk(x) => part
(imagk(x) = 1) => part
(imagk(x) :: OutputForm) * part
@@ -188,7 +188,7 @@ OctonionCategory(R: CommutativeRing): Category ==
y := octon(0$R,0$R,0$R,0$R,0$R,
imagI(x),imagJ(x),imagK(x))
z :=
- part := "E"::Symbol::OutputForm
+ part := 'E::OutputForm
-- one? imagE(x) => part
(imagE(x) = 1) => part
(imagE(x) :: OutputForm) * part
@@ -198,7 +198,7 @@ OctonionCategory(R: CommutativeRing): Category ==
not zero?(imagI(x)) =>
y := octon(0$R,0$R,0$R,0$R,0$R,0$R,imagJ(x),imagK(x))
z :=
- part := "I"::Symbol::OutputForm
+ part := 'I::OutputForm
-- one? imagI(x) => part
(imagI(x) = 1) => part
(imagI(x) :: OutputForm) * part
@@ -208,14 +208,14 @@ OctonionCategory(R: CommutativeRing): Category ==
not zero?(imagJ(x)) =>
y := octon(0$R,0$R,0$R,0$R,0$R,0$R,0$R,imagK(x))
z :=
- part := "J"::Symbol::OutputForm
+ part := 'J::OutputForm
-- one? imagJ(x) => part
(imagJ(x) = 1) => part
(imagJ(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
-- we know that the real part,i,j,k,E,I,J parts are 0
- part := "K"::Symbol::OutputForm
+ part := 'K::OutputForm
-- one? imagK(x) => part
(imagK(x) = 1) => part
(imagK(x) :: OutputForm) * part
@@ -371,6 +371,8 @@ OctonionCategoryFunctions2(OR,R,OS,S) : Exports ==
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/op.spad.pamphlet b/src/algebra/op.spad.pamphlet
index 8b195cbe..bbd3e443 100644
--- a/src/algebra/op.spad.pamphlet
+++ b/src/algebra/op.spad.pamphlet
@@ -275,7 +275,7 @@ BasicOperatorFunctions1(A:SetCategory): Exports == Implementation where
constOp : A -> OP
opconst:OP :=
- comparison(equality(operator("constant"::Symbol, 0), eqconst?),
+ comparison(equality(operator('constant, 0), eqconst?),
ltconst?)
cdisp(a, l) == a
@@ -296,7 +296,7 @@ BasicOperatorFunctions1(A:SetCategory): Exports == Implementation where
CONST, a pretend None)
constantOpIfCan op ==
- is?(op, "constant"::Symbol) and
+ is?(op,'constant) and
((u := property(op, CONST)) case None) => (u::None) pretend A
"failed"
@@ -321,7 +321,7 @@ BasicOperatorFunctions1(A:SetCategory): Exports == Implementation where
CommonOperators(): Exports == Implementation where
OP ==> BasicOperator
O ==> OutputForm
- POWER ==> "%power"::Symbol
+ POWER ==> '%power
ALGOP ==> "%alg"
EVEN ==> "even"
ODD ==> "odd"
@@ -344,67 +344,67 @@ CommonOperators(): Exports == Implementation where
brandNew?:Reference(Boolean) := ref true
- opalg := operator("rootOf"::Symbol, 2)$OP
- oproot := operator("nthRoot"::Symbol, 2)
- oppi := operator("pi"::Symbol, 0)
- oplog := operator("log"::Symbol, 1)
- opexp := operator("exp"::Symbol, 1)
- opabs := operator("abs"::Symbol, 1)
- opsin := operator("sin"::Symbol, 1)
- opcos := operator("cos"::Symbol, 1)
- optan := operator("tan"::Symbol, 1)
- opcot := operator("cot"::Symbol, 1)
- opsec := operator("sec"::Symbol, 1)
- opcsc := operator("csc"::Symbol, 1)
- opasin := operator("asin"::Symbol, 1)
- opacos := operator("acos"::Symbol, 1)
- opatan := operator("atan"::Symbol, 1)
- opacot := operator("acot"::Symbol, 1)
- opasec := operator("asec"::Symbol, 1)
- opacsc := operator("acsc"::Symbol, 1)
- opsinh := operator("sinh"::Symbol, 1)
- opcosh := operator("cosh"::Symbol, 1)
- optanh := operator("tanh"::Symbol, 1)
- opcoth := operator("coth"::Symbol, 1)
- opsech := operator("sech"::Symbol, 1)
- opcsch := operator("csch"::Symbol, 1)
- opasinh := operator("asinh"::Symbol, 1)
- opacosh := operator("acosh"::Symbol, 1)
- opatanh := operator("atanh"::Symbol, 1)
- opacoth := operator("acoth"::Symbol, 1)
- opasech := operator("asech"::Symbol, 1)
- opacsch := operator("acsch"::Symbol, 1)
- opbox := operator("%box"::Symbol)$OP
- oppren := operator("%paren"::Symbol)$OP
- opquote := operator("applyQuote"::Symbol)$OP
- opdiff := operator("%diff"::Symbol, 3)
- opsi := operator("Si"::Symbol, 1)
- opci := operator("Ci"::Symbol, 1)
- opei := operator("Ei"::Symbol, 1)
- opli := operator("li"::Symbol, 1)
- operf := operator("erf"::Symbol, 1)
- opli2 := operator("dilog"::Symbol, 1)
- opGamma := operator("Gamma"::Symbol, 1)
- opGamma2 := operator("Gamma2"::Symbol, 2)
- opBeta := operator("Beta"::Symbol, 2)
- opdigamma := operator("digamma"::Symbol, 1)
- oppolygamma := operator("polygamma"::Symbol, 2)
- opBesselJ := operator("besselJ"::Symbol, 2)
- opBesselY := operator("besselY"::Symbol, 2)
- opBesselI := operator("besselI"::Symbol, 2)
- opBesselK := operator("besselK"::Symbol, 2)
- opAiryAi := operator("airyAi"::Symbol, 1)
- opAiryBi := operator("airyBi"::Symbol , 1)
- opint := operator("integral"::Symbol, 3)
- opdint := operator("%defint"::Symbol, 5)
- opfact := operator("factorial"::Symbol, 1)
- opperm := operator("permutation"::Symbol, 2)
- opbinom := operator("binomial"::Symbol, 2)
+ opalg := operator('rootOf, 2)$OP
+ oproot := operator('nthRoot, 2)
+ oppi := operator('pi, 0)
+ oplog := operator('log, 1)
+ opexp := operator('exp, 1)
+ opabs := operator('abs, 1)
+ opsin := operator('sin, 1)
+ opcos := operator('cos, 1)
+ optan := operator('tan, 1)
+ opcot := operator('cot, 1)
+ opsec := operator('sec, 1)
+ opcsc := operator('csc, 1)
+ opasin := operator('asin, 1)
+ opacos := operator('acos, 1)
+ opatan := operator('atan, 1)
+ opacot := operator('acot, 1)
+ opasec := operator('asec, 1)
+ opacsc := operator('acsc, 1)
+ opsinh := operator('sinh, 1)
+ opcosh := operator('cosh, 1)
+ optanh := operator('tanh, 1)
+ opcoth := operator('coth, 1)
+ opsech := operator('sech, 1)
+ opcsch := operator('csch, 1)
+ opasinh := operator('asinh, 1)
+ opacosh := operator('acosh, 1)
+ opatanh := operator('atanh, 1)
+ opacoth := operator('acoth, 1)
+ opasech := operator('asech, 1)
+ opacsch := operator('acsch, 1)
+ opbox := operator('%box)$OP
+ oppren := operator('%paren)$OP
+ opquote := operator('applyQuote)$OP
+ opdiff := operator('%diff, 3)
+ opsi := operator('Si, 1)
+ opci := operator('Ci, 1)
+ opei := operator('Ei, 1)
+ opli := operator('li, 1)
+ operf := operator('erf, 1)
+ opli2 := operator('dilog, 1)
+ opGamma := operator('Gamma, 1)
+ opGamma2 := operator('Gamma2, 2)
+ opBeta := operator('Beta, 2)
+ opdigamma := operator('digamma, 1)
+ oppolygamma := operator('polygamma, 2)
+ opBesselJ := operator('besselJ, 2)
+ opBesselY := operator('besselY, 2)
+ opBesselI := operator('besselI, 2)
+ opBesselK := operator('besselK, 2)
+ opAiryAi := operator('airyAi, 1)
+ opAiryBi := operator('airyBi , 1)
+ opint := operator('integral, 3)
+ opdint := operator('%defint, 5)
+ opfact := operator('factorial, 1)
+ opperm := operator('permutation, 2)
+ opbinom := operator('binomial, 2)
oppow := operator(POWER, 2)
- opsum := operator("summation"::Symbol, 3)
- opdsum := operator("%defsum"::Symbol, 5)
- opprod := operator("product"::Symbol, 3)
- opdprod := operator("%defprod"::Symbol, 5)
+ opsum := operator('summation, 3)
+ opdsum := operator('%defsum, 5)
+ opprod := operator('product, 3)
+ opdprod := operator('%defprod, 5)
algop := [oproot, opalg]$List(OP)
rtrigop := [opsin, opcos, optan, opcot, opsec, opcsc,
@@ -439,14 +439,14 @@ CommonOperators(): Exports == Implementation where
is?(op, s) => return copy op
operator(s)$OP
- dpi l == "%pi"::Symbol::O
+ dpi l == '%pi::O
dfact x == postfix("!"::Symbol::O, (ATOM(x)$Lisp => x; paren x))
dquote l == prefix(quote(first(l)::O), rest l)
dgamma l == prefix(hconcat("|"::Symbol::O, overbar(" "::Symbol::O)), l)
setDummyVar(op, n) == setProperty(op, DUMMYVAR, n pretend None)
dexp x ==
- e := "%e"::Symbol::O
+ e := '%e::O
x = 1::O => e
e ** x
@@ -460,12 +460,12 @@ CommonOperators(): Exports == Implementation where
display(opGamma2, dgamma)
display(opfact, dfact)
display(opquote, dquote)
- display(opperm, supersub("A"::Symbol::O, #1))
+ display(opperm, supersub('A::O, #1))
display(opbinom, binomial(first #1, second #1))
display(oppow, first(#1) ** second(#1))
display(opsum, sum(first #1, second #1, third #1))
display(opprod, prod(first #1, second #1, third #1))
- display(opint, int(first #1 * hconcat("d"::Symbol::O, second #1),
+ display(opint, int(first #1 * hconcat('d::O, second #1),
empty(), third #1))
input(oppren, convert concat(convert("("::Symbol)@InputForm,
concat(#1, convert(")"::Symbol)@InputForm)))
@@ -493,6 +493,8 @@ CommonOperators(): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/patmatch1.spad.pamphlet b/src/algebra/patmatch1.spad.pamphlet
index 87abc55b..8d6408ed 100644
--- a/src/algebra/patmatch1.spad.pamphlet
+++ b/src/algebra/patmatch1.spad.pamphlet
@@ -268,8 +268,8 @@ PatternMatchKernel(S, E): Exports == Implementation where
PAT ==> Pattern S
PRS ==> PatternMatchResult(S, E)
- POWER ==> "%power"::Symbol
- NTHRT ==> "nthRoot"::Symbol
+ POWER ==> '%power
+ NTHRT ==> 'nthRoot
Exports ==> with
patternMatch: (Kernel E, PAT, PRS) -> PRS
@@ -663,6 +663,8 @@ PatternMatchListAggregate(S, R, L): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/pattern.spad.pamphlet b/src/algebra/pattern.spad.pamphlet
index fe011879..c446462f 100644
--- a/src/algebra/pattern.spad.pamphlet
+++ b/src/algebra/pattern.spad.pamphlet
@@ -34,7 +34,7 @@ Pattern(R:SetCategory): Exports == Implementation where
PAT ==> Union(ret:R, ker: KER, exp:REC, qot: QOT, sym:RSY)
-- the following MUST be the name of the formal exponentiation operator
- POWER ==> "%power"::Symbol
+ POWER ==> '%power
-- the 4 SYM_ constants must be disting powers of 2 (bitwise arithmetic)
SYM_GENERIC ==> 1::SI
@@ -511,6 +511,8 @@ Patternable(R:Type): Category == with
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/quat.spad.pamphlet b/src/algebra/quat.spad.pamphlet
index 98701089..72f99f76 100644
--- a/src/algebra/quat.spad.pamphlet
+++ b/src/algebra/quat.spad.pamphlet
@@ -134,7 +134,7 @@ QuaternionCategory(R: CommutativeRing): Category ==
not zero?(imagI(x)) =>
y := quatern(0$R,0$R,imagJ(x),imagK(x))
z :=
- part := "i"::Symbol::OutputForm
+ part := 'i::OutputForm
-- one? imagI(x) => part
(imagI(x) = 1) => part
(imagI(x) :: OutputForm) * part
@@ -144,14 +144,14 @@ QuaternionCategory(R: CommutativeRing): Category ==
not zero?(imagJ(x)) =>
y := quatern(0$R,0$R,0$R,imagK(x))
z :=
- part := "j"::Symbol::OutputForm
+ part := 'j::OutputForm
-- one? imagJ(x) => part
(imagJ(x) = 1) => part
(imagJ(x) :: OutputForm) * part
zero? y => z
z + (y :: OutputForm)
-- we know that the real part and i and j parts are 0
- part := "k"::Symbol::OutputForm
+ part := 'k::OutputForm
-- one? imagK(x) => part
(imagK(x) = 1) => part
(imagK(x) :: OutputForm) * part
@@ -269,6 +269,8 @@ QuaternionCategoryFunctions2(QR,R,QS,S) : Exports ==
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/sets.spad.pamphlet b/src/algebra/sets.spad.pamphlet
index 5f373d4d..49bcab03 100644
--- a/src/algebra/sets.spad.pamphlet
+++ b/src/algebra/sets.spad.pamphlet
@@ -71,7 +71,7 @@ Set(S:SetCategory): FiniteSetAggregate S == add
if S has ConvertibleTo InputForm then
convert(x:%):InputForm ==
- convert [convert("set"::Symbol)@InputForm,
+ convert [convert('set)@InputForm,
convert(parts x)@InputForm]
if S has OrderedSet then
@@ -192,6 +192,8 @@ Set(S:SetCategory): FiniteSetAggregate S == add
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/strap/LIST.lsp b/src/algebra/strap/LIST.lsp
index 55078e68..d4c195af 100644
--- a/src/algebra/strap/LIST.lsp
+++ b/src/algebra/strap/LIST.lsp
@@ -158,9 +158,7 @@
(PROG (#0=#:G1444 |a| #1=#:G1445)
(RETURN
(SEQ (SPADCALL
- (CONS (SPADCALL
- (SPADCALL "construct" (|getShellEntry| $ 38))
- (|getShellEntry| $ 40))
+ (CONS (SPADCALL '|construct| (|getShellEntry| $ 39))
(PROGN
(LETT #0# NIL |LIST;convert;$If;13|)
(SEQ (LETT |a| NIL |LIST;convert;$If;13|)
@@ -175,12 +173,12 @@
(SEQ (EXIT (LETT #0#
(CONS
(SPADCALL |a|
- (|getShellEntry| $ 41))
+ (|getShellEntry| $ 40))
#0#)
|LIST;convert;$If;13|)))
(LETT #1# (CDR #1#) |LIST;convert;$If;13|)
(GO G190) G191 (EXIT (NREVERSE0 #0#)))))
- (|getShellEntry| $ 43))))))
+ (|getShellEntry| $ 42))))))
(DEFUN |List| (#0=#:G1446)
(PROG ()
@@ -205,7 +203,7 @@
(PROGN
(LETT |dv$1| (|devaluate| |#1|) . #0=(|List|))
(LETT |dv$| (LIST '|List| |dv$1|) . #0#)
- (LETT $ (|newShell| 62) . #0#)
+ (LETT $ (|newShell| 61) . #0#)
(|setShellEntry| $ 0 |dv$|)
(|setShellEntry| $ 3
(LETT |pv$|
@@ -270,7 +268,7 @@
$)))))
(COND
((|testBitVector| |pv$| 3)
- (|setShellEntry| $ 44
+ (|setShellEntry| $ 43
(CONS (|dispatchFunction| |LIST;convert;$If;13|) $))))
$))))
@@ -287,18 +285,18 @@
(73 . |concat|) (79 . |removeDuplicates|)
(84 . |setUnion|) (90 . |member?|)
(96 . |setIntersection|) (|Integer|) (102 . |elt|)
- (108 . |setDifference|) (|Symbol|) (114 . |coerce|)
- (|InputForm|) (119 . |convert|) (124 . |convert|)
- (|List| $) (129 . |convert|) (134 . |convert|)
- (|Mapping| 6 6 6) (|NonNegativeInteger|) (|List| 6)
- (|Equation| 6) (|List| 48) (|Mapping| 8 6)
- (|Mapping| 8 6 6) (|UniversalSegment| 34) '"last" '"rest"
- '"first" '"value" (|Mapping| 6 6) (|OutputForm|)
- (|SingleInteger|) (|List| 34) (|Union| 6 '"failed"))
- '#(|setUnion| 139 |setIntersection| 145 |setDifference| 151
- |removeDuplicates| 157 |null| 162 |nil| 167 |member?| 171
- |elt| 177 |convert| 183 |cons| 188 |concat| 194 |append|
- 200 |OMwrite| 206)
+ (108 . |setDifference|) (|Symbol|) (|InputForm|)
+ (114 . |convert|) (119 . |convert|) (|List| $)
+ (124 . |convert|) (129 . |convert|) (|Mapping| 6 6 6)
+ (|NonNegativeInteger|) (|List| 6) (|Equation| 6)
+ (|List| 47) (|Mapping| 8 6) (|Mapping| 8 6 6)
+ (|UniversalSegment| 34) '"last" '"rest" '"first" '"value"
+ (|Mapping| 6 6) (|OutputForm|) (|SingleInteger|)
+ (|List| 34) (|Union| 6 '"failed"))
+ '#(|setUnion| 134 |setIntersection| 140 |setDifference| 146
+ |removeDuplicates| 152 |null| 157 |nil| 162 |member?| 166
+ |elt| 172 |convert| 178 |cons| 183 |concat| 189 |append|
+ 195 |OMwrite| 201)
'((|shallowlyMutable| . 0) (|finiteAggregate| . 0))
(CONS (|makeByteWordVec2| 6
'(0 0 0 0 0 0 0 0 0 0 5 0 0 1 4 0 0 1 2 3 4 6))
@@ -325,9 +323,9 @@
(|EltableAggregate| 34 6) (|Evalable| 6)
(|SetCategory|) (|Type|)
(|Eltable| 34 6) (|InnerEvalable| 6 6)
- (|CoercibleTo| 58) (|ConvertibleTo| 39)
+ (|CoercibleTo| 57) (|ConvertibleTo| 38)
(|BasicType|) (|OpenMath|))
- (|makeByteWordVec2| 44
+ (|makeByteWordVec2| 43
'(1 13 12 0 14 3 13 12 0 15 15 16 3 6
12 13 0 8 17 1 13 12 0 18 0 19 0 20 2
13 0 15 19 21 1 13 12 0 22 1 13 12 0
@@ -335,12 +333,12 @@
8 26 2 0 12 13 0 27 3 0 12 13 0 8 28
2 0 0 0 0 29 1 0 0 0 30 2 0 0 0 0 31
2 0 8 6 0 32 2 0 0 0 0 33 2 0 6 0 34
- 35 2 0 0 0 0 36 1 37 0 15 38 1 39 0
- 37 40 1 6 39 0 41 1 39 0 42 43 1 0 39
- 0 44 2 8 0 0 0 31 2 8 0 0 0 33 2 8 0
- 0 0 36 1 8 0 0 30 1 0 8 0 9 0 0 0 7 2
- 8 8 6 0 32 2 0 6 0 34 35 1 3 39 0 44
- 2 0 0 6 0 10 2 0 0 0 0 29 2 0 0 0 0
- 11 3 6 12 13 0 8 28 2 6 12 13 0 27 1
- 6 15 0 25 2 6 15 0 8 26)))))
+ 35 2 0 0 0 0 36 1 38 0 37 39 1 6 38 0
+ 40 1 38 0 41 42 1 0 38 0 43 2 8 0 0 0
+ 31 2 8 0 0 0 33 2 8 0 0 0 36 1 8 0 0
+ 30 1 0 8 0 9 0 0 0 7 2 8 8 6 0 32 2 0
+ 6 0 34 35 1 3 38 0 43 2 0 0 6 0 10 2
+ 0 0 0 0 29 2 0 0 0 0 11 3 6 12 13 0 8
+ 28 2 6 12 13 0 27 1 6 15 0 25 2 6 15
+ 0 8 26)))))
'|lookupIncomplete|))
diff --git a/src/algebra/strap/VECTOR.lsp b/src/algebra/strap/VECTOR.lsp
index e7fae836..f7ad2d7f 100644
--- a/src/algebra/strap/VECTOR.lsp
+++ b/src/algebra/strap/VECTOR.lsp
@@ -12,11 +12,10 @@
(DEFUN |VECTOR;convert;$If;2| (|x| $)
(SPADCALL
- (LIST (SPADCALL (SPADCALL "vector" (|getShellEntry| $ 12))
- (|getShellEntry| $ 14))
- (SPADCALL (SPADCALL |x| (|getShellEntry| $ 15))
- (|getShellEntry| $ 16)))
- (|getShellEntry| $ 18)))
+ (LIST (SPADCALL '|vector| (|getShellEntry| $ 12))
+ (SPADCALL (SPADCALL |x| (|getShellEntry| $ 13))
+ (|getShellEntry| $ 14)))
+ (|getShellEntry| $ 16)))
(DEFUN |Vector| (#0=#:G1408)
(PROG ()
@@ -41,7 +40,7 @@
(PROGN
(LETT |dv$1| (|devaluate| |#1|) . #0=(|Vector|))
(LETT |dv$| (LIST '|Vector| |dv$1|) . #0#)
- (LETT $ (|newShell| 36) . #0#)
+ (LETT $ (|newShell| 35) . #0#)
(|setShellEntry| $ 0 |dv$|)
(|setShellEntry| $ 3
(LETT |pv$|
@@ -90,23 +89,23 @@
(|setShellEntry| $ 6 |#1|)
(COND
((|testBitVector| |pv$| 3)
- (|setShellEntry| $ 19
+ (|setShellEntry| $ 17
(CONS (|dispatchFunction| |VECTOR;convert;$If;2|) $))))
$))))
(MAKEPROP '|Vector| '|infovec|
(LIST '#(NIL NIL NIL NIL NIL (|IndexedVector| 6 (NRTEVAL 1))
(|local| |#1|) (|List| 6) (0 . |construct|)
- |VECTOR;vector;L$;1| (|String|) (|Symbol|) (5 . |coerce|)
- (|InputForm|) (10 . |convert|) (15 . |parts|)
- (20 . |convert|) (|List| $) (25 . |convert|)
- (30 . |convert|) (|Mapping| 6 6 6) (|Boolean|)
- (|NonNegativeInteger|) (|Equation| 6) (|List| 23)
- (|Integer|) (|Mapping| 21 6) (|Mapping| 21 6 6)
- (|UniversalSegment| 25) (|Void|) (|Mapping| 6 6)
- (|OutputForm|) (|Matrix| 6) (|SingleInteger|)
- (|Union| 6 '"failed") (|List| 25))
- '#(|vector| 35 |parts| 40 |convert| 45 |construct| 50)
+ |VECTOR;vector;L$;1| (|Symbol|) (|InputForm|)
+ (5 . |convert|) (10 . |parts|) (15 . |convert|) (|List| $)
+ (20 . |convert|) (25 . |convert|) (|Mapping| 6 6 6)
+ (|Boolean|) (|NonNegativeInteger|) (|Equation| 6)
+ (|List| 21) (|Integer|) (|Mapping| 19 6)
+ (|Mapping| 19 6 6) (|UniversalSegment| 23) (|Void|)
+ (|Mapping| 6 6) (|OutputForm|) (|Matrix| 6)
+ (|SingleInteger|) (|String|) (|Union| 6 '"failed")
+ (|List| 23))
+ '#(|vector| 30 |parts| 35 |convert| 40 |construct| 45)
'((|shallowlyMutable| . 0) (|finiteAggregate| . 0))
(CONS (|makeByteWordVec2| 5
'(0 0 0 0 0 0 0 5 0 0 1 4 0 0 1 2 3 4))
@@ -122,18 +121,18 @@
(|OneDimensionalArrayAggregate| 6)
(|FiniteLinearAggregate| 6)
(|LinearAggregate| 6)
- (|IndexedAggregate| 25 6)
+ (|IndexedAggregate| 23 6)
(|Collection| 6)
(|HomogeneousAggregate| 6)
(|OrderedSet|) (|Aggregate|)
- (|EltableAggregate| 25 6) (|Evalable| 6)
+ (|EltableAggregate| 23 6) (|Evalable| 6)
(|SetCategory|) (|Type|)
- (|Eltable| 25 6) (|InnerEvalable| 6 6)
- (|CoercibleTo| 31) (|ConvertibleTo| 13)
+ (|Eltable| 23 6) (|InnerEvalable| 6 6)
+ (|CoercibleTo| 29) (|ConvertibleTo| 11)
(|BasicType|))
- (|makeByteWordVec2| 19
- '(1 0 0 7 8 1 11 0 10 12 1 13 0 11 14 1
- 0 7 0 15 1 7 13 0 16 1 13 0 17 18 1 0
- 13 0 19 1 0 0 7 9 1 0 7 0 15 1 3 13 0
- 19 1 0 0 7 8)))))
+ (|makeByteWordVec2| 17
+ '(1 0 0 7 8 1 11 0 10 12 1 0 7 0 13 1 7
+ 11 0 14 1 11 0 15 16 1 0 11 0 17 1 0
+ 0 7 9 1 0 7 0 13 1 3 11 0 17 1 0 0 7
+ 8)))))
'|lookupIncomplete|))
diff --git a/src/algebra/transsolve.spad.pamphlet b/src/algebra/transsolve.spad.pamphlet
index e9071b02..d3c23777 100644
--- a/src/algebra/transsolve.spad.pamphlet
+++ b/src/algebra/transsolve.spad.pamphlet
@@ -196,7 +196,7 @@ TransSolvePackage(R) : Exports == Implementation where
-- This function was suggested by Manuel Bronstein as a simpler
-- alternative to normalize.
simplifyingLog(f:RE):RE ==
- (u:=isExpt(f,"exp"::Symbol)) case Record(var:Kernel RE,exponent:Integer) =>
+ (u:=isExpt(f,'exp)) case Record(var:Kernel RE,exponent:Integer) =>
rec := u::Record(var:Kernel RE,exponent:Integer)
rec.exponent * first argument(rec.var)
log f
@@ -412,46 +412,46 @@ TransSolvePackage(R) : Exports == Implementation where
error "This should never happen"
funcinv(k:RE,l:RE) : Union(RE,"failed") ==
- is?(k, "sin"::Symbol) => asin(l)
- is?(k, "cos"::Symbol) => acos(l)
- is?(k, "tan"::Symbol) => atan(l)
- is?(k, "cot"::Symbol) => acot(l)
- is?(k, "sec"::Symbol) =>
+ is?(k,'sin) => asin(l)
+ is?(k,'cos) => acos(l)
+ is?(k,'tan) => atan(l)
+ is?(k,'cot) => acot(l)
+ is?(k,'sec) =>
l = 0 => "failed"
asec(l)
- is?(k, "csc"::Symbol) =>
+ is?(k,'csc) =>
l = 0 => "failed"
acsc(l)
- is?(k, "sinh"::Symbol) => asinh(l)
- is?(k, "cosh"::Symbol) => acosh(l)
- is?(k, "tanh"::Symbol) => atanh(l)
- is?(k, "coth"::Symbol) => acoth(l)
- is?(k, "sech"::Symbol) => asech(l)
- is?(k, "csch"::Symbol) => acsch(l)
- is?(k, "atan"::Symbol) => tan(l)
- is?(k, "acot"::Symbol) =>
+ is?(k,'sinh) => asinh(l)
+ is?(k,'cosh) => acosh(l)
+ is?(k,'tanh) => atanh(l)
+ is?(k,'coth) => acoth(l)
+ is?(k,'sech) => asech(l)
+ is?(k,'csch) => acsch(l)
+ is?(k,'atan) => tan(l)
+ is?(k,'acot) =>
l = 0 => "failed"
cot(l)
- is?(k, "asin"::Symbol) => sin(l)
- is?(k, "acos"::Symbol) => cos(l)
- is?(k, "asec"::Symbol) => sec(l)
- is?(k, "acsc"::Symbol) =>
+ is?(k,'asin) => sin(l)
+ is?(k,'acos) => cos(l)
+ is?(k,'asec) => sec(l)
+ is?(k,'acsc) =>
l = 0 => "failed"
csc(l)
- is?(k, "asinh"::Symbol) => sinh(l)
- is?(k, "acosh"::Symbol) => cosh(l)
- is?(k, "atanh"::Symbol) => tanh(l)
- is?(k, "acoth"::Symbol) =>
+ is?(k,'asinh) => sinh(l)
+ is?(k,'acosh) => cosh(l)
+ is?(k,'atanh) => tanh(l)
+ is?(k,'acoth) =>
l = 0 => "failed"
coth(l)
- is?(k, "asech"::Symbol) => sech(l)
- is?(k, "acsch"::Symbol) =>
+ is?(k,'asech) => sech(l)
+ is?(k,'acsch) =>
l = 0 => "failed"
csch(l)
- is?(k, "exp"::Symbol) =>
+ is?(k,'exp) =>
l = 0 => "failed"
simplifyingLog l
- is?(k, "log"::Symbol) =>
+ is?(k,'log) =>
if R has complex and R has ConvertibleTo(C F) then
-- We will check to see if the imaginary part lies in [-Pi,Pi)
ze : Expression C INT F
@@ -464,7 +464,7 @@ TransSolvePackage(R) : Exports == Implementation where
"failed"
else -- R not Complex or something which doesn't map to Complex Floats
exp l
- is?(k, "%power"::Symbol) =>
+ is?(k,'%power) =>
(t:=normalize(l)) = 0 => "failed"
log t
l
@@ -652,6 +652,8 @@ TransSolvePackageService(R) : Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
diff --git a/src/algebra/vector.spad.pamphlet b/src/algebra/vector.spad.pamphlet
index 97f743b5..1696e4e4 100644
--- a/src/algebra/vector.spad.pamphlet
+++ b/src/algebra/vector.spad.pamphlet
@@ -150,7 +150,7 @@ Vector(R:Type): Exports == Implementation where
vector l == construct l
if R has ConvertibleTo InputForm then
convert(x:%):InputForm ==
- convert [convert("vector"::Symbol)@InputForm,
+ convert [convert('vector)@InputForm,
convert(parts x)@InputForm]
@
@@ -460,6 +460,8 @@ DirectProductFunctions2(dim, A, B): Exports == Implementation where
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
+--Copyright (C) 2007-2009, Gabriel Dos Reis.
+--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are