A Simple Boolean Algebra Engine
Currently supports simplifying operations involving Not, And, Or, and Xor, as well as the mathematical logic functions implication (=>
) and biconditional (<=>
).
Any variable consisting of alphanumeric characters (without a digit at the beginning) and _
is a valid variable name.
Note that t
,f
,true
and false
are keywords.
The following operations are supported:
!
- Not+
- Or*
- And^
- Xor=>
- Implication<=>
- Biconditional
!!a
simplifies toa
!a + b
remains the same as no simplification is possiblea * false
simplifies tofalse
a => b
simplifies to!a + b
!false * !(a ^ b)
simplifies to!(a ^ b)
var1 + var2 + false * true => var3
simplifies to!(var1 + var2) + var3
!var * true ^ b + c ^ (x ^ y => var2 <=> _3) ^ false * true
simplifies to!var ^ b + c ^ !(!(x ^ y) + var2 ^ _3)