Variable Handling and Compositionality: Comparing DRT and DTS

This paper provides a detailed comparison between discourse representation theory (DRT) and dependent type semantics (DTS), two frameworks for discourse semantics. Although it is often stated that DRT and those frameworks based on dependent types are mutually exchangeable, we argue that they differ with respect to variable handling, more specifically, how substitution and other operations on variables are defined. This manifests itself in two recalcitrant problems posed for DRT; namely, the overwrite problem and the duplication problem. We will see that these problems still pose a challenge for various extended compositional systems based on DRT, while they do not arise in a framework of DTS where substitution and other operations are defined in the standard type-theoretic manner without stipulating any additional constraints. We also compare the notions of contexts underlying these two kinds of frameworks, namely, contexts represented as assignment functions and contexts represented as proof terms, and see what different predictions they make for some linguistic examples.


Introduction
Formal semantic frameworks designed to deal with dynamic phenomena within a representationalist theory of interpretation include Discourse Representation Theory (DRT) (Kamp 1981;Kamp and Reyle 1993;Kamp et al. 2011) and those based on Dependent Type Theory (Martin-Löf 1984). DRT introduces a level of semantic representations called Discourse Representation Structures (DRSs). The interpretation of a sentence involves a two-staged process: the construction of DRSs given the input B Yukiko Yana yana.yukiko@is.ocha.ac.jp 1 Ochanomizu University, Tokyo, Japan discourse and a model-theoretic interpretation of those DRSs. There have been various proposals that extend and refine the original version of DRT, including Compositional DRT (Muskens 1996), an extension by Relational DRS (van Eijck and Kamp 1997; van Eijck 2001) and λ-DRT (Bos et al. 1994;Kohlhase et al. 1995).
Applications of Dependent Type Theory to natural language semantics originated from the work by Sundholm (1986) and Ranta (1994), followed by recent work on Modern Type Theory (MTT) (Luo 2012;Chatzikyriakidis and Zhaohui 2017), Type Theory with Records (TTR) (Cooper 2012), and Dependent Type Semantics (DTS) (Bekki 2014;Bekki and Mineshima 2017). Under the so-called Curry-Howard correspondence (the propositions-as-types principle), the notion of dependent types, a natural extension of simple types, is introduced to serve as the semantic representations of sentences. In contrast to model-theoretic frameworks like DRT, those frameworks based on Dependent Type Theory can be called proof-theoretic, emphasizing the role of inferences in interpreting sentences and discourses.
It has been often stated that these two kinds of semantic frameworks, DRT and those based on Dependent Type Theory, are equivalent and mutually exchangeable (Ahn and Kolb 1990;Fernando 2001); despite the difference in emphasis between the two frameworks, model-theoretic and proof-theoretic ones, a level of representations, i.e., DRS and dependent types, play an essential role in interpretation and there is a certain correspondence between them: see Ahn and Kolb (1990), Fernando (2001) for more details.
Against this view, we will argue that these two kinds of frameworks differ in the process of deriving semantic representations and the behavior of the theory itself.
DRT and its compositional extensions have a risk that two crucial notions in computational semantics that depend on substitution, namely, β-conversion and inference rules for quantification, will be only partially defined and incomplete. This would pose problems for compositional semantics and proof systems based on DRS. Also, as we will see later in detail, they do not provide a strict definition of α-conversion, so that substitution of terms in DRSs remains partial and incomplete. This manifests in two recalcitrant problems posed for DRT: the overwrite problem (the so-called destructive update problem) and the duplication problem.
We will provide a comparison between a family of DRT-based frameworks and DTS (Bekki 2014;Bekki and Mineshima 2017), and reveal differences in their semantic analyses and derivation processes that result in theories that behave differently. We will also see that these two frameworks use different notions of contexts, namely, contexts represented as assignment functions and contexts represented as proof terms, which underlie their treatments of anaphora and context updates in general. As mentioned above, there are various semantic frameworks using dependent types, but it is difficult to find work on a detailed mechanism of a compositional mapping from syntactic structures to semantic representations based on dependent types. 1 By contrast, DTS provides a detailed compositional semantics. This is the reason why we will adopt DTS as a representative framework based on dependent types throughout this paper.
Although we will focus on a comparison between DRT and dependent types, there is an alternative to DRT that uses simply-typed λ-calculus for handling discourse dynamics (cf. de Groote et al. 2006). There are also various proposals on variable handling in a dynamic setting, specifically, those that can be subsumed as descendants of Dynamic Predicate Logic (DPL) (Groenendijk and Stokhof 1991). See Vermeulen (1993), Dekker (1994), and, Nouwen (2007), among many others. In contrast to DTS and DRT (Kamp and Reyle 1996;Kamp et al. 2011), systems based on DPL usually lack a proof-theoretic component. 2 Throughout this paper we will confine our discussion to a comparison between DRT and DTS.
The structure of this paper is as follows. In Sect. 2 we introduce DRT and its various extensions that were proposed in the last 20 years. In Sect. 3 we expose two problems caused by the divergence between DRT's operations and those of ordinary logics, namely the overwrite problem and the duplication problem. In Sect. 4 we introduce the framework of DTS, and see how it can solve the overwrite problem and the duplication problem, which is an advantage of DTS over DRT. We also compare the notions of contexts underlying these two kinds of frameworks. We close the paper with conclusions in Sect. 5.

Discourse Representation Theory
Since the mid-1990s, DRT has been the name for a family of frameworks that extend the original, non-compositional theory proposed by Kamp (1981) and Kamp and Reyle (1993) in a compositional way. In this paper, we call the latter Classical DRT to distinguish it from the former.

Classical DRT
Classical DRT is known to be a non-compositional theory in two senses: It is intersententially non-compositional because it is not the case that each sentence is assigned a discourse representation structure (DRS), which can be determined only relative to its preceding discourse. It is also intrasententially non-compositional because it is not the case that each phrase is assigned a DRS, whose contribution to the whole DRS is determined only relative to the surrounding syntactic structure and its preceding discourse.
Unlike Classical DRT, extended frameworks such as Compositional DRT (Muskens 1996) (henceforth CDRT), Relational DRS ( van Eijck and Kamp 1997), and λ-DRT (Bos et al. 1994) adopt a method of constructing the DRS of an entire discourse from sentential DRSs by composing them by merge operations (s.t. they are intersententially compositional) and of a sentence from lexical DRSs by composing them in a bottom-up manner (s.t. they are intrasententially compositional). They share the basic idea, that is, combining Classical DRT with the λ-operator and the operation of functional application, but are different in their way of implementing it. We will briefly review the definition of each representation system (CDRT, Relational DRS, and λ-DRT), focusing on how the compositional derivation of a DRS works in each system.

Compositional DRT
DRSs in CDRT are used as an abbreviation for the following relation.
Definition 1 (DRS in Compositional DRT) Let i, j be state variables.
The merge operation of DRSs in CDRT is defined as in Definition 2.
Definition 2 Let K 1 , K 2 be DRSs. The merge of K 1 and K 2 , written K 1 ; K 2 , is defined as follows: From this definition, the following lemma is derived.
If none of the discourse referents u ∈ U 2 occurs in any of the conditions in Cond 1 , then we have An example DRS construction for the first sentence in (1a) is shown in (1b), and the DRSs for the two sentences in (1a) are merged as in (1c).
u 1 u 2 man u 1 book u 2 u 1 owns u 2 ; u 1 read u 2 = u 1 u 2 man u 1 book u 2 u 1 owns u 2 u 1 reads u 2 Superscript and subscript numbers in the sentence (1a) respectively specify the indices of discourse referents that they introduce and the discourse referents of their antecedents. The syntactic structure in (1b) and the DRSs in (1c) respectively show the intrasentential and intersentential compositions of DRSs in CDRT. One of the major differences of CDRT from Classical DRT is that discourse referents in CDRT are syntactically treated as constant symbols. This means that operations on variables such as substitution and renaming are not defined for discourse referents in CDRT.

Relational DRS
The definition of Relational DRSs is slightly different from the definition of DRSs in Classical DRT, as shown in Definition 3.

