login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBox Mapping revision 2 of 3

1 2 3
Editor: Bill Page
Time: 2008/06/17 17:11:47 GMT-7
Note: OpenAxiom version

added:

From BillPage Tue Jun 17 17:11:47 -0700 2008
From: Bill Page
Date: Tue, 17 Jun 2008 17:11:47 -0700
Subject: OpenAxiom version
Message-ID: <20080617171147-0700@axiom-wiki.newsynthesis.org>

Try this is Axiom SandBoxAxiomMapping

This domain provides a function-like type that can be queried for domain and co-domain.

aldor
#include "axiom.as" T ==> SetCategory; Signature(source:T, target:T): with { domain:%->T; codomain:%->T; coerce:(source->target) -> %; coerce:%->(source->target); coerce:%->OutputForm; } == (source->target) add { Rep == (source->target); domain(p:%):T == source; codomain(p:%):T == target; coerce(r:(source->target)):% == per(r); coerce(p:%):(source->target) == p pretend (source->target); coerce(p:%):OutputForm == p pretend OutputForm; };
aldor
   Compiling FriCAS source code from file 
      /var/zope2/var/LatexWiki/sig.as using AXIOM-XL compiler and 
      options 
-O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -Y $AXIOM/algebra
      Use the system command )set compiler args to change these 
      options.
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
"/var/zope2/var/LatexWiki/sig.as", line 13: 
  domain(p:%):T == source;
.........^
[L13 C10] #2 (Warning) Function returns a domain that might not be constant (which may cause problems if it is used in a dependent type).
"/var/zope2/var/LatexWiki/sig.as", line 14: 
  codomain(p:%):T == target;
...........^
[L14 C12] #3 (Warning) Function returns a domain that might not be constant (which may cause problems if it is used in a dependent type).
   Compiling Lisp source code from file ./sig.lsp
   Issuing )library command for sig
   Reading /var/zope2/var/LatexWiki/sig.asy
   Signature is now explicitly exposed in frame initial 
   Signature will be automatically loaded when needed from 
      /var/zope2/var/LatexWiki/sig

aldor
#include "axiom.as" T ==> SetCategory; Signature2(source1:T, source2:T, target:T): with { domain:%->T; codomain:%->T; coerce:((source1,source2)->target) -> %; coerce:%->((source1,source2)->target); coerce:%->OutputForm; } == ((source1,source2)->target) add { Rep == ((source1,source2)->target); domain(p:%):T == Product(source1,source2); codomain(p:%):T == target; coerce(r:(source1,source2)->target):% == per(r); coerce(p:%):((source1,source2)->target) == p pretend ((source1,source2)->target); coerce(p:%):OutputForm == p pretend OutputForm; }
aldor
   Compiling FriCAS source code from file 
      /var/zope2/var/LatexWiki/sig2.as using AXIOM-XL compiler and 
      options 
-O -Fasy -Fao -Flsp -laxiom -Mno-AXL_W_WillObsolete -DAxiom -Y $AXIOM/algebra
      Use the system command )set compiler args to change these 
      options.
#1 (Warning) Deprecated message prefix: use `ALDOR_' instead of `_AXL'
"/var/zope2/var/LatexWiki/sig2.as", line 13: 
  domain(p:%):T == Product(source1,source2);
.........^
[L13 C10] #2 (Warning) Function returns a domain that might not be constant (which may cause problems if it is used in a dependent type).
"/var/zope2/var/LatexWiki/sig2.as", line 14: 
  codomain(p:%):T == target;
...........^
[L14 C12] #3 (Warning) Function returns a domain that might not be constant (which may cause problems if it is used in a dependent type).
   Compiling Lisp source code from file ./sig2.lsp
   Issuing )library command for sig2
   Reading /var/zope2/var/LatexWiki/sig2.asy
   Signature2 is now explicitly exposed in frame initial 
   Signature2 will be automatically loaded when needed from 
      /var/zope2/var/LatexWiki/sig2

axiom
f:Signature(Float, Integer)
Type: Void
axiom
f:=(x:Float):Integer +-> floor(x)
LatexWiki Image(1)
Type: Signature(Float,Integer)
axiom
domain f
LatexWiki Image(2)
Type: SetCategory?
axiom
codomain f
LatexWiki Image(3)
Type: SetCategory?
axiom
(f::(Float->Integer))
LatexWiki Image(4)
Type: (Float -> Integer)
axiom
(f::(Float->Integer)) 2.2
LatexWiki Image(5)
Type: PositiveInteger?

axiom
f2:Signature2(Float,Float, Float)
Type: Void
axiom
f2:=(x:Float,y:Float):Float +-> x+y
LatexWiki Image(6)
Type: Signature2(Float,Float,Float)
axiom
domain f2
LatexWiki Image(7)
Type: SetCategory?
axiom
codomain f2
LatexWiki Image(8)
Type: SetCategory?
axiom
f2::((Float,Float)->Float)
LatexWiki Image(9)
Type: ((Float,Float) -> Float)
axiom
(f2::((Float,Float)->Float))(1.2,2.1)
LatexWiki Image(10)
Type: Float

OpenAxiom? version --Bill Page, Tue, 17 Jun 2008 17:11:47 -0700 reply
Try this is Axiom SandBoxAxiomMapping?