diff options
Diffstat (limited to 'src/algebra/op.spad.pamphlet')
-rw-r--r-- | src/algebra/op.spad.pamphlet | 136 |
1 files changed, 69 insertions, 67 deletions
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 |