Lecture 2. Soundness and completeness of propositional logic

Σχετικά έγγραφα
C.S. 430 Assignment 6, Sample Solutions

Every set of first-order formulas is equivalent to an independent set

2 Composition. Invertible Mappings

Fractional Colorings and Zykov Products of graphs

CRASH COURSE IN PRECALCULUS

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

EE512: Error Control Coding

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Homework 3 Solutions

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

The Simply Typed Lambda Calculus

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

Sequent Calculi for the Modal µ-calculus over S5. Luca Alberucci, University of Berne. Logic Colloquium Berne, July 4th 2008

Section 8.3 Trigonometric Equations

Finite Field Problems: Solutions

Statistical Inference I Locally most powerful tests

Finitary proof systems for Kozen s µ

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

Example Sheet 3 Solutions

Concrete Mathematics Exercises from 30 September 2016

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Section 9.2 Polar Equations and Graphs

2. Let H 1 and H 2 be Hilbert spaces and let T : H 1 H 2 be a bounded linear operator. Prove that [T (H 1 )] = N (T ). (6p)

LAP 2013 Problems in formulating the consecution calculus of contraction less relevant logics

ST5224: Advanced Statistical Theory II

Tridiagonal matrices. Gérard MEURANT. October, 2008

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Simulation of G i with prenex cuts

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Areas and Lengths in Polar Coordinates

derivation of the Laplacian from rectangular to spherical coordinates

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

Models for Probabilistic Programs with an Adversary

Problem Set 3: Solutions

Uniform Convergence of Fourier Series Michael Taylor

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

Chapter 3: Ordinal Numbers

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

Fourier Series. MATH 211, Calculus II. J. Robert Buchanan. Spring Department of Mathematics

Srednicki Chapter 55

Solutions to Exercise Sheet 5

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Areas and Lengths in Polar Coordinates

Bounding Nonsplitting Enumeration Degrees

ORDINAL ARITHMETIC JULIAN J. SCHLÖDER

PARTIAL NOTES for 6.1 Trigonometric Identities

Other Test Constructions: Likelihood Ratio & Bayes Tests

Section 7.6 Double and Half Angle Formulas

Abstract Storage Devices

Math221: HW# 1 solutions

Math 446 Homework 3 Solutions. (1). (i): Reverse triangle inequality for metrics: Let (X, d) be a metric space and let x, y, z X.

b. Use the parametrization from (a) to compute the area of S a as S a ds. Be sure to substitute for ds!

Simulating non-prenex cuts in quantified propositional calculus

4.6 Autoregressive Moving Average Model ARMA(1,1)

Inverse trigonometric functions & General Solution of Trigonometric Equations

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

The challenges of non-stable predicates

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

Second Order Partial Differential Equations

Συστήματα Διαχείρισης Βάσεων Δεδομένων

Trigonometry 1.TRIGONOMETRIC RATIOS

Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2)

Lecture 15 - Root System Axiomatics

If we restrict the domain of y = sin x to [ π, π ], the restrict function. y = sin x, π 2 x π 2

5. Choice under Uncertainty

A Conception of Inductive Logic: Example

A Note on Intuitionistic Fuzzy. Equivalence Relation

New bounds for spherical two-distance sets and equiangular lines

Matrices and Determinants

Practice Exam 2. Conceptual Questions. 1. State a Basic identity and then verify it. (a) Identity: Solution: One identity is csc(θ) = 1

