• Nenhum resultado encontrado

To Prove a Tautology E. H. Manfredini and M. A. Martins

N/A
N/A
Protected

Academic year: 2023

Share "To Prove a Tautology E. H. Manfredini and M. A. Martins"

Copied!
6
0
0

Texto

(1)

To Prove a Tautology

E. H. Manfredini and M. A. Martins

Departamento de Matem´atica Universidade de Aveiro

3810-193 AVEIRO

e-mail: hernandez@mat.ua.pt, martins@mat.ua.pt

Abstract

We present a flow-chart that describes how to con- struct a proof for any given tautology, corresponding to a particular constructive proof of the Complete- ness Theorem for the Propositional Calculus.

Keywords: Propositional Calculus, Complete- ness Theorem.

1 Introduction

We have often found that our undergraduates, after being shown a constructive proof of the Completeness Theorem (CT) for the Propositional Calculus, have difficulties in seeing that it provides an algorithm to construct a proof for any given tautology. Obviously the task of setting the algorithm in motion is still harder. To help overcome the difficulty we have de- veloped a simple flow chart that displays in more de- tail the constructive character of the proof. The chart we present here follows the lines of the propositional calculus found in Shoenfield [3].

The process starts by examining a tautology A. From here it proceeds to construct a proof ofAback- wards. Ais broken down into simpler formulae, which in turn are broken down into simpler formulae, etc.

Each step of the operation prescribes how one can obtain a proof of any formula being dealt with from, a previous one. This goes on until arriving to a dis- junction of variables or negations of variables. At this point, Theorem 11, part I, tells us how to construct

a proof of the latter.

The different steps are described by corresponding theorems and their proofs, which taken together lead to CT. The theorems consist of two kinds. Theorems of the first kind linearly prescribe how the proof of a statement S can be enlarged to the proof of an- other statementT. Those of the second kind, having proofs by induction, prescribe how this enlargement is performed via a recursive process. Correspond- ing to the latter, there are essentially two recursive processes: One brings a formula forming part of a disjunction to the foremost position in the formula (Theorem 8). The other, given by Theorem 11, after classifying that formula in three types, breaks down each of these into simpler formulae until obtaining a chain of disjunctions of variables or negations of vari- ables. Each of those types gives rise to corresponding loops in the flow chart. The induction in this case is on a certain well-founded relation on formulae, whose atoms are the aforementioned chains. Constraints on space do not allow for showing detailed proofs, except for Theorem 4, whose proof we give as an example, and Theorem 11, due the prominent rˆole that plays in the algorithm. As for the rest, they can be found in Manfredini [2].

2 Propositional Calculus

Amongst the several versions of the propositional cal- culus we adopt here the one offered in Shoenfield [3], which we callP.

(2)

2.1 Syntax

The symbols ofP are as follows:

Propositional variables: p, q, r, s, t, p1, . . .

Connectives: ¬, ∨.

Parentheses: (, ).

The set of formulae Flas(P) is defined in the usual way. The logic of P consists of all axioms of form

¬A∨Atogether with the followingrules of inference: A

B∨A Expansion

A∨A A Contraction A∨(B∨C)

(A∨B)∨C Associativity

A∨B ¬A∨C B∨C

Cut

We recall that atheorem of P is the last formula of a finite sequence of formulaeA1, . . . , An such that for eachi≤n,Ai is an axiom orAi can be obtained from {Aj : j < i} by using a rule of inference. As usual, A means that A is a theorem of P. The sequenceA1, . . . , An is calleda proof of A.

2.2 Semantics

Semantics is the aspect ofP that gives meaning to the symbols. We use 0 and 1 to representfalse and true, respectively. The set TV ={0,1}is called the set oftruth values. Let us define the following oper- ations on TV.

0 1 1 0

0 1

0 0 1

1 1 1

A valuation is any mapping f : V ar(P) TV.

A valuationf induces, in a natural way, a mapping f : Flas(P)TV defined by

f(a) =f(a), a∈V ar(P);

f(¬A) =f(A);

f(A∨B) =f(A)f(B).

A formula Ais called a tautology iff(A) = 1, for each valuationf. We writeT aut(A) to mean thatA is a tautology.

3 Completeness Theorem

The soundness of P under this interpretation (i.e.

any theorem of P is a tautology) can be easily checked. The proof of the reciprocal statement:

THEOREM

(Completeness Theorem) T aut(A) ⇒ A.

is harder. It requires a rather long list of theorems and, as it has been mentioned in the introduction, is a constructive proof.

Theorem 1 (Commutative Rule) A∨B ⇒ B∨A.

Theorem 2

A∨B ⇒ ¬¬A∨B.

Theorem 3 (Left-right Associativity) (A∨B)∨C ⇒ A∨(B∨C). Theorem 4

¬A∨C & ¬B∨C ⇒ ¬(A∨B)∨C.

