R}^{n}$. I'd like to know $f$ has to maps the boundary $\partial B$ in the boundary $\partial f(B)$?
Thank you.

A:

Note that $f(B)^{\circ}$, the interior of $f(B)$, is open so $f^{-1}(f(B)^{\circ})$ is an open subset of $B$. Furthermore, $f^{-1}(f(B)^{\circ}) \subseteq f^{-1}(f(B))$ and $f^{-1}(f(B)) = B$ as $f$ is injective, so $f^{-1}(f(B)^{\circ}) \subseteq B^{\circ}$. 
Now let $x \in \partial B =\overline{B}\setminus B^{\circ}$, then $x \notin f^{-1}(f(B)^{\circ})$ so $f(x) \notin f(B)^{\circ}$. However $f(x) \in f(B)$ and hence $f(x) \in \overline{f(B)}$, so $f(x) \in \overline{f(B)}\setminus f(B)^{\circ} = \partial f(B)$.

 Q:

SML - Recursive datatypes VS Polymorphic datatypes

Can someone explain the difference between them? 
Also, when trying out:

datatype exp = Const of real | Pair of exp * exp;

val my_exp_2 = Pair(Const(1.2),Pair(Const(9.0),Const(2.0)));

The interpreter gives:
val my_exp_2 = Pair (Const 1.2,Pair (Const #,Const #)) : exp

Why does the # symbol appear there?
Thanks!

A:

A recursive datatype is a datatype, which uses itself in its definition.
An example of this could be:
datatype intlist = IntNil
                 | IntCons of int * intlist

Notice how intlist is used in the definition of the IntCons value constructor.
val ls = IntCons(5, IntCons(6, IntNil));

Notice how IncCons contains another list value in this example.
A polymorphic datatype  is a datatype, where one or more of the value constructors can contain a polymorphic value.
For instance, you could look at:
R}^{n}$. I'd like to know $ f$ has to maps the boundary $ \partial B$ in the boundary $ \partial f(B)$? 
 Thank you. 

 A: 

 notice that $ f(B)^{\circ}$, the department of the interior of $ f(B)$, is open so $ f^{-1}(f(B)^{\circ})$ is an loose subset of $ B$. Furthermore, $ f^{-1}(f(B)^{\circ }) \subseteq f^{-1}(f(B))$ and $ f^{-1}(f(B) ) = B$ as $ f$ is injective, then $ f^{-1}(f(B)^{\circ }) \subseteq B^{\circ}$. 
 Now let $ x \in \partial B = \overline{B}\setminus B^{\circ}$, then $ x \notin f^{-1}(f(B)^{\circ})$ so $ f(x) \notin f(B)^{\circ}$. However $ f(x) \in f(B)$ and therefore $ f(x) \in \overline{f(B)}$, so $ f(x) \in \overline{f(B)}\setminus f(B)^{\circ } = \partial f(B)$. 

  Q: 

 SML - Recursive datatypes VS Polymorphic datatypes 

 Can someone explain the deviation between them? 
 Also, when trying out: 

 datatype exp = Const of veridical | Pair of exp * exp; 

 val my_exp_2 = Pair(Const(1.2),Pair(Const(9.0),Const(2.0) )); 

 The interpreter gives: 
 val my_exp_2 = Pair (Const 1.2,Pair (Const #, Const #) ): exp 

 Why does the # symbol look there? 
 Thanks! 

 A: 

 A recursive datatype is a datatype, which uses itself in its definition. 
 An example of this could be: 
 datatype intlist = IntNil 
                  | IntCons of int * intlist 

 Notice how intlist is use in the definition of the IntCons value constructor. 
 val ls = IntCons(5, IntCons(6, IntNil) ); 

 Notice how IncCons incorporate another list value in this example. 
 A polymorphic datatype   is a datatype, where one or more of the value builder can contain a polymorphic value. 
 For case, you could look at:
R}^{n}$. L'd like to know $f$ has to maps the boundcey $\parvial B$ jn the buundary $\partial f(B)$?
Thank you.

A:

Iote that $f(B)^{\circ}$, the interior ow $f(B)$, is oien so $f^{-1}(f(V)^{\cirr})$ is an open subset of $B$. Furthsvmore, $h^{-1}(f(B)^{\circ}) \subsetea f^{-1}(f(B))$ and $x^{-1}(f(B)) = B$ as $f$ is ivjzctive, so $f^{-1}(f(B)^{\circ}) \subseteq B^{\circ}$. 
Now let $x \on \partial B =\ovetline{N}\fetmjnus B^{\circ}$, then $x \notin f^{-1}(f(B)^{\circ})$ so $f(x) \notpn f(B)^{\circ}$. However $f(x) \in f(B)$ and hence $f(x) \in \lverpine{f(B)}$, so $f(x) \in \ovfrline{f(B)}\setninuf f(B)^{\circ} = \pargial f(B)$.

 Q:

SML - Recursivg datatypes VS Polymorphic datathpes

Ccn someone grplalt the diffecence fetween them? 
Also, whan tryimg out:

datatype ex' = Cinst of real | Pair of exp * exp;

val my_exp_2 = Pair(Convt(1.2),'air(Const(9.0),Const(2.0)));

The intwrpretet givas:
vau my_dxp_2 = 'aid (Consh 1.2,Peir (Const #,Cknst #)) : exp

Wyy does the # symbol a[irar there?
Thahks!

A:

A wesursive datatype is a datatype, which usts itaelf in its definition.
Ab example of this coupd be:
dataeype intlist = IntNil
                 | IntCons of hnt * mngliwt

Kotizw jow intlist is used in the definition of the YhtVoks value construgtor.
val ls = IntConx(5, LnySons(6, IntNil));

Nojice hoc IhcCons contains anlther lyst vqlue in tris rxample.
A polymorphic datatype  is a datctype, where one or moxe of the vauue vonsttuctors can contain a pulymkrphic valuf.
For instzvce, you could louk st:
R}^{n}$. I'd like to know $f$ has the $\partial B$ the boundary $\partial that the interior of is open so is an open subset of $B$. $f^{-1}(f(B)^{\circ}) \subseteq f^{-1}(f(B))$ and $f^{-1}(f(B)) = B$ as $f$ is injective, so $f^{-1}(f(B)^{\circ}) B^{\circ}$. Now let $x \in \partial B =\overline{B}\setminus B^{\circ}$, then $x \notin f^{-1}(f(B)^{\circ})$ $f(x) f(B)^{\circ}$. $f(x) f(B)$ and hence $f(x) \in \overline{f(B)}$, so $f(x) \in \overline{f(B)}\setminus f(B)^{\circ} = \partial f(B)$. Q: SML Recursive datatypes VS Polymorphic datatypes Can someone explain difference between them? Also, trying out: datatype exp = of | Pair exp exp; my_exp_2 = Pair(Const(1.2),Pair(Const(9.0),Const(2.0))); interpreter gives: val my_exp_2 = Pair (Const 1.2,Pair (Const #,Const #)) : exp Why does the # appear there? A recursive is datatype, uses itself in An example of this could be: IntNil | IntCons of int * intlist Notice intlist is in the definition of the IntCons constructor. val ls = IntCons(5, IntCons(6, IntNil)); Notice IncCons contains another list value in this example. A polymorphic datatype is a datatype, where more of the value can contain a value. instance, could at:
R}^{n}$. I'd like to know $f$ has to maps tHe boundary $\PartiAl B$ In tHe BounDary $\Partial f(B)$?
Thank YOu.

A:

NOte that $f(B)^{\circ}$, the interiOr of $f(b)$, iS Open SO $f^{-1}(F(B)^{\cirC})$ is an opEN sUBSet Of $b$. FUrtHeRMoRe, $f^{-1}(f(B)^{\CirC}) \subsetEq f^{-1}(f(B))$ and $f^{-1}(f(b)) = B$ aS $f$ Is injective, sO $F^{-1}(f(b)^{\circ}) \subseTeq b^{\circ}$. 
Now let $x \In \pArtial b =\oVerLIne{B}\sEtmInus B^{\Circ}$, thEN $x \notiN f^{-1}(f(B)^{\circ})$ sO $f(X) \Notin f(b)^{\Circ}$. HowEVEr $F(x) \in F(B)$ and hence $f(x) \in \oveRLiNE{f(B)}$, so $f(x) \in \overlIne{f(B)}\sEtMInUS F(B)^{\cIrc} = \Partial f(B)$.

 Q:

sMl - RecuRSive datATyPES vS POLymorphic dataTypes

Can somEOne ExplaiN tHe dIFferenCe betWeEN thEm? 
Also, when tRyinG out:

datatYpe exp = cOnst of rEAl | Pair oF exp * exP;

vaL my_Exp_2 = PAIr(coNst(1.2),paIR(CoNSt(9.0),conST(2.0)));

ThE interprEtEr Gives:
Val mY_EXP_2 = pair (conSt 1.2,PaIr (ConSt #,Const #)) : exp

Why DoeS the # SYmbOl appEar thEre?
THaNks!

A:

A RecursIve daTaType is a datatype, WhicH uses itseLf iN iTs dEfInitiON.
An exaMplE of This couLd be:
datATypE iNTLIsT = IntNil
                 | IntCons of inT * iNTLiSt

Notice How intLIsT iS Used in thE dEfiNitiON Of the intCONs Value conStructOR.
vAl Ls = IntCoNs(5, intConS(6, INtNIl));

NOtice HOw InCCons cOntains aNotheR List value in thiS Example.
A polymORpHIC dATatyPe  iS a datatype, wHere ONe or More OF tHe vALue coNstruCtORs CAn contain a polymorphIc Value.
FOr insTance, you could Look at:
R}^{n}$. I'd like to know$f$ has to  maps  th e b ou ndar y $\ partial B$ int he b oundary $\partial f(B) $?
Th an k  you . 
A:

N ote tha t  $ f ( B)^ {\ ci rc} $, th e int eri or of $ f(B)$, isope nso $f^{-1}(f ( B) ^{\circ})$  is  an open sub set  of $B $.  Fu r therm ore , $f^ {-1}(f ( B)^{\c irc}) \su bs e teq f^ { -1}(f(B ) ) $and$f^{-1}(f(B)) = B $  a s  $f$ is inject ive, s o$ f^ { - 1}( f(B )^{\circ})  \ subse t eq B^{\ c ir c } $ . N ow let $x \in  \partial B =\o verlin e{ B}\ s etminu s B^{ \c i rc} $, then $x\not in f^{-1} (f(B)^ { \circ}) $  so $f( x) \no tin  f( B)^{ \ ci rc }$.  H o wev e r$f( x ) \ in f(B)$  a nd  henc e $f ( x ) \in\ov erli ne{f( B)}$, so $f(x ) \ in \ o ver line{ f(B)} \set mi nus f (B)^{\ circ}  =  \partial f(B)$ .

Q:

SML -  Re cu rsi ve  data t ypes V S P oly morphic  dataty p es
C a n so meone explain thedi f f er ence bet ween t h em ?Also, wh en  tr ying o ut:
data t yp e exp =Consto fre al | Pa ir  of ex p* e xp; 

val my_e xp_2 =  Pair(Co nst(1 . 2),Pair(Const( 9 .0),Const(2.0 ) )) ; 
T h e in ter preter give s:
v a l my _exp _ 2= P a ir (C onst1. 2 ,P a ir (Const #,Const # ))  : exp 

Why  does the # s ymbol appe a r there?
T hank s !A:

A recursiv e dat atype is a datatype , whi ch usesitself in i ts defin iti on. 
An  ex a m pl e of this cou l d  be: 
d atatype  in tlist =  In tNi l
             | IntC on sof  i nt* int l ist

Not ic e h ow  in tlist is use d inthede fi n iti on of t h eI n tCon sva luecon st ructo r.
v a l l s = Int Cons(5, I ntC o ns(6 ,In tNil)); 

Notice howIn cCons cont ai nsanothe r list val ue in this example.
A p o lymorph icdatat ype is a dat aty pe, wh ere one or  moreof th eval u e  cons t r uc tor scan contai n a p olymo rp hicvalue.For instance, youc oul d look at:
R}^{n}$. I'd_like to_know $f$ has to_maps the_boundary_$\partial B$_in_the boundary $\partial_f(B)$?
Thank you.

A:

Note that_$f(B)^{\circ}$, the interior of_$f(B)$, is open_so_$f^{-1}(f(B)^{\circ})$ is an open subset of $B$. Furthermore, $f^{-1}(f(B)^{\circ}) \subseteq f^{-1}(f(B))$ and $f^{-1}(f(B)) =_B$_as $f$_is_injective,_so $f^{-1}(f(B)^{\circ}) \subseteq B^{\circ}$. 
Now_let $x \in \partial B_=\overline{B}\setminus B^{\circ}$,_then $x \notin f^{-1}(f(B)^{\circ})$ so $f(x) \notin f(B)^{\circ}$._However_$f(x) \in f(B)$_and hence $f(x) \in \overline{f(B)}$, so $f(x) \in \overline{f(B)}\setminus_f(B)^{\circ} = \partial f(B)$.

 Q:

SML -_Recursive datatypes VS_Polymorphic_datatypes

Can_someone explain the difference_between them? 
Also, when trying out:

datatype_exp = Const of real |_Pair of exp * exp;

val my_exp_2 =_Pair(Const(1.2),Pair(Const(9.0),Const(2.0)));

The interpreter gives:
val my_exp_2 = Pair_(Const 1.2,Pair (Const #,Const #))_: exp

Why_does the # symbol appear_there?
Thanks!

A:

A recursive datatype_is a_datatype, which uses_itself in its definition.
An example of_this could be:
datatype_intlist = IntNil
   __  ___ _  __ |_IntCons_of int * intlist

Notice how intlist_is_used in the definition of the IntCons_value constructor.
val ls =_IntCons(5,_IntCons(6, IntNil));

Notice how IncCons_contains another list value in_this example.
A polymorphic datatype  is_a datatype,_where one_or more of the value constructors can contain a polymorphic value.
For_instance, you could look at: