Logic of proofs with complexity operators - Sergei N. Artemov

2 downloads 0 Views 263KB Size Report
An arithmetical formula Cpl(x; y) is called a standard complexity ...... 2] D. Guaspari and R. M. Solovay, \Rosser sentences," Annals of Mathematical Logic, vol.
Logic of proofs with complexity operators Sergei Artemov

Artem Chuprina

Steklov Mathematical Institute, Vavilov str. 42, Moscow 117966, RUSSIA

Mathematical Logic Section Department of Mathematics Moscow State University Moscow 119899, RUSSIA

email:[email protected]

1 Introduction. In [1] the modal provability logic was enriched by new operators (labeled modalities) for individual proofs. The resulting logic of proofs was intended to meet some needs of the computer science, where not only provability is of interest but also proofs themselves. Decent algebraic models for the logic of proofs are still to be invented. Such models should probably provide a natural extension of the notion of Magari Algebras, which are also known as Diagonalizable Algebras [4]. In the current paper we add to the logic of proofs also new labeled modalities which stand for the complexity of proofs. The Kripke style completeness, decidability, and arithmetical completeness theorems are obtained. The complexity logics introduced here correspond to two major classes of complexity measures: decidable and recursively enumerable ones; the completeness theorems thus relate either of these logics to the entire class of the relevant complexity measures. A logic of a speci c complexity measure may depend on particular details of proof coding; the logics from the current paper may turn out to be incomplete with respect to some individual complexity measure. However, the completeness theorems from this paper give us a clear idea about what axioms one should add to these logics in order to reach the completeness in a speci c case, and what sort of models (Kripke, arithmetical) are relevant to complexity measures. In what follows we assume, for short, the Peano Arithmetic PA to be the basic theory for proof and provability predicates. We denote the usual Godel proof predicate \x is a godelnumber of a proof of the formula with the godelnumber y" as Proof (x; y)  Supported by the grant # 93-011-16015 of the Russian Foundation for Fundamental Research and by the Netherlands Organization for Scienti c Research (NWO).

1

and the usual provability predicate as Provable (y), i.e. Provable (y) coincides with 9xProof (x; y).

1.1 De nition. An arithmetical formula Prf (x; y) is called a standard proof predicate (cf.[2, 1]) i 1. Prf (x; y) is equivalent in PA to a recursive formula; 2. Prf (x; y) numerates the theorems of PA: PA ` '

() for some n 2 ! Prf (n; p'q) is true;

1

3. the formula Pr (y) := 9xPrf (x; y) satis es: PA ` (Pr (x)&Pr (x !: y)) ! Pr (y )2 PA `  ! Pr (p q)

for every arithmetical  -sentence ; 0 1

1.2 De nition. A standard proof predicate Prf is functional if for all l; m; n 2 ! Prf (l; m); Prf (l; n) =) m = n: 1.3 De nition. An arithmetical formula Cpl (x; y) is called a standard complexity predicate i 1. Cpl (x; y) is equivalent in PA to a recursively enumerable formula; 2. Cpl (x; y) numerates the theorems of PA: PA ` '

