aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog15
-rw-r--r--src/algebra/float.spad.pamphlet5
-rw-r--r--src/algebra/integer.spad.pamphlet4
-rw-r--r--src/algebra/misc.spad.pamphlet3
-rw-r--r--src/algebra/newpoint.spad.pamphlet26
-rw-r--r--src/algebra/seg.spad.pamphlet4
-rw-r--r--src/algebra/sex.spad.pamphlet16
7 files changed, 35 insertions, 38 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 297c7c21..06e5a89f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,18 @@
+2008-11-23 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * algebra/seg.spad.pamphlet (SegmentCategory): Extend
+ ConvertibleFrom S.
+ * algebra/newpoint.spad.pamphlet (PointCategory): Extend
+ ConvertibleFrom List R.
+ * algebra/misc.spad.pamphlet (SingletonAsOrderedSet): Now
+ ConvertibleTo Symbol.
+ * algebra/integer.spad.pamphlet (RomanNumeral): Now
+ ConvertibleFrom Symbol.
+ * algebra/float.spad.pamphlet (Float): Now ConvertibleFrom SF.
+ * algebra/sex.spad.pamphlet (SExpressionCategory): Extend
+ ConvertibleFrom Str, ConvertibleFrom Sym, ConvertibleFrom Int,
+ ConvertibleFrom Flt, ConvertibleFrom List %.
+
2008-11-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
* algebra/alql.spad.pamphlet (Database): Now CoercibleFrom List S.
diff --git a/src/algebra/float.spad.pamphlet b/src/algebra/float.spad.pamphlet
index 58606834..9e38598f 100644
--- a/src/algebra/float.spad.pamphlet
+++ b/src/algebra/float.spad.pamphlet
@@ -120,7 +120,8 @@ N ==> NonNegativeInteger
Float():
Join(FloatingPointSystem, DifferentialRing, ConvertibleTo String, OpenMath,_
- CoercibleTo DoubleFloat, TranscendentalFunctionCategory, ConvertibleTo InputForm) with
+ CoercibleTo DoubleFloat, TranscendentalFunctionCategory, _
+ ConvertibleTo InputForm,ConvertibleFrom SF) with
_/ : (%, I) -> %
++ x / i computes the division from x by an integer i.
_*_*: (%, %) -> %
@@ -151,8 +152,6 @@ Float():
++ log2(x) computes the logarithm for x to base 2.
log10: % -> %
++ log10(x) computes the logarithm for x to base 10.
- convert: SF -> %
- ++ convert(x) converts a \spadtype{DoubleFloat} x to a \spadtype{Float}.
outputFloating: () -> Void
++ outputFloating() sets the output mode to floating (scientific) notation, i.e.
++ \spad{mantissa * 10 exponent} is displayed as \spad{0.mantissa E exponent}.
diff --git a/src/algebra/integer.spad.pamphlet b/src/algebra/integer.spad.pamphlet
index 899a2b70..ad958900 100644
--- a/src/algebra/integer.spad.pamphlet
+++ b/src/algebra/integer.spad.pamphlet
@@ -323,15 +323,13 @@ PositiveInteger: Join(OrderedAbelianSemiGroup,Monoid) with
++ Keywords: roman numerals
++ Description: \spadtype{RomanNumeral} provides functions for converting
++ integers to roman numerals.
-RomanNumeral(): IntegerNumberSystem with
+RomanNumeral(): Join(IntegerNumberSystem,ConvertibleFrom Symbol) with
canonical
++ mathematical equality is data structure equality.
canonicalsClosed
++ two positives multiply to give positive.
noetherian
++ ascending chain condition on ideals.
- convert: Symbol -> %
- ++ convert(n) creates a roman numeral for symbol n.
roman : Symbol -> %
++ roman(n) creates a roman numeral for symbol n.
roman : Integer -> %
diff --git a/src/algebra/misc.spad.pamphlet b/src/algebra/misc.spad.pamphlet
index 86caa39b..6b2d907f 100644
--- a/src/algebra/misc.spad.pamphlet
+++ b/src/algebra/misc.spad.pamphlet
@@ -14,9 +14,8 @@
)abbrev domain SAOS SingletonAsOrderedSet
++ This trivial domain lets us build Univariate Polynomials
++ in an anonymous variable
-SingletonAsOrderedSet(): OrderedSet with
+SingletonAsOrderedSet(): Join(OrderedSet,ConvertibleTo Symbol) with
create:() -> %
- convert:% -> Symbol
== add
create() == "?" pretend %
a<b == false -- only one element
diff --git a/src/algebra/newpoint.spad.pamphlet b/src/algebra/newpoint.spad.pamphlet
index bd2b658e..b6479605 100644
--- a/src/algebra/newpoint.spad.pamphlet
+++ b/src/algebra/newpoint.spad.pamphlet
@@ -26,20 +26,18 @@
++ may be plotted via the graphics facilities. Functions are provided for
++ defining points and handling elements of points.
-PointCategory(R:Ring) : Category == VectorCategory(R) with
- point: List R -> %
- ++ point(l) returns a point category defined by a list l of elements from
- ++ the domain R.
- dimension: % -> PositiveInteger
- ++ dimension(s) returns the dimension of the point category s.
- convert: List R -> %
- ++ convert(l) takes a list of elements, l, from the domain Ring and
- ++ returns the form of point category.
- cross: (%,%) -> %
- ++ cross(p,q) computes the cross product of the two points \spad{p}
- ++ and \spad{q}. Error if the p and q are not 3 dimensional
- extend : (%,List R) -> %
- ++ extend(x,l,r) \undocumented
+PointCategory(R:Ring) : Category ==
+ Join(VectorCategory(R),ConvertibleFrom List R) with
+ point: List R -> %
+ ++ point(l) returns a point category defined by a list l of elements from
+ ++ the domain R.
+ dimension: % -> PositiveInteger
+ ++ dimension(s) returns the dimension of the point category s.
+ cross: (%,%) -> %
+ ++ cross(p,q) computes the cross product of the two points \spad{p}
+ ++ and \spad{q}. Error if the p and q are not 3 dimensional
+ extend : (%,List R) -> %
+ ++ extend(x,l,r) \undocumented
@
\section{domain POINT Point}
diff --git a/src/algebra/seg.spad.pamphlet b/src/algebra/seg.spad.pamphlet
index ac65684b..911cedb0 100644
--- a/src/algebra/seg.spad.pamphlet
+++ b/src/algebra/seg.spad.pamphlet
@@ -30,7 +30,7 @@ import Integer
++ This category provides operations on ranges, or {\em segments}
++ as they are called.
-SegmentCategory(S:Type): Category == Type with
+SegmentCategory(S:Type): Category == ConvertibleFrom S with
SEGMENT: (S, S) -> %
++ \spad{l..h} creates a segment with l and h as the endpoints.
BY: (%, Integer) -> %
@@ -54,8 +54,6 @@ SegmentCategory(S:Type): Category == Type with
++ Note: \spad{incr(l..h by n) = n}.
segment: (S, S) -> %
++ segment(i,j) is an alternate way to create the segment \spad{i..j}.
- convert: S -> %
- ++ convert(i) creates the segment \spad{i..i}.
@
diff --git a/src/algebra/sex.spad.pamphlet b/src/algebra/sex.spad.pamphlet
index 1175412e..0508df35 100644
--- a/src/algebra/sex.spad.pamphlet
+++ b/src/algebra/sex.spad.pamphlet
@@ -27,7 +27,9 @@
SExpressionCategory(Str, Sym, Int, Flt, Expr): Category == Decl where
Str, Sym, Int, Flt, Expr: SetCategory
- Decl ==> SetCategory with
+ Decl == Join(SetCategory,ConvertibleFrom Str, ConvertibleFrom Sym,_
+ ConvertibleFrom Int, ConvertibleFrom Flt,_
+ ConvertibleFrom Flt, ConvertibleFrom List %) with
eq: (%,%) -> Boolean
++ eq(s, t) is true if EQ(s,t) is true in Lisp.
null?: % -> Boolean
@@ -63,18 +65,6 @@ SExpressionCategory(Str, Sym, Int, Flt, Expr): Category == Decl where
expr: % -> Expr
++ expr(s) returns s as an element of Expr;
++ Error: if s is not an atom that also belongs to Expr.
- convert: List % -> %
- ++ convert([a1,...,an]) returns the S-expression \spad{(a1,...,an)}.
- convert: Str -> %
- ++ convert(x) returns the Lisp atom x;
- convert: Sym -> %
- ++ convert(x) returns the Lisp atom x.
- convert: Int -> %
- ++ convert(x) returns the Lisp atom x.
- convert: Flt -> %
- ++ convert(x) returns the Lisp atom x.
- convert: Expr -> %
- ++ convert(x) returns the Lisp atom x.
car: % -> %
++ car((a1,...,an)) returns a1.
cdr: % -> %