Dynamic Lambda Calculus

0 downloads 0 Views 512KB Size Report
Oct 28, 1998 - Proof: By structural induction on the derivation of A ` A:A .... to the standard -calculus construction is the extra case of -abstraction: If A = U:C, ...
Dynamic Lambda Calculus Michael Kohlhase, Susanna Kuschert, Martin M uller Universit at des Saarlandes

,

,

[email protected] [email protected] [email protected] October 28, 1998

Abstract

In this paper, we introduce an lambda calculus DLC that is intended a meta-logic for compositional discourse logics, and we investigate its meta-theory. DLC extends simply typed -calculus with an operator  for the declaration of referents. In contrast in classical abstraction, the scope of declaration is not a lexical one but may extend to its context: This allows declaration to capture referents, which breaks a taboo in traditional -calculi. DLC provides an expressive type system which allows to encode information about the scope of declaration in terms of so-called modalities. Since di erent linguistic theories may need to employ di erent notions of scope, the modalities are made signature dependent, while their interaction behaviour is captured in the type system.

1

1 INTRODUCTION

1 Introduction Over the past decade, there has been a series of attempts [Zee89, GS90, vEK96, Mus96, KKP96, Kus96, vE97] to combine Montague's type theoretic framework for compositional construction of natural-language semantics [Mon74] with dynamic approaches to discourse semantics, such as, e.g. Discourse Representation Theory (DRT) [KR93] or Dynamic Predicate Logic (DPL) [GS91]. The motivation for these developments is to obtain a general logical framework for discourse semantics combining compositionality and dynamic binding; that is, binding that models anaphoric reference by setting up some notion of context. Aside from the intrinsical theoretical interest, some of these formalisms have gained practical relevance in NLP application. For instance DRT [KKP96, Kus96] is being used as the semantic representation formalism of the dialogue translation project Verbmobil [BMM+ 94]. In [KK97], we have started development and investigation of a common meta-theory DLC (Dynamic -calculus) for the compositional discourse logics by combining the computational aspects ( -reduction) of the simply typed -calculus with the dynamic features of discourse logics like DRT or DPL at a high level of abstraction. In this paper, we investigate the logical issues behind DLC in isolation; in particular, we present a simpli ed logical system and establish subject reduction, normalization and correctness results for the calculus. DLC o ers two distinct binding mechanisms: abstraction and declaration. Abstraction is the well-known mechanism of constructing a function F = X A from a variable X and a term A by -abstraction, making the variable X bound in F. Declaration is a dynamic variant of the introduction of existential witnesses. We formalize this by a new binding operator  that constructs a dynamic object O = U A from a referent U and a term A giving U a declared status. As in abstraction, A belongs to the scope of U . In contrast to abstraction, though, the scope of U is not con ned to O. The precise scope of U is governed by some general equivalences such as order-independence of successive declarations (V U A = U V A), and the dynamic properties of the constants described by their modalities in the signature of a speci c instance of DLC . Both aspects are intended to capture the so-called accessibility relations that are enforced by some linguistic theory like DRT [KR93] or DPL [GS91]. For example, a typical signature for dynamic semantics will contain a constant ^ whose modality describes U as bound in B in the term

^ (U A) B Another typical constant is : whose modality will guarantee that the scope of U does not escape A. : (U A) In -calculus, the scope of abstractions is captured in the traditional theory of -equivalence. In DLC , there exists a related equivalence theory, called dynamic equivalence, that describes the scope of declaration in terms according to the modalities. This theory is much more involved than -equivalence since the scope of declaration may extend much farther than its lexical scope, and the precise accessibility relations are signature dependent. The interaction of the two di erent notions of scope is non-trivial, since -abstraction can capture referents during -reduction which breaks a taboo in traditional -calculi. In this paper, we will investigate the interaction between abstraction and declaration from a logical perspective. We will rst, in section 2, illustrate the intended application of DLC by some linguistic examples. For further discussion of the application, we refer the reader to [KK97] and [KK98]. In section 3, we introduce the language DLC . The theory of DLC -equality will be introduce in section 4, and nally, the dynamic semantics for DLC in section 5.

Draft: October 28, 1998, do not distribute

2

2 LINGUISTIC EXAMPLES

2 Linguistic Examples Assume that we want to construct the semantic representation of the following simple text A man does not own a car.

He rides a bike every day.

The rst sentence introduces (i.e. declares) a new referent and states that it denotes a man who does not own a car. The scope of this declaration spans over the second sentence where the pronoun he refers back to the introduced referent. To construct the representation of the complete text from that of its parts, Montagovian approaches have used -conversion in the following way. Assume the following representations for some of the text constituents, where we use the in x notation the A^B instead of ^AB for clarity: [not own] = P X :P (Y own(X; Y )) [a man] = P U man(U )^P (U ) [a car] = P V car(U )^P (V ) The representation of not own a car is now built by application of [not own] to [a car]: [not

own a car]

This is then applied to [a [A

= [not

man]

own] [a car]

?! X :(V car(V )^own(X; V ))

to yield:

man does not own a car]

=

[not

own a car] [a man]

?! U man(U )^ :(V car(V )^own(U; V ))

Call this term A1 . In a similar way, the representation of the second sentence is constructed as [He

rides a bike every day]

?! W bike(W )^rides-daily(U; W )

Call this term A2 . Both sentence representations are joined to represent the complete text by passing them as arguments to ^:

A1 ^ A2

In this expression, the U occurring in R2 is considered bound by the U in R1 : The free occurrence of U in R2 has been captured. This models the anaphoric binding of the pronoun he to the antecedent a man. In contrast, the scope of the V in A1 does not extend over A1 . This models the fact that, for instance, the pronoun it in A man does not own a car.

It is parked in the garage.

cannot refer to a car since that occurs in a negative context. This models DRT's accessibility relations for negation and can be captured in DLC by an appropriate type of the symbol :. The symbols ^ and : with appropriate modalities will reappear throughout this paper as a running example. An important feature of dynamic theories is the format of the so-called merging lemma, which for a symmetric ^ takes the form (U1 : : : Un A)^(V1 : : : Vn B) = U1 : : : Un V1 : : : Vn A^B The aim is to move as many embedded -abstractions to the front of a complex term, thus revealing its dynamic properties, in a similar way as -expansion reveals the functional properties of a term. The DLC type system, capturing dynamic behaviour, allows the speci cation of a general  reduction in place of the merging lemma.

Draft: October 28, 1998, do not distribute

3

3 DYNAMIC LAMBDA-CALCULUS

Simple Types base types simple types mode types

b ::=  j : : : ::= b j 1 ! 2  ::=  j 1 ! 2

mode constants mode terms

c ::= U+ j U? j U j ]!! j : : : A ::= c j F j A 1 A 2 j F A

terms contexts

A ::= c j XF  j U j A1A2 j XF  A j U A A ::= ; j A; [X : F  ]

Mode Terms Terms

Figure 1: The syntactic categories of DLC .

3 Dynamic Lambda-Calculus

DLC is a simply typed -calculus that is augmented with a dynamic declaration operator  for the declaration of referents. DLC is intended as a meta-logic for compositional discourse logics, which employ some accessibility relation to describe the scope of declaration. DLC provides an expressive type system which allows to encode scope information for referents in so-called mode termss, in addition to the standard simple types that describe the applicative structure of terms. Since the extent of scope may vary signi cantly between di erent theories (according to the accessibility relation they employ), the modalities of the constants are kept signature dependent, while their interaction behaviour is captured in the type system.

3.1 Mode Terms and Types

We assume countably in nite sets V of variables and R of referents. Amongst the variables, we distinguish an in nite set V  of mode variables. We will use X; Y; Z for rst order variables, P; Q; R for higher-order variables, and F; G for mode variables. We reserve U; V; W for referents, and we will use lower-case letters for constants. We write Xn for a sequence of n variables X1 ; : : : ; Xn and X for a sequence of variables of unknown length. Analogous notation is used for other syntactic categories. A moded referent is a referent indexed by a sign composed from a combination of +, ?, or  such that the sign does not include both + and ?. Thus, the sign may be from the set of signs f+; ?; ; +; ?g. For instance, U + , V ? , and W + are moded referents. We call U + , U ? , and U  a positive, negative, or silent referent, respectively, and if U + , then U is both positive and silent. In fact, U + may be considered as an abbreviation of the concatenation of U + and U  . The syntactic categories of DLC are de ned in gure 1. De nition 3.1 (Simple Types). We assume a set of BT of base types b containing the element  in addition to at least one more. The set Ts of simple types is either a base type or a functional types of the form ! for simple types and . Simple types which are built up from the base type  alone will be called mode types, and simple types that use all other base types except  shall sometimes be called term types. For a term type let e be the type that is obtained by replacing every base type in with the base type symbol . For instance, if = ( ! ) ! o, then e = ( ! ) ! . De nition 3.2 (Signature). A signature is a set  of constants which we will assume to be be partitioned into two disjoint subsets  , and t , containing the mode constants and the term constants respectively. We require every mode signature  to contain at least the following constants:  the elementary mode terms U + , U ? ; U  ; U + and U ? of type  for all referents U 2 R. Draft: October 28, 1998, do not distribute

4

3.1 Mode Terms and Types

 the mode function ] of type  !  ! 

We also require that the signature t to be suciently large: De nition 4.14 below makes this precise. We will use the simply typed -calculus to formalize mode terms. For the semantics of mode terms we refer to the later de nition 5.1. De nition 3.3 (Mode Terms). For a given mode signature  of mode constants and a set V  of mode variables, we de ne a mode term A of type  to be a well-typed -term of type  . De nition 3.4 (A -Calculus for Mode Terms). On mode terms, we assume the usual notions of -equivalence, and of capture-free substitution [A =X ]B of a mode term A for variables X in B . We also assume the usual notions of and  reduction and equivalence. In addition, we de ne some speci c equivalence for mode terms (wrt.  ) which we call equivalence ( for mode terms) and which we assume to satisfy at least the following -axioms1: A ] A = A A ] B = B ] A (A ] B ) ] C = A ] (B ] C ) U + ] U ? = U + We denote equivalence of mode terms with respect to , , , and  by =  . The fourth -axiom is naturally directed from left to right so that we can speak of -reduction. Hence, we shall also speak of the  normal form of a mode term A to mean a mode term that does not allow further , , or -reduction. We allow further -axioms (such as those exempli ed in gure 2) on additional mode operators but require that 1. each -axiom is invariant under referent replacement, i.e. if A = B , then [V=U ]A = [V=U ]B for all U , and all V that do not occur in A or B . 2. All -normal forms of the same modality A contain the same moded referents. Note that these requirements are met by the rules in gure 2. Notation 3.5. We will usually use in x notation for A ] B for the application ]A B . Sometimes, we will also allow the rst argument of ] to have a higher type than : In this case, we assume A ! ] B as an abbreviation for X ((A ! X ) ] B ) etc. Remark 3.6 (Linguistic Mode Signature). For our application2 we will, in addition to the mode constants de ned in de nition 3.2, assume the mode signature  to contain the following constants  the empty mode ; of type . We often abbreviate DLC -type ;  by .  the mode functions + , ? ,  , #, +, ?, and  of type  ! . For this signature, we extend -equivalence as by the reductions given in gure 23. Let us verify that = complies with the condition required for -equivalence in de nition 3.4. For all but the last two equations, this is obvious. For the last two equations, we use the fact that V needs to be a fresh referent. For this reason, no simpli cation (elimination of ]) can be done in CUV (U1+ ] : : : ] Un+ ] W1? ] : : : ] Wm? ) that cannot be done in U1+ ] : : : ] Un+ ] W1? ] : : : ] Wm? (taking ? the last but one equation). Thus, all W1 : : : Wm? are preserved on the application of -equality on CUV (U1+ ] : : : ] Un+ ] W1? ] : : : ] Wm? ). Similarly for the last equation. 1 Since U + can be U + ] U ? = U ? .

regarded an abbreviation of the concatenation of U + and U  , the last axiom implies that

2 That is, the modelling of the accessibility relation as speci ed in DRT. 3 We use the abbreviation () for all three of +, ?, and  and likewise U  for all three of U + ; U ? and U  such that in any one equation the same sign is used throughout. We take W ? to subsume W ? ; W ? and W  in these

rules.

Draft: October 28, 1998, do not distribute

5

3.2 Well-formed Terms

(;) #; (U  ] A ) (U + ] A )+ (U ? ] A )+ (U + ] A ) (U ? ] A ) + ? + (U1 ] : : : ] Un ] W1 ]? : : : ] Wm??)? # (U1+ ] : : : ] Un+ ] W1 ] : : : ] Wm )

?! ?! ?! ?! ?! ?! ?! ?! ?!

; ;

U  ] A U+ ] A + A+ A A

W1? ] : : : ] Wm? if Ui 6= Wj for all i; j W1? ] : : : ] Wm? if Ui 6= Wj for all i; j

Figure 2: Additional -reductions

Lemma 3.7. -reduction, including -reduction as de ned in gure 2 is strongly normalizing

modulo the congruence de ned in de nition 3.4. Proof: Termination of -reduction in isolation is immediate, since the scope of the mode functions + , ? ,  , #, +, ?, and  is decreased by rule applications. Con uence of isolated -reduction is a direct consequence of the fact that there is exactly one reduction rule for each new mode function. From this, we can obtain normalization of -reduction by a general combination result of Breazu-Tannen and Gallier [?]4 . As a consequence, we can talk about -normal forms5 Lemma 3.8. For closed mode terms, the long -normal form has the following form (using associativity, commutativity and idempotence of ] to eliminate spurious brackets)

F1 : : : Fn U1+ ] : : : ] Uk+ ] V1? ] : : : ] Vl? ] W1  ] : : : ] Wm  where Ui 6= Uj , Vi 6= Vj , Wi 6= Wj and Ui 6= Vj for all i; j . Proof: In the long -normal form, the body of the abstraction has base type , so it can only by applications mode functions + , ? ,  , #, +, ?, and  of type  !  to elementary modes (the types of the mode functions do not allow the construction of mode terms of type  containing -abstractions). Since there is a -reduction rule for any mode function, except for ], these mode functions can

be totally be eliminated, leaving us with an application of ] to elementary modes. Associativity and commutativity of ] can be used to order the referents by their sign, and idempotence ensures the rst three inequalities. The last inequality is ensured by the last equality for ] in de nition 3.4.

De nition 3.9 (DLC -types). DLC -types are pairs A  , where is a term type and A is a mode term of type e. We call the term type and A the modality of A  .

3.2 Well-formed Terms

De nition 3.10 (Terms). In DLC , terms are constructed from variables, referents and constants as applications (AB), and -abstractions (XF  A), dynamic abstractions (U A). We will use the traditional notions of free and bound variables in terms and mode terms. For constants c in terms A, we write c 2 occ(A) if c occurs in A. We use similar notation for mode terms.

4 MK: add citation 5 MK: Maybe say that we will in the future.

Draft: October 28, 1998, do not distribute

6

3.2 Well-formed Terms Notice that the syntax requires explicit type annotations at all free or bound variable occurrences. For conciseness, we shall freely omit them in the sequel but understand this as a notational issue only. Well-formed terms are de ned by a type inference system that extends the one for simply typed -calculus by a rule for declaration and by a mechanism for manipulating the modes of DLC types. De nition 3.11 (Context and Types). A context A is a partial function that assigns DLC types to variables. We shall use calligraphic letters like A; B for these. We will assume the existence of a type function  :  [ R ?! T which assigns base types to referents and DLC -types A  to constants such that A is closed. We will sometimes use A  for  \  ?1 (A  ) and RA  for R \  ?1 (A  ). We further assume that A is a closed mode term, whenever  (c) = A  . We will characterize the well-formedness conditions by a type inference system for the judgment

A ` A: A  that states that a term A is well-formed (and in fact of DLC -type A  ) under the type assumptions for the variables speci ed in the context A and for the constants and referents as speci ed in  . The de nition of DLC -well-formedness to follow is a simple extension of the well-formedness in -calculus, the main extensions being the de nition of -abstraction and the management of modes. De nition 3.12 (Well-formed Terms of DLC ). Well-formedness in DLC is de ned by the following inference rules.

