Boolalg – Truth tables, step-by-step simplification, and algebraic proofs for Boolean
The boolalg package provides pure-TeX macros for parsing, evaluating, simplifying, and proving Boolean algebra expressions without requiring external tools, Python, or shell-escape:
– \btable and \btable*: Generate truth tables with intermediate subexpression columns and optional simplified results. – \bsimplify and \bsimplify*: Perform step-by-step algebraic simplification with explicit law justifications (Idempotence, Absorption, Consensus theorem, De Morgan’s laws, Distributivity, etc.). – \bprove: Construct step-by-step algebraic proofs between two equivalent expressions, or automatically find and print a concrete counterexample if the claim is false.
Expressions support flexible input syntax including implicit multiplication (AB), postfix primes (A'), prefix operators (!, ~), English words (and, or, xor, nand, nor, xnor, not), and standard LaTeX math symbols (\land, \lor, \oplus, \lnot, etc.).
| Sources | /macros/latex/contrib/boolalg |
| Documentation | |
| Version | 1.0.0 |
| Licenses | The LaTeX Project Public License 1.3c |
| Copyright | 2026 Param Srivastava |
| Maintainer | Param Srivastava |
| Topics | Logic |
| See also | luatruthtable truthtable |
Download the contents of this package in one zip archive (160.9k).
Suggestions
Maybe you are interested in the following packages as well.
Community Comments