X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=hints%2Fassignment_7_hint_5.mdwn;h=d44f824b05968d6de85e0cbc5b46ef97c77205b5;hp=40df3b81971f5b8c31139c6fcfd7bc942fbdce24;hb=8cf1fe240800a66d644f907fad8d618b014efd7d;hpb=ddcb99cc42fe32a7a16ba2fe78b9228c354807d0;ds=sidebyside diff --git a/hints/assignment_7_hint_5.mdwn b/hints/assignment_7_hint_5.mdwn index 40df3b81..d44f824b 100644 --- a/hints/assignment_7_hint_5.mdwn +++ b/hints/assignment_7_hint_5.mdwn @@ -1,3 +1,15 @@ + + * How shall we handle \[[∃x]]? As we said, GS&V really tell us how to interpret \[[∃xPx]], but for our purposes, what they say about this can be broken naturally into two pieces, such that we represent the update of our starting set `u` with \[[∃xPx]] as:
u >>= \[[∃x]] >>= \[[Px]]
@@ -17,8 +29,8 @@

u updated with \[[∃x]] ≡
let extend one_dpm (d : entity) =
-			bind_dpm one_dpm (new_peg_and_assign 'x' d)
-		in bind_set u (fun one_dpm -> List.map (fun d -> extend one_dpm d) domain)
+			dpm_bind one_dpm (new_peg_and_assign 'x' d)
+		in set_bind u (fun one_dpm -> List.map (fun d -> extend one_dpm d) domain)

where `new_peg_and_assign` is the operation we defined in [hint 3](/hints/assignment_7_hint_3): @@ -46,18 +58,18 @@ or, being explicit about which "bind" operation we're representing here with `>>=`, that is: -
bind_set (bind_set u \[[∃x]]) \[[Px]]
+
set_bind (set_bind u \[[∃x]]) \[[Px]]