1. The leves re either lbeled with sentences in ;, or with sentences of the form All X re X. 2. The interior leves hve two children drwn bove them) if

Similar documents
Algebra Review. How well do you remember your algebra?

PROF. BOYAN KOSTADINOV NEW YORK CITY COLLEGE OF TECHNOLOGY, CUNY

Polynomial Functions. Polynomial functions in one variable can be written in expanded form as ( )

LINEAR TRANSFORMATIONS AND THEIR REPRESENTING MATRICES

Example 27.1 Draw a Venn diagram to show the relationship between counting numbers, whole numbers, integers, and rational numbers.

Integration by Substitution

Regular Sets and Expressions

Lecture 5. Inner Product

Homework 3 Solutions

4.11 Inner Product Spaces

MODULE 3. 0, y = 0 for all y

Reasoning to Solve Equations and Inequalities

Math 135 Circles and Completing the Square Examples

Use Geometry Expressions to create a more complex locus of points. Find evidence for equivalence using Geometry Expressions.

5.2. LINE INTEGRALS 265. Let us quickly review the kind of integrals we have studied so far before we introduce a new one.

and thus, they are similar. If k = 3 then the Jordan form of both matrices is

Integration. 148 Chapter 7 Integration

Second Term MAT2060B 1. Supplementary Notes 3 Interchange of Differentiation and Integration

MATH 150 HOMEWORK 4 SOLUTIONS

9 CONTINUOUS DISTRIBUTIONS

Factoring Polynomials

Binary Representation of Numbers Autar Kaw

Or more simply put, when adding or subtracting quantities, their uncertainties add.

Vectors Recap of vectors

SPECIAL PRODUCTS AND FACTORIZATION

FUNCTIONS AND EQUATIONS. xεs. The simplest way to represent a set is by listing its members. We use the notation

Lecture 3 Gaussian Probability Distribution

Example A rectangular box without lid is to be made from a square cardboard of sides 18 cm by cutting equal squares from each corner and then folding

Graphs on Logarithmic and Semilogarithmic Paper

EQUATIONS OF LINES AND PLANES

Treatment Spring Late Summer Fall Mean = 1.33 Mean = 4.88 Mean = 3.

1.00/1.001 Introduction to Computers and Engineering Problem Solving Fall Final Exam

Section 7-4 Translation of Axes

6.2 Volumes of Revolution: The Disk Method

1.2 The Integers and Rational Numbers

9.3. The Scalar Product. Introduction. Prerequisites. Learning Outcomes

Object Semantics Lecture 2

Babylonian Method of Computing the Square Root: Justifications Based on Fuzzy Techniques and on Computational Complexity

A.7.1 Trigonometric interpretation of dot product A.7.2 Geometric interpretation of dot product

Section 5-4 Trigonometric Functions

On decidability of LTL model checking for process rewrite systems

Regular Languages and Finite Automata

3 The Utility Maximization Problem

Econ 4721 Money and Banking Problem Set 2 Answer Key

How fast can we sort? Sorting. Decision-tree model. Decision-tree for insertion sort Sort a 1, a 2, a 3. CS Spring 2009

Solving BAMO Problems

The Velocity Factor of an Insulated Two-Wire Transmission Line

Solution to Problem Set 1

Physics 43 Homework Set 9 Chapter 40 Key

0.1 Basic Set Theory and Interval Notation

Operations with Polynomials

RIGHT TRIANGLES AND THE PYTHAGOREAN TRIPLETS

Basic Analysis of Autarky and Free Trade Models

AA1H Calculus Notes Math1115, Honours John Hutchinson

Chapter 6. Logic and Action. 6.1 Actions in General

COMPARISON OF SOME METHODS TO FIT A MULTIPLICATIVE TARIFF STRUCTURE TO OBSERVED RISK DATA BY B. AJNE. Skandza, Stockholm ABSTRACT

Physics 6010, Fall 2010 Symmetries and Conservation Laws: Energy, Momentum and Angular Momentum Relevant Sections in Text: 2.6, 2.

