dependent types in natural language semantics

31
Dependent Types in Natural Language Semantics Daisuke Bekki †‡§ Ochanomizu University CREST, Japan Science and Technology Agency National Institute of Informatics §National Institute of Advanced Industrial Science and Technology 4th July, 2015 The Second International Workshop on Linguistics of BA at Future University Hakodate

Upload: daisuke-bekki

Post on 17-Aug-2015

71 views

Category:

Science


0 download

TRANSCRIPT

Page 1: Dependent Types in Natural Language Semantics

Dependent Types in Natural Language Semantics

Daisuke Bekki†‡�§

†Ochanomizu University‡CREST, Japan Science and Technology Agency

�National Institute of Informatics§National Institute of Advanced Industrial Science and Technology

4th July, 2015The Second International Workshop on Linguistics of BA

at Future University Hakodate

Page 2: Dependent Types in Natural Language Semantics

1. Proof-theoretic turn in discourserepresentation

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 2/31

Page 3: Dependent Types in Natural Language Semantics

1.1. Donkey and E-type anaphora

Since 1980, the enterprise of dynamic semantics has pursued an alternative frame-work to Montagovian semantics, which compensates for the gap between syntacticstructures of natural language sentences involving dynamic binding. The difficultyof this pursuit implies that there is tension between dynamism and compositionality,which have not yet been unified in a coherent semantic theory that accounts for bothaspects.

This tension has been the driving force behind dynamic semantics, and in factsome theories have achieved partial success in unifying the two aspects. Thus, Ishould clarify what I mean by dynamism and compositionality. Dynamic semanticsexplores various empirical data concerning dynamic binding, whose nature is exem-plified by the two paradigms of donkey sentences in (1) by Geach (1962) and E-typeanaphora in (2) by Evans (1980).

(1) a. Every farmer who owns [a donkey]i beats iti.b. If [a farmer]i owns [a donkey]j , hei beats itj .

(2) [A man]i entered. Hei whistled.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 3/31

Page 4: Dependent Types in Natural Language Semantics

1.1. Donkey and E-type anaphora

As discussed elsewhere, (1a), for example, is problematic in terms of composition-ality. Compositional semantic theory is such that it provides a way to calculate anysemantic representation of any target sentence from the semantic representationsof its parts. The structural analogue of (1a) (and (1b)), which allows us to givea straightforward compositional analysis, is (3). However, it is not an appropriatesemantic representation for (1a) since variable y occurs as a free variable outside ofthe scope of ∃y.

(3) ∀x(Farmer(x) ∧ ∃y(Donkey(y) ∧ Own(x, y)) → Beat(x, y))

In the same way, the structural analogue of (2) is (4), which is not an appropriaterepresentation for (2) since variable x in Whistle(x) is not bound by ∃x.

(4) ∃x(Man(x) ∧Enter(x)) ∧ Whistle(x)

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 4/31

Page 5: Dependent Types in Natural Language Semantics

1.1. Donkey and E-type anaphora

The first-order representations for sentences (1) and (2) necessary in order tocorrectly calculate their entailment relations are (5) and (6), respectively.

(5) ∀x(Farmer(x) → ∀y(Donkey(y) ∧ Own(x, y) → Beat(x, y)))

(6) ∃x(Man(x) ∧Enter(x)∧Whistle(x))

These represent proper information that the sentences (1) and (2) contain, ina sense that any proof system for first-order predicate logic will prove that theinferences in Example 1 and Example 2 are valid.

On the other hand, the structural similarity to the original sentences is lost in(5) and (6), so their direct decomposition does not lead to the respective lexicalizedrepresentations.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 5/31

Page 6: Dependent Types in Natural Language Semantics

1.1. Donkey and E-type anaphora

Example 1 (Donkey Syllogism).

Every farmer who owns [a donkey]i beats iti.John is a farmer.Bill is a donkey.John owns Bill.John beats Bill.

Example 2 (E-type Syllogisms).

[A man]i entered.Hei whistled.A man entered.

[A man]i entered.Hei whistled.A man whistled.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 6/31

Page 7: Dependent Types in Natural Language Semantics

1.2. Proof-theoretic turn: Sundholm and Ranta

Sundholm (1986) noticed fairly early that dependent type theory provides se-mantic representations for donkey sentences whose structures are parallel to theirsyntactic structures in a different way from DRT Kamp (1981), Kamp and Reyle(1993), DPL Groenendijk and Stokhof (1991), and their successors.

(7) a. A man entered. He whistled.⎡⎢⎢⎣ u:

