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

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/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/sig.as using 
      AXIOM-XL compiler and options 
-O -Fasy -Fao -Flsp -laxiom -Mno-ALDOR_W_WillObsolete -DAxiom -Y $AXIOM/algebra -I $AXIOM/algebra
      Use the system command )set compiler args to change these 
      options.
#1 (Warning) Could not use archive file `libaxiom.al'.
#2 (Warning) Could not use archive file `libaxiom.al'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 4: 
import from AxiomLib;
............^
[L4 C13] #3 (Error) No meaning for identifier `AxiomLib'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 15: import { true: %, false: % } from Boolean; ..................................^ [L15 C35] #4 (Error) No meaning for identifier `Boolean'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 17: string: Literal -> %; ........................^.......^ [L17 C25] #5 (Error) No meaning for identifier `Literal'. [L17 C33] #6 (Error) There are no suitable meanings for the operator `->'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 18: } from String; .......^ [L18 C8] #8 (Error) No meaning for identifier `String'.
"/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/sig.as", line 2: T ==> SetCategory; ......^ [L2 C7] #9 (Error) (After Macro Expansion) No meaning for identifier `SetCategory'. Expanded expression was: SetCategory
"/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/sig.as", line 9: coerce:%->OutputForm; ..........^.^ [L9 C11] #11 (Error) There are no suitable meanings for the operator `->'. [L9 C13] #10 (Error) No meaning for identifier `OutputForm'. [L9 C13] #13 (Fatal Error) Too many errors (use `-M emax=n' or `-M no-emax' to change the limit).
The )library system command was not called after compilation.

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/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/sig2.as using
      AXIOM-XL compiler and options 
-O -Fasy -Fao -Flsp -laxiom -Mno-ALDOR_W_WillObsolete -DAxiom -Y $AXIOM/algebra -I $AXIOM/algebra
      Use the system command )set compiler args to change these 
      options.
#1 (Warning) Could not use archive file `libaxiom.al'.
#2 (Warning) Could not use archive file `libaxiom.al'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 4: 
import from AxiomLib;
............^
[L4 C13] #3 (Error) No meaning for identifier `AxiomLib'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 15: import { true: %, false: % } from Boolean; ..................................^ [L15 C35] #4 (Error) No meaning for identifier `Boolean'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 17: string: Literal -> %; ........................^.......^ [L17 C25] #5 (Error) No meaning for identifier `Literal'. [L17 C33] #6 (Error) There are no suitable meanings for the operator `->'.
"/usr/local/aldor/linux/1.1.0/include/axiom.as", line 18: } from String; .......^ [L18 C8] #8 (Error) No meaning for identifier `String'.
"/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/sig2.as", line 2: T ==> SetCategory; ......^ [L2 C7] #9 (Error) (After Macro Expansion) No meaning for identifier `SetCategory'. Expanded expression was: SetCategory
"/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/sig2.as", line 9: coerce:%->OutputForm; ..........^.^ [L9 C11] #11 (Error) There are no suitable meanings for the operator `->'. [L9 C13] #10 (Error) No meaning for identifier `OutputForm'. [L9 C13] #13 (Fatal Error) Too many errors (use `-M emax=n' or `-M no-emax' to change the limit).
The )library system command was not called after compilation.

fricas
f:Signature(Float, Integer)
There are no library operations named Signature Use HyperDoc Browse or issue )what op Signature to learn if there is any operation containing " Signature " in its name.
Cannot find a definition or applicable library operation named Signature with argument type(s) Type Type
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. f:=(x:Float):Integer +-> floor(x)

\label{eq1}\mbox{theMap (...)}(1)
Type: (Float -> Integer)
fricas
domain f
There are no library operations named domain Use HyperDoc Browse or issue )what op domain to learn if there is any operation containing " domain " in its name.
Cannot find a definition or applicable library operation named domain with argument type(s) (Float -> Integer)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. codomain f
There are no library operations named codomain Use HyperDoc Browse or issue )what op codomain to learn if there is any operation containing " codomain " in its name.
Cannot find a definition or applicable library operation named codomain with argument type(s) (Float -> Integer)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. (f::(Float->Integer))

\label{eq2}\mbox{theMap (...)}(2)
Type: (Float -> Integer)
fricas
(f::(Float->Integer)) 2.2

\label{eq3}2(3)

fricas
f2:Signature2(Float,Float, Float)
There are no library operations named Signature2 Use HyperDoc Browse or issue )what op Signature2 to learn if there is any operation containing " Signature2 " in its name.
Cannot find a definition or applicable library operation named Signature2 with argument type(s) Type Type Type
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. f2:=(x:Float,y:Float):Float +-> x+y

\label{eq4}\mbox{theMap (...)}(4)
Type: ((Float,Float) -> Float)
fricas
domain f2
There are no library operations named domain Use HyperDoc Browse or issue )what op domain to learn if there is any operation containing " domain " in its name.
Cannot find a definition or applicable library operation named domain with argument type(s) ((Float,Float) -> Float)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. codomain f2
There are no library operations named codomain Use HyperDoc Browse or issue )what op codomain to learn if there is any operation containing " codomain " in its name.
Cannot find a definition or applicable library operation named codomain with argument type(s) ((Float,Float) -> Float)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need. f2::((Float,Float)->Float)

\label{eq5}\mbox{theMap (...)}(5)
Type: ((Float,Float) -> Float)
fricas
(f2::((Float,Float)->Float))(1.2,2.1)

\label{eq6}3.3(6)
Type: Float

Try this is Axiom SandBoxMorphism




  Subject:   Be Bold !!
  ( 13 subscribers )  
Please rate this page: