Boolean Logic Package

I am wondering if there exists a package for more complex Boolean operations. Some simple examples would be:

  1. majority logic,

majority([false,true,false]) = false

  1. logic gates which have multiple outputs, such as the Fredkin gate

  2. Generate truth tables from Boolean operators.

While none of these examples are too challenging to for the user to define functions for, there may be situations in which it could convenient to have this either done efficiently or for teaching purposes in logic. I think it would be fun to create a package that does this, but I don’t want to reinvent the wheel if it exists and I just haven’t been able to find it.

None to my knowledge. A few of us have toyed with one part or another of that; none of that was really for release.