If we restrict the domain of y = sin x to [ π 2, π 2

Homework 8 Model Solution Section

Reminders: linear functions

The Pohozaev identity for the fractional Laplacian

LTL to Buchi. Overview. Buchi Model Checking LTL Translating LTL into Buchi. Ralf Huuck. Buchi Automata. Example

CHAPTER 48 APPLICATIONS OF MATRICES AND DETERMINANTS

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

Approximation of distance between locations on earth given by latitude and longitude

Formal Semantics. 1 Type Logic

Completeness Theorem for System AS1

Trigonometric Formula Sheet

TMA4115 Matematikk 3

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Pg The perimeter is P = 3x The area of a triangle is. where b is the base, h is the height. In our case b = x, then the area is

Numerical Analysis FMN011

( y) Partial Differential Equations

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

Lecture 34 Bootstrap confidence intervals

MINIMAL CLOSED SETS AND MAXIMAL CLOSED SETS

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006

Theorem 8 Let φ be the most powerful size α test of H

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

D Alembert s Solution to the Wave Equation

de Rham Theorem May 10, 2016

Problem Set 9 Solutions. θ + 1. θ 2 + cotθ ( ) sinθ e iφ is an eigenfunction of the ˆ L 2 operator. / θ 2. φ 2. sin 2 θ φ 2. ( ) = e iφ. = e iφ cosθ.

The Probabilistic Method - Probabilistic Techniques. Lecture 7: The Janson Inequality

Transcript:

Lecture 2 Soundness and completeness of propositional logic February 9, 2004 1

Overview Review of natural deduction. Soundness and completeness. Semantics of propositional formulas. Soundness proof. Completeness proof. 2

Propositional formulas Grammar: φ ::= p ( φ) (φ φ) (φ φ) (φ φ) Precedence rules: >, > Example: (p ((q ( r)) q)) p (q r q) 3

Natural deduction Rules for reasoning about formulas. Introduction rules: Connective in the conclusion. Example: φ. ψ -i φ ψ Elimination rules: Connective in a premise. Example: φ φ ψ ψ -e 4

Basic rules Introduction φ ψ -i φ ψ φ ψ φ Elimination φ ψ -e 1 ψ -e 2 φ φ ψ -i 1 ψ φ ψ -i 2 φ ψ φ. χ ψ. χ -e χ φ. ψ -i φ φ ψ ψ -e φ ψ φ. -i φ φ -e φ no rule φ -e φ φ -e 5

Sequents φ 1,..., φ n ψ Formula ψ can be proved from formulas φ 1,..., φ n. Use introduction rules to construct the goal formula. Use elimination rules to extract information from the premises. Example: p q, r s p r q s Introduction Elimination φ φ ψ -i 1 ψ φ ψ -i 2 φ ψ φ. χ ψ. χ -e χ φ. ψ -i φ φ ψ ψ -e φ ψ 6

Proof 1. p r assumption 2. p assumption 3. p q premise 4. q -e : 2, 3 5. q s -i 1 : 4 6. r assumption 7. r s premise 8. s -e : 6, 7 9. q s -i 2 : 8 10. q s -e : 2 9 11. p r q s -i : 1 10 Observe: -i 1 used in first subproof. -i 2 used in second subproof. Rules and proof steps must match exactly. What can be proved, given this constraint? 7

Reasoning vs. reality Reasoning: argument based on observations and derivational rules. Reality: reality. How does reasoning relate to reality? Soundness: reasoning derives only true statements. Completeness: reasoning derives all true statements. 8

Soundness, completeness, and auto mechanics Reality: the fan belt is broken. Mechanics diagnosis: 9

Soundness, completeness, and propositional logic For natural deduction, Soundness: a formula that is provable is true. Completeness: every true formula is provable. What is a true formula? 10

Semantics A formula is either true T or false F. The meaning depends on the meaning of the subterms. Examples: [[φ]] = T implies [[ φ]] = F [[p]] = T and [[q]] = F implies [[p q]] = T 11

Truth tables The value of a formula for all possible inputs. Basic connectives: T F φ φ F T T F φ ψ φ ψ T T T T F F F T F F F F φ ψ φ ψ T T T T F T F T T F F F φ ψ φ ψ T T T T F F F T T F F T Other tables define other functions. 12

Meaning of a formula Begin with the meanings of atoms. Compute the value bottom-up. Example: (p q) (p r) p q r p q p r (p q) (p r) T T T T T F T F T T F F F T T F T F F F T F F F Tautology: Always true. Contradiction: always false. 13

Semantic entailment φ 1,... φ n = ψ ψ true when φ 1,... φ n are true. 1. Compute truth tables of the φ 1,... φ n. 2. Collect lines where φ 1,... φ n are all true. 3. Evaluate ψ in these cases. 14

Example p (q r), r, p = q p q r q r p (q r) r p T T T T T F T T T F F F T T T F T T T F T T F F T T T T F T T T T F F F T F F T T F F F T T T F F F F F T T T F All true when [[p]] = T, [[q]] = [[r]] = F. p q r q T F F T Thus, p (q r), r, p = q 15

Soundness and completeness Relate provability to semantic entailment. Soundness: φ 1,..., φ n ψ implies that φ 1,..., φ n = ψ. Completeness: φ 1,..., φ n = ψ implies that φ 1,..., φ n ψ. 16

Soundness Theorem: Let φ 1,..., φ n and ψ be propositional logic formulas. Then, if φ 1,..., φ n ψ, then φ 1,..., φ n = ψ. Proof idea: each proof step is justified by truth tables. 17

Proof: inductive definition φ : premise is a proof of Φ φ, where φ Φ. Let: α i prove Φ φ i β j prove Φ, ψ j χ j For any rule: φ 1... φ m ψ ψ 1. χ 1... ψ n. χ n Then proves Φ ψ. α 1,..., α m, β 1,..., β m, ψ Soundness proof: by induction on the structure of the proof of φ 1,..., φ n ψ. 18

Base case Proof: φ : premise Proves: Φ φ, where φ Φ Show: Φ = φ Evaluate φ for truth table lines where Φ are all T. Since φ Φ, clearly φ is T. 19

Induction case Proof: α 1,..., α m, β 1,..., β n, ψ Proves: Φ ψ Show: Φ = ψ There is a rule: φ 1... φ m ψ ψ 1. χ 1... ψ n. χ n Induction hypothesis: α i proves Φ φ i implies Φ = φ i. β j proves Φ, ψ j χ j implies Φ, ψ 1 χ j. Proceed by cases on the possible rules. 20

Rule: -i φ ψ φ ψ -i Proof contains: Φ φ, Φ ψ By induction: Φ = φ, Φ = ψ Evaluate φ ψ when [[φ]] = [[ψ]] = T: φ ψ φ ψ T T T Thus, Φ = φ ψ. 21

Rule: -e φ φ -e Proof contains Φ φ, Φ φ By induction: Φ = φ, Φ = φ Truth table for φ Φ never all T. φ φ F T T F Thus, trivially: Φ = NB: Truth table for : F 22

Rule: -e φ -e Proof contains: Φ. By induction: Φ =. Truth table for : Φ never all T. F Thus, trivially: Φ = φ 23

Rule -i φ. ψ -i φ ψ Proof contains: Φ, φ ψ. By induction: Φ, φ = ψ. Show: when Φ all true, so is φ ψ. φ ψ φ ψ T T T T F F φ ψ φ ψ F T T F F T Potential problem when [[φ]] = T and [[ψ]] = F. But, by induction, if Φ all true and [[φ]] = T, then [[ψ]] = T. Thus, Φ = φ ψ. 24

Completeness Theorem: Let φ 1,..., φ n and ψ be propositional logic formulas. Then, if φ 1,..., φ n = ψ, then φ 1,..., φ n ψ. Proof idea: construct a proof from a truth table. 25

Completeness proof structure 1. Eliminate premises: φ 1, φ 2,..., φ n = ψ implies = φ 1 (φ 2... (φ n ψ)). 2. Show provability: = φ 1 (φ 2... (φ n ψ)) implies φ 1 (φ 2... (φ n ψ)). 3. Reintroduce premises: φ 1 (φ 2... (φ n ψ)) implies φ 1, φ 2,..., φ n ψ. 26

Eliminating premises Theorem: If φ 1, φ 2,..., φ n = ψ, then = φ 1 (φ 2... (φ n ψ)). Proof: By induction on n. Base case: n = 0. Clearly = ψ implies = ψ. Induction case: We showed Ψ, φ = ψ implies Ψ = φ ψ. Thus, φ 1, φ 2,..., φ n = ψ implies φ 1,... φ n 1 = φ n ψ. By induction, = φ 1 (φ 2... (φ n ψ)) 27

Showing provability Theorem: Let φ be a formula such that p 1, p 2,..., p n are its only propositional atoms. Let l be any line in φ s truth table. For any atom or formula α, let γ l (α) be α if the truth table entry in line l for α is T, and α if the truth table entry for α is F. Then, γ l (p 1 ), γ l (p 2 ),..., γ l (p n ) γ l (φ) is provable. 28

Example (p r) (q s) A truth table line: p q r s p r q s (p r) (q s) T F T T T F F Constructed sequent: p, q, r, s ((p r) (q s)) Another truth table line: p q r s p r q s (p r) (q s) F T F T F T T Constructed sequent: p, q, r, s (p r) (q s) 29

Proof Induction on the structure of φ. Base case: φ p. Truth table: p T F p T F γ l (p) γ l (p) p p, or p p: Proof of p p: Proof of p p: Thus, γ l (p) γ l (p). 1. p premise 2. p 1 1. p premise 2. p 1 30

Negation φ ψ Possible truth table lines: ψ ψ F T T F If [[ψ]] = F and [[ ψ]] = T: Show γ l (p 1 ), γ l (p 2 ),..., γ l (p n ) ψ By induction, since [[ψ]] = F: γ l (p 1 ), γ l (p 2 ),..., γ l (p n ) ψ 31

Negation, continued If [[ψ]] = T and [[ ψ]] = F: Show γ l (p 1 ), γ l (p 2 ),..., γ l (p n ) ψ By induction, since [[ψ]] = T: γ l (p 1 ), γ l (p 2 ),..., γ l (p n ) ψ To prove γ l (p 1 ), γ l (p 2 ),..., γ l (p n ) ψ: First prove γ l (p 1 ), γ l (p 2 ),..., γ l (p n ) ψ. Use -i. 32

Implication φ φ 1 φ 2 Proof strategy: Consider possible truth values of φ 1 φ 2. Use induction to find proofs of γ l (φ 1 ) and γ l (φ 2 ). Construct a proof of γ l (φ 1 φ 2 ). φ 1 φ 2 φ 1 φ 2 T T T T F F F T T F F T Four lines, so four cases. 33

Use of the induction hypothesis Consider φ 1, φ 2 : Propositional atoms of φ 1 : a 1,..., a x. Propositional atoms of φ 2 : b 1,..., b y. Atoms of φ 1 φ 2 = {a 1,..., a x } {b 1,..., b y }. Thus, a truth table line for φ 1 φ 2 also gives meaning to φ 1 and φ 2. 34

Using the induction hypothesis For a truth table line l for φ 1 φ 2, by induction: γ l (a 1 ),..., γ l (a x ) γ l (φ 1 ) γ l (b 1 ),..., γ l (b y ) γ l (φ 2 ) Our goal: γ l (a 1 ),..., γ l (a x ), γ l (b 1 ),..., γ l (b y ) γ l (φ 1 φ 2 ) Proof structure: Proof of γ l (a 1 ),..., γ l (a x ) γ l (φ 1 ). Proof of γ l (b 1 ),..., γ l (b y ) γ l (φ 2 ). Extend these sequents to include all premises. γ l (φ 1 ) γ l (φ 2 ) : -i Derive γ l (φ 1 φ 2 ) from γ l (φ 1 ) γ l (φ 2 ). 35

Cases φ 1 is T, φ 2 is T, and φ is T: Show φ 1 φ 2 implies φ 1 φ 2. φ 1 is T, φ 2 is F, and φ is F: Show φ 1 φ 2 implies (φ 1 φ 2 ). φ 1 is F, φ 2 is T, and φ is T: Show φ 1 φ 2 implies φ 1 φ 2. φ 1 is F, φ 2 is F, and φ is T: Show φ 1 φ 2 implies φ 1 φ 2. Conjunction and disjunction similar. 36

Combining sequents We have a complete collection of sequents: γ l (p 1 ), γ l (p 2 ),..., γ l (p n ) γ l (φ) Note: = φ implies l.γ l (φ) = φ. We want to prove: φ Proof idea: Use the Law of the Excluded Middle. 37

Example (p q) q Constructed sequents: p, q (p q) q. p, q (p q) q. p, q (p q) q. p, q (p q) q. Consider p, q (p q) q and p, q (p q) q. Proof of p (p q) q: 1. q q LEM 2. q assumption 3 proof of p, q (p q) q 4. q assumption 5 proof of p, q (p q) q 6. (p q) q -e : 1 5 38

Proof idea Goal: Reduce γ l (p 1 ), γ l (p 2 ),..., γ l (p n ) φ to φ. Proof by induction on n. Find pairs of sequents that only differ in γ l (p n ). Use LEM to prove a single sequent without either γ l (p n ) in premises. 39

Reintroducing premises Theorem: If φ 1 (φ 2... (φ n ψ)), then φ 1, φ 2,..., φ n ψ. Proof idea: Convert φ 1 (φ 2... (φ n ψ)) to φ 1 φ 2... (φ n ψ), and proceed by induction. Problem: Theorem not general enough. Restatement: If Φ φ 1 (φ 2... (φ n ψ)), then Φ, φ 1, φ 2,..., φ n ψ. 40

Proof Given a proof of: Φ φ 1 (φ 2... (φ n ψ)) Prove: Φ, φ 1 φ 2... (φ n ψ) Proof of Φ φ 1 (φ 2... (φ n ψ)) φ 1 : premise φ 2... (φ n ψ) : -e By induction, Φ, φ 1, φ 2,..., φ n ψ. Take Φ = to prove the original theorem. 41

Summary: completeness 1. Eliminate premises: φ 1, φ 2,..., φ n = ψ implies = φ 1 (φ 2... (φ n ψ)). 2. Show provability: = φ 1 (φ 2... (φ n ψ)) implies φ 1 (φ 2... (φ n ψ)). 3. Reintroduce premises: φ 1 (φ 2... (φ n ψ)) implies φ 1, φ 2,..., φ n ψ. 42