diff options
Diffstat (limited to 'src/algebra')
-rw-r--r-- | src/algebra/Makefile.am | 19 | ||||
-rw-r--r-- | src/algebra/Makefile.in | 19 | ||||
-rw-r--r-- | src/algebra/aggcat.spad.pamphlet | 2 | ||||
-rw-r--r-- | src/algebra/array2.spad.pamphlet | 6 | ||||
-rw-r--r-- | src/algebra/derham.spad.pamphlet | 17 | ||||
-rw-r--r-- | src/algebra/equation2.spad.pamphlet | 15 | ||||
-rw-r--r-- | src/algebra/exposed.lsp.pamphlet | 1 | ||||
-rw-r--r-- | src/algebra/fr.spad.pamphlet | 13 | ||||
-rw-r--r-- | src/algebra/indexedp.spad.pamphlet | 7 | ||||
-rw-r--r-- | src/algebra/ituple.spad.pamphlet | 9 | ||||
-rw-r--r-- | src/algebra/matcat.spad.pamphlet | 5 | ||||
-rw-r--r-- | src/algebra/mring.spad.pamphlet | 9 | ||||
-rw-r--r-- | src/algebra/polycat.spad.pamphlet | 9 | ||||
-rw-r--r-- | src/algebra/xpoly.spad.pamphlet | 21 |
14 files changed, 65 insertions, 87 deletions
diff --git a/src/algebra/Makefile.am b/src/algebra/Makefile.am index 4df8f821..49756d95 100644 --- a/src/algebra/Makefile.am +++ b/src/algebra/Makefile.am @@ -271,11 +271,12 @@ strap-0/MATCAT.$(FASLEXT): strap-0/ARR2CAT.$(FASLEXT) \ strap-0/EUCDOM.$(FASLEXT) strap-0/INTDOM.$(FASLEXT) \ strap-0/FIELD.$(FASLEXT) strap-0/FINAGG.$(FASLEXT) -strap-0/IDPC.$(FASLEXT): strap-0/SETCAT.$(FASLEXT) +strap-0/IDPC.$(FASLEXT): strap-0/SETCAT.$(FASLEXT) strap-0/FUNCTOR.$(FASLEXT) strap-0/AMR.$(FASLEXT): strap-0/RING.$(FASLEXT) strap-0/BMODULE.$(FASLEXT) \ strap-0/ALGEBRA.$(FASLEXT) strap-0/FIELD.$(FASLEXT) \ - strap-0/CHARZ.$(FASLEXT) strap-0/CHARNZ.$(FASLEXT) + strap-0/CHARZ.$(FASLEXT) strap-0/CHARNZ.$(FASLEXT) \ + strap-0/FUNCTOR.$(FASLEXT) strap-0/FAMR.$(FASLEXT): strap-0/AMR.$(FASLEXT) \ strap-0/FRETRCT.$(FASLEXT) @@ -372,7 +373,7 @@ strap-0/SUP.$(FASLEXT): strap-0/UPOLYC.$(FASLEXT) strap-0/PR.$(FASLEXT) strap-0/TABLE.$(FASLEXT): strap-0/TBAGG.$(FASLEXT) -strap-0/EQ.$(FASLEXT): strap-0/TYPE.$(FASLEXT) \ +strap-0/EQ.$(FASLEXT): strap-0/TYPE.$(FASLEXT) strap-0/FUNCTOR.$(FASLEXT) \ strap-0/IEVALAB.$(FASLEXT) strap-0/KOERCE.$(FASLEXT) \ strap-0/BOOLEAN.$(FASLEXT) strap-0/EVALAB.$(FASLEXT) \ strap-0/ABELSG.$(FASLEXT) strap-0/ABELGRP.$(FASLEXT) \ @@ -393,7 +394,7 @@ strap-0/SYNTAX.$(FASLEXT): strap-0/UTYPE.$(FASLEXT) \ strap-0/IDENT.$(FASLEXT) strap-0/STRING.$(FASLEXT) \ strap-0/KOERCE.$(FASLEXT) strap-0/INFORM.$(FASLEXT) -strap-0/FR.$(FASLEXT): strap-0/INTDOM.$(FASLEXT) \ +strap-0/FR.$(FASLEXT): strap-0/INTDOM.$(FASLEXT) strap-0/FUNCTOR.$(FASLEXT) \ strap-0/DIFEXT.$(FASLEXT) strap-0/FEVALAB.$(FASLEXT) \ strap-0/ALGEBRA.$(FASLEXT) strap-0/FRETRCT.$(FASLEXT) @@ -570,11 +571,12 @@ strap-1/HYPCAT.$(FASLEXT): strap-1/TYPE.$(FASLEXT) strap-1/AHYP.$(FASLEXT): strap-1/TYPE.$(FASLEXT) strap-1/ELEMFUN.$(FASLEXT): strap-1/TYPE.$(FASLEXT) -strap-1/IDPC.$(FASLEXT): strap-1/SETCAT.$(FASLEXT) +strap-1/IDPC.$(FASLEXT): strap-1/SETCAT.$(FASLEXT) strap-1/FUNCTOR.$(FASLEXT) strap-1/AMR.$(FASLEXT): strap-1/RING.$(FASLEXT) strap-1/BMODULE.$(FASLEXT) \ strap-1/ALGEBRA.$(FASLEXT) strap-1/FIELD.$(FASLEXT) \ - strap-1/CHARZ.$(FASLEXT) strap-1/CHARNZ.$(FASLEXT) + strap-1/CHARZ.$(FASLEXT) strap-1/CHARNZ.$(FASLEXT) \ + strap-1/FUNCTOR.$(FASLEXT) strap-1/FAMR.$(FASLEXT): strap-1/AMR.$(FASLEXT) \ strap-1/FRETRCT.$(FASLEXT) @@ -967,11 +969,12 @@ strap-2/AHYP.$(FASLEXT): strap-2/TYPE.$(FASLEXT) strap-2/ELEMFUN.$(FASLEXT): strap-2/TYPE.$(FASLEXT) -strap-2/IDPC.$(FASLEXT): strap-2/SETCAT.$(FASLEXT) +strap-2/IDPC.$(FASLEXT): strap-2/SETCAT.$(FASLEXT) strap-2/FUNCTOR.$(FASLEXT) strap-2/AMR.$(FASLEXT): strap-2/RING.$(FASLEXT) strap-2/BMODULE.$(FASLEXT) \ strap-2/ALGEBRA.$(FASLEXT) strap-2/FIELD.$(FASLEXT) \ - strap-2/CHARZ.$(FASLEXT) strap-2/CHARNZ.$(FASLEXT) + strap-2/CHARZ.$(FASLEXT) strap-2/CHARNZ.$(FASLEXT) \ + strap-2/FUNCTOR.$(FASLEXT) strap-2/FAMR.$(FASLEXT): strap-2/AMR.$(FASLEXT) \ strap-2/FRETRCT.$(FASLEXT) diff --git a/src/algebra/Makefile.in b/src/algebra/Makefile.in index ad03d585..974aa974 100644 --- a/src/algebra/Makefile.in +++ b/src/algebra/Makefile.in @@ -1761,11 +1761,12 @@ strap-0/MATCAT.$(FASLEXT): strap-0/ARR2CAT.$(FASLEXT) \ strap-0/EUCDOM.$(FASLEXT) strap-0/INTDOM.$(FASLEXT) \ strap-0/FIELD.$(FASLEXT) strap-0/FINAGG.$(FASLEXT) -strap-0/IDPC.$(FASLEXT): strap-0/SETCAT.$(FASLEXT) +strap-0/IDPC.$(FASLEXT): strap-0/SETCAT.$(FASLEXT) strap-0/FUNCTOR.$(FASLEXT) strap-0/AMR.$(FASLEXT): strap-0/RING.$(FASLEXT) strap-0/BMODULE.$(FASLEXT) \ strap-0/ALGEBRA.$(FASLEXT) strap-0/FIELD.$(FASLEXT) \ - strap-0/CHARZ.$(FASLEXT) strap-0/CHARNZ.$(FASLEXT) + strap-0/CHARZ.$(FASLEXT) strap-0/CHARNZ.$(FASLEXT) \ + strap-0/FUNCTOR.$(FASLEXT) strap-0/FAMR.$(FASLEXT): strap-0/AMR.$(FASLEXT) \ strap-0/FRETRCT.$(FASLEXT) @@ -1862,7 +1863,7 @@ strap-0/SUP.$(FASLEXT): strap-0/UPOLYC.$(FASLEXT) strap-0/PR.$(FASLEXT) strap-0/TABLE.$(FASLEXT): strap-0/TBAGG.$(FASLEXT) -strap-0/EQ.$(FASLEXT): strap-0/TYPE.$(FASLEXT) \ +strap-0/EQ.$(FASLEXT): strap-0/TYPE.$(FASLEXT) strap-0/FUNCTOR.$(FASLEXT) \ strap-0/IEVALAB.$(FASLEXT) strap-0/KOERCE.$(FASLEXT) \ strap-0/BOOLEAN.$(FASLEXT) strap-0/EVALAB.$(FASLEXT) \ strap-0/ABELSG.$(FASLEXT) strap-0/ABELGRP.$(FASLEXT) \ @@ -1883,7 +1884,7 @@ strap-0/SYNTAX.$(FASLEXT): strap-0/UTYPE.$(FASLEXT) \ strap-0/IDENT.$(FASLEXT) strap-0/STRING.$(FASLEXT) \ strap-0/KOERCE.$(FASLEXT) strap-0/INFORM.$(FASLEXT) -strap-0/FR.$(FASLEXT): strap-0/INTDOM.$(FASLEXT) \ +strap-0/FR.$(FASLEXT): strap-0/INTDOM.$(FASLEXT) strap-0/FUNCTOR.$(FASLEXT) \ strap-0/DIFEXT.$(FASLEXT) strap-0/FEVALAB.$(FASLEXT) \ strap-0/ALGEBRA.$(FASLEXT) strap-0/FRETRCT.$(FASLEXT) @@ -2060,11 +2061,12 @@ strap-1/HYPCAT.$(FASLEXT): strap-1/TYPE.$(FASLEXT) strap-1/AHYP.$(FASLEXT): strap-1/TYPE.$(FASLEXT) strap-1/ELEMFUN.$(FASLEXT): strap-1/TYPE.$(FASLEXT) -strap-1/IDPC.$(FASLEXT): strap-1/SETCAT.$(FASLEXT) +strap-1/IDPC.$(FASLEXT): strap-1/SETCAT.$(FASLEXT) strap-1/FUNCTOR.$(FASLEXT) strap-1/AMR.$(FASLEXT): strap-1/RING.$(FASLEXT) strap-1/BMODULE.$(FASLEXT) \ strap-1/ALGEBRA.$(FASLEXT) strap-1/FIELD.$(FASLEXT) \ - strap-1/CHARZ.$(FASLEXT) strap-1/CHARNZ.$(FASLEXT) + strap-1/CHARZ.$(FASLEXT) strap-1/CHARNZ.$(FASLEXT) \ + strap-1/FUNCTOR.$(FASLEXT) strap-1/FAMR.$(FASLEXT): strap-1/AMR.$(FASLEXT) \ strap-1/FRETRCT.$(FASLEXT) @@ -2455,11 +2457,12 @@ strap-2/HYPCAT.$(FASLEXT): strap-2/TYPE.$(FASLEXT) strap-2/AHYP.$(FASLEXT): strap-2/TYPE.$(FASLEXT) strap-2/ELEMFUN.$(FASLEXT): strap-2/TYPE.$(FASLEXT) -strap-2/IDPC.$(FASLEXT): strap-2/SETCAT.$(FASLEXT) +strap-2/IDPC.$(FASLEXT): strap-2/SETCAT.$(FASLEXT) strap-2/FUNCTOR.$(FASLEXT) strap-2/AMR.$(FASLEXT): strap-2/RING.$(FASLEXT) strap-2/BMODULE.$(FASLEXT) \ strap-2/ALGEBRA.$(FASLEXT) strap-2/FIELD.$(FASLEXT) \ - strap-2/CHARZ.$(FASLEXT) strap-2/CHARNZ.$(FASLEXT) + strap-2/CHARZ.$(FASLEXT) strap-2/CHARNZ.$(FASLEXT) \ + strap-2/FUNCTOR.$(FASLEXT) strap-2/FAMR.$(FASLEXT): strap-2/AMR.$(FASLEXT) \ strap-2/FRETRCT.$(FASLEXT) diff --git a/src/algebra/aggcat.spad.pamphlet b/src/algebra/aggcat.spad.pamphlet index df09311f..ae602dc3 100644 --- a/src/algebra/aggcat.spad.pamphlet +++ b/src/algebra/aggcat.spad.pamphlet @@ -2709,7 +2709,7 @@ BitAggregate(): Category == <<license>>= --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --All rights reserved. ---Copyright (C) 2007-2010, Gabriel Dos Reis. +--Copyright (C) 2007-2013, Gabriel Dos Reis. --All rights reserved. -- --Redistribution and use in source and binary forms, with or without diff --git a/src/algebra/array2.spad.pamphlet b/src/algebra/array2.spad.pamphlet index 6a7330dc..00450e5d 100644 --- a/src/algebra/array2.spad.pamphlet +++ b/src/algebra/array2.spad.pamphlet @@ -15,7 +15,7 @@ ++ Two dimensional array categories and domains ++ Author: ++ Date Created: 27 October 1989 -++ Date Last Updated: May 16, 2013 +++ Date Last Updated: May 19, 2013 ++ Keywords: array, data structure ++ Examples: ++ References: @@ -85,10 +85,6 @@ TwoDimensionalArrayCategory(R,Row,Col): Category == Definition where setColumn!: (%,Integer,Col) -> % ++ setColumn!(m,j,v) sets to jth column of m to v --% Map and Zip - map: (R -> R,%) -> % - ++ map(f,a) returns \spad{b}, where \spad{b(i,j) = f(a(i,j))} for all \spad{i, j} - map!: (R -> R,%) -> % - ++ map!(f,a) assign \spad{a(i,j)} to \spad{f(a(i,j))} for all \spad{i, j} map:((R,R) -> R,%,%) -> % ++ map(f,a,b) returns \spad{c}, where \spad{c(i,j) = f(a(i,j),b(i,j))} ++ for all \spad{i, j} diff --git a/src/algebra/derham.spad.pamphlet b/src/algebra/derham.spad.pamphlet index 1ff71c4c..babf6987 100644 --- a/src/algebra/derham.spad.pamphlet +++ b/src/algebra/derham.spad.pamphlet @@ -112,7 +112,7 @@ ExtAlgBasis(): Export == Implement where )abbrev domain ANTISYM AntiSymm ++ Author: Larry A. Lambe ++ Date : 01/26/91. -++ Revised : 30 Nov 94 +++ Revised : May 19, 2013. ++ ++ based on AntiSymmetric '89 ++ @@ -134,7 +134,7 @@ AntiSymm(R:Ring, lVar:List Symbol): Export == Implement where coef ==> c Term ==> Record(k:EAB,c:R) - Export == Join(LALG(R), RetractableTo(R)) with + Export == Join(LALG(R),RetractableTo(R),Functorial R) with leadingCoefficient : % -> R ++ leadingCoefficient(p) returns the leading ++ coefficient of antisymmetric polynomial p. @@ -164,10 +164,6 @@ AntiSymm(R:Ring, lVar:List Symbol): Export == Implement where ++ i.e., if degree(p) = 0. degree : % -> NNI ++ degree(p) returns the homogeneous degree of p. - map : (R -> R, %) -> % - ++ map(f,p) changes each coefficient of p by the - ++ application of f. - -- 1 corresponds to the empty monomial Nul = [0,...,0] -- from EAB. In terms of the exterior algebra on X, @@ -308,7 +304,7 @@ AntiSymm(R:Ring, lVar:List Symbol): Export == Implement where )abbrev domain DERHAM DeRhamComplex ++ Author: Larry A. Lambe ++ Date : 01/26/91. -++ Revised : 12/01/91. +++ Revised : May 19, 2013. ++ ++ based on code from '89 (AntiSymmetric) ++ @@ -332,7 +328,7 @@ DeRhamComplex(CoefRing,listIndVar:List Symbol): Export == Implement where O ==> OutputForm R ==> Expression(CoefRing) - Export == Join(LALG(R), RetractableTo(R)) with + Export == Join(LALG(R), RetractableTo(R),Functorial R) with leadingCoefficient : % -> R ++ leadingCoefficient(df) returns the leading ++ coefficient of differential form df. @@ -358,9 +354,6 @@ DeRhamComplex(CoefRing,listIndVar:List Symbol): Export == Implement where ++ i.e., if degree(df) = 0. degree : % -> I ++ degree(df) returns the homogeneous degree of differential form df. - map : (R -> R, %) -> % - ++ map(f,df) replaces each coefficient x of differential - ++ form df by \spad{f(x)}. totalDifferential : R -> % ++ totalDifferential(x) returns the total differential ++ (gradient) form for element x. @@ -417,6 +410,8 @@ DeRhamComplex(CoefRing,listIndVar:List Symbol): Export == Implement where <<license>>= --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --All rights reserved. +--Copyright (C) 2007-2013, Gabriel Dos Reis. +--All rights reversed. -- --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are diff --git a/src/algebra/equation2.spad.pamphlet b/src/algebra/equation2.spad.pamphlet index 7b810399..3f6dc30c 100644 --- a/src/algebra/equation2.spad.pamphlet +++ b/src/algebra/equation2.spad.pamphlet @@ -32,7 +32,7 @@ import List --FOR THE BENEFIT OF LIBAX0 GENERATION ++ Author: Stephen M. Watt, enhancements by Johannes Grabmeier ++ Date Created: April 1985 -++ Date Last Updated: June 3, 1991; September 2, 1992 +++ Date Last Updated: May 19, 2013. ++ Basic Operations: = ++ Related Domains: ++ Also See: @@ -50,7 +50,7 @@ import List Equation(S: Type): public == private where Ex ==> OutputForm - public ==> Type with + public == Functorial S with =: (S, S) -> $ ++ a=b creates an equation. equation: (S, S) -> $ @@ -61,9 +61,6 @@ Equation(S: Type): public == private where ++ lhs(eqn) returns the left hand side of equation eqn. rhs: $ -> S ++ rhs(eqn) returns the right hand side of equation eqn. - map: (S -> S, $) -> $ - ++ map(f,eqn) constructs a new equation by applying f to both - ++ sides of eqn. if S has InnerEvalable(Symbol,S) then InnerEvalable(Symbol,S) if S has SetCategory then @@ -273,7 +270,7 @@ import Equation )abbrev category FEVALAB FullyEvalableOver ++ Author: ++ Date Created: -++ Date Last Updated: June 3, 1991 +++ Date Last Updated: May 19, 2013 ++ Basic Operations: ++ Related Domains: Equation ++ Also See: @@ -284,9 +281,7 @@ import Equation ++ Description: ++ This category provides a selection of evaluation operations ++ depending on what the argument type R provides. -FullyEvalableOver(R:SetCategory): Category == with - map: (R -> R, $) -> $ - ++ map(f, ex) evaluates ex, applying f to values of type R in ex. +FullyEvalableOver(R:SetCategory): Category == Functorial R with if R has Eltable(R, R) then Eltable(R, $) if R has Evalable(R) then Evalable(R) if R has InnerEvalable(Symbol, R) then InnerEvalable(Symbol, R) @@ -307,6 +302,8 @@ FullyEvalableOver(R:SetCategory): Category == with <<license>>= --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --All rights reserved. +--Copyright (C) 2007-2013, Gabriel Dos Reis. +--All rights reserved. -- --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are diff --git a/src/algebra/exposed.lsp.pamphlet b/src/algebra/exposed.lsp.pamphlet index c0228db0..983557ab 100644 --- a/src/algebra/exposed.lsp.pamphlet +++ b/src/algebra/exposed.lsp.pamphlet @@ -551,6 +551,7 @@ (|FullyRetractableTo| . FRETRCT) (|FunctionFieldCategory| . FFCAT) (|FunctionSpace| . FS) + (|Functorial| . FUNCTOR) (|GcdDomain| . GCDDOM) (|GradedAlgebra| . GRALG) (|GradedModule| . GRMOD) diff --git a/src/algebra/fr.spad.pamphlet b/src/algebra/fr.spad.pamphlet index babaa801..fcdbf432 100644 --- a/src/algebra/fr.spad.pamphlet +++ b/src/algebra/fr.spad.pamphlet @@ -16,6 +16,7 @@ )abbrev domain FR Factored ++ Author: Robert S. Sutor ++ Date Created: 1985 +++ Date Last Modified: May 19, 2013. ++ Change History: ++ 21 Jan 1991 J Grabmeier Corrected a bug in exquo. ++ 16 Aug 1994 R S Sutor Improved convert to InputForm @@ -48,8 +49,8 @@ Factored(R: IntegralDomain): Exports == Implementation where FF ==> Record(flg: fUnion, fctr: R, xpnt: Integer) SRFE ==> Set(Record(factor:R, exponent:Integer)) - Exports ==> Join(IntegralDomain, DifferentialExtension R, Algebra R, - FullyEvalableOver R, FullyRetractableTo R) with + Exports == Join(IntegralDomain, DifferentialExtension R, Algebra R, + FullyEvalableOver R, FullyRetractableTo R,Functorial R) with expand: % -> R ++ expand(f) multiplies the unit and factors together, yielding an ++ "unfactored" object. Note: this is purposely not called \spadfun{coerce} which would @@ -126,12 +127,6 @@ Factored(R: IntegralDomain): Exports == Implementation where ++ For example, when working with factored integers, this operation will ++ ensure that the bases are all positive integers. - map: (R -> R, %) -> % - ++ map(fn,u) maps the function \userfun{fn} across the factors of - ++ \spadvar{u} and creates a new factored object. Note: this clears - ++ the information flags (sets them to "nil") because the effect of - ++ \userfun{fn} is clearly not known in general. - -- the following operations are conditional on R if R has GcdDomain then GcdDomain @@ -621,6 +616,8 @@ FactoredFunctions2(R, S): Exports == Implementation where <<license>>= --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --All rights reserved. +--Copyright (C) 2007-2013, Gabriel Dos Reis. +--All rights reserved. -- --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are diff --git a/src/algebra/indexedp.spad.pamphlet b/src/algebra/indexedp.spad.pamphlet index 1f3e6151..d97010d9 100644 --- a/src/algebra/indexedp.spad.pamphlet +++ b/src/algebra/indexedp.spad.pamphlet @@ -14,7 +14,7 @@ )abbrev category IDPC IndexedDirectProductCategory ++ Author: James Davenport, Gabriel Dos Reis ++ Date Created: -++ Date Last Updated: June 28, 2010 +++ Date Last Updated: May 19, 2013. ++ Basic Functions: ++ Related Constructors: ++ Also See: @@ -26,11 +26,8 @@ ++ respect to an ordered indexing set. IndexedDirectProductCategory(A:BasicType,S:OrderedType): Category == - Join(BasicType,ConvertibleFrom List IndexedProductTerm(A,S)) with + Join(BasicType,Functorial A,ConvertibleFrom List IndexedProductTerm(A,S)) with if A has SetCategory and S has SetCategory then SetCategory - map: (A -> A, %) -> % - ++ map(f,z) returns the new element created by applying the - ++ function f to each component of the direct product element z. monomial: (A, S) -> % ++ monomial(a,s) constructs a direct product element with the s ++ component set to \spad{a} diff --git a/src/algebra/ituple.spad.pamphlet b/src/algebra/ituple.spad.pamphlet index f441c9e8..0cf9c839 100644 --- a/src/algebra/ituple.spad.pamphlet +++ b/src/algebra/ituple.spad.pamphlet @@ -20,7 +20,7 @@ import Stream ++ Infinite tuples for the interpreter ++ Author: Clifton J. Williamson ++ Date Created: 16 February 1990 -++ Date Last Updated: February 5, 2011 +++ Date Last Updated: May 13, 2013. ++ Keywords: ++ Examples: ++ References: @@ -28,10 +28,7 @@ import Stream ++ This package implements 'infinite tuples' for the interpreter. ++ The representation is a stream. InfiniteTuple(S:Type): Exports == Implementation where - Exports == CoercibleTo OutputForm with - map: (S -> S, %) -> % - ++ map(f,t) replaces the tuple t - ++ by \spad{[f(x) for x in t]}. + Exports == Join(Functorial S,CoercibleTo OutputForm) with filterWhile: (S -> Boolean, %) -> % ++ filterWhile(p,t) returns \spad{[x for x in t while p(x)]}. filterUntil: (S -> Boolean, %) -> % @@ -113,6 +110,8 @@ InfiniteTupleFunctions3(A:Type, B:Type,C:Type): Exports <<license>>= --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --All rights reserved. +--Copyright (C) 2007-2013, Gabriel Dos Reis. +--All rights reserved. -- --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are diff --git a/src/algebra/matcat.spad.pamphlet b/src/algebra/matcat.spad.pamphlet index 6b4a56d5..f183082a 100644 --- a/src/algebra/matcat.spad.pamphlet +++ b/src/algebra/matcat.spad.pamphlet @@ -550,7 +550,7 @@ MatrixCategory(R,Row,Col): Category == Definition where )abbrev category RMATCAT RectangularMatrixCategory ++ Authors: Grabmeier, Gschnitzer, Williamson ++ Date Created: 1987 -++ Date Last Updated: July 1990 +++ Date Last Updated: May 19, 2013. ++ Basic Operations: ++ Related Domains: RectangularMatrix(m,n,R) ++ Also See: @@ -643,9 +643,6 @@ RectangularMatrixCategory(m,n,R,Row,Col): Category == Definition where ++ Error: if the index outside the proper range. --% Map and Zip - - map: (R -> R,%) -> % - ++ \spad{map(f,a)} returns b, where \spad{b(i,j) = a(i,j)} for all i, j. map:((R,R) -> R,%,%) -> % ++ \spad{map(f,a,b)} returns c, where c is such that ++ \spad{c(i,j) = f(a(i,j),b(i,j))} for all \spad{i}, j. diff --git a/src/algebra/mring.spad.pamphlet b/src/algebra/mring.spad.pamphlet index 9521b586..8eafac0a 100644 --- a/src/algebra/mring.spad.pamphlet +++ b/src/algebra/mring.spad.pamphlet @@ -14,7 +14,7 @@ )abbrev domain MRING MonoidRing ++ Authors: Stephan M. Watt; revised by Johannes Grabmeier ++ Date Created: January 1986 -++ Date Last Updated: 14 December 1995, Mike Dewar +++ Date Last Updated: May 13, 2013. ++ Basic Operations: *, +, monomials, coefficients ++ Related Constructors: Polynomial ++ Also See: @@ -42,7 +42,7 @@ MonoidRing(R: Ring, M: Monoid): MRcategory == MRdefinition where Term ==> Record(coef: R, monom: M) - MRcategory ==> Join(Ring, RetractableTo M, RetractableTo R) with + MRcategory == Join(Ring,RetractableTo M,RetractableTo R,Functorial R) with monomial : (R, M) -> % ++ monomial(r,m) creates a scalar multiple of the basis element m. coefficient : (%, M) -> R @@ -54,9 +54,6 @@ MonoidRing(R: Ring, M: Monoid): MRcategory == MRdefinition where ++ terms(f) gives the list of non-zero coefficients combined ++ with their corresponding basis element as records. ++ This is the internal representation. - map : (R -> R, %) -> % - ++ map(fn,u) maps function fn onto the coefficients - ++ of the non-zero monomials of u. monomial? : % -> Boolean ++ monomial?(f) tests if f is a single monomial. coefficients: % -> List R @@ -361,6 +358,8 @@ MonoidRingFunctions2(R,S,M) : Exports == Implementation where <<license>>= --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --All rights reserved. +--Copyright (C) 2007-2013, Gabriel Dos Reis. +--All rights reserved. -- --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are diff --git a/src/algebra/polycat.spad.pamphlet b/src/algebra/polycat.spad.pamphlet index b56c9a97..b9780274 100644 --- a/src/algebra/polycat.spad.pamphlet +++ b/src/algebra/polycat.spad.pamphlet @@ -14,7 +14,7 @@ )abbrev category AMR AbelianMonoidRing ++ Author: ++ Date Created: -++ Date Last Updated: +++ Date Last Updated: May 19, 2013. ++ Basic Functions: ++ Related Constructors: ++ Also See: @@ -33,16 +33,13 @@ ++ Conceptually at least, only the non-zero terms are ever operated on. AbelianMonoidRing(R:Ring, E:OrderedAbelianMonoid): Category == - Join(Ring,BiModule(R,R)) with + Join(Ring,BiModule(R,R),Functorial R) with leadingCoefficient: % -> R ++ leadingCoefficient(p) returns the coefficient highest degree term of p. leadingMonomial: % -> % ++ leadingMonomial(p) returns the monomial of p with the highest degree. degree: % -> E ++ degree(p) returns the maximum of the exponents of the terms of p. - map: (R -> R, %) -> % - ++ map(fn,u) maps function fn onto the coefficients - ++ of the non-zero monomials of u. monomial?: % -> Boolean ++ monomial?(p) tests if p is a single monomial. monomial: (R,E) -> % @@ -1100,6 +1097,8 @@ CommuteUnivariatePolynomialCategory(R, UP, UPUP): Exports == Impl where <<license>>= --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --All rights reserved. +--Copyright (C) 2007-2013, Gabriel Dos Reis. +--All rights reserved. -- --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are diff --git a/src/algebra/xpoly.spad.pamphlet b/src/algebra/xpoly.spad.pamphlet index 249a5e0e..b2021bf8 100644 --- a/src/algebra/xpoly.spad.pamphlet +++ b/src/algebra/xpoly.spad.pamphlet @@ -142,7 +142,7 @@ import RetractableTo )abbrev category FMCAT FreeModuleCat ++ Author: Michel Petitot petitot@lifl.fr ++ Date Created: 91 -++ Date Last Updated: 7 Juillet 92 +++ Date Last Updated: May 19, 2013. ++ Fix History: compilation v 2.1 le 13 dec 98 ++ Basic Functions: ++ Related Constructors: @@ -168,15 +168,12 @@ FreeModuleCat(R, Basis):Category == Exports where Basis: SetCategory TERM ==> Record(k: Basis, c: R) - Exports == Join(BiModule(R,R), RetractableTo Basis) with + Exports == Join(Functorial R,BiModule(R,R),RetractableTo Basis) with * : (R, Basis) -> % ++ \spad{r*b} returns the product of \spad{r} by \spad{b}. coefficient : (%, Basis) -> R ++ \spad{coefficient(x,b)} returns the coefficient ++ of \spad{b} in \spad{x}. - map : (R -> R, %) -> % - ++ \spad{map(fn,u)} maps function \spad{fn} onto the coefficients - ++ of the non-zero monomials of \spad{u}. monom : (Basis, R) -> % ++ \spad{monom(b,r)} returns the element with the single monomial ++ \spad{b} and coefficient \spad{r}. @@ -362,7 +359,7 @@ import RetractableTo )abbrev category XFALG XFreeAlgebra ++ Author: Michel Petitot petitot@lifl.fr ++ Date Created: 91 -++ Date Last Updated: 7 Juillet 92 +++ Date Last Updated: May 19, 2013. ++ Fix History: compilation v 2.1 le 13 dec 98 ++ Basic Functions: ++ Related Constructors: @@ -381,7 +378,7 @@ XFreeAlgebra(vl:OrderedSet,R:Ring):Category == Catdef where I ==> Integer TERM ==> Record(k: WORD, c: R) - Catdef == Join(Ring, XAlgebra(R), RetractableTo WORD) + Catdef == Join(Ring, XAlgebra(R), Functorial R,RetractableTo WORD) with *: (vl,%) -> % ++ \spad{v * x} returns the product of a variable \spad{x} by \spad{x}. @@ -432,8 +429,6 @@ XFreeAlgebra(vl:OrderedSet,R:Ring):Category == Catdef where ++ This multiplication is associative and commutative. sh :(%,NNI) -> % ++ \spad{sh(x,n)} returns the shuffle power of \spad{x} to the \spad{n}. - map : (R -> R, %) -> % - ++ \spad{map(fn,x)} returns \spad{Sum(fn(r_i) w_i)} if \spad{x} writes \spad{Sum(r_i w_i)}. varList: % -> List vl ++ \spad{varList(x)} returns the list of variables which appear in \spad{x}. @@ -488,7 +483,7 @@ import FreeMonoidCat )abbrev domain XPR XPolynomialRing ++ Author: Michel Petitot petitot@lifl.fr ++ Date Created: 91 -++ Date Last Updated: 7 Juillet 92 +++ Date Last Updated: May 13, 2013. ++ Fix History: compilation v 2.1 le 13 dec 98 ++ Basic Functions: ++ Related Constructors: @@ -509,7 +504,7 @@ XPolynomialRing(R:Ring,E:OrderedMonoid): T == C where EX ==> OutputForm NNI ==> NonNegativeInteger - T == Join(Ring, XAlgebra(R), FreeModuleCat(R,E),CoercibleFrom E) with + T == Join(Ring,XAlgebra(R),FreeModuleCat(R,E),CoercibleFrom E,Functorial R) with --operations *: (%,R) -> % ++ \spad{p*r} returns the product of \spad{p} by \spad{r}. @@ -536,8 +531,6 @@ XPolynomialRing(R:Ring,E:OrderedMonoid): T == C where ++ \spad{quasiRegular?(x)} return true if \spad{constant(p)} is zero. quasiRegular : % -> % ++ \spad{quasiRegular(x)} return \spad{x} minus its constant term. - map : (R -> R, %) -> % - ++ \spad{map(fn,x)} returns \spad{Sum(fn(r_i) w_i)} if \spad{x} writes \spad{Sum(r_i w_i)}. if R has Field then / : (%,R) -> % ++ \spad{p/r} returns \spad{p*(1/r)}. @@ -1097,6 +1090,8 @@ XPolynomial(R:Ring) == XRecursivePolynomial(Symbol, R) <<license>>= --Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. --All rights reserved. +--Copyright (C) 2007-2013, Gabriel Dos Reis. +--All rights reserved. -- --Redistribution and use in source and binary forms, with or without --modification, are permitted provided that the following conditions are |