aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-05-18 19:07:55 +0000
committerdos-reis <gdr@axiomatics.org>2008-05-18 19:07:55 +0000
commit01d9be9999622400347af560b28c9a2284950449 (patch)
tree512b3e5a03b928187d6ffa7549a9195f4f396e1b /src/algebra
parent0e24179347ef7fd64e624e6fa5b4592e9ab6fc87 (diff)
downloadopen-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/algebra')
-rw-r--r--src/algebra/vector.spad.pamphlet2
1 files changed, 2 insertions, 0 deletions
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