Questions in Dependent Type Semantics

Dependent Type Semantics (DTS; Bekki and Mineshima, 2017) is a proof-theoretic compositional dynamic semantics based on Dependent Type Theory. The semantic representations for declarative sentences in DTS are types, based on the propositions-as-types paradigm. While type-theoretic semantics for natural language based on dependent type theory has been developed by many authors, how to assign semantic representations to interrogative sentences has been a non-trivial problem. In this study, we show how to provide the semantics of interrogative sentences in DTS. The basic idea is to assign the same type to both declarative sentences and interrogative sentences, partly building on the recent proposal in Inquisitive Semantics. We use Combinatory Categorial Grammar (CCG) as a syntactic component of DTS and implement our compositional semantics for interrogative sentences using ccg2lambda, a semantic parsing platform based on CCG. Based on the idea that the relationship between questions and answers can be formulated as the task of Recognizing Textual Entailment (RTE), we implement our inference system using proof assistant Coq and show that our system can deal with a wide range of question-answer relationships discussed in the formal semantics literature, including those with polar questions, alternative questions, and wh-questions.

There exist other semantic frameworks based on dependent type theory which deal with interrogative sentences. Ginzburg (2005) assigns different types to declarative sentences (assertion) and interrogative sentences (question); assertion is assigned a record type, while question is assigned the type of functions that maps records to propositions. In Ranta (1994), some meta-rules are introduced for describing the relationship of answers to the corresponding questions. A detailed comparison between our framework and these other type-theoretic frameworks must be left for another occasion.
The structure of the paper is as follows. In section 2 we briefly introduce the framework of DTS (for more detail, see Bekki (2014); Bekki and Mineshima (2017); Tanaka et al. (2018)). The main part of this paper is section 3. In this section, we extend the basic theory of DTS and present semantic representations for basic interrogative sentences. We show that this extension preserves the analysis of anaphora in terms of Σ-types in DTS. In section 4, we give an overview of how to provide a compositional semantics to derive semantic representations using CCG as a syntactic framework. In section 5, we present a questionanswering testset for evaluating interrogative semantics and the evaluation of our system on the testset. In section 6, we briefly discuss some future work.

DTS
In this section, we explain a basic framework of DTS that is relevant to our proposal in this paper. As mentioned in section 1, a proposition (which corresponds to a semantic representation of a sentence) is regarded as a type in DTS. In our analysis, we use the following four type constructors (in the DTS notation) which are also used in the previous study on formal semantics based on dependent type theory (Ranta, 1994;Luo, 2012;Bekki and Mineshima, 2017).
• Π-type: (x: A) → B(x) • Σ-type: (x : A) × B, also written as [t,u] m : C Figure 2: Inference rules of existential type. Elimination rule ( E) can be applied if m : C and any open assumption on which m : C depends do not contain x and y as free variables.
• Enumeration Type ({ }-type): {a 1 , a 2 , . . . , a n } Figure 1 shows inference rules for these types. Π-type and Σ-type can be considered as generalized function type and generalized product type, respectively. These two types make a difference from simple type theory where only non-dependent function type A → B and product type A × B are admitted.
-type is a disjoint union type. We also use enumeration type ({ }-type), written {a 1 , a 2 , . . . , a n }, to express the finite domain of entities; this setting is essential for our implementation, which we will discuss in section 5. The bottom type ⊥ is defined as { }, i.e., the enumeration type inhabited by no term. The bottom type ⊥ is used for defining the negation of A; as usual, ¬A is defined as A → ⊥.
In addition, we use existential type (also called weak-sigma type) (Luo, 1994), written (x: A) B, for semantic representations of wh-questions. Figure 2 shows inference rules of -type. Existential type corresponds to existential quantification in intuitionistic logic. The difference between Σ-type andtype is in elimination rule. The elimination rule of Σ-type allows to use projections (see ΣE in Figure 1), while the elimination rule of -type (see E in Figure 2) does not. Thus, a pair of terms [t, u] which is a proof term of (x: A) B cannot be divided into t and u by applying projection.
One of the other features of DTS is that expressions that trigger presupposition and anaphora are uniformly treated as underspecified terms, written @ (See Bekki and Mineshima (2017) for the detail). In our extension of DTS with interrogative semantics, this uniform treatment of anaphora and presupposition in terms of underspecification is preserved.