U 2 R  (U ) = ;  A(X ) = F  c 2   (c) = A  w :ref w :var w :const A ` c: A  A ` XF  : F  A ` U: U? 

A; [X : F  ] ` A: A  A ` A: A  ( ! ) A ` B: B  w :abs w :app A ` (XF  A): F A  ! A ` AB: A B  A ` A: (F A  )  A ` A: A  A ` A ?!  B w :dyn w :  A ` A: B  A ` U A: (F U + ] A  )  Example 3.13 (Identity). We have the following type derivation for the identity. w :var [X : F e  ] ` X : F  w :abs ` (XF  X ): (F e F )  !

Consequently, the type of (XF  ! X )(XG X ) is (F! F )(G G)  ! , which reduces to the type G G  ! , as expected. Lemma 3.14 (Weakening). If X 2= free(A) and A; [X : F  ] ` A: A  , then A ` A: A  . Proof: This is a standard result for the -calculus and can be established by a simple induction on the structure of A.

Lemma 3.15 (Unique Types). For any term A there is at most one type A  up to  equivalence on A , such that A ` A: A  is derivable in DLC for an appropriate context A. Draft: October 28, 1998, do not distribute

7

3.2 Well-formed Terms In other words, if A is a term for which there exists a context A and a DLC -type A  such that A ` A: A  is derivable then, for all A; A0 ; A ; A 0 ; ; 0 , A ` A: A  and A0 ` A: A 0  0 imply A  = A 0  0 . Proof: First, apart from w : , we observe that there is exactly one inference rule for each category of terms, therefore there can be at most one type derivation for a given term with respect to a given context. We can ignore w :  since it implements  equivalence on A . Second, we observe that the type annotations at the free variables of a DLC term determine the context on the relevant variables (cf. Lemma 3.14). In the light of this lemma we may write A : A  for well-formed terms A (even if A is not closed) to mean that A  is the type of A. If we care for the term type only, we write A : . We observe that DLC -types provide a partial evaluation of the term with respect to the manipulation of referents. That is, the structure of terms and that of their modalities closely correspond to each other in that only the applicative structure on the referents is taken into account. This observation is also mirrored in the following two lemmata. Lemma 3.16. Let A ` A: A  . Then A is closed, i A is. Proof: For constants this is due to the property that mode terms in the image of  be closed. Furthermore, -abstractions have modalities that are also abstractions, i.e. if A = XF  B, then = ! and A = F B , where A; [X : F  ] ` B: B  . For applications, we have a similar phenomenon.

Lemma 3.17. Let A ` A: A  and A(X ) = F  for some variable X , then X is free in A i F is free in A .

Proof: By structural induction on the derivation of A ` A: A  .

Example 3.18 (Linguistic Example). For linguistic examples, we assume f; o; g  BT , i.e. besides  we introduce the type of individuals  and the type of truth values o. The term U man(U ) introduces a referent U to represent a man. This term may describe, roughly, the semantics of the phrase there is a man. We assume that  (U ) =  and  (man) = F F   ! o. This mirrors the fact that U denotes an individual and man denotes a predicate on individuals (type  ! o) which intuitively does not a ect the set of accessible referents (the modality is the identity function F F ). Now, the type derivation of U:man(U ) looks as follows.  (U ) =   (man) = F F   ! o w :ref w :const ` man: (F F )   ! o ` U: U?   w :app ` man(U ): U ?  o w :dyn ` U man(U ): U + ] U ?  o w :  ` U man(U ): U +  o

Thus, U man(U ) has term type o and a (positive) dynamic binding e ect on U . Example 3.19 (Logical Constants of -DRT). Using the expressive DLC -types, we can capture the accessibility relations for -DRT's logical constants [KKP96, Kus96]. Let us de ne the types of dynamic negation :, conjunction (merge) ^, disjunction _ and implication ) thus. : : F # F  o ! o ^ : ]o!o !o _ : F G # F ] # G  o ! o ! o ) : F G # (F ] # G)  o ! o ! o The term type of these are just those of their static counterparts. The modalities capture DRT's accessibility relation, as required: dynamic negation closes o the dynamic scope of its argument. Draft: October 28, 1998, do not distribute

8

3.2 Well-formed Terms Dynamic conjunction joins the modes of its two arguments (capturing free referents, the name \dynamic" is an indication of this non-classical scope). The modality of dynamic implication is a little more complicated: it says that the result has no positive binding power to the outside and that the positive referents of the antecedent have binding power over the referents occurring in the consequent, but not vice versa. As an elementary example notice that  (U ) = w :ref ; w :dyn ` U U : U + ] U ?  w : ; w :app ` :U U : U   Let us now, for example, derive the type of the representation of

No man sleeps.

:(U man(U )^sleep(U )). We will nd that this has no dynamic binding e ect at all.

which is

.. .. . . + ` U man(U ): U  o ` sleep(U ): U ?  o w :app ` U man(U )^sleep(U ): U + ] U ?  o w :app ` :(U man(U )^sleep(U )): # (U + ] U ? )  o w :  ` :(U man(U )^sleep(U )): U   o Finally, let us derive the type of no man represented by P :(U man(U )^P (U ). .. .. . . + ` U man(U ): U  o [P : F   ! o] ` P (U ): FU ?  o [P : F   ! o] ` U man(U )^P (U ): FU ? ] U +  o [P : F   ! o] ` :(U man(U )^P (U )): # (FU ? ] U + )  o ` P :(U man(U )^P (U )): F # (FU ? ] U + )  ( ! o) ! o Similarly, the type of a man is P U man(U )^P (U ): F FU ? ] U +  ( ! o) ! o. Example 3.20 (A Tricky Example). Assume the constants introduced in example 3.19 above and consider the following example: A: = X X ^ :X When this term is applied to an argument that declares a referent, this declaration will, by reduction, be duplicated and one of the copies will end up as an argument to :. For example:

A:(U man(U )) ?! U man(U )^ :U man(U ) The peculiarity of this example is that the two occurrences of U , having been one in the argument of A: , are di erent in the -reduced term: through the rst argument of ^, the dynamic potential of U is still in force, but it is closed o through the negation operator in the second argument of ^. This behaviour of A: is captured by its DLC -type:

` A: : F F ] # F  o ! o Assuming the type of U man(U ) is U +  o, we derive the mode of A: (U man(U )) by application of w :app and w :  to give U +. This example illustrates the role of silent referents: U  Draft: October 28, 1998, do not distribute

9

3.2 Well-formed Terms records that a U occurs in the term without having some dynamic binding e ect. Since free referents do have a dynamic binding e ect, this occurrence is bound, but not dynamically. We say U is classically bound. In the above case, U + occurring in the modality of A: tells us that U occurs at least twice in A:, with two di erent binding properties. The e ect of F F ] # F becomes particularly clear in comparison to the mode of the similar B = X X ^X which is F F . The latter mode says that if the referent U occurs in the argument of B, then there is only one type of occurrences of U in the -reduced term. Remark 3.21 (Restrictions and Variants of the Inference rules). In this paper, we have restricted the DLC -type of referents U by requiring that  (U ) = ; where is a base type. This simpli es matters and it suces for the central linguistic examples that we have in mind. It seems possible, however, to overcome both restrictions, i.e. to allow referents with functional type and with a mode that mentions arbitrary referents (\dynamic referents"). To this end, we might allow for type assumptions in the context to be of the form  (U ) = G nn A  , if = n ! , where  2 BT , and w :ref to write

U 2 R  (U ) = Gn n A  w :ref A ` U : Gn n U ? ] A  While linguistic applications for functional referents are not obvious, dynamic referents allow the representation of propositional anaphora. In doing so, they may be considered to refer to involved objects themselves, which are represented by referents. For example, in If a friend comes and helps me, I will get done by tomorrow. By the way, if that will happen tonight, may I bring him with me to your party, too?

the that picks up the discourse set up by the antecedent of the rst sentence which may be represented by a referent W of dynamic type. This explains why the referent used for the representation of him in the second sentence can be bound | it is bound because it is in the dynamic scope of W which exerts positive dynamic binding of the referent introduced by the representation of a friend in the rst sentence. Of course, this extension to dynamic referents necessitates a check on circularity.

Draft: October 28, 1998, do not distribute

10

4 EQUIVALENCE AND REDUCTION