⎡⎣ x:entity[

man(x)enter(x)

] ⎤⎦

whistle(π1(u))

⎤⎥⎥⎦

(8) a. Every farmer who owns a donkey beats it.

(x:entity) →

⎛⎜⎜⎝u:

⎡⎢⎢⎣

farmer(x)⎡⎣ y:entity[

donkey(y)own(x, y)

] ⎤⎦

⎤⎥⎥⎦

⎞⎟⎟⎠ → beat(x, π1π2(u))

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 7/31

Page 8: Dependent Types in Natural Language Semantics

1.3. Key concepts

1. Proof-theoretic semantics (vs. Model-theoretic semantics)

2. Curry-Howard Correspondence (between logic type theory)

3. Dependent types (vs. Simple types)

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 8/31

Page 9: Dependent Types in Natural Language Semantics

2. Proof-theoretic Semantics,Curry-Howard Correspondence,and Dependent Types

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 9/31

Page 10: Dependent Types in Natural Language Semantics

2.1. Proof-theoretic vs. model-theoretic semantics

The ‘meaning’ of a given proposition φ:

The Proof-theoretic Semantics Model-theoretic Semantics

Provability, or {Γ | Γ � φ} Truth-condition, or {(M, g) | �φ�M,g = 1}

Inference rules Semantic Values(natural deduction): (classical logic):

A....B

i

A → B(→I ),i

A A → BB

(→E)

A BA ∧ B

(∧I )A1 ∧ A2

Ai(∧E),i=1,2

�A → B�M,g = 1⇐⇒ �A�M,g = 0 or �B�M,g = 1

�A ∧ B�M,g = 1⇐⇒ �A�M,g = 1 and �B�M,g = 1

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 10/31

Page 11: Dependent Types in Natural Language Semantics

2.2. Curry-Howard Correspondence

Propositional Logic Simply-Typed Lambda Calculus

A....B

i

A → B(→I ),i

x : A....B

i

λx.M : A → B(→I ),i

A A → BB

(→E)N : A M : A → B

MN : B(→E)

A BA ∧ B

(∧I )M : A N : B(M, N) : A × B

(∧I )

A1 ∧ A2

Ai(∧E),i=1,2

(M1, M2) : A1 × A2

πi(M) : Ai

(×E),i=1,2

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 11/31

Page 12: Dependent Types in Natural Language Semantics

2.3. Curry-Howard Isomorphism

The correspondence between the notions of logic and type theory:

Logic Type Theoryproposition typeproof termaxiom constant symbolassumption variableprovability inhabitancecut substitutionnormalization reduction. . . . . .

• A term is an encoding of a proof of a type(=proposition)

• A proposition can be regarded as a collection of proofs.

• φ is true under Γ iff φ is inhabited under Γ.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 12/31

Page 13: Dependent Types in Natural Language Semantics

2.4. Dependent function/sum Types

• Dependent function type (x:A) → B is a generalized form of the function/implicationtype A → B:

A → Bdef≡ (x:A) → B where x /∈ fv(B).

∀xBdef≡ (x:entity) → B

• Dependent sum type[

x:AB

]is a generalized form of the product/conjunction

type A × B:

A ∧ Bdef≡

[x:AB

]where x /∈ fv(B).

∃xBdef≡

[x:entityB

]

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 13/31

Page 14: Dependent Types in Natural Language Semantics

2.4. Dependent function/sum Types

Natural deduction rules for dependent types:

(x:A) → B : s

x : A....M : B

i

λx : A.M : (x:A) → B(ΠI ),i

M : (x:A) → B N : A

MN : B[N/x](ΠE)

M : A N : B[M/x]

(M, N) :[

x:AB

] (ΣI )M :

[x:AB

]

π1(M) : A(ΣE)

M :[

x:AB

]

π2(M) : B[π1(M)/x](ΣE)

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 14/31

Page 15: Dependent Types in Natural Language Semantics

2.5. Dependent Types in Natural LanguageSemantics

(9) Donkey anaphora: Sundholm (1986)a. Every farmer who owns a donkey beats it.

b. (x:entity) →

⎛⎜⎜⎝u:

⎡⎢⎢⎣

farmer(x)⎡⎣ y:entity[

donkey(y)own(x, y)

] ⎤⎦

⎤⎥⎥⎦

⎞⎟⎟⎠ → beat(x, π1π2(u))

(10) E-type anaphora: Ranta (1994)a. A man entered. He whistled.

b.

⎡⎢⎢⎣ u:

