(**Thekeyinsightsof%\index{domaintheory}%domaintheory%~\cite{WinskelDomains}%inspirethenextapproachtomodelingnon-termination.Domaintheoryisbasedon_informationorders_thatrelatevaluesrepresentingcomputationresults,accordingtohowmuchinformationthesevaluesconvey.Forinstance,asimpledomainmightincludevalues%``%#"#the program does not terminate#"#%''%and%``%#"#the program terminates with the answer 5.#"#%''%Theformerisconsideredtobean_approximation_ofthelatter,whilethelatteris_not_anapproximationof%``%#"#the program terminates with the answer 6.#"#%''%Thedetailsofdomaintheorywillnotbeimportantinwhatfollows;wemerelyborrowthenotionofanapproximationorderingoncomputationresults.
(**Thekeyinsightsof%\index{domaintheory}%domaintheory%~\cite{WinskelDomains}%inspirethenextapproachtomodelingnon-termination.Domaintheoryisbasedon_informationorders_thatrelatevaluesrepresentingcomputationresults,accordingtohowmuchinformationthesevaluesconvey.Forinstance,asimpledomainmightincludevalues"the program does not terminate"and"the program terminates with the answer 5."Theformerisconsideredtobean_approximation_ofthelatter,whilethelatteris_not_anapproximationof"the program terminates with the answer 6."Thedetailsofdomaintheorywillnotbeimportantinwhatfollows;wemerelyborrowthenotionofanapproximationorderingoncomputationresults.
Considerthisdefinitionofatypeofcomputations.*)
...
...
@@ -437,7 +441,7 @@ End Bind.
Notation"x <- m1 ; m2":=
(Bindm1(funx=>m2))(rightassociativity,atlevel70).
(**Wecanverifythatwehaveindeeddefinedamonad,byprovingthestandardmonadlaws.Partoftheexerciseischoosinganappropriatenotionofequalitybetweencomputations.Weuse%``%#"#equality at all approximation levels.#"#%''%*)
(**Wecanverifythatwehaveindeeddefinedamonad,byprovingthestandardmonadlaws.Partoftheexerciseischoosinganappropriatenotionofequalitybetweencomputations.Weuse"equality at all approximation levels."*)