The following Aldor code was given as an example by Ralf Hemmecke and added to the wiki by Martin Rubey. See the thread: http://lists.gnu.org/archive/html/axiom-developer/2006-07/msg00046.html axiom )version aldor #include "axiom"
define CatA: Category == with { }
define CatB: Category == with { }
define SomeCat: Category == with { CatA; CatB; }
Dom: SomeCat == Integer add;
A == Dom;
B: CatA == Dom;
H: CatA == Dom add;
main1():List Record(expression:String,result:Boolean) == [
["A has CatA",A has CatA],
["A has CatB",A has CatB],
["A has SomeCat",A has SomeCat],
["B has CatA",B has CatA],
["B has CatB",B has CatB],
["B has SomeCat",B has SomeCat],
["H has CatA",H has CatA],
["H has CatB",H has CatB],
["H has SomeCat",H has SomeCat]];
aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/3788028526442996283-25px002.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.
Compiling Lisp source code from file
./3788028526442996283-25px002.lsp
Issuing )library command for 3788028526442996283-25px002
Reading /var/zope2/var/LatexWiki/3788028526442996283-25px002.asy
CatA is now explicitly exposed in frame initial
CatA will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3788028526442996283-25px002
CatB is now explicitly exposed in frame initial
CatB will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3788028526442996283-25px002
SomeCat is now explicitly exposed in frame initial
SomeCat will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3788028526442996283-25px002
Dom is now explicitly exposed in frame initial
Dom will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3788028526442996283-25px002
A is now explicitly exposed in frame initial
A will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3788028526442996283-25px002
B is now explicitly exposed in frame initial
B will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3788028526442996283-25px002
H is now explicitly exposed in frame initial
H will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3788028526442996283-25px002You get... axiom main1()
Type: List(Record(expression: String,result: Boolean)) axiom )clear completely In particular, that "B has CatB?" is a bit surprising, isn't it? Bill Page replied: I think you are dealing here with two separate but related issues: 1) *static* typing, and 2) inheritance rules. All types in Aldor are static (or at least *nearly static*) meaning that they must be resolved during the compilation phase. aldor #include "axiom" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/934600477956551444-25px004.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.
Compiling Lisp source code from file
./934600477956551444-25px004.lsp
Issuing )library command for 934600477956551444-25px004
Reading /var/zope2/var/LatexWiki/934600477956551444-25px004.asy
CatA is now explicitly exposed in frame initial
CatA will be automatically loaded when needed from
/var/zope2/var/LatexWiki/934600477956551444-25px004
CatB is now explicitly exposed in frame initial
CatB will be automatically loaded when needed from
/var/zope2/var/LatexWiki/934600477956551444-25px004
CatX is now explicitly exposed in frame initial
CatX will be automatically loaded when needed from
/var/zope2/var/LatexWiki/934600477956551444-25px004
A is now explicitly exposed in frame initial
A will be automatically loaded when needed from
/var/zope2/var/LatexWiki/934600477956551444-25px004
B is now explicitly exposed in frame initial
B will be automatically loaded when needed from
/var/zope2/var/LatexWiki/934600477956551444-25px004
X is now explicitly exposed in frame initial
X will be automatically loaded when needed from
/var/zope2/var/LatexWiki/934600477956551444-25px004Try a little harder to create dynamic types: aldor #include "axiom" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/4046171615798297799-25px005.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.
Compiling Lisp source code from file
./4046171615798297799-25px005.lsp
Issuing )library command for 4046171615798297799-25px005
Reading /var/zope2/var/LatexWiki/4046171615798297799-25px005.asy
CatA is already explicitly exposed in frame initial
CatA will be automatically loaded when needed from
/var/zope2/var/LatexWiki/4046171615798297799-25px005
CatB is already explicitly exposed in frame initial
CatB will be automatically loaded when needed from
/var/zope2/var/LatexWiki/4046171615798297799-25px005
CatX is already explicitly exposed in frame initial
CatX will be automatically loaded when needed from
/var/zope2/var/LatexWiki/4046171615798297799-25px005
A is already explicitly exposed in frame initial
A will be automatically loaded when needed from
/var/zope2/var/LatexWiki/4046171615798297799-25px005
B is already explicitly exposed in frame initial
B will be automatically loaded when needed from
/var/zope2/var/LatexWiki/4046171615798297799-25px005
X1 is now explicitly exposed in frame initial
X1 will be automatically loaded when needed from
/var/zope2/var/LatexWiki/4046171615798297799-25px005
X2 is now explicitly exposed in frame initial
X2 will be automatically loaded when needed from
/var/zope2/var/LatexWiki/4046171615798297799-25px005axiom for i in 1..10 repeat output [n()$X1,n()$X2] Type: Void axiom )clear completely Or this way: aldor #include "axiom" import from Integer; aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/3471379723332304579-25px007.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.
Compiling Lisp source code from file
./3471379723332304579-25px007.lsp
Issuing )library command for 3471379723332304579-25px007
Reading /var/zope2/var/LatexWiki/3471379723332304579-25px007.asy
CatA is now explicitly exposed in frame initial
CatA will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3471379723332304579-25px007
CatB is now explicitly exposed in frame initial
CatB will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3471379723332304579-25px007
CatX is now explicitly exposed in frame initial
CatX will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3471379723332304579-25px007
A is now explicitly exposed in frame initial
A will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3471379723332304579-25px007
B is now explicitly exposed in frame initial
B will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3471379723332304579-25px007
Y1 is now explicitly exposed in frame initial
Y1 will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3471379723332304579-25px007
Y2 is now explicitly exposed in frame initial
Y2 will be automatically loaded when needed from
/var/zope2/var/LatexWiki/3471379723332304579-25px007axiom for i in 1..10 repeat output [n()$Y1,n()$Y2] Type: Void axiom )clear completely Or like this: aldor #include "axiom"
import from Integer;
define CatX: Category == with {foo: () -> Integer}
A: CatX == add {foo(): Integer == 0;}
B: CatX == add {foo(): Integer == 1;}
Z: CatX == if odd? random(10) then A else B;
aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/5702025508533234167-25px009.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.
Compiling Lisp source code from file
./5702025508533234167-25px009.lsp
Issuing )library command for 5702025508533234167-25px009
Reading /var/zope2/var/LatexWiki/5702025508533234167-25px009.asy
CatX is now explicitly exposed in frame initial
CatX will be automatically loaded when needed from
/var/zope2/var/LatexWiki/5702025508533234167-25px009
A is now explicitly exposed in frame initial
A will be automatically loaded when needed from
/var/zope2/var/LatexWiki/5702025508533234167-25px009
B is now explicitly exposed in frame initial
B will be automatically loaded when needed from
/var/zope2/var/LatexWiki/5702025508533234167-25px009
Z is now explicitly exposed in frame initial
Z will be automatically loaded when needed from
/var/zope2/var/LatexWiki/5702025508533234167-25px009axiom for i in 1..10 repeat output foo()$Z Type: Void axiom )clear completely Ralf Hemmecke asked: Why does the compiler reject the program without the "add" in line (*)? aldor #include "axiom" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/7712043450922662837-25px011.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.
Compiling Lisp source code from file
./7712043450922662837-25px011.lsp
Issuing )library command for 7712043450922662837-25px011
Reading /var/zope2/var/LatexWiki/7712043450922662837-25px011.asy
CatA is now explicitly exposed in frame initial
CatA will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7712043450922662837-25px011
CatB is now explicitly exposed in frame initial
CatB will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7712043450922662837-25px011
CatX is now explicitly exposed in frame initial
CatX will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7712043450922662837-25px011
A is now explicitly exposed in frame initial
A will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7712043450922662837-25px011
B is now explicitly exposed in frame initial
B will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7712043450922662837-25px011
X is now explicitly exposed in frame initial
X will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7712043450922662837-25px011axiom main2()
Type: List(Record(expression: String,result: Boolean)) axiom )clear completely Christian Aistleitner provided this answer: I'd consider that a bug in comparison of exports. Replacing your (*) line by: X: CatX == if true then (A@CatX) else (B@CatX); gives a working program. aldor #include "axiom" aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/1208324321343406004-25px013.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.
Compiling Lisp source code from file
./1208324321343406004-25px013.lsp
Issuing )library command for 1208324321343406004-25px013
Reading /var/zope2/var/LatexWiki/1208324321343406004-25px013.asy
CatA is now explicitly exposed in frame initial
CatA will be automatically loaded when needed from
/var/zope2/var/LatexWiki/1208324321343406004-25px013
CatB is now explicitly exposed in frame initial
CatB will be automatically loaded when needed from
/var/zope2/var/LatexWiki/1208324321343406004-25px013
CatX is now explicitly exposed in frame initial
CatX will be automatically loaded when needed from
/var/zope2/var/LatexWiki/1208324321343406004-25px013
A is now explicitly exposed in frame initial
A will be automatically loaded when needed from
/var/zope2/var/LatexWiki/1208324321343406004-25px013
B is now explicitly exposed in frame initial
B will be automatically loaded when needed from
/var/zope2/var/LatexWiki/1208324321343406004-25px013
X is now explicitly exposed in frame initial
X will be automatically loaded when needed from
/var/zope2/var/LatexWiki/1208324321343406004-25px013axiom main3()
Type: List(Record(expression: String,result: Boolean)) axiom )clear completely So the problem (wild guess) is that the compiler Has problems with seeing that the if statement gives CatX? in both branches of the if statement. Mainly because the types of A and B aro not equal. However, you can hint the compiler. My code is telling him "The if part gives CatX? and the else part gives CatX?". Then the compiler can infer, that the whole "if" statement gives CatX?. And it is at least the type of X (which is CatX?). So it matches. aldor #include "axiom" import from Integer; define CatA: Category == with; define CatB: Category == with; define CatX: Category == with; A: Join(CatX, CatA) == add; B: Join(CatX, CatB) == add; aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/6804229532583544981-25px015.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.
Compiling Lisp source code from file
./6804229532583544981-25px015.lsp
Issuing )library command for 6804229532583544981-25px015
Reading /var/zope2/var/LatexWiki/6804229532583544981-25px015.asy
CatA is now explicitly exposed in frame initial
CatA will be automatically loaded when needed from
/var/zope2/var/LatexWiki/6804229532583544981-25px015
CatB is now explicitly exposed in frame initial
CatB will be automatically loaded when needed from
/var/zope2/var/LatexWiki/6804229532583544981-25px015
CatX is now explicitly exposed in frame initial
CatX will be automatically loaded when needed from
/var/zope2/var/LatexWiki/6804229532583544981-25px015
A is now explicitly exposed in frame initial
A will be automatically loaded when needed from
/var/zope2/var/LatexWiki/6804229532583544981-25px015
B is now explicitly exposed in frame initial
B will be automatically loaded when needed from
/var/zope2/var/LatexWiki/6804229532583544981-25px015
MyPkg is now explicitly exposed in frame initial
MyPkg will be automatically loaded when needed from
/var/zope2/var/LatexWiki/6804229532583544981-25px015axiom main4(0)
Type: Boolean axiom main4(1)
Type: Boolean axiom )clear completely In the following code we have the correspondence:
A <--> B
String <--> with
"x" <--> String
"y" <--> Integer
aldor #include "axiom" define CatA(s: String): Category == with; A(s: String): CatA(s) == add; aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/7724360379013079758-25px017.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.
Compiling Lisp source code from file
./7724360379013079758-25px017.lsp
Issuing )library command for 7724360379013079758-25px017
Reading /var/zope2/var/LatexWiki/7724360379013079758-25px017.asy
CatA is now explicitly exposed in frame initial
CatA will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7724360379013079758-25px017
A is now explicitly exposed in frame initial
A will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7724360379013079758-25px017
CatB is now explicitly exposed in frame initial
CatB will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7724360379013079758-25px017
B is now explicitly exposed in frame initial
B will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7724360379013079758-25px017The interesting part is that the truth value of the second and fourth list elements do not agree. axiom rhxmain()
Type: List(Record(s: String,b: Boolean)) axiom )clear completely An example of a domain-valued variable aldor #include "axiom" #pile aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/1586618870818532942-25px019.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.
Compiling Lisp source code from file
./1586618870818532942-25px019.lsp
Issuing )library command for 1586618870818532942-25px019
Reading /var/zope2/var/LatexWiki/1586618870818532942-25px019.asyaxiom main5(1)
Type: List(Boolean) axiom main5(2)
Type: List(Boolean) axiom )clear completely The compiler checks static types. aldor #include "axiom" #pile aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/395909315557564304-25px021.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.
"/var/zope2/var/LatexWiki/395909315557564304-25px021.as", line 9:
x := String
.......^
[L9 C8] #1 (Error) There is no suitable interpretation for the expression String
The context requires an expression of type IntegralDomain.
The possible types of the right hand side (`String') are:
-- Join(SetCategory,
StringCategory with
...But note that we cannot define domain-valued variables in the Axiom interpreter. axiom x:IntegralDomain Try to write a self-describing domain --Bill Page, Wed, 26 Jul 2006 06:28:37 -0500 reply aldor #include "axiom" #pile aldor Compiling FriCAS source code from file
/var/zope2/var/LatexWiki/7325620604487185069-25px023.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.
Compiling Lisp source code from file
./7325620604487185069-25px023.lsp
Issuing )library command for 7325620604487185069-25px023
Reading /var/zope2/var/LatexWiki/7325620604487185069-25px023.asy
MyDom is now explicitly exposed in frame initial
MyDom will be automatically loaded when needed from
/var/zope2/var/LatexWiki/7325620604487185069-25px023axiom )sh MyDom |
![\label{eq1}\begin{array}{@{}l}
\displaystyle
\left[{\left[{expression = \mbox{\tt "A has CatA"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "A has CatB"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "A has SomeCat"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "B has CatA"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "B has CatB"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "B has SomeCat"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "H has CatA"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "H has CatB"}}, \:{result = \mbox{\rm false} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "H has SomeCat"}}, \:{result = \mbox{\rm false} }\right]}\right]
\label{eq1}\begin{array}{@{}l}
\displaystyle
\left[{\left[{expression = \mbox{\tt "A has CatA"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "A has CatB"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "A has SomeCat"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "B has CatA"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "B has CatB"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "B has SomeCat"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "H has CatA"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "H has CatB"}}, \:{result = \mbox{\rm false} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "H has SomeCat"}}, \:{result = \mbox{\rm false} }\right]}\right]](images/6259350209592349485-16.0px.png)
![\label{eq2}\begin{array}{@{}l}
\displaystyle
\left[{\left[{expression = \mbox{\tt "X has CatA"}}, \:{result = \mbox{\rm false} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "X has CatB"}}, \:{result = \mbox{\rm false} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "X has CatX"}}, \:{result = \mbox{\rm true} }\right]}\right]
\label{eq2}\begin{array}{@{}l}
\displaystyle
\left[{\left[{expression = \mbox{\tt "X has CatA"}}, \:{result = \mbox{\rm false} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "X has CatB"}}, \:{result = \mbox{\rm false} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "X has CatX"}}, \:{result = \mbox{\rm true} }\right]}\right]](images/1010727270478657924-16.0px.png)
![\label{eq3}\begin{array}{@{}l}
\displaystyle
\left[{\left[{expression = \mbox{\tt "X has CatA"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "X has CatB"}}, \:{result = \mbox{\rm false} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "X has CatX"}}, \:{result = \mbox{\rm true} }\right]}\right]
\label{eq3}\begin{array}{@{}l}
\displaystyle
\left[{\left[{expression = \mbox{\tt "X has CatA"}}, \:{result = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "X has CatB"}}, \:{result = \mbox{\rm false} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{expression = \mbox{\tt "X has CatX"}}, \:{result = \mbox{\rm true} }\right]}\right]](images/2986782611352556139-16.0px.png)
![\label{eq6}\begin{array}{@{}l}
\displaystyle
\left[{\left[{s = \mbox{\tt "A x has CatA x"}}, \:{b = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{s = \mbox{\tt "A y has CatA x"}}, \:{b = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{s = \mbox{\tt "B String has CatB String"}}, \:{b = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{s = \mbox{\tt "B Integer has CatB String"}}, \:{b = \mbox{\rm false} }\right]}\right]
\label{eq6}\begin{array}{@{}l}
\displaystyle
\left[{\left[{s = \mbox{\tt "A x has CatA x"}}, \:{b = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{s = \mbox{\tt "A y has CatA x"}}, \:{b = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{s = \mbox{\tt "B String has CatB String"}}, \:{b = \mbox{\rm true} }\right]}, \: \right.
\
\
\displaystyle
\left.{\left[{s = \mbox{\tt "B Integer has CatB String"}}, \:{b = \mbox{\rm false} }\right]}\right]](images/1078979670983615877-16.0px.png)