() for some n 2 ! Cpl (n; p'q) is true;

3. the formula Prv (y) := 9xCpl (x; y) satis es: PA ` (Prv (x)&Prv (x !: y)) ! Prv (y ) PA `  ! Prv (p q)

for every  arithmetical sentence ; 0 1

In this paper we do not distinguish between the natural number n and its numeral n . As usual, p'q denotes the godelnumber of ': 2 denotes the term with two free variables, such that for any arithmetical formulas B and C , pB q pC q = pB C q. 1

:

! :

!

!

2

4. Cpl (x; y) is (provably in PA) monotone on the rst argument, i.e. PA ` u  v ! [Cpl (u; y) ! Cpl (v; y)]:

1.4 De nition. A standard complexity predicate is called recursive if it is equivalent in PA to a recursive formula.

1.5 De nition. Two predicates Prf and Cpl are called provably compatible if

PA ` 8y (Prv (y ) $ Pr (y )):

Note that the complexity of proof and proof itself are of di erent character: complexity domain (the set of natural numbers) is linearly ordered, but proofs have no natural linear ordering. So for a modal description of this two notions we introduce two di erent sorts of variables, and assume that proof and complexity predicates are provably compatible. On the other hand, each standard decidable complexity predicate Cpl (x; y) coincides with 9t  xPrf (t; y) for an appropriate standard proof predicate Prf . In this case we may identify proof variables and complexity variables in a natural way; while considering decidable complexity measures we will suppose that Cpl (x; y) = 9t  xPrf (t; y). A labeled modal language L contains three sorts of variables, p ; p ; : : : (called proof variables), ; ; : : : (called complexity variables) and S ; S ; : : : (called sentence variables), symbol ! for the classical implication, the truth value ? for absurdity (the usual Boolean connectives, and the truth value > for truth are de ned as abbreviations), the usual modality 2, for each proof variable pi the unary modal operator 2pi and for each complexity variable i the unary modal operator 4 i . The set of formulas of L is thus generated from the atomic formulas ?; S ; S ; : : : by ! as usual, and by the modal operators as follows: if A is an L formula, p is a proof variable and is a complexity variable, then 2A, 2pA and 4 A are L formulas; we call formulas of the form 2p A and 4 A quasiatomic, or q-atomic for short. We will also use the abbreviation 2 A for a formula A ^ 2A, and 3 will stand for :2 :. In the sequel under a modal formula we understand a formula in the language L . We use small letters p; q; r; : : : for proof variables, greek letters ; ; : : : for complexity variables, capital letters S; T; : : : for sentence variables and A; B; C; : : : for modal formulas. Let L denote the usual modal language over ?; S ; S ; : : : with the only modality 2, i.e. a labeled-modalities-free fragment of L , L denote the 4 i -free fragment of L , L? { the 2pi -free fragment, and L ? { the fragment of L , where we identify proof variable pi with the correspondent complexity variable i. ++

0

0

1

0

++

0

++

1

1

1

++

+

+

+

++

++

+

+

+

0

1

++

++

3

We assume a reader to be familiar with the general uni cation technique (cf. [3, 1]). In particular, by AB we denote the most general uni er (mgu) of A and B obtained by some xed deterministic version of the Uni cation Algorithm.

1.6 De nition. (cf. [1]) Let C = D (mod A = B ) be an abbreviation for \for every substitution  (A  B ) C  D)": Apparently, if A; B are not uni able, then C = D (mod A = B ) holds for all C and D.

1.7 Lemma. If A and B are uni able, then C = D (mod A = B ) ,

CAB  DAB :

Proof. Direction ()) is obvious as AB uni es A and B . Direction ((): let CAB  DAB and  be an arbitrary uni er A and B . As AB is an mgu of A; B for some  we have  = AB  , then C  CAB    DAB    D: 

1.8 Corollary. The relation C = D (mod A = B ) is decidable. 1.9 De nition. An arithmetical interpretation  is a triple (Prf ; Cpl ; ), where

Prf and Cpl are provably compatible standard proof and complexity predicates and  is a function which assigns:  to each proof variable p some n 2 !,

 to each complexity variable i some m 2 !  and to each sentence variable S a sentence of PA.

The arithmetical translation A of a modal formula A under the interpretation  is the extension of  to all modal formulas by:  ? := (0 = 1),  p := (p) for a proof variable p,   := ( ) for a complexity variable , 4

    

S  := (S ) for a sentence variable S , () commutes with the Boolean connectives, (2A) := Pr (pAq); (2pA) := Prf (p; pAq): (4 A) := Cpl ( ; pAq); An arithmetical interpretation (Cpl ; Prf ; ) is called functional i Prf is a functional proof predicate. We'll combine the formal systems for complexity logics from the following set of axioms: (A0) Boolean tautologies in the language L ; (A1) 2(A ! B ) ! (2A ! 2B ) (distributivity) (A2) 2(2A ! A) ! 2A (Lob axiom) (A3) 2pA ! A (q-re exivity) (A4) 2pA ! 22p A (stability) (A5) :2p A ! 2(:2p A) (stability) (A6) 2pA&2pB ! (C ! D) if C = D (mod A = B ) (functionality) (A7) 4 A ! A (q-re exivity) (A8) 4 A ! 2A (q-provability) (A9) 4 A ! 24 A (stability) (A10) :4 A ! 2(:4 A) (stability) (A11) 2pA ! 4pA (in the language L ?) (correspondence) (irre exivity) (A12) :[( 0 j 6 H , by the previous induction PA ` \l = j " ! :H , PA ` H  ! \l 6= j ", PA ` Provable (pH q) ! Provable (p\l 6= j "q); PA ` :Provable (p\l 6= j "q) ! :Provable (pH q); but by 2.8 (4) PA ` \l = 0" ! :Provable (p\l 6= j "q); thus PA ` \l = 0" ! :Provable (pH q):

13

The same argument as above shows that PA ` Pr (pH q) ! Provable (pH  q);

and we again have

PA ` \l = 0" ! :B  :



2.12 De nition. A model is called functional if it satis es an extra forcing condition:

x :(2p B &2pC ) if B; C are not uni able, else x 2pB &2pC ) x D ! E for every D; E s.t. D = E (mod B = C )

Kripke models for FC are functional r -models. We skip the proof, addressing the reader to [1], Theorem 3.2 and to Lemmas 3.4 and 3.5.

2.13 Theorem. FC ` A , for every interpretation  PA ` A :

Proof.

Correctness, i.e. the case ()). Induction on a proof of A in F . After Theorem 2.6 it only remains to check the correctness of the functionality axiom A6, which is done de facto in [1], theorem 3.14. (().The proof is an easy combination of the proofs of Theorem 3.14 from [1] and 2.7. In the notations of the Theorem 2.7 let

Qi ? Qi = fAi; ; Ai; ; : : : ; Ai;ni g (0  i  m): +1

2

3

Pay attention that here ni = 1+ the cardinality of Ri , so if ni = 1, then Ri = ;. Because of the functional property of the model with respect to q-atomic formulas 2pi A, there is not more than one formula among Ai;j , for which 2pi Ai;j holds in the model; without loss of generality we may assume that it is Ai;ni . Let also M = n + : : : + nm . We de ne pi := n + : : : + ni ? 1 and consider the following xed point equation: 0

0

14

Prf (u; v) $ [ u = 0 u=1 u=2

! v = p8x (x = x )q & ! v = pA ; ]q & ] ! v = pA ; q & 0

