diff options
author | dos-reis <gdr@axiomatics.org> | 2009-09-21 22:23:57 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-09-21 22:23:57 +0000 |
commit | 8e4e9304074fff69226b86bdc16cfd617115cd99 (patch) | |
tree | 63a82e4a99089dd325f35bac6bc86467e3f989d3 /src/algebra | |
parent | 31cfd568a21d4187e3ac8e19439fa59e69273619 (diff) | |
download | open-axiom-8e4e9304074fff69226b86bdc16cfd617115cd99.tar.gz |
* algebra/data.spad.pamphlet (SystemInteger): Tidy.
* algebra/integer.spad.pamphlet (Integer): Likewise.
* algebra/si.spad.pamphlet (IntegerNumberSystem): Likewise.
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/data.spad.pamphlet | 2 | ||||
-rw-r--r-- | src/algebra/integer.spad.pamphlet | 4 | ||||
-rw-r--r-- | src/algebra/si.spad.pamphlet | 2 |
3 files changed, 2 insertions, 6 deletions
diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet index e5de8656..7ad3e7bb 100644 --- a/src/algebra/data.spad.pamphlet +++ b/src/algebra/data.spad.pamphlet @@ -107,7 +107,7 @@ SystemInteger(N: PositiveInteger): Public == Private where size() == (rep max - rep min + 1)::NonNegativeInteger index i == per (i + rep min - 1) lookup x == (rep x - rep min + 1)::PositiveInteger - random() == per(random()$Integer rem rep max) + random() == per random(rep max())$Integer @ diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet index d8180ed4..a0a962f7 100644 --- a/src/algebra/integer.spad.pamphlet +++ b/src/algebra/integer.spad.pamphlet @@ -71,8 +71,6 @@ IntegerSolveLinearPolynomialEquation(): C ==T ++ integers. Integer: Join(IntegerNumberSystem, ConvertibleTo String, OpenMath) with - random : % -> % - ++ random(n) returns a random integer from 0 to \spad{n-1}. canonical ++ mathematical equality is data structure equality. canonicalsClosed @@ -266,8 +264,6 @@ NonNegativeInteger: Join(OrderedAbelianMonoidSup,Monoid) with ++ if b is zero or \spad{a} rem b is zero. shift: (%, Integer) -> % ++ shift(a,i) shift \spad{a} by i bits. - random : % -> % - ++ random(n) returns a random integer from 0 to \spad{n-1}. commutative("*") ++ commutative("*") means multiplication is commutative : \spad{x*y = y*x}. diff --git a/src/algebra/si.spad.pamphlet b/src/algebra/si.spad.pamphlet index e0cd68b1..0fca5bd1 100644 --- a/src/algebra/si.spad.pamphlet +++ b/src/algebra/si.spad.pamphlet @@ -58,7 +58,7 @@ IntegerNumberSystem(): Category == random : () -> % ++ random() creates a random element. random : % -> % - ++ random(a) creates a random element from 0 to \spad{n-1}. + ++ random(a) creates a random element from 0 to \spad{a-1}. copy : % -> % ++ copy(n) gives a copy of n. inc : % -> % |