Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Completeness and Expressiveness
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
TRUTH TABLES The general truth tables for each of the connectives tell you the value of any possible statement for each of the connectives. Negation.
Truth-Tables. Recap Deductive Validity We say that an argument is deductively valid when it has the following property: If the premises of the argument.
Logic & Critical Reasoning
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Sentential Logic 2. REVIEW Deductive Validity We say that an argument is deductively valid when it has the following property: If the premises of the.
Prof. Shachar Lovett Clicker frequency: CA CSE 20 Discrete math Prof. Shachar Lovett
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
Sentential Logic. One of our main critical thinking questions was: Does the evidence support the conclusion? How do we evaluate whether specific evidence.
Logic Concepts Lecture Module 11.
Knowledge Representation Methods
Brief Introduction to Logic. Outline Historical View Propositional Logic : Syntax Propositional Logic : Semantics Satisfiability Natural Deduction : Proofs.
Today’s Topics n Review Logical Implication & Truth Table Tests for Validity n Truth Value Analysis n Short Form Validity Tests n Consistency and validity.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Logic: Connectives AND OR NOT P Q (P ^ Q) T F P Q (P v Q) T F P ~P T F
Review Test 5 You need to know: How to symbolize sentences that include quantifiers of overlapping scope Definitions: Quantificational truth, falsity and.
CPSC 322, Lecture 21Slide 1 Bottom Up: Soundness and Completeness Computer Science cpsc322, Lecture 21 (Textbook Chpt 5.2) March, 5, 2010.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Let remember from the previous lesson what is Knowledge representation
EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 6 Limitations of propositional logic Introduction to predicate logic Symbols, terms and formulae, Parse.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
1 Section 3.3 Mathematical Induction. 2 Technique used extensively to prove results about large variety of discrete objects Can only be used to prove.
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Intro to Discrete Structures
Truth-Tables. Midterm Grades Grade Distribution.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Pattern-directed inference systems
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity MATH Some Formal Logic (which is really.
Predicate Logic. TRUTH-TABLE REMINDERS The problem people had the most trouble with was 1e: construct a truth-table for: (P & (~Q & R)) Many of you only.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Logic Review. FORMAT Format Part I 30 questions 2.5 marks each Total 30 x 2.5 = 75 marks Part II 10 questions Answer only 5 of them! Total 5 x 5 marks.
Course Overview and Road Map Computability and Logic.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CSE Winter 2008 Introduction to Program Verification January 31 proofs through simplification.
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
Propositional Logic. Propositions Any statement that is either True (T) or False (F) is a proposition Propositional variables: a variable that can assume.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
CS6133 Software Specification and Verification
1 Propositional Logic Introduction. 2 What is propositional logic? Propositional Logic is concerned with propositions and their interrelationships. 
Computer Science CPSC 322 Lecture 22 Logical Consequences, Proof Procedures (Ch 5.2.2)
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
Of 38 lecture 13: propositional logic – part II. of 38 propositional logic Gentzen system PROP_G design to be simple syntax and vocabulary the same as.
Incompleteness. System Relativity Soundness and completeness are properties of particular logical systems. There’s no sense to be made of the claim that.
Metalogic. TWO CONCEPTIONS OF LOGICAL CONSEQUENCE.
Sentential Logic.
Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Logic: Proof procedures, soundness and correctness CPSC 322 – Logic 2 Textbook §5.2 March 7, 2011.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
Types and Programming Languages Lecture 3 Simon Gay Department of Computing Science University of Glasgow 2006/07.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
More Proofs. REVIEW The Rule of Assumption: A Assumption is the easiest rule to learn. It says at any stage in the derivation, we may write down any.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Chapter Eight Predicate Logic Semantics. 1. Interpretations in Predicate Logic An argument is valid in predicate logic iff there is no valuation on which.
Artificial Intelligence Logical Agents Chapter 7.
Chapter 1 Logic and proofs
ARTIFICIAL INTELLIGENCE
Natural Deduction.
Midterm Discussion.
Computer Security: Art and Science, 2nd Edition
Search techniques.
Presentation transcript:

Metalogic Soundness and Completeness

Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability: From the premises, the conclusion can be derived by the rules of inference of the system.

Two Notions of Logical Consequence Symbol for validity: ⊨ Example: Q ⊨ (P → Q) Symbol for provability: ⊢ Example: Q ⊢ (P → Q)

Two Questions about Equivalence Soundness: Is it always true that if φ ⊢ ψ, then φ ⊨ ψ ? Completeness: Is it always true that if φ ⊨ ψ, then φ ⊢ ψ ?

Soundness

Soundness: Is it always true that if φ ⊢ ψ, then φ ⊨ ψ ? Why are we interested in soundness? (What’s wrong with a system that proves false things from true premises?)

Proving Soundness It’s not possible to prove that all logical systems are sound. Sometimes (as with arithmetic) we just assume they are. But it’s nice to have a proof!

The Rule of Assumption: A Assumption is the easiest rule to learn. It says at any stage in the derivation, we may write down any WFF we want to. That WFF only depends on itself. For example, on line 57 we might write: (((P ↔ (A & B)) → ~~~R)A

Turnstile The proper way to read this is “line 57 is provable from line 57” or “On the assumption that (((P ↔ (A & B)) → ~~~R) it can be proved that (((P ↔ (A & B)) → ~~~R).” We can re-write any line to state preciesely what we have proved. Line 57 would be: (((P↔(A & B))→~~~R) Ⱶ (((P↔(A & B))→~~~R)

Proving Assumption is Sound A sound rule is one where the truth of the premises guarantees the truth of the conclusion. Is it always true that if φ ⊢ φ, then φ ⊨ φ ?

&-Elimination: &E &E is also a very easy-to-learn rule. If we have proved (φ & ψ) on some line, then on any future line we may write down φ, and on any future line we may write down ψ. The result depends on everything (φ & ψ) depended on.

Moving Pieces The &E rule introduces a new feature: dependencies. To get the soundness proof correct, we have to track them.

&E So what does this mean: “If we have proved (φ & ψ) on some line…” ? It means that some line of our proof looks like this: χ1, χ2,…, χn ⊢ (φ & ψ)

&E And this means? “then on any future line we may write down φ, and on any future line we may write down ψ. The result depends on everything (φ & ψ) depended on.”

&E It means that these are allowable future lines: χ1, χ2,…, χn ⊢ φ χ1, χ2,…, χn ⊢ ψ

&E So here’s our rule again: When we have proved: χ1, χ2,…, χn ⊢ (φ & ψ) Then we can prove: χ1, χ2,…, χn ⊢ φ χ1, χ2,…, χn ⊢ ψ

Mathematical Induction In mathematical induction we prove that 0 has some property. Then we prove that if every number before x has that property, then x has that property too. Then we conclude that all numbers have that property.

Mathematical Induction When you begin a proof (on line 0), the only possible thing to write down are your assumptions. All the other rules require that you’ve already proved something. But we know that line 0 is sound, because we’ve already shown assumption is sound.

Mathematical Induction We know that line 0 is sound. We assume that all lines before x are sound. We prove that x then must be sound as well. We conclude that all lines are sound.

&E So here’s our rule again: When we have proved: χ1, χ2,…, χn ⊢ (φ & ψ) Then we can prove: χ1, χ2,…, χn ⊢ φ χ1, χ2,…, χn ⊢ ψ Assume this line (and those before it) are sound. Prove that future lines like these are sound.

&E So here’s our rule again: When we have proved: χ1, χ2,…, χn ⊢ (φ & ψ) Then we can prove: χ1, χ2,…, χn ⊢ φ χ1, χ2,…, χn ⊢ ψ Assume that if χ1, χ2,…, χn are all true, then (φ & ψ) is. Prove that if χ1, χ2,…, χn are all true, then φ is.

Soundness for &E Prove that if χ1, χ2,…, χn are all true, then φ is. OK, assume for conditional proof that χ1, χ2,…, χn are all true. Now, since we are also assuming that if χ1, χ2,…, χn are all true, then (φ & ψ) is. Thus it follows that (φ & ψ) is true.

Conjunction φψ(φ & ψ) TTT TFF FTF FFF

Finish the Induction We have to do similar proofs for all the rules, because we have to show on any future allowable line, it’s still sound if all the earlier ones were.

→I If on some line you have assumed φ, And on some other line you have proved ψ, And ψ depends on your assumption φ, Then on any future line you may write (φ → ψ), Depending on everything ψ depended on Except φ.

→I When we have assumed: φ ⊢ φ And we have proved χ1, χ2,…, χn, φ ⊢ ψ Then we can prove: χ1, χ2,…, χn ⊢ ( φ → ψ) Assume these lines (and those before them) are sound. Prove this line is sound.

Soundness for →I Prove that if χ1, χ2,…, χn are all true, then (φ → ψ) is. OK, assume for conditional proof that χ1, χ2,…, χn are all true. We are also assuming that if χ1, χ2,…, χn and φ are all true, then ψ is. That is, it can’t be true that χ1, χ2,…, χn AND that φ, but not-ψ.

The Material Conditional φψ(φ → ψ) TTT TFF FTT FFT

The Material Conditional φψ(φ → ψ) TTT TFF FTT FFT

~I I won’t cover all the rules in class. But let’s look at one more, ~I. If on some line you have proved (φ & ~φ), And it depends on ψ, Then on any future line you may write ~ψ, Depending on everything (φ & ~φ) depended on, Except ψ.

~I When have proved: χ1, χ2,…, χn, ψ ⊢ ( φ & ~φ) Then we can prove: χ1, χ2,…, χn ⊢ ~ψ

Assume that if χ1, χ2,…, χn, ψ are all true, then ( φ & ~φ) is also true. Prove that if χ1, χ2,…, χn are all true, ~ψ is true. Assume χ1, χ2,…, χn are all true. Then if ψ is true, then ( φ & ~φ) is also true. But ( φ & ~φ) is never true. So ψ must be false.

Negation φ~φ~φ TF FT

Soundness of 1 st Order Logic Another logic for which soundness is provable is 1 st order logic (or predicate logic). This is a more expressive logic. There are valid arguments in English that don’t come out as valid in the propositional calculus.

Examples Premise: Every chicken is a bird. Premise: Every bird is an animal. Conclusion: Every chicken is an animal. Premise: No one comes to class on Saturday. Conclusion: Michael doesn’t come to class on Saturday.

First-Order Logic Individual constants: a, b, c, … Variables: x, y, z, … Predicate letters: F, G, H, … Sentential connectives: ~, &, v,,→, ↔ Quantifiers: ∃ and ∀

First-Order Logic Syntax Definition of TERMs: If ξ is an individual constant or a variable, then ξ is a TERM. Nothing else is a TERM.

First-Order Logic Syntax Definition of WFFs. If ξ1, ξ2, … ξn are all TERMs, and Π is a predicate letter, then Πξ1ξ2…ξn is a WFF. If φ is a WFF and ξ is a variable, then ∃ ξφ and ∀ ξφ are WFFs. If φ and ψ are WFFs, then (φ & ψ), (φ v ψ), (φ → ψ), (φ ↔ ψ) are also WFFs. Nothing else is a WFF.

First-Order Logic Semantics We introduce a domain (“universe”) D of individuals. We introduce an assignment function ƒ with the following feature: For any variable ν, ƒ(ν) ϵ D.

First-Order Logic Semantics We introduce an interpretation function μ with the following features: 1. For any individual constant α, μ(α) ϵ D. 2. For any variable ν, μ(ν) = ƒ(ν) 3. For any 1-ary predicate Π, μ(Π) ⊆ D 4. For any 2-ary predicate Π, μ(Π) ⊆ D x D …

First-Order Logic Semantics We introduce an interpretation function μ with the following features: 5. For any WFF of the form Πξ1ξ2…ξn, μ(Πξ1ξ2…ξn) = true iff ϵ μ(Π) 6. For any conjunction (φ & ψ), μ(φ & ψ) = true iff μ(φ) = true and μ(ψ) = true. …

First-Order Logic Semantics We introduce an interpretation function μ with the following features: 6. For any expression of the form ∀ ξφ: μ( ∀ ξφ) = true iff for every interpretation function μ* that coincides completely with μ with the possible exception that μ*(ξ) ≠ μ(ξ) μ*(φ) = true.

Satisfaction Definition M, ƒ ⊨ φ iff μ(φ) = true

Example Let’s consider a model M = where: Suppose D = { Michael, Joe } μ(m) = Michael μ(j) = Joe μ(F) = { Michael } μ(G) = { Michael, Joe }

Consider the formula: ∀ x(Fx & Gx) We want to evaluate it with our model: M, ƒ ⊨ ∀ x(Fx & Gx)

iff μ( ∀ x(Fx & Gx)) = true iff for every interpretation function μ* that coincides completely with μ with the possible exception that μ*(x) ≠ μ(x), μ*(Fx & Gx) = true. iff for every interpretation function μ* that coincides completely with μ with the possible exception that μ*(x) ≠ μ(x), μ*(Fx) = true and μ*(Gx) = true

iff for every interpretation function μ* that coincides completely with μ with the possible exception that μ*(x) ≠ μ(x), μ*(x) ϵ μ*(F) and μ*(x) ϵ μ*(G) iff for every interpretation function μ* that coincides completely with μ with the possible exception that μ*(x) ≠ μ(x), μ*(x) ϵ { Michael } and μ*(x) ϵ { Michael, Joe }

But consider some relevant μ* where μ*(x) = Joe. It’s not true that Joe ϵ { Michael } So it’s not true that M, ƒ ⊨ ∀ x(Fx & Gx)

Sample 1 st Order Rule If on some line you have proven: χ1, χ2,…, χn ⊢ ∀ ξφ Then on any future line you may write: χ1, χ2,…, χn ⊢ φ[α⁄ ξ] Where φ[α⁄ ξ] is the result of replacing every occurrence of ξ in φ with the individual constant α.

Soundness Here we’ll make things simple and just show that if ∀ ξφ is true, then φ[α⁄ ξ] is true (where φ[α⁄ ξ] is the result of replacing every occurrence of ξ in φ with the individual constant α). (Verbal proof.)

Circularity?

Soundness for &E Prove that if χ1, χ2,…, χn are all true, then φ is. OK, assume for conditional proof that χ1, χ2,…, χn are all true. Now, since we are also assuming that if χ1, χ2,…, χn are all true, then (φ & ψ) is. Thus it follows that (φ & ψ) is true.

Soundness for &E Prove that if χ1, χ2,…, χn are all true, then φ is. OK, assume for conditional proof that χ1, χ2,…, χn are all true. Now, since we are also assuming that if χ1, χ2,…, χn are all true, then (φ & ψ) is. Thus it follows that (φ & ψ) is true.

Circularity In order to prove that our logic rules are correct, we seem to be using those very same rules (albeit not formally stated, and not in a rigorous formal system). Can logic really justify itself?

Completeness

Completeness: Is it always true that if φ ⊨ ψ, then φ ⊢ ψ ? Notice that this isn’t the same as saying every valid argument is provable, because that’s impossible. (Why?)

Completeness Why do we want completeness in a system? We know we don’t need anymore rules!

Proving Completeness The Lemmon way, for decidable logics: use the decision procedure as a proof-constructing tool.

Proving Completeness Notice that whenever: φ ⊨ ψ, there is no model M and variable assignment ƒ such that M, ƒ ⊨ (φ & ~ψ). We say then that (φ & ~ψ) is unsatisfiable. Further whenever: φ ⊢ ψ, then: φ, ~ψ ⊢ (χ & ~χ). We say that { φ, ~ψ } is inconsistent. So completeness says: if (φ & ~ψ) is unsatisfiable, then { φ, ~ψ } is inconsistent.

Proving Completeness But this is the same thing as showing that if { φ, ~ψ } is consistent, then (φ & ~ψ) is satisfiable. So standard completeness proofs start with the assumption that { φ, ~ψ } is consistent (for conditional proof), and then try to construct a model that makes (φ & ~ψ) true. General idea: keep adding consistent extensions to { φ, ~ψ }, and use the result as a “model” of itself.