Definition 3 (DRS in Relational DRS)
1. If v is a discourse referent, then v is a DRS. 2. If t 1 , . . . , t n are terms and P is an n-place predicate letter, then P(t 1 , . . . , t n ) is a DRS. 3. If v is a discourse referent and t is a term, then v = t is a DRS. 4. If D is a DRS, then ¬D is a DRS. 5. Nothing else is a DRS.
The major difference of Relational DRS from Classical DRT is that discourse referents and predicates themselves qualify as DRSs according to Definition 3.1 and Definition 3.2 On the basis of the notion of DRSs, Relational DRSs (RDRSs) are defined as follows.

Definition 4 (RDRS)
1. If D is a DRS, then D is an RDRS. 2. If R is an RDRS, then ¬R is an RDRS. 3. If R 1 , R 2 are RDRSs, then R 1 • R 2 is an RDRS. 4. Nothing else is an RDRS.
Definition 4 shows that complex RDRSs are obtained by joining DRSs with join operator •. The reduction operation (in the sense of β-reduction) for complex RDRSs is defined by the set of reduction rules, as shown in Definition 5.

Definition 5 (Reduction rules for RDRSs)
Here the operator; is defined in the same way as in Definition 2. The notation [y/x]R is the result of substituting y for x in R. By reduction, the RDRS for the first sentence in the mini-discourse (2a) is derived as in (2b).
Then the two DRSs for the discourse are converted to a DRS as follows.

-DRT
Among several versions of λ-DRT, we discuss the one formulated by Kohlhase et al. (1995), which introduces the δ-operator, the binder of discourse referents. The definition of the merging operations of DRSs is given in Definition 6, where ⊗ and ; are intrasentential and intersentential merge operators, respectively.
Using this definition, an example of DRS construction for the first sentence in (4a) is given in (4b), where @ is a binary operator for functional application. The two DRSs for the discourse are merged and computed as shown in (4c).
(4) a. A man owns a book. He reads it. b.
(own a @ (a j @ book)) @ (a i @ man) Note that each discourse referent in (4c) has a unique name. In λ-DRT, only those with unique names are treated as well-formed formulae (wff), as defined in Definition 7.
, A 1 and A 2 do not share the same discourse referents. By Definition 7, each discourse referent has a unique name, which makes safe the union operation in Definition 6.

Two Problems About Variable Handling in DRT
In this section, we will see that operations on DRSs such as substitution, α-conversion, and β-reduction behave differently than in standard type theories. This will bring about two problems: the overwrite problem and duplication problem. Since these problems have been recognized and discussed in the literature, we will mainly focus on the issues of variable handling and provide a survey of problematic cases of a family of DRT frameworks from that perspective. In Sect. 3.1, we discuss the overwrite problem and see how it arises in each theory we reviewed in Sect. 2 In Sect. 3.2, we discuss the duplication problem and consider why it arises through examining the relationship between substitution and binding scope. In Sect. 3.3, we analyze the logical structures of DRT that cause these two problems.

The Overwrite Problem
The overwrite problem of DRT, first pointed out by Zeevat (1989), is that there is a case where a link between a discourse referent and an anaphoric expression unintentionally gets destroyed as a result of the merge operation. In Zeevat (1989), the merge operation is defined as Definition 8.
A problematic case where the overwrite problem occurs is exemplified by (5).
In (5a), a man and a woman denote different persons, but they are interpreted as the same person in DRS (5b) as a result of merging. Zeevat (1989) pointed out that discourse referents that are introduced should be restricted to avoid such problematic cases.
In the extended DRT frameworks in the previous section, this problem does not appear to happen since discourse referents that are introduced are assumed to be distinct with each other. However, this assumption does not save cases like (6), where a discourse referent for an indefinite NP gets copied.
(6) Bill and Sue own a donkey. (cf. Muskens 1996) If 'Bill and Sue' is interpreted as λP.P(Bill); P(Sue), the sentence (6) is semantically equivalent to the conjunction that Bill owns a donkey and Sue owns a donkey. Thus there may be two different donkeys.
Let us consider two discourses where the sentence (6) is followed by the sentences (7a) and (7b). 3 (7) a. The donkey which Bill owns eats an apple.
b. The donkey which Sue owns eats an apple.
In the following discussion, we will see how each extended DRT fails to give an appropriate DRS to these mini-discourses. 4

