semantics and pragmatics of nlp
play

Semantics and Pragmatics of NLP Klein Propositional Tablaux - PowerPoint PPT Presentation

SPNLP: Propositional Tablaux Lascarides & Semantics and Pragmatics of NLP Klein Propositional Tablaux Outline Drawing Inferences Propositional Tableaux Alex Lascarides & Ewan Klein Summary School of Informatics University of


  1. SPNLP: Propositional Tablaux Lascarides & Semantics and Pragmatics of NLP Klein Propositional Tablaux Outline Drawing Inferences Propositional Tableaux Alex Lascarides & Ewan Klein Summary School of Informatics University of Edinburgh 28 January 2008

  2. SPNLP: Propositional Tablaux Lascarides & Klein Drawing Inferences 1 Outline Drawing Inferences Propositional Tableaux 2 Propositional Tableaux Summary 3 Summary

  3. Taking Stock SPNLP: Propositional Tablaux Lascarides & Klein We have: Outline Drawing Introduced syntax and semantics for FOL plus lambdas. Inferences Propositional Represented FOL formulae and their models in NLTK. Tableaux Shown how to build LFs in a feature-based grammar. Summary We’ve tackled constructing logical form What about interpreting it?

  4. Approach SPNLP: Propositional Tablaux Lascarides & Klein Outline How can we automate the process of drawing Drawing Inferences inferences from LFs? Propositional Tableaux Start with quantifier-free fragment of FOL, i.e., Summary propositional logic. Tableaux method.

  5. Propositional Logic SPNLP: Propositional Tablaux FOL inference is undecidable and practical techniques Lascarides & Klein are complex. Outline Only scratch the surface Drawing Inferences So, we’ll examine inferences involving ¬ , → , ∧ , ∨ . Propositional This is propositional logic. Tableaux Instead of writing: Summary ((( boxer vincent ) ∧ ( happy mia )) ∨ (( ¬ ( boxer vincent )) ∧ ( happy marsellus ))) we write: ( p ∧ q ) ∨ ( ¬ p ∧ r ) Internal structure of atomic FOL formulae isn’t important in propositional logic.

  6. Which Inference Tool? SPNLP: Propositional Tablaux Theorem Provers: Lascarides & Klein Input: formula Outline Drawing Output: formula is valid or formula is not valid. Inferences Propositional Tableaux Model Builders: Summary Input: formula Output: a (usually finite) model that satisfies the formula, or no model if formula is inconsistent. E.g., Prover9 + Mace4

  7. The Tableaux Method SPNLP: Propositional Tablaux Lascarides & Klein Syntactic, but based on clear semantic intuitions. Instructions on what you can write down next, given Outline what you’ve written down so far. Drawing Inferences Instructions preserve truth Propositional and they tend to break down complex formulae into Tableaux simpler ones. Summary Finding a tableaux proof does not depend on human insight. Tableaux systems can in fact be regarded as model building tools.

  8. The Basic Idea SPNLP: Proof by Refutation: Propositional Tablaux Lascarides & 1 To test whether φ is valid (written | = φ ); Klein Assume it’s false; and Outline attempt to generate a contradiction, by using the Drawing instructions on what you can write next. Inferences If you can’t find a contradiction, then you’ve constructed Propositional Tableaux a model for ¬ φ . So ¬ φ is consistent. Summary So φ is not valid, since it’s negation is true in at least one model. 2 Method: break down φ into simpler statements, and look for combination of: p is true p is false for some atomic sentence p .

  9. From Validity to Entailment SPNLP: Propositional Tablaux Lascarides & To test entailment: φ 1 , . . . , φ n | = ψ Klein Outline Use tableau method to test whether there is some M Drawing such that M | = ¬ ( φ 1 ∧ . . . ∧ φ n ) → ψ ) . Inferences Propositional I.e, whether | = ( φ 1 ∧ . . . ∧ φ n ) → ψ . Tableaux Summary This is OK because propositional logic has a Deduction Theorem: φ | = ψ iff | = φ → ψ This doesn’t hold of all logics.

  10. Example: p ∨ ¬ p SPNLP: Propositional Tablaux Lascarides & Klein F ( p ∨ ¬ p ) Outline Drawing Inferences This is our first tableau! Propositional Tableaux F means we want to falsify p ∨ ¬ p Summary Line numbers useful for book-keeping. 1. F ( p ∨ ¬ p )

  11. Continuing with this Example SPNLP: Propositional √ Tablaux F ( p ∨ ¬ p ) 1. Lascarides & 2. Fp 1, F ∨ Klein 3. F ¬ p 1, F ∨ Outline Drawing Inferences Propositional Our second tableaux! Tableaux Uses the tableaux expansion rule called F ∨ (falsify a Summary disjunction) to break down the disjunction in line 1. into pieces. √ shows you have applied the appropriate rule to this line. Never need to apply a rule to the same line twice, which is nice.

  12. And Carrying On SPNLP: Propositional √ Tablaux 1. F ( p ∨ ¬ p ) Lascarides & 2. Fp 1, F ∨ Klein 1, F ∨ , √ 3. F ¬ p Outline 4. Tp 3, F ¬ . Drawing Inferences Propositional Tableaux F ¬ : falsify a negation. Summary We’re finished! The tableau is rule saturated. You can’t apply any more rules. Tableau is also closed. Conflict in lines 2. and 4. So we have proved that p ∨ ¬ p is valid!

  13. Another Example SPNLP: Propositional Tablaux Lascarides & Klein 1. F ¬ ( q ∧ r ) → ( ¬ q ∨ ¬ r ) Outline Drawing Inferences F → tells us how to falsify an implication: Propositional Tableaux √ 1. F ¬ ( q ∧ r ) → ( ¬ q ∨ ¬ r ) Summary 2. T ¬ ( q ∧ r ) 1, F → F ( ¬ q ∨ ¬ r ) 3. 2, F → Line 3. calls for F ∨ (falsify a disjunction) Can do it now! Don’t have to do line 2. first. . .

  14. Example Continued SPNLP: Propositional Tablaux Lascarides & √ Klein 1. F ¬ ( q ∧ r ) → ( ¬ q ∨ ¬ r ) Outline 2. T ¬ ( q ∧ r ) 1, F → 2, F → , √ Drawing 3. F ( ¬ q ∨ ¬ r ) Inferences 3, F ∨ , √ F ¬ q 4. Propositional 3, F ∨ , √ Tableaux 5. F ¬ r Summary 6. Tq 4, F ¬ 7. Tr 5, F ¬ Now deal with line 2

  15. Example Continued SPNLP: Propositional Tablaux √ 1. F ¬ ( q ∧ r ) → ( ¬ q ∨ ¬ r ) Lascarides & 1, F → , √ Klein 2. T ¬ ( q ∧ r ) 2, F → , √ Outline 3. F ( ¬ q ∨ ¬ r ) 3, F ∨ , √ Drawing 4. F ¬ q Inferences 3, F ∨ , √ 5. F ¬ r Propositional Tableaux 6. Tq 4, F ¬ Summary 7. Tr 5, F ¬ 8. F ( q ∧ r ) 2, T ¬ But there are two ways of falsifying q ∧ r : q is false or r is false.

  16. Example Continued SPNLP: Propositional √ Tablaux 1. F ¬ ( q ∧ r ) → ( ¬ q ∨ ¬ r ) 1, F → , √ Lascarides & 2. T ¬ ( q ∧ r ) Klein 2, F → , √ 3. F ( ¬ q ∨ ¬ r ) 3, F ∨ , √ Outline 4. F ¬ q 3, F ∨ , √ Drawing F ¬ r Inferences 5. Propositional 6. Tq 4, F ¬ Tableaux 7. Tr 5, F ¬ Summary 8. F ( q ∧ r ) 2, T ¬ 9. 8, F ∧ 8, F ∧ Fq Fr Finished! Tableau is rule saturated. ¬ ( q ∧ r ) → ( ¬ q ∧ ¬ r ) is valid! Tableau is closed.

  17. Tableau as a Model Builder SPNLP: Propositional √ Tablaux F ( p ∧ q ) → ( r ∨ s ) 1. 1, F → , √ Lascarides & 2. T ( p ∧ q ) Klein 1, F → , √ 3. F ( r ∨ s ) Outline 4. Tp 2, T ∧ Drawing Inferences 5. Tq 2, T ∧ Propositional 6. Fr 3, F ∨ Tableaux 7. Fs 3, F ∨ Summary Tableau is rule saturated but not closed. So ( p ∧ q ) → ( r ∨ s ) is not valid. In fact, tableau tells us how to make it false! p is true; q is true; r is false; s is false.

  18. The Instructions SPNLP: T ∧ : T ( φ ∧ ψ ) F ∧ : F ( φ ∧ ψ ) Propositional Tablaux T φ F φ F ψ Lascarides & T ψ Klein Outline T ¬ : T ¬ φ F ¬ : F ¬ φ Drawing F φ T φ Inferences Propositional Tableaux F ∨ : F ( φ ∨ ψ ) T ∨ : T ( φ ∨ ψ ) Summary F φ T φ T ψ F ψ F → : F ( φ → ψ ) T → : T ( φ → ψ ) T φ F φ T ψ F ψ Keep applying rules until tableau is rule saturated.

  19. Tableaux are Trees SPNLP: Propositional Tablaux Lascarides & Klein A (propositional) tableau is a tree; Outline each node is a signed (propositional) formula. Drawing Inferences A branch of a tableau is a branch of the tree. Propositional Tableaux expansion: Tableaux 1 Find a node that: Summary isn’t a signed atomic formula (not Fp or Tp ) 1 hasn’t had an expansion rule applied to it 2 2 Expand it according to the rules! 3 Keep going until tree is rule saturated.

  20. Closed and Open Tableaux SPNLP: Propositional Tablaux Lascarides & Klein A branch of a tableau is closed if it contains T φ and F φ . Outline A tableau is closed if all its branches are closed. Drawing It is open if at least one of its branches is open (i.e., not Inferences closed). Propositional Tableaux Summary Provability: A formula φ is provable (written ⊢ φ ) iff it is possible to expand the initial tableau F φ to a closed tableau.

  21. Testing Entailment (or Uninformativity) SPNLP: Propositional Tablaux Does φ 1 , . . . , φ n | = ψ ? Lascarides & Klein Start with: Outline T φ 1 Drawing . Inferences . . Propositional Tableaux T φ n Summary F ψ If this expands to a closed tableau, then the argument is valid. Or to put it another way: ψ is uninformative with respect to φ 1 , . . . , φ n

  22. Soundness and Completeness SPNLP: Propositional Tablaux Lascarides & Klein The tableaux system is sound: Outline Drawing If ⊢ φ then | = φ Inferences Propositional That is, you can’t prove something that’s not valid. Tableaux The tableaux system is complete: Summary If | = φ then ⊢ φ That is, every valid formula has a proof.

Recommend


More recommend