diff options
author | dos-reis <gdr@axiomatics.org> | 2008-05-18 19:07:55 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2008-05-18 19:07:55 +0000 |
commit | 01d9be9999622400347af560b28c9a2284950449 (patch) | |
tree | 512b3e5a03b928187d6ffa7549a9195f4f396e1b /src | |
parent | 0e24179347ef7fd64e624e6fa5b4592e9ab6fc87 (diff) | |
download | open-axiom-01d9be9999622400347af560b28c9a2284950449.tar.gz |
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.
Diffstat (limited to 'src')
-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 |