0

0

02

03

... u = n ? 1 ! v = pA ;n0 ]q & u=n ! v = p8x (x = x )q & u = n + 1 ! v = pA ; ]q & ... & u = M ? 1 ! v = pAm;nm ]q uM ! Proof (u ? M; v) ] Now we have just to repeat the steps of the proof of Theorem 2.7 and then 3.14 from [1].  1

0

1

0

1

12

2.1 Comments

0

0

1. Uniform completeness of BC and for FC takes place, namely, in theorems 2.7 and 2.13 one can choose a proof predicate uniformly for all A's. 2. The case of logics of all formulas true in the standard model of arithmetic for BC and for FC can be treated exactly as that for B and F in [1]. The truth cases for BC and FC are the logics BC ! and FC ! whose axioms are all the theorems of BC and FC , the axiom scheme 2A ! A and the only rule is R0. 3. How BC and FC are related to speci c complexity measures? Let us take the one determined by the usual Godel proof predicate Proof (x; y). Clearly, the logic of Proof (x; y) extends FC , but this logic itself essentially depends on some occasional details of the coding of formulas and proofs. For example, the scheme 4p::A ! 4pA expresses the conjecture that the least proof code of any formula A is less then any proof code of ::A. One can easily de ne numerations of proofs with or without this property; the question whether it holds for a "usual" coding of proofs doesn't look relevant to real problems of the complexity of proofs. It is the main reason why unlike the paper [1] we skip the usual Godel proof predicate case. However, for some natural complexity measures the question of their individual complexity logics might have sence; such a logic would extend BC or even FC (for a decidable complexity predicate), or BE from the next chapter (for a recursively enumerable complexity predicate).  15

