diff options
-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 + @ |