From 01d9be9999622400347af560b28c9a2284950449 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 18 May 2008 19:07:55 +0000 Subject: 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. --- src/algebra/vector.spad.pamphlet | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/algebra/vector.spad.pamphlet') 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 -- cgit v1.2.3