Connectiva lògica
En lògica, les connectives lògiques són les eines que permeten construir enunciats o fórmules a partir dels àtoms. Les més conegudes són no, i, o i la construcció condicional si ...llavors.
Aquestes connectives es representen:
- <math> \lnot </math> , no
- <math> \land </math> , i
- <math> \lor </math> , o (inclusiva)
- <math> \rightarrow </math> , si...llavors
Error: la imatge no es vàlida o no existeix |
Error: la imatge no es vàlida o no existeix | |
| (fitxer) | (fitxer) (ampliat) |
Connectives
Les connectives són funcions de veritat. Vol dir que són funcions que prenen un o dos valors de veritat, i tornen un únic valor de veritat. En conseqüència, cada connectiva lògica pot ser definida mitjançant una taula de valors de veritat. A continuació hi ha una taula amb les connectives més usuals i la seva definició mitjançant taules de veritat:
| Conectiva | Notació | Exemple d'ús |
Anàleg natural |
Exemple d'ús en el llenguatge natural |
Taula de veritat | |
|---|---|---|---|---|---|---|
| Negació | <math> \neg, \sim \, </math> | <math> \neg p \, </math> | No | No està plovent. | c | }
\phi & \neg \phi \\
\hline
1 & 0 \\
0 & 1 \\
\hline
\end{array}</math>
|
| Conjunció | <math> \And, \And \, </math> | <math> P \and q \, </math> | I | Està plovent i és de nit. | c|c | }
\phi & \psi & \phi \and \psi \\
\hline
1 & 1 & 1 \\
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 0 \\
\hline
\end{array}</math>
|
| Disjunció | <math> \or \, </math> | <math> P \or q \, </math> | O | Està plovent o és de nit. | c|c | }
\phi & \psi & \phi \or \psi \\
\hline
1 & 1 & 1 \\
1 & 0 & 1 \\
0 & 1 & 1 \\
0 & 0 & 0 \\
\hline
\end{array}</math>
|
| Condicional material | <math> \to, \supset </math> | <math> P \to q \, </math> | Si ... llavors | Si està plovent, llavors és de nit. | c|c | }
\phi & \psi & \phi \to \psi \\
\hline
1 & 1 & 1 \\
1 & 0 & 0 \\
0 & 1 & 1 \\
0 & 0 & 1 \\
\hline
\end{array}</math>
|
| Si i només si | <math> \leftrightarrow, \equiv \, </math> | <math> P \leftrightarrow q \, </math> | Si i només si | Està plovent si i només si és de nit. | c|c | }
\phi & \psi & \phi \leftrightarrow \psi \\
\hline
1 & 1 & 1 \\
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\hline
\end{array}</math>
|
| Negació conjunta |
<math> \Downarrow \, </math> | <math> P \downarrow q \, </math> | Ni ... ni | Ni està plovent ni és de nit. | c|c | }
\phi & \psi & \phi \downarrow \psi \\
\hline
1 & 1 & 0 \\
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \\
\hline
\end{array}</math>
|
| Disjunció excloent |
<math> \nleftrightarrow, \oplus, \not \equiv </math> | <math> P \nleftrightarrow q \, </math> | O bé ... o bé | O bé està plovent, o bé és de nit. | c|c | }
\phi & \psi & \phi \nleftrightarrow \psi \\
\hline
1 & 1 & 0 \\
1 & 0 & 1 \\
0 & 1 & 1 \\
0 & 0 & 0 \\
\hline
\end{array}</math>
|
Altres connectives
Atès que les connectives són funcions de veritat, hi haurà tantes connectives com a funcions de veritat. No obstant això, no totes les funcions de veritat tenen anàlegs en el llenguatge natural, i en conseqüència, no totes són estudiades amb el mateix interès. A continuació s'inclou una taula que llista totes les connectives binàries possibles.
<math>\begin{array}{|c|c||c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\phi & \psi & \top & \or & \leftarrow & \phi & \to & \psi & \leftrightarrow & \and & \uparrow & \nleftrightarrow & \neg \psi & \nrightarrow & \neg \phi & \nleftarrow & \downarrow & \bot \\
\hline
1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
1 & 0 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 \\
0 & 1 & 1 & 1 & 0 & 0 & 1 & 1 & 0 & 0 & 1 & 1 & 0 & 0 & 1 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 \\
\hline
\end{array}</math>
On:
- <math> \top \, </math> és una tautologia.
- <math> \or \, </math> és la disjunció.
- <math> \leftarrow \, </math> és el condicional material invers.
- <math> \to \, </math> és el condicional material.
- <math> \leftrightarrow \, </math> és el Si i només si.
- <math> \And \, </math> és la conjunció.
- <math> \Uparrow \, </math> és la negació alternativa, incompatibilitat, o "NAND".
- <math> \nleftrightarrow \, </math> és la disjunció exclusiva, contravalència o "XOR".
- <math> \nrightarrow \, </math> és la negació del condicional material.
- <math> \nleftarrow \, </math> és la negació del condicional invers.
- <math> \Downarrow \, </math> és la negació conjunta, o "NOR".
- <math> \bot \, </math> és una contradicció.