notebook/contents/logic.tex
2023-05-07 19:46:28 +02:00

146 lines
3.1 KiB
TeX

\langchapter{Logique}{Logic}
%TODO Complete chapter
La logique consiste en des opérations effectuées uniquement sur des variables (notées $P,Q,R$) n'ayant pour valeur soit Vrai (noté \true), soit Faux (noté \false).
%Logic consists of operations done on sole values : True $T$ and False $F$.
\langsection{Relation Binaires}{Binary relations}
%TODO Complete section
\langsubsection{Réflexion}{Reflexivity}
% TODO Complete subsection
Une relation $\Rel$ sur $E$ est dite \textbf{réflexive} si et seulement si $\forall a \in E, a \Rel a$.
\langsubsection{Transitivité}{Transitivity}
% TODO Complete subsection
Une relation $\Rel$ sur $E$ est dite \textbf{transitive} si et seulement si $\forall (a,b) \in E, a \Rel b \land b \Rel c \equivalance a \Rel c$.
\langsubsection{Associativité}{Associativity}
% TODO Complete subsection
Une relation $\Rel$ sur $E$ est dite \textbf{associative} si et seulement si $\forall (a,b) \in E, (a \Rel b) \Rel c \equivalance a \Rel (b \Rel c) \Leftrightarrow a \Rel b \Rel c$.
\langsubsection{Commutativité}{Commutativity}
% TODO Complete subsection
Une relation $\Rel$ sur $E$ est dite \textbf{commutative} si et seulement si $\forall (a,b) \in E, a \Rel b = b \Rel a$.
\langsection{Opérateurs}{Operators}
%TODO Complete section
\langsubsection{NON}{NOT}
% TODO Complete subsection
$P \Leftrightarrow \lnot \lnot P$
\langsubsubsection{Table de vérité}{Truth table}
\begin{tabular}{|c|c|}
\hline
P & $\lnot P$ \\
\hline
\false & \true \\
\hline
\true & \false \\
\hline
\end{tabular}
\langsubsection{ET}{AND}
%TODO Complete subsection
$P \land Q \equivalance \lnot P \lor \lnot Q$
\begin{tabular}{|c|c||c|}
\hline
P & Q & P $\land$ Q \\
\hline
\false & \false & \false \\
\hline
\true & \false & \false \\
\hline
\false & \true & \false \\
\hline
\true & \true & \true \\
\hline
\end{tabular}
\langsubsection{OU}{OR}
% TODO Complete subsection
$P \lor Q \equivalance \lnot P \land \lnot Q$
\medskip
\begin{tabular}{|c|c||c|}
\hline
P & Q & P $\lor$ Q \\
\hline
\false & \false & \false \\
\hline
\true & \false & \true \\
\hline
\false & \true & \true \\
\hline
\true & \true & \true \\
\hline
\end{tabular}
\subsection{Implication}
%TODO Complete subsection
\begin{tabular}{|c|c||c|}
\hline
P & Q & P $\Rightarrow$ Q \\
\hline
\false & \false & \true \\
\hline
\true & \false & \false \\
\hline
\false & \true & \true \\
\hline
\true & \true & \true \\
\hline
\end{tabular}
\lang{Contraposée}{Contraposition } : \
$\lnot Q \implies \lnot P$
\langsubsection{Équivalence}{Equivalence}
% TODO Complete subsection
\begin{tabular}{|c|c||c|}
\hline
P & Q & P $\equivalance$ Q \\
\hline
\false & \false & \true \\
\hline
\true & \false & \false \\
\hline
\false & \true & \false \\
\hline
\true & \true & \true \\
\hline
\end{tabular}
\langsubsection{OU exclusif / XOR}{Exclusive OR / XOR}
%TODO Complete subsection
$P \oplus Q \equivalance (P \lor Q) \land \lnot (P \land Q)$
\begin{tabular}{|c|c||c|}
\hline
P & Q & $P \oplus Q$ \\
\hline
\false & \false & \false \\
\hline
\true & \false & \true \\
\hline
\false & \true & \true \\
\hline
\true & \true & \false \\
\hline
\end{tabular}