The direct product of two functions over the same domain is another function over that domain whose co-domain is the product of the co-domains their co-domains. Axiom makes this a little awkward because it currently does not properly support non-homogeneous tuples (Tuple ANY) as the output of functions (i.e. co-domains that are general products). We use Axiom's Record type below. It is also possible to write this using non-homogeneous Lists or DirectProducts?. fricas )abbrev package MAPHAC3X MapPackInternalHac3x ++ Description: Mapping hack for Addition ++ The function \spad{fDirPrd(f, fricas Compiling FriCAS source code from file /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/5523093780900071215-25px.001.spad using old system compiler. MAPHAC3X abbreviates package MapPackInternalHac3x ------------------------------------------------------------------------ initializing NRLIB MAPHAC3X for MapPackInternalHac3x compiling into NRLIB MAPHAC3X compiling exported fDirPrd : (A -> B, fricas )abbrev package MAPPK3X MappingPackage3x ++ Description: Functional Direct Product ++ Given functions f:A->B and g:A->C, fricas Compiling FriCAS source code from file /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/6114962443719445214-25px.002.spad using old system compiler. MAPPK3X abbreviates package MappingPackage3x ------------------------------------------------------------------------ initializing NRLIB MAPPK3X for MappingPackage3x compiling into NRLIB MAPPK3X importing MapPackInternalHac3x(A, Test the product with two functions f and g. fricas f := (x:INT):INT +-> 3*x
Type: (Integer -> Integer)fricas g := (x:INT):INT +-> x^3
Type: (Integer -> Integer)fricas fg:=(f &X g)
Type: (Integer -> Record(a: Integer,fricas fg(3)
Type: Record(a: Integer,Since the result of the functional direct product is a function whose co-domain is a Record, for functional composition we need to write a function whose domain is a Record, i.e. so that it takes as input the data output output by another function. fricas s := (x:Record(a:INT,
Type: (Record(a: Integer,fricas sX := (s * (f &X g))
Type: (Integer -> Integer)fricas sX(9)
Type: PositiveIntegerFrom William Sit, July 1, 2005 7:46:00 -5:00 The Cartesian Product of two domains is implemented in fricas h(x:INT):Product(INT, Type: Voidfricas h(3) fricas Compiling function h with type Integer -> Product(Integer,
Type: Product(Integer,Or, if you really want to make a package out of this: fricas )abbrev package FUNCPROD FunctionalProduct ++ Description: Allows making one function out of two components ++ The function \spad{product(f, fricas Compiling FriCAS source code from file /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/3755633970012740168-25px.006.spad using old system compiler. FUNCPROD abbreviates package FunctionalProduct ------------------------------------------------------------------------ initializing NRLIB FUNCPROD for FunctionalProduct compiling into NRLIB FUNCPROD compiling exported product : (A -> B, fricas k:=product(f,
Type: (Integer -> Product(Integer,fricas k(3)
Type: Product(Integer,The Cartesian Product of two domains is implemented in Product. The DirectProduct? domain is when the component domains are all the same. You worked too hard. The "product" of two functions can be defined on the fly naturally ... I have not been able to find any documentation about this domain in the Axiom Book. Did I just miss it? So now I want to know how the domain Product relates to tuples. Really from the point of view of category theory we want a tuple to be a member of an n-ary Product. Still the use of Product for 2-tuples is quite straightforward. For example: fricas )expose Product Type: Voidfricas g([1, fricas Compiling function g with type List(Float) -> List(Float)
Type: List(Float) |

Product is exactly what I was looking for!--Bill Page, Fri, 01 Jul 2005 11:10:11 -0500 reply