Semantic Representations for Interrogatives
In this section, we introduce semantic representations of interrogative sentences. We focus on three types of questions: polar question, alternative question and wh-question. Before we explain the detail of semantics of interrogative sentences in DTS, we show how to characterize the relationships between questions and their answers in our framework.
Partly building on Inquisitive Semantics (Ciardelli et al., 2019), we treat questions and assertions as having the same type in our type-theoretic framework. Also following Inquisitive Semantics, we define the entailment relation holding between a semantic representation (SR) of a declarative sentence and that of an interrogative sentence: the SR S  of a declarative sentence is an answer to the SR S  of an interrogative sentence if and only if S  entails S  in DTS. Using this definition, we can describe question-answer relationship as entailment relation and evaluate our semantic representations by a testset for question-answering.

Basic Declarative Sentence
We start with semantic representations of basic declarative sentences in DTS. Σ-type represents existential sentences; for instance, (1b) is a semantic representation of (1a). Σ-type is used to capture externally dynamic character of existential quantification in the sense of Groenendijk and Stokhof (1991); we will come back to this point later.
x : Entity run(x) Another type of basic declarative sentence we need to introduce is a universal sentence like (2a). The semantic representation of (2a) is given in (2b). Universal propositions are analyzed using Π-type.

Wh-Question
There are two different interpretations of wh-question, called mention-some reading and mention-all reading (Dayal, 2016). For instance, (3a) and (3b) are examples of wh-questions having a mention-some reading and a mention-all reading, respectively.
(3) a. What is something that Alice really likes? b. Who did Alice invite to her birthday party?
An answer to a mention-some wh-question is characterized by an instance satisfying the property in question; thus it does not have to mention all instances which satisfy the property. For example, if Alice likes chocolate, football and mathematics, (4a) and (4b) can be regarded as an answer to the mentionsome wh-question in (3a), that is, an answer to (3a) is characterized by mentioning some entity which Alice likes.
An answer to a mention-all question has to be exhaustive, that is, it must provide complete information about the question in the relevant domain. Thus, if Alice invited only Susan and John to her birthday party, (5a) is an answer to (3b). By contrast, (5b) and (5c) are not suited for an answer to (3b) because they do not give an exhaustive answer.
(5) a. Alice invited only Susan and John to her birthday party.
b. Alice invited Susan. c. Alice invited John.
For representing the meaning of a mention-some wh-question, we use existential type ( -type). For the sake of illustration, consider a simple mention-some wh-question in (6a), whose semantic representation is given in (6b).
(6) a. Who ran? (mention-some reading) b. (x: Entity) run(x) The existential sentence in (1a) can be a (at least semantically) proper answer to the mention-some wh-question. Thus the entailment relation in (7a) should hold. What is crucial here is that declarative existential sentences are analyzed as Σ-types, while mention-some wh-questions are analyzed as existential types. Thus, our analysis correctly derives the relation as stated in (7b); the SR of (1a) entails the SR of (6a), but not vice versa. 4 (7) a. Someone ran. ⇒ Who ran? (mention-some) b.
x : Entity run(x) (x: Entity) run(x) As shown in Figure 1 and Figure 2, Σ-type and -type have the same formation and introduction rules. As is mentioned in Section 2, the difference is in elimination rule. This causes differences in anaphora resolution between (8a) and (8b).
(8) a. Someone i ran. He i is a student.
b. Who i ran? (mention-some) # He i is a student.
An existential proposition introduces an entity which can be referred to in the subsequent sentences (Groenendijk and Stokhof, 1991). This externally dynamic character of existential quantification is captured by means of Σ-types (Ranta, 1994;Bekki and Mineshima, 2017;Tanaka et al., 2018). Thus, the minidiscourse in (8a) can be given the following full interpretation in DTS. 5 (9)   u : x : Entity run(x) student(π 1 (u))   Here, u introduced by the Σ-type is a pair of an entity x and a proof that x is a student. Thus the projection π 1 (u), which is allowed by the elimination rule of Σ-type (see Figure 1), successfully picks up its first component (the entity x), which can be used in the subsequent discourse.
In contrast, the elimination rule of -type (see Figure 2) does not provide a projection function. Thus this makes it impossible to establish the anaphoric link for (8b), which is a desirable prediction. There is no way to pass an entity introduced by the SR in (10) to the subsequent sentences.
(10) (x: Entity) run(x) Let us move on to the semantic representations of mention-all wh-question in our framework. For instance, consider the question in (11a). The mention-all reading of this question can be represented using Π-type and disjoint union type as in (11b).
As is in other systems based on dependent types, our underlying proof system is based on intuitionistic logic where the law of excluded middle is not allowed. Therefore, (11b) is not a theorem. A proof for the SR in (11b) is a function f such that for any entity x, f (x) is a proof of run(x) or a proof of ¬run(x). That is to say, to prove the SR in (11b), one has to know whether x runs or not for each entity x in the domain. This naturally captures the answering condition for the mention-all reading of (11a). Note that (12b) can serve as an answer to this mention-all question.
b. ((x: Entity) → (run(x) → (x = j))) ∧ run(j) The SR in (12b) means that John ran and the other entities did not run. We may assume that the number of entities in the domain is finite, which can be expressed by using enumeration type ({}-type). In this setting, (12b) entails (11b) in DTS; thus this correctly predicts that (12a) is an answer to (11a).

