diff options
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/algebra/vector.spad.pamphlet | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5162aa12..37c65fcd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2008-05-18 Bill Page <bill.page@newsynthesis.org> + + Fix AW/117 + * algebra/vector.spad.pamphlet (DirectProductCategory): Also a + Monoid is base type belongs to Monoid. + (DirectProduct): Implement multiplication is base type belongs to + Monoid. + 2008-05-18 Gabriel Dos Reis <gdr@cs.tamu.edu> Fix AW/221 diff --git a/src/algebra/vector.spad.pamphlet b/src/algebra/vector.spad.pamphlet index 481ea5cc..d580afe1 100644 --- a/src/algebra/vector.spad.pamphlet +++ b/src/algebra/vector.spad.pamphlet @@ -400,6 +400,7 @@ DirectProductCategory(dim:NonNegativeInteger, R:Type): Category == if R has AbelianSemiGroup then AbelianSemiGroup if R has CancellationAbelianMonoid then CancellationAbelianMonoid if R has Monoid then + Monoid _* : (R, %) -> % ++ r * y multiplies the element r times each component of the ++ vector y. @@ -511,6 +512,7 @@ DirectProduct(dim:NonNegativeInteger, R:Type): 1 == new(dim, 1)$Vector(R) pretend % u:% * r:R == map(#1 * r, u) r:R * u:% == map(r * #1, u) + x:% * y:% == [x.i * y.i for i in 1..dim]$Vector(R) pretend % if R has CancellationAbelianMonoid then |