⎡⎣ x:entity[

man(x)enter(x)

] ⎤⎦

whistle(π1(u))

⎤⎥⎥⎦

Recall that (x:A) → B is a type for functions from A to B[x], and[

x:AB

]is a

type for pairs of A and B[x].

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 15/31

Page 16: Dependent Types in Natural Language Semantics

2.6. Previous Works

Subsequently, the following three approaches have been proposed to obtain Sund-holmian representations:

1. Ahn and Kolb (1990) provides a set of translation rules from DRS to DependentType representations

2. Davila-Perez (1995) presented a reformulation of Montague Grammar Mon-tague (1973) in terms of MLTT.

3. Ranta (1994) proposed a generative theory of grammar based on MLTT, knownas Type-Theoretical Grammar (TTG).

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 16/31

Page 17: Dependent Types in Natural Language Semantics

2.6. Previous Works

• Relative and Implicational Donkey Sentences, Branching Quantifiers, Inten-sionality, Tense: Ranta (1994)

• Summation: Fox (1994a,b)

• Presupposition Binding and Accommodation, Bridging: Krahmer and Piwek(1999), Piwek and Krahmer (2000)

• Coercion: Luo (1997, 1999, 2010, 2012b), Asher and Luo (2012)

• Adverbs: Chatzikyriakidis (2014)

• New frameworks: Cooper (2005), Luo (2012a), Bekki (2014), Martin and Pol-lard (2014)

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 17/31

Page 18: Dependent Types in Natural Language Semantics

2.6. Previous Works

Recent works in our group:

• Generalized Quantifiers: Tanaka et al. (2013), Tanaka (2014)

• Type checking/inference in DTS and its implementation: Bekki and Sato(2015)

• Modal Subordination: Tanaka et al. (2014)

• Factive Presupposition: Tanaka et al. (2015)

• Conventional Implicature: Bekki and McCready (2014), Watanabe et al. (2014)

• Double-Negated Antecedents: Bekki (2013)

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 18/31

Page 19: Dependent Types in Natural Language Semantics

A. Appendix

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 19/31

Page 20: Dependent Types in Natural Language Semantics

A.1. Dependent Types in Mathematics and Logic

• The notion of dependent types originates from:

– Martin-Lof Type Theory (MLTT) (Martin-Lof (1975, 1984)), which wasproposed as a foundation of constructive mathematics.

– Calculus of Constructions (CoC) (Coquand and Huet (1988)), which wasproposed as a foundation of functional programming and mathematicalproofs.

• Lately, fragments of MLTT and CoC have been integrated into a general the-ory of the λ-cube (Barendregt (1992)) and Pure Type Systems (PTS) (Berardi(1990); Barendregt (1991)) with other important type theories, such as Gi-rard’s F (Girard et al. (1989)).

• Calculus of Inductive Constructions (CoIC) (=CoC with inductive types) isknown as an underlying language of proof assistants Coq (Bertot and Casteran(2004)) and Agda (Nordstrom et al. (1990), Bove and Dybjer (2008)).

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 20/31

Page 21: Dependent Types in Natural Language Semantics

A.1. Dependent Types in Mathematics and Logic

The term “Dependent Type Theory” usually covers:

• λP is an extention of Simple Type Theory (λ→) with dependent functionaltype Π. (cf. Barendregt Cube) λω λC

λ2

����λP2

����

λω λPω

λ→

���λP

���

• Martin-Lof/Constructive/Intuitionistic/Modern Type Theory is an extentionof λP with dependent sum type Σ, (dependent) record type, Equational type,and Natural Numbers, Inductive types, etc.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 21/31

Page 22: Dependent Types in Natural Language Semantics

A.2. What is NOT Dependent Type Theory

• Type-Theoretic Semantics (ex. Montague (1973), Gallin (1975)), where aproposition is a term of type t, while in Dependent Type Theory, a propo-sition is a type (=a collection of proofs).

• Dependent Type Theory is proof-theoretic, but it has a denotational semantics(cf. fibred category theory: Jacobs (1999)) and other types of semantics (cf.game-theoretic semantics) as well.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 22/31

Page 23: Dependent Types in Natural Language Semantics

References

References

Ahn, R. and H.-P. Kolb. (1990) “Discourse Representation meets Constructive Math-ematics”, In: L. Kalman and L. Polos (eds.): Papers from the Second Symposiumon Logic and Language. Akademiai Kiado.

Asher, N. and Z. Luo. (2012) “Formalisation of coercions in lexical semantics”, Inthe Proceedings of Sinn und Bedeutung 17. Paris, pp.63–80.

