Logica matematica/Calcolo delle proposizioni/Sistema di Hilbert: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Riga 108:
In secondo luogo, esso ci fornisce la possibilità di trattare generiche derivazioni da insiemi di formule come teoremi. Infatti, in virtù della proprietà di compattezza di <math>\vdash</math>, abbiamo che, se <math>\Gamma \vdash A</math>, allora esiste un insieme finito <math>\Gamma_0 \subseteq \Gamma</math> tale che <math>\Gamma_0 \vdash A</math>. Siccome <math>\Gamma_0</math> è finito, sarà del tipo <math>\{A_1,...,A_n\}</math>, o equivalentemente <math>\{A_1 \and ... \and A_n\}</math>, quindi <math>\Gamma \vdash A</math> implica <math>\Gamma_0 \vdash A</math>, che equivale a <math>A_1 \and ... \and A_n \vdash A</math> e <math>A_1,...,A_n \vdash A</math>. Per il teorema di deduzione, otteniamo <math>\vdash (A_1 \and ... \and A_n) \to A</math> e <math>\vdash A_1 \to(... \to (A_n \to A)...)</math>.
== Consistenza ==▼
Introduciamo ora la nozione di ''consistenza''.▼
==== Insieme di formule consistente ====▼
{{Definizione|▼
Un insieme di formule proposizionali <math>\Gamma</math> è ''consistente'' sse è verificata una delle seguenti proprietà:▼
# non esiste una proposizione <math>A</math> tale che <math>\Gamma \vdash A</math> e <math>\Gamma \vdash \neg A</math>;▼
# esiste una proposizione <math>A</math> tale che <math>\Gamma \nvdash A</math>.▼
}}Si può dimostrare che le due formulazioni sono equivalenti.▼
(<math>\Rightarrow</math>) Se non esiste una proposizione <math>A</math> tale che <math>\Gamma \vdash A</math> e <math>\Gamma \vdash \neg A</math>, allora si ha che <math>\Gamma \nvdash A</math> oppure <math>\Gamma \nvdash \neg A</math> per ogni proposizione <math>A</math>, dunque esiste una proposizione <math> B</math> tale che <math>\Gamma \nvdash B</math>.▼
(<math>\Leftarrow</math>) Viceversa, supponiamo che esista una proposizione <math>A</math> tale che <math>\Gamma \vdash A</math> e <math>\Gamma \vdash \neg A</math>, e che non esista una formula <math> B</math> tale che <math>\Gamma \nvdash B</math>, che equivale a dire <math>\Gamma \vdash B</math> per ogni formula <math> B</math>. Se si dimostra che <math>A, \neg A \vdash B</math> per ogni formula <math> B</math>, allora, per taglio sulle premesse, si ha che <math>\Gamma \vdash B</math>.▼
Per il teorema di deduzione, abbiamo che <math>\vdash A \to (\neg A \to B)</math>. Dunque, <math>A, \neg A \vdash B</math> sse <math>\vdash A \to (\neg A \to B)</math>.▼
Essendo che <math>\vDash A \to (\neg A \to B)</math>, allora, per il [[Logica/Calcolo delle proposizioni/Sistema di Hilbert#Teorema di completezza|teorema di completezza]], è vero che <math>\vdash A \to (\neg A \to B)</math>. Quindi, effettivamente vale <math>A, \neg A \vdash B</math>, e, per taglio sulle premesse, si ha che <math>\Gamma \vdash B</math> per ogni formula <math> B</math>.▼
Dunque, per contrapposizione, se esiste una formula <math> B</math> tale che <math>\Gamma \nvdash B</math>, allora non esiste una proposizione <math>A</math> tale che <math>\Gamma \vdash A</math> e <math>\Gamma \vdash \neg A</math>.▼
==== Insieme di formule completo ====▼
{{Definizione|▼
Un insieme di formule <math>\Gamma</math> si dice ''consistente e massimale'' o ''completo'' se, per ogni formula <math>A \in \mathcal{L}</math>, si verifica una e una sola delle seguenti relazioni:▼
:<math>\Gamma \vdash A</math> oppure <math>\Gamma \vdash \neg A</math>.▼
}}▼
Notare che la nozione di insieme consistente e massimale è analoga a quella di [[Logica/Calcolo delle proposizioni/Dimostrazione del teorema di compattezza#Insieme di formule massimale|insieme massimale]] soddisfacibile.▼
== Correttezza e completezza ==
Line 177 ⟶ 207:
:<math>\nvdash A \to B</math> implica <math>\nvDash A \to B</math>.
Mostriamo che, se <math>A \to B</math> non è un teorema, allora <math>A \to B</math> non è una tautologia, cioè non è una formula valida, vale a dire che <math>B</math> non segue logicamente da <math>A</math>. A tal fine basta costruire, analogamente a ciò che si fa nella [[Logica/Calcolo delle proposizioni/Dimostrazione del teorema di compattezza|dimostrazione del teorema di compattezza]], un insieme <math>\Delta</math> (deduttivamente chiuso e
Per costruire l'insieme <math>\Delta</math>, procediamo nel seguente modo. Enumeriamo tutte le formule del linguaggio:
Line 186 ⟶ 216:
:<math>\Delta_0=\{A\};</math>
:<math>\Delta_{i+1} = \begin{cases}
\Delta_i \cup \{A_i\}, & \text{se }\Delta_i, A_i \nvdash B; \\
\Delta_i, & \text{altrimenti.}
\end{cases}</math>
per tutti gli <math>i>0</math>. Osserviamo innanzitutto che <math>\Delta_i \nvdash B</math>, per ogni <math>i</math>. Infatti, per induzione, abbiamo che
Dobbiamo ora mostrare che <math>\Delta</math> è soddisfacibile. Per far questo, costruiamo un modello per esso. Definiamo il modello <math>\mathcal{M_V}</math> come:▼
(''Passo base'') <math>\Delta_0 \nvdash B</math>, perché <math>\Delta_0=\{A\}</math> e, per ipotesi, <math>A \to B</math> non è un teorema.
<math>\mathcal{M_V}=\mathcal{P}</math>▼
dove <math>\mathcal{P}</math> è l'insieme dei simboli proposizionali del linguaggio.▼
Sia ora
Dimostriamo ora, per induzione strutturale sulle formule, che per ogni formula <math>A</math>:▼
<math>
Osserviamo che
▲(''Passo base'') Per costruzione di <math>\mathcal{M_V}</math>.
Per costruzione, <math>A \in \Delta</math>.
(''Passo Induttivo'') Sia <math>A=\neg B</math>. <math>\mathcal{M_V} \models \neg B</math> equivale a <math>\mathcal{M_V} \nvDash B</math>; per ipotesi induttiva, <math>\mathcal{M_V} \nvDash B</math> sse <math>B \not\in \Delta</math>. Siccome <math>\Delta</math> è massimale, da <math>B \not\in \Delta</math> segue <math>\neg B \in \Delta</math>. Pertanto, <math>\mathcal{M_V} \models \neg B</math> sse <math>\neg B \in \Delta</math>, che è la tesi.▼
<math>B \not\in \Delta</math>, per la proprietà di inclusione di <math>\vdash</math>.
Sia <math>A=B \or C</math>. <math>\mathcal{M_V} \models B \or C</math> sse <math>I_\mathcal{V}(B \or C)=\mathrm{T}</math> sse <math>\mathcal{Op}_\or(I_\mathcal{V}(B), I_\mathcal{V}(C))=\mathrm{T}</math> sse <math>I_\mathcal{V}(B)=\mathrm{T}</math> o <math>I_\mathcal{V}(C)=\mathrm{T}</math> sse <math>\mathcal{M_V} \models B</math> o <math>\mathcal{M_V} \models C</math>; per ipotesi induttiva, abbiamo <math>\mathcal{M_V} \models B</math> sse <math>B \in \Delta</math> o <math>\mathcal{M_V} \models C</math> sse <math>C \in \Delta</math>. Quindi <math>B \in \Delta</math> o <math>C \in \Delta</math>, ovvero <math>B \or C \in \Delta</math>, che è la tesi.▼
<math>\Delta</math> è deduttivamente chiuso, cioè, per ogni formula <math>F</math>
Sia <math>A=B \to C</math>. <math>\mathcal{M_V} \models B \to C</math> sse <math>I_\mathcal{V}(B \to C)=\mathrm{T}</math> sse <math>\mathcal{Op}_\to(I_\mathcal{V}(B), I_\mathcal{V}(C))=\mathrm{T}</math> sse <math>I_\mathcal{V}(B)=\mathrm{F}</math> o <math>I_\mathcal{V}(C)=\mathrm{T}</math> sse <math>\mathcal{M_V} \nvDash B</math> o <math>\mathcal{M_V} \models C</math>; per ipotesi induttiva, abbiamo <math>\mathcal{M_V} \nvDash B</math> sse <math>B \not\in \Delta</math> o <math>\mathcal{M_V} \models C</math> sse <math>C \in \Delta</math>. Siccome <math>\Delta</math> è massimale, da <math>B \not\in \Delta</math> segue <math>\neg B \in \Delta</math>. Quindi <math>\neg B \in \Delta</math> o <math>C \in \Delta</math>, ovvero <math>B \to C \in \Delta</math>, che è la tesi.▼
▲
Sia <math>A=B \leftrightarrow C</math>. <math>\mathcal{M_V} \models B \leftrightarrow C</math> sse <math>I_\mathcal{V}(B \leftrightarrow C)=\mathrm{T}</math> sse <math>\mathcal{Op}_\leftrightarrow (I_\mathcal{V}(B), I_\mathcal{V}(C))=\mathrm{T}</math> sse <math>I_\mathcal{V}(B)=\mathrm{T}</math> e <math>I_\mathcal{V}(C)=\mathrm{T}</math>, o <math>I_\mathcal{V}(B)=\mathrm{F}</math> e <math>I_\mathcal{V}(C)=\mathrm{F}</math>, sse <math>\mathcal{M_V} \models B</math> e <math>\mathcal{M_V} \models C</math>, o <math>\mathcal{M_V} \nvDash B</math> e <math>\mathcal{M_V} \nvDash C</math>; per ipotesi induttiva, abbiamo <math>\mathcal{M_V} \models B</math> sse <math>B \in \Delta</math> e <math>\mathcal{M_V} \models C</math> sse <math>C \in \Delta</math>, o <math>\mathcal{M_V} \nvDash B</math> sse <math>B \not\in \Delta</math> e <math>\mathcal{M_V} \nvDash C</math> sse <math>C \not\in \Delta</math>. Quindi <math>B,C \in \Delta</math> o <math>B,C \not\in \Delta</math>, ovvero <math>B \leftrightarrow C \in \Delta</math>, che è la tesi.▼
Abbiamo quindi mostrato che <math>\mathcal{M_V}</math> è un modello per <math>\Delta</math>; siccome <math>\Gamma \subseteq \Delta</math>, abbiamo che <math>\mathcal{M_V} \models \Gamma</math>, ovvero <math>\Gamma</math> è soddisfacibile.▼
▲dove
▲== Consistenza ==
▲Introduciamo ora la nozione di ''consistenza''.
▲Dimostriamo ora, per induzione strutturale sulle formule, che per ogni formula
▲==== Insieme di formule consistente ====
▲{{Definizione|
▲Un insieme di formule proposizionali <math>\Gamma</math> è ''consistente'' sse è verificata una delle seguenti proprietà:
{\displaystyle A\in \Delta } sse {\displaystyle {\mathcal {M_{V}}}\models A} .
▲# non esiste una proposizione <math>A</math> tale che <math>\Gamma \vdash A</math> e <math>\Gamma \vdash \neg A</math>;
▲# esiste una proposizione <math>A</math> tale che <math>\Gamma \nvdash A</math>.
▲}}Si può dimostrare che le due formulazioni sono equivalenti.
(Passo base) Per costruzione di {\displaystyle {\mathcal {M_{V}}}} .
▲(<math>\Rightarrow</math>) Se non esiste una proposizione <math>A</math> tale che <math>\Gamma \vdash A</math> e <math>\Gamma \vdash \neg A</math>, allora si ha che <math>\Gamma \nvdash A</math> oppure <math>\Gamma \nvdash \neg A</math> per ogni proposizione <math>A</math>, dunque esiste una proposizione <math> B</math> tale che <math>\Gamma \nvdash B</math>.
▲(
▲(<math>\Leftarrow</math>) Viceversa, supponiamo che esista una proposizione <math>A</math> tale che <math>\Gamma \vdash A</math> e <math>\Gamma \vdash \neg A</math>, e che non esista una formula <math> B</math> tale che <math>\Gamma \nvdash B</math>, che equivale a dire <math>\Gamma \vdash B</math> per ogni formula <math> B</math>. Se si dimostra che <math>A, \neg A \vdash B</math> per ogni formula <math> B</math>, allora, per taglio sulle premesse, si ha che <math>\Gamma \vdash B</math>.
Sia {\displaystyle A=B\land C} . {\displaystyle {\mathcal {M_{V}}}\models B\land C} sse {\displaystyle I_{\mathcal {V}}(B\land C)=\mathrm {T} } sse {\displaystyle {\mathcal {Op}}_{\land }(I_{\mathcal {V}}(B),I_{\mathcal {V}}(C))=\mathrm {T} } sse {\displaystyle I_{\mathcal {V}}(B)=\mathrm {T} } e {\displaystyle I_{\mathcal {V}}(C)=\mathrm {T} } sse {\displaystyle {\mathcal {M_{V}}}\models B} e {\displaystyle {\mathcal {M_{V}}}\models C} ; per ipotesi induttiva, abbiamo {\displaystyle {\mathcal {M_{V}}}\models B} sse {\displaystyle B\in \Delta } e {\displaystyle {\mathcal {M_{V}}}\models C} sse {\displaystyle C\in \Delta } . Quindi {\displaystyle B,C\in \Delta } , ovvero {\displaystyle B\land C\in \Delta } , che è la tesi.
▲Per il teorema di deduzione, abbiamo che <math>\vdash A \to (\neg A \to B)</math>. Dunque, <math>A, \neg A \vdash B</math> sse <math>\vdash A \to (\neg A \to B)</math>.
▲Sia
▲Essendo che <math>\vDash A \to (\neg A \to B)</math>, allora, per il [[Logica/Calcolo delle proposizioni/Sistema di Hilbert#Teorema di completezza|teorema di completezza]], è vero che <math>\vdash A \to (\neg A \to B)</math>. Quindi, effettivamente vale <math>A, \neg A \vdash B</math>, e, per taglio sulle premesse, si ha che <math>\Gamma \vdash B</math> per ogni formula <math> B</math>.
▲Sia
▲Dunque, per contrapposizione, se esiste una formula <math> B</math> tale che <math>\Gamma \nvdash B</math>, allora non esiste una proposizione <math>A</math> tale che <math>\Gamma \vdash A</math> e <math>\Gamma \vdash \neg A</math>.
▲Sia
▲==== Insieme di formule completo ====
▲{{Definizione|
▲Un insieme di formule <math>\Gamma</math> si dice ''consistente e massimale'' o ''completo'' se, per ogni formula <math>A \in \mathcal{L}</math>, si verifica una e una sola delle seguenti relazioni:
▲Abbiamo quindi mostrato che
▲:<math>\Gamma \vdash A</math> oppure <math>\Gamma \vdash \neg A</math>.
▲}}
▲Notare che la nozione di insieme consistente e massimale è analoga a quella di [[Logica/Calcolo delle proposizioni/Dimostrazione del teorema di compattezza#Insieme di formule massimale|insieme massimale]] soddisfacibile.
== Esempi di dimostrazioni ==
|