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
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
8.3. UNIFICAZIONE 179<br />
poi sarebbe elim<strong>in</strong>ato con due risoluzioni con la seconda, ma sarebbe P (x1)∨<br />
¬P (x2), ancora con due letterali; solo unificando i due letterali pos<strong>it</strong>ivi con<br />
uno negativo, o con entrambi i negativi, si arriva alla clausola vuota; da qui<br />
la formulazione della regola.<br />
Tuttavia nell’esecuzione manuale si può talvolta ev<strong>it</strong>are <strong>di</strong> applicare alla<br />
risolvente la r<strong>in</strong>om<strong>in</strong>a, quando sia certo che i letterali che vi compaiono non<br />
dovranno o potranno più essere risolti con letterali <strong>di</strong> clausole già presenti a<br />
variabili non <strong>di</strong>sgiunte.<br />
Si potrebbe ev<strong>it</strong>are la r<strong>in</strong>om<strong>in</strong>a supponendo <strong>di</strong> avere a <strong>di</strong>sposizione tante<br />
copie <strong>di</strong>verse delle clausole <strong>in</strong>iziali, cosa che è sempre possibile perché ∀xC è<br />
equivalente a ∀xC ∧ ∀yC[x/y], copie che si potrebbero produrre al momento<br />
del bisogno; non si risolverebbe tuttavia il problema dell’eventuale risoluzione<br />
con clausole precedentemente ottenute.<br />
Valgono le proprietà <strong>di</strong> correttezza e completezza per la risoluzione con<br />
variabili: un <strong>in</strong>sieme <strong>di</strong> clausole è <strong>in</strong>sod<strong>di</strong>sfacibile se e solo se da esso è<br />
derivabile la clausola vuota.<br />
Per la <strong>di</strong>mostrazione della completezza, un ruolo essenziale gioca il seguente<br />
Lemma 8.3.10 (Lift<strong>in</strong>g). Se C1 ∪ C2 è la risolvente proposizionale <strong>di</strong> due<br />
clausole chiuse C1 ∪ {L} e C2 ∪ {L c } provenienti, con due sost<strong>it</strong>uzioni θ1 e<br />
θ2, dalle clausole con variabili <strong>di</strong>sgiunte<br />
e<br />
dove<br />
e<br />
C ′ 1 ∪ {L(t11, . . . , t1n), . . . , L(th1, . . . , thn)}<br />
C ′ 2 ∪ {L c (s11, . . . , s1n), . . . , L c (sk1, . . . , skn)}<br />
{L(t11, . . . , t1n), . . . , L(th1, . . . , thn)}θ1 = {L}<br />
L c (s11, . . . , s1n), . . . , L c (sk1, . . . , skn)}θ2 = {L c },<br />
allora se C ′ 1σ ∪ C ′ 2σ è la risolvente <strong>di</strong> queste due clausole, esiste una sost<strong>it</strong>uzione<br />
λ tale che (C ′ 1σ ∪ C ′ 2σ)λ = C1 ∪ C2.<br />
Dimostrazione. Se D ′ 1 e D ′ 2 sono le due clausole con variabili a cui sono<br />
applicate θ1 e θ2, l’enunciato del lift<strong>in</strong>g è riassunto dal seguente <strong>di</strong>agramma:<br />
D ′ 1, D ′ <br />
<br />
<br />
2<br />
σ C<br />
θ1 θ2<br />
′ 1σ ∪ C ′ <br />
<br />
<br />
<br />
<br />
<br />
<br />
2σ<br />
λ<br />
C1 ∪ {L}, C2 ∪ {Lc <br />
} C1 ∪ C2