4 Equivalence and Reduction Standard -calculus comes with a built-in theory of variable renaming, called -equivalence that equates X A = Y [Y=X ]A if Y does not occur in A. Both -equivalence and reduction are based on a notion of substitution of terms for variables. We review this notion in the context of DLC (Section 4.1) and then set out to de ne an analogous replacement operator for referents in Section 4.2. Section 4.3 uses this notion to de ne an equivalence for referent declaration that is analogous to -equivalence for variables. Finally, we de ne reduction for DLC and prove subject reduction and con uence. Example 4.1 (Motivating Examples). In contrast to -equivalence, referent replacement in terms cannot be derived from a lexical scope. For instance, the terms U man(U ) 6= V man(V ) are clearly not equivalent since there are contexts for which they behave di erent. For instance, the U right of ^ is captured by U in the left term, and remains free in the right one: (U man(U ))^U 6= (V man(V ))^U On the other hand, some referents may safely be renamed. For instance, the terms :U man(U ) = :V man(V ) are observably equivalent. As a third example, notice that (X Y Y )U U = (X Y Y )V V since both are -equivalent to the identity function. That is, the declarations U and V are deleted by reduction. As evidence for these di erent situations, the modality of U man(U ) mentions U + , while the modalities of :U man(U ) and (X Y Y )U U do not. However, notice that the mode of :U man(U ) mentions U  . Hence referent replacement on terms must be paralleled by the same referent replacement in their modalities.

4.1 Variable Substitutions

The notion of substitution [B=Y ] for variables in DLC is a simple generalization of variable substitution in the -calculus. As usual, we must prohibit substitution [B=Y ] on terms A if thereby a variable occurring in B would be captured by a . In contrast, capturing of referents by a  during substitution is allowed, and even intended. De nition 4.2 (Substitutability). An expression B: is substitutable for a variable Y in an expression A: , if for any variable X free in B, Y is not free in a sub-expression of A of the form X:C. De nition 4.3 (Substitution). We will call a partial function  from typed variables to wellformed terms a DLC -substitution, i Dom() is nite and (X ) is of type for all X 2 Dom(). Like in -calculus, we will identify a substitution  with its homomorphic extension (renaming away bound variables to avoid capturing of variables) to all terms A. The only di erence to the standard -calculus construction is the extra case of -abstraction: If A = U:C, then we simply de ne [B=Y ]A = U:[B=Y ]C. We will now establish that well-typedness is invariant under substitution application, and that the type of [B=X ]A can computed from the type of A by a parallel substitution [B =F ]A on the modality A of A. The lemma on type preservation builds on the fact that if the type of X contains mode or type variables, then these act as place-holders in the type of A and are substituted for by the identi cation of types of X and B. Thus, the type of A, does not change arbitrarily but only becomes more speci ed through substitution. Draft: October 28, 1998, do not distribute

11

4.2 Dynamic Potential and Referent Replacement

Lemma 4.4 (Substitution is Type-Preserving). If X 2= Dom(A), then A; [X : F  ] ` A: A 

and A ` B: B  imply A ` [B=X ]A: [B =F ]A  .

Proof: We prove the assertion by an induction on the structure of A. 1. If A is a constant, a referent, or a variable distinct from X , then [B=X ]A = A and F 2= free(A ) by lemma 3.17, so we have [B =F ]A = A . 2. If A = X , then [B=X ]A = B and A = F , so we have [B =F ]A = B , which entails the assertion, since = .

3. If A = CD, then [B=X ]A = [B=X ]C[B=X ]D and A; [X : F  ] ` C: C   ! and A; [X : F  ] ` D: D  , where C D =  A . Therefore (by inductive hypothesis) A ` [B=X ]C: [B =F ]C   ! and A ` [B=X ]D: [B =F ]D  . This gives us the assertion, since [B =F ]C [B =F ]D = [B =F ](C D )=  [B =F ]A . 4. If A = (Y C), then we can assume that Y 6= X and Y 2= free(B), since we have de ned substitution modulo -renaming. Therefore [B=X ]A = (Y [B=X ]C) and A; [X : F  ]; [Y : G  ] ` C: C   ! , where A =  G C and F 6= G and nally G 2= free(B ) by Lemma 3.17. Therefore (by inductive hypothesis) A; [Y : G  ] ` [B=X ]C: [B =F ]C   ! . This gives us the assertion, since [B =F ]A = [B =F ](G C ) = (G [B =F ]C ). 5. If A = (U C), then [B=X ]A = (U [B=X ]C) and A; [X : F  ] ` C: G C  , and A =  G U + ] C and F 6= Gi since X is free in C. Therefore (by inductive hypothesis) A ` [B=X ]C: G [B =F ]C  , which entails the assertion since [B =F ]A =  G [B =F ](U + ] C ) = G (U + ] [B =F ]C ). Thus we have considered all cases and completed the proof.

4.2 Dynamic Potential and Referent Replacement

In this section, we de ne a notion of referent replacement CUV (of V for U ) on terms. As indicated by the motivating example, we need rst the corresponding referent replacement on modalities. This is straightforward: De nition 4.5 (Referent Replacement in Mode Terms). If U and V are two referents with  (U ) =  (V ), then CUV (A ) is obtained by replacing all elementary mode constants U + ; U ?; U  2  in A with the corresponding ones from V + ; V ? ; V  2  . Lemma 4.6. If A 0 is a  normal form of A then CUV (A 0 ) is a  normal form of CUV (A ). Proof: By induction over the length of the reduction sequence between A and A 0 , exploiting that , , and  are invariant under CUV , where this fact is required for  in de nition 3.4. If a referent U occurs in the modality A of a term A, this means that A has some binding e ect on U . Apparently, this is an important notion in DLC . Let us discuss this notion rst before proceeding with CUV . De nition 4.7 (Dynamic Binding Potential). Given a mode term A with  normal form A 0 , we de ne the dynamic potential DP (A ) as the set of positive or negative referents that occur in A 0 :

DP (A ) := fU U + 2 occ(A 0 ) or U ? 2 occ(A 0 ); A 0 -normal form of A g For all well-formed terms A : A  , we de ne the DP (A) = DP (A ). We say that A is independent of U , if U 62 DP(A ); likewise for A. Lemma 4.8 (DP(A) is Well-De ned). If A : A  and A 1 and A 2 are two -normal forms of A , then DP (A 1 ) = DP (A 2 ). Draft: October 28, 1998, do not distribute

12

4.2 Dynamic Potential and Referent Replacement

Proof: On the basis of lemma 3.15 (unique types), it suces to show that the dynamic potential

is invariant under -equivalence. This is clear for and  equivalence since moded referents behave as constants with respect to both of them, and it follows from con uence of  reduction and requirement 2 in de nition 3.4 for the  case. Example 4.9. The following table lists a number of DLC -expressions and their dynamic potential with respect to the constant de nitions from examples 3.18 and 3.19.

Term U P P U P :U man(U ) P :U P X X U P man(U )^P X Y Y (X Y Y ) U U

Modality U+ (F U + ] F ) U (F # (U + ] F )) F F U ? F F ] U ? F G G G G

DP fU g fU g ; fU g fU g fU g ; ;

An interesting observation from a linguistic point of view is the fact that P :U P has a dynamic potential in contrast to :U man(U ); this re ects the capturing of occurrences of U in an anticipated argument of P :U P . E ectively, the -abstraction has re-opened the scope of U again which the negation operator closed o . Lemma 4.10. For all A and U 2= DP(A ), we have CUV (A ) =  A . Proof: Let A 0 be the  normal form of A . Since U 2= DP(A ), U does not occur in A 0 . Thus, V (A 0 ) =  C V (A ) where the latter equality holds by Lemma 4.6. A =  A 0 = CU U

Corollary 4.11. If U 2= DP(A ), then DP(CUV (A )) = DP(A ).

Now we proceed to the de nition of referent replacement on terms. This is straightforward in all cases but the basic case of constants: Namely, if U occurs in c's modality we cannot simply set CUV (c) = c as one would navely expect. Remark 4.12. It seems that given a standard encoding of compositional discourse theories as the one outlined for -DRT in this paper, there is no linguistically relevant example of a constant that mentions a referent in its mode. However, we could generalize the DLC formalism by making very heavy use of the referent information present in the types. This would allow to change the status of -declaration from a built-in mechanism in DLC to that of a logical constant deltaU of type deltaU : F F ] U +  !

Using this constant we could write deltaUA for U A. With this, the typing rule w :dyn would be derivable in the DLC type inference system: Application of the type information of deltaU would lead to the same type judgment. Such a generalization would be especially convenient for linguistic applications that employ several (di erent) forms of -declarations (and notions of merging operator), e.g. declarations that bounce previous values, destroy them or raise an error at double declaration. We leave the investigation of this idea to further work. One option is to restrict signatures such that the constants are independent of all referents. De nition 4.13 (Independent Signature). We will call a signature  independent, if for all c 2 : If  (c) = A  , then DP (A ) = ;. For independent signatures, the de nition CUV (c) = c would make sense. In general, however, it seems overly restrictive to require the signature to be independent. Hence, we de ne an alternative and more exible notion. Draft: October 28, 1998, do not distribute

13

4.2 Dynamic Potential and Referent Replacement

De nition 4.14 (Dynamic Signature). We will call a signature  dynamic if for all referents U; V with  (U ) =  (V ) there exists a bijection CV=U on  such that for all c 2 A  it holds that CV=U (c) 2 CUV (A ) . We will assume that all signatures in this paper are dynamic. Remark 4.15. Independence is a sucient condition for dynamicity of a signature: If A is independent of U and V , then the identity function CV=U (c) = c is a bijection on  such that for all c 2 A  it holds that CV=U (c) = c 2 CUV (A ) = A  .

Lemma 4.16 (Mode Signature is Dynamic). The mode signature de ned in de nition 3.2 is dynamic, as well as the linguistic mode signature de ned in remark 3.6.

Proof: It suces to see that for all U and V the mapping CV=U that is given by CV=U (U +) = V +, CV=U (U ? ) = V ? , and CV=U (U  ) = V  , and that is the identity everywhere else is a bijection on  and satis es the condition in de nition 4.14.

De nition 4.17 (Referent Replacement for Terms). Given a dynamic signature, we de ne referent replacement CUV on well-formed terms for all U and V as follows. We pick one bijection CV=U as required in de nition 4.14 and de ne CUV (c) := CV=U (c) For variables and referents we set CUV (X ) := X and CUV (W ) = W if W = 6 U , and V if W = U and extend this de nition to application and abstraction in the intuitive manner. For declaration, we de ne CUV (W A) = CUV (W ) CUV (A). As the most important instance of this de nition, we have CUV (U A) = V CUV (A). Lemma 4.18. If A ` A: A  , then A ` CUV (A): CUV (A )  . Proof: We prove the assertion by an induction on the structure of A. 1. If A is a variable X , then A(X ) = F  for some mode variable F and CUV (A) = CUV (X ) = X = A. Also, CUV (F ) = F , thus A ` CUV (X ): CUV (F )  . 2. If A is a constant c, then c 2 A  , then CUV (A) = CUV (c) 2 CUV (A ) since  is dynamic (De nition 4.14), thus we have A ` CUV (A): CUV (A )  by w :const . 3. If A is a referent W , then A ` W : W ?  and A = W ?   (W ). The assumption U 2= DP (A ) implies that W = 6 U , so that we also have A ` CUV (W ): CUV (W )?  . 4. If A = BC, then A ` B: B  ! and A ` C: C  , where B C =  A . By inductive hypothesis we have A ` CUV (B): CUV (B )  ! and A ` CUV (C): CUV (C )  and furthermore CUV (B )CUV (C ) = CUV (B C )=  CUV (A ), by w :app which gives the assertion for this case. 5. If A = X B, then A; [X : F  ] ` B: B  , where A = F B and = ! . By inductive hypothesis we have A; [X : F  ] ` CUV (B): CUV (B )  . Thus we have A ` X CUV (B): F CUV (B )  ! , which gives the assertion, since CUV (A ) = CUV (F B ) = F CUV (B ) and X CUV (B) = CUV (X B) 6. If A = W B, then we have A ` B: F ?  , where A = F ? ] W + , so by inductive hypothesis we have A ` CUV (B): F CUV (?)  , and thus A ` CUV (W ) CUV (B): F CUV (?) ] CUV (W + )  . This completes the proof, since CUV (A ) = F CUV (? ] W + ) = F CUV (?) ] CUV (W + ). Draft: October 28, 1998, do not distribute

14

4.3 Congruences

4.3 Congruences

We will extend the notion of alphabetic change of -bound variables to referents that are in the scope of a declaration: We will call this -equivalence. We also de ne a theory of dynamic equivalence, or -equivalence, that guarantees for instance the order independence of successive declarations. De nition 4.19 ( -Equivalence). We formalize the equivalence of terms in DLC by the judgment A =  B, which is de ned by the following top-level inference rules together with rules for re exivity, transitivity and those that extend the equivalence to a term congruence.

X ; Y 62 free(A) X A = Y [Y=X ]A U U C = U C

:I

V fresh U 62 DP (A) 

A = CUV (A)

U V C = V U C

U X C = X U C

:C

:

The rst rule :I for the dynamic equivalence corresponds to the intuition that referents need not be declared more than once, the second :C that the order of declaration is immaterial. The third rule : states that declaration and abstraction commute. Example 4.20. The name of the referent used for the representation of No man sleeps. in example 3.19 is irrelevant.

:(U man(U )^sleep(U )) = :(V man(V )^sleep(V )) Lemma 4.21 (Type Invariance of ). If A ` A: A  and A =  B, then A ` B: B  where B

=  A .

Proof: We will only consider the top-level cases, i.e. the rules above, since the congruence cases are obvious. : The type invariance of the rule can be obtained by replacing all occurrences of X by Y in A ` A: A  to obtain A ` B: B  . The context is not a ected since X and Y are not free in A. B is an alphabetical variant of A , if X and Y use di erent mode variables in their modalities. :I and :C : The rules :I and :C are type-preserving, since -equivalence makes the mode operator ] idempotent and commutative (see de nition 3.4). :: Let A ` U X A: F n U + ] A   n ! , then by inversion we have A ` X A: F n A   n ! and moreover A; [X : F 1  ] ` A: F 2 : : : F n A   2 ! : : : n ! . Thus we have A; [X : F 1  ] ` U A: F 2 : : : F n U + ] A   2 ! : : : ! n ! , and nally A ` X U A: F n U + ] A   n ! , which yields the assertion. For  we need to take into account  normal forms, as the de nition of dynamic potential already suggests. Lemma 4.22 (Type Invariance of ). If U 62 DP(A), A ` A: A  and A ` CUV (A): B  , then A =  B . Draft: October 28, 1998, do not distribute

