÷ƒ’À;è TeX output 1996.03.05:1400‹ÿÿÿÿ y� ý£ ?� þ�‘r÷ïóDÓítG®G®cmr17¹T�Œqyp�sŽesetting–7tBSI“VDM“with“L�Ÿüdú�‘úKGóX«Q cmr12ºAŽŽ‘¹”¹T�‘ý[™Ÿ¸-EŽ‘;gXŽŸ�����’Ä'dºMario‘ê¨W‘ÿVolczk�¬roŽŽ¤��’¤’­Dept.‘8àof–ê¨Computer“ScienceŽŽ¡��’Ä�The‘ê¨Univ•¬rersit“yŽŽ¡��’³P€Manc�¬rhester–ê¨M13“9PLŽŽ¡��’ÞCÄU.K.ŽŽ¡��‘khâó2߆µT cmtt12Ýmario@cs.man.ac.ukº,‘ê¨Ý...!uknet!man.cs!marioŽŽŽŽŽŸ]fj�’ÈÍ?º09–ê¨June“1992Ž© �’Ë"îV‘ÿVersion‘ê¨3.01ŽŸ+Ä�‘>ó4ÂÖN ff cmbx12ßCon•ŒÌten“tsޤ��‘>ó5ò"V cmbx10à1Ž‘MOv�®9erview�’ž2ŽŽ¡��‘>2Ž‘MUsing–ÕTó6ßê3Ž‘MT•®9yp�QÇesetting‘ÕTform“ulas�’Ù¡95ŽŽ¦��‘MóKñ`y cmr10²3.1Ž‘dThe–UUáformula“²En•¸ãvironmen“t�[ã��‘ü.ŽŽ–Ç��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ�‘¢6ŽŽ¦��‘M3.2Ž‘dConstructions‘j=��‘ü.ŽŽ–Ç��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ�‘¢7ŽŽ¦��‘d3.2.1Ž’„The–UUáformbox“²En•¸ãvironmen“t‘?K��‘ü.ŽŽ–Ç��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ�‘¢9ŽŽ¦��‘M3.3Ž‘dOther–UUGeneral“P•¸ãoin“ts–UUab�Gout“F‘ÿ*ªorm�¸ãulas‘ts��‘ü.ŽŽ–Ç��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ�‘¡10ŽŽ¡��‘>à4Ž‘MTš®9yp�QÇesetting–ÕTdata“t˜yp�QÇes�’Ê=²11ŽŽ¡��‘>5Ž‘MHoš®9w–ÕTto“T˜yp�QÇeset“F‘ÿ «unctions�’¹†™13ŽŽ¦��‘M²5.1Ž‘dIn•¸ãv‘ÿqÇarian“ts‘#1��‘ü.ŽŽ–Ç��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ�‘¡14ŽŽ¡��‘>à6Ž‘MHoš®9w–ÕTto“T˜ypšQÇeset“Op˜erations�’²¿14ŽŽ¡��‘>7Ž‘MPro�QÇofs�’—16ŽŽ¡��‘>8Ž‘MCustomising–ÕTthe“St�®9yle�’φ‘17ŽŽ¦��‘M²8.1Ž‘dChanging–UUthe“Spacing‘âõ��‘ü.ŽŽ–Ç��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ�‘¡17ŽŽ¦��‘M8.2Ž‘dConš¸ãtrolling–UULine“and“P˜aragraph“Breaks‘÷ö��‘ü.ŽŽ–Ç��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ�‘¡18ŽŽ¦��‘M8.3Ž‘dUnforeseen‘UUChanges‘M¬��‘ü.ŽŽ–Ç��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ“��‘ü.ŽŽ�‘¡19ŽŽ¡��‘>à9Ž‘MInstalling–ÕTthe“ávdm“à les�’Ш]20ŽŽ¡��‘>10Ž‘MNew–ÕTávdm“àcommands“(inš®9tro�QÇduced“for“the“óAŒ-ø cmcsc10ëAbsi“àv˜ersion)�‘:7{20ŽŽŽŸ�’è²1ŽŽŒ‹* y� ý£ ?� ýä��‘>à11Ž‘MAc•®9kno“wledgemen“ts�’ßW22ŽŽŸ!Ä��‘>ß1Ž‘VLËOv�ŒÌerviewŽŸç�‘>²This–ˆbdošGcumen�¸ãt“describ˜es“a“st�¸ãyle“option,–•%ávdm²,“for–ˆbuse“with“L�Ÿýó5�‘üffóÙ“ Rcmr7±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX.‘ îThe“purp˜oseޤ �‘>of–UUávdm“²is“to“makš¸ãe“the“t˜ypšGesetting“of“VDM“sp˜eci cations“easy‘ÿ*ª.‘qÇOther“goals“are:Ž©����‘Mó !",š cmsy10¸ŽŽŽ‘W²T‘ÿ*ªo–¿enable“users“of“ávdm“²to“comm�¸ãunicate“their“spšGeci cations“to“others,‘$Ýp˜os-Ž¡�‘Wsibly–’in“a“v‘ÿqÇarietš¸ãy“of“concrete“syn˜taxes,‘á*without“ha˜ving“to“c˜hange“theirŽ¡�‘Wsource‘UU lesަ����‘M¸ŽŽŽ‘W²T‘ÿ*ªo–²enable“a“user“of“ávdm“²to“concen�¸ãtrate“on“his��Ÿü^ÿ±1ŽŽ‘.ò²sp�Geci cations,‘ÉÉand“ignoreŽ¡�‘Wthe–Øãdetailed“la•¸ãy“out–Øãas“m•¸ãuc“h–Øãas“p�Gossible.‘ürA‘ØÁside“e ect“of“this“is“that“theŽ¡�‘We ort–p€required“to“impro•¸ãv“e›p€la“y“out˜is˜concen“trated˜in˜one˜place,‘wKwithin˜theŽ¡�‘Wávdm‘UU²macros.ަ�‘>(This–Oèvš¸ãersion“of“the“ávdm“²st˜yle“option“uses“the“ëAbsi“²concrete“syn˜tax.‘£An˜y“do�Gcumen˜tŽ¡�‘>prepared–™using“earlier“vš¸ãersions“is“still“accepted,‘,ªbut“the“w˜a˜y“it“is“t˜yp�Geset“willŽ¡�‘>matcš¸ãh–œ¾more“closely“the“ëAbsi“²standard“concrete“syn˜tax.‘HThere“are“also“a“fewŽ¡�‘>additional–¤écommands“(summarised“at“the“end).‘6ùNote“that“this“is“ó!ý': cmti10Ìnot‘—Á²a“completeŽ¡�‘>st�¸ãyle–UU le“for“all“of“ëAbsi‘Çvdm².)Ž¡�‘MBut–œáenough“ev‘ÿqÇangelising.›HkLet's“get“to“the“the“real“meat.˜This“do�Gcumen�¸ãt“isŽ¡�‘>brokš¸ãen–UUup“in˜to“the“follo˜wing“sections:ަ����‘M¸ŽŽŽ‘W²General–UUpšGoin�¸ãts“ab˜out“using“ávdmަ����‘M¸ŽŽŽ‘W²T•¸ãyp�Gesetting‘UUform“ulasަ����‘M¸ŽŽŽ‘W²Hoš¸ãw–UUto“t˜yp�Geset“data“t˜yp�Gesަ����‘M¸ŽŽŽ‘W²Hoš¸ãw–UUto“t˜yp�Geset“functionsަ����‘M¸ŽŽŽ‘W²Hoš¸ãw–UUto“t˜ypšGeset“op˜erationsަ����‘M¸ŽŽŽ‘W²Hoš¸ãw–UUto“t˜ypšGeset“pro˜ofsަ����‘M¸ŽŽŽ‘W²Hoš¸ãw–UUto“tailor/extend“the“system“for“y˜our“o˜wn“application.ަ�‘>Y‘ÿ*ªou–™2should“de nitely“read“the“ rst“t•¸ãw“o–™2sections|then“yš¸ãou'll“kno˜w“roughly“whatŽ¡�‘>yš¸ãou're–ìin“for,‘³and“whether“y˜ou“w˜an˜t“to“con˜tin˜ue.‘5ÝThe“remaining“sections“canŽ¡�‘>b�Ge–UUread“as“and“when“y�¸ãou“need“them.ŽŸ�‘AdâóBo´‹Ç cmr9ëBIn–dâk�¾9eeping“with“the“bšAÇest“traditions“of“T�‘þuAŸïÿEŽ‘˜ŸX“do˜cumenš¾9tation,‘xÅparagraphs“that“con˜tainޤ �‘>material–9that“is“not“essenš¾9tial“for“no˜vices,‘‚but“vital“if“y˜ou“w˜an˜t“to“parameterise“orŽ¡�‘>extend–Tthe“system,“are“in“smaller“tš¾9yp�AÇe,“lik˜e“this“one.ŽŸ�‘M²Just–Ž6to“giv�¸ãe“a“preliminary“example,›œohere“is“some“output“from“ávdm²,˜and“theŽŸ �‘>corresp�Gonding‘UUinput:Ž‘>ŸX-‰ff‰ÿvŸ J=����‘ "5Ÿý-:ó#¹Aa¨cmr6Î1ŽŽŽ‘LÜó"|{Ycmr8ÍRead–ÕX`his/her'“for“ev�ÃŽery“o� cmmi10µ;‘ª¨Ìom‘Äc²)��ŸýØä�‘ ó&¾KÈ cmsy8Ñ4Ž‘ Ÿþ݉\)Ž@ŽŽŽ¤ ����‘àifŽ��’‰Š©Ìptrs‘™9²=‘Ǹf‘ª¨gŽŽŽ¡��‘àthenŽ��’™Z¤ÌomŽŽŽ¡��‘àelseŽ�����’•letŽ��’¥àPÌgone‘‡s²=–ǸfÌp‘h°¸2“Ìptrs‘™9¸j“ÌR�¾“C‘sè²(Ìom‘Äc²(Ìp‘¡˜²))“=“1¸g�‘àinŽŽŽŽŽŽ¡����’•letŽ��’¥àPÌom�‘ÄcŸü^ÿó O!â…cmsy7·0Ž‘Y´²=‘ÇÌgone��‘ù;¸Ž�‘#çžn:óTqÔ lasy10ÃŽŽ‘ #åÌom�‘ÄcàinŽŽŽŽŽŽ¡����’•letŽ��’¥àPÌom�‘ÄcŸü^ÿ·00Ž‘§í²=–ÇÌom�‘ÄcŸü^ÿ·0Ž‘Ë|¸y‘8àfÌp‘h°¸7!“µ²(Ìom�‘ÄcŸü^ÿ·0Ž‘’œ²(Ìp‘¡˜²)µ;‘ª¨ÌRš¾“C‘;¸7!“ÌR˜C‘¬È¸‘8à²1)Ž¡�’*n4¸j–ÇÌp‘h°¸2“Ìptrs‘ ¸‘8àÌgone‘À[¸g�‘àinŽŽŽŽŽŽŸ�’•Ìde‘ÿ}'c‘�¶²(�Ÿøüóú±u cmex10«SŽ‘UW¸f�àelemsŽ�‘Å©ÌBOD�¾“Y‘ð6²(Ìom‘Äc²(Ìp‘¡˜²))Ž‘cFp¸j–ÇÌp‘h°¸2“Ìgone‘À[¸gµ;‘ª¨Ìom�‘ÄcŸü^ÿ·00Ž‘àÕ²)ŽŽŽŽŽŽŸjG���‘jþÌDESTR•¾“O“YPTR‘¸[²(Ž’¸VÌObj‘r]µ;–ª¨ÌPtr‘�²:“ÌOop‘¡˜²)ŽŽŸox��‘kàextŽ����‘~¥OwrŽ’�…JÌOMŽ�’¦Êô²:‘ÌOop��ŸúTÎ�‘Ñ›ämŽŸ«2����‘h°¸ŽŽŽ‘ …&!ŽŽŽ‘L?ÌBasic�‘*N‰ÜpŽ‘*TObje‘ÿ}'ctŽŽŽŽŸ'��‘kàpreŽ��‘:¥Ìptr‘Ú¥¸2�‘ÇàelemsŽ�‘ ŒÁÌBOD�¾“Y‘ð6²(Ìom‘Äc²(Ìobj‘r]²))ŽŽŽŽŸ¹š��‘kàp�QÇostŽ��’„LÃÌom‘‹{²=�ŸûÜs��‘ǵ(‘üG4¸ŽŽŸ#����‘ÇÌomŽŽŽŽ‘K¸y‘8àfÌobj‘9u¸7!–ǵ²(Ìom‘Äc²(Ìobj‘r]²)µ;‘ª¨ÌBODš¾“Y‘·N¸7!“ÌBOD˜Y‘)¸‘8àfÌptr‘�¸g²)¸gŽŽŽŸ�‘>á\begin{vdm}ޤ �‘>\begin{fn}{dec}{ptrs,om}‘?ý\\Ž¡�‘>\signature{Ž¡�‘]î\setof{Oop}–?ý\x“\mapof{Oop}{Object}“\to“\mapof{Oop}{Object}Ž¡�‘>}Ž¡�‘>\If–?ýptrs“=“\emptysetŽ¡�‘>\Then‘?ýomŽ¡�‘>\Else‘¿÷\Let–?ýgone“=“\set{p“\in“ptrs“|“RC(om(p))“=“1}“\InŽ¡�‘gÿè\Let–?ýom'“=“gone“\dsub“om“\InŽ¡�‘gÿè\Let–?ýom''“=“om'“\owrŽ¡�’‘ÿÐ\map{p–?ý\mapsto“\chg{om'(p)}{RC}{RC\minus“1}Ž¡�’»ÿ¸|–?ýp“\in“ptrs“\diff“gone}“\InŽ¡�‘gÿèdec(\Union\set{\elems{BODY(om(p))}–?ý|“p“\in“gone},“om'')Ž¡�‘>\FiŽ¡�‘>\end{fn}Ž¡¡�‘>\begin{op}[DESTROYPTR]Ž¡�‘>\args{–?ýObj,“Ptr“:“Oop“}Ž¡�‘>\ext{–?ý\Wr“OM“:“\mapof{Oop}{Basic_Object}“}Ž¡�‘>\pre{–?ýptr“\in‘ ú\elems{BODY(om(obj))}“}Ž¡�‘>\post{–?ýom“=“~{om}“\owr“\map{“obj“\mapstoŽ¡�’‘ÿÐ\chg{om(obj)}{BODY}{BODY–?ý\diff“\set{ptr}}}}Ž¡�‘>\end{op}Ž¡�‘>\end{vdm}Ž¡Ÿ!Ä��‘>ß2Ž‘VLËUsing–ffóC߆µTff cmtt12ëCvdmß|General“P•ŒÌoin“tsŽŸç�‘>²T‘ÿ*ªo–UUget“at“ávdm²,“include“ávdm“²as“a“do�Gcumenš¸ãt“st˜yle“option,“e.g.:ŽŽŸ�’è3ŽŽŒ‹ì y� ý£ ?� ýä�‘gÿèá\documentstyle[12pt,vdm]{report}ŽŸú~�‘AJvëBT‘ÿ:«o–Jvthe“b�AÇest“of“mš¾9y“kno˜wledge,‘W¿the“use“of“óDߤN cmtt9ëDvdm“ëBdo�AÇes“not“con ict“with“an˜y“of“the“otherޤ �‘>do�AÇcumen•¾9t›y¢st“yles,‘˜Æexcept˜when˜something˜has˜b•AÇeen˜rede ned.‘èŠAn˜attempt˜will˜b“e˜madeŽ¡�‘>to–Tdo�AÇcumenš¾9t“all“suc˜h“rede nitions.ŽŸ�‘>²Once–íávdm“²has“b�Geen“included,‘iyš¸ãou“can“then“use“the“ávdm“²en˜vironmen˜t.‘[OF‘ÿ*ªor“exam-ޤ �‘>ple,Ž©ú~�‘m?åá\begin{vdm}Ž¡�‘|ÿÜ....Ž¡�‘m?å\end{vdm}ަ�‘>²All–"ôspšGeci cation“material“should“b˜e“placed“within“the“ávdm“²en•¸ãvironmen“t.‘Ú£TheŽ¡�‘>use–Êpof“ávdm“²only“a ects“text“within“the“ávdm“²en•¸ãvironmen“t,‘æ7except–Êpfor“the“follo�¸ãwingŽ¡�‘>global–UUcš¸ãhanges“(whic˜h“are“only“relev‘ÿqÇan˜t“when“in“math“or“displa˜y“math“mo�Gde):ŽŸù����‘J8ä1.ŽŽŽ‘WThe–`ÏmathcošGdes“of“a.–ªª.“.“z–`Ïand“A.–ªª.“.“Z‘`Ìha•¸ãv“e–`Ïb˜een“c�¸ãhanged.‘”6In“plain“English,Ž¡�‘Wthis–õêmeans“that“when“yš¸ãou“t˜ypšGe“letters“in“math“mo˜de“the“in�¸ãter-letter“spac-Ž¡�‘Wing–]smaš¸ãy“b�Ge“di eren˜t“than“it“w˜ould“b�Ge“had“y˜ou“not“included“ávdm“²as“anŽ¡�‘Woption.��Ÿü^ÿ±2ŽŽ‘â²This–0®is“bšGecause“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“math“mo˜de“is“usually“tuned“for“single“let-Ž¡�‘Wter–CÍidenš¸ãti ers,‘GOas“used“b˜y“mathematicians“for“millenia.‘kïHo˜w˜ev˜er,‘GOy˜ou“andŽ¡�‘WI‘òDb�Goth–òlknoš¸ãw“that“most“meaningful“iden˜ti ers“ha˜v˜e“more“than“one“letterŽ¡�‘Win–‘âthem,›¡so“ávdm“²pro�¸ãvides“b�Getter“spacing“for“them.‘'oAs“an“example,˜if“y�¸ãouŽ¡�‘Wtš¸ãyp�Ge–aÏá$identifier$²,‘díL�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“w˜ould“normally“prin˜t“µidentif‘�ier�G²,‘díwhereas“theŽ¡�‘Wuse–UUof“ávdm“²will“yield“Ìidenti er‘�².Ž©þ �‘WëBIf–8yš¾9ou“really“w˜an˜t“to“use“the“`normal'“in˜ter-letter“spacing,‘BØsa˜y�“ëD\defaultMathcodesŽ‘Ra.ëB.ŽŸý@����‘J8ä²2.ŽŽŽ‘WUnderscore–Ô“givš¸ães“y˜ou“an“underscore,‘ôband“not“a“subscript.‘ï�If“y˜ou“w˜an˜t“aŽ¡�‘Wsubscript–use“á@²,›1e.g.,“Ìx�Ÿÿ±0Ž‘�ˆ²is“t�¸ãyp�Ged“áx@0²,˜or“use“T�‘þU>Ÿ'EŽ‘ãxX's�“á\sbŽ‘Ê!²macro.‘�An“á@“²isŽ¡�‘Wstill–eRan“@“when“not“in“math“mo�Gde.‘¡¾Occasionally“yš¸ãou“ma˜y“ nd“that“an“@Ž¡�‘Win–¼math“mo�Gde“Ìdo‘ÿ}'esn‘þúP't‘®Ü²givš¸ãe“y˜ou“a“subscript“(particularly“when“used“withŽ¡�‘Wmo•¸ãving›B+argumen“ts).‘8JShould˜this˜happ�Gen,‘}ay“ou˜are˜advised˜to˜use˜T�‘þU>Ÿ'EŽ‘ãxX'sŽ¡��‘Wá\sbŽ‘jN²macro,–UUe.g.,“á$x\sb{0}$².ަ�‘YTpëBIf–Tnyš¾9ou“don't“use“underscores“m˜uc˜h,‘{and“y˜ou“w˜an˜t“to“use“ëD_“ëBfor“subscripts,‘{y˜ou“canޤ �‘Wsa•¾9y�‘žHëD\underscoreonŽ‘B©.ëB(and�‘žHëD\underscoreoffŽ‘GbÄëBto›žHmak“e˜it˜rev“ert˜to˜its˜usual˜meaningŽ¡�‘Win‘TëDvdmëB).ŽŸý@����‘J8ä²3.ŽŽŽ‘Wá-–쮲tš¸ãyp�Gesets“a“h˜yphen,‘„and“not“a“min˜us“sign.‘7ÑVDM‘ì‡sp�Geci cations“usuallyޤ �‘Wcon�¸ãtain–õýa“lot“more“Ìlong‘â}²-Ìidenti ers‘Ȳthan“subtractions,‘ so“on“the“whole“thisŽ¡�‘Walteration–.jshould“sa•¸ãv“e–.je ort.‘dÎIf“yš¸ãou“really“w˜an˜t“to“do“a“single“subtractionŽ¡�‘Wsign,›–Nuse�‘‰Pá\minusŽ‘# >².‘ ¸If–‰Py�¸ãou“ nd“the“default“is“inappropriate,˜yš¸ãou“can“rev˜ertŽ¡�‘Wto– 3the“original“b�Gehaš¸ãviour“using�“á\mathminusŽ‘8 ²;�‘…¢á\textminusŽ‘=%·²is“the“in˜v˜erse.Ž¡�‘WExample:‘qÇáa-b–?ý\ne\mathminus“a-b–UU²giv�¸ães“Ìa‘Äc²-Ìb‘h°¸6²=‘ÇÌa‘ýC¸‘8àÌb‘¡˜².Ž‘>ŸUl‰ff‰ÿvŸ J=����‘ "5Ÿý-:Î2ŽŽŽ‘LÜÍThis–qïis“not“the“case“if“y�ÃŽou“are“using“PSL�Ÿþ¢#�‘üð¡ÎAŽŽ‘ ïÍT�‘þ•AŸ¸ãEŽ‘MX,‘…Ñas“that“do�Ÿ'EŽ›ãxX“and“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ˜X“á~“²has“alw•¸ãa“ys–’bšGeen“a“tie“(a“space“b˜et•¸ãw“een›’w“ords˜at˜whic“hŽŸ xâ�‘Wthe–}line“is“nevš¸ãer“brok˜en).›é W‘ÿ*ªell“in“ávdm“²it“isn't.˜á~x“²will“givš¸ãe“y˜ou“a�ŸûÜs��“µ(‘ùU`¸ŽŽŸ#���‘mÌxŽŽŽ‘™•².‘é F‘ÿ*ªorŽŸq�‘Wlong›nqiden•¸ãti ers,‘t¸suc“h˜as�Ÿù8ä��˜µ(‘ý¸X�‘þã�¸Ž‘F�ŽŽŸÇ���˜ÌlongŽŽŽŽ‘4u²,‘t¸sa“y˜á~{long}².‘½ÌNote–«that“this“only“applies“inŽ¡�‘Wmath–“çmo›ÿ}'de;“elsewher˜e“a“á~“Ìis“stil‘‚Øl“a“tie.ަ����‘J8ä²6.ŽŽŽ‘WIn–ÖÚmath“mo�Gde,‘ð&the“double“quote“c�¸ãharacter“á''“²is“actually“a“macro.‘GžPlacingŽ¡�‘Wtext›e“b�Get•¸ãw“een˜pairs˜of˜double˜quotes˜causes˜that˜text˜to˜b�Ge˜set˜in˜the˜normalŽ¡�‘Wtext–UUfonš¸ãt.‘qÇF‘ÿ*ªor“example,“á$x="a‘?ývariable"$“²giv˜es“y˜ou“Ìx‘û\²=�‘Ça“v‘ÿqÇariableŽ‘-N;.ަ�‘Z°ßëBIf–°Ýyš¾9ou“w˜an˜t“to“c˜hange“the“fon˜t“used“for“text“placed“b�AÇet˜w˜een“quotes,‘׿rede neޤ �‘Wthe–™command�“ëD\mathTextFontŽ‘@ì7ëB.‘[@By“default“it“is“de ned“to“b�AÇe�“ëD\rmŽ‘+ôëB(�ëD\mathrmŽ‘$’³ëBforŽ¡�‘Wthe–TNew“F‘ÿ:«onš¾9t“Selection“Sc˜heme).ŽŸ����‘J8ä²7.ŽŽŽ‘WThe–EÐfolloš¸ãwing“macros“ha˜v˜e“b�Geen“altered“in“a“non-trivial“w˜a˜y:�‘R½á\forallŽ‘+¨²,Ž© ��‘Wá\existsŽ‘B²(see‘UUlater).ŽŸ�‘@˜\ëBWhen–˜\yš¾9ou“t˜yp�AÇeset“some“VDM‘˜the–;Hleft“margin“bš¾9y“an“amoun˜t“equal“to�“ëD\parindentŽ‘2{$ëB,‘DÅthe“inden˜tation“at“the“b�AÇeginningŽ¡�‘>of–Teacš¾9h“paragraph.‘pIf“y˜ou“w˜an˜t“to“c˜hange“this,“c˜hange“the“v‘ÿ|ralue“of�“ëD\VDMindentŽ‘2U0ëB,“e.g.:ޤ�‘c̰ëD\setlength{\VDMindent}{0cm}Ž¡�‘>ëBwill–®�makš¾9e“y˜our“spšAÇecs“come“out“ ush“left.‘çöThis“do˜cumen�¾9t“has“b˜een“t�¾9yp˜eset“withޤ ��‘>ëD\VDMindentŽ‘pU0ëBequal–Tto“3–8óF©±�Ê cmsy9ëF�“ëD\parindentŽ‘1NëB.Ž¡�‘MSimilarly‘ÿ:«,‘ô®the–ì„righš¾9t“hand“margin“is“con˜trolled“b˜y“a“parameter“called�“ëD\VDMrindentŽ‘6åöëB.Ž¡�‘>By–Tdefault“it“is“also“set“to�“ëD\parindentŽ‘2U0ëB.ŽŸ�‘BïY‘ÿ:«ou–ïcan“ha•¾9v“e–ïa“particular“line“spacing“in“force“within“the“ëDvdm“ëBen•¾9vironmen“t.‘@TheŽ¡�‘>spacing–(,within“a“ëDvdm“ëBen•¾9vironmen“t–(,is“dictated“b�¾9y“the�“ëD\VDMbaselineskipŽ‘Sé¸ëBcommand.Ž¡�‘>Note–hthat“this“is“óH¼j‘¹ cmti9ëHnot‘ò/ëBa“length,‘Jþbut“a“command.‘È!By“default“it“expands“to�“ëD\baselineskipŽŽ¡�‘>ëBso–²íthat“the“line“spacing“is“that“of“the“surrounding“text,‘Æ›whatevš¾9er“size“that“ma˜y“b�AÇe.‘û£T‘ÿ:«oŽ¡�‘>makš¾9e–Tit“smaller,“y˜ou“ma˜y“w˜an˜t“to“sa˜yޤ�‘PæXëD\renewcommand{\VDMbaselineskip}{0.8\baselineskip}Ž¡�‘>ëBfor‘Texample.ŽŸ&Ä��‘>ß3Ž‘VLËT•ŒÌyp�s3esetting‘ffform“ulasŽŸç�‘>²Most–Œ²of“the“text“yš¸ãou“en˜ter“within“ávdm“²en˜vironmen˜ts“will“bšGe“in“T�‘þU>Ÿ'EŽ‘ãxX's“math“mo˜de,ަ�‘>but–*VDM‘* došGes“its“b˜est“to“conceal“this“fact“from“yš¸ãou,‘2»so“that“y˜ou“should“rarely‘ÿ*ª,ަ�‘>if›UÈev•¸ãer,‘•åha“v“e˜to˜t“yp�Ge˜a˜dollar˜sign.‘s!Ho“w“ev“er,‘•åsev“eral˜new˜features˜ha“v“e˜b�GeenŽŽŸ�’è5ŽŽŒ‹1 y� ý£ ?� ýä�‘>²proš¸ãvided– çfor“the“t˜yp�Gesetting“of“logical“form˜ulas.‘Y£Firstly‘ÿ*ª,‘dop�Gerators“with“sensibleޤ �‘>names›"ªha•¸ãv“e˜b�Geen˜pro“vided:‘ puse�˜á\IffŽ‘"ž²,�‘Uÿá\ImpliesŽ‘.Uç²,�‘Uÿá\OrŽ‘ö²,�‘Uÿá\AndŽ‘x�²and�˜á\NotŽ‘EH²for˜theŽ¡�‘>op�Gerators›�ý¸,µ;–ª¨¸)µ;“¸_µ;“¸^˜²and˜¸:“².‘!¿(T‘ÿ*ªo˜retain˜compatibilit•¸ãy˜with˜a˜previous˜v“ersion,Ž¡��‘>á\iffŽ‘Rÿô²,�‘UUá\impliesŽ‘-U=²,�‘UUá\andŽ–ªž²and�‘UUá\negŽ“²are–UUstill“pro�¸ãvided,“but�“á\orŽ‘j¡²is“not.)Ž¡�‘MA‘þÑma‘Ž8jor–þücš¸ãhange“has“come“in“the“area“of“quan˜ti ed“expressions.‘n½In“VDM,Ž¡�‘>they›� ha•¸ãv“e˜v“ery˜w“ell-de ned˜forms,‘Áèso˜the˜L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX˜sequences�˜á\forallŽ‘)ú²and�˜á\existsŽŽ¡�‘>²ha•¸ãv“e–UUb�Geen“re-de ned“to“takš¸ãe“argumen˜ts.‘qÇF‘ÿ*ªor“example,“to“getŽ¡���‘k¸9Ìx‘û\¸2‘ÇÌSŽ’‹©Œ¸‘8àÌp‘¡˜²(Ìx‘4D²)ŽŽŸ„ì�‘>t�¸ãyp�GeޤþÄ�‘gÿèá\exists{x–?ý\in“S}{p(x)}Ž¡�‘>²Note–öëthe“separating“dot“that“wš¸ãas“put“in“automatically‘ÿ*ª.‘ROIf“y˜ou“w˜an˜t“one“of“theseޤ �‘>dots–UUbš¸ãy“itself,“y˜ou“can“ha˜v˜e“one“b˜y“sa˜ying�“á\suchthatŽ‘2•:².Ž¡�‘MIn–UUaddition,“t•¸ãw“o–UUnew“quanš¸ãti ers,�“á\uniqueŽ‘+j•²and�“á\nexistsŽ‘-U=²,“ha˜v˜e“b�Geen“added:ŽŸÇ��Ÿíc���Ÿfd���‘`€Š¸9²!‘ª¨Ìx‘û\¸2‘ÇÌSŽ’…›Û¸‘8àÌp‘¡˜²(Ìx‘4D²)ŽŽŸ*¨����‘`€ŠŸñÇóˆ¶È msbm10É@Ž‘g¹lÌx‘û\¸2‘ÇÌSŽ’‚Ô¾¸‘8àÌp‘¡˜²(Ìx‘4D²)ŽŽŽ��’Û€á\unique{x–?ý\in“S}{p(x)}Ž¡�’Û€\nexists{x–?ý\in“S}{p(x)}ŽŸŽŽŽŽŸþ�‘M²Additionally‘ÿ*ª,›4’to–Ô¹complemen�¸ãt�“á\uniqueŽ‘)”¤²,˜there“is�“á\uniquevalŽ‘9T›².‘ïóThis“is“theŽ¡�‘>so-called–UU\iota-function"“that“returns“the“unique“v‘ÿqÇalue,“if“there“is“one:ŽŸê«��Ÿõøã��Ÿfd���‘`€Šµ‘ª¨Ìx‘û\¸2‘ÇÌSŽ’€Ð˜¸‘8àÌp‘¡˜²(Ìx‘4D²)ŽŽŽ��’Û€á\uniqueval{x–?ý\in“S}{p(x)}ŽŸŽŽŽŽŸ8ã�‘AêëBIf–êyš¾9ou“w˜an˜t“to“use“the“old“v˜ersions“of�“ëD\forallŽ›'PîëBand�“ëD\existsŽ˜ëBthey“are“a�¾9v‘ÿ|railable“underŽŸ �‘>the–Tpseudon�¾9yms“of�“ëD\ForallŽ‘'=ÂëBand�“ëD\ExistsŽ‘$(nëB.ŽŸ�‘M²If–òFyš¸ãou“ nd“that“the“b•Go“dy–òFof“the“quan˜ti ed“expression“is“to�Go“long“to“ tŽ¡�‘>comfortably–Pàon“a“line,‘QÄthere“are“*-forms“of“the“ab�Go•¸ãv“e–Pàcommands“that“place“theŽ¡�‘>b•Go“dy–í4of“the“quanš¸ãti ed“expression“on“a“new“line,‘sligh˜tly“inden˜ted.‘OF‘ÿ*ªor“example,Ž¡��‘k¸9Ìx‘û\¸2‘ÇÌS‘k]¸Ž¡����’�ÿøÌp‘¡˜²(Ìx›4D²)–8à¸^“Ìq‘â}²(Ìx˜²)–Ǹ_“:‘ª¨Ìp‘¡˜²(Ìx˜²)–h¸)“Ìr‘�²(Ìx˜²)–8à¸^“ÌS‘2}²(Ìx˜²)ŽŽŽŽŽŸO�‘>can–UUb�Ge“obtained“withŽ©þÄ�‘]îá\exists*{x–?ý\in“S}{p(x)“\And“q(x)“\Or“\Not“p(x)Ž¡�’»ÿ¸\Implies–?ýr(x)“\And“S(x)}ަ�‘M²If–"Ñyš¸ãou“need“\Strac˜hey"“brac˜k˜ets,–V0e.g.,“ÌM‘£Ž²[–þUX[Ìe‘À[²]“],‘V0place–"Ñthe“material“to“app�GearŽ¡�‘>within–UUthe“brac•¸ãk“ets–UUwithin“á\term{–?ý...“}²,‘UUth�¸ãus:‘qÇá$M\term{e}$².Ž¡�‘MA‘sp�Gecial–@conš¸ãtrol“sequence,�‘Fzá\constŽ‘#Æh²,‘Fzis“a˜v‘ÿqÇailable“for“constan˜ts.‘´‡T‘ÿ*ªo“get,‘FzforŽ¡�‘>example,�‘UUëAYesŽ‘gŸj�‘ÇëANoŽ‘E¥²,–UUt�¸ãyp�Ge“á\const{Yes}|\const{No}².ŽŸ�‘@¶ÃëBIf–¶Ãyš¾9ou“don't“lik˜e“the“fon˜t“that“constan˜ts“are“set“in,‘É­y˜ou“can“c˜hange“them“b˜y“rede ningŽŸ �‘>the–Tcommand�“ëD\constantFontŽ‘@�òëB.‘pBy“default“it“expands“to�“ëD\scŽ‘BëB.ŽŸ �º��‘>óLÂÖN  cmbx12ëL3.1Ž‘\ÀThe–€Ýformula“ëLEn• vironmen“tŽŸuT�‘>²Occasionally–›�yš¸ãou“ma˜y“w˜an˜t“a“form˜ula“on“its“o˜wn,‘­b�Get˜w˜een“paragraphs“of“text,Ž¡�‘>saš¸ãy–ÿ*ª.‘.‹Normally“,‘³ùthe–‹¡pro˜vided“en˜vironmen˜ts“and“commands“suce,‘³ùbut“sometimesŽŽŸ�’è6ŽŽŒ‹? y� ý£ ?� ýä�‘>²they–‹Udon't.‘ÇIf“yš¸ãou“need“an“o�Gdd“equation“to“stand“on“its“o˜wn,‘˜Õuse“the“áformulaޤ �‘>²en•¸ãvironmen“t:Ž©�‘b¿ëá\begin{formula}Ž¡�‘b¿ëx–?ý=“10Ž¡�‘b¿ë\Or‘ ú\forall{i–?ý\in“\Nat}{i“\ne“10“\Implies“i“\ne“x}Ž¡�‘b¿ë\end{formula}ަ�‘>²The–JŸáformula“²en•¸ãvironmen“t–JŸis“similar“to“displa•¸ãy“ed–JŸmath“mo�Gde,‘LÃexcept:‘llform�¸ãulasŽ¡�‘>are– ÿindenš¸ãted“b˜y�“á\VDMindentŽ‘8Œá²,›:ênot�“á\mathindentŽ‘=ÌÞ²,˜and“line“breaks“can“b�Ge“madeŽ¡�‘>using�‘Ž8á\\Ž‘2².‘oAlso,‘œpwithin–Ž8the“áformula“²en•¸ãvironmen“t›Ž8ev“erything˜app�Gears˜ ush˜left,Ž¡�‘>as–UUoppšGosed“to“b˜eing“cen�¸ãtred.ŽŸþ6��‘>ëL3.2Ž‘\ÀConstructionsŽŸuT�‘>²A‘\Íparticularly–] nice“feature“of“ávdm“²is“that“yš¸ãou“can“t˜yp�Geset“m˜ulti-line“constructionsŽ¡�‘>sucš¸ãh–I›as“those“in“the“earlier“example“without“ha˜ving“to“w˜orry“ab�Gout,–'sa˜y‘ÿ*ª,“lining‘I›upŽ¡�‘>\thens"–sÙand“\elses"“with“\ifs".‘&žIn“the“folloš¸ãwing“de nitions,‘ òwhenev˜er“y˜ou“see“theŽ¡�‘>term–D¸h²math-mo�Gde-expression¸i²,‘z¸yš¸ãou“should“t˜ypšGe“an“expression“as“if“in“math“mo˜de,Ž¡�‘>but– ¨y�¸ãou“needn't“put“dollar“signs“in.‘‘¿All“of“the“constructions“describšGed“b˜elo�¸ãwŽ¡�‘>can–}žbšGe“used“where“a“¸h²math-mo˜de-expression¸i“²is“required.‘ê¢Eac�¸ãh“construction“isŽ¡�‘>sho•¸ãwn›Á´b“y˜example;‘÷äthe˜output˜on˜the˜left˜results˜from˜the˜input˜on˜the˜righ“t.Ž¡�‘>Also–I¥note“that“eac�¸ãh“macro“name“bšGegins“with“an“upp˜er-case“letter.‘N¸T�‘þU>Ÿ'EŽ‘ãxX“andŽ¡�‘>L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX–djfrequenš¸ãtly“use“the“lo˜w˜er-case“v‘ÿqÇarian˜ts“for“completely“unrelated“things.Ž¡�‘>Naturally‘ÿ*ª,–UUcš¸ãhaos“will“ensue“if“y˜ou“mix“the“names“up.Ž¡�‘MT�¸ãypšGesetting–úãan�“àifŽ‘Â4²is“done“using�“á\IfŽ‘µ½¸h²math-mo˜de-expression¸i�á\ThenŽ‘:Ô¸h²math-Ž¡�‘>mo•Gde-expression¸i�á\ElseŽ‘•F¸h²math-mo“de-expression¸i�á\FiŽ‘¿÷².ŽŸ,xä��ŸÝøã��Ÿfd�����‘`€ŠàifŽ��‘k 1Ìx‘û\¸2‘ÇÌSŽŽŽ¡��‘`€ŠàthenŽ��‘zÛ,ÌS‘k]¸‘8àÌxŽŽŽ¡��‘`€ŠàelseŽ��‘v›ˆ¸f‘ª¨gŽŽŽŽŽŽŽ��’Û€á\If–?ýx\in“SŽ¡�’Û€\Then–?ýS“\diff“xŽ¡�’Û€\Else‘?ý\emptysetŽ¡�’Û€\FiŽ¡�’Û€\end{verbatim}ŽŸŽŽŽŽŸ+êª�‘M²If–UUyš¸ãou“nest�“á\IfŽ‘L²s“then“y˜ou“m˜ust“enclose“inner�“á\IfŽ‘L²s“within“braces:ŽŸ=ê«��ŸËøã��Ÿfd�����‘`€ŠàifŽ���‘lµÙµ:–ª¨:“:ŽŽŽŽ¡��‘`€ŠàthenŽ�����‘zÛ,ifŽ���’‡{µ:–ª¨:“:ŽŽŽŽ¡��‘zÛ,àthenŽ���’–àvµ:–ª¨:“:ŽŽŽŽ¡��‘zÛ,àelseŽ���’’ Òµ:–ª¨:“:ŽŽŽŽŽŽŽŽŸ$��‘`€ŠàelseŽŽŽŽŽŽ��’Û€á\If‘?ý...Ž¡�’Û€\Then{Ž¡�’è\If‘?ý...Ž¡�’è\Then‘?ý...Ž¡�’è\Else‘?ý...Ž¡�’è\FiŽ¡�’Û€}\ElseŽ¡�’Û€\FiŽŸŽŽŽŽŸ=êª�‘M²Y‘ÿ*ªou–jdare“advised“to“place“the“extra“braces“exactly“as“ab�Go•¸ãv“e;‘tìdon't–jdlet“extra-Ž¡�‘>neous–UUspaces“in•¸ãterv“ene›UUb�Get“w“een˜the˜k“eyw“ords˜and˜the˜braces.ŽŽŸ�’è7ŽŽŒ‹Lä y� ý£ ?� ýä�‘M²The�‘3Ñá\IfŽ‘'™²macro›3Ñalw•¸ãa“ys˜starts˜a˜new˜line˜for˜the�˜àthenŽ‘ìð²and�˜àelseŽ‘­L²parts.‘f›If˜y“ouޤ �‘>w•¸ãan“t–UUT�‘þU>Ÿ'EŽ‘ãxX“to“try“to“c�¸ãho�Gose“line“breaks,“use�“á\SIfŽ‘ªž²instead:ŽŸ& ��Ÿãøã��Ÿfd������‘`€ŠàifŽ‘k 1Ìa‘‹{²=–ÇÌb�‘¡˜àthenŽ‘ü:Ìc‘Wβ=“Ìd‘Ai²+‘8àÌeŽ¡��‘`€ŠàelseŽ‘v›ˆÌp‘h°²=‘ÇÌq‘]²+–8àÌr‘Lm²+“Ìs‘ ²+“Ìt‘+¸²+“ÌuŽŽŽŽŽŽ��’Û€á\SIf‘?ýa=bŽ¡�’Û€\Then‘?ýc=d+eŽ¡�’Û€\Else‘?ýp=q+r+s+t+uŽ¡�’Û€\FiŽŸŽŽŽŽŸ&xã���‘MàletŽ‘Yïü².–ªª.“.�“àinŽŽ‘wA6²constructions–f“are“done“in“a“similar“w•¸ãa“y:�‘ ”Cá\LetŽ‘%úʸh²math-mo�Gde-Ž¡�‘>expression¸i�‘¹Žá\InŽ‘3¸h²math-mo•Gde-expression¸i²,‘œand�‘¹Žá\SLetŽ‘#³ ¸h²math-mo“de-expression¸iŽ¡��‘>á\InŽ‘QL¸h²math-mo�Gde-expression¸i².ŽŸxä��Ÿïøã��Ÿfd�����‘`€ŠàletŽ��‘qEÚÌx‘û\²=‘ÇÌf‘”²(Ìy‘â}µ;‘ª¨Ìz‘:«²)�‘àinŽŽŽŽŽŽ¡�‘`€ŠÌg‘â}²(Ìx›4D²)–8à+“Ìh‘Äc²(Ìx˜²)ŽŽŽ��’Û€á\Let–?ýx=f(y,z)“\InŽ¡�’Û€g(x)+h(x)ŽŸŽŽŽŽŸ#ñÇ��Ÿõøã��Ÿfd������‘`€ŠàletŽ‘qEÚÌx‘û\²=‘ÇÌf‘”²(Ìy‘â}µ;‘ª¨Ìz‘:«²)�‘àinŽ‘j¦Ìx�‘4DŸü^ÿ±2ŽŽŽŽŽŽŽ��’Û€á\SLet–?ýx=f(y,z)“\In{x^2}ŽŸŽŽŽŽŸêª�‘M²Notice–ÝTthat�“á\SLetŽ‘ú™²takš¸ães“a“second“argumen˜t,‘õTwhic˜h“is“part“of“the“same“`para-Ž¡�‘>graph',–UUwhere�“á\LetŽ‘ªž²do�Ges“not.Ž¡�‘MThe–UUtš¸ãyp�Gesetting“of“a�“àcasesŽ‘µÿ²clause“is“more“complicated.‘qÇIt“tak˜es“the“form:Ž©�‘Wá\Cases{‘UU¸h²math-mo�Gde-expression¸iá}Ž¡�‘W²from-¸h²math-mo•Gde-expression¸iá&‘UU²to-¸h²math-mo“de-expression¸i�á\\ŽŽ¡�‘W²from-¸h²math-mo•Gde-expression¸iá&‘UU²to-¸h²math-mo“de-expression¸i�á\\ŽŽ¡�‘W².–ªª.“.Ž¡�‘Wá\Otherwise{‘UU¸h²math-mo�Gde-expression¸iá}Ž¡�‘W\Endcasesަ�‘M²The�‘`Âá\OtherwiseŽ‘9Af² eld–`Âis“optional.‘ AThis“construction“follo�¸ãws“a“general“patternŽ¡�‘>that–èis“common“in“ávdm“²input:‘S‘lists“of“things“are“separated“b�¸ãy�“á\\Ž‘ ˜â²s,‘$þand“sub eldsŽ¡�‘>are–UUseparated“b�¸ãy“á&²s“or“á:²s.ŽŸ�‘A€ûëBIn–€ûrealit�¾9y‘ÿ:«,››äthere“is“another,˜optional“argumen�¾9t,˜after“the�“ëD\EndcasesŽ‘.AëB.‘_dIf“yš¾9ou“w˜ere“toޤ �‘>try–Ttš¾9yp�AÇesetting“something“lik˜eŽ©�‘c̰ëD(...–¹–var“=“\Cases“...Ž¡�’—Æ"\Endcases)ަ�‘>ëByš¾9ou'd––" nd“the“closing“righ˜t“paren˜thesis“in“an“unexp�AÇected“place“(on“the“same“line“asŽ¡�‘>the–g€=,‘| in“fact).‘ôT‘ÿ:«o“get“text“to“the“righš¾9t“of“the�“ëD\EndcasesŽ‘1UFëBy˜ou“can“place“an“optionalŽ¡�‘>argumenš¾9t–Twithin“brac˜k˜ets“after“it:ަ�‘c̰ëD(...–¹–var“=“\Cases“...Ž¡�’—Æ"\Endcases[)]ަ�‘>ëBAdmittedly‘ÿ:«,–Tthis“lošAÇoks“a“little“strange,“but“it“do˜es“w�¾9ork.ŽŸ�‘M²Here–UUis“an“example“of�“á\CasesŽ‘&*˜²in“action:ŽŽŸ�’è8ŽŽŒ‹ Wä y� ý£ ?� ýä������‘kàcasesŽ��’‡à©Ìsele‘ÿ}'ct‘òز(Ìx‘4D²)�‘àofŽŽŽŽ¤ ���’œn)nilŽŽ�’ªßé¸!‘Çf‘ª¨gŽŽ¡��‘kÌmk‘�²-ÌLst‘òز(Ìhd–‰µ;‘ª¨Ìtl“²)Ž�’ªßé¸!‘ÇfÌhd‘‰¸g–8à[�“àelemsŽ�‘þ‰ÌtlŽŽŽ¡��‘kàothersŽ��’�üÁÌxŽŽŽ¡��‘kàendŽŽŽŽŽŽŸE‹c�‘X?ñá\Cases{–?ýselect(x)“}ޤ �‘X?ñ\nil‘>ÿÜ&–?ý\emptyset“\\Ž¡�‘X?ñmk-Lst(hd,tl)‘ ú&–?ý\set{hd}“\union“\elems{tl}Ž¡�‘X?ñ\Otherwise{–?ýx“}Ž¡�‘X?ñ\EndcasesŽŸ�‘M²Note–w£the�“á\\Ž‘o@²is“a“Ìsep–ÿ}'ar“ator‘‹0²and–w£not“a“Ìterminator‘�²|y�¸ãou“don't“need“one“afterŽ¡�‘>the–Zlast“item.‘ Also,‘Œ\the�“á\OtherwiseŽ‘94²can“appšGear“an�¸ãywhere“b˜et•¸ãw“een–Zthe“á\Cases{}Ž¡�‘>²and–UUthe�“á\EndcasesŽ‘2•:²,“but“it“will“alw•¸ãa“ys–UUbšGe“t�¸ãyp˜eset“last.ŽŸ�‘A'ëBSome–'pšAÇeople“prefer“the“selectors“to“app˜ear“lined“up“on“the“left,‘ ýsome“on“the“righ�¾9t.‘¶Ifޤ �‘>y•¾9ou›Ðw“an“t˜them˜to˜app�AÇear˜on˜the˜left,‘.sa“y�˜ëD\leftCasesŽ‘2V¬ëB;‘�if˜y“ou˜w“an“t˜them˜on˜the˜righ“t,Ž¡�‘>sa�¾9y�‘¾\ëD\rightCasesŽ‘7·ÎëB.‘‡The–¾\scop�AÇe“of“the�“ëD\leftCasesŽ‘6¼”ëBand�“ëD\rightCasesŽ‘;v*ëBcommands“is“theŽ¡�‘>currenš¾9t–Tgroup.‘pBy“default,“y˜ou“get�“ëD\rightCasesŽ‘7ÆëB.ŽŸþ6��‘>à3.2.1Ž‘a#‚The–ÕTáformbox“àEn•®9vironmen“tŽŸuT�‘>²Occasionally–­ùyš¸ãou“migh˜t“ nd“that“y˜ou“w˜an˜t“to“put“a“line“break“in“a“place“thatޤ �‘>can't–àíhandle�“á\\Ž‘`ç².‘�F‘ÿ*ªor“example,‘Óif“yš¸ãou“ha˜v˜e“a�“á\CasesŽ‘'AȲcommand“and“the“rhs“ofŽ¡�‘>a–1 particular“case“is“to�Go“big,›hy�¸ãou“can't“use�“á\\Ž‘â:²to“break“the“line“directly‘ÿ*ª,˜as“itŽ¡�‘>will–ÿ^bšGe“in�¸ãterpreted“as“the“separator“b˜et•¸ãw“een–ÿ^cases.‘U Then“yš¸ãou“m˜ust“the“áformboxŽ¡�‘>²en•¸ãvironmen“t.‘nIt–Ž7is“similar“to“the“áformula“²en•¸ãvironmen“t–Ž7in“that“y�¸ãou“can“put“allŽ¡�‘>sorts–×Iof“things“in“it,›÷Åbut“it“can“b�Ge“used“within“other“constructions,˜unlik�¸ãe“theŽ¡�‘>áformula›UU²en•¸ãvironmen“t,˜whic“h˜can˜only˜b�Ge˜used˜at˜the˜outermost˜lev“el.Ž¡�‘MThis–UUexample“should“con•¸ãv“ey–UUthe“general“idea:Ž©�‘gÿèá\Cases{–?ýf(x)“}Ž¡�‘gÿèmk-Very_long_constructor(foo,bar)‘?ý&Ž¡�‘|ÿÜ{\begin{formbox}Ž¡�‘|ÿÜlong_predicate_with(foo)‘?ý\\Ž¡�’‡Ö\And‘?ýlong_predicate_with(bar)Ž¡�‘|ÿÜ\end{formbox}}Ž¡�‘gÿè...ަ������‘kàcasesŽ��’‡à©Ìf‘”²(Ìx‘4D²)�‘àofŽŽŽŽ¡��‘kÌmk›�²-ÌV‘ÿ;¼ery�‘|‰ÜpŽ–|long�‘|‰ÜpŽ“c–ÿ}'onstructor˜²(Ìfo“o‘¡˜µ;‘ª¨Ìb“ar˜²)Ž�’ Q]¸!��‘ÇÌlong�‘|‰ÜpŽ‘|pr–ÿ}'e“dic“ate�‘Yó‰ÜpŽ‘Yùwith‘Äc²(Ìfo“o‘¡˜²)Ž¡�‘Ǹ^‘8àÌlong�‘|‰ÜpŽ‘|pr–ÿ}'e“dic“ate�‘Yó‰ÜpŽ‘Yùwith‘Äc²(Ìb“ar‘�²)ŽŽŽŽŸ§Ô���’ûüµ:–ª¨:“:ŽŽŽ¡��‘kàendŽŽŽŽŽŽŸ9]ß�‘>²Note– the“extras“braces“around“the“áformbox²;‘Ðthese“are“required“to“\hide"“the�“á\\ŽŽ¡�‘>²from–UUthe�“á\CasesŽ‘"ÕC².ŽŽŸ�’è9ŽŽŒ‹ bS y� ý£ ?� ýä��‘>ëL3.3Ž‘\ÀOther–€General“P• oin“ts–€ab�`out“F‘þàorm� ulasŽŸuT��‘>á\\Ž‘L†‡²will��Ÿü^ÿ±3ŽŽ‘ƒÌalways‘Ø®²start–�a“new“line.‘…oSometimes“this“is“done“in“addition“to“someޤ �‘>other–Åifunction“(as“in“the�“á\CasesŽ‘% À²macro,›â2where“it“delimits“a“particular“case),˜butŽ¡�‘>yš¸ãou–©should“b�Ge“able“to“use�“á\\Ž‘½L²almost“an˜ywhere“to“force“a“line“break.‘ÍÂIndeed,Ž¡�‘>so�Goner–Šlor“later“yš¸ãou'll“w˜an˜t“to“t˜yp�Geset“a“long“form˜ula“and“T�‘þU>Ÿ'EŽ‘ãxX“will“not“b�Ge“ableŽ¡�‘>to–àèbreak“the“line“sensibly‘ÿ*ª,‘ø1or“will“cš¸ãho�Gose“an“unpleasan˜t“break.‘JøIn“this“case“y˜ou'llŽ¡�‘>ha•¸ãv“e–UUto“use�“á\\Ž‘ ÕO².Ž¡�‘MF‘ÿ*ªrequen•¸ãtly›;×y“ou˜need˜to˜inden“t˜things˜within˜m“ulti-line˜form“ulas.‘%LT‘ÿ*ªo˜helpŽ¡�‘>yš¸ãou–žâdo“this,‘±Fa“command“is“pro˜vided“whic˜h“breaks“a“line,‘±Fand“inden˜ts“the“nextŽ¡�‘>line–ߌbš¸ãy“an“amoun˜t“whic˜h“y˜ou“can“supply“(in“units“of“áems²).‘mThe�“á\TŽ‘?²commandŽ¡�‘>takš¸ães–UUa“single“argumen˜t“that“con˜trols“ho˜w“m˜uc˜h“the“next“line“will“b�Ge“inden˜ted:ŽŸê«��Ÿéøã��Ÿfd��‘`€ŠÌa‘ýC¸^‘8àÌbŽ¡�‘zœô¸)‘hÌb‘Úx¸^‘8àÌaŽ¡�‘mG£¸_‘ÇÌd‘Ai¸^‘8àÌeŽŽŽ��’Û€áa–?ý\And“b“\T2Ž¡�’Û€\Implies–?ýb“\And“a“\T1Ž¡�’Û€\Or–?ýd“\And“eŽŸŽŽŽŽŸêª�‘M²Along–p similar“lines“is“the�“á\RŽ‘`²command.‘ÁìThis“do�Ges“a“line“break,›vºlik�¸ãe�“á\\Ž‘ ð²,˜butŽ¡�‘>then–UUpushes“the“formš¸ãula“on“the“next“line“as“far“to“the“righ˜t“as“it“can:ŽŸê«��Ÿïøã��Ÿfd��‘`€Š(Ìa‘ýC¸^–8àÌb‘¾¸)‘hÌb‘Úx¸^“Ìa‘Äc²)Ž¡�’»rå¸_‘ÇÌd‘Ai¸^‘8àÌeŽŽŽ��’Û€á(a–?ý\And“b“\Implies“b“\And“a)“\RŽ¡�’Û€\Or–?ýd“\And“eŽŸŽŽŽŽŸêª�‘M²Bew•¸ãare:‘—Xit›èma“y˜end˜up˜pushing˜it˜further˜to˜the˜righ“t˜than˜y“ou˜exp�Gected!Ž¡�‘>This–UUis“ëAA›ÇBug²,“and“ëAWill˜Not˜Be˜Fixed²,“so“yš¸ãou'll“ha˜v˜e“to“w˜ork“around“it.Ž¡�‘MThe�‘ƒŸá\IfŽ‘C–²,�‘�1á\LetŽ‘�%²,–�1etc.,“constructions–ƒŸare“all“un�¸ãusual“in“that“it's“imp�Gossible“toŽ¡�‘>tš¸ãyp�Geset–UUsomething“sensibly“to“the“righ˜t“of“them.‘qÇF‘ÿ*ªor“example,“if“y˜ou“tryŽ©O‚�‘gÿèá\exists{x–?ý\in“S}{Ž¡�‘w¿ß\If–?ýx=0“\Then“S=Q“\Else“S=P“\Fi}Ž¡�‘gÿè\Or‘?ýS=\emptysetަ�‘>²then–UUy�¸ãou'll“getŽ¡���‘k¸9Ìx‘û\¸2‘ÇÌSŽ’‹©Œ¸���‘8ààifŽ��‘ ÇÌx‘û\²=‘Ç0ŽŽŽ¡��‘8ààthenŽ��‘“‚ÌS‘ù•²=‘ÇÌQŽŽŽ¡��‘8ààelseŽ��‘SÞÌS‘ù•²=‘ÇÌPŽŽŽŽ‘ÿø¸_–ÇÌS‘ù•²=“¸f‘ª¨gŽŽŸ'… �‘>²whicš¸ãh–UUis“unlik˜ely“to“b�Ge“what“y˜ou“w˜an˜ted.Ž¡�‘MY‘ÿ*ªou–åêshould“also“rememš¸ãb�Ger“that“where“ávdm“²w˜an˜ts“a“¸h²math-mo�Gde-expression¸i²,Ž¡�‘>T�‘þU>Ÿ'EŽ‘ãxX– ówill“bšGe“placed“in“math“mo˜de.‘•¡This“is“usually“the“righ�¸ãt“thing“to“do,‘9šbutŽ¡�‘>o�Gccasionally–¿üyš¸ãou“migh˜t“w˜an˜t“a“natural“language“commen˜t“to“app�Gear“there.‘±½InŽ¡�‘>this–R™case“yš¸ãou'll“ha˜v˜e“to“insert“an�“á\mboxŽ‘"å#²or“a�“á\parboxŽ‘-e²dep�Gending“on“whetherŽ¡�‘>y•¸ãour›UUcommen“t˜migh“t˜span˜one˜or˜more˜lines:ŽŸ%ê«��Ÿãøã��Ÿfd�����‘`€ŠàifŽ���‘k 1²the–UUcondition“is“trueŽŽŽŽ¡��‘`€ŠàthenŽ���‘zÛ,²do–UUthe“true“partŽŽŽŽ¡��‘`€ŠàelseŽ���‘v›ˆ²do–UUthe“false“partŽŽŽŽŽŽŽŽ��’Û€á\If–?ý\mbox{the“condition“is“true}Ž¡�’Û€\Then–?ý\mbox{do“the“true“part}Ž¡�’Û€\Else–?ý"do“the“false“part"Ž¡�’Û€\FiŽŸŽŽŽŽ‘>Ÿ"‡ ‰ff‰ÿvŸ J=����‘ "5Ÿý-:Î3ŽŽŽ‘LÜÍF‘ÿJªor–ÕX`will'“read“`should'.ŽŽŸ�’åÿ²10ŽŽŒ‹ mH y� ý£ ?� ýä�‘>²The–M�else-part“illustrates“ho�¸ãw“quotes“can“b�Ge“used“an“an“abbreviation“forޤ �‘>á\mbox{...}–UU²within“math“mo�Gde.Ž¡�‘MFinally‘ÿ*ª,‘*fall–ªthe“constructions“abšGo•¸ãv“e–ªwill“not“break“at“a“page“b˜oundary‘ÿ*ª.‘_ãThisŽ¡�‘>means–_vthat“yš¸ãou're“in“big“trouble“if“y˜ou“w˜an˜t“to“t˜yp�Geset“a“three-page�“á\CasesŽ‘!ßd².‘ÒTheŽ¡�‘>only–¿ÿstatemenš¸ãt“I‘¿ãcan“mak˜e“to“mitigate“this“is:‘Gy˜ou“shouldn't“ha˜v˜e“expressionsŽ¡�‘>that–0Mcomplicated“in“the“ rst“place|who“do“y�¸ãou“exp�Gect“to“read“them?‘eoRemem-Ž¡�‘>bšGer:‘“\truth–¦»is“b˜eautš¸ãy",‘»so“if“y˜our“form˜ulas“are“not“b�Geautiful,‘»then“c˜hances“areŽ¡�‘>they're–UUnot“true“either.ŽŸ ûÝ��‘>ß4Ž‘VLËTšŒÌyp�s3esetting–ffdata“t˜yp�s3esŽŸç�‘>²The–UUfolloš¸ãwing“table“lists“the“primitiv˜e“t˜yp�Ges“and“v‘ÿqÇalues“a˜v‘ÿqÇailable:Ž©EY���’†ÇïŸÇ€‰ffÇp"Ÿfd���Ìͤ™œ„ ff‘ÌÍŸüfd¸f²0µ;–ª¨²1µ;�“:“:“:Ž‘ UO¸g‘(ÌÅ¡„ ffŽ�‘]Ž-ÉN‘®åŸ™œ„ ffŽ��‘©)á\NatŽ’Ç<œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd¸f²1µ;–ª¨²2µ;�“:“:“:Ž‘ UO¸g‘(ÌÅ¡„ ffŽ�‘]Ž-ÉN�Ÿÿ±1Ž‘®åŸ™œ„ ffŽ��‘©)á\NatoneŽ’¤i²,�á\NatiŽ‘ ¾Ÿ™œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd¸f�µ:–ª¨:“:Ž› UO;–ª¨¸²1µ;“²0µ;“²1µ;�“:“:“:Ž˜¸g‘ÌÍ¡„ ffŽ�‘]Ž-ÉZ‘=Ÿ™œ„ ffŽ��‘©)á\IntŽ’Ç<œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd²Rationals‘( »¡„ ffŽ�‘]Ž-ÉQ‘ «Ÿ™œ„ ffŽ��‘©)á\RatŽ’Ç<œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd²Real‘UUn•¸ãum“b�Gers‘i-¡„ ffŽ�‘]Ž-ÉR‘®åŸ™œ„ ffŽ��‘©)á\RealŽ’Ç<œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd¸f�àtrueŽ‘Þ3µ;�‘ª¨àfalseŽ‘Ť¸g‘ð¡„ ffŽ�‘]Ž-ÉB‘=Ÿ™œ„ ffŽ��‘©)á\BoolŽ’Ç<œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd²T‘ÿ*ªruth‘8 ¾¡„ ffŽ��‘]Ž-àtrueŽ‘yuöŸ™œ„ ffŽ��‘©)á\trueŽ’™é²,�á\TrueŽ‘*Œ¸Ÿ™œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd²F‘ÿ*ªalseho•Go“d‘%ÓÖ¡„ ffŽ��‘]Ž-àfalseŽ‘yuöŸ™œ„ ffŽ��‘©)á\falseŽ’Ÿ)²,�á\FalseŽ‘%L»Ÿ™œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd²Nil‘DL¿¡„ ffŽ��‘]Ž-ànilŽ‘yuöŸ™œ„ ffŽ��‘©)á\nilŽ’Ç<œ„ ffŽŽŸ‰ffÇp"ŽŽŽ¦�‘M²If–{®yš¸ãou“need“a“new“k˜eyw˜ord,‘…Dy˜ou“can“create“one“easily–ÿ*ª.‘äÓF“or–{®example,‘…Dif“y˜ourŽ¡�‘>fa•¸ãv“ourite–UUbrand“of“logic“has“\maš¸ãyb�Ge"“as“a“v‘ÿqÇalue,“y˜ou“can“sa˜yޤšB�‘gÿèá\makeNewKeyword{\maybe}{maybe}Ž¡�‘>²and–¦#henceforth�“á\maybeŽ‘*Ì4²is“a“v‘ÿqÇalid“con�¸ãtrol“sequence“that“pro�Gduces“the“textޤ ��‘>àma�®9yb�QÇeŽ‘^ç².‘`”The–O™text“of“the“second“argumenš¸ãt“to�“á\makeNewKeywordŽ‘W_²can“b�Ge“an˜y-Ž¡�‘>thing;–UUit“do�Gesn't“ha•¸ãv“e–UUto“matcš¸ãh“y˜our“con˜trol“sequence“name.ŽŸ�‘Aš©ëBIf–š©yš¾9ou“don't“lik˜e“the“fon˜t“that“k˜eyw˜ords“are“set“in,‘»þy˜ou“can“c˜hange“it“b˜y“rede ningŽŸ �‘>the–Tcommand�“ëD\keywordFontBeginSequenceŽ‘y4úëB.‘pBy“default“it“expands“to�“ëD\sfŽ‘BëB.ŽŸ�‘M²The–UUfolloš¸ãwing“t˜yp�Ge-related“commands“are“pro˜vided:ŽŸRÔ����‘j×.Ÿºq‰ffÿQ¤¤fd���Ìͤ™œ„ ff‘ÌÍŸüfdOutput‘žŽ¡„ ffŽ�‘; «Input‘A¡îŸ™œ„ ffŽ�’ÿqŸ™œ„ ffŽŽ©‰ffÿQ¤¡���Ìͤ™œ„ ff‘ÌÍŸüfdÌx‘4D²-�àsetŽ‘%ªR¡„ ffŽ�‘; «á\setof{x}‘*Œ¸Ÿ™œ„ ffŽ�’› {²set–UUt�¸ãyp�Ge“constructor‘ iBŸ™œ„ ffŽŽ¤ ���Ìͤ™œ„ ff‘ÌÍŸüfd¸fÌa‘Äcµ;–ª¨Ìb‘¡˜µ;“Ìc‘�¶¸g‘ ­�¡„ ffŽ�‘; «á\set{a,b,c}‘ ¾Ÿ™œ„ ffŽ�’› {²set‘UUen�¸ãumeration‘EµŸ™œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd¸f‘ª¨g‘#,Ρ„ ffŽ��‘; «á\emptysetŽ’”×HŸ™œ„ ffŽ�’› {²the–UUempt�¸ãy“set‘(·Ÿ™œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfdÌx�‘4DŸü^ÿ·Ž‘*3ë¡„ ffŽ�‘; «á\seqof{x}‘*Œ¸Ÿ™œ„ ffŽ�’› {²seq.‘qÇt�¸ãyp�Ge‘UUconstructor‘"%Ÿ™œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd[Ìa›Äcµ;–ª¨Ìb‘¡˜µ;“Ìa˜µ;“Ìc‘�¶²]‘ÌÍ¡„ ffŽ�‘; «á\seq{a,b,a,c}‘ŒÄŸ™œ„ ffŽ�’› {²seq.‘qÇen�¸ãumeration‘þ˜Ÿ™œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd[‘ª¨]‘'ž–¡„ ffŽ��‘; «á\emptyseqŽ’”×HŸ™œ„ ffŽ�’› {²the–UUempt�¸ãy“sequence‘0`Ÿ™œ„ ffŽŽ¤ H\���Ìͤ™œ„ H\ff‘ÌÍŸüfdÌx��ŸúTÎ�‘dGämŽŸ«2����‘û\¸ŽŽŽ‘ Ò!ŽŽŽ‘ÞëÌy‘yý¡„ H\ffŽ�‘; «á\mapof{x}{y}‘ÌÁŸ™œ„ H\ffŽ�’› {²map–UUt�¸ãyp�Ge“constructor‘ÌÍŸ™œ„ H\ffŽŽ¡���Ìͤ™œ„ H\ff‘ÌÍŸüfdÌx��ŸúTÎ�‘ €¸ämŽŸ«2�‘û\¸ ‘þUX!ŽŽŽ‘ÎÌy‘ A¡„ H\ffŽ�‘; «á\mapinto{x}{y}‘LÇŸ™œ„ H\ffŽ�’› {²one-one–UUmap“t�¸ãyp�Ge‘³Ÿ™œ„ H\ffŽŽ¤ ���Ìͤ™œ„ ff‘ÌÍŸüfd¸fÌp‘h°¸7!‘ÇÌx‘4D¸g‘ ³l¡„ ffŽ�‘; «á\map{p\mapsto‘?ýx}‘ÌÍŸ™œ„ ffŽ�’› {²map‘UUen�¸ãumeration‘©@Ÿ™œ„ ffŽŽ¡���Ìͤ™œ„ ff‘ÌÍŸüfd¸f‘ª¨g‘#,Ρ„ ffŽ��‘; «á\emptymapŽ’”×HŸ™œ„ ffŽ�’› {²the–UUempt�¸ãy“map‘!iBŸ™œ„ ffŽŽ¦‰ffÿQ¤ŽŽŽŽŸ�’åÿ11ŽŽŒ‹ z4 y� ý£ ?� ýä�‘>²Here–UUare“the“relev‘ÿqÇan�¸ãt“op�Gerators:ŽŸF8.���ŸÎy—��‘D!¼ëF2Ž��‘j£ëD\inŽŽ�’ÕŒÉëFyŽ��’ÿµwëD\owrŽŽ���’,È‘Ÿü óKªµa msbm9ëKyŽŽŽ��’ažiëD\sconcŽŽŽ¤ ������‘E(ØóE5ùž" cmmi9ëE=ŽŽ��‘D!¼ëF2ŽŽŽŽŽ��‘j£ëD\notinŽŽ�’ÕŒÉóI/2iõ lasy9ëIŽ��’ÿµwëD\dresŽŽ��’,È‘óMt ‰: cmbx9ëMlenŽ’ëDvdm–(¿ëBde ne“for“yš¾9ou“a“con˜trol“sequence“whic˜h“switc˜hes“fon˜t,‘-šand“puts“the“righ˜t“spacingŽ¡�‘>in.‘pF‘ÿ:«or‘Texample,ޤ�‘c̰ëD\newMonadicOperator{\inv}{inv}Ž¡�‘>ëBwill–Š«de ne“the�“ëD\invŽ‘û®ëBconš¾9trol“sequence“to“prin˜t“ëMin�´Cv�%ÞëB.‘|uHenceforth“y˜ou“can“sa˜y‘ÿ:«,‘èe.g.,ŽŸ �‘>ëD\inv{Foo}ëB.‘pAll–Tsucš¾9h“sequences“tak˜e“one“argumen˜t“(they“are“monadic,“after“all).ŽŸ�‘M²Y‘ÿ*ªou–UUcan“de ne“a“new“tš¸ãyp�Ge“using“á\type{²t˜yp•Ge-nameá}{²t˜yp“eá}²:ŽŸþ–��Ÿô,��Ÿ Ÿ ��‘`€ŠÌComplex‘û\²=‘ÇÉR–8ณÉRŽŽŽ��’ê€á\type{Complex}{\Real\x‘?ý\Real}ŽŸŽŽŽŽŸ·x�‘M²Comp•Gosites›UUt�¸ãyp“es˜can˜b“e˜t�¸ãyp“eset˜using˜the˜ácomposite˜²en•¸ãvironmen“t:ŽŸ&1È��Ÿãøã��Ÿfd���‘`€Šàcomp�QÇoseŽ’� ÌDate‘ÿ}'c�‘f àofŽŽ¤ ��‘wã_ÌdayŽ�’ŒÙ¿²:‘¸f²1µ;�–ª¨:“:“:Ž‘ÿ÷;‘ª¨²366¸gµ;ŽŽ¡��‘t€ŒÌye‘ÿ}'arŽ�’ŒÙ¿²:‘¸f²1583µ;�–ª¨:“:“:Ž‘ÿ÷;‘ª¨²2599¸gŽŽ¡�‘`€ŠàendŽŽŽ��’ÜÙ¿á\begin{composite}{Datec}ޤ �’çY¹day–?ý:\set{1,\ldots,366},“\\Ž¡�’çY¹year:\set{1583,\ldots,2599}Ž¡�’ÜÙ¿\end{composite}ŽŸŽŽŽŽŸ&xã�‘M²There–å³is“also“a“ácomposite*“²en•¸ãvironmen“t–å³(and“an“equiv‘ÿqÇalen�¸ãt�“á\scomposeŽ‘5 K²con-ޤ �‘>trol–UUsequence)“that“places“the“enš¸ãtire“comp�Gosite“t˜yp�Ge“on“a“single“line:ŽŸ xä��Ÿéøã��ŸñÇ��‘`€Šàcomp�QÇoseŽ’� ÌCelsius�‘§uàofŽ‘ÀTÉR�‘ÕTàendŽŽŽ��’ê€á\begin{composite*}{Celsius}Ž¡�’ôÿú\RealŽ¡�’ê€\end{composite*}ŽŸŽŽŽŽŸ)ñÇ��Ÿõøã��ŸñÇ��‘`€Šàcomp�QÇoseŽ’� ÌCelsius�‘§uàofŽ‘ÀTÉR�‘ÕTàendŽŽŽ��’ê€á\scompose{Celsius}{\Real}ŽŸŽŽŽŽŸêª�‘M²`Records'–UUcan“b�Ge“de ned“using“the“árecord“²en•¸ãvironmen“t:ŽŸ�‘Wá\begin{record}{²record-t�¸ãyp�Ge-nameá}Ž¡�‘W² eld-name–UUá:“² eld-t�¸ãyp�Ge�“á\\ŽŽ¡�‘W².–ªª.“.Ž¡�‘Wá\end{record}ŽŽŸ�’åÿ²12ŽŽŒ‹ ŒG y� ý£ ?� ýä�‘>²The–UUcolons“are“used“as“sub- eld“separators.ŽŸ%ê«��Ÿãøã��Ÿ ¤ ��‘`€ŠÌPERSON‘£Ž²::Ž���’¡(KÌNMŽ�’¸29²:‘ÌChar�‘�Ÿü^ÿ·ŽŽŽ¡��’›G˜ÌFEMŽ�’¸29²:‘ÉBŽŽŽŽŽ��’ÿôá\begin{record}{PERSON}ޤ �’ ÿîNM–?ý:“\seqof{Char}“\\Ž¡�’ ÿîFEM–?ý:“\BoolŽ¡�’ÿô\end{record}ŽŸŽŽŽŽŸ%êª�‘M²If–UUthe“de nition“is“short,“yš¸ãou“ma˜y“prefer“to“use“a“short“form:Ž©Sõ�‘gÿèá\defrecord{PERSON}{ޤ �‘râNM–?ý:“\seqof{Char}“\\Ž¡�‘râFEM–?ý:“\BoolŽ¡�‘gÿè}ŽŸSõ�‘@ù"ëBSome–ù"pšAÇeople“prefer“the“ eld“names“to“app˜ear“lined“up“on“the“left,‘þÆsome“on“the“righ�¾9t.ޤ �‘>If–¾|yš¾9ou“w˜an˜t“them“to“app�AÇear“on“the“left,‘èÆsa˜y�“ëD\leftRecordŽ‘7·îëB;‘if“y˜ou“w˜an˜t“them“on“theŽ¡�‘>righ•¾9t,‘ž{sa“y�‘€ÄëD\rightRecordŽ‘;3ÌëB.‘êëThe–€Äscop�AÇe“of“the�“ëD\leftRecordŽ‘8úúëBand�“ëD\rightRecordŽ‘=´�ëBcommandsŽ¡�‘>are–Tthe“currenš¾9t“group.‘pBy“default,“y˜ou“get�“ëD\rightRecordŽ‘;È\ëB.ŽŸ�‘M²UpšGdating–dO elds“of“comp˜osites“using“the“µ²-function“can“b˜e“sp˜eci ed“usingޤ ��‘>á\chgŽ‘Rÿô²:ŽŸ1È��Ÿõøã��Ÿfd��‘`€Šµ²(Ìp‘¡˜µ;–ª¨ÌFEM‘j¦¸7!‘Ç:“Ìman‘Äc²(Ìq‘â}²))ŽŽŽ��’Û€á\chg{p}{FEM}{\Not‘?ýman(q)}ŽŸŽŽŽŽŸêª�‘M²Notice–UUthat“the“µ²,“parenš¸ãtheses,“comma“and“¸7!“²w˜ere“inserted“automatically‘ÿ*ª.ŽŸ ì»��‘>ß5Ž‘VLËHošŒÌw–ffto“T˜yp�s3eset“F‘þ¦functionsŽŸç�‘>²T�¸ãyp�Gesetting–UUµ²-expressions“is“easy:ŽŸê«��Ÿõøã��Ÿfd���‘`€ŠµÌx‘4Dµ;‘ª¨ÌyŽ‘x•׸–8àÌx�‘4DŸü^ÿ±2ޑ闲+“Ìy�‘â}Ÿü^ÿ±2ŽŽŽŽ��’Û€á\LambdaFn{x,y}{x^2+y^2}ŽŸŽŽŽŽŸxã�‘M²As–sGwith�“á\forallŽ›'32²,�‘ ~á\existsŽ‘)Ó°²and�“á\uniqueŽ˜²,�‘ ~á\LamdbaFnŽ‘4Sª²has“a“*-form“that“placesŽ¡�‘>the›UUb•Go“dy˜of˜the˜function˜b“elo•¸ãw˜and˜to˜the˜righ“t:ŽŸ|e��Ÿïg)��Ÿfd���‘`€ŠµÌx‘4Dµ;–ª¨Ìy‘â}µ;“ÌzŽ’‚Y¸ŽŸ #t����‘w€‚²(Ìx�‘4DŸü^ÿ±2ޑ闲+–8àÌy�‘â}Ÿü^ÿ±2Ž‘—в+“Ìz�‘:«Ÿü^ÿ±2Ž‘·²)��Ÿù¯ �‘33ó†›Zcmr5°1Ž‘33Ÿx‰W g ŸýP�2ŽŽŽŽŽŽŽŽŽ��’Û€á\LambdaFn*{x,y,z}{Ž¡�’åÿú(x^2+y^2+z^2)^{\frac12}}ŽŸŽŽŽŽŸ ��‘M²There–®|is“also“a“áfn“²(function)“en•¸ãvironmen“t–®|for“de ning“named“functions.‘}has–UUthe“follo�¸ãwing“structure:ަ�‘Wá\begin{fn}{²name-of-functioná}{–UU²argumen�¸ãt-list“á}Ž¡�‘W\signature{²signature-of-functioná}Ž¡�‘W¸h²optional‘UUprecondition¸iŽ¡�‘Wh²optional‘UUp�Gostcondition¸iŽ¡�‘W²b•Go“dy–UUof“function“(a“¸h²math-mo�Gde-expression¸i²)Ž¡�‘Wá\end{fn}ަ�‘M²See–ffthe“third“page“for“an“example.‘¤úThe�“á\signatureŽ‘;L®²is“optional“and“can“b�GeŽ¡�‘>placed– Oanš¸ãywhere“within“the“b•Go“dy|it– Owill“alw˜a˜ys“b�Ge“t˜ypšGeset“b˜efore“the“b˜o˜dy‘ÿ*ª.ŽŽŸ�’åÿ13ŽŽŒ‹˜· y� ý£ ?� ýä�‘>²Useful–Џ!².‘7×Note–—Zthat“yš¸ãou“can“also“en˜ter“functions“de ned“implicitly“with“pre-“andŽ¡�‘>p�Gost-conditions;–UUsee“the“next“section“on“hoš¸ãw“to“en˜ter“them.Ž¡�‘MAll–F—of“the“material“in“the“section“on“formš¸ãulas“is“relev‘ÿqÇan˜t“within“the“b•Go“dy‘F—ofŽ¡�‘>the‘UUfunction.Ž¡�‘MIf–¢¿yš¸ãou“frequen˜tly“in˜tersp�Gerse“y˜our“function“de nitions“with“text“(andŽ¡�‘>y•¸ãou›ê€should),‘�Êy“ou˜can˜sa“v“e˜some˜t“yping˜b“y˜using˜the˜ávdmfn˜²en“vironmen“t.Ž¡��‘>á\beginŽ‘]î{vdmfn}› ϲ.–ªª.“.�“á\endŽ‘ªž{vdmfn}˜²is˜equiv‘ÿqÇalen�¸ãt˜to�˜á\beginŽ‘& ½{vdm}�\beginŽ‘î{fn}Ž¡�‘>².–ªª.“.�“á\endŽ‘ªž{fn}�\endŽ‘ÿô{vdm}².Ž¡�‘MThe–ºáfn“²en•¸ãvironmen“t–ºalso“has“a“*-form“that“do�Ges“not“insert“paren�¸ãthesesŽ¡�‘>around–UUthe“argumen�¸ãt“list.‘qÇF‘ÿ*ªor“example:ŽŸ%ê«��Ÿãøã��Ÿfd���‘`€ŠÌMPŽ‘qG²[–þUX[Ìp‘¡˜²]“]µ��ŸýØä�‘ [ÚÑ4Ž‘ [ÚŸþ݉\)Ž@ŽŽ�‘”õ:–ª¨:“:ŽŽŽŽ��’Û€á\begin{fn*}{MP}{Ž¡�’åÿú\term{p}\rho\sigma}Ž¡�’Û€...Ž¡�’Û€\end{fn*}ŽŸŽŽŽŽŸ&®8�‘M²If–UUyš¸ãou“require“the��ŸýØä�“Ñ4Ž“Ÿþ݉\)Ž@ŽŽ‘8ê²sym˜b�Gol“b˜y“itself,“then“y˜ou“can“get“it“b˜y“sa˜ying�“á\DEFŽ‘UI².ŽŸþ6��‘>ëL5.1Ž‘\ÀIn• v‘ÿ@arian“tsŽŸuT�‘>²T‘ÿ*ªo–UUtš¸ãyp�Geset“an“in˜v‘ÿqÇarian˜t“on“a“comp�Gosite“ob‘Ž8ject,“use“the“follo˜wing“structure:ŽŸ=ê«��ŸËøã��Ÿ ¡��‘`€ŠÌD‘ðµ²::Ž���‘{ïÌdayŽ�’�åu²:‘ÌDayŽŽ¡��‘xŒBye‘ÿ}'arŽ�’�åu²:‘ÌY‘ÿ;¼e‘ÿ}'arŽŽŽŽŸÆ �‘`€ŠàwhereŽ¡���‘`€ŠÌinv‘�²-ÌDŽ‘z°Ù²(Ìmk‘�²-ÌD‘ðµ²(Ìd‘‰µ;‘ª¨Ìy‘â}²))��ŸýØä�‘ Ñ4Ž‘ Ÿþ݉\)Ž@ŽŽŽ¡�‘t€ŒÌis‘Ò!²-Ìle‘ÿ}'apyr‘�²(Ìy‘â}²)–Ǹ_“Ìd‘Ï¡¸“²365ŽŽŽ��’ê€á\begin{record}{D}Ž¡�’ôÿúday–?ý:“Day“\\Ž¡�’ôÿúyear–?ý:“YearŽ¡�’ê€\end{record}Ž¡�’ê€\whereŽ¡�’ê€\begin{fn}{inv-D}{mk-D(d,y)}Ž¡�’ôÿúis-leapyr(y)–?ý\Or“d“\le“365Ž¡�’ê€\end{fn}ŽŸŽŽŽŽŸP ¦��‘>ß6Ž‘VLËHošŒÌw–ffto“T˜ypšs3eset“Op˜erationsŽŸç�‘>²OpšGerations–UUare“t�¸ãyp˜eset“within“the“áop“²en•¸ãvironmen“t.‘qÇThe–UUgeneral“structure“is:Ž©�‘Wá\begin{op}[¸h²name-of-op�Geration¸iá]Ž¡�‘W\args{¸h²list-of-argumen�¸ãts¸iá}Ž¡�‘W\res{¸h²result(s)¸iá}Ž¡�‘W\ext{¸h²list-of-externals¸iá}Ž¡�‘W¸h²pre-condition¸iŽ¡�‘Wh²p�Gost-condition¸iŽ¡�‘Wá\end{op}ަ�‘M²The–a,order“of“the“v‘ÿqÇarious“parts“within“the“áop“²en•¸ãvironmen“t–a,is“not“imp�Gortan�¸ãt;Ž¡�‘>they–UUwill“alw•¸ãa“ys–UUb�Ge“prinš¸ãted“in“a“canonical“st˜yle“(see“page“3“for“an“example).ŽŽŸ�’åÿ14ŽŽŒ‹¢÷ y� ý£ ?� ýä�‘M²Anš¸ãy–ÇØof�“á\argsŽ‘ ɲ,�‘dxá\resŽ–dl²,�‘dxá\extŽ“²,‘dx¸h²pre-condition¸i–ÇØ²or“¸h²p�Gost-condition¸i“²ma˜y“b�Geޤ �‘>omitted.‘ ¬�á\begin{vdmop}–˜²is“an“abbreviation“for“á\begin{vdm}\begin{op}²;Ž¡�‘>á\end{vdmop}–UU²is“an“abbreviation“for“á\end{op}\end{vdm}².Ž¡�‘MThe–r§¸h²name-of-opšGeration¸i“²can“b˜e“anš¸ãy“one-line“expression;‘¾6it“is“t˜yp�Geset“in“mathŽ¡�‘>mo�Gde.‘DCAn–ÌÉalternativš¸ãe“w˜a˜y“of“spšGecifying“the“name“of“the“op˜eration“is“to“omit“theŽ¡�‘>optional–žVargumen�¸ãt“(within“á[]²),›ð–and“use“á\opname{¸h²name-of-op�Geration¸iá}²,˜an�¸ãy-Ž¡�‘>where–UUwithin“the“b•Go“dy–UUof“the“áop“²en•¸ãvironmen“t.Ž¡�‘MThe–l¸h²list-of-argumenš¸ãts¸i“²is“a“¸h²math-mo�Gde-expression¸i“²that“can“span“m˜ultipleŽ¡�‘>lines;–UUforce“a“newline“with�“á\\Ž‘ ÕO².‘qÇIf“presenš¸ãt“it“is“placed“within“paren˜theses.Ž¡�‘MThe–Å}¸h²result(s)¸i“²is“also“anš¸ãy“¸h²math-mo�Gde-expression¸i².‘AÕIt“is“t˜yp�Geset“to“the“righ˜tŽ¡�‘>of–UUanš¸ãy“argumen˜ts.Ž¡�‘MThe–UU¸h²list-of-externals¸i“²takš¸ães“the“follo˜wing“form:Ž©�‘Wá\ext{Ž¡�‘a¸h²optional�‘UUá\RdŽ‘j¡²or�‘UUá\WrŽ‘L¸i–UUh²external-name(s)¸i“á:‘qǸh²external-t�¸ãyp�Ges¸i�“á\\ŽŽ¡�‘a¸h²optional�‘UUá\RdŽ‘j¡²or�‘UUá\WrŽ‘L¸i–UUh²external-name(s)¸i“á:‘qǸh²external-t�¸ãyp�Ges¸i�“á\\ŽŽ¡�‘W².–ªª.“.Ž¡�‘Wá}ަ�‘>²Alternativš¸ãely‘ÿ*ª,‘|nif–6the“list“of“externals“is“long“(sa˜y‘ÿ*ª,‘|nmore“than“ v˜e“lines)“theŽ¡�‘>áexternals›UU²en•¸ãvironmmen“t˜can˜b�Ge˜used:ަ�‘Wá\begin{externals}Ž¡�‘a¸h²optional�‘UUá\RdŽ‘j¡²or�‘UUá\WrŽ‘L¸i–UUh²external-name(s)¸i“á:‘qǸh²external-t�¸ãyp�Ges¸i�“á\\ŽŽ¡�‘a¸h²optional�‘UUá\RdŽ‘j¡²or�‘UUá\WrŽ‘L¸i–UUh²external-name(s)¸i“á:‘qǸh²external-t�¸ãyp�Ges¸i�“á\\ŽŽ¡�‘W².–ªª.“.Ž¡�‘Wá\end{externals}ŽŸ�‘B_cëBSome–_cpšAÇeople“prefer“the“externals“iden�¾9ti ers“to“app˜ear“lined“up“on“the“left,‘±çsomeޤ �‘>on– the“righš¾9t.‘…If“y˜ou“w˜an˜t“them“to“app�AÇear“on“the“left,‘Jòsa˜y�“ëD\leftExternalsŽ‘F3:ëB;‘ˆÞif“y˜ouŽ¡�‘>w•¾9an“t–4©them“on“the“righ•¾9t,‘|~sa“y�‘4©ëD\rightExternalsŽ‘KsëB.‘zoThe–4©scop�AÇe“of“the�“ëD\leftExternalsŽŽ¡�‘>ëBand�‘ìëD\rightExternalsŽ‘Rç¢ëBcommands–ìare“the“currenš¾9t“group.‘ è8By“default,‘¿‘y˜ou“getŽ¡��‘>ëD\leftExternalsŽ’€&4ëB.ŽŸ�‘M²The–UU¸h²pre-condition¸i“²and“¸h²p�Gost-condition¸i“²tak�¸ãe“similar“forms:ަ�‘Wá\pre{¸h²math-mo�Gde-expression¸iá}ަ�‘>²orަ�‘Wá\begin{precond}ޤ �‘W¸h²math-mo�Gde-expression¸iŽ¡�‘Wá\end{precond}ަ�‘>²andަ�‘Wá\post{¸h²math-mo�Gde-expression¸iá}ަ�‘>²orŽŽŸ�’åÿ15ŽŽŒ‹¬ì y� ý£ ?� ýä�‘Wá\begin{postcond}ޤ �‘W¸h²math-mo�Gde-expression¸iŽ¡�‘Wá\end{postcond}Ž©ü'�‘>²Use–ÌHthe�“á\beginŽ‘"L6².–ªª.“.�“á\endŽ‘væ²st�¸ãyle–ÌHif“the“¸h²math-mo�Gde-expression¸i“²is“longer“than“a“fewŽ¡�‘>lines.‘$óAll–ædof“the“constructs“menš¸ãtioned“in“the“section“on“form˜ulas“can“b�Ge“usedŽ¡�‘>within–UUpre-“and“p�Gost-conditions.ŽŸ!ð��‘>ß7Ž‘VLËPro�s3ofsŽŸç�‘>²Here's–UUan“example“of“t�¸ãypšGesetting“pro˜ofs“in“the“\natural“deduction"“st�¸ãyle.ŽŸ)j�Ÿfd���‘\àfromŽ‘wj¢ÌE�Ÿÿ±1Ž‘C‹¸_‘ÇÌE�Ÿÿ±2ŽŽŽ¡��‘M²1�‘%j¡àfromŽ‘@ÕCÌE�Ÿÿ±1ŽŽŽ¡���‘wj¢àinferŽ’’ZšÌE�Ÿÿ±2Ž‘C‹¸_‘ÇÌE�Ÿÿ±1ŽŽ�’w4¸_²-I(h1)ŽŽ¡��‘M2�‘%j¡àfromŽ‘@ÕCÌE�Ÿÿ±2ŽŽŽ¡���‘wj¢àinferŽ’’ZšÌE�Ÿÿ±2Ž‘C‹¸_‘ÇÌE�Ÿÿ±1ŽŽ�’w4¸_²-I(h2)ŽŽ¡���‘\àinferŽ‘vïøÌE�Ÿÿ±2Ž‘C‹¸_‘ÇÌE�Ÿÿ±1ŽŽ�’iN1¸_²-E(h,1,2)ŽŽ¡ŽŸyìø�‘gÿèá\begin{proof}Ž¡�‘|ÿÜ\From–?ýE@1“\Or“E@2’�¿¯\\Ž¡�‘gÿè1‘$¿ë\From‘?ýE@1’¢¿£\\Ž¡�’‘ÿÐ\Infer–?ýE@2“\Or“E@1‘ ú\by“$\vee$-I(h1)‘ÿô\\Ž¡�‘gÿè2‘$¿ë\From‘?ýE@2’¢¿£\\Ž¡�’‘ÿÐ\Infer–?ýE@2“\Or“E@1‘ ú\by“$\vee$-I(h2)‘ÿô\\Ž¡�‘|ÿÜ\Infer–?ýE@2“\Or“E@1‘î\by“$\vee$-E(h,1,2)“\\Ž¡�‘gÿè\end{proof}ŽŸû1�‘M²ProšGofs–Íare“em�¸ãb˜edded“within“the“áproof“²en•¸ãvironmen“t.‘D\(A‘Ìòpro˜of–Ído˜es“not“ha•¸ãv“eŽ¡�‘>to–ëbšGe“within“a“ávdm“²en•¸ãvironmen“t.)‘2óEac“h–ëline“of“the“pro˜of“ends“with�“á\\Ž‘k².‘2óLinesŽ¡�‘>that–[}bšGegin“a“subpro˜of“ha•¸ãv“e�‘[}á\FromŽ‘ öë²after–[}the“equation“n•¸ãum“b˜er.‘„?Lines–[}that“end“aŽ¡�‘>subpro�Gof›"�ha•¸ãv“e�˜á\InferŽ‘%Äð²after˜the˜equation˜n“um“b�Ger.‘`ÖOther˜lines˜ha“v“e�˜á\&Ž‘Äü²after˜theŽ¡�‘>equation› n•¸ãum“b�Ger˜(see˜next˜example).‘™ If˜y“ou˜don't˜need˜an˜equation˜n“um“b�Ger,Ž¡�‘>just–ê«omit“it,‘but“yš¸ãou“m˜ust“ha˜v˜e“one“of“either�“á\FromŽ‘*œ²,�‘á\InferŽ‘%j™²or�“á\&Ž‘UP²on“eac˜h“pro�GofŽ¡�‘>line.‘e5If–/�yš¸ãou“w˜an˜t“to“include“a“justi cation“of“a“particular“pro�Gof“line“at“the“righ˜tŽ¡�‘>hand–!êend“of“the“line,‘,3tš¸ãyp�Ge“it“after“a�“á\byŽ‘áá².�‘`¤á\byŽ‘B…²is“optional;‘3y˜ou“needn't“include“itŽ¡�‘>if–UUy�¸ãou“don't“need“a“justi cation.Ž¡�‘MP•¸ãoin“ts›UUw“orth˜b�Gearing˜in˜mind:ަ����‘M¸ŽŽŽ‘W²Y‘ÿ*ªou–òare“automatically“placed“in“math“mo�Gde“after“the�“á\FromŽ‘2 ²,�‘Há\InferŽ‘'‹N²orŽ¡��‘Wá\&Ž‘aü²;–UUthe“math“mo�Gde“ends“at“the“next�“á\byŽ‘j¡²or�“á\\Ž‘ ÕO².ŽŸþ����‘M¸ŽŽŽ‘W²Y‘ÿ*ªou–&0Ìc‘ÿ}'annot“²break“a“line“in“the“middle“simply“bš¸ãy“using�“á\\Ž‘ÌZ²b�Gefore�“á\byŽ‘æ'²;‘5çy˜ouŽ¡�‘Wmš¸ãust–UUuse“separate“pro�Gof“lines“to“split“a“form˜ula.ŽŽŸ�’åÿ16ŽŽŒ‹·E y� ý£ ?� ýä����‘M¸ŽŽŽ‘W²Y‘ÿ*ªou–UTare“within“a“átabbing“²en•¸ãvironmen“t–UTwithin“a“pro�Gof,“so“y�¸ãou“can“use“allޤ �‘Wthe–''usual“átabbing“²commands“(�á\=Ž‘ ú²,�‘0dá\>Ž‘ °^²,‘0detc.)‘bcto“line“things“up“across“pro�GofŽ¡�‘Wlines.‘«¦Note–½õthat“yš¸ãou“will“explicitly“ha˜v˜e“to“en˜ter“math“mo�Gde“again“afterŽ¡�‘Wan�¸ãy–UUof“these“commands“though.Ž©f£�‘MHere's–UUanother“example:ŽŸù"�Ÿfd���‘\àfromŽ�‘wj¢¸8Ìx‘û\¸2‘ÇÌXŽ’šEô¸‘8àÌE‘3é²(Ìx‘4D²);‘ª¨Ìs‘™9¸2‘ÇÌXŽŽ¡��‘M²1‘%j¡¸:�‘ª¨9Ìx‘û\¸2‘ÇÌXŽ‘$…ú¸‘8à:‘ª¨ÌE‘3é²(Ìx‘4D²)Ž�’n*¤¸8²-defn(h)ŽŽ¡��‘M2‘%j¡¸:–ª¨:“ÌE‘3é²(Ìs‘Ò!µ=Ìx‘4D²)Ž�’iÜm¸:‘ª¨9²-E(1,h)ŽŽ¡���‘\àinferŽ‘vïøÌE‘3é²(Ìs‘Ò!µ=Ìx‘4D²)ŽŽ¡ŽŸa2�‘>á\begin{proof}Ž¡�‘Hú\From–?ý\forall{x\in“X}{E(x);“s\in“X}‘x¿»\\Ž¡�‘>1–?ý\&‘ÿô\Not\exists{x\in“X}{\Not“E(x)}“\by“$\Forall$-defn(h)\\Ž¡�‘>2–?ý\&‘ÿô\Not\Not“E(s/x)‘D?Ù\by“$\Not\Exists$-E(1,h)\\Ž¡�‘Hú\Infer‘?ýE(s/x)’ì?y\\Ž¡�‘>\end{proof}ŽŸ@L�‘B.)ëBThe–.)amounš¾9t“of“space“used“b˜y“the“pro�AÇof“n˜um˜bšAÇer“can“b˜e“cš¾9hanged“b˜y“c˜hanging“theޤ �‘>length�‘èƒëD\ProofNumberWidthŽ‘S;yëB.‘ €The–èƒdistance“from“the“left“margin“to“the“prošAÇof“n•¾9um“b˜er‘èƒisŽ¡�‘>dictated–Tb�¾9y�“ëD\ProofIndentŽ‘;È\ëB.ŽŸ%ðÀ��‘>ß8Ž‘VLËCustomising–ffthe“St�ŒÌyleŽŸç�‘>ÌSome› op–ÿ}'e“ople˜ar“e˜never˜satis e“d.›ñ ²W‘ÿ*ªe–Õall“kno�¸ãw“that“it's“true.˜In“order“to“caterޤ �‘>for–öáthose“who“aren't“satis ed“with“the“output“from“ávdm²,‘ Åsome“attempt“has“b�GeenŽ¡�‘>made–šgto“alloš¸ãw“a“limited“degree“of“customisation“b˜y“the“user.‘@üIn“particular,Ž¡�‘>yš¸ãou–» can“alter“some“of“the“in˜ternal“spacing“c˜hosen“b˜y“ávdm²,‘Ô“and“ev˜en“ha˜v˜e“y˜ourŽ¡�‘>oš¸ãwn–¦macros“called“at“c˜hosen“places“within“ávdm²'s“macros.‘UâNaturally‘ÿ*ª,‘cy˜ou“are“notŽ¡�‘>advised–×lto“try“this“unless“yš¸ãou“feel“y˜ou“ha˜v˜e“some“idea“of“what“y˜ou“w˜an˜t,‘÷ñandŽ¡�‘>what–°nyš¸ãou“are“doing.‘ƒIn“this“section“w˜e“list“the“things“that“y˜ou“can“c˜hange,‘Ç4inŽ¡�‘>order–UUof“increasing“dicult�¸ãy‘ÿ*ª.ŽŸÝ2��‘>ëL8.1Ž‘\ÀChanging–€the“SpacingŽŸuT�‘>²In–ó6sevš¸ãeral“places,‘Öessen˜tially“arbitrary“spacings“ha˜v˜e“b�Geen“c˜hosen“b˜y“the“author.Ž¡�‘>The–FÖdimensions“of“these“spaces“are“givš¸ãen“b˜y“Ìrubb‘ÿ}'er‘rlengths.��Ÿü^ÿ±4ŽŽ‘ ¼²If“y˜ou“w˜an˜t“toŽ¡�‘>c•¸ãhange› an“y˜of˜them,‘&³use˜L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX's�˜á\setlengthŽ‘:µö²or�˜á\addtolengthŽ‘E5ð²commands.‘^YF‘ÿ*ªorŽ¡�‘>example,ަ�‘gÿèá\setlength{\postHeaderSkip}{13.33pt–?ýplus“2pt“minus“1pt}Ž‘>ŸR›‰ff‰ÿvŸ J=����‘ "5Ÿý-:Î4ŽŽŽ‘LÜÍSee–ÕXthe“L�Ÿþ¢#�‘üð¡ÎAŽŽ‘ ïÍT�‘þ•AŸ¸ãEŽ‘MX“b•shrink›]ëb�¾9y–ÿ:«.‘ö4F“or˜example,‘pëD12pt–¹–plus“2pt“minus“1pt˜ëBmeans˜that˜the˜length˜will˜b�AÇe˜inŽ¡�‘>the–Trange“11{14pt,“with“12pt“as“its“\natural"“length.ŽŸ�‘M²The–.Áspaces“in“question“all“appšGear“around“ávdm“²items“suc�¸ãh“as“op˜erations,‘6xandޤ �‘>in›Sb�Get•¸ãw“een˜ma‘Ž8jor˜parts˜of˜suc“h˜items.‘qThe˜names˜of˜the˜lengths˜should˜con“v“eyŽ¡�‘>where–6áthey“apply‘ÿ*ª.‘lThe“follo�¸ãwing“table“lists“all“the“lengths,‘oDand“their“defaultŽ¡�‘>settings.‘dNNote–,éthat“an“áex“²is“ab�Gout“the“heighš¸ãt“of“an“\x"“in“the“curren˜t“fon˜t,‘4ÿandŽ¡�‘>an–UUáem“²is“ab�Gout“the“width“of“an“\M"“in“the“currenš¸ãt“fon˜t.Ž ‡LË���‘AjÑŸ„›‰ffR*^¤fd���Ìͤ™œ„ ff‘ÌÍŸüfdÌL‘ÿ}'ength‘{ÈD¡„ ffŽ�’¤ÿ¬Default‘“çsize‘+jΟ™œ„ ffŽ�’ œ*Use‘ÿ}'d‘“çwithin‘8õŸ™œ„ ffŽŽ©‰ffR*^¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preOperationSkipŽ’ž™F„ ffŽ�’¤ÿ¬²2ex–UU+“0.5ex“¸“²0.2ex‘ÌÍŸ™œ„ ffŽ�’ œ*áop‘UU²en�¸ãv‘+…°Ÿ™œ„ ffŽŽ¤ ���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postOperationSkipŽ’ž™F„ ffŽ�’¤ÿ¬²2ex–UU+“0.5ex“¸“²0.2ex‘ÌÍŸ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postHeaderSkipŽ’ž™F„ ffŽ�’¤ÿ¬².5ex–UU+“.2ex“¸“².2ex‘ ²Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postExternalsSkipŽ’ž™F„ ffŽ�’¤ÿ¬².5ex–UU+“.2ex“¸“².2ex‘ ²Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postPreConditionSkipŽ’ž™F„ ffŽ�’¤ÿ¬².5ex–UU+“.2ex“¸“².2ex‘ ²Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¦‰ffR*^Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preFunctionSkipŽ’ž™F„ ffŽ�’¤ÿ¬²2ex–UU+“.5ex“¸“².2ex‘ÌÏŸ™œ„ ffŽ�’ œ*áfn‘UU²en�¸ãv‘+…°Ÿ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postFunctionSkipŽ’ž™F„ ffŽ�’¤ÿ¬²2ex–UU+“.5ex“¸“².2ex‘ÌÏŸ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\betweenSignatureAndBodySkipŽ’ž™F„ ffŽ�’¤ÿ¬²1.2ex–UU+“.3ex“¸“².2ex‘±Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\betweenFunctionAndPreSkipŽ’ž™F„ ffŽ�’¤ÿ¬²1.2ex–UU+“.3ex“¸“².2ex‘±Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¦‰ffR*^Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preTypeSkipŽ’ž™F„ ffŽ�’¤ÿ¬²1.2ex–UU+“.5ex“¸“².3ex‘±Ÿ™œ„ ffŽ�’ œ*átype‘UU²command‘ÌÍŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postTypeSkipŽ’ž™F„ ffŽ�’¤ÿ¬²1.2ex–UU+“.5ex“¸“².3ex‘±Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¦‰ffR*^Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preCompositeSkipŽ’ž™F„ ffŽ�’¤ÿ¬²1.2ex–UU+“.5ex“¸“².3ex‘±Ÿ™œ„ ffŽ�’ œ*ácomposite‘UU²en�¸ãv‘ÅÅŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postCompositeSkipŽ’ž™F„ ffŽ�’¤ÿ¬²1.2ex–UU+“.5ex“¸“².3ex‘±Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¦‰ffR*^Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preRecordSkipŽ’ž™F„ ffŽ�’¤ÿ¬².75ex–UU+“.3ex“¸“².2ex‘±Ÿ™œ„ ffŽ�’ œ*árecord‘UU²en�¸ãv‘…¼Ÿ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postRecordSkipŽ’ž™F„ ffŽ�’¤ÿ¬².75ex–UU+“.3ex“¸“².2ex‘±Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¦‰ffR*^Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preFormulaSkipŽ’ž™F„ ffŽ�’¤ÿ¬²1.2ex–UU+“.5ex“¸“².3ex‘±Ÿ™œ„ ffŽ�’ œ*áformula‘UU²en�¸ãv‘E¿Ÿ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postFormulaSkipŽ’ž™F„ ffŽ�’¤ÿ¬²1.2ex–UU+“.5ex“¸“².3ex‘±Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¦‰ffR*^Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preProofSkipŽ’ž™F„ ffŽ�’¤ÿ¬².75ex–UU+“.3ex“¸“².2ex‘±Ÿ™œ„ ffŽ�’ œ*áproof‘UU²en�¸ãv‘ŹŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postProofSkipŽ’ž™F„ ffŽ�’¤ÿ¬².75ex–UU+“.3ex“¸“².2ex‘±Ÿ™œ„ ffŽ�’Q÷+Ÿ™œ„ ffŽŽ¦‰ffR*^ŽŽŽ Ž U��‘>ëL8.2Ž‘\ÀConš trolling–€Line“and“P˜aragraph“BreaksŽŸuT�‘>²T�‘þU>Ÿ'EŽ‘ãxX–>muses“the“notion“of“Ìp‘ÿ}'enalties‘޲to“decide“where“line“and“page“breaks“go.‘ÐV‘ÿ*ªariousŽ¡�‘>v‘ÿqÇalues–¾’of“p�Genaltš¸ãy“are“used“at“places“within“ávdm“²to“con˜trol“breaks.‘­}T‘ÿ*ªo“fullyŽ¡�‘>understand–‰hoš¸ãw“to“c˜ho�Gose“breaks,‘Ö read“ÌThe‘¯T�‘þKß'EŽ‘Í-Xb–ÿ}'o“ok².‘ Ho˜w˜ev˜er,‘Ö put‘‰simply‘ÿ*ª,Ž¡�‘>pšGenalties–Û~are“whole“n•¸ãum“b˜ers–Û~in“the“range“¸²10000“to“10000.‘CA‘Û\v‘ÿqÇalue“of“10000Ž¡�‘>means–šf\nevš¸ãer“break“here,"‘«ªand“a“v‘ÿqÇalue“of“¸²10000“means“\alw˜a˜ys“break“here."Ž¡�‘>V‘ÿ*ªalues–Õ/in“bšGet•¸ãw“een–Õ/p˜enalise“or“encourage“breaking“prop˜ortionally‘ÿ*ª,›îÐso“that,˜e.g.,“aŽ¡�‘>v›ÿqÇalue–.Ëof“¸²500“encourages“a“break,‘6€but“b�¸ãy“no“means“forces“it.‘dîA‘.Áv˜alue“of“zero“isŽ¡�‘>neutral.Ž¡�‘MT‘ÿ*ªo–8"assign“to“a“p�Genalt�¸ãy�“á\pŽ› ¸²,‘=ùwrite�“á\pŽ˜=1000²,‘=ùfor“example.‘h The“table“b�Gelo�¸ãw“listŽ¡�‘>the–UUp�Genalties“used“b�¸ãy“ávdm²,“and“their“default“v‘ÿqÇalues.ŽŽŸ�’åÿ18ŽŽŒ‹Ì' y� ý£ ?� þ=æe���‘MƒÃŸœ€‰ff9ø{¤fd���Ìͤ™œ„ ff‘ÌÍŸüfdÌPenalty‘“çName‘jÌ‹¡„ ffŽ�’´¿£²Default‘UUV‘ÿ*ªalue‘ÌÍŸ™œ„ ffŽ�’üã9Where‘UUUsed‘w`Ÿ™œ„ ffŽŽ©‰ff9ø{¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preOperationPenaltyŽ’®Y=„ ffŽ�’´¿£²0‘<ðbŸ™œ„ ffŽ�’üã9áop‘UU²en�¸ãv‘ ¾Ÿ™œ„ ffŽŽ¤ ���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preExternalPenaltyŽ’®Y=„ ffŽ�’´¿£²2000‘-ð_Ÿ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\prePreConditionPenaltyŽ’®Y=„ ffŽ�’´¿£²800‘2ð`Ÿ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\prePostConditionPenaltyŽ’®Y=„ ffŽ�’´¿£²500‘2ð`Ÿ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postOperationPenaltyŽ’®Y=„ ffŽ�’´¿£²-500‘/› Ÿ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¦‰ff9ø{Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preFunctionPenaltyŽ’®Y=„ ffŽ�’´¿£²0‘<ðbŸ™œ„ ffŽ�’üã9áfn‘UU²en�¸ãv‘ ¾Ÿ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\betweenSignatureAndBodyPenaltyŽ’®Y=„ ffŽ�’´¿£²500‘2ð`Ÿ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\betweenFunctionAndPrePenaltyŽ’®Y=„ ffŽ�’´¿£²1000‘-ð_Ÿ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postFunctionPenaltyŽ’®Y=„ ffŽ�’´¿£²-500‘/› Ÿ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¦‰ff9ø{Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preRecordPenaltyŽ’®Y=„ ffŽ�’´¿£²0‘<ðbŸ™œ„ ffŽ�’üã9árecord‘UU²en�¸ãv‘ ÊŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postRecordPenaltyŽ’®Y=„ ffŽ�’´¿£²-100‘/› Ÿ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¦‰ff9ø{Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preProofPenaltyŽ’®Y=„ ffŽ�’´¿£²-100‘/› Ÿ™œ„ ffŽ�’üã9áproof‘UU²en�¸ãv‘LÇŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postProofPenaltyŽ’®Y=„ ffŽ�’´¿£²0‘<ðbŸ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¦‰ff9ø{Ÿfd���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\preFormulaPenaltyŽ’®Y=„ ffŽ�’´¿£²-100‘/› Ÿ™œ„ ffŽ�’üã9áformula‘UU²en�¸ãv‘ÌÍŸ™œ„ ffŽŽ¡���ÌÍŸ™œ„ ff�‘ÌÍŸüfdá\postFormulaPenaltyŽ’®Y=„ ffŽ�’´¿£²0‘<ðbŸ™œ„ ffŽ�’9ÅHŸ™œ„ ffŽŽ¦‰ff9ø{ŽŽŽŸv9ï��‘>ëL8.3Ž‘\ÀUnforeseen‘€ChangesŽŸuT�‘>²It–ê¨is“a“truism“that“no“matter“hoš¸ãw“go•Go“d–ê¨the“designer“of“a“piece“of“soft˜w˜are“is,ޤ �‘>he–nycan“nev�¸ãer“foresee“all“of“its“uses.‘½3In“this“case,‘´Âthe“author“is“quite“certainŽ¡�‘>that–„^pšGeople“will“use“ávdm“²for“all“sorts“of“things“apart“from“t�¸ãyp˜esetting“VDMŽ¡�‘>spšGeci cations.‘h4T‘ÿ*ªo–8›cater“for“those“who“ nd“that“ávdm“²do˜es“almost,‘>Zbut“not“quite,Ž¡�‘>what–úÄthey“w•¸ãan“t,‘$a›úÄn“um“b�Ger˜of˜Ìho‘ÿ}'oks‘Ìå²ha“v“e˜b•Geen˜left˜in˜place.‘bThese˜ho“oks˜areŽ¡�‘>macros,‘®5whicš¸ãh–œoat“the“momen˜t“do“little“or“nothing,‘®5but“whic˜h“can“b�Ge“rede nedŽ¡�‘>bš¸ãy–¢users“to“c˜hange“the“basic“op�Geration“of“ávdm²(see“the“ávdmindex“²st˜yle“for“oneŽ¡�‘>sucš¸ãh–úuse).‘ƒ¶Needless“to“sa˜y‘ÿ*ª,‘2#an˜y˜one“wishing“to“rede ne“a“ho�Gok“should“alreadyŽ¡�‘>b•Ge›_qcomp“eten•¸ãt˜in˜the˜w“a“ys˜of˜L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ–ãxX˜at˜least,‘aøand˜probably˜T�‘þU>Ÿ'EŽ“X˜as˜w�¸ãell.‘�RatherŽ¡�‘>than–àétrying“to“explain“what“the“ho�Goks“do,›ø2and“where“they“do“it,˜the“user“shouldŽ¡�‘>lo�Gok–Càthrough“the“commenš¸ãted“v˜ersion“of“ávdm“²(usually“stored“as“ávdm.doc²)“andŽ¡�‘> gure–¯Éit“out“for“himself.‘�"Beloš¸ãw“are“listed“all“the“pro˜vided“ho�Goks,‘Æetheir“defaultŽ¡�‘>de nitions,–UUand“where“they“are“used.ŽŽŸ�’åÿ19ŽŽŒ‹ß y� ý£ ?� ýäŸr¦Y���‘>ŸŽÀ ‰ff[0¤¦d���ÌͤÙ›„ ÿff‘ÌÍŸý&eó*#Ñf�cmti8ÕName–~of“ho��¥ok‘k9i¡„ ÿffŽ�’«�Default‘~de nition‘nK7ŸÙ›„ ÿffŽŽ©@‰ff[0¡���ÌͤÙ›„ ÿffœ�œgŸý&eóNßCÊscmtt8ëNop‘ÕXÍen•ÃŽvironmen“t˜¡„ ÿffŽŽ¦‰ff[0¡���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&eëN\preOperationHookŽ’¤š*„ ÿffŽ�’«�\penalty\preOperationPenalty ‘4ŒùŸÙ›„ ÿffŽŽ¤ ÿ���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&e\betweenHeaderAndExternalsHookŽ’¤š*„ ÿffŽ�’«�\penalty\preExternalPenalty ‘8ÌýŸÙ›„ ÿffŽŽ¡���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&e\betweenExternalsAndPreConditionHookŽ’¤š*„ ÿffŽ�’«�\penalty\prePreConditionPenalty ‘'ÌíŸÙ›„ ÿffŽŽ¡���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&e\betweenPreAndPostConditionHookŽ’¤š*„ ÿffŽ�’«�\penalty\prePostConditionPenalty ‘#ŒéŸÙ›„ ÿffŽŽ¡���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&e\postOperationHookŽ’¤š*„ ÿffŽ�’«�\penalty\postOperationPenalty ‘0LõŸÙ›„ ÿffŽŽ¦‰ff[0¤¦d���ÌͤÙ›„ ÿffœ�œgŸý&efn‘ÕXÍen•ÃŽvironmen“t˜¡„ ÿffŽŽ¦‰ff[0¡���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&eëN\preFunctionHookŽ’¤š*„ ÿffŽ�’«�\penalty\preFunctionPenalty ‘8ÌýŸÙ›„ ÿffŽŽ¤ ÿ���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&e\betweenSignatureAndBodyHookŽ’¤š*„ ÿffŽ�’«�\penalty\betweenSignatureAndBodyPenalty ‘ÌÍŸÙ›„ ÿffŽŽ¡���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&e\betweenFunctionAndPreHookŽ’¤š*„ ÿffŽ�’«�\vskip-\lastskip ‘g�)ŸÙ›„ ÿffŽŽ¡���ÌÍŸÙ›„ ÿff’¤š*„ ÿffŽ�’«�\vskip\betweenFunctionAndPreSkip‘'ÌíŸÙ›„ ÿffŽŽ¡���ÌÍŸÙ›„ ÿff’¤š*„ ÿffŽ�’«�\penalty\betweenSignatureAndBodyPenalty ‘ÌÍŸÙ›„ ÿffŽŽ¡���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&e\postFunctionHookŽ’¤š*„ ÿffŽ�’«�\penalty\postFunctionPenalty ‘4ŒùŸÙ›„ ÿffŽŽ¦‰ff[0¤¦d���ÌͤÙ›„ ÿffœˆ_Ÿý&erecord‘ÕXÍen•ÃŽvironmen“t˜¡„ ÿffŽŽ¦‰ff[0¡���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&eëN\preRecordHookŽ’¤š*„ ÿffŽ�’«�\penalty\preRecordPenalty ‘AMŸÙ›„ ÿffŽŽŸ ÿ���ÌÍŸÙ›„ ÿff�‘ÌÍŸý&e\postRecordHookŽ’¤š*„ ÿffŽ�’«�\penalty\postRecordPenalty ‘= ŸÙ›„ ÿffŽŽ¦‰ff[0¡���ÌͤÙ›„ ÿffœŠß9Ž‘VLËInstalling–ffthe“ëCvdm“ß lesŽ©ç�‘>²Place–“the“ le“ávdm.sty“²in“yš¸ãour“standard“directory“for“L�Ÿýó5�‘üff±AŽŽ‘͉²T�‘þU>Ÿ'EŽ‘ãxX“st˜yle“ les“(y˜ourޤ �‘>system–±Hadministrator“will“knoš¸ãw“where“this“is).‘…¡If“y˜ou“ha˜v˜e“the“AMS‘°ïfon˜ts,Ž¡�‘>c�¸ãhange–á]the“appropriate“line“in“ávdm.sty“²(see“instructions“at“the“head“of“the“ le).ŽŸ!Ä��‘>ß10Ž‘^fdNew–ªëCvdm“ßcommands“(in�ŒÌtro�s3duced“for“the“óOŒ-øff cmcsc10ëObsiŽŸ�‘^fdßv�ŒÌersion)ަ����‘M¸ŽŽŽ‘W²There–UUis“a“new“k•¸ãeyw“ord,�‘UUá\remŽ‘UI².Ž©����‘M¸ŽŽŽ‘W²OpšGerations–v,can“also“ha•¸ãv“e–v,an“Ìerr–ÿ}'or‘²c“ondition‘:�²part,‘~bt�¸ãyp˜eset–v,after“the“p˜ost-Ž¡�‘Wcondition.›ÝõThe–yderror“condition“is“placed“in“an“áerrcond“²en•¸ãvironmen“t.˜AnŽ¡�‘Walternativš¸ãe– short“form,�‘Nøá\errŽ‘Nì²,‘Nøis“also“a˜v‘ÿqÇailable,‘Nøwhic˜h“w˜orks“in“the“sameŽ¡�‘Ww•¸ãa“y–UUas�“á\preŽ‘ªž²and�“á\postŽ‘•F².ŽŸ�‘WIn–­suppšGort“of“this“new“part,‘t?there“is“a“ho˜ok,Ž¡��‘Wá\betweenPostAndErrConditionHookŽ’ù¿¥²,‘´gde ned–Ô™to“b�Ge�“á\penaltyŽŽ¡��‘W\preErrConditionPenaltyŽ’Ö‘î²(the–Ò1default“p�Genalt�¸ãy“is“500).‘è\The“pre-Ž¡�‘Wceding–‘fwhite“space“is“de ned“b�¸ãy�“á\preErrConditionSkipŽ‘p"�²(default“.5ex“+Ž¡�‘W.2ex–UU¸“².2ex).ަ����‘M¸ŽŽŽ�‘Wá\OthersŽ‘B²is–UUan“alias“for�“á\OtherwiseŽ‘7Õ7².ަ����‘M¸ŽŽŽ‘W²Sequenš¸ãts–UUare“supp�Gorted“using“the“ásequent“²command,“th˜us:ŽŽŸ�’åÿ20ŽŽŒ‹캠y� ý£ ?� ýöøä��Ÿéøã��Ÿfd��‘y€ŒÌA–ÿø¸`“ÌBޤ �‘y€ŒT‘ÿ;¼ruth‘Äcµ;–ª¨ÌBe›ÿ}'auty‘â}µ;“Ìe˜q‘â}²-Ìintr‘¡½¸`Ž¡����’�€„ÌT‘ÿ;¼ruth‘‹{²=‘ÇÌBe‘ÿ}'autyŽŽŽŽŽŽ��’ô€á\sequent{A}{B}ޤ �’ô€\sequent*{Truth,Beauty,eq-intr}Ž¡�’þÿü{Truth=Beauty}ŽŸŽŽŽŽŸ'êª����‘M¸ŽŽŽ‘W²Optional–UUitems“can“bšGe“t�¸ãyp˜eset“using�“á\OptŽ‘UI²,“th�¸ãus:ŽŸ1Ë��Ÿõøà��Ÿ€����‘y€ŒŸ÷æb«ŽŽŽ‘}«8Ìfr–ÿ}'e“d���‘‰Ÿ÷æb«ŽŽŽŽŽ��’€á\Opt{fred}ŽŸŽŽŽŽŸê®����‘M¸ŽŽŽ‘W²There–UUare“t•¸ãw“o–UUnew“monadic“op�Gerators,�“á\absŽ‘ªž²and�“á\mergeŽ‘"ÕC².Ž©����‘M¸ŽŽŽ‘W²A–UUnon-emptš¸ãy“sequence“t˜ypšGe“can“b˜e“de ned“using�“á\neseqofŽ‘-U=²,“th�¸ãus:ŽŸ1È��Ÿõøã��Ÿfd��‘y€ŒÉN�Ÿü^ÿ±+ŽŽŽŽ��’ô€á\neseqof{\Nat}ŽŸŽŽŽŽŸxã����‘M¸ŽŽŽ‘W²Restricted–ŵtš¸ãyp�Ges“(those“with“in˜v‘ÿqÇarian˜ts)“can“b�Ge“t˜yp�Geset,‘áÍwith“or“withoutޤ �‘Winitialisation,–UUusing�“á\ritypeŽ‘+j•²and�“á\rtypeŽ‘"ÕC²,“th�¸ãus:ŽŸ<1È��ŸÑøã��Ÿ ¡��‘y€ŒÌPartition‘‹{²=‘Ç(ÉN²-�àsetŽ‘Gr²)-�àsetŽŽŽ¤'��‘y€Œin�®9vŽ��’Œ«0Ìinv‘�²-ÌPartition‘Äc²(Ìp‘¡˜²)ŽŽŽŸs��‘y€ŒÌDict‘¹ð²=‘ÇÉB¸²(ÌL‘ÿ}'etter��ŸúTÎ�‘C�ämŽŸ«2����‘Ú¥¸ŽŽŽ‘ ÷!ŽŽŽ‘¾4ÌDict‘òز)ŽŽ¡��‘y€Œàin�®9vŽ���’Œ«0trueŽŽŽŽ¡��‘y€ŒinitŽ��’Ž•Ú²(�àtrueŽ‘Þ3µ;–ª¨¸f“g²)ŽŽŽŽ��’€á\rtype{Partition}Ž¡�’ ÿü{\setof{(\setof{\Nat})}}Ž¡�’ ÿü{inv-Partition(p)}Ž¡�’€\ritype{Dict}Ž¡�’ ÿü{\Bool–?ý\x“(\mapof{Letter}{Dict})}Ž¡�’ ÿü{\true}Ž¡�’ ÿü{(\true,\emptymap)}ŽŸŽŽŽŽŸ`²(defaultŽ¡�‘W.5ex–UU+“.3ex“¸“².2ex)“and�“á\betweenInvAndInitSkipŽ‘z*h²(same“default).ަ����‘M¸ŽŽŽ‘W²Record–àÄtš¸ãyp�Ges“ma˜y“also“ha˜v˜e“in˜v‘ÿqÇarian˜ts“and“initial“states“attac˜hed,‘ŸusingŽ¡�‘Wthe�‘UUá\invŽ‘ªž²and�‘UUá\initŽ‘ ꛲commands–UUwithin“the“árecord“²en•¸ãvironmen“t,‘UUth“us:ŽŸ;ê«��ŸÑøã��Ÿ ¡��‘y€ŒÌD‘ðµ²::Ž���’”ïÌdayŽ�’©åw²:‘ÌDayŽŽ¡��’‘ŒDye‘ÿ}'arŽ�’©åw²:‘ÌY‘ÿ;¼e‘ÿ}'arŽŽŽŽ©'��‘y€Œàin�®9vŽ��’Œ«0²(Ìmk‘�²-ÌD‘ðµ²(Ìd‘‰µ;‘ª¨Ìy‘â}²))��ŸýØä�Ñ4ŽŸþ݉\)Ž@ŽŽŽ¡�’Œ«0Ìis‘Ò!²-Ìle‘ÿ}'apyr‘�²(Ìy‘â}²)–Ǹ_“Ìd‘Ï¡¸“²365ŽŽŽ¦��‘y€ŒàinitŽ��’Ž•ÚÌday‘©•²=›Ç40–¢£¸^“Ìye‘ÿ}'ar‘Ú¥²=˜1962ŽŽŽŽ��’€á\begin{record}{D}Ž¡�’ ÿüday–?ý:“Day“\\Ž¡�’ ÿüyear–?ý:“YearŽ¡�’€\inv{(mk-D(d,y))‘?ý\DEFŽ¡�’ ÿüis-leapyr(y)–?ý\Or“d“\le“365}Ž¡�’€\init{day=40–?ý\And“year=1962}Ž¡�’€\end{record}ŽŸŽŽŽŽŸ;êª�‘W²T‘ÿ*ªo–ó?go“with“these“are�“á\betweenRecordAndInvHookŽ’”ò÷²,Ž¡��‘Wá\betweenInvAndInitHookŽ’ÊÀ²,�‘3-á\betweenRecordAndInvSkipŽ’†9´²(default–Ï.5ex“+Ž¡�‘W.2ex–UU¸“².1ex),“and�“á\betweenInvAndInitSkipŽ‘z*h²(same“default).ŽŽŸ�’åÿ21ŽŽŒ‹üá y� ý£ ?� ýä��‘>ß11Ž‘^fdAc•ŒÌkno“wledgemen“tsŽŸç�‘>²Manš¸ãy–Õøp�Geople“ha˜v˜e“passed“on“useful“suggestions“and“commen˜ts“ab�Gout“ávdm“²andޤ �‘>this›‘,do�Gcumen•¸ãtation;‘/man“y˜thanks˜to˜all˜of˜them.‘%MIn˜particular˜I‘�Ûw“ould˜lik“eŽ¡�‘>to›=$ac•¸ãkno“wledge˜the˜extensiv“e˜testing˜done˜b“y˜Lynn˜Marshall˜while˜preparingŽ¡�‘>her–� thesis,›®úand“her“helpful“commen�¸ãts“and“ideas,˜and“the“nš¸ãumerous“w˜orth˜whileŽ¡�‘>discussions–‹ïwith“Cli “Jones.‘•Cli ,›™–in“particular,˜deserv�¸ães“the“highest“commen-Ž¡�‘>dation–ìifor“bra•¸ãv“ery‘ÿ*ª,‘ein–ìiactually“using“these“macros“in“his“b•Go“ok.‘NÎThanks–ìito“Da�¸ãvidŽ¡�‘>Carlisle–UUfor“helping“with“the“con•¸ãv“ersion–UUto“T�‘þU>Ÿ'EŽ‘ãxX“3.ŽŽŸ�’åÿ22ŽŽŒø?ƒ’À;èyÄóOŒ-øff cmcsc10óNßCÊscmtt8óMt ‰: cmbx9óLÂÖN  cmbx12óKªµa msbm9óI/2iõ lasy9óH¼j‘¹ cmti9óGzÀÓi cmex9óF©±�Ê cmsy9óE5ùž" cmmi9óDߤN cmtt9óC߆µTff cmtt12óBo´‹Ç cmr9óAŒ-ø cmcsc10ó9t}\Êcmti7ó6ßê cmmi10óKñ`y cmr10óÙ“ Rcmr7ó†›Zcmr5óú±u cmex10ù cßßßß