aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-11-20 20:05:35 +0000
committerdos-reis <gdr@axiomatics.org>2008-11-20 20:05:35 +0000
commit003d8009ff08ef11901956ac887422cea0cc4b55 (patch)
tree490f1f62576c12798021f11af19bea21f8cc579a /src
parent87f397a2fabcf265efb39d1be4c2b87633579e19 (diff)
downloadopen-axiom-003d8009ff08ef11901956ac887422cea0cc4b55.tar.gz
* algebra/wtpol.spad.pamphlet (WeightedPolynomials): No
HomotopicTo P. (OrdinaryWeightedPolynomials): Likewise. * algebra/modmonom.spad.pamphlet (ModuleMonomial): Now HomotopicTo MM. * algebra/matrix.spad.pamphlet (coerce$RectangularMatrix): Remove redundant signature. * algebra/lodop.spad.pamphlet (OrdinaryDifferentialRing): Now HomotopicTo HomotopicTo R. * algebra/alql.spad.pamphlet (DataList): Now HomotopicTo List S. * algebra/array1.spad.pamphlet (Tuple): Now HomotopicTo PrimitiveArray S. * algebra/kl.spad.pamphlet (CachableSet): Now HomotopicTo S. * algebra/java.spad.pamphlet (JavaBytecode): Now HomotopicTo Byte. * algebra/fname.spad.pamphlet (FileNameCategory): Extends HomotopicTo String. * algebra/data.spad.pamphlet (Byte): Now HomotopicTo Character.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog20
-rw-r--r--src/algebra/Makefile.in7
-rw-r--r--src/algebra/Makefile.pamphlet7
-rw-r--r--src/algebra/alql.spad.pamphlet6
-rw-r--r--src/algebra/array1.spad.pamphlet4
-rw-r--r--src/algebra/data.spad.pamphlet5
-rw-r--r--src/algebra/fname.spad.pamphlet10
-rw-r--r--src/algebra/java.spad.pamphlet7
-rw-r--r--src/algebra/kl.spad.pamphlet7
-rw-r--r--src/algebra/lodop.spad.pamphlet6
-rw-r--r--src/algebra/matrix.spad.pamphlet3
-rw-r--r--src/algebra/modmonom.spad.pamphlet6
-rw-r--r--src/algebra/strap/DFLOAT.lsp14
-rw-r--r--src/algebra/strap/INT.lsp10
-rw-r--r--src/algebra/strap/SINT.lsp9
-rw-r--r--src/algebra/wtpol.spad.pamphlet13
16 files changed, 56 insertions, 78 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 75128c99..72b59787 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,25 @@
2008-11-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+ * algebra/wtpol.spad.pamphlet (WeightedPolynomials): No
+ HomotopicTo P.
+ (OrdinaryWeightedPolynomials): Likewise.
+ * algebra/modmonom.spad.pamphlet (ModuleMonomial): Now
+ HomotopicTo MM.
+ * algebra/matrix.spad.pamphlet (coerce$RectangularMatrix): Remove
+ redundant signature.
+ * algebra/lodop.spad.pamphlet (OrdinaryDifferentialRing): Now
+ HomotopicTo HomotopicTo R.
+ * algebra/alql.spad.pamphlet (DataList): Now HomotopicTo List S.
+ * algebra/array1.spad.pamphlet (Tuple): Now HomotopicTo
+ PrimitiveArray S.
+ * algebra/kl.spad.pamphlet (CachableSet): Now HomotopicTo S.
+ * algebra/java.spad.pamphlet (JavaBytecode): Now HomotopicTo Byte.
+ * algebra/fname.spad.pamphlet (FileNameCategory): Extends
+ HomotopicTo String.
+ * algebra/data.spad.pamphlet (Byte): Now HomotopicTo Character.
+
+2008-11-20 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
* algebra/coerce.spad.pamphlet (HomotopicTo): New.
* algebra/exposed.lsp.pamphlet: Expose it.
* algebra/Makefile.pamphlet (axiom_algebra_layer_1): Include HOMOTOP.
diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in
index 9b0d0643..21ffaeee 100644
--- a/src/algebra/Makefile.in
+++ b/src/algebra/Makefile.in
@@ -361,7 +361,7 @@ axiom_algebra_layer_0 = \
PRIMCAT PRINT PTRANFN SPFCAT TYPE UTYPE \
PROPERTY BASTYPE BASTYPE- CATEGORY LMODULE \
RMODULE FINITE STEP SGROUP SGROUP- ABELSG \
- ABELSG- ORDSET ORDSET- FNCAT FILECAT SEXCAT \
+ ABELSG- ORDSET ORDSET- FILECAT SEXCAT \
MKBCFUNC MKRECORD MKUCFUNC DROPT1 PLOT1 ITFUN2 \
ITFUN3 STREAM1 STREAM2 STREAM3 ANY1 SEGBIND2 \
COMBOPC EQ2 NONE1 CONDUIT IOMODE CTORKIND
@@ -376,7 +376,7 @@ axiom_algebra_layer_1 = \
AGG AGG- IEVALAB IEVALAB- FORTCAT ITUPLE \
PATAB PPCURVE PSCURVE REAL RESLATC RETRACT \
RETRACT- SEGCAT BINDING BMODULE LOGIC \
- LOGIC- EVALAB EVALAB- FEVALAB FEVALAB- BYTE \
+ LOGIC- EVALAB EVALAB- FEVALAB FEVALAB- \
OSGROUP MAYBE DATAARY PROPLOG HOMOTOP
axiom_algebra_layer_1_nrlibs = \
@@ -388,7 +388,8 @@ axiom_algebra_layer_1_objects = \
axiom_algebra_layer_2 = \
ELTAGG ELTAGG- FMC FMFUN FORTFN FVC \
SYNTAX FVFUN INTRET IXAGG IXAGG- SEGXCAT \
- CONTOUR LIST3 MKFUNC OASGP KTVLOGIC
+ CONTOUR LIST3 MKFUNC OASGP KTVLOGIC FNCAT \
+ BYTE
axiom_algebra_layer_2_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_2))
diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet
index 00b3080d..cc6071bc 100644
--- a/src/algebra/Makefile.pamphlet
+++ b/src/algebra/Makefile.pamphlet
@@ -190,7 +190,7 @@ axiom_algebra_layer_0 = \
PRIMCAT PRINT PTRANFN SPFCAT TYPE UTYPE \
PROPERTY BASTYPE BASTYPE- CATEGORY LMODULE \
RMODULE FINITE STEP SGROUP SGROUP- ABELSG \
- ABELSG- ORDSET ORDSET- FNCAT FILECAT SEXCAT \
+ ABELSG- ORDSET ORDSET- FILECAT SEXCAT \
MKBCFUNC MKRECORD MKUCFUNC DROPT1 PLOT1 ITFUN2 \
ITFUN3 STREAM1 STREAM2 STREAM3 ANY1 SEGBIND2 \
COMBOPC EQ2 NONE1 CONDUIT IOMODE CTORKIND
@@ -219,7 +219,7 @@ axiom_algebra_layer_1 = \
AGG AGG- IEVALAB IEVALAB- FORTCAT ITUPLE \
PATAB PPCURVE PSCURVE REAL RESLATC RETRACT \
RETRACT- SEGCAT BINDING BMODULE LOGIC \
- LOGIC- EVALAB EVALAB- FEVALAB FEVALAB- BYTE \
+ LOGIC- EVALAB EVALAB- FEVALAB FEVALAB- \
OSGROUP MAYBE DATAARY PROPLOG HOMOTOP
axiom_algebra_layer_1_nrlibs = \
@@ -238,7 +238,8 @@ axiom_algebra_layer_1_objects = \
axiom_algebra_layer_2 = \
ELTAGG ELTAGG- FMC FMFUN FORTFN FVC \
SYNTAX FVFUN INTRET IXAGG IXAGG- SEGXCAT \
- CONTOUR LIST3 MKFUNC OASGP KTVLOGIC
+ CONTOUR LIST3 MKFUNC OASGP KTVLOGIC FNCAT \
+ BYTE
axiom_algebra_layer_2_nrlibs = \
$(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_2))
diff --git a/src/algebra/alql.spad.pamphlet b/src/algebra/alql.spad.pamphlet
index 514f6288..4e568141 100644
--- a/src/algebra/alql.spad.pamphlet
+++ b/src/algebra/alql.spad.pamphlet
@@ -14,11 +14,7 @@
)abbrev domain DLIST DataList
++ This domain provides some nice functions on lists
DataList(S:OrderedSet) : Exports == Implementation where
- Exports == ListAggregate(S) with
- coerce: List S -> %
- ++ coerce(l) creates a datalist from l
- coerce: % -> List S
- ++ coerce(x) returns the list of elements in x
+ Exports == Join(ListAggregate(S), HomotopicTo List S) with
datalist: List S -> %
++ datalist(l) creates a datalist from l
elt: (%,"unique") -> %
diff --git a/src/algebra/array1.spad.pamphlet b/src/algebra/array1.spad.pamphlet
index 2d1d3a27..85368781 100644
--- a/src/algebra/array1.spad.pamphlet
+++ b/src/algebra/array1.spad.pamphlet
@@ -92,9 +92,7 @@ PrimitiveArrayFunctions2(A, B): Exports == Implementation where
)abbrev domain TUPLE Tuple
++ This domain is used to interface with the interpreter's notion
++ of comma-delimited sequences of values.
-Tuple(S:Type): CoercibleTo(PrimitiveArray S) with
- coerce: PrimitiveArray S -> %
- ++ coerce(a) makes a tuple from primitive array a
+Tuple(S:Type): HomotopicTo (PrimitiveArray S) with
select: (%, NonNegativeInteger) -> S
++ select(x,n) returns the n-th element of tuple x.
++ tuples are 0-based
diff --git a/src/algebra/data.spad.pamphlet b/src/algebra/data.spad.pamphlet
index 10fb2431..0e2a8863 100644
--- a/src/algebra/data.spad.pamphlet
+++ b/src/algebra/data.spad.pamphlet
@@ -26,15 +26,12 @@ import OutputForm
++ Byte is the datatype of 8-bit sized unsigned integer values.
Byte(): Public == Private where
Public == Join(OrderedSet, CoercibleTo NonNegativeInteger,
- CoercibleTo Character) with
+ HomotopicTo Character) with
byte: NonNegativeInteger -> %
++ byte(x) injects the unsigned integer value `v' into
++ the Byte algebra. `v' must be non-negative and less than 256.
coerce: NonNegativeInteger -> %
++ coerce(x) has the same effect as byte(x).
- coerce: Character -> %
- ++ coerce(c) views `c' a a byte. In particular `c' is supposed
- ++ to have a numerical value less than 256.
bitand: (%,%) -> %
++ bitand(x,y) returns the bitwise `and' of `x' and `y'.
bitior: (%,%) -> %
diff --git a/src/algebra/fname.spad.pamphlet b/src/algebra/fname.spad.pamphlet
index e9c558fb..22c7e45a 100644
--- a/src/algebra/fname.spad.pamphlet
+++ b/src/algebra/fname.spad.pamphlet
@@ -28,15 +28,7 @@
++ Description:
++ This category provides an interface to names in the file system.
-FileNameCategory(): Category == SetCategory with
-
- coerce: String -> %
- ++ coerce(s) converts a string to a file name
- ++ according to operating system-dependent conventions.
- coerce: % -> String
- ++ coerce(fn) produces a string for a file name
- ++ according to operating system-dependent conventions.
-
+FileNameCategory(): Category == Join(SetCategory, HomotopicTo String) with
filename: (String, String, String) -> %
++ filename(d,n,e) creates a file name with
++ d as its directory, n as its name and e as its extension.
diff --git a/src/algebra/java.spad.pamphlet b/src/algebra/java.spad.pamphlet
index c0624228..c5a6667b 100644
--- a/src/algebra/java.spad.pamphlet
+++ b/src/algebra/java.spad.pamphlet
@@ -19,11 +19,8 @@
++ Description: This domain defines the datatype for the Java
++ Virtual Machine byte codes.
JavaBytecode(): Public == Private where
- Public ==> Join(CoercibleTo OutputForm, CoercibleTo Byte) with
- coerce: Byte -> %
- ++ coerce(x) the numerical byte value into a JVM bytecode.
-
- Private ==> add
+ Public == Join(CoercibleTo OutputForm, HomotopicTo Byte)
+ Private == add
-- mnemonics equivalent of bytecodes.
mnemonics : PrimitiveArray Symbol :=
[['nop, 'aconst__null, 'iconst__m1, 'iconst__0, 'iconst__1, _
diff --git a/src/algebra/kl.spad.pamphlet b/src/algebra/kl.spad.pamphlet
index 26a8b374..e4091c90 100644
--- a/src/algebra/kl.spad.pamphlet
+++ b/src/algebra/kl.spad.pamphlet
@@ -116,11 +116,8 @@ SortedCache(S:CachableSet): Exports == Implementation where
++ Description:
++ MakeCachableSet(S) returns a cachable set which is equal to S as a set.
MakeCachableSet(S:SetCategory): Exports == Implementation where
- Exports ==> Join(CachableSet, CoercibleTo S) with
- coerce: S -> %
- ++ coerce(s) returns s viewed as an element of %.
-
- Implementation ==> add
+ Exports == Join(CachableSet, HomotopicTo S)
+ Implementation == add
import SortedCache(%)
Rep := Record(setpart: S, pos: NonNegativeInteger)
diff --git a/src/algebra/lodop.spad.pamphlet b/src/algebra/lodop.spad.pamphlet
index 680ed017..c126e54d 100644
--- a/src/algebra/lodop.spad.pamphlet
+++ b/src/algebra/lodop.spad.pamphlet
@@ -217,12 +217,8 @@ OrdinaryDifferentialRing(Kernels,R,var): DRcategory == DRcapsule where
Kernels:SetCategory
R: PartialDifferentialRing(Kernels)
var : Kernels
- DRcategory == Join(BiModule($,$), DifferentialRing) with
+ DRcategory == Join(BiModule($,$), DifferentialRing, HomotopicTo R) with
if R has Field then Field
- coerce: R -> $
- ++ coerce(r) views r as a value in the ordinary differential ring.
- coerce: $ -> R
- ++ coerce(p) views p as a valie in the partial differential ring.
DRcapsule == R add
n: Integer
Rep := R
diff --git a/src/algebra/matrix.spad.pamphlet b/src/algebra/matrix.spad.pamphlet
index 9e4318b6..660a5de4 100644
--- a/src/algebra/matrix.spad.pamphlet
+++ b/src/algebra/matrix.spad.pamphlet
@@ -284,9 +284,6 @@ RectangularMatrix(m,n,R): Exports == Implementation where
rectangularMatrix: Matrix R -> $
++ \spad{rectangularMatrix(m)} converts a matrix of type \spadtype{Matrix}
++ to a matrix of type \spad{RectangularMatrix}.
- coerce: $ -> Matrix R
- ++ \spad{coerce(m)} converts a matrix of type \spadtype{RectangularMatrix}
- ++ to a matrix of type \spad{Matrix}.
Implementation ==> Matrix R add
minr ==> minRowIndex
diff --git a/src/algebra/modmonom.spad.pamphlet b/src/algebra/modmonom.spad.pamphlet
index 593d5aa8..b91555eb 100644
--- a/src/algebra/modmonom.spad.pamphlet
+++ b/src/algebra/modmonom.spad.pamphlet
@@ -20,15 +20,11 @@ ModuleMonomial(IS: OrderedSet,
MM ==> Record(index:IS, exponent:E)
- T == OrderedSet with
+ T == Join(OrderedSet, HomotopicTo MM) with
exponent: $ -> E
++ exponent(x) \undocumented
index: $ -> IS
++ index(x) \undocumented
- coerce: MM -> $
- ++ coerce(x) \undocumented
- coerce: $ -> MM
- ++ coerce(x) \undocumented
construct: (IS, E) -> $
++ construct(i,e) \undocumented
C == MM add
diff --git a/src/algebra/strap/DFLOAT.lsp b/src/algebra/strap/DFLOAT.lsp
index 57f96e29..06bc62b3 100644
--- a/src/algebra/strap/DFLOAT.lsp
+++ b/src/algebra/strap/DFLOAT.lsp
@@ -1031,14 +1031,15 @@
|AbelianGroup&| NIL NIL NIL |AbelianMonoid&|
|Monoid&| NIL |OrderedSet&|
|AbelianSemiGroup&| |SemiGroup&|
- |TranscendentalFunctionCategory&| NIL
+ |TranscendentalFunctionCategory&|
+ |RetractableTo&| |RetractableTo&| NIL
|SetCategory&| NIL
|ElementaryFunctionCategory&| NIL
|HyperbolicFunctionCategory&|
|ArcTrigonometricFunctionCategory&|
|TrigonometricFunctionCategory&| NIL NIL
- |RadicalCategory&| |RetractableTo&| NIL
- |RetractableTo&| NIL NIL NIL |BasicType&| NIL)
+ |RadicalCategory&| NIL NIL NIL NIL
+ |BasicType&| NIL)
(CONS '#((|FloatingPointSystem|)
(|RealNumberSystem|) (|Field|)
(|EuclideanDomain|)
@@ -1064,8 +1065,9 @@
(|PatternMatchable| 101) (|OrderedSet|)
(|AbelianSemiGroup|) (|SemiGroup|)
(|TranscendentalFunctionCategory|)
- (|RealConstant|) (|SetCategory|)
- (|ConvertibleTo| 41)
+ (|RetractableTo| 104)
+ (|RetractableTo| 24) (|RealConstant|)
+ (|SetCategory|) (|ConvertibleTo| 41)
(|ElementaryFunctionCategory|)
(|ArcHyperbolicFunctionCategory|)
(|HyperbolicFunctionCategory|)
@@ -1073,9 +1075,7 @@
(|TrigonometricFunctionCategory|)
(|OpenMath|) (|ConvertibleTo| 129)
(|RadicalCategory|)
- (|RetractableTo| 104)
(|CoercibleFrom| 104)
- (|RetractableTo| 24)
(|CoercibleFrom| 24)
(|ConvertibleTo| 101)
(|ConvertibleTo| 13) (|BasicType|)
diff --git a/src/algebra/strap/INT.lsp b/src/algebra/strap/INT.lsp
index 0e57fde8..72601092 100644
--- a/src/algebra/strap/INT.lsp
+++ b/src/algebra/strap/INT.lsp
@@ -637,8 +637,8 @@
|AbelianGroup&| NIL NIL NIL |AbelianMonoid&|
|Monoid&| NIL NIL |OrderedSet&|
|AbelianSemiGroup&| |SemiGroup&| NIL
- |SetCategory&| NIL NIL NIL NIL NIL NIL NIL
- |RetractableTo&| NIL NIL |BasicType&| NIL)
+ |RetractableTo&| |SetCategory&| NIL NIL NIL
+ NIL NIL NIL NIL NIL NIL |BasicType&| NIL)
(CONS '#((|IntegerNumberSystem|)
(|EuclideanDomain|)
(|UniqueFactorizationDomain|)
@@ -662,13 +662,13 @@
(|StepThrough|) (|PatternMatchable| 11)
(|OrderedSet|) (|AbelianSemiGroup|)
(|SemiGroup|) (|RealConstant|)
- (|SetCategory|) (|OpenMath|)
- (|ConvertibleTo| 9) (|ConvertibleTo| 45)
+ (|RetractableTo| 11) (|SetCategory|)
+ (|OpenMath|) (|ConvertibleTo| 9)
+ (|ConvertibleTo| 45)
(|ConvertibleTo| 48)
(|CombinatorialFunctionCategory|)
(|ConvertibleTo| 123)
(|ConvertibleTo| 50)
- (|RetractableTo| 11)
(|CoercibleFrom| 11)
(|ConvertibleTo| 11) (|BasicType|)
(|CoercibleTo| 36))
diff --git a/src/algebra/strap/SINT.lsp b/src/algebra/strap/SINT.lsp
index 2da14713..d98748ea 100644
--- a/src/algebra/strap/SINT.lsp
+++ b/src/algebra/strap/SINT.lsp
@@ -581,8 +581,8 @@
|AbelianGroup&| NIL NIL NIL |AbelianMonoid&|
|Monoid&| NIL NIL |OrderedSet&|
|AbelianSemiGroup&| |SemiGroup&| |Logic&| NIL
- |SetCategory&| NIL NIL NIL NIL NIL NIL
- |RetractableTo&| NIL NIL |BasicType&| NIL)
+ |RetractableTo&| |SetCategory&| NIL NIL NIL
+ NIL NIL NIL NIL NIL |BasicType&| NIL)
(CONS '#((|IntegerNumberSystem|)
(|EuclideanDomain|)
(|UniqueFactorizationDomain|)
@@ -606,13 +606,12 @@
(|StepThrough|) (|PatternMatchable| 12)
(|OrderedSet|) (|AbelianSemiGroup|)
(|SemiGroup|) (|Logic|) (|RealConstant|)
- (|SetCategory|) (|OpenMath|)
- (|ConvertibleTo| 90)
+ (|RetractableTo| 12) (|SetCategory|)
+ (|OpenMath|) (|ConvertibleTo| 90)
(|ConvertibleTo| 91)
(|CombinatorialFunctionCategory|)
(|ConvertibleTo| 92)
(|ConvertibleTo| 94)
- (|RetractableTo| 12)
(|CoercibleFrom| 12)
(|ConvertibleTo| 12) (|BasicType|)
(|CoercibleTo| 29))
diff --git a/src/algebra/wtpol.spad.pamphlet b/src/algebra/wtpol.spad.pamphlet
index 12129139..bd7f9805 100644
--- a/src/algebra/wtpol.spad.pamphlet
+++ b/src/algebra/wtpol.spad.pamphlet
@@ -40,15 +40,11 @@ WeightedPolynomials(R:Ring,VarSet: OrderedSet, E:OrderedAbelianMonoidSup,
P:PolynomialCategory(R,E,VarSet),
vl:List VarSet, wl:List NonNegativeInteger,
wtlevel:NonNegativeInteger):
- Ring with
+ Join(Ring, HomotopicTo P) with
if R has CommutativeRing then Algebra(R)
- coerce: $ -> P
- ++ convert back into a "P", ignoring weights
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)
- coerce: P -> $
- ++ coerce(p) coerces p into Weighted form, applying weights and ignoring terms
changeWeightLevel: NonNegativeInteger -> Void
++ changeWeightLevel(n) changes the weight level to the new value given:
++ NB: previously calculated terms are not affected
@@ -153,13 +149,8 @@ import NonNegativeInteger
OrdinaryWeightedPolynomials(R:Ring,
vl:List Symbol, wl:List NonNegativeInteger,
wtlevel:NonNegativeInteger):
- Ring with
+ Join(Ring, HomotopicTo Polynomial R) with
if R has CommutativeRing then Algebra(R)
- coerce: $ -> Polynomial(R)
- ++ coerce(p) converts back into a Polynomial(R), ignoring weights
- coerce: Polynomial(R) -> $
- ++ coerce(p) coerces a Polynomial(R) into Weighted form,
- ++ applying weights and ignoring terms
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)