This memory-efficient implementation, while necessary (the user won't have ridiculous amounts of RAM, most likely), together with the huge number of inputs, makes any operation on the cubes itself very expensive. A logic cube B is superfluous if there exists an (A, B), where for all inputs for which B is true, A is also true.As an example, let's assume I have the logic cubes (of 2 inputs each) A=X1, B=11 and C=00.A and C, however, are not superfluous and need to be kept.
Your operation could potentially be non-deterministic depending on the ordering in the list.
In technical terms, a logic cube is an n-input, 1-output Programmable Logic Array (PLA) description.
For memory reasons (as we often have thousands of cubes, each with hundreds of inputs), they use a custom collection implementation where each entry uses 2 bits in a vector of longs (very similar to the Java Bit Set implementation).
To be exact, this is in one of the simplest parts of the optimization algorithm, and is used very often as a "quick and dirty" optimization pass in the middle of more complex optimization algorithms, so performance is critical.
A and B describe logic cubes of a single logic function, which are vectors of 0, 1, Don't Care (also represented as X, indicates both 0 and 1 are accepted) or Illegal Value (indicating error), each entry in these vectors describes a single input. For example, a cube "X1" would be true if the inputs are 01 or 11, and false otherwise.