Polar Question
Semantic representations of polar question are given by using -type. (13a) is a simple example of polar question and (13b) is its semantic representation.
(13) a. Did John run? b. run(j) ¬run(j) In the same manner as in (11), our analysis derives the entailment in (14b), thus correctly predicting that John ran is an answer to the polar question in (13a).

Alternative Question
The semantic representations of alternative questions are also given by using -type. While the semantic representation of a polar question automatically meets the exhaustiveness condition by using -type, some alternative questions need to express exhaustiveness explicitly. Here we assume that neither and both are not a suitable answer to an alternative question like (15a). 6 We use (15b) as the semantic representation of (15a).
(16) a. John ran and didn't walk. b. run(j) ∧ ¬walk(j) In Inquisitive Semantics, alternative questions and declarative sentences with or are logically distinguished by means of double negation (Ciardelli et al., 2019). This option is not available in our framework, because double negation wrongly blocks a certain type of potential anaphoric links in DTS. As an example, consider the mini-discourse in (17a). The semantic representation of the first sentence of (17a) is given in (17b). If the semantic representation of the first sentence of (17a) is the one obtained by applying double negation to (17b), then it predicts that the anaphoric link in (17a) is impossible, contrary to the fact. For this reason, we do not use double negation for distinguishing alternative question from declarative disjunctive sentence.

