Logica Matematica Corso di Laurea in Informatica ... - Mbox.dmi.unict.it
Logica Matematica Corso di Laurea in Informatica ... - Mbox.dmi.unict.it
Logica Matematica Corso di Laurea in Informatica ... - Mbox.dmi.unict.it
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
114 CAPITOLO 5. CALCOLO DELLA RISOLUZIONE<br />
un <strong>in</strong>sieme è <strong>in</strong>sod<strong>di</strong>sfacibile esiste una sua refutazione che ha come top una<br />
clausola particolare scelta da noi.<br />
Questo è vero, come vedremo, nella forma: se S è <strong>in</strong>sod<strong>di</strong>sfacibile e S\{C}<br />
è sod<strong>di</strong>sfacibile, allora esiste una refutazione <strong>di</strong> S con top C. Il risultato è<br />
anche operativamente significativo e importante, perché gli <strong>in</strong>siemi <strong>di</strong> clausole<br />
su cui normalmente si lavora derivano da una s<strong>it</strong>uazione del genere: si ha<br />
una teoria con assiomi {A1, . . . , An} che si sa o si presume consistente, e si<br />
vuole sapere se A1, . . . , An |= B, trasformando il problema <strong>in</strong> quello della<br />
<strong>in</strong>sod<strong>di</strong>sfacibil<strong>it</strong>à <strong>di</strong> {A1, . . . , An, ¬B}; allora ¬B è il can<strong>di</strong>dato top della<br />
refutazione (almeno se A1, . . . , An, ¬B sono clausole).<br />
Per la <strong>di</strong>mostrazione serve una versione più forte, anche se non operativa,<br />
<strong>in</strong> cui si possa assumere una clausola qualunque come top; a questa si arriva<br />
con il concetto <strong>di</strong> <strong>in</strong>sieme <strong>in</strong>sod<strong>di</strong>sfacibile m<strong>in</strong>imale. Un <strong>in</strong>sieme S <strong>di</strong> clausole<br />
si <strong>di</strong>ce <strong>in</strong>sod<strong>di</strong>sfacibile m<strong>in</strong>imale se S è <strong>in</strong>sod<strong>di</strong>sfacibile e ogni S ′ ⊂ S è<br />
sod<strong>di</strong>sfacibile.<br />
Ogni <strong>in</strong>sieme <strong>in</strong>sod<strong>di</strong>sfacibile <strong>di</strong> clausole contiene un sotto<strong>in</strong>sieme <strong>in</strong>sod<strong>di</strong>-<br />
sfacibile m<strong>in</strong>imale (esercizio). Anzi, per ogni <strong>in</strong>sieme S <strong>in</strong>sod<strong>di</strong>sfacibile e tale<br />
che S \ {C} è sod<strong>di</strong>sfacibile, esiste un sotto<strong>in</strong>sieme <strong>in</strong>sod<strong>di</strong>sfacibile <strong>di</strong> S che<br />
contiene C ed è tale che ogni suo sotto<strong>in</strong>sieme che contiene C è sod<strong>di</strong>sfacibile<br />
(esercizio).<br />
Possiamo ora enunciare<br />
Teorema 5.1.11 (Completezza). Se S è <strong>in</strong>sod<strong>di</strong>sfacibile e S \ {C} è sod<strong>di</strong>sfacibile,<br />
allora esista una refutazione l<strong>in</strong>eare or<strong>di</strong>nata <strong>di</strong> S con top C.<br />
Dimostrazione. Possiamo supporre che S sia <strong>in</strong>sod<strong>di</strong>sfacibile m<strong>in</strong>imale, nel<br />
senso detto sopra, vale a <strong>di</strong>re ogni suo sotto<strong>in</strong>sieme proprio che contiene C è<br />
sod<strong>di</strong>sfacibile.<br />
Sia C della forma m ∨ D ∨ l (se C è un<strong>it</strong>aria uguale a l si procede come<br />
sotto, identificando M ed l). Si consideri Smc che è <strong>in</strong>sod<strong>di</strong>sfacibile, e si<br />
osservi che Smc \ {D ∨ l} è sod<strong>di</strong>sfacibile. Infatti se i è un’<strong>in</strong>terpretazione<br />
che sod<strong>di</strong>sfa S \ {C}, ma non C altrimenti sod<strong>di</strong>sferebbe S, allora i(m) = 0;<br />
allora cancellando m da clausole <strong>di</strong> S \ {C} sod<strong>di</strong>sfatte da i per ottenere<br />
Smc \ {D ∨ l} si ottengono clausole ancora sod<strong>di</strong>sfatte da i.<br />
Per ipotesi <strong>in</strong>duttiva, esiste una refutazione l<strong>in</strong>eare or<strong>di</strong>nata <strong>di</strong> S mc<br />
top D ∨ l. Re<strong>in</strong>troduciamo m nelle clausole da cui era stato tolto, nella<br />
stessa posizione <strong>in</strong> cui era quando è stato tolto, per riavere le stesse clausole<br />
<strong>di</strong> S; ma m è re<strong>in</strong>trodotto qu<strong>in</strong><strong>di</strong> all’<strong>in</strong>izio del top, ed essendo all’<strong>in</strong>izio m<br />
si trasmette lungo l’albero <strong>di</strong> derivazione restando sempre al primo posto e<br />
non <strong>in</strong>terferendo con le risoluzioni compiute. Si ottiene così una derivazione<br />
per risoluzione l<strong>in</strong>eare or<strong>di</strong>nata da S <strong>di</strong> m con top C.<br />
con