diff options
author | dos-reis <gdr@axiomatics.org> | 2012-03-02 09:54:15 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2012-03-02 09:54:15 +0000 |
commit | 5bd0bc2d8d27b665b8aae65fee093adbd2172dd5 (patch) | |
tree | 507dd0acaeca45f2ecee35849ba0965fa85e7b46 /src | |
parent | 1b555159f3f2687fb937a12cec30383a440e9f5a (diff) | |
download | open-axiom-5bd0bc2d8d27b665b8aae65fee093adbd2172dd5.tar.gz |
* algebra/catdef.spad.pamphlet (MonoidOperation): Noew CoercibleTo
SemiGroupOperation T.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 5 | ||||
-rw-r--r-- | src/algebra/catdef.spad.pamphlet | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cfa1c262..f508f131 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2012-03-02 Gabriel Dos Reis <gdr@cse.tamu.edu> + + * algebra/catdef.spad.pamphlet (MonoidOperation): Noew CoercibleTo + SemiGroupOperation T. + 2012-02-27 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/nruncomp.boot (markOperation): New. diff --git a/src/algebra/catdef.spad.pamphlet b/src/algebra/catdef.spad.pamphlet index 997b4bba..8562e269 100644 --- a/src/algebra/catdef.spad.pamphlet +++ b/src/algebra/catdef.spad.pamphlet @@ -121,14 +121,17 @@ MonoidOperatorCategory(T: BasicType): Category == ++ Description: ++ This domain implements monoid operations. MonoidOperation(T: BasicType): Public == Private where - Public == Join(MonoidOperatorCategory T,SetCategory) with + Public == Join(MonoidOperatorCategory T,SetCategory,_ + CoercibleTo SemiGroupOperation T) with monoidOperation: ((T,T) -> T, T) -> % ++ \spad{monoidOperation(f,e)} constructs a operation from ++ the binary mapping \spad{f} with neutral value \spad{e}. - Private == Pair((T,T) -> T,T) add - monoidOperation(f,e) == per pair(f,e) + Private == Pair(SemiGroupOperation T,T) add + monoidOperation(f,e) == per pair(semiGroupOperation f,e) elt(op,x,y) == first(rep op)(x,y) neutralValue op == second rep op + coerce(f: %): SemiGroupOperation T == first rep f + @ |