15

4.3 Congruences

Proof: Assuming A ` A: A  , by lemma 4.18 we have A ` CUV (A): CUV (A )  , and hence, by Lemma 3.15, CUV (A ) =  B . For a term A, we may want to classify A's dynamic binding e ect more precisely than just to say there is a dynamic binding e ect of A. For example, we may want to say that some referent U having a dynamic binding e ect in the argument of A is consumed by A in that U has no binding e ect in the applied expression. This is the aim of the following de nition.

De nition 4.23 (Introduced, Consumed and Transported Referents). We de ne the introduced and consumed referents of a mode term A by the following induction6 U  62 Intro(B ) U  2 Intro(A B ) Intro1 ?!2 U  2 Intro(A )

= U  ] A 0 Intro  U  2 Intro(A ) A

U  2 Intro(A ) U  62 Intro(A B ) Cons1?!2 U  2 Cons(A ) Furthermore, we de ne the transported referents of A by requiring for all referents U that  U  2 Trans(A ) if and only if for all B : U  2 Intro(A ) implies U  2 Intro(A B ). Example 4.24. Let us look at a few examples of DLC -terms together with the referents their modalities introduce, consume and transport.

Modality Intro Cons Trans F U ? fU ? g R n fU ?g fU ? g F F U ? fU ? g ; R ? ? F F ] U fU g ; R + +  F F ] U fU g ; R n fU ?g + + ? F # (U ] F ) ; R [ fU g (R n fU g)? man F F ; ; R Theorem 4.25 (Computation of Intro; Cons and Trans). For a mode term A  and a mode type  = n !  let Ae := Fnn A and  2 f+; ?; ; +; ?g, then we have Term P U P P (U ) P man(U ) ^ P P U man(U ) ^ P P :U P

n

1. U  2 Intro(A  ), i A ;e = U  ] A 0

 2. U  2 Cons(A  ), i A Uf n 6= U  ] A 0

 3. U  2 Trans(A  ), i A Uf n = U  ] A 0

Proof:

1. We prove the rst assertion by an induction on the type of A  . If  is the base type , then the assertion simpli es to U  2 Intro(A  ), i A = U  ] A 0 , which trivially valid by de nition. If  = 1 ! 2 , then we have to consider two directions: If U  2 Intro (A ), then for all B with U  2= Intro(B ), we have U  2 Intro(A B ). In particular  1 for B = ;e (we have U  2= Intro(;e 1 ) by inductive hypothesis. If U  2= Intro(A ), then for all B with U  2= Intro(B ), we have U  2= Intro(A B ). By inductive n  ] A 0 . In particular, this holds for B = ;e 1 hypothesis, this is equivalent to A B ;e = U  1 (we have U  2= Intro(;e ) by inductive hypothesis.7 6 The base case must include the mentioning of  normal form, since U + can always be written U + ] U ? .

Further, the de nition must consider silent referents, so that in the tricky example the lack of transport shows. 7 freshly typed proof, reread

Draft: October 28, 1998, do not distribute

16

