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.
156 CAPITOLO 7. LINGUAGGI PREDICATIVI<br />
Ovviamente, per la commutativ<strong>it</strong>à <strong>di</strong> ∧ e ∨, la formula senza la variabile<br />
libera può essere sia la prima sia la seconda della congiunzione e rispettivamente<br />
<strong>di</strong>sgiunzione. Invece il con<strong>di</strong>zionale non è commutativo. Tuttavia<br />
esistono leggi riguardanti i quantificatori nell’antecedente, forse a prima vista<br />
sorprendenti:<br />
∀x(A → B) ≡ ∃xA → B<br />
e<br />
∃x(A → B) ≡ ∀xA → B<br />
se x non occorre libera <strong>in</strong> B.<br />
La prima legge corrisponde al seguente uso l<strong>in</strong>guistico: quando si <strong>di</strong>ce<br />
che qualche cosa, espressa da B, <strong>di</strong>pende solo dal fatto che (l’<strong>in</strong>sieme <strong>di</strong><br />
ver<strong>it</strong>à <strong>di</strong>) A non sia vuoto, e non da un particolare elemento (come sarebbe<br />
se x occorresse <strong>in</strong> B e dovesse sod<strong>di</strong>sfarla), allora si può enfatizzare che<br />
qualunque elemento va bene. Se si afferma “se uno ha un amico è felice” —<br />
∃xA(x, y) → F (y) — si vuol <strong>di</strong>re che qualunque sia l’amico, anche un cane,<br />
porta felic<strong>it</strong>à (a y).<br />
Dimostriamo la prima (l’altra è analoga)<br />
Dimostrazione. Si supponga che l’enunciato (per semplic<strong>it</strong>à) ∃xA(x) → B<br />
sia vero, qu<strong>in</strong><strong>di</strong> B vero o ∃xA falso. Se B è vero, anche allora A → B è<br />
sod<strong>di</strong>sfatta da ogni assegnazione, e ∀xA → B è vero. Se ∃xA è falso, ogni<br />
assegnazione sod<strong>di</strong>sfa A → B, e ∀xA → B è vero.<br />
Se <strong>in</strong>vece ∃xA → B è falso, allora B è falso e ∃xA è vero, qu<strong>in</strong><strong>di</strong> almeno<br />
una assegnazione sod<strong>di</strong>sfa A. Questa assegnazione rende falso il con<strong>di</strong>zionale<br />
A → B, per cui ∀x(A(x) → B) non è vero.<br />
Esempio 7.2.9. Deduzione naturale <strong>di</strong> ∃xA → B ⊢ ∀x(A → B).<br />
Supponiamo che le due formule siano enunciati.<br />
1 ∃xA → B assunzione<br />
2 A assunzione da scaricare a 5<br />
3 ∃xA (I∃) da 2<br />
4 B (MP) da 1 e 3<br />
5 A → B (I→) da 2 e 4<br />
6 ∀x(A → B) (I∀) da 5<br />
Le equivalenze che permettono <strong>di</strong> spostare all’<strong>in</strong>terno i quantificatori permettono<br />
anche <strong>di</strong> spostarli all’esterno; si ottiene così che ogni formula è<br />
equivalente ad una formula <strong>in</strong> cui tutti i quantificatori sono all’<strong>in</strong>izio — e<br />
formano il cosiddetto prefisso — segu<strong>it</strong>i da una formula senza quantificatori<br />
— detta matrice; una formula scr<strong>it</strong>ta <strong>in</strong> questo modo <strong>di</strong> <strong>di</strong>ce <strong>in</strong> forma<br />
prenessa.