The Case of CDRT
The DRS for the mini-discourse (8) in terms of CDRT is given as (9).
(8) Bill 1 and Sue 2 own a 3 donkey. The 3 donkey which Bill 1 owns eats an 4 apple.
(9) u 3 donkey u 3 Bill owns u 3 ; u 3 donkey u 3 Sue owns u 3 ; u 4 donkey u 3 Bill owns u 3 apple u 4 u 3 eats u 4 According to Definition 2, the leftmost and the center DRSs of (9) are merged first. The merging of these two DRSs results in (10).
In (10), the discourse referent u 3 refers to Sue's donkey; thus there is no way to pick up Bill's donkey from the subsequent discourse. Syntactically, discourse referents in CDRT are constant symbols, so that there is no way to change the names of discourse referents. As a result, it was impossible to rename the discourse referent u 3 or distinguish the two occurrences of u 3 . 5

The Case of Relational DRS
The DRS for the mini-discourse (11) in terms of Relational DRS is given as (12).
(11) Bill 1 and Sue 2 own a 3 donkey. The 4 3 donkey which Sue 2 owns eats an 5 apple. (12) • u 4 u 5 u 3 = u 4 donkey(u 4 ) own(u 2 , u 4 ) apple(u 5 ) eat(u 4 , u 5 ) According to Definition 5, we first merge the leftmost and the center DRSs of (12), then the merged DRS and the rightmost DRS are merged. When merging, the discourse referent that conflicts with others is substituted for a new discourse referent. The result of the combination is as shown in (13b).
(13) a. ( u 2 = s donkey(u 6 ) own(u 2 , u 6 ) u 3 = u 4 donkey(u 4 ) own(u 2 , u 4 ) apple(u 5 ) eat(u 4 , u 5 ) In (13b), u 4 and u 5 denote Bill's donkey and an apple respectively, so "eat(u 4 , u 5 )" means that Bill's donkey eats an apple. However, this does not capture the truthcondition of (11) where Sue's donkey eats an apple. 6 Since the substitution of RDRS considers only the RDRSs that immediately precedes or succeed it, the scope of substitution in (13a) only contains the central DRS. However, given the meaning of the sentence (11), u 3 in the rightmost DRS must be substituted as well, so substitution defined in this way does not work well. 7 Note that widening the scope of substitution is not a good strategy: if u 3 in the rightmost DRS is the same as u 3 introduced by the leftmost DRS, it leads to another incorrect derivation. More generally, this result can be regarded as an instance of the following phenomenon (14): In most logics and type theories, two logical expressions whose only difference is a variable name, are α-equivalent, so the contents of the expression itself do not change even if we replace the subexpression like (14). Under this extension by RDRS, however, the scope of binding by discourse referent is taken to be wider than in standard logic, so the contents of the expression will be different if we do such a replacement. Therefore, we found that this extension leads to a theory in which renaming and substitution themselves are defined but α-conversion cannot be performed.

The Case of -DRT
The DRS for the mini-discourse (15) in terms of λ-DRT is given as (16). (15) Bill i and Sue j own a a k donkey.
The l k donkey which Sue m owns b eats c an n apple. (16) Since the discourse referents x k and e a in the leftmost and the center DRS in (16) conflict, the DRS in (16) is not well-formed according to Definition 7. Note that examples like (16) are not artificially created but derived from natural language examples. This means that the theory undergenerates for cases like (15), which is a problem for λ-DRT.
The version of λ-DRT presented in Kohlhase et al. (1995) attempts to restrict the range of its application by introducing the notion of sensible expression and substitutability. It is claimed that such a theory with additional constraints does not cause a problem in practice; however, the above discussion shows that there exists a problematic example in natural language.

Duplication Problem
The duplication problem pointed out in Kohlhase et al. (1995) is that the binding status of variables in a DRS can change after β-reduction during the process of building the representation of a sentence. Consider the following example: Here we attach subscripts A, B, B 1 , and B 2 to the variable Y in order to distinguish each occurrence of the same variable Y in the DRSs. Generally speaking, the functional application and the interpretation function are expected to be confluent, as indicated by the diagram in (18), where M is the function and N is its argument. That is, the order of executing the functional application and applying the interpretation function is not relevant to the final output.
In a situation where the problem arises, as in (17) . To be more specific, when one evaluates the interpretation function first, that is, one interprets the DRS in (17a), the values of Y A and Y B may be different because Y B is free. By contrast, when one evaluates functional application first, that is, one interprets the DRS in (17b), it may be the case that the values of Y A and Y B 1 are the same and the value of Y B 2 is different from other occurrences of Y , since Y B 2 is free in this DRS. This means that functional application and the interpretation function are not confluent. The DRSs in (17) are ill-formed since the binding status of the different occurrences of the same discourse referent Y differs. Moreover, as pointed out in Kohlhase et al. (1995), it is difficult to give a syntactic restriction imposed on expressions that cause these problematic cases through β-reduction.
Let us examine whether the duplication problem is avoided in other extended DRTs. CDRT yields the same result as λ-DRT does since their behavior is the same with respect to β-reduction. In RDRS, intrasentential merging takes place at the level of RDRS, which is exemplified in (19) where R → R is defined as ¬(R • ¬R ).
As shown in (19), the result ends up in the same DRS as λ-DRT and CDRT, despite the differences in the derivation processes. Therefore, all the extended DRTs discussed in this paper fall into the duplication problem.
The reason for allowing such derivation is that there is no constraint on β-reduction: It is a standard assumption in the λ-calculus that one has to check free variables during β-reduction. However, such a constraint would bring about another problem in constructing DRS, because of the non-standard notion of binding in the extended DRT such as λ-DRT called dynamically bound variables. A variable x is dynamically bound iff x is a free variable within an argument given to a function in which the variable corresponding to its argument appears within the scope of x introduced by the universe of some DRS. This is exemplified by (20), whose DRS is derived as shown in (21).
Here x in walk(x) is dynamically bound. Such bindings are common in extended DRTs.
In most λ-calculi, when variables in the argument conflict the variables in a functional expression, they force renaming of the variables in the function to fresh ones. In the case of extended DRTs, however, such renaming is impossible, since (20) would become (22) when introducing such a renaming constraint.
In (23), the argument of man, i.e. y, and the argument of walk, i.e. x, are different, thus this derivation is incorrect. In other words, the notion of variable renaming during β-reduction, which is widely assumed in the λ-calculus, and the notion of dynamically bound variables are not compatible with each other. There does not seem to be a straightforward remedy to the duplication problem given the theoretical setting of the extended DRTs which we discussed in this paper.

Logical Structure of DRT
Both of the problems that we pointed out in this section are caused by the logical structure of DRT. In standard logic, the scope of substitution agrees with that of binding, so that all variables under the scope are substituted. In DRT, by contrast, the scope of substitution is wider than binding scope; thus α-conversion and substitution in standard logic style would destroy the binding relations. Due to this feature, it is necessary to restrict the domain of definition of substitution in DRT: in the case of CDRT, discourse referents are treated as constant symbols, so substitution is not defined for them; Relational DRS defines substitution in consideration of free variables in the immediately following RDRS; λ-DRT checks substitutability in the definition of substitution.
Due to these restrictions on substitution, β-reduction is not fully defined in extended DRTs. The duplication problem shown in 3.2 is an instance of this general problem. Given that β-reduction plays an important role in composing DRSs, it is problematic that the safety of β-reduction is not guaranteed. Also, as a result of restricting substitution in order to keep binding relations, the binding relations of anaphora cannot be derived correctly. The overwrite problem shown in 3.1 is an instance of this problem.
Why does this happen even though extended DRTs are based on the λ-calculus? The reason lies in the difference between discourse referents in DRT and variables in the λ-calculus. The discourse referents in DRT play the role of binding variables as variables in first-order logic do. For example, the discourse referent x in (24a) plays almost the same role as x of ∃x does in (24b).
x man(x) walk(x)

b. ∃x(man(x) ∧ walk(x))
When extended DRTs introduced intrasentential compositionality into Classical DRT, the λ-calculus was integrated into DRT, but then, while variables bound by λ-operators behave as variables in first-order logic, discourse referents in extended DRTs behave differently, although they are bound by the same λ-operator, thus some property of the λ-calculus is lost.
The discrepancy between the status of variables and discourse referents causes the failure of β-reduction despite using the λ-calculus. To solve this problem, it is necessary for the discourse referents to share the same property as the binding variables in logic, but this is impossible as it will deprive them of their dynamic nature.

DTS (Bekki 2014; Bekki and Mineshima 2017) is a proof-theoretic semantics based on
Dependent Type Theory (Martin-Löf 1984). As we argued in the previous section, there are difficulties with DRT in that operations in standard logic such as substitution are not defined adequately. In DTS, by contrast, α-conversion and β-conversion are defined in the standard type-theoretic manner without stipulating any additional constraints, so that the overwrite problem and the duplication problem do not arise in this framework. We will see that anaphora can be treated appropriately in the compositional framework of DTS. Moreover, we will compare the notions of contexts in DTS and DRT that underly their treatment of anaphora and context update.

Dependent Type Theory
Dependent type theory is an extension of the simply typed λ-calculus. It can be characterized by being able to treat types depending on terms. For instance, A(x) represents a type dependent on the term x.
DTS mainly uses two dependent types from dependent type theory, Π -type and Σ-type. The Π -type generalizes the function type from simply typed λ-calculus. We is a function such that for any term a of type A, f (a) is of type B(a). When the variable x does not occur free in B, (x : A) → B(x) is reduced to functional type A → B. The Σ-type generalizes the product type in simply typed λ-calculus. We write ( The projection functions π 1 and π 2 are defined so that π 1 (t, u) = t and π 2 (t, u) = u. When the variable x does not occur free in B, Given the correspondence between types and propositions, i.e., the so-called Curry-Howard correspondence, types can be identified with propositions. In particular, Πtype and Σ-type correspond to universal quantification and existential quantification in logic. Using this correspondence, the semantic representation of a sentence in natural language can be specified in terms of a type. A term having a type that corresponds to a proposition is called a proof term. Given the identification of types with propositions, the notation t : A can be read as "t is a term of a type A" and "t is a proof term for the proposition A. Proof terms play a pivotal role in representing intrasentential and intersentential contexts in DTS.
Π -type and Σ-type have their own inference rules: formation rules, introduction rules and elimination rules. These rules are as follows.

Definition 9 (Formation, Introduction, and Elimination rule for the Π -type)
A : type See e.g., Martin-Löf (1984) for more details on inference rules in Dependent Type Theory.

Anaphora Resolution in DTS
Since dependent type theory has types that depend on terms, it can represent the meaning of a proposition that depends on the meaning of its previous context. The dynamic conjunction of two semantic representations is defined in terms of Σ-types as in Definition 11. 8 This definition provides a way to analyze intrasentential and intersentential anaphora in a unified compositional way.

Definition 11
As an illustration, consider the mini-discourse in (25a). A compositional derivation of the semantic representation for the first sentence is given in (25b), where for concreteness we assume CCG (Mark 2000) as a syntactic framework and use the lexical entries shown in Table 1.    Table 1), which can be instantiated by a syntactic category. In the case of the determiner in the subject position, T is instantiated by S, thus T /(T \N P)/N resulting in S/(S\N P)/N , while the one in the object position, it is instantiated by S\N P, hence T /(T \N P)/N resulting in S\N P\(S\N P/N P)/N . 9 Two semantic representations encoded as λ-terms are composed by the following combinatory rules: forward functional application rule (<), which derives X : f (a) from X /Y : f and Y : a, and backward functional application rule (>), which derives X : f (a) from X : a and Y \X : f , where X and Y are arbitrary syntactic categories. The semantic representation for the sentence is shown below. In a similar way, we can derive the semantic representation for the second sentence in the mini-discourse in (25a) as in (26).
(26) read π 1 @ 1 : x : entity male(x) , π 1 @ 2 : x : entity ¬human(x) Then, using dynamic conjunction implemented as the Σ-types, the semantic representations of the first and second sentences are combined as shown in (27), which gives the semantic representation for the whole discourse (25a).
y : entity man(y) ⎡ ⎣ u : y : entity book(y) own(π 1 w, π 1 u) ; read π 1 @ 1 : x : entity male(x) , π 1 @ 2 : x : entity read π 1 @ 1 : x : entity male(x) , π 1 @ 2 : Pronouns and other context-dependent expressions are represented by using the underspecified term @ i . An underspecified term has an annotated type of the form @ i : A, where the type A specifies the type of the term filling in @ i . For instance, the pronoun he is represented as @ : (x : entity) × male(x) and the pronoun it as @ : (x : entity) ×¬human(x), where the Σ-types are annotated to the underspecified term @. Note that the index in @ 1 and @ 2 in the semantic representations (27) is used to distinguish one underspecified term from another; in the semantic representation of a sentence that is compositionally derived, each occurrence of @ is assigned a mutually distinct index. Thus its role is different from that played in DRT.
In DTS, the process of resolving anaphora is formalized as a process of type checking. In the case of (27), anaphora can be resolved by substituting the underspecified terms @ 1 and @ 2 with a term having the annotated type. More specifically, given a semantic representation A that contains underspecified terms @ 1 , . . . , @ n the process of anaphora resolution consists of three steps: 1. First, the type checking is launched to prove A : type. 2. Then, for each underspecified term @ i : B i , where B i is an annotated type, a process of proof search is triggered to construct a proof term having the type B i in a given context.
In the case of the semantic representation in (27), the type checking that ensures that this semantic representation has the type type runs in the following way: y : entity man(y) ⎡ ⎣ u : y : entity book(y) own(π1w, π1u) : type (read : entity → entity → type) ∈ σ (CON) read : entity → entity → type . . . . . D1 (@) (@1 : x : entity male(x) ) : x : entity male(x) (ΣE) π1(@1 : x : entity male(x) ) : entity (ΣE) read(π1@1 : x : entity male(x) , y) : entity → type . . . . . D2 (@) (@2 : x : entity ¬human(x) ) : x : entity ¬human(x) (ΣE) π1(@2 : x : entity ¬human(x) ) : entity (Π E) read(π1@1 : x : entity male(x) , π1@2 : x : entity ¬human(x) ) : type x : entity male(x) , π1@2 : Here, σ is a signature that contains typing information for each predicate and other axioms representing background knowledge. A process of proof search is triggered by the @-rule, in order to fill in the subderivations D 1 and D 2 . The @-rule has the following form: Here, A true means that there exists a proof term for A. Thus, the goal of the proof search is to find a proof term for the annotated type A. In the following derivations, we write t : A with a concrete proof term t, in place of A true. Let us suppose that the background knowledge contains axioms for the relevant predicates: f : u : x : entity man(x) → male(π 1 u) and g : u : x : entity book(x) → ¬human(π 1 u).
Assuming these judgements are in the signature σ , the sub-derivation D 1 can be given as follows.
x : entity male(  (ΣI) (π1π1z, f (π1z)) : x : entity male(x) (@) (@2 : x : entity male(x) ) : x : entity male(x) In this derivation, the formation rule for Σ-types (Σ F) in (28) plays a crucial role: the required proof term is constructed using a term for the Σ-types that is discharged at the final step in the derivation shown in (28). In a similar way, the sub-derivation D 2 in (28) can be given in the following way.

The Overwrite Problem
Let us consider the problematic case of a construction that causes the overwrite problem discussed in Sect. 3 The semantic representations of the two sentences in (30) are combined as shown in (31).
(30) Bill and Sue own a donkey.
The 1 donkey which Bill owns eats an apple.
x : entity donkey(x) own(b, π 1 u) ⎤ ⎦ ⎡ ⎣ v : y : entity donkey(y) own(s, π 1 v) x : entity apple(x) eat(π 1 (@ : The type annotated with @ in (31) requires as its term a triplet (x, t, u) of a term x having type entity, a proof term t of type donkey(x), i.e., a proof term for the proposition that x is a donkey, and a proof term u of type own(b, x), i.e., a proof term for the proposition that Bill owns x. 10 It is easily verified that, by type checking and proof construction, we may find the term (π 1 π 1 π 1 q, (π 2 π 1 π 1 q, π 2 π 1 q)) having this type. By substituting the term @ with this term, we can obtain the following semantic representation.
x : entity apple(x) eat(π 1 π 1 π 1 q, π 1 w) In this way, a reading in which Bill's donkey substitutes the term @ is derived.
When the term @ refers to Sue's donkey, the term to be substituted must be a triplet (x, t, u ) where x and t are the same as before and u is a proof term of type own(s, x), that is, a proof term for the proposition that Sue owns x. In a similar way to the first reading, we can construct a term (π 1 π 1 π 2 q, (π 2 π 1 π 2 q, π 2 π 2 q)) satisfying this condition. It should be noted that the term corresponding to Sue's donkey and the term corresponding to Bill's donkey are distinguished by their derivation path, that is, the way a proof term is constructed, not by the name of the term. This way of distinguishing anaphoric dependencies makes it possible to derive two ways of picking up an object introduced by the first sentence in (30).

The Duplication Problem
The semantic representation of (17), a representation causing the duplication problem for DRT, is schematized in DTS as in (33). For the sake of exposition, we distinguish the different occurrences of y by using the two subscripts 1 and 2.
In (33), y 1 is a bound variable while y 2 is a free variable. Following the substitution rule of dependent type theory, DTS renames y 1 to avoid a clash of names for variables and obtains the semantic representation, where a fresh variable w is introduced.
In (33), the duplication problem is avoided and the two occurrences of y have the same binding status. DTS binds variables in the same way as dependent type theory does, which contrast with the status of dynamically bound variables in DRTs. Renaming does not conflict with the linguistic analysis and it can define the binding relations in a safe and clear way.

Contexts in DRT and DTS
Finally, let us discuss the differences between DRT and DTS with respect to the representation of contexts. Here the notion of context is broadly construed as a body of information that is introduced by the utterance of a sentence and is used subsequently to interpret the discourse. We can distinguish two different ways to representing contexts, namely, contexts as assignment functions and contexts as proof terms. In DRT, a context is represented by an assignment function. Generally an assignment function has a flat structure in the sense that an assignment function is a mere correspondence between discourse referents and entities. Therefore, the name of a discourse referent is a key to fetch the entity that it refers to. However, as we have seen earlier, the distributive reading of (6) may give rise to a case in which this leads to a wrong prediction, such as the overwrite problem.
On the other hand, DTS uses a proof term to represent a context for establishing an anaphoric link. A proof term for a Σ-type has a tree structure; for instance, in the case of the semantic representation in (32), the context provided by the first sentence Bill and Sue own a donkey introduce the proof term q of the following type.
As we can see, a proof term can be regarded as specifying the position of the antecedent in a given context that is a tree of proof terms. Thus, we use the position within a proof term as the key to fetch the witness. Since all variables and predicates are located in different positions in the tree, it does not cause any conflict of variables as DRT does.

Conclusion
We have shown that some features in the logical structure of DRT cause problems in the case of extended, compositionalized DRTs, and that they cannot avoid the problems as long as they adopt the approach mentioned in the previous sections. We also have shown that these problems do not occur in DTS. Since DTS is based on dependent type theory, which is a natural extension of the simply-typed λ-calculus, it keeps the property of the binder-variable relation in the λ-calculus intact. DTS also derives a semantic representation which uses typed variables rather than discourse referents. Therefore, DTS keeps the safety of β-reduction and α-conversion, which makes its logical structure robust.
To summarize, we have discussed that DRT and DTS have a different property with respect to their variable handling and compositionality. Although it is stated that they are the same in the sense that the semantic representations of one analysis can be translated into those of the other, we should also be aware of their differences: there exist semantic representations of DTS whose corresponding DRSs are not compositionally derivable in DRT.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.