4.4 Reductions Logical relation proof, at least for the third case8 Remark 4.26. 9 A referent U is in the dynamic potential of a DLC -term A, U 2 DP (A), i it occurs in A and Intro(A ) [ Cons(A ) where A ` A : A  . This variant emphasizes the (procedural) binding e ect of some term A while still focussing on the mentioned referents. De nition 4.27 (Monotonic Signature). We de ne an ordering on referent signs by [?; ?; +; +; ] and use  for the partial ordering relation on signs, e.g. ?  +. We say that a constant c : C  n ! is monotonic, if for all referents U , c does not decrease the sign of U ; that means, if B i are the modalities of the arguments of c, and ? is the maximal sign of U in all Intro(B i ), then U  2 Intro(C B n ) such that ?  . We say that a signature  is monotonic, if all constants c 2  are monotonic. The property of monotonicity on the constants describes a useful property of the underlying accessibility relation, which accounts for the closing o of dynamic scope. The monotonicity property requires that dynamic binding cannot be reversed by setting the referent free again; dynamic binding can only be closed o , making the referent classically bound. Lemma 4.28. Assume a monotonic signature. If X A : A  ! such that A is in -normal form and X occurs free in A, then for any B : B  such that U + 2 Intro(B ), then U  2 Intro(A B ) such that +  . Proof: A simple induction on the structure of A10.

4.4 Reductions

The operational semantics of DLC is de ned by three reduction relations ?! , ?! , and ?! on well-formed DLC -terms. Amongst these, - and -reduction are just the standard ones known from -calculus, while  -reduction is new and speci c to DLC . De nition 4.29 (  -reduction). The reduction relations ?! , ?! , and ?! are de ned as the smallest binary congruence relations on well-formed DLC -terms that satisfy the following axioms. X 2= free(A)  (X A)B ?! [B=X ]A (X AX ) ?! A

A ` A: A  U + 2 Trans(A )  A(U B) ?! U AB The  -rule is similar in spirit to an -rule for dynamic declaration. It allows to write an object of type A  where U + 2 Trans(A ) as a term U A, i.e. making the declaration explicit by putting it to the front. Example 4.30. Note a few examples and counterexamples to the application of  . 1. man(U U ) ?! U man(U ). 2. (X Y X ) U A ?! U (X Y X ) A. 3. (X Y Y ) U A 6?! U (X Y Y ) A. 4. (X U X ) U A 6?! U (X U X ) A. 8 Complete 9 MM: Doesn't this need proof? SK: why not use  for the formalisation of being mentioned? 10 Complete.

Draft: October 28, 1998, do not distribute

17

4.4 Reductions Remark 4.31 (Transport in the j th argument). We will say that some  transports U  in its j th argument, if U  2 Intro( j ) and for some i , i < j , U  2 Intro((( 1 ) : : : ( j ))). Note that if R transports U + in its j th argument, then RA(U B)C ?! U RABC. By de nition, we have U + 2 Trans(RA) and thus RA(U B) ?! U RAB by the rule above, which gives the assertion, since  -equivalence is a congruence relation. Remark 4.32. Observe that we have

(U A)B ?!  U AB since (U A)B = (U Z AZ )B = (Z U AZ )B = U AB. One of the most important properties of typed -calculi is the fact that the reductions preserve well-typedness. For DLC , we show this property in the following theorem. Theorem 4.33 (Subject Reduction). If A ` A: A  and A ?! ?1 ?1 B, then we have A ` B: A  . Proof: We will only consider the top-level cases, since the congruence cases are obvious. : For -reduction we have A = (X C)D and B = [D=X ]C. By inversion, we have A ` (X C): B   ! and A ` D: D  , where A =  B D and nally A; [X : F  ] ` C: C  , where B = (F C ). Therefore, we have A ` [D=X ]C: [D =F ]C by Lemma 4.4, which yields the assertion, since A =  B D = (F C )D =  [D =F ]C . : For =?1 -reduction we have A = (X BX ), where X 2= free(B) and = ! . By inversion, we have A; [X : F  ] ` BX : C  , where A = F C and (again by inversion) A; [X : F  ] ` B: B   ! , where B F = C . Now, X 2= free(B), therefore we already have A ` B: B   ! , and therefore A ` B: A  , since A = (F C ) = (F B F )= B and = ! .  : For = ?1 -reduction let A = C(U D) and B = U CD. Then by inversion of w :app we have A ` C: C   ! and A ` U D: G D ] U +  , where C (G D ] U + )=  A . By inversion of w :dyn we have A ` D: G D  . Now, we use w :app to obtain A ` CD: C (G D )  and w :dyn for A ` U C D: C (G D ] U + )  . Now, since U + 2 Trans(C ), we have C (G D ] U + ) = C (D ) ] U +11 which gives the assertion. The next step will be to establish strong normalization for  -reduction. For this, we observe that assuming monotonicity, if a term X A transports some moded referent, e.g. U + , then for every path in the -normalised A to some occurrence of X in A, U + is transported along this path. Intuitively, this means that the transport is not by introducing back in a consumed U + for any occurrence of the argument place holder. Lemma 4.34 (Path Lemma). Given X A such that it transports U + and if A is in -normal form, then for each subterm A0 of A containing an occurrence of X , X A0 transports U + also. Proof: By induction on the structure of A. If A is a constant, a referent, whether U or some other referent, or a variable di erent from X , there is nothing to prove since X A does not transport U + . If A = X , then the assertion is trivially given. If A = Y A0 or A = V A0 (where V is di erent from U ), then X A0 must transport U + , so we use the induction hypothesis. If A = U A0 , then since A0 is in -normal form, we can use lemma 4.28; by this lemma we know that if X occurs free (at least once) in A0 , then U + 2 Intro(B ) for some appropriate argument B with modality B means that U  2 Intro(A B ) such that +  . Thus, X A transporting U + means that either no X occurs free in A0 , in which there is nothing to prove here, or X A0 transports U + , so we use the induction hypothesis. Finally, if A = A0 (A00 ), then A is not in -normal form. 11 Is this functional condition already realized in the de nition of transport?

Draft: October 28, 1998, do not distribute

18

4.4 Reductions To establish con uence of  -reduction in commutation with the rest of DLC -reduction, the above path lemma is just the rst step: X (Y X ):X is but one example such that the term being -abstracted over is not in -normal form, and indeed the subterm :X does not transport any referents. The following lemma uses the path lemma to establish a pattern of reductions which can be utilised for con uence. The notation f; g C says that C is headed by a sequence of  abstractions and -declarations. Lemma 4.35. For any C = f; g C0 such that X C transports U +, and if C0 ?! k C00 derives the -normal form C00 of C0 in k steps, then, if n is the number of occurrences of X in C00 , [(U B)=X ]C0 ?! ?! k f; g (U )n [B=X ]C00

Proof: By induction on the structure of C0 . We assume that the header f; g is maximal, i.e. C0 is neither a -abstraction nor a declaration. If C0 is a constant, a referent or some variable Y 6= X , then n = 0 and C0 = C00 , and thus [(U B)=X ]C0 = C0 = [B=X ]C00. If C0 = X , then n = 1 and C0 = C00 , and thus [(U B)=X ]C0 = U B = U [B=X ]C00. If C0 = D1 D2 , then [(U B)=X ]C0 = [(U B)=X ]D1 ([(U B)=X ]D2 ) = (U )n1 [B=X ]D01((U )n2 [B=X ]D02 ) by induction hypothesis using the path lemma, since = (U )n1 +n2 [B=X ](D01 (D02 )) D01 is in -normal form 00 n + n ?! (U ) 1 2 [B=X ]C Theorem 4.36 (  -Normalization).  -reduction is terminating and con uent. Proof: Con uence of  -reduction alone is a simple consequence of order-independence of abstraction implied by de nition 4.19 (dynamic variants).

RA(U B)C(V D)E U RABC(V:D)E

V RA(U B)CDE =

U V RABCDE For con uence of  in commutation with  look at AU B Z (AU B)Z

 

V U @ RABCDE



U (AB) 

Z (U (AB))Z For con uence of  in commutation with consider the following diagram. There is only one

problem for this case, highlighted by the dashed arrow.

Draft: October 28, 1998, do not distribute

19

4.4 Reductions

A(U B)



U A(B) A0 (U B)  U A0 (B) ; (A = X C) ; (A = X C)  0 0 A(U B ) U A(B )  [(U B)=X ]C U [B=X ]C To prove the case depicted by the dashed arrow, we will assume that A = X C where C is like in lemma 4.35. Then, as depicted in the diagram, rst  -reducing and then -reducing will lead to U [B=X ]C which can in turn be -reduced to U [B=X ]f; gC00. But according to lemma 4.35, [(U B)=X ]C can be reduced to f; g (U )n [B=X ]C00. These two are equal by a combination of the three -rules (compare, for illustration, the examples in 4.37). Regarding termination of  -reduction, the answer is positive, since each step pushes one abstraction to the front. Thus, we can obtain the assertion, if we show termination and con uence for -reduction in DLC . Instead of showing that directly using the well-known logical-relations method due to Tait [Tai67] and Statman [Sta85], we will map DLC into the simply typed -calculus and use the results there. Let A be a well-formed DLC -term of type A  , furthermore let  e be obtained from by dropping all mode information, and  A0 be obtained from A by exchanging all dynamically bound variables U with appropriately typed constants u, and all  Ae be obtained from A0 by exchanging any subterm of the form u C with Ce . e has type then it is an easy exercise to show that A e, in the simply typed -calculus, and that any -reduction step A ?!  B is transformed into Ae ?!  Be. Thus any non-terminating or noncon uent sequence of -reductions in DLC would yield one for the simply typed -calculus, which is impossible. Thus -reduction in DLC is con uent and terminating, and by the permutation argument, so is  -reduction. Example 4.37. Let us just illustrate the commutation of  and with a few examples. In each case, we want to reduce A(U B). A = X V man(X ): First -reducing gives V man(U B) ?! V U man(B). First  reducing gives U (X V man(X ))(B) ?! U V man(B). These are equal by :C . A = X X ^X : First -reducing gives U B^U B ?! U U (B^B). First  -reducing gives U (X X ^X )(B) ?! U (B^B). These are equal by :C . A = X Y X : First -reducing gives Y U B and rst  -reducing gives U (X Y X )(B) ?! U Y B. These are equal by :. A = X (Y X ) X )): First -reducing gives (Y U B) U B. First  -reducing gives U (X (Y X ) X )B ?! U (Y B)B. The former can be reduced to the latter thus: (Y U B) U B =: (U X B) U B ?! U (Y B)B. As a consequence of theorem 4.36, well-formed terms have unique  -normal forms.

Draft: October 28, 1998, do not distribute

20

5 DYNAMIC SEMANTICS

5 Dynamic Semantics The semantics of dynamic logics like DRT [KR93] or DPL [GS91] are based on the notion of a state, i.e. of an assignment s: R ?! D for referents. The general approach to the semantics of dynamic logics for natural language, starting from DPL [GS91], uses relations of states; it is thus called the relational, or dynamic approach. In [Zee89], Zeevat gave an interpretation without using relations; approaches using his format are sometimes called static, or non-relational, approaches. As we show in [KK98], these are notational variants that only di er in the style and philosophy of presentation, so we will only concern ourselves with the latter in this paper because it is notationally shorter; all constructions can be carried out in the relational approach to dynamic semantics just as well. In the non-relational approaches of dynamic semantics the denotation of a dynamic expression A of term type o mainly consists of a set of states, i.e. the set of states that satisfy A, together with some information on which are the -abstracted referents on top level of A. A is considered true, i this set is non-empty. This de nition works well in rst-order settings where the only dynamic objects under consideration are of term type o. In DLC , where we allow dynamic expressions of arbitrary type, we have to generalize the construction of dynamic meanings: We can interpret a set of states as its characteristic function, i.e. as a function from (appropriate) states to D (where D is a domain of static (i.e. classical) values of type ). Clearly, this construction is independent of the special form of D and of the special interpretation of a function f 2 D ? as the function of a set of states. Thus we have a general method to turn a simple model (D; I ) into a dynamic model. Using functions from assignments of referents to static values e ectively means that we are implicitely intensionalising referents. This is a common tool to delay evaluation, useful in DLC to implement referent capture. Before we describe this construction in detail, we will make the semantics of mode terms precise.

5.1 Simple Models for Mode Terms

De nition 5.1 (Modes). A mode is a set of moded referents that contains, for all referents U , at most one of U + or U ?. For instance fU +; W  g is a mode, while fU +; U ? ; V + g is not. We will often write a mode by enumerating its elements, and write, e.g. U + ; V ? instead of fU +; V ? g. We reserve uppercase Greek letters ? and  as meta-variables for modes. We will use M for

the set of modes. The set of referents that occur signed (resp. occur positively or negatively) in ? are denoted by Dom(?) (resp. Dom(?)). We write ?+ (??=?) for the positive (negative/silent) submode of ?, i.e. the subset of referents in ? signed with + (?, ). For example, if ? = U + ; V ? ; W + , + U 2 Dom(?)g, and then ?+ = U + ; W + , ?? = V ? , and ? = ;. We further de ne +? = fU ?  likewise ?? = fU U 2 Dom(?)g and ? = fU U 2 Dom(?)g, i.e. make all referents in Dom(?) uniformly signed. The mode-join operator ? ]  is the union of the positive or silent referents of both arguments plus the union of the negative referents that do not occur positively in the other argument, i.e.



? ]  = ? n fU ? U + 2 g [  n fU ? U + 2 ?g This behaviour captures the symmetric binding e ect of positive variables over negative ones in dynamic abstraction. For instance, U ? ; V ? ; U  ] U + = V ? ; U + ; U  . The mode closure operator # ? turns all positive referents in ? silent, leaving all negative or silent referents in ? untouched: # ? = ? n ?+ [ (?+ ) Static models of higher-order logic are normally built on simple algebras, for some set of base types, e.g. BT = f; og and Do = fT; Fg. These models include rst-class values for functional objects like functions and predicates. Here, the de nition that D ! need not be the full set of Draft: October 28, 1998, do not distribute

21

5.1 Simple Models for Mode Terms functions from D to D leads to the possibility of complete calculi for higher-order logic [Hen50]. Our simple algebras also contain denotations for the mode calculus introduced in de nition 3.3, since  2 BT . De nition 5.2 (Simple Models). For 2 BT let D be a given set. Then we call a family D := fD 2 Ts g a frame for Ts , i D !  F (D ; D ) for all ; 2 Ts . We will call a mapping I :  ?! D an interpretation function, i it is well-typed, i.e. if I (c ) 2 D . Given a variable assignment ', i.e. a well-typed partial mapping ': V ?! D, we can extend the interpretation I to a value function I' on arbitrary terms by the induction given below. Here, and in the following, we shall use  for semantic abstraction. That is, we write a 2 M b to denote the function f with f(a) = b for all a 2 M . Furthermore, we will use [a=U ] as short for the assignment of a to U and '; [a=U ] for the assignment that coincides with ' everywhere but on U and has value a there. 1. I' (c) = I (c) for a constant c 2. I' (X ) = '(X ) for a variable X 3. I' (AB) = I' (A)(I' (B)) 4. I' (X A ) = a 2 D I';[a=X ] (B) We will call a pair (D; I ) a simple algebra or a simple model, i for all well-formed terms A of the simply typed -calculus and all variable assignments ', the value I (A) is de ned. We will use ; as meta-variables for functional type modes. We will call a simple model (D; I ) a referent model over R i D = M , i.e. D is the set of all modes over R. The constants of mode signature  as de ned in de nition 3.2 and remark 3.6 get their values under I using an interpretation as already explained in de nition 5.1. As far as we shall use the linguistic signature mentioned in remark 3.6, we also assume for the constants + , ? ,  , #, +, ?, , and the intuitive semantics according to de nition 5.1. We will assume that all the models we use in the following are referent models. Since the correspondence between syntax and semantics of the mode calculus is so direct, we will sometimes use them interchangeably. Lemma 5.3 (Adequacy of -Equivalence). The speci cation of -equivalence according to de nition 3.4, as well as remark 3.6, is correct and complete with respect to the semantics de ned above. Proof: Correctness is a trivial but tedious calculation applying the de nitions. We have to show that for any mode terms A and B , such that A =  B , the equation A = B is valid, i.e. that I' (A ) = I' (B ) for all referent models M = (D; I ). For example, for the axiom A ] A = A we obtain the assertion by a simple induction on the structure of A . In the base case A must be an elementary mode constant U  : then we have

I' (U + ] U + ) = U + ] U + = U + = I' (U + ) Similarly we have U ? ] U ? = U ? and U  ] U  = U  . If A = F B , then we have F B ] F B = F B ] B = F B = A . The reader will have no diculty to continue the proof. For completeness we will argue with the mode term algebra for a signature    : Let cw () be the set of closed mode terms in long -normal form, and I :  ?! cw () be the

-expansion mapping. Then we can interpret cw 1 !2 () as a function universe by de ning the application of a closed mode term A 2 cw 1 !2 () to B 2 cw 1 () as the long -normal form of the (closed) mode term A B . It is easy to see that the set of assignments coincides with the set of (mode) substitutions and that for any mode term A (possibly containing free mode variables) I' (A ) is just the long -normal form of '(A ). Now let A and B be two mode terms of equal types, such that I' (A ) = I' (B ) for all referent models M = (D; I ). In particular I' (A ) = I' (B ) for all the referent model cw (), where Draft: October 28, 1998, do not distribute

22

5.2 Dynamic Models and States signature  consists of  and furthermore has a constant ci for each mode type and each i 2 IN. Since we have assumed countably many variables per type, there is a bijection between the set of mode variables and the set of constants in , which induces a variable assignment ' into cw () (each variable X is mapped to \it's" constant ci 2 cw ()). Thus I' (A ) = I' (B ) is the long -normal form of ' (A ) and ' (B ). Since ' is a structure preserving homomorhism on well-formed formulae, '? 1 (I' (A )) is the is the long -normal form of both A and B and thus A =  B .

5.2 Dynamic Models and States

De nition 5.4 (?-States). Let ? be a mode and r: Dom(?) ?! D a referent assignment, then we will call the pair s = r? a (proper) ?-state, i r is well-typed, i.e. for all U 2 Dom (?) we have r(U ) 2 D (U ) . We will denote the set of ?-states with B?. Alternatively, we can consider

?-states s = r? as a partial function that assigns signed values to referents. This viewpoint, where we write rU + ;V ? with r(U ) = a and r(V ) = b as s = [a+ =U ]; [b? =V ], is often notationally more convenient. We will often need to coerce a given state to a given mode by restricting it to a speci c set of referent and adjusting the remaining signs. For instance, for ? = U + ; V ? we may need to turn a ?-state [a+ =U ]; [b? =V ] into a V + -state [b+ =V ]. We will use sj? for the result of coercing s into a ?-state. Note that this operation is only de ned if Dom (?)  Dom(s). Furthermore, we will need the union operation on states. We will use s [ t to describe the union of the two states as relations, provided that they coincide in value (not in sign) on their common domain. s [ t is unde ned, if they for some referent in their common domain they do not coincide in that referent's value. De nition 5.5 (State Change). Let ? be a mode, s be a proper ?-state and U; V 2 R, then we de ne VU (s) = s0 ; [a =V ]; if s = s0 ; [a =U ] and VU (s) = s else. For base type modes ? and functional type modes  we de ne12  VU (?) = ?0 ; V  , if ? = ?0 ; U  and VU (?) = ? else.  VU () = VU    UV Note that VU (s) is a VU (?)-state, if s is a ?-state. Remark 5.6. If s 2 B? and ? is independent of U , then VU (s) = s. This is trivial since ? being independent of U means that U 62 Dom(s). Lemma 5.7. If  is a modality that is independent of U , then VU  UV = Id. Proof: The proof is by induction on the type of . For non-functional modes ?, the assertion is simple, since ? is independent of U , i U 2= Dom(?). Thus, if V 2 Dom(?), then the assignment for V will be changed to an assignment for U and back to an assignment for V . Else, both VU and UV are identity functions. For a mode  of higher-type, we make use of the recursive de nition of independent: VU  UV () = VU (UV    VU ) = VU  UV    VU  UV = Id    Id = 

De nition 5.8 (Dynamic Models). We will call a pair (DR ; I ) a dynamic model over a referent model (D; I ), i 1. DR = fD R 2 T g is a typed collection of universes D R that are partitioned into sets D  with respect to the modes : S (a) DR = 2D e D  , and 12 Using the -operator for function composition, i.e. (f  g)(a) = f(g(a)).

Draft: October 28, 1998, do not distribute

23

5.2 Dynamic Models and States (b) D ? = F (B? ; D ) for all base types 2 BT and ?  S (c) D ! = 2D e F D ; D ( ) such that all elements of D ! . 2. I is a dynamic interpretation, i.e. I (CUV (c)) = VU (I (c)) and Dom(I (c)) = BI (A ) , for all constants c with (c) = A  . We will again use a semantic -notation, where s 2 M a denotes the function f, such that f(s) = a for all s 2 M . Furthermore, when M is one of the sets D  in D R , then we use  a 2 D  b[] for the function f such that f(a) = b[ ] for all a 2 D , i.e. the mode variable  is bound to the mode of the argument a. Note that this construction yields functions in DR . De nition 5.9 (Well-typed Assignments). For all terms A, we say that a variable assignment ': V ?! DR into a dynamic model (DR ; I ) is well-typed with respect to A if '(X ) 2 D '(F ) for all XF  2 free(A). Lemma 5.10. If ' is well-typed with respect to A and A ?!  B then ' is well-typed with respect to B. De nition 5.11 (Dynamic Evaluation). Assume A ` A: A  and let ': Dom(A) ?! DR be well-typed with respect to A. Then the denotation I' (A) of a DLC well-formed term A is de ned by

