10.06.2013 Views

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

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

22 CAPITOLO 1. LINGUAGGI<br />

Che i numeri siano due non risulta dallo scrivere ∃x∃y ma da x = y + 1<br />

che implica x = y (lo si deduce facilmente dagli assiomi dei numeri naturali);<br />

si potrebbe anche scrivere:<br />

∃x(pr(x) ∧ pr(x + 1)),<br />

dando per scontato, come sopra, che x = x + 1.<br />

Esempio 1.1.32. “Un numero è primo se e solo se è maggiore <strong>di</strong> 1 ed è<br />

<strong>di</strong>visibile solo per 1 e per se stesso”.<br />

Per esprimere questa che è la def<strong>in</strong>izione <strong>di</strong> un nuovo pre<strong>di</strong>cato usiamo<br />

un nuovo simbolo pr(x) e scriviamo<br />

∀x(pr(x) ↔ x > 1 ∧ ∀z(z|x → z = 1 ∨ z = x))<br />

Esempio 1.1.33. “2 è l’unico numero primo pari”.<br />

“Numero pari” significa “<strong>di</strong>visibile per 2”. La frase si può trasformare <strong>in</strong><br />

“2 è primo e pari e se un numero è primo e pari allora è uguale a 2”. Qu<strong>in</strong><strong>di</strong><br />

pr(2) ∧ 2|2 ∧ ∀x(pr(x) ∧ 2|x → x = 2).<br />

Esempio 1.1.34. “3 è <strong>di</strong>spari”<br />

Il pre<strong>di</strong>cato “<strong>di</strong>spari” si può def<strong>in</strong>ire come “non pari” e qu<strong>in</strong><strong>di</strong><br />

¬2|3,<br />

o meglio ¬(2|3) perché ¬ non si confonda con un segno ar<strong>it</strong>metico 11 , oppure<br />

<strong>di</strong>cendo che un numero <strong>di</strong>spari è della forma 2 · y + 1, e <strong>in</strong> ar<strong>it</strong>metica si<br />

<strong>di</strong>mostra che le due def<strong>in</strong>izioni sono equivalenti, qu<strong>in</strong><strong>di</strong><br />

∃y(3 = 2 · y + 1).<br />

Esempio 1.1.35. “Ogni primo maggiore <strong>di</strong> 2 è <strong>di</strong>spari”<br />

è un caso <strong>di</strong> quantificatore ristretto, ma lo si può restr<strong>in</strong>gere <strong>in</strong> due mo<strong>di</strong>:<br />

ai numeri primi oppure ai numeri primi maggiori <strong>di</strong> 2. Il pre<strong>di</strong>cato “essere<br />

primo maggiore <strong>di</strong> 2” si può def<strong>in</strong>ire con (pr(x) ∧ x > 2) e si ha allora, se si<br />

scrive <strong>di</strong>sp(x) per “x è <strong>di</strong>spari ”,<br />

∀x((pr(x) ∧ x > 2) → <strong>di</strong>sp(x)).<br />

Oppure se si restr<strong>in</strong>ge solo ai primi si deve scrivere<br />

∀x(pr(x) → (x > 2 → <strong>di</strong>sp(x))).<br />

In questo caso le parentesi <strong>in</strong>terne servono a evidenziare la composizione<br />

corretta della frase me<strong>di</strong>ante le due occorrenze del con<strong>di</strong>zionale.<br />

11 Che non si legga ¬2 come “<strong>di</strong>verso da 2”.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!