3 Logics for recursively enumerable measures.

The system E is formulated in the language L? , i.e. without modalities 2p, and its axioms are A0 { A2 (the system GL) + A8 + A9 + A12 and inference rules R0 { R2. The system BE (formulated in L ) is B + E . For technical reasons we introduce an auxiliary system E ? that is E without R2. In the sequel \`" without the left argument means \PA `". Also under modal formula we understand an L? -formula for E and an L one for BE . As for BC and FC we prove the following 3.1 Lemma. For an arithmetical interpretation  and a modal formula F E ` F ) PA ` F  BE ` F ) PA ` F  +

++

+

++

Proof.

The proof is essentially done in Lemma 2.6. We have to prove only that

` (4 A ! 2A), i.e. ` Cpl (t; pAq) ! 9xCpl (x; pA q) which is obvious, and ` (4 A ! 24 A) , which follows from  -completeness of PA. 0 1



3.2 De nition. A set X of modal formulas is adequate if it is closed under subformulas; ? 2 X ; if B 2 X and B is not of a form :C , then :B 2 X ; for all , A if there exist , B such that 4 A and 4 B belong to X , then 4 A 2 X and 2A 2 X . The de nition of an X -model K is the same as that for BC and FC (de nition 2.3). 3.3 Remark. Every X -model can be extended to a model by de ning x 6 ' for each node x 2 K and for each atomic and q-atomic formula ' 62 X . The forcing conditions 1.-5. are clearly respected, we only need to verify the condition 6. A12. Suppose x 3 (4 A &:4 A )& : : : &3 (4 An&:4 n An); +

0

1

0

+

0

0

and also suppose that there is an q-atomic formula among those mentioned explicitly here that does not belong to X ; w.l.g. assume that 4 1 A 62 X . However, x 4 1 A and x 4 2 A , thus 4 1 A ; 4 2 A 2 X , hence 4 1 A 2 X . It demonstrates that all q-formulas from the example of A12 above are from X , which is impossible since we consider an X -model. 1

1

0

1

0

1

3.4 Lemma. E ? 6` A ) there is an Ad(A)-model K with the root r such that r 6 A. Proof. Let f4 i Aj gni m j be all the 4 -formulas in Ad(A), and let fTij gni m j be sentence variables not occurring in Ad(A). In every B 2 X we replace all occurrences of 4 i Aj , that are not in the scope of any labeled modality, by Tij . The resulting formula B t is in the language L. Let Y be a set of L-formulas, containing =0

=0

=0

16

=0

1. 2 (Tij ! 2Aj t ), 2. 2 (Tij ! 2Tij ), 3. 2 (:(3 (:Tkr ^ Tlr ) ^ 3 (:Tls ^ Ts) ^ : : : ^ 3 (:Tk0t ^ Tkt) for all (k; l : : : k0 )  f0 : : : ng and (r; s : : : t)  f0 : : : mg . Thus of 4 i Aj for Tij makes Y the set of theorems of E ?, so if GL ` V Y !theB tsubstitution , then E ? ` B , whenever B 2 Ad(A) (easy induction on a proof). But E ? does not prove A, so we can (cf. [5]) construct a GL-countermodel K0 = hK; ;V 0i, V which is a nite tree with the root r such thatV r 6 0 Y ! At , hence r 0 Y and r 6 0 At. By the de nition of Y and r 0 Y we can de ne an Ad(A)-model K = hK; ; i putting a F () a 0 F t: Then r 6 A.  +

+

+

+

+

+

def

3.5 Lemma. E 6` A ) there is an A-sound Ad(A)-countermodel K for A Proof. If E 6` A, then for any N 2 ! E ? 6` 2N A. Take N = Cardf2B 2 Ad(A)g. By Lemma 3.4 there is an Ad(A)-model K0 with the root r such that r 6 2N A. By the forcing condition for 2 there is a chain iN  : : :  i such that ik 6 2k A, but the formula 2B ! B can fail at one node of the chain at the most. So, by the pigeonhole principle, there is k such that ik H (A). Since iN  ik the restriction of K0 to the set fj j j  ik or j = ik g is a desired Ad(A)-model. 0



3.6 Lemma. BE 6` A ) there is an A-sound Ad(A)-countermodel for A. Proof. The proof is nearly the same as in Lemmas 3.4 and 3.5. We only need to replace GL by B? and E ? by BE ? . The Kripke model completeness for B? is proved (

)

(

)

in [1]. 

3.7 Theorem. The systems E and BE are complete with respect to the intended classes of nite Kripke models and thus are both decidable.

Proof. An easy combination of Lemmas 3.5 and 3.6, Theorem 3.1 and Theorem 3.8 proved below. 

17

3.8 Theorem.

E `A  BE ` A () for any interpretation  PA ` A :

Proof. We prove the theorem for BE only. The proof for E is a straightforward restriction of that for BE to the language L? . Direction \(" by contraposition. If BE 6` A, then by Lemma 3.6 there is an Asound Ad(A)-countermodel K0 for A; we can assume that K0 is already extended to the (total) Ad(A)-countermodel for A. Let K0 be hK 0; ; i. Again w.l.g. we assume, that K 0 = f1; : : : ; ng and 1 is the root node, add to K 0 a new node 0 and de ne 0  i; i 2 K 0. For every atomic or q-atomic formula F 2 Ad(A) we de ne 0 F , 1 F . Let K denote f0g [ K 0 and K = hK; ; i. Again we de ne the Solovay function h and arithmetical formulas \l = j " for the model K. 3.9 De nition. < () 9B (0 N :Cpl (x; pB  q) (1) Now, \w 6 2B " ) 8 (\w 6 4 B "), hence 8x  N :Cpl (x; pB q); (2) nally, (1) and (2) imply :Pr (pB q) 

3.11 Lemma. For all 2B 2 Ad(A) and w 2 K ` \l = w" ! [\w 2B " $ Provable (pB q)] Proof. If w 6 2B , then there is v  w such that v 6 B . By the Lemma 3.10 ` \l = v" ! :B  ` B  ! \l =6 v" ` Provable (pB q) ! Provable (p\l =6 v"q) ` \l = w" ! :Provable (p\l =6 v"q) by the Solovay lemma, 2.8(4) ` \l = w" ! :Provable (pB q) ` \l = w" ! [\w 6 2B " ! :Provable (pB q)] 5 6

Here and below \w F " means a natural recursive formalization of w F in PA. We use the fact that the model is described in PA by natural recursive formulas.

19

6

If w 2B , then for every v  w we have v B . Thus by the Lemma 3.10 for all v  w we have ` \l = v" ! B  , _ ` \l = v" ! B  vw

If w  0, then

` Provable (pWWvw \l = v"q) ! Provable (pB q) ` Provable (p v2K \l = v"q) ` \l = w" ! Provable (pVWw6v \l 6= v"q) ` \l = w" ! Provable (p wv \l = v"q) ` \l = w" ! Provable (pB q): If w = 0, then 1 B , hence 0 B , hence 8v 2 K v B . ` WWv2K \l = v" ! B  ` v2K \l = v" ` B ` Provable (pB q) ` \l = 0" ! Provable (pB q): In any case ` \l = 0" ! Provable (pB q), thus ` \l = 0" ! [\w 2B " ! Provable (pB q)] ; and we are done. 

3.12 Lemma. ` Prv (y) $ Provable (y) Proof. Since w 4 B ) w 2B , one can demonstrate in PA that Prv and Provable can di er only on godelnumbers of some B  's such that 2B 2 Ad(A). For such B  by Lemma 3.10

` \l = w" ! [\w 2B " $ Pr (pB q)] : By Lemma 3.11 we get ` \Wl = w" ! [Provable (pB q) $ Pr (pB q)] ` w2K \l = w" ! [Provable (pB q) $ Pr (pB q)] and as W \l = w"; ` w2K

and we are done.



20

3.13 Lemma. Cpl (x; y) is a standard complexity predicate. Proof. By FPE Cpl 2  . Let us prove ` u  v ! [Cpl (u; y) ! Cpl (v; y)] : 0 1

All the following reasonings are formalizable in PA. 1. u = 0 ) :Cpl (u; y); 2. If 0 < u  v  N , then two cases are possible:  y is not equal to any B  such that 4 u B 2 Ad(A), hence :Cpl (u; y);  y = pB q for some such B . Then u  v ) 8w(w 4 u B ) w 4 v B ); hence Cpl (u; y) ! Cpl (v; y); 3. u  N < v. This case is similar to 2. but here we have 8w(w 4 u B ) w 2B ); 4. If u > N , then v > N and by the de nition of Cpl we get Cpl (u; y) $ Cpl (v; y). The other conditions on a standard complexity predicate follow from Lemma 3.12 and from the properties of Provable . 

