lin3021 formal semantics lecture 3

Click here to load reader

Upload: tass

Post on 25-Feb-2016

53 views

Category:

Documents


0 download

DESCRIPTION

LIN3021 Formal Semantics Lecture 3. Albert Gatt. Aims. This lecture is divided into two parts: We make our first attempts at formalising the notion of compositionality. First, we’ll do it by providing a compositional interpretation of a couple of formal languages. - PowerPoint PPT Presentation

TRANSCRIPT

LIN3021 Formal Semantics Lecture 1

Albert GattLIN3021 Formal SemanticsLecture 3AimsThis lecture is divided into two parts:

We make our first attempts at formalising the notion of compositionality.First, well do it by providing a compositional interpretation of a couple of formal languages.

Well then look at Natural Language, and ask how we can model meaning in the same sort of way.Syntax and semantics of formal systemsIn defining a compositional semantics for formal languages like Propositional Logic, we:Specify the syntax using a set of recursive rules of the following kind:If is a wff then = C() is a wff.where C is some unary syntactic operation, such as logical negationIf is a wff and is a wff, then = F(, ) is a wff.where F is some binary syntactic operation, such as logical conjunction

Specify the semantics using recursive rules that correspond to the syntax:If is interpreted as [[]], then then = C() is interpreted as M([[]]) where M is a semantic operation corresponding to CIf is interpreted as [[]] and is interpreted as [[]], then = F(, ) is interpreted as [[]] = G([[]], [[]])where G is a semantic operation corresponding to F.

NB: this is not too different from the way we proceeded in describing the semantics of simple predicative expressions last week.

Part 1Compositional semantics for propositional logic Basic vocabularyWe assume infinitely many propositional variables for atomic propositions:p, q, r, s, t,, p1, q1, r1, s1,

We also have the logical connectives:, , , ->,

We also need the two parentheses ( and )

No other symbol belongs to propositional logic.Syntactic rulesEvery propositional variable is a wffthus, p is a formula of propositional logicso is q, r etc

If is a wff and is a wff, then the following are also wffs:( )( )( )( )

Only expressions constructed by these rules are wffs.

If is a wff then = C() is a wff.If is a wff and is a wff, then = F(, ) is a wff.The semantics of Propositional LogicIn Propositional Logic, were only dealing with atomic statements and combinations thereof (were not looking at the structure of those statements)All we can do with statements is assign them a true or false interpretation.So our semantic rules must:Specify the truth value of the atomic statementsSpecify the way that complex statements can be evaluated as a function of their structure.Let f be a function which assigns each atomic statement a truth value 1 (true) or 0 (false).

Semantic rulesSyntaxSemanticsEvery prop. variable is a wff.If is a wff and is a wff, then the following are also wffs:( )( )( )( )Only expressions constructed by these rules are wffs.

If is a wff, then [[]] = f()If is a wff and is a wff, then:

