Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC 685 Logic Review. Logic: Modeling Human Reasoning syllogistic logic Syllogistic Logic (Aristotle). all/some X are/not Y Propositional Logic (Boole).

Similar presentations


Presentation on theme: "CSC 685 Logic Review. Logic: Modeling Human Reasoning syllogistic logic Syllogistic Logic (Aristotle). all/some X are/not Y Propositional Logic (Boole)."— Presentation transcript:

1 CSC 685 Logic Review

2 Logic: Modeling Human Reasoning syllogistic logic Syllogistic Logic (Aristotle). all/some X are/not Y Propositional Logic (Boole). if X and Y then not Z or W First-order Logic (Frege). for all X there is a Y such that if not Px then Qy propositional logic first-order logic

3 Frege (1879) AA A AA A B ABAB Px x  x Px Px x Qx

4 "Term t is free for variable x in formula  " means: all variables in t remain free when t is substituted for x in .  [t/x] =  with all free occurrences of x replaced by t.  x(  y Rxy  Pxy) [f(x)/y] =  [[t/x]] =  with all free occurrences of x replaced by t as long as t is free for x in   x(  y Rxy  Pxy) [[f(x)/y]] =  x(  y Rxy  Pxf(x))  x(  y Rxy  Pxy) (no change) Variables in plugged-in terms shouldn't be "captured"

5 ie ,                      , [  …  ], [  …  ]   [  …  ] ,    [  …  ]  ,           = t = t t = s,  [ t/x ]  [s/x]  y[ …  [y/x] ]  x  x   [[ t/x ]]  [[t/x]]  x  x , y[  [y/x] …  ]  where  does not contain x copy  First-Order Natural Deduction PBC [  …  ]  MT ,   LEM   

6 Why is  e this:  x   [[ t/x ]], not this:  x   [ t/x ] ?  x  y Lxy  y Lay  x  y Lxy  y Lyy... ok.... not ok.

7 An Axiomatic System Axiom schemas A1   (    ) A2   (    )  ((    )  (    )) A3(    )  (    ) A4  x    [[t/x]] A5    x  if x is not free in  A6  x (    )  (  x    x  ) A7  x , where  is an axiom Rule MP   ,  

8 bool truth( Sentence , Model m ) { if (  = =  ) return ! truth( ,m) ; else if (  = =  ) return truth( ,m) && truth( ,m) else if (  = =  ) return truth( ,m) || truth( ,m) else if (  = =  ) return ! truth( ,m) || truth( ,m) else if (  = =  x  (x) ) for each a in m.A if ! truth(  (a), m ) return false ; return true ; else if (  = =  x  (x) ) for each a in m.A if truth(  (a), m ) return true ; return false ; else //  = = Pf 1 (a 1 a 2 …)f 2 (b 1 b 2 …)… return P m ( f 1 m (a 1 m a 2 m …) f 2 m (b 1 m b 2 m …)… ; } Truth in a model m

9  |=  |   syntax (proof theory) semantics (model theory) sound complete

10 Compactness Theorem If all finite subsets of a set of formulas G are satisfiable, then G is satisfiable. Proof Assume all finite subsets of G are satisfiable. Assume G is NOT satisfiable. Then G |=  Then G|   (by completeness) Then there is a finite proof of  from formulas in G. This proof only uses a finite set D of formulas in G. So D |   where D is finite. So D |=  (by soundness) So some finite subset D of G is unsatisfiable. Contra! So G is satisfiable.

11 Expressing reachability u v v is reachable from u R In SECOND-ORDER logic: reachable( R,u,v):=   P  x  y  z( Pxx  (Pxy  Pyz  Pxz)   Puv  (Rxy  Pxy)) Can we express this in first order logic?

12 NO! Reachability is not first-order u v R Suppose  (u,v) were a first-order formula with predicate R expressing that v is reachable from u. Define  n =  x 1...  x n-1 (Rcx 1 ...  Rx n c') Let D = {  (u,v),  (c=c'),  1,  2,... } D is unsatisfiable, but every finite subset of D is satisfiable. This contradicts the Compactness Theorem. So such a first-order formula  (u,v) cannot exist.


Download ppt "CSC 685 Logic Review. Logic: Modeling Human Reasoning syllogistic logic Syllogistic Logic (Aristotle). all/some X are/not Y Propositional Logic (Boole)."

Similar presentations


Ads by Google