MATH 457 Introduction to Mthemticl Logic Spring 2016 Dr Json Rute Hndout: Nturl deduction for first order logic We will extend our nturl deduction rules for sententil logic to first order logic These notes re intended to replce Section 24 in Enderton (Enderton uses deduction system bsed on Hilbert-style xioms) 1 Well formed formuls We will dopt the definition of terms nd well-formed formuls from erlier following bbrevitions: Recll the ( ) ( ) ( ) x x 2 The inference rules ( quick reference) For reference we list ll the inference rules here In the next few sections we will explin the nottion nd the side conditions 21 Rules for the sententil connectives Impliction introduction nd elimintion I E Reductio d bsurdum RAA Assumption Rule 1
22 Rules for the quntifiers Inference rules for where for we require: y x y x E x t x is not free in ny open (uncovered) hypotheses bove this rule, y is substitutble for x in, nd either y is not free in, or y = x nd for E we require: t is substitutble for x in 23 Rules for equlity Inference rules for = t = t R t = s S s = t t = s s = r T t = r t = s f t = f s fsub t = s P s P t P Sub 3 Nturl deduction rules for the sententil connectives We dopted the following (fmilir) inference rules for the sententil connectives nd The only difference is now nd represent first-order formuls insted of sententil formuls Inference Rules for Reductio d bsurdum I Here is n bbrevition for Assumption Rule RAA E 2
4 Derived inference rules for sententil logic All the other inference rules for the sententil connectives cn be derived from these four rules Such rules, formed by combining other rules, re clled derived rules Exmple 1 The flse elimintion rule (ex flso), E is just specil cse of RAA where we do not cncel the ny ssumptions Exmple 2 The negtion introduction nd elimintion rules I E in their unbbrevited forms re I E These re just specil cse of the impliction introduction nd elimintion rules However not ll derived rules re specil cses of nother rule Exmple 3 The disjunction introduction nd elimintion rules, I 2 I 2 E re bbrevitions for the rules 3
These rules cn be derive from our originl four rules nd the derived rules s follows y x E I x I x I x I y E RAA x Notice tht the derivtion of hs the sme conclusion nd the only uncovered ssumption (hypothesis) is The derivtion of E lso hs the desired conclusion nd hypotheses Moreover, it uses tht we hve derivtions of from nd These derivtions don t need to go on the top of the proof Remrk 4 One wy to think bout these derived rules is tht if we hve proof tht uses, sy, E we cn replce it with proof without E by replcing every instnce of the rule E with its derivtion Exercise 5 Show the inference rules for nd re derivble Exercise 6 Show tht we cn lso derive the following inference rules which we will cll double negtion introduction, double negtion elimintion nd lw of the excluded middle I E LEM 5 Substitution In order to give the deduction rules for quntifiers, we will need to define two concepts: 1 α x t, mening the formul one gets by substituting every free instnce of the vrible x with the term t 2 t is substitutble for x in α, mening tht it is OK to substitute t for x While first concept is quite nturl, it is helpful to give recursive definition Definition 7 Given wff α, vrible x, nd term t, define α x t recursively s follows If α is the tomic formul P u 1 u n, then α x t is P (u 1 ) x t (u n ) x t where (u i ) x t is the term u i with ll x replced by t (I will leve defining (u i ) x t recursively s homework exercise) 4
( ) x t is ( x t x t ) ( x ) x t is x (Notice, x is not free in x ) ( y ) x t is y x t, where y is vrible different from x Exercise 8 Show tht the following hold for our bbrevited formuls: ( ) x t is ( x t ) ( ) x t is ( x t x t ) where is ny of,, ( x ) x t is x ( y ) x t is y x t, where y is vrible different from x Exmple 9 1 x x = 2 (Qx x P x) x y is (Qy x P x) (We only replce the free occurrences of x) 3 (Qx P x) x fxy is (Qfxy P fxy) (Notice, x is still free in this formul We replced the two free x in the originl formul, then we stop) 4 ( y (x y)) x z is y (z y) 5 ( y (x y)) x y is y (y y) (Notice the first is true in ny structure of crdinlity 2, but the second is not true in ny structure!) We would like to sy if α is true, then so is α x t However, we need dditionl conditions to void the pthology of (5) Informlly, we sy t is substitutble for x in α if there is no vribles in t which re cptured by quntifier fter the substitution Definition 10 Define t is substitutble for x in α recursively s follows 1 For α tomic, t is lwys substitutble for x in α t is substitutble for x in ( ) iff t is substitutble for x in both nd t is substitutble for x in y iff either x is not free vrible of y (this includes the cse where y is x), or y is not vrible in t, nd t is substitutble for x in Exercise 11 Prove x is lwys substitutble for x in α (Use induction on wffs) Exercise 12 Show tht the following hold for our bbrevited formuls: t is substitutble for x in ( ) iff t is substitutble for x in 1 Mny books use the phrse t is free for x in α 5
t is substitutble for x in ( ) iff t is substitutble for x in both nd, where where is ny of,, t is substitutble for x in y iff either x does not occur free in y (this includes the cse where y is x) y does not occur free in t, nd t is substitutble for x in Remrk 13 We my still use α x t even when x is not substitutble for x in t 6 Rules for quntifiers 61 The rules for the universl quntifier Introduction nd elimintion rules for the universl quntifier where for we require: y x y x E x t x is not free in ny open (uncovered) hypotheses bove this rule, y is substitutble for x in, nd either y is not free in, or y = x nd for E we require: t is substitutble for x in We will crefully discuss these side conditions, but first some motivtion 62 Motivtion 621 Similr to nturl lnguge proofs These rules re designed to mimic informl nturl lnguge proofs For the introduction rule, ssume I wnt to prove x In n informl nturl lnguge proof, I would strt by fixing n rbitrry object x nd then giving proof tht holds of x (where ssumedly x is free vrible in ) Finlly, since x is rbitrry (I mde no specil ssumptions bout wht x is or wht properties it hs) then I cn deduce x This is wht the rule does The side conditions re there to ssure tht x relly is rbitrry For the elimintion rule, gin think of informl nturl lnguge proof If I know hold for ll x, then I my ssume it holds for some specific object (which in this cse is given by the term t) The side condition is there to void technicl issues 6
622 Similr to the conjunction rules Recll tht behves like n infinite conjunction Now compre our rules for with our rules for : I E 1 The reder would do well to crefully meditte on the similrity (nd differences) between the rules for nd those for 63 The side conditions The rules for come with subtle, but very importnt side conditions We will discuss them one t time 631 Side conditions for : x is not free in ny open (uncovered) hypotheses bove this rule To relly understnd wht this mens nd why it is importnt let us give n exmple of good proof nd bd proof This is good proof: P x P y I P x P y P x P x P y x (P x P x P y) There is only one uncovered hypothesis nd it is does not contin x s free vrible This is BAD PROOF : x 0 x (x 0) We re ssuming x 0, nd then somehow getting the conclusion tht no number is equl to 0 Clerly flse if 0 is constnt in our lnguge This hppened, becuse we pplied when x 0 ws n open hypothesis contining the free vrible x This is lso BAD PROOF : x 0 x (x 0) x 0 x (x 0) Even though x 0 is now covered, tht is becuse it mtches with something below our ppliction of The subproof, where we pply t the bottom, is the sme s (1) nd hs x 0 s open either y is not free in, or y = x E I E 2 (1) 7
When we use we cn use the sme vrible x for the quntifier tht we re generlizing (this is the y = x cse), eg P x E P x P x x (P x P x) We my lso use new vrible y s long s it is free in P x P x P x y (P y P y) E This my even pply generlize on vrible not used in For exmple, P x P x P x y (P x P x) here I m generlizing on y even those it does not exist in P x P x However, I cn cnnot use vrible tht is free in This is BAD PROOF : E P x E P x P x y 0 I (P x P x) y 0 y ((P y P y) y 0) See tht we ve gin concluded tht no number is 0?! y is substitutble for x in As we hve lredy seen things cn go wrong when we try to substitute one vrible for nother if tht vrible lredy conflicts with bound vrible Exercise 14 Come up with n exmple showing why we need this rule Find proof which follows ll the rules except this one nd derives something invlid 632 Side conditions for E: t is substitutble for x in Given x we cn replce x with ny term t tht is substitutble for x in For exmple, this is good: x y (y x) E y (y 1 + 1) However this is BAD PROOF : x y (y x) E y (y y) The term y is not substitutble for x in y (y x) 8
64 Derived rules for the existentil quntifier The derived rules for re s follows Introduction nd elimintion rules for the existentil quntifier y x x t x I y E where for I we require: t is substitutble for x in nd for E we require: x is not free in nor in ny open hypotheses in the proof x is substitutble for y in, nd either x is not free in, or y = x y x other thn y x, Agin these rules cn be motivted by nturl lnguge proofs If I know there exists solution to y 5 y + 1 = 0, then I cn use this number to prove other things I do this by giving this number nme, sy x Then I prove things bout x only using the ssumption tht x 5 x + 1 = 0 For exmple, I cn prove there exists z such tht 2z 5 + 2z 2 = 0 This is the ide behind E Also, notice the similrity between these rules nd the rules for Here we derive the rules for the existentil quntifier y x b x E x t x t E I x y y x E I b y E RAA Exercise 15 Explore wht would go wrong if we violte ny of the side conditions in I or E 9
7 Rules for equlity The rules for equlity re s follows Inference rules for = t = t R t = s S s = t t = s s = r T t = r t = s f t = f s fsub t = s P s P t P Sub In these three rules t, s, nd r re terms in our lnguge The first three rules sy tht = is n equivlence reltion The lst two rules sy tht functions f nd predictes P respect equlity The nottion t nd s is shorthnd The longer version of the rules re t 1 = s 1 t n = s n fsub ft 1 t n = fs 1 s n t 1 = s 1 t n = s n P t 1 t n P Sub P s 1 s n where f nd P re n-plce In prticulr, for constnts c we hve specil cse of the fsub rule, csub c = c which is redundnt with the reflection rule R Exmple 16 Assume we hve constnts 0, 1, unry function, nd binry functions +, This next proof sys tht if x = 1 nd y = 0 then ( x + 0) + (y + z) = ( 1 + 0) + (0 + z) R x = 1 y = 0 z = z Sub R +Sub x = 1 0 = 0 y + z = 0 + z +Sub Sub x + 0 = 1 + 0 (y + z) = (0 + z) +Sub ( x + 0) + (y + z) = ( 1 + 0) + (0 + z) Exmple 17 Assume we hve the predicte P nd the constnt c This next proof sys tht if x = c nd x Qx (P x ) holds, then so does x P x (P c ) (I replced ll free x with c) x = c x Qx (P x ) x Qx S b E c = x P c P Sub P x P x E I b P c I x Qx (P c ) To simply the tedium of the lst two exmples, consider these two derived rules Exercise 18 Let x = x 1,, x n denote list of unique vribles Let s = s 1,, s n be list of terms Use t x s to denote the term t with ll the vribles x 1,, x n replced respectively by the terms s 1,, s n Use x t to denote the formul with x 1,, x n replced by t 1,, t n Define t x s nd x t recursively, nd then derive these two rules: s = r t x s = t x r Sub t = s x s x t Sub 10