X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=hints%2Fassignment_7_hint_3.mdwn;h=53731f70df6e817d291d9ff9429b96c576539106;hp=61f48a71350a2ac6f97fd3bb2da46e9b479db0f8;hb=91d23f0c0f3da056a43c0e7c94a7b3d9d51f5783;hpb=641e2e0035a5e3225f719c0ef201f93362b0f8ad diff --git a/hints/assignment_7_hint_3.mdwn b/hints/assignment_7_hint_3.mdwn index 61f48a71..53731f70 100644 --- a/hints/assignment_7_hint_3.mdwn +++ b/hints/assignment_7_hint_3.mdwn @@ -29,7 +29,7 @@ More specifically, \[[expression]] will be a set of `'a discourse_possibility` m * At the top of p. 13 (this is in between defs 2.8 and 2.9), GS&V give two examples, one for \[[∃xPx]] and the other for \[[Qx]]. In fact it will be easiest for us to break \[[∃xPx]] into two pieces, \[[∃x]] and \[[Px]]. Let's consider expressions like \[[Px]] first. - They say that the effect of updating an information state `s` with the meaning of "Qx" should be to eliminate possibilities in which the object associated with the peg associated with the variable `x` does not have the property Q. In other words, if we let `Q` be a function from objects to `bool`s, `s` updated with \[[Qx]] should be `s` filtered by the function `fun (r, g) -> let obj = List.nth g (r 'x') in Q obj`. + They say that the effect of updating an information state `s` with the meaning of "Qx" should be to eliminate possibilities in which the object associated with the peg associated with the variable `x` does not have the property Q. In other words, if we let `Q` be a function from objects to `bool`s, `s` updated with \[[Qx]] should be `s` filtered by the function `fun (r, g) -> let obj = List.nth g (r 'x') in Q obj`. When `...Q obj` evaluates to `true`, that `(r, g)` pair is retained, else it is discarded. Recall that [we said before](/hints/assignment_7_hint_2) that `List.filter (test : 'a -> bool) (u : 'a set) : 'a set` is the same as: @@ -41,15 +41,15 @@ More specifically, \[[expression]] will be a set of `'a discourse_possibility` m We can call the `(fun (r, g) -> ...)` part \[[Qx]] and then updating `s` with \[[Qx]] will be: - bind_set s [[Qx]] + bind_set s \[[Qx]] or as it's written using Haskell's infix notation for bind: - s >>= [[Qx]] + s >>= \[[Qx]] * Now how shall we handle \[[∃x]]. As we said, GS&V really tell us how to interpret \[[∃xPx]], but what they say about this breaks naturally into two pieces, such that we can represent the update of `s` with \[[∃xPx]] as: - s >>= [[∃x]] >>= [[Px]] + s >>= \[[∃x]] >>= \[[Px]]