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)
Type: Signature(Float,Integer)
axiom
domain f
axiom
codomain f
axiom
(f::(Float->Integer))
Type: (Float -> Integer)
axiom
(f::(Float->Integer)) 2.2
axiom
f2:Signature2(Float,Float, Float)
Type: Void
axiom
f2:=(x:Float,y:Float):Float +-> x+y
Type: Signature2(Float,Float,Float)
axiom
domain f2
axiom
codomain f2
axiom
f2::((Float,Float)->Float)
Type: ((Float,Float) -> Float)
axiom
(f2::((Float,Float)->Float))(1.2,2.1)
Type: Float