All pay auctions with certain and uncertain prizes a comment

Appendix D: Completing the Square and the Quadratic Formula. In Appendix A, two special cases of expanding brackets were considered:

Experiment 6: Friction

Mathematics. Vectors. hsn.uk.net. Higher. Contents. Vectors 128 HSN23100

4 Approximations. 4.1 Background. D. Levy

19. The Fermat-Euler Prime Number Theorem

body.allow-sidebar OR.no-sidebar.home-page (if this is the home page).has-custom-banner OR.nocustom-banner .IR OR.no-IR

Helicopter Theme and Variations

One Minute To Learn Programming: Finite Automata

Basically, logarithmic transformations ask, a number, to what power equals another number?

Protocol Analysis / Analysis of Software Artifacts Kevin Bierhoff

CS99S Laboratory 2 Preparation Copyright W. J. Dally 2001 October 1, 2001

Words Symbols Diagram. abcde. a + b + c + d + e

PHY 140A: Solid State Physics. Solution to Homework #2

P.3 Polynomials and Factoring. P.3 an 1. Polynomial STUDY TIP. Example 1 Writing Polynomials in Standard Form. What you should learn

Geometry 7-1 Geometric Mean and the Pythagorean Theorem

10.6 Applications of Quadratic Equations

Java CUP. Java CUP Specifications. User Code Additions You may define Java code to be included within the generated parser:

DATABASDESIGN FÖR INGENJÖRER F

CURVES ANDRÉ NEVES. that is, the curve α has finite length. v = p q p q. a i.e., the curve of smallest length connecting p to q is a straight line.

Redistributing the Gains from Trade through Non-linear. Lump-sum Transfers

Module Summary Sheets. C3, Methods for Advanced Mathematics (Version B reference to new book) Topic 2: Natural Logarithms and Exponentials

. At first sight a! b seems an unwieldy formula but use of the following mnemonic will possibly help. a 1 a 2 a 3 a 1 a 2

Week 7 - Perfect Competition and Monopoly

Small Business Networking

Online Multicommodity Routing with Time Windows

DlNBVRGH + Sickness Absence Monitoring Report. Executive of the Council. Purpose of report

Small Business Networking

Decision Rule Extraction from Trained Neural Networks Using Rough Sets

Brillouin Zones. Physics 3P41 Chris Wiebe

Small Business Networking

The Definite Integral

Exponential and Logarithmic Functions

AP STATISTICS SUMMER MATH PACKET

Network Configuration Independence Mechanism

FAULT TREES AND RELIABILITY BLOCK DIAGRAMS. Harry G. Kwatny. Department of Mechanical Engineering & Mechanics Drexel University

Review guide for the final exam in Math 233

6 Energy Methods And The Energy of Waves MATH 22C

Drawing Diagrams From Labelled Graphs

INTERCHANGING TWO LIMITS. Zoran Kadelburg and Milosav M. Marjanović

Warm-up for Differential Calculus

Lectures 8 and 9 1 Rectangular waveguides

Linear Equations in Two Variables

Transcription:

