Logic

https://en.wikipedia.org/wiki/Truth_table

If any doubts, draw a table and check it yourself.

$\neg(\neg x) = x$
commutativity
associativity
distributivity of $\vee, \wedge$: $(x \wedge y) \vee z = (x \wedge z) \vee (y \wedge z)$, $(x \vee y) \wedge z = (x \wedge z) \vee (y \wedge z)$
$\neg (x \vee y) = \neg x \wedge \neg y$, $\neg (x \wedge y) = \neg x \vee \neg y$
$x \vee \neg x = 1$
$x = x \vee 0 = x \wedge 1 = x \oplus 0$, $x \wedge 0 = 0$, $x \oplus 1 = \neg x$
idempotence: $x = x \vee x = x \wedge x = x \rightarrow x$
absorbtion: $(x \vee y) \wedge x = x$, $(x \wedge y) \vee x = x$
$x \rightarrow y = \neg x \vee y = \neg (x \wedge \neg y) = 1 \oplus x \oplus xy$, $x \oplus y = (x \wedge \neg y) \vee (\neg x \wedge y) = (x \vee y) \wedge (\neg x \vee \neg y)$

Implication

$0 \rightarrow 1$ doen’t mean that we can infer truth from false.
It only means we can have a situation when premise is false and conclusion is still true anyway. Like $x \ge 3$, but it’s still $x < 5$.
A legit theorem can have a wrong proof.

properties of implication (these are $= 1$):
$x \rightarrow x$
$(x \rightarrow y) \wedge (y \rightarrow x)$
$((x \rightarrow y) \wedge (y \rightarrow z)) \rightarrow (x \rightarrow z)$
$((x \rightarrow y) \vee (x \rightarrow \neg y)) \rightarrow \neg x$
$((x \rightarrow y) \wedge x) \rightarrow y$
Interesting thing: $\neg p \rightarrow (p \rightarrow q)$.

Sets

Russel’s paradox
universal set

operations on sets, proof of formulas like (A v B) C = AC v BC

logic tables: -, or, xor, and, ->, ≡
A -> B = -A v B
(A -> B) v (B -> A) = A≡B
((A->B) * (B->)) -> (A->C)

TODO: logic tables and formulas for for must have equations

https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#tables, https://www.tablesgenerator.com/markdown_tables#

A B A->B
0 0 1
0 1 1
1 0 0
1 1 1

https://en.wikipedia.org/wiki/Indicator_function

https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle

$\vert A \cup B \vert = \vert A \vert + \vert B \vert - \vert A \cap B \vert$
$\vert A \cup B \cup C \vert = \vert A \vert + \vert B \vert + \vert C \vert - \vert A \cap B \vert - \vert A \cap C \vert - \vert B \cap C \vert + \vert A \cap B \cap C \vert$

minimal set of ops: v, *, -; proof

https://en.wikipedia.org/wiki/Disjunctive_normal_form

Post’s theorem on function completeness

Using non-false-preserving, non-monotonic, non-self-dual functions we get constants and invertor:

f not in T_0 ---> 1 ---> 0 
             \     \      \
              \     \---> ~x
               \
                \---> ~x ---> 0
                        \      \
                         \----> 1

Now we have 0, 1, ~x, non-linear f   -->   we have xy   -->   we have x+y   -->   we have everything 

https://ru.wikipedia.org/wiki/Критерий_Поста
https://en.wikipedia.org/wiki/Functional_completeness
https://www.academia.edu/12708709/Posts_functional_completeness_theorem
https://en.wikipedia.org/wiki/Post%27s_lattice
Clones of closed classes, proof of equivalence of some of them: 1, \oplus, \wedge
class of monotonic functions and algorithm of checking it: https://ido.tsu.ru/iop_res/bulevfunc/text/g15_5.html

https://en.wikipedia.org/wiki/Sheffer_stroke
Peirce’s arrow $\downarrow$: https://en.wikipedia.org/wiki/Logical_NOR

https://ru.wikipedia.org/wiki/Полином_Жегалкина
https://en.wikipedia.org/wiki/Zhegalkin_polynomial
Proof of uniqueness and existence of Zhegalkin polynomial, not from wikipedia, it’s cheating.
https://neerc.ifmo.ru/wiki/index.php?title=Полином_Жегалкина#.D0.A1.D1.83.D1.89.D0.B5.D1.81.D1.82.D0.B2.D0.BE.D0.B2.D0.B0.D0.BD.D0.B8.D0.B5_.D0.B8_.D0.B5.D0.B4.D0.B8.D0.BD.D1.81.D1.82.D0.B2.D0.B5.D0.BD.D0.BD.D0.BE.D1.81.D1.82.D1.8C_.D0.BF.D1.80.D0.B5.D0.B4.D1.81.D1.82.D0.B0.D0.B2.D0.BB.D0.B5.D0.BD.D0.B8.D1.8F_.28.D1.82.D0.B5.D0.BE.D1.80.D0.B5.D0.BC.D0.B0_.D0.96.D0.B5.D0.B3.D0.B0.D0.BB.D0.BA.D0.B8.D0.BD.D0.B0.29
Method of computation.
не не может быть выражена через набор или, и
There are $2^{2^n}$ functions of $n$ variables.

Monotone functions order? https://en.wikipedia.org/wiki/Hasse_diagram, n-dimentional cube
Класс функций называется функционально полным в слабом смысле, если добавление в и констант 0 и 1 превращает его в функционально полный класс.

композиция монотонных функций монотонна
линейный полином жегалкина

полная в слабом смысле — http://matica.org.ua/metodichki-i-knigi-po-matematike/lektcii-po-diskretnoi-matematike/2-3-3-teoremy-o-funktcionalnoi-polnote

expressing functions from each other — http://www.calcsbox.com/post/bulevy-funkcii-ot-odnogo-i-dvuh-argumentov.html#toc6

dual functions

$(x \vee y)* = $
$(x \wedge y)* = $
$(x \oplus y)* = x \oplus y \oplus 1$

Problems

HW.01.05. $A = { 1, 2, 4, 5, 9 }$, $B = { 2, 3, 5, 6, 9 }$, $C = { 4, 5, 6, 7 }$. Express ${4, 5, 7}$ and ${1, 2, 4}$ through A, B, C.
How to prove the latter can’t be expressed?
— Если входит 2, то по там же причинам должна входить и 9 - делаются те же проверки.

HW.01.07. Write an equation which has set of solutions equal to intersection of solution sets of equations $\sin x = \vert \sin x \vert$ and $\cos x = \tan{\tan x}$.

HW.01.09.
HW.01.10.

HW.01.16. When proving set A is equal to set B, we have to prove $A \in B$ and $B \in A$.

Indicator functions

$\chi_A(x) = 1$ when $x \in A$