Proof.

¬A∨C ¬B∨C

¬(A∨B)(A∨B) (A∨B)∨ ¬(A∨B) A∨(B∨ ¬(A∨B)) (B∨ ¬(A∨B))∨C B∨(¬(A∨B)∨C)

¬(A∨B)(B∨(¬(A∨B)∨C)) (B∨(¬(A∨B)∨C))∨ ¬(A∨B) B∨((¬(A∨B)∨C)∨ ¬(A∨B)) ((¬(A∨B)∨C)∨ ¬(A∨B))∨C (¬(A∨B)∨C)(¬(A∨B))∨C) ¬(A∨B)∨C

(3)

Theorem 5

(B∨C)∨A (C∨B)∨A.

Theorem 6

A∨(B∨(C∨D)) ⇒ C∨(A∨(B∨D)). Theorem 7

A∨((B∨C)∨D) ⇒ A∨(B∨(C∨D)). We introduce next some notations that will be use- ful in the sequel.

Definition 1 Let S =S1, . . . , Sn be a sequence of formulae. Then,

i. S1∨S2∨ · · · ∨Sn =S1(S2(· · · ∨Sn));

ii.

S =

S1, n= 1;

S1

S2, . . . , Sn , n= 1.

iii. n

i=1Si=

S1, . . . , Sn . iv.

k=iSk =

Sk : 1 ≤k n, k = i , if n 2 and1≤i≤n.

v. ¬V ar (P) ={¬a:a∈V ar(P)}. vi. Q1, . . . , Qm ◦ S1, . . . , Sn =

Q1, . . . , Qm, S1, . . . , Sn .

One can see that Definition 1 (ii) provides a bijec- tion between the set of sequences of formulae and the set of formulae. Observe that given a formulaA, we can obtain the corresponding sequence seq(A) via:

seq(A) =A , ifA∈V ar(P);

seq(¬B) =¬B;

seq(BC) =Bseq(C).

Let us denote by T the set of all sequences S = S1, . . . , Sn such that

S is a tautology.

Theorem 8 For all n≥2and for alli∈ {1, . . . , n}

A1∨A2∨ · · · ∨An ⇔ Ai

k=iAk. Theorem 9 For all n≥ 1 and for all valuationf, f(A1∨A2∨ · · · ∨An) = 1if and only if f(Ai) = 1, for somei.

Theorem 10 For all n 2, if for each i {1, . . . , n},Si is a variable or the negation of a vari- able, then T aut(S1∨S2 ∨ · · · ∨Sn) if and only if Si=¬Sj, for somei, j∈ {1,2, . . . , n} .

In words, this theorem can be stated as:

A disjunction of variables or negations of variables is a tautology if and only if one of these variables occurs together with its negation.

Definition 2 (Number of occurrence of

connectives in formulae and sequences) Let A Flas(P). We define the number the occurrences of connectives inA as follows

ifA∈V ar(P), noc(A) = 0;

ifA=¬B, noc(A) = 1 +noc(B);