Compositional Semantics
In this section, we provide a brief overview of how to compose semantic representations of sentences in DTS. For concreteness, we use CCG as a syntactic component of our framework. Table 1 shows an excerpt from the lexical entries we implement in this study. 7 For convenience, we assume that the category NP is always type-raised; the type-raised categories (S/(S\N P )) and (S\(S/N P )) are abbreviated as N P ↑ nom and N P ↑ acc , respectively. (18) is a simple example of the derivation tree annotated with semantic representations. 6 See Biezma and Rawlins (2012) for discussion on the status of "neither" and "both" as an answer to alternative questions. 7 All the codes to implement our system and the testset used in the experiments are available at https://github.com/ Kazuuuuuki/DTS-question-parser.  As an example of a simple polar question, consider (19). The CCG derivation of (19) shows that the question mark "?" induces inquisitive meaning for polar questions. As a more involved case, (20) is a derivation tree for a declarative sentence with or and (21) for an alternative question with or. Note that we use different categories for or in (20) and (21).
(21) Did John run or walk ?
In (21), or introduces a category with a feature S or , which is taken over to the node of category S or for Did John run or walk; then the question mark "?" of category S\S or takes it as argument and returns an expression of category S. Thus the question mark "?" does not introduce inquisitive meaning if it takes an expression of category S or .
The reason for assigning several different categories to a question mark can be seen by considering (22). 8 The semantic representation of (22) is one for an alternative question in the same way as (21). Thus the inquisitive meaning is introduced not by the question mark "?" but by or of alternative question.
(22) Did John run or did he walk ?
Who ran ? (mention-some) yes Someone ran.
Who ran ? (mention-some) yes Only John saw Susan.
Who saw Susan ? (mention-all) yes John ran or Susan walked.
Who ran ? (mention-some) no Nobody ran.
Who ran ? (mention-all) yes Only John ran.
Who didn't run ? (mention-all) yes John didn't run.
Who ran ? (mention-some) unknown Every student ran.
Did John run ? yes John ran or Susan walked.
Did John run ? unknown John ran and Susan walked.
Did John run ? yes John didn't run.
Did John run ? yes Only John ran.
Did John run ? yes John ran or walked.
Did John run or walk? unknown John ran and didn't walk.
Did John run or did John walk ? yes Nobody ran.
Did John run? yes John is tall and John is not short. Is John tall or short ? yes Table 2: Some examples from our testset. We assume that the denotation of student consists of John and Susan.

Experiment
We implement the compositional semantics introduced in the previous section using ccg2lambda. Since there is a non-trivial gap between the outputs of the state-of-the-art CCG parsers (e.g., Yoshikawa et al., 2017) and the syntactic structures we assume in this study, we manually annotate CCG trees for the input sentences. We implement the compositional mapping from CCG trees to the semantic representations discussed so far, using the lexical entries presented in the previous section. 9 The system automatically converts an input CCG tree to the corresponding semantic representation in DTS. Implementation of a proof system is also needed for checking the relationships between answers and questions formulated as entailment relation. We use Ltac (Delahaye, 2000), a tactic language available in Coq to implement proof automation necessary for our purposes.
We built a testset consisting of 49 question-answer pairs. Some examples are shown in Table 2. Each problem in the testset has two sentences; the first sentence is an answer and the second sentence is a question. For each pair of the testset, we annotated a gold CCG tree. Here is an example for an answer sentence Everyone runs and a question sentence Who ran ? (mention-some reading): (23) (S (<S/<S\NP>> Everyone) (S\NP run)) (S (S_some (<S_some/<S\NP>> Who_some) (S\NP run)) (S\S_some ?)) The answer to each problem is yes (entailment), no (contradiction), or unknown (neither), following the FraCaS testset (Cooper et al., 1994). The distribution of answers is: yes/no/unknown = 36/1/12 For evaluating the basic capacity of compositional semantics and proof system, we keep the sentences included in the testset as simple as possible. This makes easy to detect what phenomena a given system fails to give an appropriate semantic representation.
In the setting for theorem proving in Coq, we use a finite domain with three entities: John, Susan and Lucy. This can be implemented using enumeration type in Coq: (24) Inductive Entity : Type := | John | Susan | Lucy. 9 The distinction between mention-some and mentione-all readings is annotated to wh-expressions; see entries for who in Table 1.
The Coq script automatically generated for the CCG trees for the question-answer pair in (23) is the following: (25) (forall x:Entity,(_run x)) -> (ex Entity (fun x => (_run x))) Here the semantic representation for the answer sentence appears in the antecedent of implication "->" and that for the question sentence appears in the consequent. We use existential type in Coq, written ex, for representing mention-some wh-question. The system correctly proves (25) as a theorem.
In this setting, we can successfully derive the desired semantic representations and prove the entailment relations for all 49 cases.

Conclusion
In this paper, we extended the framework of DTS with semantics for a variety of interrogative sentences. There are many topics which cannot be discussed in this paper. Among others, we do not deal with embedded questions. Also, we do not give a detailed examination of the presuppositions of wh-questions in the context of DTS. Tanaka et al. (2017) presented an analysis of factive verbs like know in the framekwork of DTS, but the relationship between our proposal and this work is not obvious yet. These issues will be left for future work.