File Information
File: 05-lr/acl_arc_1_sum/cleansed_text/xml_by_section/concl/87/j87-1005_concl.xml
Size: 6,318 bytes
Last Modified: 2025-10-06 13:56:15
<?xml version="1.0" standalone="yes"?> <Paper uid="J87-1005"> <Title>AN ALGORITHM FOR GENERATING QUANTIFIER SCOPINGS</Title> <Section position="19" start_page="0" end_page="0" type="concl"> <SectionTitle> C.3 CORRECTNESS </SectionTitle> <Paragraph position="0"> We consider several criteria for correctness of the algorithm. Let U(a) = the set of variables that are unbound in a and V(a) = the set of variables that are vacuously quantified in a. 6 We show that if input expression a is well-formed, that is, has no unbound variables and no vacuous quantifiers (U(a) = V(a) = ~), and if /3 = gen(a), then Criterion 1:/3 has no complex terms; Criterion 2:/3 has no unbound variables (U(/3) = ~); Criterion 3:/3 has no vacuous quantifiers (V(/3) = ~); Criterion 4: for every complex term t in a, there is a quantifier in /3 that binds the same variable as t and has the position held by t in a in its body; and Criterion 5: for every quantifier q in /3, there is either a quantifier in a or a complex term in a that binds the same variable.</Paragraph> <Paragraph position="1"> Proof of these five statements does not constitute a proof of correctness, but provides motivation for assuming the correctness of the algorithm. As unbound variables in the output are the prime symptom of problems with previous algorithms, we take these criteria to be the most critical for indicating correctness.</Paragraph> <Paragraph position="2"> The first criterion follows directly from Corollary 1.</Paragraph> <Paragraph position="3"> The second and third criteria are a consequence of the following theorem which we prove informally.</Paragraph> <Paragraph position="4"> Theorem 2 For all expressions such that U(a)= u= {u I ..... u,,,} and V(a)=v= {v I ..... v~}, and for b E {true, false} and for/3 any of gen(a), pull(a, b), pull-opaque-args( a ), apply-terms(a, b ) , and apply(applicable-term(a), a), U(/3) = u and V(/3) = v.</Paragraph> <Paragraph position="5"> Proof: Again, the proof is by induction on O(a), but we will be less formal in demonstrating the well-foundedness of the induction. The base case is trivial because, as shown in the proofs of Theorem 1 and Lemma 4, the functions all return their argument unchanged when p(a) = 0. For the induction step, we will merely show that each function maintains the unbound variables and vacuous quantifiers, assuming that all the others do. The previous proof of termination provides the well-foundedness of this proof.</Paragraph> <Paragraph position="6"> apply(applicable-term(a),a): We must show that if t = < qxr > is an applicable term in a and U(a) = u and V(a) = v then U(apply(t,a)) = u and V(apply(t,a)) = v as well.</Paragraph> <Paragraph position="7"> The unbound variables u in a can be divided into two (possibly overlapping) sets u~ and u, where u, consists of those variables in u that occur in r and U, consists of those variables in u that occur outside of t in a. Note that u = u, U u~. Now assume x occurs in r.</Paragraph> <Paragraph position="8"> Then U(r) = {x} O u~ O u 0 where u 0 is the set of variables bound within a but outside of t and which occur free in r. But t is an applicable term, and by the definition of &quot;applicable term&quot; Uo must be empty. So U(r) = {x} U ur. (If x does not occur in r, a similar argument shows that U(r) = Ur .) Let r t = pull(r, false) and s = subst(x,t,a). By the induction hypothesis, U(/)= {x} U ur. Since s does not include t (which binds x) but does include x, U(s) = {x} U u~. In forming the quantified wff /3 = q(x, r t, s), the unbound variables in /3 consist of those in r r and those in s except for x, that is u(/3) = \[({x} u u~) u ({x} u ur)\] - {x} = u~ u u~ = u. (If x does not occur in r, similar arguments show that U(r')=u r, U(s)= {x}Uu s, and U(/3)= \[({x} UU,) o u~\] - {x} = u, u Ur = U.) Vacuous quantified variables can be divided similarly into v~ (those bound vacuously in r) and v~ (those bound vacuously outside of t in a). Again, v = vr U v,.</Paragraph> <Paragraph position="9"> Trivially, V(r) = Vr. By induction, V(r') = Vr also.</Paragraph> <Paragraph position="10"> Since s does not include t, V(s) = v~. V(/3) = V(r) U V(s) = v unless the quantification of x in 13 is vacuous. Since x is guaranteed to occur in s (as it replaces t in s), the quantification is clearly not vacuous. So I/(/3) = v.</Paragraph> <Paragraph position="11"> apply-terms(a,b): This follows straightforwardly from the previous subproof for apply and the induction hypothesis for apply-terms.</Paragraph> <Paragraph position="12"> pull-opaque-args(a): If a is not a wff, then the proof is trivial. Otherwise, there are two cases, depending on whether the predicate in a, p, is or is not a quantifier. If p is not a quantifier, then the result follows immediately from the induction hypothesis for pull and pullopaque-args. null If p is a quantifier, then let a = p(x,r,s). The output /3 then is wff(p, pull-opaque-args(x), pullopaque-args(r), pull-opaque-args(s)). The first call to pull-opaque-args merely returns x. Now by an argument similar to that given in the subproof for apply, the unbound variables in a can be exhaustively divided into Ur and U, depending on whether they occur in r and s. Depending on whether x occurs in r, U(r) = {x} U u, or U(r) = u, Similarly, U(s) = {x} U U, or U(s)= u~. Suppose the second and third calls to pull-opaque-args return r ~ and s t respectively. By the induction hypotheses U(r t) = U(r) and U(J) = U(s).</Paragraph> <Paragraph position="13"> If the quantification of x in a is not vacuous, then x occurs free in either r or s (and by induction in r r or s t) so U(/3) = {x} U ur U U~ - {x} = u. If the quantification of x is vacuous, then U(r t)=u~ and U(J)=U, and U(/3) = u.</Paragraph> <Paragraph position="14"> Vacuous quantified variables can be divided into vr and v~ similarly. Suppose the quantification of x is vacuous (i.e., x does not occur free in r or s). Then V</Paragraph> <Paragraph position="16"> induction, x does not occur free in r t or s t, Therefore, the quantification of x in /3 is also vacuous and V(/3) = {X} U V r U V s = V(a).</Paragraph> <Paragraph position="17"> If the quantification of x is not vacuous, then v -- vr O v~ and x occurs free in either r or s. By induca-</Paragraph> </Section> class="xml-element"></Paper>