Discrete helpers/boolf

This class for Boolean functions (BF) is the biggest part of this software. It contains some unfinished and experimental features.

This project is related to many pages in Studies of Boolean functions.

There are two main goals, both not yet reached:


 * find the Euler diagram of any BF, see Studies of Euler diagrams  (The main problem is to find the necessary gapspots.)
 * find an easy to calculate clan representative of any BF, e.g. the Smallest Zhegalkin index  (The current calculation of the smallest Ж is not yet easy.)

periodic truth tables
Within this project Boolean functions are used without specifying the arity. Their arity is implicitly infinite, and their truth tables are implicitly periodic. (But the term truth table is usually used for finite ones.) They are repeating binary fractions (just like s) with values between 0 and 1. (This may be the only occurence of big-endian binary in this project.)

The truth tables  and   denote the same thing, namely the Boolean function $$A \land B$$. The corresponding fraction is $$\frac{1}{15}$$. (That can be expanded to $$\frac{17}{255}$$, corresponding to the longer truth table.)

The letters from the beginning of the alphabet are not meaningless variable names, but denote specific atoms.

$$ \begin{matrix} A &=& x_0 &=& \frac{1}{3} &=& .0101010101010101... \\ B &=& x_1 &=& \frac{1}{5} &=& .0011001100110011... \\ C &=& x_2 &=& \frac{1}{17} &=& .0000111100001111... \\ D &=& x_3 &=& \frac{1}{257} &=& .0000000011111111... \\

&& x_n &=& \frac{1}{2^{2^n} + 1} \end{matrix} $$

$$ \begin{matrix} \neg A &=& \neg x_0 &=& \frac{2}{3} &=& .1010101010101010... \\ \neg B &=& \neg x_1 &=& \frac{4}{5} &=& .1100110011001100... \\ \neg C &=& \neg x_2 &=& \frac{16}{17} &=& .1111000011110000... \\ \neg D &=& \neg x_3 &=& \frac{256}{257} &=& .1111111100000000... \\

&& \neg x_n &=& \frac{2^{2^n}}{2^{2^n} + 1} \end{matrix} $$

valency &le; adicity &le; arity
Valency is the number of arguments actually used. Adicity follows from the biggest atom, and corresponds to the required length of the truth table. For a root BF valency and adicity are equal. E.g.  ($$A \land B$$) has valency and adicity 2. But  ($$B \land C$$) has valency 2 and adicity 3. The term arity is only used for arguments of methods, e.g. to calculate the consul.