[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-developer] [Sanbox Functional Addition] (new)

From: Bill Page
Subject: [Axiom-developer] [Sanbox Functional Addition] (new)
Date: Tue, 28 Jun 2005 14:28:18 -0500

This library code is based directly on MappingPackage3 in

)abbrev package MAPHAC2X MapPackInternalHac2x
++ Description:
++ This package defines the function to be returned by
++ functional operator below.

MapPackInternalHac2x(A: SetCategory, B: Ring):
  MPcat == MPdef where

    MPcat == with
        addit:  (A->B, A->B, A) -> B
          ++\spad{comp(f,g,x)} is \spad{f(g x)}.

    MPdef == add
        addit(g,h,x)  == ((g x) + (h x))$B

)abbrev package MAPPK2X MappingPackage2x
++ Description: various Currying operations.
MappingPackage2x(A:SetCategory, B:Ring):
  MPcat == MPdef where

    MPcat ==  with

        "+":   (A->B, A->B) -> (A->B)
          ++\spad{f+g} is the function \spad{h}
          ++ such that \spad{h x = f x + g x}.

    MPdef == add

        MapPackInternalHac2x(A, B)

        fab:  A -> B

        -- Functional addition
        fab+fab == addit(fab,fab,#1)


f := (x:INT):INT +-> 3*x
g := (x:INT):INT +-> 2*x+3

forwarded from

reply via email to

[Prev in Thread] Current Thread [Next in Thread]