aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
authorGabriel Dos Reis <gdr@axiomatics.org>2016-01-22 08:25:59 -0800
committerGabriel Dos Reis <gdr@axiomatics.org>2016-01-22 08:25:59 -0800
commit7b6b9b1e80d0fe90a9009864f107735d244aa0d7 (patch)
treef1c17e82882d683f13a60ba64ae75f14ec4b529a /src/algebra
parentbb57192d02a82f2236857bcbd2accca4f01f4395 (diff)
downloadopen-axiom-7b6b9b1e80d0fe90a9009864f107735d244aa0d7.tar.gz
Remove antiquated syntax for operator declaration.
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/defaults.spad.pamphlet8
-rw-r--r--src/algebra/naalgc.spad.pamphlet2
-rw-r--r--src/algebra/polycat.spad.pamphlet2
-rw-r--r--src/algebra/solvefor.spad.pamphlet4
-rw-r--r--src/algebra/wtpol.spad.pamphlet2
5 files changed, 7 insertions, 11 deletions
diff --git a/src/algebra/defaults.spad.pamphlet b/src/algebra/defaults.spad.pamphlet
index 490ae98a..5f9ca825 100644
--- a/src/algebra/defaults.spad.pamphlet
+++ b/src/algebra/defaults.spad.pamphlet
@@ -19,14 +19,12 @@
RepeatedSquaring(S): Exports == Implementation where
S: SetCategory with
- "*":(%,%)->%
+ *: (%,%)->%
++ x*y returns the product of x and y
Exports == with
expt: (S,PositiveInteger) -> S
++ expt(r, i) computes r**i by repeated squaring
Implementation == add
- x: S
- n: PositiveInteger
expt(x, n) ==
one? n => x
odd?(n)$Integer=> x * expt(x*x,shift(n,-1) pretend PositiveInteger)
@@ -44,14 +42,12 @@ RepeatedSquaring(S): Exports == Implementation where
RepeatedDoubling(S):Exports ==Implementation where
S: SetCategory with
- "+":(%,%)->%
+ +: (%,%)->%
++ x+y returns the sum of x and y
Exports == with
double: (PositiveInteger,S) -> S
++ double(i, r) multiplies r by i using repeated doubling.
Implementation == add
- x: S
- n: PositiveInteger
double(n,x) ==
one? n => x
odd?(n)$Integer =>
diff --git a/src/algebra/naalgc.spad.pamphlet b/src/algebra/naalgc.spad.pamphlet
index 3f85f7ef..145580f9 100644
--- a/src/algebra/naalgc.spad.pamphlet
+++ b/src/algebra/naalgc.spad.pamphlet
@@ -93,7 +93,7 @@ MonadWithUnit(): Category == Monad with
++ leftPower(a,n) returns the \spad{n}-th left power of \spad{a},
++ i.e. \spad{leftPower(a,n) := a * leftPower(a,n-1)} and
++ \spad{leftPower(a,0) := 1}.
- "**": (%,NonNegativeInteger) -> %
+ **: (%,NonNegativeInteger) -> %
++ \spad{a**n} returns the \spad{n}-th power of \spad{a},
++ defined by repeated squaring.
recip: % -> Union(%,"failed")
diff --git a/src/algebra/polycat.spad.pamphlet b/src/algebra/polycat.spad.pamphlet
index b9780274..4f0d80dd 100644
--- a/src/algebra/polycat.spad.pamphlet
+++ b/src/algebra/polycat.spad.pamphlet
@@ -50,7 +50,7 @@ AbelianMonoidRing(R:Ring, E:OrderedAbelianMonoid): Category ==
coefficient: (%,E) -> R
++ coefficient(p,e) extracts the coefficient of the monomial with
++ exponent e from polynomial p, or returns zero if exponent is not present.
- if R has Field then "/": (%,R) -> %
+ if R has Field then /: (%,R) -> %
++ p/c divides p by the coefficient c.
if R has CommutativeRing then
CommutativeRing
diff --git a/src/algebra/solvefor.spad.pamphlet b/src/algebra/solvefor.spad.pamphlet
index 6d072ae8..2d335fcb 100644
--- a/src/algebra/solvefor.spad.pamphlet
+++ b/src/algebra/solvefor.spad.pamphlet
@@ -12,7 +12,7 @@
\section{package SOLVEFOR PolynomialSolveByFormulas}
<<package SOLVEFOR PolynomialSolveByFormulas>>=
)abbrev package SOLVEFOR PolynomialSolveByFormulas
--- Current fields with "**": (%, RationalNumber) -> % are
+-- Current fields with **: (%, RationalNumber) -> % are
-- ComplexFloat, RadicalExtension(K) and RationalRadical
-- SMW June 86, BMT Sept 93
++ Description:
@@ -24,7 +24,7 @@
PolynomialSolveByFormulas(UP, F): PSFcat == PSFdef where
UP: UnivariatePolynomialCategory F
- F: Field with "**": (%, Fraction Integer) -> %
+ F: Field with **: (%, Fraction Integer) -> %
L ==> List
diff --git a/src/algebra/wtpol.spad.pamphlet b/src/algebra/wtpol.spad.pamphlet
index 6f3dca56..3893ae48 100644
--- a/src/algebra/wtpol.spad.pamphlet
+++ b/src/algebra/wtpol.spad.pamphlet
@@ -42,7 +42,7 @@ WeightedPolynomials(R:Ring,VarSet: OrderedSet, E:OrderedAbelianMonoidSup,
wtlevel:NonNegativeInteger):
Join(Ring, HomotopicTo P) with
if R has CommutativeRing then Algebra(R)
- if R has Field then "/": ($,$) -> Union($,"failed")
+ if R has Field then /: ($,$) -> Union($,"failed")
++ x/y division (only works if minimum weight
++ of divisor is zero, and if R is a Field)
changeWeightLevel: NonNegativeInteger -> Void