diff options
author | dos-reis <gdr@axiomatics.org> | 2009-05-15 16:47:28 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-05-15 16:47:28 +0000 |
commit | 530c1ee0f24568ecb6d61c3ce2c7af1863595fdf (patch) | |
tree | aa2766372d474b05b0f7749c35829c52c328369b /src/algebra/op.spad.pamphlet | |
parent | d9fed70309979e063c16c35be9756c4ce76b2136 (diff) | |
download | open-axiom-530c1ee0f24568ecb6d61c3ce2c7af1863595fdf.tar.gz |
* algebra/expr.spad.pamphlet (FunctionSpaceAttachPredicates): Tidy.
(FunctionSpaceAssertions): Likewise.
* algebra/op.spad.pamphlet (BasicOperator): Tidy.
(CommonOperators): Likewise.
Diffstat (limited to 'src/algebra/op.spad.pamphlet')
-rw-r--r-- | src/algebra/op.spad.pamphlet | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/algebra/op.spad.pamphlet b/src/algebra/op.spad.pamphlet index 617ea416..54f8639c 100644 --- a/src/algebra/op.spad.pamphlet +++ b/src/algebra/op.spad.pamphlet @@ -88,6 +88,8 @@ BasicOperator(): Exports == Implementation where ++ is?(op, s) tests if the name of op is s. has? : ($, String) -> Boolean ++ has?(op, s) tests if property s is attached to op. + has? : (%, Identifier) -> Boolean + ++ \spad{has?(op,p)} tests if property \spad{s} is attached to \spad{op}. assert : ($, String) -> $ ++ assert(op, s) attaches property s to op. ++ Argument op is modified "in place", i.e. no copy is made. @@ -99,7 +101,7 @@ BasicOperator(): Exports == Implementation where ++ Argument op is modified "in place", i.e. no copy is made. deleteProperty!: ($, Identifier) -> $ ++ \spad{deleteProperty!(op, p)} unattaches property \spad{p} from - ++ \spad{op}. Argument \spad}op} is modified "in place", + ++ \spad{op}. Argument \spad{op} is modified "in place", ++ i.e. no copy is made. property : ($, String) -> Union(None, "failed") ++ property(op, s) returns the value of property s if @@ -140,7 +142,8 @@ BasicOperator(): Exports == Implementation where otherwise => nothing assert(op: %, s: String) == setProperty(op, s, NIL$Lisp) assert(op: %, p: Identifier) == setProperty(op, p, NIL$Lisp) - has?(op, name) == key?(name, rep(op).props) + has?(op: %, name: String) == key?(name, rep(op).props) + has?(op: %, name: Identifier) == key?(STRING(name)$Lisp, rep(op).props) weight(op, n) == setProperty(op, WEIGHT, n pretend None) nullary? op == zero? rep(op).narg unary? op == one? rep(op).narg @@ -346,11 +349,6 @@ BasicOperatorFunctions1(A:SetCategory): Exports == Implementation where CommonOperators(): Exports == Implementation where OP ==> BasicOperator O ==> OutputForm - POWER ==> '%power - ALGOP ==> "%alg" - EVEN ==> "even" - ODD ==> "odd" - DUMMYVAR ==> "%dummyVar" Exports ==> with operator: Symbol -> OP @@ -359,6 +357,11 @@ CommonOperators(): Exports == Implementation where ++ the result has no semantics. Implementation ==> add + macro POWER == '%power + macro ALGOP == '%alg + macro EVEN == 'even + macro ODD == 'odd + DUMMYVAR ==> "%dummyVar" dpi : List O -> O dgamma : List O -> O dquote : List O -> O @@ -498,20 +501,19 @@ CommonOperators(): Exports == Implementation where 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) + 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 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") - void + assert(oppren, 'linear) @ \section{License} |