Barendregt, H. P. (1991) “Introduction to generalized type systems”, Journal ofFunctional Programming 1(2), pp.125–154.

Barendregt, H. P. (1992) “Lambda Calculi with Types”, In: S. Abramsky, D. M.Gabbay, and T. Maibaum (eds.): Handbook of Logic in Computer Science, Vol. 2.Oxford Science Publications, pp.117–309.

Bekki, D. (2013) “A Type-theoretic Approach to Double Negation Elimination inAnaphora”, In the Proceedings of Logic and Engineering of Natural LanguageSemantics 10 (LENLS 10). Tokyo.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 23/31

Page 24: Dependent Types in Natural Language Semantics

References

Bekki, D. (2014) “Representing Anaphora with Dependent Types”, In the Proceed-ings of N. Asher and S. V. Soloviev (eds.): Logical Aspects of Computational Lin-guistics (8th international conference, LACL2014, Toulouse, France, June 2014Proceedings), LNCS 8535. Toulouse, pp.14–29, Springer, Heiderburg.

Bekki, D. and E. McCready. (2014) “CI via DTS”, In the Proceedings of LENLS11.Tokyo, pp.110–123.

Bekki, D. and M. Sato. (2015) “Calculating Projections via Type Checking”, In theProceedings of TYpe Theory and LExical Semantics (TYTLES), ESSLLI2015workshop. Barcelona, Spain.

Berardi, S. (1990) “Type Dependence and Constructive Mathematics”, Ph.d thesis,Mathematical Institute.

Bertot, Y. and P. Casteran. (2004) Interactive Theorem Proving and Program De-velopment. Springer.

Bove, A. and P. Dybjer. (2008) “Dependent Types at Work”.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 24/31

Page 25: Dependent Types in Natural Language Semantics

References

Chatzikyriakidis, S. (2014) “Adverbs in a Modern Type Theory”, In: N. Asher andS. V. Soloviev (eds.): Logical Aspect of Computational Linguistics, 8th Interna-tional Conference, LACL2014, Toulouse, France, June 18-20, 2014 Proceedings.Springer.

Cooper, R. (2005) “Austinian truth, attitudes and type theory”, Research on Lan-guage and Computation 3, pp.333–362.

Coquand, T. and G. Huet. (1988) “The Calculus of Constructions”, Information andComputation 76(2-3), pp.95–120.

Davila-Perez, R. (1995) “Semantics and Parsing in Intuitionistic Categorial Gram-mar”, Ph.d. thesis, University of Essex.

Evans, G. (1980) “Pronouns”, Linguistic Inquiry 11, pp.337–362.

Fox, C. (1994a) “Discourse Representation, Type Theory and Property Theory”, Inthe Proceedings of H. Bunt, R. Muskens, and G. Rentier (eds.): the International

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 25/31

Page 26: Dependent Types in Natural Language Semantics

References

Workshop on Computational Semantics. Institute for Language Technology andArtificial Intelligence (ITK), Tilburg, pp.71–80.

Fox, C. (1994b) “Existence Presuppositions and Category Mistakes”, Acta Linguis-tica Hungarica 42(3/4), pp.325–339. Published 1996.

Gallin, D. (1975) Intensional and Higher-Order Modal Logic. With Application toMontague Semantics. Amsterdam, New York, North-Holland Publisher/ElsevierPublisher.

Geach, P. (1962) Reference and Generality: An Examination of Some Medieval andModern Theories. Ithaca, New York, Cornell University Press.

Girard, J.-Y., Y. Lafont, and P. Taylor. (1989) Proofs and Types, Cambridge Tractsin Theoretical Computer Science 7. Cambridge University Press.

Groenendijk, J. and M. Stokhof. (1991) “Dynamic Predicate Logic”, Linguistics andPhilosophy 14, pp.39–100.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 26/31

Page 27: Dependent Types in Natural Language Semantics

References

Jacobs, B. (1999) Categorical Logic and Type Theory, Vol. 141 of Studies in Logicand the Foundations of Mathematics. North Holland, Elsevier.

Kamp, H. (1981) “A Theory of Truth and Semantic Representation”, In: J. Groe-nendijk, T. M. Janssen, and M. Stokhof (eds.): Formal Methods in the Study ofLanguage. Amsterdam, Mathematical Centre Tract 135.

Kamp, H. and U. Reyle. (1993) From Discourse to Logic. Kluwer Academic Pub-lishers.