Q520 Notes on Nturl Logic Lrry Moss We hve seen exmples of wht re trditionlly clled syllogisms lredy: All men re mortl. Socrtes is mn. Socrtes is mortl. The ide gin is tht the sentences bove the line should semnticlly entil the one below the line. Speciclly, inevery context 1 in which All men re mortl nd Socrtes is mn re true, it must be the cse tht Socrtes is mortl is lso true. Wht we wnt to do here is to turn this semntic entilment into the rule in forml proof system. 1 The frgment with sentences All X re Y. It will be esier to postpone the introduction of nmes bit, so to begin we'll only del with sentences All X re Y. More formlly, we hve vribles X 1 X 2 ::: X n ::: rnging over common nouns. The X's denote the v vribles. A sentence is n expression S of the form All X re Y, where X nd Y re one of the v vribles. For exmple, All X 12 re X 7132 is sentence in this rst frgment. Next, we need notion of semntics for this frgment. In this discussion, model or interprettion, or context), will be pir U [ ]), where U is set, nd [[X i ] U for ll i. We then use this to dene the truth or flsity ofsentences. The denition is [[All X re Y ] = true if [X ] [Y ] flse otherwise If ; is set of sentences nd S be sentence, we sytht;semnticlly implies S nd we write ; j= S if: for ll contexts U [ ]]), if [A]] = true for ll A 2 ;, then lso [S]] = true. For exmple, fall X 1 re X 2 All X 2 re X 3 gj= All X 1 re X 3 : On the other hnd, fall X 1 re X 2 All X 3 re X 2 g 6j= All X 1 re X 3 : Wht one wnts to do in forml system of logic is to give purely syntctic counterprt ` to j=. We red ` s \proves" or \derives". The gol is to give denition of reltion ; ` S nd then to check tht it grees with the erlier notion ; j= S. A proof tree over ; for this frgment is tree with the following properties: 1 In these notes, we use \context" nd \model" synonymously. 1

1. The leves re either lbeled with sentences in ;, or with sentences of the form All X re X. 2. The interior leves hve two children drwn bove them) if the lbel of the prent on the bottom) is All X re Y, then the lbel of the left child is All X re Z, nd the lbel of the right child is All Z re Y. We drw these trees with the root t the bottom nd the leves t the top. We summrize this schemticlly by indicting the inference rules s follows: All X re Z All Z re Y All X re Y All X re X If there is proof tree over ; whose root is lbeled S, wesy;` S. This is how our proof system works. Here is n exmple: Let ; be fall A re B All Q re A All B re D All C re D All A re Qg Let S be All Q re D. Here is proof tree showing tht ; ` S: All Q re A All A re B All B re B All A re B All B re D All A re D All Q re D Note tht ll of the leves belong to ; except for one tht is All B re B. Note lso tht some elements of ; re not used s leves. This is permitted ccording to our denition. The proof tree bove shows tht ; ` S. Also, there is smller proof tree tht does this, since the use of All B re B is not relly needed. The reson why we llow leves to be lbeled like this is so tht tht we cn hve one-element trees lbeled with sentences of the form All A re A. Lemm 1.1 Soundness) If ; ` S, then ; j= S. Proof To prove this formlly, you need the notion of induction on proof trees. We didn't relly cover this, so our proof will be bit new. Suppose T is tree tht shows ; ` S. If T is one-element tree, let S be the lbel on the one node. Either S belongs to ;, or else S is of the form All A re A. In the rst cse, every model stisfying every sentence in ; clerly stises S, ss belongs to ;. And in the second cse, every model whtsoever stises S. So we know our result for one-element trees T. In more generl setting, let's suppose tht we hve treet tht hs s immedite subtrees T 1 nd T 2. Wht do the lbels look like? Well, the lbel on T must be sentence All X re Z, nd then for some Y the lbel of the left child is All X re Y, nd the lbel of the right child is All X re Y. Now T 1 nd T 2 re smller thn our T. So we ssume the result we re trying to estblish bout T for the smller trees T 1 nd T 2. This is where induction comes in!) This tells us tht ; j= All X re Y, nd lso ; j= All Y re Z. We clim tht ; j= All X re Y. Tke nycontent inwhich ll sentences in ; re true. Then [X ] [Y ]by our rst point bove. And [Y ]] [[Z ]by second. So [[X ] [Z ]] by trnsitivity of subset. Since the context here is rbitrry, we conclude tht ; j= All X re Z. Theorem 1.2 Completeness) In the frgment with All, if; j= S, then; ` S. Proof Let Z 1 ::: Z k be ll the vribles tht occur in ; or in S. Let S be All X re Y. 2