3.14 Lemma. Prf is a standard proof predicate and Prf and Cpl are provably

compatible. Proof. The recursiveness follows from the de nition. We'll prove ` Pr (y) $ Provable (y), what will imply all other conditions required. From the de nition N0 _ _ ` Pr (y) $ Provable (y) _ (y = pCj q): i=0 j 2Ii

But for all i; j 2 Ii and w 2 K w 2pi Cj , hence w Cj , then by Lemma 3.10 ` Ww2K \l = w" ! Cj  ` Cj  ` Provable (pCj  q)  Let us now complete the proof of the Theorem 3.8. Lemmas 3.13 and 3.14 provide that the interpretation  is de ned correctly. If K is a countermodel for A, then there is w such that w 6 A. Thus ` \l = w" ! :A . Now if PA ` A , then PA ` \l 6= w", that contradicts the Solovay lemma.  21

Comment

As usual, the truth cases for E and BE called E ! and BE ! whose axioms are all the theorems of E and BE , the axiom scheme 2A ! A and the only rule is R0, are complete with respect to all arithmetical interpretations:

3.15 Theorem. E ! ` A () for every interpretation  A is true. BE ! ` A The proof goes like that in [2]. It looks now a routine exercise to incorporate the functionality property into the logic of recursively enumerable complexity predicates by combining the technique from chapters 2 and 3.

References [1] S. Artemov, \Logic of Proofs," Annals of Pure and Applied Logic,vol. 67, pp. 29-59, 1994. [2] D. Guaspari and R. M. Solovay, \Rosser sentences," Annals of Mathematical Logic, vol. 16, pp. 81{99, 1979. [3] J. Lassez, M. Maher, and K. Marriott, \Uni cation revisited," in Foundations of Deductive Databases and Logic Programming (J. Minker, ed.), ch. 15, pp. 587{625, Morgan Kaufmann Publishers, Inc., 1987. [4] R. Magari, \The diagonalizable algebras (the algebraization of the theories which express Theor.:II)." Bolletino della Unione Matematica Italiana. Serie IV 12 (1975) Supplimento al fasc. 3, pp. 117-125, 1975. [5] R. M. Solovay, \Provability interpretations of modal logic," Israel Journal of Mathematics, vol. 25, pp. 287{304, 1976.

22