[[]] = 0 if [[]=1; 1 otherwise.[[( )]] = 1 iff [[]] = 1 and [[]] = 1[[( )]] =1 iff [[]] = 1 or [[]] = 1[[( )]] = 1 iff [[]] = 0 or [[]] = 1[[ ]] = 1 iff [[]] = [[]]

Note: these semantic rules basically describe the structure of the truth tables for the connectives.If is interpreted as [[]], then then = C() is interpreted as M([[]]) If is interpreted as [[]] and is interpreted as [[]], then = F(, ) is interpreted as [[]] = G([[]], [[]])Using the rules for compositional interpretationIn logic, every formula is unambiguous, i.e. can be assigned a unique derivation tree (compare this to NL).This means the semantic rules can operate unambiguously as well.Example: (p q)(p q) (syn. 2a)(p q) (syn. 2c)q (syn. 1)p(syn. 1)0 (sem. 2a)1 (sem. 2c)1 (sem.1)0 (sem. 1)Part 2Compositional semantics for propositional logicBasic vocabularyindividual constants: a, b, c,individual variables: x, y, zpredicate variables: P, Q, Rquantifiers: ,

Also, from propositional logic:propositional variables: p, q, rlogical connectives: , , , ->, parentheses: ( )Some conventionsWe will use t1, t2, etc to stand for any individual term:a variable; or an individual constant.

We will use Greek letters (, ) to stand for well-formed formulas of predicate logic.Syntactic rulesIf t1, t2, , tn are individual terms, and P is an n-place predicate, then P(t1, t2, , tn) is a wff.

If is a wff and is a wff, then the following are also wffs:( )( )( )( )

If is a wff and v is a variable, then (v) is a wff

If is a wff and v is a variable, then (v) is a wff

Only the formulas constructed with these rules are wffs of predicate logic.

If is a wff then = C() is a wff.If is a wff and is a wff, then = F(, ) is a wff.Semantics of Predicate LogicFor PL, we need to deal with variables and other individual terms. So its crucial to specify a model:M = whereU is our domain of individuals (what our variables range over)I is our interpretation function

Well use last weeks model as our example:U = {Isabel Osmond, Emma Bovary, Alexander Portnoy, Beowulf}

We also need to introduce a variable assignment function (denoted g).Roughly, this is just a function that, given a domain U, assigns each variable in a formula some value in U.

Variable assignmentsConsider:x.clever(x)Some x is clever.x stands for some individual in the domain U.To determine whether this is true, we need to determine some value for x there must be at least one which makes the formula come out true.Suppose our model stipulates that:[[clever]]M = {A. Portnoy, E. Bovary, I. Osmond}If we start with x = Beowulf, then the formula is false.We need to test alternative values of x while were interpreting the formula.Semantic rulesIf is a constant, then [[]]M,g = I()Constants are fixed by our interpretation function

If is a variable, then [[]]M,g = g()Variables are assigned by our variable assignment function

If P is an n-ary predicate and t1,...,tn are terms, then [[P(t1,...,tn)]] = 1 iff [[P]]M,gPredicates are interpreted as ordered n-tuples

If is a wff and is a wff, then:[[]]M,g = 1 iff [[]]M,g = 0[[ ]]M,g = 1iff [[]]M,g = 1 and [[]]M,g =1[[ ]]M,g =1 iff [[]]M,g = 1 or [[]]M,g =1[[ ]]M,g = 1 iff [[]]M,g = 0 or [[]]M,g =1[[ ]]M,g = 1 iff [[]]M,g = [[]]M,g

If is a wff and v is a variable, then [[(v)]]M,g = 1 iff for all x U, [[]]M,g[x/v]= 1

If is a wff and v is a variable, then [[( v)]]M,g = 1 iff there is at least one x U, [[]]M,g[x/v]= 1If is interpreted as [[]], then then = C() is interpreted as M([[]]) If is interpreted as [[]] and is interpreted as [[]], then = F(, ) is interpreted as [[]] = G([[]], [[]])Essentially the same as for propositional logic, but we need to make reference to the model M and the assignment function gA closer look...If is a wff and v is a variable, then [[(v)]]M,g = 1 iff for all x U, [[]]M,g[x/v]= 1If is a wff and v is a variable, then [[( v)]]M,g = 1 iff there is at least one x U, [[]]M,g[x/v]= 1

The notation [[]]M,g[x/v] = 1 can be interpreted as a kind of instruction:Find an assignment function which is identical to the original, except that the value for v is substituted for x.A closer lookOur modelA formulaU = {isabel, emma, Semantics}Constants: [[i]]M = Isabel[[e]]M = Emma[[s]]M = SemanticsPredicates:[[person]]M = {isabel, emma}[[book]]M = {Semantics}[[read]]M = {}Initial variable assignment:g(x) = emma

x[book(x) read(i,x)]Isabel reads a book

Only if x = Semantics is this formula true x[book(x) read(i,x)]book(x) read(i,x)xread(i,x)book(x)bookxxreadiInterpreting the formulaWe proceed bottom-up:[[book]]M,g = Semantics[[x]M,g = emmaTherefore [[book(x)]]M,g = 0

x[book(x) read(i,x)]book(x) read(i,x)xread(i,x)book(x)bookxxreadInterpreting the formulaWe proceed bottom-up:[[book]]M,g = Semantics[[x]M,g = emmaTherefore [[book(x)]]M,g = 0[[read]]M,g = {}[[i]M,g = isabel[[x]]M,g = emmaTherefore [[read(i,x)]]M,g = 0

x[book(x) read(i,x)]book(x) read(i,x)xread(i,x)book(x)bookxxreadInterpreting the formulaWe proceed bottom-up:[[book]]M,g = Semantics[[x]M,g = emmaTherefore [[book(x)]]M,g = 0[[read]]M,g = {}[[i]M,g = isabel[[x]]M,g = emmaTherefore [[read(i,x)]]M,g = 0[[book(x) read(i,x)]]M,g = 0

x[book(x) read(i,x)]book(x) read(i,x)xread(i,x)book(x)bookxxreadThe situation so farWe have a formula where weve set the value for the free variable x using our initial variable assignment g.We know that its value is 0.At this point, we find that the variable is bound by the existential quantifier. And our interpretation rule says:

find some assignment g identical to the original, except that the value for the free variable x is substituted for some other value so that the formula comes out true on this assignment

x[book(x) read(i,x)]book(x) read(i,x)xread(i,x)book(x)bookxxreadThe situation so farClearly, our assignment g doesnt make the formula come out true.Can we find another assignment g identical to g, except that x in g is a different individual, which is a book?g(x) = SemanticsOn this assignment, the formula comes out true.

x[book(x) read(i,x)]book(x) read(i,x)xread(i,x)book(x)bookxxread(The point is that the initial assignment was needed to get us up the tree, but ultimately had no effect on the final interpretation.)In generalTo compositionally interpret Predicate Logic formulas, we need models and explicit consideration of how variables are assigned. Weve seen an example with existential quantification.Things proceed in largely the same way with universal quantification, except that we have to check whether the formula is true for every value of the variable, on a given assignment.