Dene model by U = fg, 2 nd [[Z i ] = U if ; ` All X re Zi otherwise 1) We clim tht if ; contins All V re W, then [V ] [[W ]. For this, we my ssume tht [[V ] 6= otherwise the result is trivil). So [[V ]] =U. Thus ; ` All X re V. So we hve proof tree s on the left below:. All X re V All V re W All X re W The tree overll hs s leves All V re W plus the leves of the tree bove All X re V. Overll, we see tht ll leves re lbelled by sentences in ;. This tree shows tht ; ` All X re W. From this we conclude tht [[W ]] =U. In prticulr, [[V ] [W ]. Now our clim implies tht the context we hve dened mkes ll sentences in ; true. So it must mke the conclusion true. Therefore [[X ] [Y ]]. And [[X ]] = U, since we hve one-point tree for All X re X. Hence [[Y ]=U s well. But this mens tht ; ` All X re Y, just s desired. A Stronger Result Theorem 1.2 proves the completeness of the logicl system. But it doesn't give us ll the informtion we would need to hve n ecient proceedure to decide whether or not ; ` S in this frgment. For tht, we need little more. Dene reltion on the vribles in question by: V W if there is sequence V = V 0 V 1 ::: V k = Z such tht for i = 0 ::: k ; 1, ; ` All V i re V i+1. We llow the sequence to just hve V = V 0 = V, so tht we hve V V for ll V. Lemm 1.3 Let ; be set of sentence in our frgment, nd dene by Then 1. For ll U, U U. 2. If U V nd V W,thenU W. U V i ; ` All U re V 2) Theorem 1.4 Let ; be ny set of sentences in this frgment, let be sbove. Let X nd Y be ny vribles. Then the following re equivlent: 1. ; ` All X re Y. 2 This just mens tht U is some one-element set. It doesn't mtter which one-element set. Actully, it doesn't even mtter tht U hs just one element: ny non-empty set U would work. 3

2. ; j= All X re Y. 3. X Y. The originl denition of the entilment reltion ; j= S involves looking t ll models of the lnguge. Theorem 1.4 is importnt becuse prt 3) gives criterion the entilment reltion tht is lgorithmiclly sensible. To see whether ; j= All X re Y or not, we only need to compute from ;. This mounts to constructing. This is the reexive-trnsitive closure of reltion, so it is computtionlly very mngeble. In grph theoretic terms, one cn mke grph of the vribles in question using s the edge reltion the reltion! given by Y! Z i ; ` All Y re Z. Then just mens tht there is pth in this grph from Y to Z.) Exercise 1 Prove Theorem 1.4. [Hint: show 1)=)2), 2)=)3), nd 3)=)1). The hrd step is 2)=)3). For this, ssume tht X 6 Y. Build context which mkes ll the sentences in ; true nd All X re Y flse. You'll need to modify 1).] ] 2 We wnt to now enrich our lnguge by dding ssertions. We cll these sentences existentils, since formlizing them in logic would use the existentil quntier 9. We extend our semntics by [ ] = true flse if [X ]] \ [[Y ] 6= otherwise We gin write ; j= S for the semntic entilment reltion dened the sme wy s before. Exercise 2 Check tht f Some Y re Zg 6j= Some X re Z by building model in which [[X ]] \ [[Y ] 6= nd [Y ]] \ [[Z ] 6=, but[x ] \ [[Z ]] =. We dd the following three proof rules to our system: Some Y re X Some X re X All Y re Z Some X re Z At this point we hve new proof system, but we keep the nottion ; ` S. If we need to dierentite the proof system here from the previous one, we would need to indicte this somehow in our nottion. Theorem 2.1 Completeness) In the frgment with All nd Some, if; j= S, then ; ` S. Proof Suppose tht ; j= S. There re two cses, depending on whether S is of the form 4

All X re Y or of the form. The cses re hndled dierently. Since the rst is esier, we leve it to you s n Exercise. So we x X nd Y s suppose tht ; j=. We need proof of this fct in our system. List ll of the existentil sentences in ; in list: Some V 1 re W 1 Some V 2 re W 2 ::: Some V n re W n 3) Note tht we might hve repets mong the V 's nd W s, nd tht some of these might well coincide with the X nd Y tht we re deling with in this proof. For the universe U we tke f1 ::: ng, wheren is the number in 3). For ech vrible Z, we dene [Z ] = fi : either V i Z or W i Zg: 4) The reltion is dened in 2).) This denes n model of the lnguge. Consider sentence All P re Q in ;. Then P Q. It follows from 3) nd Lemm 1.3 tht [P ] [Q ]. Second, tke n existentil sentence Some V i re W i on our list in 3) bove. Then i itself belongs to [[V i ] \ [W i ]], so this intersection is not empty. These fcts imply tht ll sentences in ; re mde true in our model. Recll tht our sentence S is. By our ssumption tht ; j=,[x ] \ [Y ]] 6=. Let i belong to this set. We hve four cses, depending on whether V i X or V i Y, nd whether W i X or W i Y. One cse is when V i X nd W i Y. Reclling tht Some V i re W i belongsto;,wehve proof tree s follows: All V i re X All W i re Y Some V i re W i Some W i re V i Some W i re X Some X re W i The other cses re similr. Exercise 3 Complete the proof of Theorem 2.1 by showing tht if ; is set of sentences in the frgment of this section nd ; j= All X re Y, then lso ; ` All X re Y. You will need to modify the proof of Theorem 1.2 little bit, since ; now myhve existentil sentences. Exercise 4 Adpt the proof of Theorem 2.1 to show tht if ; 6` : then there is model mking ll sentences in ; true nd lso mking flse. By directly following the construction, the size of the model will be the number of existentil sentences in ;. Cn we do better? 1. Show by modifying 4) tht we cn shrink our model down to one of size t most 2. 2. Show tht 2 is the smllest we cn get by showing tht if we only look t one-element models f Some Y re Zg j= Some X re Z 5

Exercise 5 Give n lgorithm which tkes nite sets ; in the frgment of this section nd lso single sentences S nd tells whether ; j= S or not. [You my be sketchy, s we were in our discussion of this mtter t the end of Section 1.] Exercise 6 Suppose tht one wnts to sy tht All X re Y is true when [X ] [Y ] nd lso [[X ] 6=. Then the following rule becomes sound: All X re Y Show tht if we dd this rule to our proof system, then we get complete system for the modied semntics. [Hint: Given ;, let ; be ; with ll sentences such tht All X re Y belongs to ;. Show tht ; ` S in the modied system i ; ` S in the old system.] Exercise 7 Wht would you do to the system to dd sentences of the form Some X exists? 3 Adding nmes Wecontinue by dding nmes so tht we cn del with sentences like John is secretry. To our forml lnguge we dd individul vribles X 1 ::: X n ::: we bbrevite these J M J 1 ::: J n :::, etc. The sentences we dd to the frgment re J is n X nd J is M, wherej nd M re individul vribles nd X is common noun vrible. We ssume tht in model U, [J ] 2 U. We hve to sy when sentences with nmes re true nd when they re flse. The nturl denition is: true if [[J ]] 2 [X ] [J is n X ] = flse otherwise [J is M ] = true if [[J ]] =[M ] flse otherwise To get proof system, we dd the remining rules in Figure 1. We intend to show the completeness of the logic in Figure 1. For this, we need denition. Fix set ; of sentences in this frgment. Let be the reltion on nmes dened by Lemm 3.1 is n equivlence reltion. J M i ; ` J is M: 5) Theorem 3.2 Soundness nd Completeness) ; ` S i ; j= S. Proof [Sketch] The soundness hlf of this result is routine. We omit some of the detils which re similr to the completeness proof we hve lredy seen. Assume tht ; j= S. We must show tht ; ` S. Agin, we hve cses s to the syntctic form of S. Perhps the most interesting is when S is. As before, we dene to be from 2). We lso hve the equivlence reltion from 5). Let the existentil sentences in ; be listed s in 3). Let the set of equivlence clsses of be [J 1 ] ::: [J m ]. 6

