Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Bogdan Gapinski
Semantics: Modal Logics / Applicative
Categorical Grammars
Presentation based on the book “Type-Logical Semantics” by Bob Carpenter
Modal Logic - Motivation
• Problems with true-false logic
– The ancients believed [the morning star is the morning star]
– The ancients believed [the morning star is the evening star]
• morning star = evening star = Venus
– Terry intentionally shot {the burglar / his best friend}
• what if his best friend is the burglar
– Morgan swam the channel quickly
– Morgan crossed the channel slowly
• swimming/crossing speed
– Francis is a good Broadway {dancer / singer}
• comparison classes
Modal Logics – general idea
•
~p means “p is necessarily true”
• we want (~p)6p but not p6(~p)
• Kripke’s idea:
–
–
–
–
–
a possible world determines truth of falsehood of formulas
worlds can be interpreted as points in time
denotation of the formula depends on the world
~p is true iff p is true in every possible world
define L as not(~not(p))
• A formula is possibly true if it is not necessarily false
• jLp can be true at a world even if p is false
Indexicality
• Expressions that have their interpretations determined by the
context of utterance
– personal pronouns: I, you, we
– temporal expressions now, yesterday
– locative expression here
• add parameters for speaker/hearer/location to the denotation
function
• Generalized idea: single context index c with arbitrary number of
properties that could be retrieved by functions, for instance
speak: Context 6 Ind speak(c) = an individual who is
speaking
General Modal Logics
• Notion of accessibility
• Accessibility relation A f World x World
– wAw’ means w’ is possible relative to w
– ~p is true in a world w iff p is true in every world w’ such that
wAw’
• Logics can be defined by imposing conditions on A and specifying
axioms they satisfy
• Example: ~ =“is known” not(~p) 6~ not(~p)
– “if p is not known, then it is known to be not known”
– knowledge representation with for agents with full introspection
Implication and Counterfactuals
• If there were no cats, cats would eat mice.
• If there were no dogs, cats would eat mice.
• Lewis: indicative conditional vs. subjunctive conditional
–
–
–
–
If Oswald did not kill Kennedy, then someone else did
If Oswald had not killed Kennedy, then someone else would have.
but…
If Oswald has not killed Kennedy, someone else will have
• said the next in line would-be assassin…
• Translate “p then q” as ~ (p 6 q)
Tense Logic
•
•
•
•
Worlds = moments in time (Tim)
Accessibility = temporal precedence (<)
Fp is true at time t iff p is true at t’ such that t’>t
Pp is true at time t iff p is true at t’ such that t’<t
– Wp = not(F(not(p)))
– Hp = not(P(not(p)))
• FHp 6 p
[Always Will]
[Always Has]
• Different kind of logic systems result from conditions imposed on <
Tense and Aspect
• Tenses: past, present, future
• Aspect: perfective, progressive, simple
• Reichenback’s approach:
– event, reference, speech times
– Tenses:
•
•
•
•
•
Past: tr<ts
Present tr=ts
Future: tr>ts
Past perfect: te<tr<ts
Simple past: te=tr<ts
Calculus with Types
• Types – set Typ
– BasType f Typ
– If p, q 0Typ then (p -> q) 0 Typ
– For us, BasType ={Ind, Bool}
– Ex. ((Ind -> Bool) -> (Ind -> Bool))
Calculus with Types
• Terms – set Termp
– For each type p, we have a set of variables Varp and constants Consp
–
–
–
–
Varp 0Termp
Conp 0Termp
a(b) 0Termp if a 0Termp->q and b 0Termp
x.a 0Termp->q if x 0 Vatp and a 0Termq
–
–
–
–
run: Ind -> Bool, lee: Ind quickly: (Ind->Bool)->Ind->Bool
run(lee): Bool
quickly(run): Ind -> Bool
quickly(run)(lee): Bool
– x: Ind
x.(like(x)(ricky))
Calculus with Types
• Beta-reduction: (x.p)(q) -> p[q/x]
• (x.(x)(x)) (x.(x)(x)) -> ???
The Category System
• Basic Categories:
– np
–n
–s
noun phrase
noun
sentence
Syntactic Categories - Formal
Definition
• The collection of syntactic categories
determined by the collection BasCat
– BasCat f Cat
– if A, B 0 Cat then (A/B) and (B\A) 0
A/B – forward functor
B\A – backward functor
Cat
Examples
•
•
•
•
•
•
•
•
np/n
n/n
n\n
(n\n)/np
np\s
(np\s)/np
((np\s)/np)/np
(np/s)/(np/s)
•
•
•
•
•
•
•
•
determiners
prenominal adjectives
postnominal modifiers
preposition
intransitive verb or verb phrase
transitive verb
ditransitive verb
preverbal verb-phrase modifier
aka adverb
Type Assignment
• Type assignment function Typ
– Typ(A/B)=Typ(B\A)= Typ (B) 6 Typ(A)
– Typ(np) = Ind
– Typ(n) = Ind 6 Bool
– Typ(s) = Bool
Categorical Lexicon
• Relation between basic expressions of a
language, syntactic category and meaning
• Meaning = -term
• Categorical Lexicon – relation Lex f
BaseExp x (Cat x Term) such that if
<e,<A,a>> 0 Lex then a 0 Term Typ(A)
• Notation e Y a : A
Phase-structure Denotation
• Function: [ . ]Lex
– a:A 0 [e] if e Y a:A 0 Lex
– a(b):A 0 [e1 e2] if a:A/B 0 [e1] and b:B 0
[e2]
– a(b):A 0 [e1 e2] if a:B\A 0 [e2] and b:B 0
[e1]
Lexicon: Example
•
•
•
•
•
•
•
•
•
•
•
Sandy Y sandy:np
the Y L: np/p
kid Y kid:n
tall Y tall:n/n
(P.x.P(x))
outside Y outside:n\n
in Y in:n\n/np
runs Y run:np\s
loves Y love:np\s/np
gives Y give:np\s/np/np
outside Y outside:(np\s)\np\s
in Y in:(np\s)\np\s/np
Example of a derivation: the tall kid runs
•
•
•
•
•
•
•
tall:n/n 0 [tall]
kid:n 0 [kid]
tall(kid):n 0 [tall kid]
L:np/n 0 [the]
L(tall(kid)):np 0 [the tall kid]
run: np\s 0 [runs]
run(L(tall(kid))): s 0 [the tall kid runs]
Derivation Tree
The
L:np/n
tall
tall:n/n
kid
runs
kid:n
run:np\s
tall(kid):n
L(tall(kid)):np
run(L(tall(kid))):s
Type Soundness
• If a : A 0 [e] then a 0 Term Typ(A)
• This is a big deal!
• Similarity to typing schemes of functional
languages
Ambiguity
• Lexical syntactic ambiguity: an expression has two
lexical entries with different syntactic categories (kiss)
• Lexical semantical ambiguity: two different lambda-terms
assigned to the same category (bank)
• Vagueness: sister-in-law, glove
• Negation test:
– Gerry went to the bank.
– No, he didn’t, he went to the river.
– Robin is wearing a glove.
– * No he isn’t, that is a left glove.
Derivational Ambiguity – two parse trees for the same set of words having the same lexical entries
pyramid
pyr:n
near
near:n\n/np
the
box
on the table
L:np/n
box:n
on(L(table)):n\n
L(box):np
near(L(box)):n\n
near(L(box))(pyr):n
on(L(table))(near(L(box))(pyr)):n
pyramid
pyr:n
near
near:n\n/np
the
L:np/n
box
on the table
box:n
on(L(table)):n\n
on(L(table))(box):n
L(on(L(table))(box)):n
near(on(L(table))(box)):n\n
near(on(L(table))(box))(pyr):n\n
Local and Global Ambiguity
• Local ambiguity – a subexpression is ambiguous
– The tall kid in Pittsburg run
– The horse raced past the barn fell.
– The cotton clothing is made with comes from Egypt.
• garden-path effect in psycholinguistics
Meaning postulates
red
car
red:n/n
car:n
in Chester
in(chs):n\n
red(car):n
in(chs)(red(car)):n
red
red:n/n
car
in Chester
car:nn
in(chs):n\n
in(chs)(car):n
red(in(chs)(car)):n
red= P. x.P(x) and red2(x)
in = y. P. x.P(x) and in2 (y)(x)
red(in(chs)(car))=x.((car(x) and in2 (chs)(x)) and red2 (x))
in(chs)(red(car))=x.((car(x) and red2 (x)) and in2 (chs)(x))
Coordination
Terry
t:np
jumps
and
jump:np\s
Francis
CoorBool(and):s\s/s
f:np
runs
run:np\s
run(f):s
jump(t):s
and(jump(t))(run(f)):s
Francis
jumps
f:np
and
jump:np\s
CoorInd->Bool(and)::
(np\s)\(np\s)/(np\s)
Lx.and(jump(x))(run(x)):np\s
and(jump(f))(run(f)):s
Coorp(and):A\A/A
runs
run:np\s