Krahmer, E. and P. Piwek. (1999) “Presupposition Projection as Proof Construc-tion”, In: H. Bunt and R. Muskens (eds.): Computing Meanings: Current Issuesin Computational Semantics, Studies in Linguistics Philosophy Series. Dordrecht,Kluwer Academic Publishers.

Luo, Z. (1997) “Coercive subtyping in type theory”, In: D. van Dalen and M. Bezem(eds.): CSL 1996. LNCS, vol. 1258. Heidelberg, Springer.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 27/31

Page 28: Dependent Types in Natural Language Semantics

References

Luo, Z. (1999) “Coercive subtyping”, Journal of Logic and Computation 9(1),pp.105–130.

Luo, Z. (2010) “Type-theoretical semantics with coercive subtyping”, In the Pro-ceedings of Semantics and Linguistic Theory 20 (SALT 20). Vancouver.

Luo, Z. (2012a) “Common Nouns as Types”, In: D. Bechet and A. Dikovsky(eds.): Logical Aspects of Computational Linguistics, 7th International Confer-ence, LACL2012, Nantes, France, July 2012 Proceedings. Springer, pp.173–185.

Luo, Z. (2012b) “Formal Semantics in Modern Type Theories with Coercive Sub-typing”, Linguistics and Philosophy 35(6).

Martin, S. and C. J. Pollard. (2014) “A dynamic categorial grammar”, In the Pro-ceedings of Formal Grammar 19, LNCS 8612.

Martin-Lof, P. (1975) “An intuitionistic theory of types”, In: H. E. Rose and J.Shepherdson (eds.): Logic Colloquium ’73. Amsterdam, North-Holland, pp.73–118.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 28/31

Page 29: Dependent Types in Natural Language Semantics

References

Martin-Lof, P. (1984) Intuitionistic Type Theory, Vol. 17. Naples, Italy: Bibliopolis.Sambin, Giovanni (ed.).

Montague, R. (1973) “The proper treatment of quantification in ordinary English”,In: J. Hintikka, J. Moravcsic, and P. Suppes (eds.): Approaches to Natural Lan-guage. Dordrecht, Reidel, pp.221–242.

Nordstrom, B., K. Petersson, and J. Smith. (1990) Programming in Martin-Lof ’sType Theory. Oxford University Press.

Piwek, P. and E. Krahmer. (2000) “Presuppositions in Context: ConstructingBridges”, In: P. Bonzon, M. Cavalcanti, and R. Nossum (eds.): Formal Aspectsof Context, Applied Logic Series. Dordrecht, Kluwer Academic Publishers.

Ranta, A. (1994) Type-Theoretical Grammar. Oxford University Press.

Sundholm, G. (1986) “Proof theory and meaning”, In: D. Gabbay and F. Guenthner(eds.): Handbook of Philosophical Logic, Vol. III. Reidel, Kluwer, pp.471–506.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 29/31

Page 30: Dependent Types in Natural Language Semantics

References

Tanaka, R. (2014) “A Proof-Theoretic Approach to Generalized Quantifiers in De-pendent Type Semantics”, In the Proceedings of R. de Haan (ed.): the ESSLLI2014 Student Session, 26th European Summer School in Logic, Language and In-formation. Tubingen, Germany, pp.140–151.

Tanaka, R., K. Mineshima, and D. Bekki. (2014) “Resolving Modal Anaphora inDependent Type Semantics”, In the Proceedings of the Eleventh InternationalWorkshop on Logic and Engineering of Natural Language Semantics (LENLS11),JSAI International Symposia on AI 2014. Tokyo, pp.43–56.

Tanaka, R., K. Mineshima, and D. Bekki. (2015) “Factivity and Presupposition inDependent Type Semantics”, In the Proceedings of TYpe Theory and LExicalSemantics (TYTLES), ESSLLI2015 workshop.

Tanaka, R., Y. Nakano, and D. Bekki. (2013) “Constructive Generalized QuantifiersRevisited”, In the Proceedings of Logic and Engineering of Natural LanguageSemantics 10 (LENLS 10). Tokyo, pp.69–78.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 30/31

Page 31: Dependent Types in Natural Language Semantics

References

Watanabe, N., E. McCready, and D. Bekki. (2014) “Japanese Honorification: Com-positionality and Expressivity”, In the Proceedings of S. Kawahara and M.Igarashi (eds.): FAJL 7: Formal Approaches to Japanese Linguistics, the MITWorking Papers in Linguistics 73. International Christian University, Japan,pp.265–276.

“Contexts in DTS” Future University Hakodate, 4th July, 2015 Page 31/31