diff options
author | dos-reis <gdr@axiomatics.org> | 2013-05-10 10:16:13 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2013-05-10 10:16:13 +0000 |
commit | 087ef557a5826b106ea3a8a568ebd74a6ca31e5d (patch) | |
tree | fc9ef6d6c2d05069095f38c7b9f67016b5b7d49b /src/algebra/indexedp.spad.pamphlet | |
parent | 0f2fe8a37ab42191fa2b871e0ce8bd05c701eed7 (diff) | |
download | open-axiom-087ef557a5826b106ea3a8a568ebd74a6ca31e5d.tar.gz |
* algebra/indexedp.spad.pamphlet
(IndexedDirectProductOrderedAbelianMonoid) [<]: Rewrite iteratively.
Diffstat (limited to 'src/algebra/indexedp.spad.pamphlet')
-rw-r--r-- | src/algebra/indexedp.spad.pamphlet | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/algebra/indexedp.spad.pamphlet b/src/algebra/indexedp.spad.pamphlet index c296f271..ad4ae9c8 100644 --- a/src/algebra/indexedp.spad.pamphlet +++ b/src/algebra/indexedp.spad.pamphlet @@ -249,18 +249,21 @@ IndexedDirectProductAbelianMonoid(A:AbelianMonoid,S:OrderedType): IndexedDirectProductOrderedAbelianMonoid(A:OrderedAbelianMonoid,S:OrderedType): Join(OrderedAbelianMonoid,IndexedDirectProductCategory(A,S)) == IndexedDirectProductAbelianMonoid(A,S) add - --representations - Term:= Record(k:S,c:A) - Rep:= List Term - x,y: % x<y == - empty? y => false - empty? x => true -- note careful order of these two lines - y.first.k > x.first.k => true - y.first.k < x.first.k => false - y.first.c > x.first.c => true - y.first.c < x.first.c => false - x.rest < y.rest + u := terms x + v := terms y + repeat + -- note careful order of next two lines + empty? v => return false + empty? u => return true + xt := first u + yt := first v + index xt < index yt => return true + index yt < index xt => return false + coefficient xt < coefficient yt => return true + coefficient yt < coefficient xt => return false + u := rest u + v := rest v @ \section{domain IDPOAMS IndexedDirectProductOrderedAbelianMonoidSup} |