I' (c) = I (c) I' (X ) = '(X ) I' (U ) = s 2 BU ? s(U ) I' (U BFn B  ) = an (s 2 BI'(B )]U + I' (B)(an ) (sjI' (B  ))). 5. I' (BC) = I' (B)(I' (C)). 6. I' (XF  B) =  a 2 D  I';[a=X ];[=F ](B) 1. 2. 3. 4.

Remark 5.12. The clause for the dynamic evaluation of referents implements the implicit intensionalization of referents that we spoke of earlier, serving to allow for referent capture by delayed evaluation. Observe that through this, referents are treated di erently from variables but not quite like constants. For -declarations, we e ectly have I' (U B) = a s 2 B?]U + b(sj?), where I' (B) = a b. This captures the case of B being a functional expression, in which case U B also is a functional expression. Assuming for simplicity that B is not a functional expression, then the semantics of declaration ensures that the states being abstracted over come from the set of states including the declared U . The value assigned to these states, however, is by application to a state that may not include a value for U if I' (B ) does not mention U . In the clause for -abstractions, note that the last line is a polymorphic de nition, that is, the domain of I' (X B) is in fact DR . Example 5.13 (Semantics of -DRT). Let us consider again the examples in 3.19. There we have used the linguistic constants man and sleep which will be interpreted by means of the predicates man; sleep 2 D!o that are true for all men and sleepers respectively. We further interpret the logical constants of -DRT [KKP96] by means of the standard (classical predicate logic) operators as follows.

I (man) = ? a 2 D? s 2 B? man(a(s)) I (sleep) = ? a 2 D? s 2 B? sleep(a(s)) I (:) = ? a 2 Do? s 2 B#? 6 9t 2 B?+ a(t [ s) Draft: October 28, 1998, do not distribute

24

5.2 Dynamic Models and States

I (^) = ? a 2 Do? b 2 Do s 2 B?] a(sj?) ^ b(sj) I (_) = ? a 2 Do? b 2 Do s 2 B#?]# 9t1 2 B?+ 9t2 2 B?+ a(s [ t1 j?) _ b(s [ t2 j) I ()) = ? a 2 Do? b 2 Do s 2 B#(?]#) 9t1 2 B?+ 9t2 2 B+ :a((s [ t1 )j?) _ b((s [ t1 [ t2 )j) We can see that I is well-typed. Now let us determine the interpretation of No man sleeps. I' (man(U )) = (? a 2 D? s 2 B? man(a(s))) t 2 BU ? t(U ) = s 2 BU ? man((t 2 BU ? t(U )) s) = s 2 BU ? man(s(U )) I' (sleep(U )) = s 2 BU ? sleep(s(U )) I' (man(U )^sleep(U )) = s 2 BU ? ]U ? man((sjU ? )(U )) ^ sleep((sjU ? )(U )) = s 2 BU ? man(s(U )) ^ sleep(s(U )) I' (U man(U )^sleep(U )) = s 2 BU + man((sjU ? )(U )) ^ sleep((sjU ? )(U )) I' (:U man(U )^sleep(U )) = s 2 B#(U + ) 6 9t 2 BU + man((t [ s)(U )) ^ sleep((t [ s)(U )) = s 2 B; 6 9t 2 BU + man(t(U )) ^ sleep(t(U )) Notice in the last step that B#U + = BU  = B; since Dom (U  ) = ;, and that t [ s = t if s 2 B; .

The semantic capturing of referents occurring in the di erent arguments of the dynamic conjunction, for example, is e ected by application of the same state to both arguments. Example 5.14. Now let us reconsider the interpretation of A man sleeps by rst computing the semantics of A man, and then applying it to that of sleeps. = = = =

I' (PF !o U man(U )^PU ) g 2 D!o I';[g=P ];[=F ] (U man(U )^PU ) g 2 D!o s 2 BU ? ]U + I';[g=P ];[=F ] (man(U )^PU )(s U ? ) g 2 D!o s 2 BU ? ]U + man(s(U )) ^ I';[g=P ];[=F ] (PU )(s  U ? ) g 2 D!o s 2 BU ? ]U + man(s(U )) ^ g(t 2 BU ? t(U ))(s U ? )

If we apply this to the semantics of sleeps from above, then we obtain (g 2 DId!o s 2 BU ? ]U + man(s(U )) ^ g(t 2 BU ? t(U ))(s U ? )) (a 2 D? r 2 B? sleep(a(r))) where  is bound to the identity modality. So we continue

: : : = s 2 BU ? ]U + = s 2 BU ? ]U + = s 2 BU ? ]U + = s 2 BU ? ]U +



