diff --git a/books/bookvol10.3.pamphlet b/books/bookvol10.3.pamphlet index 6e40e02..bb7e3c8 100644 --- a/books/bookvol10.3.pamphlet +++ b/books/bookvol10.3.pamphlet @@ -79164,6 +79164,95 @@ PrimitiveArray(S:Type): OneDimensionalArrayAggregate S == add @ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{domain PRODUCT Product} +<>= +)set break resume +)sys rm -f Product.output +)spool Product.output +)set message test on +)set message auto off +)clear all + +--S 1 of 6 +f:=(x:INT):INT +-> 3*x +--R +--R +--R (1) theMap(Closure) +--R Type: (Integer -> Integer) +--E 1 + +--S 2 of 6 +f(3) +--R +--R +--R (2) 9 +--R Type: PositiveInteger +--E 2 + +--S 3 of 6 +g:=(x:INT):INT +-> x^3 +--R +--R +--R (3) theMap(Closure) +--R Type: (Integer -> Integer) +--E 3 + +--S 4 of 6 +g(3) +--R +--R +--R (4) 27 +--R Type: PositiveInteger +--E 4 + +--S 5 of 6 +h(x:INT):Product(INT,INT) == makeprod(f x, g x) +--R +--R Function declaration h : Integer -> Product(Integer,Integer) has +--R been added to workspace. +--R Type: Void +--E 5 + +--S 6 of 6 +h(3) +--R +--R Compiling function h with type Integer -> Product(Integer,Integer) +--R +--R (6) (9,27) +--R Type: Product(Integer,Integer) +--E 6 + +)spool +)lisp (bye) +@ +<>= +==================================================================== +Product examples +==================================================================== + +The direct product of two functions over the same domain is +another function over that domain whose co-domain is the product +of their co-domains. + +So we can define two functions, f and g, that go from INT -> INT + + f:=(x:INT):INT +-> 3*x + g:=(x:INT):INT +-> x^3 + +so + f(3) is 9 + g(3) is 27 + +and we can construct the direct product of those functions h=f,g + + h(x:INT):Product(INT,INT) == makeprod(f x, g x) + +so + h(3) is (9,27) + +See Also: +o )show Product + +@ \pagehead{Product}{PRODUCT} \pagepic{ps/v103product.ps}{PRODUCT}{1.00} diff --git a/changelog b/changelog index cce7da1..4181614 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,6 @@ +20091028 tpd src/axiom-website/patches.html 20091028.05.tpd.patch +20091028 tpd src/algebra/Makefile add Product.help +20091028 tpd books/bookvol10.3 Product.input, .help 20091028 tpd src/axiom-website/patches.html 20091028.04.tpd.patch 20091028 tpd src/input/Makefile add finitegraph.input 20091028 tpd src/input/finitegraph.input added diff --git a/src/algebra/Makefile.pamphlet b/src/algebra/Makefile.pamphlet index c9fe4f1..b9ed5b2 100644 --- a/src/algebra/Makefile.pamphlet +++ b/src/algebra/Makefile.pamphlet @@ -16495,7 +16495,8 @@ SPADHELP=\ ${HELP}/PlaneAlgebraicCurvePlot.help ${HELP}/Plot.help \ ${HELP}/PartialFraction.help \ ${HELP}/Permanent.help ${HELP}/Permutation.help \ - ${HELP}/Polynomial.help ${HELP}/Quaternion.help \ + ${HELP}/Polynomial.help ${HELP}/Product.help \ + ${HELP}/Quaternion.help \ ${HELP}/QuaternionCategoryFunctions2.help \ ${HELP}/Queue.help \ ${HELP}/RadixExpansion.help ${HELP}/RealClosure.help \ @@ -16579,6 +16580,7 @@ REGRESS= Any.regress \ PartialFraction.regress \ Permanent.regress Permutation.regress \ PlaneAlgebraicCurvePlot.regress Plot.regress \ + Product.regress \ Polynomial.regress Quaternion.regress \ QuaternionCategoryFunctions2.regress \ Queue.regress \ @@ -17595,6 +17597,15 @@ ${HELP}/Polynomial.help: ${BOOKS}/bookvol10.3.pamphlet >${INPUT}/Polynomial.input @echo "Polynomial (POLY)" >>${HELPFILE} +${HELP}/Product.help: ${BOOKS}/bookvol10.3.pamphlet + @echo 7935 create Product.help from ${BOOKS}/bookvol10.3.pamphlet + @${TANGLE} -R"Product.help" ${BOOKS}/bookvol10.3.pamphlet \ + >${HELP}/Product.help + @cp ${HELP}/Product.help ${HELP}/PRODUCT.help + @${TANGLE} -R"Product.input" ${BOOKS}/bookvol10.3.pamphlet \ + >${INPUT}/Product.input + @echo "Product (PRODUCT)" >>${HELPFILE} + ${HELP}/Quaternion.help: ${BOOKS}/bookvol10.3.pamphlet @echo 7940 create Quaternion.help from ${BOOKS}/bookvol10.3.pamphlet @${TANGLE} -R"Quaternion.help" ${BOOKS}/bookvol10.3.pamphlet \ diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html index e0493a9..34d90bf 100644 --- a/src/axiom-website/patches.html +++ b/src/axiom-website/patches.html @@ -2187,5 +2187,7 @@ src/input/nonlinhomodiffeq.input added
src/input/newtonlisp.input added
20091028.04.tpd.patch src/input/finitegraph.input added
+20091028.05.tpd.patch +books/bookvol10.3 Product.input, Product.help