Statement logic in Haskell
Find a file
2025-08-08 04:39:55 +00:00
Logic split Logic.Statement into files, simpler serialization 2025-08-08 04:36:22 +00:00
.gitignore separate into files, parser error messages 2025-08-08 04:29:01 +00:00
Main.hs readme 2025-08-08 04:39:55 +00:00
Makefile separate into files, parser error messages 2025-08-08 04:29:01 +00:00
readme.md readme 2025-08-08 04:39:55 +00:00

Statement logic !!!

Compile it

make

Usage

echo '((p->q)<->(!q->!p))' | ./logic

Output

Iff (Implies (Atom "p") (Atom "q")) (Implies (Not (Atom "q")) (Not (Atom "p")))
Tautology
\begin{tabular}{cc||cccccc|c|cccccccc}
$p$ & $q$ & $($ & $($ & $p$ & $\to $ & $q$ & $)$ & $\leftrightarrow $ & $($ & $\neg $ & $q$ & $\to $ & $\neg $ & $p$ & $)$ & $)$ \\
\hline
0 & 0 &  &  & 0 & 1 & 0 &  & \textbf 1 &  & 1 & 0 & 1 & 1 & 0 &  & \\
0 & 1 &  &  & 1 & 0 & 0 &  & \textbf 1 &  & 1 & 0 & 0 & 0 & 1 &  & \\
1 & 0 &  &  & 0 & 1 & 1 &  & \textbf 1 &  & 0 & 1 & 1 & 1 & 0 &  & \\
1 & 1 &  &  & 1 & 1 & 1 &  & \textbf 1 &  & 0 & 1 & 1 & 0 & 1 &  & \\
\end{tabular}