1 / 24

LIN3021 Formal Semantics Lecture 3

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.

tass
Télécharger la présentation

LIN3021 Formal Semantics Lecture 3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. LIN3021 Formal SemanticsLecture 3 Albert Gatt

  2. 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. • We’ll then look at Natural Language, and ask how we can model meaning in the same sort of way.

  3. Syntax and semantics of formal systems • In 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 negation • If α 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 C • If α 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.

  4. Part 1 Compositional semantics for propositional logic

  5. Basic vocabulary • We 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.

  6. If α is a wff then γ = C(α) is a wff. • If α is a wff and β is a wff, then γ = F(α, β) is a wff. Syntactic rules • Every propositional variable is a wff • thus, p is a formula of propositional logic • so 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 wff’s.

  7. The semantics of Propositional Logic • In Propositional Logic, we’re only dealing with atomic statements and combinations thereof • (we’re 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 statements • Specify 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).

  8. 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([[α]], [[β]]) Semantic rules Syntax Semantics Every 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 wff’s. 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.

  9. Using the rules for compositional interpretation • In 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) 0 (sem. 2a) (p q) (syn. 2c) 1 (sem. 2c) q (syn. 1) 1 (sem.1) p(syn. 1) 0 (sem. 1)

  10. Part 2 Compositional semantics for propositional logic

  11. Basic vocabulary • individual constants: a, b, c,… • individual variables: x, y, z… • predicate variables: P, Q, R… • quantifiers: ,  Also, from propositional logic: • propositional variables: p, q, r… • logical connectives: ¬, , , ->,  • parentheses: ( )

  12. Some conventions • We 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.

  13. If α is a wff then γ = C(α) is a wff. • If α is a wff and β is a wff, then γ = F(α, β) is a wff. Syntactic rules • If t1, t2, …, tnare 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 wff’s of predicate logic.

  14. Semantics of Predicate Logic • For PL, we need to deal with variables and other individual terms. So it’s crucial to specify a model: • M = <U,I> where • U is our domain of individuals (what our variables range over) • I is our interpretation function • We’ll use last week’s 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.

  15. Variable assignments • Consider: • 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 we’re interpreting the formula.

  16. 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([[α]], [[β]]) Semantic rules • If α 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,...,tnare terms, then [[P(t1,...,tn)]] = 1 iff <[[t1]]M,g,...,[[tn]]M,g>  [[P]]M,g • Predicates 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]= 1 Essentially the same as for propositional logic, but we need to make reference to the model M and the assignment function g

  17. A 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]= 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]= 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.

  18. A closer look Our model A formula U = {isabel, emma, Semantics} Constants: [[i]]M = Isabel [[e]]M = Emma [[s]]M = Semantics Predicates: [[person]]M = {isabel, emma} [[book]]M= {Semantics} [[read]]M= {<isabel,Semantics>} 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)] x book(x)  read(i,x) book(x) read(i,x) i read x book x

  19. Interpreting the formula We proceed bottom-up: • [[book]]M,g = Semantics • [[x]M,g = emma • Therefore [[book(x)]]M,g= 0 x[book(x)  read(i,x)] x book(x)  read(i,x) book(x) read(i,x) read x book x

  20. Interpreting the formula We proceed bottom-up: • [[book]]M,g = Semantics • [[x]M,g = emma • Therefore [[book(x)]]M,g= 0 • [[read]]M,g = {<isabel,Semantics>} • [[i]M,g = isabel • [[x]]M,g = emma • Therefore [[read(i,x)]]M,g = 0 x[book(x)  read(i,x)] x book(x)  read(i,x) book(x) read(i,x) read x book x

  21. Interpreting the formula We proceed bottom-up: • [[book]]M,g = Semantics • [[x]M,g = emma • Therefore [[book(x)]]M,g= 0 • [[read]]M,g = {<isabel,Semantics>} • [[i]M,g = isabel • [[x]]M,g = emma • Therefore [[read(i,x)]]M,g = 0 • [[book(x)  read(i,x)]]M,g = 0 x[book(x)  read(i,x)] x book(x)  read(i,x) book(x) read(i,x) read x book x

  22. The situation so far • We have a formula where we’ve 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)] x book(x)  read(i,x) book(x) read(i,x) read x book x

  23. The situation so far • Clearly, our assignment g doesn’t 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) = Semantics • On this assignment, the formula comes out true. x[book(x)  read(i,x)] x book(x)  read(i,x) book(x) read(i,x) read x book x (The point is that the initial assignment was needed to get us up the tree, but ultimately had no effect on the final interpretation.)

  24. In general • To compositionally interpret Predicate Logic formulas, we need models and explicit consideration of how variables are assigned. • We’ve 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.

More Related