From 95a8891a808572509f7449aa32022df42f8b7ab8 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 26 Apr 2010 02:05:39 +0000 Subject: * algebra/carten.spad.pamphlet (CartesianTensor): Satisfy instantiation of Eltable. * algebra/clifford.spad.pamphlet (QuadraticForm): Likewise. * algebra/domain.spad.pamphlet (DomainTemplate): Likewise. * algebra/files.spad.pamphlet (Library): Likewise. * algebra/aggcat.spad.pamphlet (LinearAggregate): Extend instantiation of Eltable. * algebra/naalg.spad.pamphlet (FiniteRankNonAssociativeAlgebra): Likewise. * algebra/pscat.spad.pamphlet (UnivariatePowerSeriesCategory): Likewise. * algebra/sex.spad.pamphlet (SExpressionCategory): Likewise. * algebra/Makefile.pamphlet: Update rules. --- src/algebra/Makefile.in | 20 ++++++++++++++------ src/algebra/Makefile.pamphlet | 20 ++++++++++++++------ src/algebra/aggcat.spad.pamphlet | 7 ++----- src/algebra/carten.spad.pamphlet | 5 ++--- src/algebra/clifford.spad.pamphlet | 5 +---- src/algebra/domain.spad.pamphlet | 4 +--- src/algebra/files.spad.pamphlet | 6 +----- src/algebra/modring.spad.pamphlet | 4 +--- src/algebra/naalgc.spad.pamphlet | 7 ++----- src/algebra/pscat.spad.pamphlet | 6 ++---- src/algebra/sex.spad.pamphlet | 7 ++----- 11 files changed, 42 insertions(+), 49 deletions(-) (limited to 'src/algebra') diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index 346f6ec8..0991f83a 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -264,6 +264,8 @@ $(OUT)/A1AGG.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/LOGIC.$(FASLEXT) \ $(OUT)/SRAGG.$(FASLEXT): $(OUT)/A1AGG.$(FASLEXT) $(OUT)/ISTRING.$(FASLEXT): $(OUT)/SRAGG.$(FASLEXT) $(OUT)/STAGG.$(FASLEXT): $(OUT)/URAGG.$(FASLEXT) $(OUT)/LNAGG.$(FASLEXT) +$(OUT)/LNAGG.$(FASLEXT): $(OUT)/SEGCAT.$(FASLEXT) +$(OUT)/SEGCAT.$(FASLEXT): $(OUT)/KRCFROM.$(FASLEXT) $(OUT)/SETAGG.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/CLAGG.$(FASLEXT) $(OUT)/STRICAT.$(FASLEXT): $(OUT)/SRAGG.$(FASLEXT) $(OUT)/STRING.$(FASLEXT): $(OUT)/STRICAT.$(FASLEXT) $(OUT)/ORDFIN.$(FASLEXT) @@ -291,7 +293,12 @@ $(OUT)/SETCAT.$(FASLEXT) $(OUT)/SETCAT-.$(FASLEXT): $(OUT)/BASTYPE.$(FASLEXT) $(OUT)/FINITE.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/ORDSET.$(FASLEXT) $(OUT)/ORDSET-.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/FILECAT.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) -$(OUT)/SEXCAT.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) +$(OUT)/SEXCAT.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/PID.$(FASLEXT) \ + $(OUT)/OAGROUP.$(FASLEXT) $(OUT)/LINEXP.$(FASLEXT) \ + $(OUT)/PATMAB.$(FASLEXT) $(OUT)/REAL.$(FASLEXT) \ + $(OUT)/CHARZ.$(FASLEXT) $(OUT)/AGG.$(FASLEXT) \ + $(OUT)/IXAGG.$(FASLEXT) $(OUT)/FLAGG.$(FASLEXT) \ + $(OUT)/ELAGG.$(FASLEXT) $(OUT)/STEP.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/PATMAB.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/REAL.$(FASLEXT): $(OUT)/KONVERT.$(FASLEXT) @@ -310,6 +317,7 @@ $(OUT)/ALGEBRA.$(FASLEXT): $(OUT)/MODULE.$(FASLEXT) $(OUT)/OAGROUP.$(FASLEXT): $(OUT)/OCAMON.$(FASLEXT) $(OUT)/OCAMON.$(FASLEXT): $(OUT)/OAMON.$(FASLEXT) $(OUT)/OAMON.$(FASLEXT): $(OUT)/OASGP.$(FASLEXT) +$(OUT)/OAMONS.$(FASLEXT): $(OUT)/OAMON.$(FASLEXT) $(OUT)/OASGP.$(FASLEXT): $(OUT)/ORDSET.$(FASLEXT) $(OUT)/ABELSG.$(FASLEXT) $(OUT)/RNG.$(FASLEXT): $(OUT)/SGROUP.$(FASLEXT) @@ -330,14 +338,14 @@ $(OUT)/OUT.$(FASLEXT): $(OUT)/VOID.$(FASLEXT) axiom_algebra_layer_0 = \ AHYP ATTREG CFCAT ELTAB KOERCE KONVERT \ KRCFROM KVTFROM IEVALAB IEVALAB- EVALAB EVALAB- \ - RETRACT RETRACT- SETCAT SETCAT- VOID \ + RETRACT RETRACT- SETCAT SETCAT- VOID SEGCAT \ MSYSCMD FINITE OM OMCONN OMDEV OUT \ PRIMCAT PRINT PTRANFN SPFCAT TYPE UTYPE \ BMODULE BASTYPE BASTYPE- STEP LMODULE \ RMODULE ALGEBRA ALGEBRA- SGROUP SGROUP- ABELSG \ ABELSG- ORDSET ORDSET- OASGP FILECAT SEXCAT \ MODULE MODULE- PID OAGROUP OCAMON OAMON \ - RNG ORDFIN LLINSET RLINSET LINSET \ + RNG ORDFIN LLINSET RLINSET LINSET OAMONS \ MKBCFUNC MKRECORD MKUCFUNC DROPT1 PLOT1 ITFUN2 \ ITFUN3 STREAM1 STREAM2 STREAM3 ANY1 SEGBIND2 \ COMBOPC EQ2 NONE1 CONDUIT IOMODE CTORKIND \ @@ -414,7 +422,7 @@ axiom_algebra_layer_1 = \ DIFRING DIFRING- ENTIRER INTDOM INTDOM- OINTDOM \ GCDDOM GCDDOM- UFD UFD- ES ES- \ PATAB PPCURVE PSCURVE CACHSET RESLATC REF \ - IDENT SEGCAT BINDING ALIST BOOLEAN PRIMARR \ + IDENT BINDING ALIST BOOLEAN PRIMARR \ ORDRING ORDRING- FEVALAB FEVALAB- \ OSGROUP MAYBE DATAARY PROPLOG HOMOTOP BYTEORD \ FIELD FIELD- VECTCAT VECTCAT- IARRAY1 BOOLE \ @@ -434,7 +442,7 @@ axiom_algebra_layer_2 = \ $(OUT)/FNCAT.$(FASLEXT): $(OUT)/HOMOTOP.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT) $(OUT)/SYNTAX.$(FASLEXT): $(OUT)/IDENT.$(FASLEXT) $(OUT)/COMMONOP.$(FASLEXT): $(OUT)/BOP.$(FASLEXT) -$(OUT)/DOMTMPLT.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT) +$(OUT)/DOMTMPLT.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT) $(OUT)/OAMONS.$(FASLEXT) $(OUT)/FCTRDATA.$(FASLEXT): $(OUT)/DOMTMPLT.$(FASLEXT) axiom_algebra_layer_2_nrlibs = \ @@ -508,7 +516,7 @@ axiom_algebra_layer_6 = \ DIFEXT DIFEXT- ES1 ES2 GRMOD GRMOD- \ HYPCAT HYPCAT- MODRING NASRING NASRING- \ SORTPAK ZMOD PROPFUN2 \ - KTVLOGIC OAMONS BYTE SYSINT SYSNNI + KTVLOGIC BYTE SYSINT SYSNNI axiom_algebra_layer_6_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_6)) diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index e5f1d98f..4377820b 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -218,6 +218,8 @@ $(OUT)/A1AGG.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/LOGIC.$(FASLEXT) \ $(OUT)/SRAGG.$(FASLEXT): $(OUT)/A1AGG.$(FASLEXT) $(OUT)/ISTRING.$(FASLEXT): $(OUT)/SRAGG.$(FASLEXT) $(OUT)/STAGG.$(FASLEXT): $(OUT)/URAGG.$(FASLEXT) $(OUT)/LNAGG.$(FASLEXT) +$(OUT)/LNAGG.$(FASLEXT): $(OUT)/SEGCAT.$(FASLEXT) +$(OUT)/SEGCAT.$(FASLEXT): $(OUT)/KRCFROM.$(FASLEXT) $(OUT)/SETAGG.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/CLAGG.$(FASLEXT) $(OUT)/STRICAT.$(FASLEXT): $(OUT)/SRAGG.$(FASLEXT) $(OUT)/STRING.$(FASLEXT): $(OUT)/STRICAT.$(FASLEXT) $(OUT)/ORDFIN.$(FASLEXT) @@ -245,7 +247,12 @@ $(OUT)/SETCAT.$(FASLEXT) $(OUT)/SETCAT-.$(FASLEXT): $(OUT)/BASTYPE.$(FASLEXT) $(OUT)/FINITE.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/ORDSET.$(FASLEXT) $(OUT)/ORDSET-.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/FILECAT.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) -$(OUT)/SEXCAT.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) +$(OUT)/SEXCAT.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/PID.$(FASLEXT) \ + $(OUT)/OAGROUP.$(FASLEXT) $(OUT)/LINEXP.$(FASLEXT) \ + $(OUT)/PATMAB.$(FASLEXT) $(OUT)/REAL.$(FASLEXT) \ + $(OUT)/CHARZ.$(FASLEXT) $(OUT)/AGG.$(FASLEXT) \ + $(OUT)/IXAGG.$(FASLEXT) $(OUT)/FLAGG.$(FASLEXT) \ + $(OUT)/ELAGG.$(FASLEXT) $(OUT)/STEP.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/PATMAB.$(FASLEXT): $(OUT)/SETCAT.$(FASLEXT) $(OUT)/REAL.$(FASLEXT): $(OUT)/KONVERT.$(FASLEXT) @@ -264,6 +271,7 @@ $(OUT)/ALGEBRA.$(FASLEXT): $(OUT)/MODULE.$(FASLEXT) $(OUT)/OAGROUP.$(FASLEXT): $(OUT)/OCAMON.$(FASLEXT) $(OUT)/OCAMON.$(FASLEXT): $(OUT)/OAMON.$(FASLEXT) $(OUT)/OAMON.$(FASLEXT): $(OUT)/OASGP.$(FASLEXT) +$(OUT)/OAMONS.$(FASLEXT): $(OUT)/OAMON.$(FASLEXT) $(OUT)/OASGP.$(FASLEXT): $(OUT)/ORDSET.$(FASLEXT) $(OUT)/ABELSG.$(FASLEXT) $(OUT)/RNG.$(FASLEXT): $(OUT)/SGROUP.$(FASLEXT) @@ -284,14 +292,14 @@ $(OUT)/OUT.$(FASLEXT): $(OUT)/VOID.$(FASLEXT) axiom_algebra_layer_0 = \ AHYP ATTREG CFCAT ELTAB KOERCE KONVERT \ KRCFROM KVTFROM IEVALAB IEVALAB- EVALAB EVALAB- \ - RETRACT RETRACT- SETCAT SETCAT- VOID \ + RETRACT RETRACT- SETCAT SETCAT- VOID SEGCAT \ MSYSCMD FINITE OM OMCONN OMDEV OUT \ PRIMCAT PRINT PTRANFN SPFCAT TYPE UTYPE \ BMODULE BASTYPE BASTYPE- STEP LMODULE \ RMODULE ALGEBRA ALGEBRA- SGROUP SGROUP- ABELSG \ ABELSG- ORDSET ORDSET- OASGP FILECAT SEXCAT \ MODULE MODULE- PID OAGROUP OCAMON OAMON \ - RNG ORDFIN LLINSET RLINSET LINSET \ + RNG ORDFIN LLINSET RLINSET LINSET OAMONS \ MKBCFUNC MKRECORD MKUCFUNC DROPT1 PLOT1 ITFUN2 \ ITFUN3 STREAM1 STREAM2 STREAM3 ANY1 SEGBIND2 \ COMBOPC EQ2 NONE1 CONDUIT IOMODE CTORKIND \ @@ -373,7 +381,7 @@ axiom_algebra_layer_1 = \ DIFRING DIFRING- ENTIRER INTDOM INTDOM- OINTDOM \ GCDDOM GCDDOM- UFD UFD- ES ES- \ PATAB PPCURVE PSCURVE CACHSET RESLATC REF \ - IDENT SEGCAT BINDING ALIST BOOLEAN PRIMARR \ + IDENT BINDING ALIST BOOLEAN PRIMARR \ ORDRING ORDRING- FEVALAB FEVALAB- \ OSGROUP MAYBE DATAARY PROPLOG HOMOTOP BYTEORD \ FIELD FIELD- VECTCAT VECTCAT- IARRAY1 BOOLE \ @@ -398,7 +406,7 @@ axiom_algebra_layer_2 = \ $(OUT)/FNCAT.$(FASLEXT): $(OUT)/HOMOTOP.$(FASLEXT) $(OUT)/SETCAT.$(FASLEXT) $(OUT)/SYNTAX.$(FASLEXT): $(OUT)/IDENT.$(FASLEXT) $(OUT)/COMMONOP.$(FASLEXT): $(OUT)/BOP.$(FASLEXT) -$(OUT)/DOMTMPLT.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT) +$(OUT)/DOMTMPLT.$(FASLEXT): $(OUT)/SYNTAX.$(FASLEXT) $(OUT)/OAMONS.$(FASLEXT) $(OUT)/FCTRDATA.$(FASLEXT): $(OUT)/DOMTMPLT.$(FASLEXT) axiom_algebra_layer_2_nrlibs = \ @@ -492,7 +500,7 @@ axiom_algebra_layer_6 = \ DIFEXT DIFEXT- ES1 ES2 GRMOD GRMOD- \ HYPCAT HYPCAT- MODRING NASRING NASRING- \ SORTPAK ZMOD PROPFUN2 \ - KTVLOGIC OAMONS BYTE SYSINT SYSNNI + KTVLOGIC BYTE SYSINT SYSNNI axiom_algebra_layer_6_nrlibs = \ $(addsuffix .NRLIB/code.$(FASLEXT),$(axiom_algebra_layer_6)) diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet index d0d0db69..4f9ebe62 100644 --- a/src/algebra/aggcat.spad.pamphlet +++ b/src/algebra/aggcat.spad.pamphlet @@ -1811,7 +1811,8 @@ import Integer ++ as well to finite ones. ++ For finite linear aggregates, see \spadtype{FiniteLinearAggregate}. LinearAggregate(S:Type): Category == - Join(IndexedAggregate(Integer, S), Collection(S)) with + Join(IndexedAggregate(Integer, S), Collection(S),_ + Eltable(UniversalSegment Integer, %)) with new : (NonNegativeInteger,S) -> % ++ new(n,x) returns \axiom{fill!(new n,x)}. concat: (%,S) -> % @@ -1835,10 +1836,6 @@ LinearAggregate(S:Type): Category == ++ map(f,u,v) returns a new collection w with elements \axiom{z = f(x,y)} ++ for corresponding elements x and y from u and v. ++ Note: for linear aggregates, \axiom{w.i = f(u.i,v.i)}. - elt: (%,UniversalSegment(Integer)) -> % - ++ elt(u,i..j) (also written: \axiom{a(i..j)}) returns the aggregate of - ++ elements \axiom{u} for k from i to j in that order. - ++ Note: in general, \axiom{a.s = [a.k for i in s]}. delete: (%,Integer) -> % ++ delete(u,i) returns a copy of u with the \axiom{i}th element deleted. ++ Note: for lists, \axiom{delete(a,i) == concat(a(0..i - 1),a(i + 1,..))}. diff --git a/src/algebra/carten.spad.pamphlet b/src/algebra/carten.spad.pamphlet index 2484508c..65630dc3 100644 --- a/src/algebra/carten.spad.pamphlet +++ b/src/algebra/carten.spad.pamphlet @@ -130,7 +130,8 @@ CartesianTensor(minix, dim, R): Exports == Implementation where dim: NNI R: CommutativeRing - Exports ==> Join(GradedAlgebra(R, NNI), GradedModule(I, NNI)) with + Exports ==> Join(GradedAlgebra(R, NNI), GradedModule(I, NNI),_ + Eltable(I,R)) with coerce: DP(dim, R) -> % ++ coerce(v) views a vector as a rank 1 tensor. @@ -152,8 +153,6 @@ CartesianTensor(minix, dim, R): Exports == Implementation where elt: (%) -> R ++ elt(t) gives the component of a rank 0 tensor. - elt: (%, I) -> R - ++ elt(t,i) gives a component of a rank 1 tensor. elt: (%, I, I) -> R ++ elt(t,i,j) gives a component of a rank 2 tensor. elt: (%, I, I, I) -> R diff --git a/src/algebra/clifford.spad.pamphlet b/src/algebra/clifford.spad.pamphlet index 20fa8514..262afa86 100644 --- a/src/algebra/clifford.spad.pamphlet +++ b/src/algebra/clifford.spad.pamphlet @@ -33,15 +33,12 @@ QuadraticForm(n, K): T == Impl where SM ==> SquareMatrix V ==> DirectProduct - T ==> AbelianGroup with + T ==> Join(AbelianGroup, Eltable(V(n,K),K)) with quadraticForm: SM(n, K) -> % ++ quadraticForm(m) creates a quadratic form from a symmetric, ++ square matrix m. matrix: % -> SM(n, K) ++ matrix(qf) creates a square matrix from the quadratic form qf. - elt: (%, V(n, K)) -> K - ++ elt(qf,v) evaluates the quadratic form qf on the vector v, - ++ producing a scalar. Impl ==> SM(n,K) add Rep := SM(n,K) diff --git a/src/algebra/domain.spad.pamphlet b/src/algebra/domain.spad.pamphlet index 0ee4b5bb..19fde086 100644 --- a/src/algebra/domain.spad.pamphlet +++ b/src/algebra/domain.spad.pamphlet @@ -203,11 +203,9 @@ CategoryConstructor(): Public == Private where ++ Represntation of domain templates resulting from ++ compiling a domain constructor DomainTemplate(): Public == Private where - Public == SetCategory with + Public == Join(SetCategory, Eltable(NonNegativeInteger,Syntax)) with #: % -> NonNegativeInteger ++ \spad{# x} returns the length of the domain template \spad{x}. - elt: (%,NonNegativeInteger) -> Syntax - ++ \spad{x.i} yields the entry at slot \spad{i} in \spad{x}. Private == add Rep == PrimitiveArray Syntax #x == # rep x diff --git a/src/algebra/files.spad.pamphlet b/src/algebra/files.spad.pamphlet index 95d45b31..737b3720 100644 --- a/src/algebra/files.spad.pamphlet +++ b/src/algebra/files.spad.pamphlet @@ -425,17 +425,13 @@ KeyedAccessFile(Entry): KAFcategory == KAFcapsule where ++ References: ++ Description: ++ This domain provides a simple way to save values in files. -Library(): TableAggregate(String, Any) with +Library(): Join(TableAggregate(String, Any),Eltable(Symbol,Any)) with library: FileName -> % ++ library(ln) creates a new library file. pack!: % -> % ++ pack!(f) reorganizes the file f on disk to recover ++ unused space. - elt : (%, Symbol) -> Any - ++ elt(lib,k) or lib.k extracts the value corresponding to the key \spad{k} - ++ from the library \spad{lib}. - setelt : (%, Symbol, Any) -> Any ++ \spad{lib.k := v} saves the value \spad{v} in the library ++ \spad{lib}. It can later be extracted using the key \spad{k}. diff --git a/src/algebra/modring.spad.pamphlet b/src/algebra/modring.spad.pamphlet index a7308223..a4013304 100644 --- a/src/algebra/modring.spad.pamphlet +++ b/src/algebra/modring.spad.pamphlet @@ -116,7 +116,7 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R, R : UnivariatePolynomialCategory S Mod : AbelianMonoid - C == EuclideanDomain with + C == Join(EuclideanDomain, Eltable(R,R)) with modulus : % -> Mod ++ modulus(x) \undocumented coerce : % -> R @@ -129,8 +129,6 @@ EuclideanModularRing(S,R,Mod,reduction:(R,Mod) -> R, ++ recip(x) \undocumented inv : % -> % ++ inv(x) \undocumented - elt : (%, R) -> R - ++ elt(x,r) or x.r \undocumented T == ModularRing(R,Mod,reduction,merge,exactQuo) add diff --git a/src/algebra/naalgc.spad.pamphlet b/src/algebra/naalgc.spad.pamphlet index 3cee9c8a..b0d5b2d3 100644 --- a/src/algebra/naalgc.spad.pamphlet +++ b/src/algebra/naalgc.spad.pamphlet @@ -910,8 +910,8 @@ FiniteRankNonAssociativeAlgebra(R:CommutativeRing): ++ \spadtype{FiniteRankNonAssociativeAlgebra} (i.e. a non associative ++ algebra over R which is a free \spad{R}-module of finite rank) ++ over a commutative ring R together with a fixed \spad{R}-module basis. -FramedNonAssociativeAlgebra(R:CommutativeRing): - Category == FiniteRankNonAssociativeAlgebra(R) with +FramedNonAssociativeAlgebra(R:CommutativeRing): Category == _ + Join(FiniteRankNonAssociativeAlgebra(R),Eltable(Integer,R)) with --operations basis: () -> Vector % ++ basis() returns the fixed \spad{R}-module basis. @@ -923,9 +923,6 @@ FramedNonAssociativeAlgebra(R:CommutativeRing): ++ coordinates([a1,...,am]) returns a matrix whose i-th row ++ is formed by the coordinates of \spad{ai} with respect to the ++ fixed \spad{R}-module basis. - elt : (%,Integer) -> R - ++ elt(a,i) returns the i-th coefficient of \spad{a} with respect to the - ++ fixed \spad{R}-module basis. structuralConstants:() -> Vector Matrix R ++ structuralConstants() calculates the structural constants ++ \spad{[(gammaijk) for k in 1..rank()]} defined by diff --git a/src/algebra/pscat.spad.pamphlet b/src/algebra/pscat.spad.pamphlet index 86eecd2f..37f63dd1 100644 --- a/src/algebra/pscat.spad.pamphlet +++ b/src/algebra/pscat.spad.pamphlet @@ -96,7 +96,8 @@ UnivariatePowerSeriesCategory(Coef,Expon): Category == Definition where Expon : OrderedAbelianMonoid Term ==> Record(k:Expon,c:Coef) - Definition ==> PowerSeriesCategory(Coef,Expon,SingletonAsOrderedSet) with + Definition ==> Join(PowerSeriesCategory(Coef,Expon,SingletonAsOrderedSet),_ + Eltable(Expon,Coef)) with terms: % -> Stream Term ++ \spad{terms(f(x))} returns a stream of non-zero terms, where a @@ -106,9 +107,6 @@ UnivariatePowerSeriesCategory(Coef,Expon): Category == Definition where --++ \spad{series(st)} creates a series from a stream of non-zero terms, --++ where a term is an exponent-coefficient pair. The terms in the --++ stream should be ordered by increasing order of exponents. - elt: (%,Expon) -> Coef - ++ \spad{elt(f(x),r)} returns the coefficient of the term of degree r in - ++ \spad{f(x)}. This is the same as the function \spadfun{coefficient}. variable: % -> Symbol ++ \spad{variable(f)} returns the (unique) power series variable of ++ the power series f. diff --git a/src/algebra/sex.spad.pamphlet b/src/algebra/sex.spad.pamphlet index d688f92b..89613f49 100644 --- a/src/algebra/sex.spad.pamphlet +++ b/src/algebra/sex.spad.pamphlet @@ -30,7 +30,8 @@ SExpressionCategory(Str, Sym, Int, Flt, Expr): Category == Decl where Decl == Join(SetCategory,ConvertibleFrom Str, ConvertibleFrom Sym,_ ConvertibleFrom Int, ConvertibleFrom Flt,_ ConvertibleFrom Flt, ConvertibleFrom Expr,_ - ConvertibleFrom List %) with + ConvertibleFrom List %, Eltable(Integer,%),_ + Eltable(List Integer, %)) with eq: (%,%) -> Boolean ++ eq(s, t) is true if EQ(s,t) is true in Lisp. null?: % -> Boolean @@ -72,10 +73,6 @@ SExpressionCategory(Str, Sym, Int, Flt, Expr): Category == Decl where ++ cdr((a1,...,an)) returns \spad{(a2,...,an)}. #: % -> Integer ++ #((a1,...,an)) returns n. - elt: (%, Integer) -> % - ++ elt((a1,...,an), i) returns \spad{ai}. - elt: (%, List Integer) -> % - ++ elt((a1,...,an), [i1,...,im]) returns \spad{(a_i1,...,a_im)}. @ \section{domain SEXOF SExpressionOf} -- cgit v1.2.3