ifA=B∨C, noc(A) =noc(B) + 1 +noc(C). IfS1, . . . , Sn is a sequence of formulae, the num- ber the occurrences of connectives in S1, . . . , Sn , denoted byNOC(S1, . . . , Sn , isn

i=1noc(Si).

Lemma 1 LetS =S1, . . . , Sn be a sequence of for- mulae. Then,

i. T aut(

¬¬B, S2, . . . , Sn ) T aut(

B, S2, . . . , Sn ). ii. T aut(

B∨C, S2, . . . , Sn ) T aut(

B, C, S2, . . . , Sn ). iii. T aut(

¬(B∨C), S2, . . . , Sn ) T aut(

¬B, S2, . . . , Sn ). iv. T aut(

¬(B∨C), S2, . . . , Sn T aut(

¬C, S2, . . . , Sn ). v. T aut(

S1, . . . , Sn ) T aut(

Sj ◦ Si:i=j,1≤i≤n ), 1≤j≤n. This lemma suggests the definition of the following binary relation onT.

Definition 3 Let S =S1, . . . , Sn be a sequence of formulae. We define the binary relation R on T as follows

i. B, C, S2, . . . , Sn RB∨C, S2, . . . , Sn .

(4)

ii. B, S2, . . . , Sn R¬¬B, S2, . . . , Sn . iii. ¬B, S2, . . . , Sn (B∨C), S2, . . . , Sn . iv. ¬C, S2, . . . , Sn (B∨C), S2, . . . , Sn .

v. Sj ◦ Si :i=j,1≤i≤n RS1, . . . , Sn , if n 2, j = 1, Sj ∈/ V ar(P)∪¬V ar (P) and Sk∈V ar(P)∪¬V ar (P), parak < j.

In the last clause, the first sequence is obtained from the second one by bringing to its foremost po- sition the first formula which is not a variable nor a negation of a variable.

The previous lemma guarantees that whenever W R W, if

W belongs to T then

W also be- longs toT.

In order to perform induction onR, R has to be well-founded. This is stated in the following proposi- tion.

Proposition 1 ([2]) Ris well founded.

This statement can be obtained from the well foundedness of the relation NOC(P) NOC(S).

Note that the atoms of R are the sequences S1, . . . , Sn such thatT aut(n

i=1Si),andSi∈V ar(P)

¬V ar(P), i.e. the finite sequences of variables and negation of variables such that their disjunction is a tautology.

Theorem 11 (Completeness Theorem) T aut(A) ⇒ A.

Proof. (Induction onR.) LetAbe a tautology and S=S1, . . . , Sn = seq(A). ThenS∈ T.

(I) If S is an atom of R, i.e. Si ¬V ar (P) V ar(P),1≤i≤n., from Theorem 10,Ai=¬Aj, for somei, j∈ {1,2, . . . , n}. Hence,Ai∨Aj =¬Aj∨Aj. That is,Ai∨Aj is an axiom. Thus, Ai∨Aj. By the expansion and commutativity rules,

(Ai∨Aj) k=i,jAk

. Consequently,Ai Aj

k=i,jAk

. From Theorem 8, Ai k=iAk and alsoA1∨ · · · ∨An.

(II) If S is not an atom, suppose that for any sequence Q1, . . . , Qm ∈ T, Q1, . . . , Qm R S1, . . . , Sn implies

Q. (Induction hypothesis)

Letibe the first natural such thatAi is neither a variable nor the negation of a variable. After Theo- rem 8, without loss of generality we can assume that i= 1.

We split the situation in three cases:

Case 1. S1 is of the formB∨C; Case 2. S1 is of the form¬¬B; Case 3. S1 is of the form¬(B∨C).

Note that S1 is a negation, is can not be a nega- tion of a variable, hence it has to be a negation of a negation or of a disjunction. This justifies the cases 2. and 3. .

Case 1. If S1 =B∨C, from the hypothesis we have T aut((B∨C)(S2· · · ∨Sn)). Hence, T aut(B

(C∨(S2· · · ∨Sn))). The induction hypothesis im- plies thatB∨(C∨(S2· · · ∨Sn)). Using the asso- ciativity rule we get(B∨C)(S2· · · ∨Sn).

Case 2. IfS1=¬¬B, by hypothesisT aut(¬¬B∨ (S2· · ·∨Sn)), and thenT aut(B∨(S2· · ·∨Sn)). Using the induction hypothesis we getB∨(S2· · · ∨Sn).

Therefore, from Theorem 2, ¬¬B∨(S2· · · ∨Sn).

Case 3. If S1 = ¬(B C), by hypothesis T aut(¬(B∨C)(S2· · · ∨Sn)). Hence,

T aut(¬B∨(S2· · · ∨Sn)),(α) (3.1) and

T aut(¬C∨(S2· · · ∨Sn)). (3.2) The induction hypothesis applied to (3.1) and to (3.2) respectively gives

¬B∨(S2· · · ∨Sn), (3.3) and

¬C∨(S2· · · ∨Sn). (3.4) Using Theorem 4, with (3.3) and (3.4), we obtain ¬(B∨C)(S2· · · ∨Sn).

(5)

Input A

All disjuncts are vars. or negs. of vars.

?

Goto Theorem 11 (I) Let

i = 1st sub-index s.t. Ai is not a var. nor a neg. of a var.

Goto Teorema 8:

From AivA1vA2..

build the proof of A1vA2...

Ai =...?

B v C

A :=B v(Cv ...) A := B v (A1 v ...) A := B v A1v ...

(B v C) B

(* ) Begin

End No Yes

Develop the proof as prescribed in Theorem 11

A := C v A1v ...

Figure 1: Flow-chart.

(6)

3.1 Example

In this section we apply our algorithm to the formula A=¬(¬p∨q)(¬(r∨p)(r∨q)). It is easy to see thatA is a tautology, and thus a theorem ofP. We shall construct a proof of this formula. Following the Flow-chart:

Input: A=¬(¬p∨q)(¬(r∨p)(r∨q)) No

i=1 (T8 – Do nothing!)

Using Theorem 4 and the proofs ofF1=¬¬p∨(¬(r∨

p)(r∨q)) and F2 =¬q∨(¬(r∨p)(r∨q)) we construct the proof ofA.

Namely, we have

¬¬p(¬(rp)(rq)) ¬q(¬(rp)(rq)) ¬(¬pq)(¬pq) (¬pq)∨ ¬(¬pq) ¬p(q∨ ¬(¬pq))

(q∨ ¬(¬pq))(¬(rp)(rq)) q(¬(¬pq)(¬(rp)(rq)))

¬(¬pq)(q(¬(¬pq)(¬(rp)(rq)))) (q(¬(¬pq)(¬(rp)(rq))))∨ ¬(¬pq) q((¬(¬pq)(¬(rp)(rq)))∨ ¬(¬pq))

((¬(¬pq)(¬(rp)(rq)))∨ ¬(¬pq))(¬(rp)(rq)) (¬(¬pq)(¬(rp)(rq)))(¬(¬pq))(¬(rp)(rq))) ¬(¬pq)(¬(rp)(rq))

Now repeat the procedure to get proofs ofF1 and F2.

F1 =¬¬p(¬(rp)(rq)) Goto (*)

No i=1 (T8 – Do nothing!) p(¬(rp)(rq)) ¬¬p∨ ¬p

¬p∨ ¬¬p

(¬(rp)(rq))∨ ¬¬p ¬¬p(¬(rp)(rq)) p(¬(rp)(rq))

Goto (*) No i=2 T8

.. .

¬(rp)(p(rq)) ¬r(p(rq))

¬p(p(rq)) ¬(rp)(rp) (rp)∨ ¬(rp) r(p∨ ¬(rp))

(p∨ ¬(rp))(p(rq)) p(¬(rp)(p(rq)))

¬(rp)(p(¬(rp)(p(rq)))) (p(¬(rp)(p(rq))))∨ ¬(rp) p((¬(rp)(p(rq)))∨ ¬(rp)) ((¬(rp)(p(rq)))∨ ¬(rp))(p(rq)) (¬(rp)(p(rq)))(¬(rp))(p(rq))) ¬(rp)(p(rq))