man(s(U )) ^ (a 2 D? r 2 B? sleep(a(r)))(t 2 BU ? t(U ))(s U ? )) man(s(U )) ^ (r 2 BU ? sleep((t 2 BU ? t(U ))(r)))(s U ? )) man(s(U )) ^ (sleep((t 2 BU ? t(U ))(s U ? )) man(s(U )) ^ (sleep(s(U ))

which is the intended meaning of A man sleeps. Example 5.15 (The Tricky Example Again). Let us consider the term A: (U man(U )) from example 3.20 again, where

A: = XF o X ^:X : F F ] # F  o ! o We noticed that upon -conversion the U in U man(U ) is duplicated so that one occurrence is silent and one remains dynamically available. In particular, we noticed that the one occurrence Draft: October 28, 1998, do not distribute

25

5.2 Dynamic Models and States of the bound U in the argument is duplicated such that the two occurrences of U have di erent binding properties. Let us see how the semantics of A: re ects this fact. Let us assume for ease of writing the following that the argument of A: has mode ?.

I' (X X ^:X ) = a 2 Do? I';[a=X ] (X ^ :X ) = a 2 Do? I (^)(a)(I (:)a) = a 2 Do? (? b1 #? b2 s 2 B?]#? b1 (sj?) ^ b2 (sj # ?))(a) (s0 2 B?? 6 9t 2 B?+ a(t [ s0 )) ? = a 2 Do (s 2 B?]#? a(sj?)^ (s0 2 B?? 6 9t 2 B?+ a(t [ s0 ))(sj # ?)) = a 2 Do? (s 2 B?]#? a(sj?) ^ 6 9t 2 B?+ a(t [ (sj # ?))) Here, we already see that the argument a is used quite di erently and independently in the two occurrences where it is instantiated into. To complete this example, let us check on the application to I' (U man(U )) = s 2 BU + man(s(U )). For this example, ? becomes U + , thus # ? = U  .

I' (X X ^:X ) I'(U man(U )) = s 2 BU + ]U  (s 2 BU + man(s(U ))) (sjU + ) ^ 6 9t 2 BU + (s 2 BU + ) man(s(U )) ((t [ (sjU  )) = s 2 BU + ]U  man(s(U ))^ 6 9t 2 BU + man(t(U )) Both, Hans Kamp in his DRT [KR93] and Irene Heim in her File Change Semantics (FCS) [Hei82] stress that the classical static meaning, based on truth conditions, is a derived notion of dynamic meaning. In DLC , extracting the static meaning is trivial for base type objects (the coverage of DRT). For functional objects, the de nition for static meaning is a little more tricky. De nition 5.16 (Static Meaning). Let a 2 D n! ( base type) and s 2 B for some modes i 2 D ei 13 . Then we de ne the static meaning SM(a; s) 2 D n! with respect to s by

SM(a; s)(cn ) := abn s

where

ci = SM(bi ; s)

To see that this construction is well-de ned, we haev to convince ourselves that SM is surjective and independent of the choice of the bi . Note that we can write the function a as b s f (b(s)) for some static function f . Given distinct b1i and b2i such that SM(b1i ; s) = SM(b2i ; s) we have ha1 : : : a1i : : : an = s h(a1 (s) : : : a1i (s) : : : an (s)) = s h(a1 (s) : : : a2i (s) : : : an (s)):

which gives us the independence. To see that SM surjective let f 2 D n ! be given, then SM(f0 ; s) = f if we de ne f0 := an 2 D t 2 B n f(SM(a; t))

To see this let ci = SM(bi ; s), then we have

SM(f0 ; s)(cn ) = (an 2 D t 2 B n f(SM(a; t)))bn s = f(SM(b; s)) = f(c) For any DLC expression A, we de ne its static meaning SMs' (A) with respect to state s by SMs' (A) = SM(I' (A); s). Example 5.17. By way of example, the static meaning of A = X (X = U ) with respect to t = [peter? =U ] is SMt' (X (X = U )) = SM(a s (a(s) = s(U )); [peter? =U ]) which is the function f such that f (a([peter? =U ])) = (a([peter? =U ]) = peter) for any a 2 DU ? . Thus f (X ) = (X = peter) which is the intuitive truth condition for A. 13 I do not understand where these come from yet. They must have some signi cance!

Draft: October 28, 1998, do not distribute

26

5.2 Dynamic Models and States

De nition 5.18 (Decoupled). A Sfunction f? 2 D ! ( base type) is called decoupled, i there is a family of functions fs?i 2 2D i F B ; B i ? and fv 2 F (D ; B; D ) such that f = s1 ; : : : ; ff sn ), where fev  (ff fes (an b) = an b  fs fev (hn ) = s fv (SM(hn ; s); s) We call fs and fv the state and value components of f. e

In e ect, this de nition says that if a functional dynamic object is decoupled, then it can be described in terms of a function on states and a function on static values. Observe that by making these functions explicit, we highlight the correspondence to systems that use an explicit intensionalisation operator for de ning dynamics, e.g. ^, and its inverse _. In fev , SM takes the role of _ and -abstraction takes the role of ^. If fs : B ! B , then it always takes the form fs = s 2 B (sj ). Remark 5.19. For f 2 D n ! , where i and are base types, we have f(g)

B( n)

B

Proof:

f(gn ) = t 2 B( n ) fv (g1 (fs1 (t)); : : : ; gn (fsn (t))) f = = = = = =

D fv

fs1 sn fg1

B

gn

D 1 D n

s1 ; : : : ; ff s1 ) fev  (ff s1 (g); : : : ; ff s1 (g)) gn 2 D nn fev (ff s1 (g))(t) s1 (g); : : : ; ff gn 2 D nn t 2 B n fev (ff s1 (g))(t) s1 (g); : : : ; ff gn 2 D nn t 2 B n fev (ff gn 2 D nn t 2 B n fev (g  fs1 ; : : : ; g  fs1 )(t) gn 2 D nn t 2 B n fev (g(fs1 (t)); : : : ; g(fs1 (t)))

Example 5.20. Consider the interpretation of the two-place conjunction and2 := ^ : ] o ! o ! o. Let  := I' (F ) and := I' (G) be of base type each14, thus and2 = a b s a(sj) ^ b(sj ):

I' (and2 ) is decoupled with fsi and fv as follows. fs1 : B] ! B with fs1 = s (sj) s f 2 : B] ! B with fs2 = s (sj ) v f : Do ! Do ! Do with fv = X Y s X ^ Y 14 Note that if we assume  and to be of any (equal) possibly functional type, then we have a generalised two-place conjunction operator. In that case, for linguistic purposes, and2 can be used for conjoining noun phrases,

verb phrases, etc. alike. Our restriction is just for ease of displaying the example.

Draft: October 28, 1998, do not distribute

27

5.2 Dynamic Models and States Let us check that these are indeed the state- and value components. SM(s a(sj); t) = a(tj). Thus, s1 ; ff s2 ) = fev  (ff = = = = = =

Observe that

s1 a; ff s2 b) a b fev (ff s1 ; b  ff s2 ) a b fev (a  ff v s s2 (s))) 1 a b fe (s a(ff (s)); s b(ff a b fev (s a(sj); s b(sj )) a b t fv (SM(s a(sj); t); SM(s b(sj ); t)) a b t fv (a(tj); b(tj )) a b t a(tj) ^ b(tj )

Example 5.21. Let us consider yet another example, that of the meaning of a man. The tricky bit here, which makes the example hard to spell out, is that the argument of f = I' (P :(U man(U )^P (U ))) is functional itself. Let f 2 D(!o)!o where  := I' (F FU ? ]U + ). Take fs : B ! B  with fs = s 2 B (sj ) and fv = P 2 D!o s man(s(U )) ^ P (s(U )). We have f = fev  fes by the following calculation. f = = = = = =

s (a ga)) g fev (ff  v g fe (a (ga  fs)) g fev (a s ga(fss)) g fev (a s ga(sj )) g t fv (SM(a s ga(sj ); t); t) g t man(t(U )) ^ P (t(U ))

Note that SM(a s ga(sj ); t) is the function P 2 D(!o)!o such that P (b(t)) = SM(s gb(tj ); t) = gb(tj ). Thus, the above equals g t man(t(U )) ^ g(t(U )) which is the meaning of a man. Example 5.22. Lastly, we de ne dynamic versions of the combinators with their state and value components each. For dynamic identity I : D  ! D  we have Is = Id and Iv = a s a. Thus,15 I = = = =

Iev  Ies = a Iev (Ies a) a Iev (a) a s Iv (SM(a; s); s) a s a(s) = a a

Similarly, for the dynamic K-operator K : D  ! D ! D  we have Ks1 = Ks2 = Id and Kv = a b s a. Thus, K = = = = = =

s1 ; K s2 ) g Kfv  (Kg v s1 a; K s2 b) g a b Kf (Kg a b Kfv (a; b) a b s Kv (SM(a; s); SM(b; s); s) a b s SM(a; s) a b s a(s) = a b a

Lastly, the dynamic S-operator S : D ! ! ! D ! ! D  ! D ( ) with Sabc = ac(bc) can be de ned in terms of Ss1 = Ss2 = Ss3 = Id and Kv = a b c s ac(bc). Observe that (using appropriately typed a; b and c, as used above) SM(a; s) is the function A such that A(c(s); d(s)) = acd(s) where d 2 D , and similarly SM(b; s) is the function B such that B (c(s)) = bc(s). With 15 This only works for base types, but we also need it for higher types

Draft: October 28, 1998, do not distribute

28

5.3 Correctness of DLC -Equality this,

S = Sfv  (Sfs1 ; Sfs2 ; Sfs3 ) = a bc Sfv (a; b; c) = a bc s Sv (SM(a; s); SM(b; s); SM(c; s); s) = a b c s Sv (A; B; c(s); s) = a b c s A(c(s))(B (c(s))) = a b c ac(bc) Lemma 5.23. If I and ' are decoupled, then I'(A) is decoupled for all DLC -formulae A. Proof: For the proof, we use the fact that all -terms can be written in an equvialent combinatory logic form, using the IK; S combinators. For these, we have shown that they are decoupled in example 5.22. Thus it only remains to show that the property of being decoupled is preserved under application and under -abstraction. If A = U B, then assume that B : F B  is decoupled (i.e. B is functional, note that if B is of base type then so is A and we have nothing to prove) and we have I' (B) = bev  bes . Therefore, given I' (B ) =  = 16 , I' (U B) = a (s 2 B]U + bev (bes (a)(sj)17 If A = BC, then I' (A) = I' (B)I' (C)... In the following we assume that I and ' are indeed always decoupled.

5.3 Correctness of DLC -Equality

DLC -equality has been de ned above by the classical, -calculus notions of -equality and the

new, dynamic notions of  -equality. The correctness of the classical equality theory actually turns out to be inherited directly from -calculus. The theorems below and their proofs are just the standard ones. Theorem 5.24 (Substitution Value Theorem). If B is substitutable for Y in A, then we have I' ([B=Y ]A) = I';[I'(B)=Y ] (A). Proof: We will conduct the proof by induction on the structure of A. If A is a constant, or referent or a variable distinct from Y , then I' ([B=Y ]A) = I' (A) = I';[I'(B)=Y ] (B), since ' and '; [I' (B)=Y ] agree on free(A). If A = Y , then I' ([B=Y ]A) = I' (B) = I';[I'(B)=Y ] (Y ) = I';[I'(B)=Y ] (A). If A = X D, then let = '; [a=X ] for some a 2 D  . By the inductive hypothesis we have

I' ([B=Y ]A)(a) = I' (X [B=Y ]D)(a) =  b 2 D (I';[b=X ][B=Y ]D)(a) = I ([B=Y ]D) = I ;[I (B)=Y ] (D) by inductive hypothesis = I ;[I' (B)=Y ] (D) since = ' on free(B) = I';[I' (B)=Y ](X:D)(a) For A = U:D, let I' ([B=Y ]D) = a d, and I';[I'(B)=Y ] (D) = a d0 , then by inductive hypoth-

esis we have

I' ([B=Y ]U:D) = I' (U:[B=Y ]D) = a s 2 B?]U + d(sj?) = a s 2 B?]U + d0 (sj?) = I';[I'(B)=Y ] (U:D)

by inductive hypothesis

16 Typen stimmen hier noch nicht ganz, ist nicht ein kleiner Fehler in der De nition der Semantik, in der De nition von I' (U:A)? Muessten dort nicht auch noch dem I (B ) Argumente gegeben werden? 17 Weiter

Draft: October 28, 1998, do not distribute

29

5.3 Correctness of DLC -Equality If A = CD, then we obtain the result because of induction hypothesis and since both substitution and interpretation ripple down to the components of an application. With this we obtain the correctness results for the reduction relations with basically the standard methods. Theorem 5.25 (Correctness of -conversion and -reduction). For all well-formed A; B and all assignments ' that are well-typed with respect to A, both A = B and A ?!  B imply I' (A) = I' (B). Proof: We prove that I'(Y:[Y=X ]C)(a) = I'(X:C)(a) using the above result for the classical substitution value argument:

I' (Y:[Y=X ]C)(a) = I';[a=Y ] ([Y=X ]C) = I';[a=Y ];[Y=X ] (C) = I';[a=X ] (C) = I' (X:C)(a) Likewise, for the proof for -reduction, we use the classical approach.

I' ([B=X ]A) = I';[I'(B)=X ] (A) = I' (X:A)(I' (B)) =  a 2 D  I';[a=X ] (A)(I' (B)) = I' ((X:A)B) For -reduction we will prove that I' (A)b = I' (X:AX )b for any b = I' (B), provided that X 62 free(A) (and therefore [B=X ]A = A). Using theorem 5.24, we have I' (A)b = I' ([B=X ]A)b = I';[b=X ] (A)b = I';[b=X ] (A)(I';[b=X ] (X ) = I';[b=X ] (AX ) = a I';[a=X ] (AX )b = I' (X:AX )b We shall now consider the dynamic equivalence rules. The correctness of these, in particular the correctness of -equivalence, builds on connections between the referent replacement operator CUV of de nition 4.5 and the state change operator VU of de nition 5.5. The following de nitions and lemmata therefore prepare the later correctness statements. De nition 5.26 (State Change for Dynamic Models). Let us extend the state change operator to dynamic models as follows. 1. For base types we have VU (s 2 B? a) := s0 2 BVU (?) (s 2 B a)UV (s0 ). V

As a consequence we have VU (I' (A))(s) = I' (A)(VU (s)) and thus VU : D ? ?! D U (?) 2. For functional types we have VU (f) = VU  f  UV . As a consequence we have VU ( a 2 D  b[a]) =  a 2 D b[VU (a)]) where = VU  . Remark 5.27 (Referent Models are Dynamic). The interpretation I for the mode signature  given in de nition 5.2 is dynamic, since  I (CUV (;)) = I (;) = ; = VU (;) Draft: October 28, 1998, do not distribute

30

5.3 Correctness of DLC -Equality

 I (CUV (U  )) = I (V  ) = [=V ] = VU ([=V ]) = VU (I (V  ))  I (CUV (W  )) = I (W  ) = [=W ] = VU ([=W ]) = VU (I (W  ))  For the functional constants in f 2  we have CUV (f ) = f and VU (I (f )) = I (f ): For instance let f = + ; then for an arbitrary mode ? that is independent of U (recall that all f 2  are invariant under referent replacement 3.4(1).) we have VU (I (+ )(?)) = VU ((UV (?))+ ) = VU (UV (?+ )) = ?+ = I (+ )(?) Thus we obtain the assertion with I (CUV (f )) = I (f ) = VU (I (f )).

As a consequence, we can build dynamic models as extensions of referent models, as we have already done in our examples. Lemma 5.28. Let M = (DR; I ) be a dynamic model and ' an A-assignment into M. If A ` A: A  , then 1. I' (CUV (A)) = VU (IUV ' (A)) and 2. I' (CUV (A )) = VU (IUV ' (A )) Proof: We prove the assertions by inductions on the structure of A and A: Since the argumentations are totally similar, we will carry out both inductions at once, giving the case for A and pointing out the relevant di erences for the A case. If A is a constant, then the assertion is trivial, since we have assumed I to be dynamic. If A is a variable X , then CUV (X ) = X and

VU (IUV ' (A)) = VU (UV  '(X )) = '(X ) = I' (X ) = I' (CUV (X ))

which gives the assertion. The case for constant A is analogous but uses remark 5.27. If A is a referent W with  (W ) = , then we have to consider two cases: If W 6= U , then CUV (A) = A and

VU (IUV ' (W )) = VU (s 2 BW ? s(W )) = s 2 BW ? VU (s(W )) = s 2 BW ? s(W ) = I' (W ) = I' (CUV (W )) If W = U , then CUV (U ) = V , so we have VU (IUV ' (U )) = VU (s 2 BU ? s(U )) = s 2 BVU (U ? ) VU (s)(U )) = s 2 BV ? s(VU (U )) = s 2 BV ? s(V ) = I' (V ) = I' (CUV (U ))

We do not have to consider such a case for A , since there all referents are captured in  . If A = BC, then the assertion is a direct consequence of the inductive hypothesis and the cancellation property of : we have

I' (CUV (A)) = I' (CUV (B))(I' (CUV (C))) = VU (IUV ' (B))(VU (IUV '(C))) = VU (IUV ' (B)(UV (VU (IUV ' (C))))) = VU (IUV ' (B)(IUV ' (C))) = VU (IUV ' (BC)) = VU (IUV ' (A)) Draft: October 28, 1998, do not distribute

31

5.3 Correctness of DLC -Equality The argument for A is analogous. If A = X B, then I' (CUV (A)) = I' (X CUV (B)) =  a 2 D  I';[a=X ] (CUV (B)) =  a 2 D  VU (IUV (';[a=X ]) (B)) =  a 2 D  VU (I(UV ');[UV (a)=X ](B)) = VU ( a 2 D  I';[a=X ] (B))  UV = VU ( a 2 D  I';[a=X ] (B)) =  a 2 D  I';[a=X ] (CUV (B)) = VU (IUV '(A)) The proof for the A case is analogous. Now, we have considered all cases for A and can therefore use it for the case where A = W B18 . We have CUV (A) = CUV (W ) CUV (B). By inversion for w :dyn , Lemma 4.18, and the rst assertion, we have CUV (A) ` W CUV (B): CUV (A )  and therefore (by de nition and inductive hypothesis) I' (CUV (A)) = s 2 BVU (?]W + ) I' (CUV (B))(sj?) = s 2 BVU (?]W + ) VU (IUV ' (B))(sj?) where ? = I' (A ). Now this together with 5.26 gives us I' (CUV (A)) = s 2 BVU (?]W + ) IUV ' (B)((VU (s))jVU (?)) = VU (s 2 B?]W + IUV ' (B)(sj?)) = VU (IUV ' (W B)) = VU (IUV ' (A))

Lemma 5.29. If A is of type A  and U 62 occ(A ), then VU (I'(A)) = I'(A) for ' well-typed with respect to A. Proof: This follows directly from the fact that for all X 2 Dom('), no referents occur in their modalities.

Lemma 5.30. Given some A such that U 62 DP(A), and ' which is well-typed with respect to A. We have IVU '(A) = I'(A). Proof: Using de nition 5.26 we have VU (I' (A)) = s0 2 BVU (I'(A))UV (s0). Since V is fresh

(and therefore nothing is dependent on it), we can eliminate both occurrences of  by lemma 5.29 and 5.6. Lemma 5.31 (Correctness of -Equality). If A = B and ' is well-typed with respect to A and B, then I' (A) = I' (B). Proof: To prove :I we use that BC ]U +]U + = BC ]U + : I' (U U B) = s 2 B?]U +]U + I' (U B)(sj(? ] U + )) = a s 2 B?]U +]U + s0 2 B?]U + b(s0 j?)(sj(? ] U + )) assuming I' (B) = a a = a s 2 B?]U + s0 2 B?]U + b(s0 j?)(sj(? ] U + )) since B?]U +]U + = B?]U + sj(? ] U + ) = s since s 2 B?]U + = a s 2 B?]U + s0 2 B?]U + b(s0 j?)(s) = a s0 2 B?]U + b(s0 j?) = I' (U B) 18 I have only done the case for base type B Draft: October 28, 1998, do not distribute

