assignment7 tweaks
[lambda.git] / hints / assignment_7_hint_5.mdwn
1
2 *       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:
3
4         <pre><code>s >>= \[[&exist;x]] >>= \[[Px]]
5         </code></pre>
6
7         What does \[[&exist;x]] need to be here? Here's what they say, on the top of p. 13:
8
9         >       Suppose an information state `s` is updated with the sentence &exist;xPx. Possibilities in `s` in which no entity has the property P will be eliminated.
10
11         We can defer that to a later step, where we do `... >>= \[[Px]]`.
12  
13         >       The referent system of the remaining possibilities will be extended with a new peg, which is associated with `x`. And for each old possibility `i` in `s`, there will be just as many extensions `i[x/d]` in the new state `s'` and there are entities `d` which in the possible world of `i` have the property P.
14
15         Deferring the "property P" part, this says:
16
17         <pre><code>s updated with \[[&exist;x]] &equiv;
18                 s >>= (fun (r, h) -> List.map (fun d -> newpeg_and_bind 'x' d) domain)
19         </code></pre>
20         
21         That is, for each pair `(r, h)` in `s`, we collect the result of extending `(r, h)` by allocating a new peg for entity `d`, for each `d` in our whole domain of entities (here designated `domain`), and binding the variable `x` to the index of that peg.
22
23         A later step can then filter out all the possibilities in which the entity `d` we did that with doesn't have property P.
24
25         So if we just call the function `(fun (r, h) -> ...)` above \[[&exist;x]], then `s` updated with \[[&exist;x]] updated with \[[Px]] is just:
26
27         <pre><code>s >>= \[[&exist;x]] >>= \[[Px]]
28         </code></pre>
29
30         or, being explicit about which "bind" operation we're representing here with `>>=`, that is:
31
32         <pre><code>bind_set (bind_set s \[[&exist;x]]) \[[Px]]
33         </code></pre>
34
35 *       In def 3.1 on p. 14, GS&V define `s` updated with \[[not &phi;]] as:
36
37         >       { i &elem; s | i does not subsist in s[&phi;] }
38
39         where `i` *subsists* in <code>s[&phi;]</code> if there are any `i'` that *extend* `i` in <code>s[&phi;]</code>.
40
41         Here's how we can represent that:
42
43                 <pre><code>bind_set s (fun (r, h) ->
44                         let u = unit_set (r, h)
45                         in let descendents = u >>= \[[&phi;]]
46                         in if descendents = empty_set then u else empty_set
47                 </code></pre>
48
49