F11 =¬r(p(rq)) Yes T11 ¬rr

(¬rr)(pq) ¬r(r(pq)) ..

.

¬r(p(rq))

F12 =¬p(p(rq)) Yes T11 ¬pp (¬p∨p)(rq) ¬p(p(rq)) ..

.

¬p(p(rq))

ForF2 we have

F2 =¬q(¬(rp)(rq)) Goto (*)

No i=2 T8

.. .

¬(rp)(¬q(rq)) ¬r(¬q(rq))

¬p(¬q(rq)) ¬(rp)(rp) (rp)∨ ¬(rp) r(p∨ ¬(rp))

(p∨ ¬(rp))(¬q(rq)) p(¬(rp)(¬q(rq)))

¬(rp)(p∨(¬(rp)(¬q(rq)))) (p(¬(rp)(¬q(rq))))∨ ¬(rp) p((¬(rp)(¬q(rq)))∨ ¬(rp))

((¬(rp)(¬q(rq)))∨ ¬(rp))(¬q(rq)) (¬(rp)(¬q(rq)))(¬(rp))(¬q(rq))) ¬(rp)(¬q(rq))

F21 =¬r(¬q(rq)) Yes

T11 ¬rr

(¬rr)(¬qq) ¬r(r(¬qq)) ..

.

¬r(¬q(rq))

F22 =¬p(¬q(rq)) Yes

T11 ¬qq

(¬qq)(¬pr) ¬q(q(¬pr)) ..

.

¬p(¬q(rq))

References

[1] Hern´andez-Manfredini, E.G., Linguagens Reg- ulares e Aut´omatos. Cadernos de Matem´atica, CM99/ D-16, Departamento de Matem´atica, Universidade de Aveiro.

[2] Hern´andez-Manfredini, E.G., Fundamentos do C´alculo Proposicional.Cadernos de Matem´atica, CM02/ D-07, Departamento de Matem´atica, Universidade de Aveiro.

[3] Shoenfield, J.R., Mathematical Logic, Addison Wesley. 1967.

Referências

Documentos relacionados

These and other findings led support to the view that natural distribution of Saccharomyces species is associated with the distribution of oaks and that the oak system

Todo ser humano, como membro da sociedade, tem direito à segurança social, à realização pelo esforço nacional, pela cooperação internacional e de acordo com a organização

Um novo modelo de atenção à saúde de acordo com os Cadernos de Atenção Básica – Saúde na Escola 5 , foi adotado a partir da intersetorialidade entre a escola e o

A empresa vencedora poderá retirar o instrumento equivalente (Nota de Empenho) na Reitoria do IFRJ à Rua Pereira de Almeida, 88 - Praça da Bandeira - Rio de Janeiro/RJ. A

This study investigates the performance of the Dividend Discount Model (DDM), the Residual Income Valuation Model (RIVM) and two multiples based valuation methods, Forward

[r]

A análise das Figuras 117 a 119 permite concluir que a inspeção por partículas magnéticas via úmida colorida foi capaz de detectar todas as descontinuidades

Este resultado também foi verificado por Chu e Chan (2003), que reporta o pH ótimo para o tratamento de efluentes via processo Foto-Fenton, apresentando baixa