All X re Z All Z re Y All X re Y Some Y re X All X re X Some X re X All Y re Z Some X re Z All X re Y J is n X J is Y J is J M is J J is M J is n X J is Y J is M M is F J is F M is n X J is M J is n X Figure 1: The rules of our forml logic for the sentences in this section. We tke U to be f1 ::: ng[f[j 1 ] ::: [J m ]g. We ssume these sets re disjoint. We dene [Z ] = fi : either V i Z or W i Zg [f[j] : for some M 2 [J], ; ` M is Zg To nish dening our context, we tke [J ]=[J]. Tht is, the semntics of J is the equivlence clss [J]. It is esy to see tht the semntics is monotone in the sense tht if V W, then[v ] [W ]]. This implies tht ll of the universl ssertions of ; re true in our model. The existentil ssertions in ; re Some V i is W i for i n, nd for ech i, the number i belongs to [[V i ] \ [[W i ]]. Finlly, consider sentence J is Z in ;. Then ; ` J is Z. So [[J ]=[J] 2 [Z ]. This mens tht our sentence J is Z is true in our context. We conclude tht lso is true in this context. If there is some number i in [[X ]\[[Y ]], then the proof of Theorem 2.1 shows tht ; `. The only lterntiveis when for some J, [J] 2 [X ] \ [Y ]. By the denition in 6), there re M 2 [J] nd N 2 [J] such tht ; ` M is n X nd ; ` N is Y. Since M 2 [J] nd N 2 [J] we lso hve ; ` M is N. We exhibit proof tree over ;:.. N is Y. M is N M is n X M is Y The verticl dots. men tht there is some tree over ; estblishing the sentence t the bottom of the dots. So ; `, s desired. Exercise 8 Red the sttement of the Completeness Theorem bove. The proof tht I gve only covers the cses when S is of the form. The other cses re esier. Give the rguments in those cses. 7 6)

4 No In this section, we consider the frgment withno X re Y on top of All X re Y. In ddition to the rules of Section 1, we tke thefollowing: All X re Z No Z re Y No X re Y The soundness of this system is routine. No X re Y No Y re X No X re X No X re Y No X re X All X re Y Theorem 4.1 Completeness) In the frgment with All nd No, if ; j= S, then ; ` S. Proof Fix set ;. We construct model U ; =U [[ ]]) nd then show thts is true in U ; i ; ` S. We tkeforu the set of nonempty sets s of vribles stisfying the following conditions: 1. If V 2 s nd V W, then W 2 s. 2. If V W 2 s, then;6` No V re W. Note s specil cse of the lst condition tht if V 2 s, then ; 6` No V re V.) We set [V ] = fs 2 U : V 2 sg: 7) We clim tht ech sentence in ; is true in U ;. Condition 1) implies tht if All V re W belongs to ;, then [V ] [W ]. Suppose tht No V re W belongs to ;. Let s 2 [[V ]. Then V 2 s. By condition 2), W =2 s. So s =2 [W ]. This rgument shows tht [[V ] \ [[W ]=. We showthtifs is true in U ;, then ; ` S. We rst del with the cse tht S is the of the form All X re Y. Let s = fz : X Zg: Cse I: s =2 U. Then there re V W 2 s such tht;` No V re W. In this cse, All X re V No V re W No X re W All X re W No W re X No X re X All X re Y 8) Cse II: s 2 U. Then since s 2 [[X ], we hve s 2 [Y ]]. 7) tells us tht Y 2 s, nd so ; ` All X re Y, s desired. This concludes our work when S is All X re Y. Suppose tht S is No X re Y. Let s = fz : X Z or Y Zg: Note tht X Y 2 s. Then s =2 U, lest s 2 [[X ] \ [[Y ]. So there re V W 2 s such tht ; ` No V re W. Cse I: ; ` All X re V,nd;`All Y re W. We hve the tree: All X re V No V re W All Y re W No X re W No X re Y 9) Cse II: ; ` All X re V,nd;`All X re W. In this cse, tke the proof tree in 8) nd chnge the root to No X re Y. 8