aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/cden.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
committerdos-reis <gdr@axiomatics.org>2007-08-14 05:14:52 +0000
commitab8cc85adde879fb963c94d15675783f2cf4b183 (patch)
treec202482327f474583b750b2c45dedfc4e4312b1d /src/algebra/cden.spad.pamphlet
downloadopen-axiom-ab8cc85adde879fb963c94d15675783f2cf4b183.tar.gz
Initial population.
Diffstat (limited to 'src/algebra/cden.spad.pamphlet')
-rw-r--r--src/algebra/cden.spad.pamphlet238
1 files changed, 238 insertions, 0 deletions
diff --git a/src/algebra/cden.spad.pamphlet b/src/algebra/cden.spad.pamphlet
new file mode 100644
index 00000000..55d3e924
--- /dev/null
+++ b/src/algebra/cden.spad.pamphlet
@@ -0,0 +1,238 @@
+\documentclass{article}
+\usepackage{axiom}
+\begin{document}
+\title{\$SPAD/src/algebra cden.spad}
+\author{Manuel Bronstein}
+\maketitle
+\begin{abstract}
+\end{abstract}
+\eject
+\tableofcontents
+\eject
+\section{package ICDEN InnerCommonDenominator}
+<<package ICDEN InnerCommonDenominator>>=
+)abbrev package ICDEN InnerCommonDenominator
+--% InnerCommonDenominator
+++ Author: Manuel Bronstein
+++ Date Created: 2 May 1988
+++ Date Last Updated: 22 Nov 1989
+++ Description: InnerCommonDenominator provides functions to compute
+++ the common denominator of a finite linear aggregate of elements
+++ of the quotient field of an integral domain.
+++ Keywords: gcd, quotient, common, denominator.
+InnerCommonDenominator(R, Q, A, B): Exports == Implementation where
+ R: IntegralDomain
+ Q: QuotientFieldCategory R
+ A: FiniteLinearAggregate R
+ B: FiniteLinearAggregate Q
+
+ Exports ==> with
+ commonDenominator: B -> R
+ ++ commonDenominator([q1,...,qn]) returns a common denominator
+ ++ d for q1,...,qn.
+ clearDenominator : B -> A
+ ++ clearDenominator([q1,...,qn]) returns \spad{[p1,...,pn]} such that
+ ++ \spad{qi = pi/d} where d is a common denominator for the qi's.
+ splitDenominator : B -> Record(num: A, den: R)
+ ++ splitDenominator([q1,...,qn]) returns
+ ++ \spad{[[p1,...,pn], d]} such that
+ ++ \spad{qi = pi/d} and d is a common denominator for the qi's.
+
+ Implementation ==> add
+ import FiniteLinearAggregateFunctions2(Q, B, R, A)
+
+ clearDenominator l ==
+ d := commonDenominator l
+ map(numer(d * #1), l)
+
+ splitDenominator l ==
+ d := commonDenominator l
+ [map(numer(d * #1), l), d]
+
+ if R has GcdDomain then
+ commonDenominator l == reduce(lcm, map(denom, l),1)
+ else
+ commonDenominator l == reduce("*", map(denom, l), 1)
+
+@
+\section{package CDEN CommonDenominator}
+<<package CDEN CommonDenominator>>=
+)abbrev package CDEN CommonDenominator
+--% CommonDenominator
+++ Author: Manuel Bronstein
+++ Date Created: 2 May 1988
+++ Date Last Updated: 22 Nov 1989
+++ Description: CommonDenominator provides functions to compute the
+++ common denominator of a finite linear aggregate of elements of
+++ the quotient field of an integral domain.
+++ Keywords: gcd, quotient, common, denominator.
+CommonDenominator(R, Q, A): Exports == Implementation where
+ R: IntegralDomain
+ Q: QuotientFieldCategory R
+ A: FiniteLinearAggregate Q
+
+ Exports ==> with
+ commonDenominator: A -> R
+ ++ commonDenominator([q1,...,qn]) returns a common denominator
+ ++ d for q1,...,qn.
+ clearDenominator : A -> A
+ ++ clearDenominator([q1,...,qn]) returns \spad{[p1,...,pn]} such that
+ ++ \spad{qi = pi/d} where d is a common denominator for the qi's.
+ splitDenominator : A -> Record(num: A, den: R)
+ ++ splitDenominator([q1,...,qn]) returns
+ ++ \spad{[[p1,...,pn], d]} such that
+ ++ \spad{qi = pi/d} and d is a common denominator for the qi's.
+
+ Implementation ==> add
+ clearDenominator l ==
+ d := commonDenominator l
+ map(numer(d * #1)::Q, l)
+
+ splitDenominator l ==
+ d := commonDenominator l
+ [map(numer(d * #1)::Q, l), d]
+
+ if R has GcdDomain then
+ qlcm: (Q, Q) -> Q
+
+ qlcm(a, b) == lcm(numer a, numer b)::Q
+ commonDenominator l == numer reduce(qlcm, map(denom(#1)::Q, l), 1)
+ else
+ commonDenominator l == numer reduce("*", map(denom(#1)::Q, l), 1)
+
+@
+\section{package UPCDEN UnivariatePolynomialCommonDenominator}
+<<package UPCDEN UnivariatePolynomialCommonDenominator>>=
+)abbrev package UPCDEN UnivariatePolynomialCommonDenominator
+--% UnivariatePolynomialCommonDenominator
+++ Author: Manuel Bronstein
+++ Date Created: 2 May 1988
+++ Date Last Updated: 22 Feb 1990
+++ Description: UnivariatePolynomialCommonDenominator provides
+++ functions to compute the common denominator of the coefficients of
+++ univariate polynomials over the quotient field of a gcd domain.
+++ Keywords: gcd, quotient, common, denominator, polynomial.
+
+UnivariatePolynomialCommonDenominator(R, Q, UP): Exports == Impl where
+ R : IntegralDomain
+ Q : QuotientFieldCategory R
+ UP: UnivariatePolynomialCategory Q
+
+ Exports ==> with
+ commonDenominator: UP -> R
+ ++ commonDenominator(q) returns a common denominator d for
+ ++ the coefficients of q.
+ clearDenominator : UP -> UP
+ ++ clearDenominator(q) returns p such that \spad{q = p/d} where d is
+ ++ a common denominator for the coefficients of q.
+ splitDenominator : UP -> Record(num: UP, den: R)
+ ++ splitDenominator(q) returns \spad{[p, d]} such that \spad{q = p/d} and d
+ ++ is a common denominator for the coefficients of q.
+
+ Impl ==> add
+ import CommonDenominator(R, Q, List Q)
+
+ commonDenominator p == commonDenominator coefficients p
+
+ clearDenominator p ==
+ d := commonDenominator p
+ map(numer(d * #1)::Q, p)
+
+ splitDenominator p ==
+ d := commonDenominator p
+ [map(numer(d * #1)::Q, p), d]
+
+@
+\section{package MCDEN MatrixCommonDenominator}
+<<package MCDEN MatrixCommonDenominator>>=
+)abbrev package MCDEN MatrixCommonDenominator
+--% MatrixCommonDenominator
+++ Author: Manuel Bronstein
+++ Date Created: 2 May 1988
+++ Date Last Updated: 20 Jul 1990
+++ Description: MatrixCommonDenominator provides functions to
+++ compute the common denominator of a matrix of elements of the
+++ quotient field of an integral domain.
+++ Keywords: gcd, quotient, matrix, common, denominator.
+MatrixCommonDenominator(R, Q): Exports == Implementation where
+ R: IntegralDomain
+ Q: QuotientFieldCategory R
+
+ VR ==> Vector R
+ VQ ==> Vector Q
+
+ Exports ==> with
+ commonDenominator: Matrix Q -> R
+ ++ commonDenominator(q) returns a common denominator d for
+ ++ the elements of q.
+ clearDenominator : Matrix Q -> Matrix R
+ ++ clearDenominator(q) returns p such that \spad{q = p/d} where d is
+ ++ a common denominator for the elements of q.
+ splitDenominator : Matrix Q -> Record(num: Matrix R, den: R)
+ ++ splitDenominator(q) returns \spad{[p, d]} such that \spad{q = p/d} and d
+ ++ is a common denominator for the elements of q.
+
+ Implementation ==> add
+ import ListFunctions2(Q, R)
+ import MatrixCategoryFunctions2(Q,VQ,VQ,Matrix Q,R,VR,VR,Matrix R)
+
+ clearDenominator m ==
+ d := commonDenominator m
+ map(numer(d * #1), m)
+
+ splitDenominator m ==
+ d := commonDenominator m
+ [map(numer(d * #1), m), d]
+
+ if R has GcdDomain then
+ commonDenominator m == lcm map(denom, parts m)
+ else
+ commonDenominator m == reduce("*",map(denom, parts m),1)$List(R)
+
+@
+\section{License}
+<<license>>=
+--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
+--All rights reserved.
+--
+--Redistribution and use in source and binary forms, with or without
+--modification, are permitted provided that the following conditions are
+--met:
+--
+-- - Redistributions of source code must retain the above copyright
+-- notice, this list of conditions and the following disclaimer.
+--
+-- - Redistributions in binary form must reproduce the above copyright
+-- notice, this list of conditions and the following disclaimer in
+-- the documentation and/or other materials provided with the
+-- distribution.
+--
+-- - Neither the name of The Numerical ALgorithms Group Ltd. nor the
+-- names of its contributors may be used to endorse or promote products
+-- derived from this software without specific prior written permission.
+--
+--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+@
+<<*>>=
+<<license>>
+
+<<package ICDEN InnerCommonDenominator>>
+<<package CDEN CommonDenominator>>
+<<package UPCDEN UnivariatePolynomialCommonDenominator>>
+<<package MCDEN MatrixCommonDenominator>>
+@
+\eject
+\begin{thebibliography}{99}
+\bibitem{1} nothing
+\end{thebibliography}
+\end{document}