diff options
author | dos-reis <gdr@axiomatics.org> | 2009-06-11 23:00:40 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-06-11 23:00:40 +0000 |
commit | 9e07dcd91c45bf8b22d932321f5c97e931ffe8ac (patch) | |
tree | 6d2174e90e5779b1b3ab4ae7df3ae6603b66c6c2 /src/algebra/cra.spad.pamphlet | |
parent | 7bd82b57975bbc1ff5b87fed0739815c620ecdcc (diff) | |
download | open-axiom-9e07dcd91c45bf8b22d932321f5c97e931ffe8ac.tar.gz |
* algebra/: Don't quote '!' at end of names.
Diffstat (limited to 'src/algebra/cra.spad.pamphlet')
-rw-r--r-- | src/algebra/cra.spad.pamphlet | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/algebra/cra.spad.pamphlet b/src/algebra/cra.spad.pamphlet index b5bb6378..8b50ae68 100644 --- a/src/algebra/cra.spad.pamphlet +++ b/src/algebra/cra.spad.pamphlet @@ -37,31 +37,31 @@ CRApackage(R:EuclideanDomain): Exports == Implementation where -- Definition for modular reduction mapping with several moduli modTree(a,lm) == t := balancedBinaryTree(#lm, 0$R) - setleaves_!(t,lm) - mapUp_!(t,"*") - leaves mapDown_!(t, a, "rem") + setleaves!(t,lm) + mapUp!(t,"*") + leaves mapDown!(t, a, "rem") chineseRemainder(lv:List(R), lm:List(R)):R == #lm ~= #lv => error "lists of moduli and values not of same length" x := balancedBinaryTree(#lm, 0$R) - x := setleaves_!(x, lm) - mapUp_!(x,"*") + x := setleaves!(x, lm) + mapUp!(x,"*") y := balancedBinaryTree(#lm, 1$R) - y := mapUp_!(copy y,x,#1 * #4 + #2 * #3) + y := mapUp!(copy y,x,#1 * #4 + #2 * #3) (u := extendedEuclidean(value y, value x,1)) case "failed" => error "moduli not relatively prime" inv := u . coef1 linv := modTree(inv, lm) l := [(u*v) rem m for v in lv for u in linv for m in lm] - y := setleaves_!(y,l) - value(mapUp_!(y, x, #1 * #4 + #2 * #3)) rem value(x) + y := setleaves!(y,l) + value(mapUp!(y, x, #1 * #4 + #2 * #3)) rem value(x) chineseRemainder(llv:List List(R), lm:List(R)):List(R) == x := balancedBinaryTree(#lm, 0$R) - x := setleaves_!(x, lm) - mapUp_!(x,"*") + x := setleaves!(x, lm) + mapUp!(x,"*") y := balancedBinaryTree(#lm, 1$R) - y := mapUp_!(copy y,x,#1 * #4 + #2 * #3) + y := mapUp!(copy y,x,#1 * #4 + #2 * #3) (u := extendedEuclidean(value y, value x,1)) case "failed" => error "moduli not relatively prime" inv := u . coef1 @@ -81,9 +81,9 @@ CRApackage(R:EuclideanDomain): Exports == Implementation where multiEuclideanTree(fl, rhs) == x := balancedBinaryTree(#fl, rhs) - x := setleaves_!(x, fl) - mapUp_!(x,"*") - leaves mapDown_!(x, rhs, extEuclidean) + x := setleaves!(x, fl) + mapUp!(x,"*") + leaves mapDown!(x, rhs, extEuclidean) @ \section{License} |