32

5.3 Correctness of DLC -Equality For :C we use BC ]V + ]U + = BC ]U + ]V + for a similar argument. The proof of : straightforwardly uses the de nition of the semantics. I' (X U B) =  a 2 D  I';[a=X ] (U B) =  a 2 D  s 2 B?]U + I';[a=X ] (B)(sj?) = s 2 B?]U + I' (X B)(sj?) = I' (U X B)

Lemma 5.32 (Correctness of -equality). If A = B and ' is well-typed with respect to A, then I' (A) = I' (B). Proof: Let A: A  and B = CUV (A), i.e. U 62 DP(A) and V fresh. By lemma 5.28 we have I' (B) = I' (CUV (A)) = VU (IVU ' (A)). Thus we want to show that I' (A) = VU (IVU ' (A)). Both VU can be eliminated separately, by using lemmata 5.30 and 5.29. Lemma 5.33 (Correctness of  -equality). Assuming that I and ' are decoupled, then if

A = B then I'(A) = I'(B). Proof: Without loss of generality let A = T(U C) and B = U TC, where T transports U +. Assume the following notation.

A ` T: T  ! A ` C: C  A ` U C: C 0  A ` TC: TC  A ` T(U C): TC 0 

 := I' (T) := I' (C ) 0 := I' (C 0 )  :=  0 :=  0 = I' (A ) Note that and 0 may be functional. Since  -reduction is type-preserving (cf. theorem 4.33), we know that B = TC ] U + = A = TC 0 where A ` B: B  . We will use the fact that I' (T) is decoupled, since I and ' are, by Lemma 5.23. Let I' (T) = f = fev  fes , and fs = s 2 B 00 (sj 00 ?) for some 00 . Further, let I' (C) = g = a 2 D?i t 2 B ? gat. Therefore, I' (U C) = a 2 D?i s 2 B ?]U + ga(sj ?). We want to show that I' (T(U C)) = I' (U TC). By the same argument as was used for type-preservation for  -reduction, we know that  0 =  ] U + and 0 ? = ? ] U + . We evaluate both sides of the equation in turn. I' (B) = s 2 B]U + fg(sj) = s 2 B0 fev (fes (g))(sj) since  ] U + =  0 = 0 = s 2 B0 fev (ai 2 D?i ga  fs )(sj) = s 2 B0 fev (ai 2 D?i t 2 B ga(fs (t)))(sj) = s 2 B0 fev (ai 2 D?i t 2 B ga(tj ?))(sj) = s 2 B0 [r fv (SM(a t 2 B ga(tj ?); r); r)](sj) = s 2 B0 fv (SM(a t 2 B ga(tj ?); (sj)); (sj))

I' (A) = f(I' (U C)) = fev (fes (ai 2 D?i s 2 B ?]U + ga(sj ?)) = fev (ai 2 D?i s 2 B ?]U + ga(sj ?)  fs ) = fev (ai 2 D?i t 2 B 0 (s 2 B ?]U + ga(sj ?)(fs (t))) = fev (ai 2 D?i t 2 B0 (s 2 B ?]U + ga(sj ?)(tj 0 ?)) = fev (ai 2 D?i t 2 B0 (ga((tj 0 ?)j ?)) since 0? = ? ] U + = fev (ai 2 D?i t 2 B0 (ga(tj ?)) = r 2 B0 fv (SM(a t 2 B0 ga(tj ?); r); r) Draft: October 28, 1998, do not distribute

33

6 CONCLUSION AND FUTURE WORK Now, note that the last two lines only di er in the state that the static meaning of g is evaluated with respect to: in the rst case, it is evaluated with respect to , in the second case with respect to 0 . The di erence is the sign of U , if U occurs free in C, which does not play a role here. If U occurs (dynamically) bound in C, then there is no di erence between  and 0 . If U does not occur in C, then sj does not know a value for U but does not need to either.

6 Conclusion and Future Work

We have presented the dynamic lambda calculus DLC , an extension of the simply typed -calculus by dynamic referents and developed its meta theory. This logical system can be used as a metalogic for various compositional discourset discourse logics for natural-language semantics as we discuss in a companion paper [KK98]. Generally, DLC can be used as a meta-language to reason about the behaviour of certain classes of variables in terms. These are formalized as DLC -referents and recorded in the types. For instance, we can give a dynamic account of variable binding in rst-order logic, if we take quanti ers19 Hashimoto and Ohori [HO97] present the context calculus: the context calculus is a lambda calculus that also contains two binding operators, namely standard  abstraction and context (or hole) abstraction which is intended to capture variables. As in DLC , the context calculus uses a type system is used to statically capture a non-lexical notion of scope. Apart from these similarities in spirit, the formal systems are very di erent: Both binders in Hashimoto and Ohori's system operate on the same domain of variables. Context abstraction and capturing in the context calculus are tied to a second form of application, called context application; this is unlike declaration in DLC simply introduces a referent whose scope extends very far and independent of (or only restricted through) application (compare our : equivalence). Also, the context calculus does not model partial evaluation as ours. We have mentioned several restrictions of DLC which we would like to overcome in the future. First, we would like to generalize the type of referents to functional and dynamic types (see remark 3.21): In particular the latter seems essential for the linguistic application. Second, we would like to constrain  abstraction to arguments whose mode satis es certain conditions: This would include allowing -bound variables to mention DLC -types A  instead of just F  , and would probably mean to introduce explicit abstraction and application for modes in the spirit of System F [Gir72]: This would, e.g. allow a term of the following form F XF  F  A.

19 Weiter

Draft: October 28, 1998, do not distribute

34

REFERENCES

REFERENCES

References [BMM+ 94] J. Bos, E. Mastenbroek, S. McGlashan, S. Millies, and M. Pinkal. A compositional DRS-based formalism for NLP-applications. In Proceedings of the International Workshop on Computational Semantics, Tilburg, pages 21{31, 1994. [Gir72] Jean-Yves Girard. Interpretation fonctionelle et elimination des coupures de l'arithmetique d'ordre superieur. PhD thesis, Universite de Paris VII, 1972. [GS90] Jeroen Groenendijk and Martin Stokhof. Dynamic Montague Grammar. In L. Kalman and L. Polos, editors, Papers from the Second Symposium on Logic and Language, pages 3{48. Akademiai Kiado, Budapest, 1990. [GS91] Jeroen Groenendijk and Martin Stokhof. Dynamic predicate logic. Linguistics & Philosophy, 14:39{100, 1991. [Hei82] Irene Heim. The Semantics of De nite and Inde nite Noun Phrases. PhD thesis, University of Massachusetts, 1982. [Hen50] Leon Henkin. Completeness in the theory of types. Journal of Symbolic Logic, 15(2):81{91, 1950. [HO97] Masatomo Hashimoto and Atsushi Ohori. A typed context calculus. Technical report, Research Institute for Mathematical Sciences, Kyoto University, 1997. Available as a preprint no. RIMS-1098. [KK97] Michael Kohlhase and Susanna Kuschert. Dynamic Lambda Calculus. CLAUSReport 91, Universitat des Saarlandes, 1997. [KK98] Michael Kohlhase and Susanna Kuschert. Dynamic lambda calculus nale. extended version of [KK97], 1998. [KKP96] Michael Kohlhase, Susanna Kuschert, and Manfred Pinkal. A type-theoretic semantics for -DRT. In P. Dekker and M. Stokhof, editors, Proceedings of the 10th Amsterdam Colloquium, pages 479{498, Amsterdam, 1996. ILLC. [KR93] Hans Kamp and Uwe Reyle. From Discourse to Logic. Kluwer, Dordrecht, 1993. [Kus96] Susanna Kuschert. Higher Order Dynamics: Relating operational and denotational semantics for -DRT. CLAUS-Report 84, Universitat des Saarlandes, 1996. [Mon74] Richard Montague. The proper treatment of quanti cation in ordinary English. In R. Thomason, editor, Formal Philosophy. Selected Papers. Yale University Press, New Haven, 1974. [Mus96] Reinhard Muskens. Combining Montague semantics and discourse representation. Linguistics & Philosophy, 14:143 { 186, 1996. [Sta85] R. Statman. Logical relations and the typed lambda calculus. Information and Computation, 65, 1985. [Tai67] W. Tait. Intensional interpretation of functionals of nite type I. Information and Computation, 32:198{212, 1967. [vE97] Jan van Eijck. Type logic with states. Logic Journal of the IGPL, 5(5), September 1997. [vEK96] Jan van Eijck and Hans Kamp. Representing discourse in context. In Johan van Benthem and Alice ter Meulen, editors, Handbook of Logic and Language, pages 179{ 238. Elsevier Science B.V., 1996. Draft: October 28, 1998, do not distribute

35

REFERENCES [Zee89]

REFERENCES

Henk Zeevat. A compositional approach to DRT. Linguistics & Philosophy, 12:95{131, 1989.

Draft: October 28, 1998, do not distribute

36

REFERENCES

A EXPLICIT ABSTRACTION OVER MODE VARIABLES

A Explicit Abstraction over Mode Variables

In this section we sketch an extension of the DLC system to explicit abstraction over mode variables. For this, we extend the syntax as depicted in gure 3. The syntax allows bound variables to be annotated by a mode term that is interpreted as a mode restriction on the domain of the abstraction.20

b ::=  j o j  j : : : ;  ::= b j 1 ! 2 A ::= c j F j A 1 A 2 j F A A  A ::= c j X j U j A1A2 j XA  A j U A A ::= ; j A; [F