<li><spanclass="math inline">\(x=5\)</span> not a statement</li>
</ul></li>
<li><p>In logic we do not use the equals sign, we use the equivalence sign <spanclass="math inline">\(\equiv\)</span>.</p></li>
<li><p>Logical values (booleans) are denoted by either 0 or 1 (or t, f, etc.).</p></li>
<li><p>When doing logic, we use propositional variables (e.g.p, q, r).</p>
<ul>
<li>Can be either <strong>true</strong> or <strong>false</strong>.</li>
</ul></li>
<li><p>The operations done on propositional variables are called propositional connectives.</p>
<ul>
<li>Conjunction: <spanclass="math inline">\(p \land q\)</span> is only true if both p and q are true <spanclass="math inline">\((0001)\)</span></li>
<li>Disjunction: <spanclass="math inline">\(p \lor q\)</span> is only false if both p and q are false <spanclass="math inline">\((0111)\)</span></li>
<li>Implication (material conditional): <spanclass="math inline">\(p \implies q\)</span> is false only if p is true and q is false (truth table <spanclass="math inline">\((1011)\)</span>)
<ul>
<li><spanclass="math inline">\(\equiv \neg p \lor q\)</span></li>
</ul></li>
</ul></li>
<li><p>Not necessarily connectives but unary operations:</p>
<ul>
<li>Negation: Denoted by ~, <spanclass="math inline">\(\neg\)</span> or NOT, negates the one input <spanclass="math inline">\((10)\)</span>.</li>
</ul></li>
<li><p>A (propositional) formula is a “properly constructed” logical expression.</p>
<li><spanclass="math inline">\((p \land)\)</span> is not a formula, as <spanclass="math inline">\(\land\)</span> requires 2 variables.</li>
<li>Logical equivalence: <spanclass="math inline">\(\phi(p, q, k) \equiv \psi(p, q, k)\)</span>, logical value of <spanclass="math inline">\(\phi\)</span> is equal to logical value of <spanclass="math inline">\(\psi\)</span>.</li>
<li><spanclass="math inline">\(p \lor \neg p \equiv 1\)</span> and <spanclass="math inline">\(p \land \neg p \equiv 0\)</span></li>
</ul></li>
<li><p>Tautology: <spanclass="math inline">\(\phi (p, q, ... r)\)</span> is a tautology <em>iff</em><spanclass="math inline">\(\phi \equiv 1\)</span></p></li>
<li><spanclass="math inline">\(A \subset B \equiv\)</span> every element of A is an element of B <spanclass="math inline">\(\equiv \{x \in \mathbb X : x \in A \implies x \in B\}\)</span></li>
<li>Operations on sets:
<ul>
<li>Union - <spanclass="math inline">\(\cup\)</span> - <spanclass="math inline">\(A \cup B = \{ x \in \mathbb X : x \in A \lor x \in B \}\)</span></li>
<li>Intersection - <spanclass="math inline">\(\cap\)</span> - <spanclass="math inline">\(A \cap B = \{ x \in \mathbb X : x \in A \land x \in B \}\)</span></li>
<li>Complement - <spanclass="math inline">\(A'\)</span> - <spanclass="math inline">\(A' = \{ x \in \mathbb X : \neg (x \in A) \}\)</span>
<li>Note: <spanclass="math inline">\(\{ \emptyset \} \neq \emptyset\)</span>, one is a set with one element, one is the empty set, no elements (<spanclass="math inline">\(\{ \}\)</span>)</li>
<li>Quip: <spanclass="math inline">\(\{ x \in \mathbb R : x^2 = -1\} = \emptyset\)</span></li>
<li><spanclass="math inline">\(A \times B = \{ (p, q) : p \in A \land q \in B \}\)</span></li>
</ul></li>
<li>Def: A relation <spanclass="math inline">\(R\)</span> on a set <spanclass="math inline">\(\mathbb X\)</span> is a subset of <spanclass="math inline">\(\mathbb X \times \mathbb X\)</span> (<spanclass="math inline">\(R \subseteq \mathbb X \times \mathbb X\)</span>)</li>
<li>Graph of a function <spanclass="math inline">\(f()\)</span>: <spanclass="math inline">\(\{ (x, f(x) : x \in Dom(f) \}\)</span></li>
<li>Properties of:
<ul>
<li>Reflexivity: <spanclass="math inline">\((\forall x \in \mathbb X ) (x, x) \in R \equiv (\forall x \in \mathbb X) x R x\)</span></li>
<li>Symmetricity: <spanclass="math inline">\([ (\forall x, y \in \mathbb X) (x, y) \in R \implies (y, x) \in R) ] \equiv [ (\forall x, y \in \mathbb X) ( x R y \implies y R x) ]\)</span></li>
<li>Transitivity: <spanclass="math inline">\((\forall x, y, z \in \mathbb X) (x R y \land y R z \implies x R z)\)</span></li>
<li>Antisymmetricity: <spanclass="math inline">\((\forall x, y \in \mathbb X) (x R y \land y R x \implies x = y)\)</span></li>
</ul></li>
<li>Equivalence relations:
<ul>
<li>Def: <spanclass="math inline">\(R \subseteq \mathbb X \times \mathbb X\)</span> is said to be an equivalence relation <em>iff</em><spanclass="math inline">\(R\)</span> is reflexive, symmetric and transitive.</li>
<li>Congruence modulo n: <spanclass="math inline">\(p R q \equiv n | p - q\)</span></li>
<li>Def R - and equivalence relation of <spanclass="math inline">\(\mathbb X\)</span>: The <em>equivalence class</em> of an element <spanclass="math inline">\(x \in \mathbb X\)</span> is the set <spanclass="math inline">\([x]_R = \{ y \in \mathbb X : x R y \}\)</span>
<ul>
<li>Every <spanclass="math inline">\(x \in \mathbb X\)</span> belongs to the equivalence class of some element <spanclass="math inline">\(a\)</span>.</li>
<li>A partition is a set containing subsets of some set <spanclass="math inline">\(\mathbb X\)</span> such that their collective symmetric difference equals <spanclass="math inline">\(\mathbb X\)</span>. A partition of is a set <spanclass="math inline">\(\{ A_i: i \in \mathbb I \land A_i \subseteq \mathbb X \}\)</span> such that:
<li><spanclass="math inline">\((\forall i, j \in \mathbb I) (i \neq j \implies A_i \cap A_j = \emptyset)\)</span></li>
</ul></li>
<li><spanclass="math inline">\(\{ A_i \}_{i \in \mathbb I}\)</span> is a partition <em>iff</em> there exists an equivalence relation <spanclass="math inline">\(R\)</span> on <spanclass="math inline">\(\mathbb X\)</span> such that:
<ul>
<li><spanclass="math inline">\((\forall i \in \mathbb I) (\exists x \in \mathbb X) A_i = [x]_R\)</span></li>
<li><spanclass="math inline">\(\mathbb X\)</span> is a set, <spanclass="math inline">\(R \subseteq \mathbb X \times \mathbb X\)</span></li>
<li>Def: <spanclass="math inline">\(R\)</span> is a partial order on <spanclass="math inline">\(\mathbb X\)</span> iff <spanclass="math inline">\(R\)</span> is:
<ul>
<li>Reflexive</li>
<li>Antisymmetric</li>
<li>Transitive</li>
</ul></li>
<li>Def: <spanclass="math inline">\(m \in \mathbb X\)</span> is said to be:
<ul>
<li>maximal element in <spanclass="math inline">\((\mathbb X, \preccurlyeq)\)</span> iff <spanclass="math inline">\((\forall a \in \mathbb X) m \preccurlyeq a \implies m = a\)</span></li>
<li>largest iff <spanclass="math inline">\((\forall a \in \mathbb X) (a \preccurlyeq m)\)</span></li>
<li>minimal iff <spanclass="math inline">\((\forall a \in \mathbb X) (a \preccurlyeq m \implies a = m)\)</span></li>
<li>Def: A partial order <spanclass="math inline">\(R\)</span> on <spanclass="math inline">\(\mathbb X\)</span> is said to be <em>“total”</em> iff <spanclass="math inline">\((\forall x, y \in \mathbb X) (x R y \lor y R x)\)</span></li>
<li>Def: A subset <spanclass="math inline">\(B\)</span> of <spanclass="math inline">\(\mathbb X\)</span> is called a chain <em>“chain”</em> iff <spanclass="math inline">\(B\)</span> is totally ordered by <spanclass="math inline">\(R\)</span>
<ul>
<li><spanclass="math inline">\(C(\mathbb X)\)</span> - the set of all chains in <spanclass="math inline">\((\mathbb X, R)\)</span></li>
<li>A chain <spanclass="math inline">\(D\)</span> in <spanclass="math inline">\((\mathbb X, R)\)</span> is called a maximal chain iff <spanclass="math inline">\(D\)</span> is a maximal element in <spanclass="math inline">\((C(\mathbb X), R)\)</span></li>
<li><spanclass="math inline">\(K \subseteq \mathbb X\)</span> is called an antichain in <spanclass="math inline">\((\mathbb X, R)\)</span> iff <spanclass="math inline">\((\forall p, q \in K) (p R q \lor q R p \implies p = q)\)</span></li>
<li>Def: <spanclass="math inline">\(R\)</span> is a partial order on <spanclass="math inline">\(\mathbb X\)</span>, <spanclass="math inline">\(R\)</span> is called a <em>well</em> order iff <spanclass="math inline">\(R\)</span> is a total order on <spanclass="math inline">\(X\)</span> and every nonempty subset <spanclass="math inline">\(A\)</span> of <spanclass="math inline">\(\mathbb X\)</span> has the smallest element</li>
<li><spanclass="math inline">\(f: \mathbb X \to \mathbb Y\)</span></li>
<li>Def: <spanclass="math inline">\(f \subseteq \mathbb X \times \mathbb Y\)</span> is said to be a function if:
<ul>
<li><spanclass="math inline">\((\forall x \in \mathbb X)(\exists y \in \mathbb Y) (x, y) \in f(y = f(x))\)</span></li>
<li><spanclass="math inline">\((\forall a \in \mathbb X)(\forall p, q \in \mathbb Y)((a, p) \in f \land (a, q) \in f \implies p = q)\)</span></li>
</ul></li>
<li>Types of functions <spanclass="math inline">\(f: \mathbb X \to \mathbb Y\)</span>:
<ul>
<li><spanclass="math inline">\(f\)</span> is said to be an injection ( 1 to 1 function) iff <spanclass="math inline">\((\forall x_1, x_2 \in \mathbb X) x_1 \neq x_2 \implies f(x_1) \neq f(x_2)\)</span></li>
<li><spanclass="math inline">\(f\)</span> is said to be a surjection (onto function) iff <spanclass="math inline">\((\forall y \in \mathbb Y)(\exists x \in \mathbb X) f(x) = y\)</span></li>
<li>If <spanclass="math inline">\(f^{-1}\)</span> is a function from <spanclass="math inline">\(\mathbb Y \to \mathbb X\)</span> then <spanclass="math inline">\(f^{-1}\)</span> is called the inverse function for <spanclass="math inline">\(f\)</span>
<ul>
<li>Fact: <spanclass="math inline">\(f^{-1}\)</span> is a function iff <spanclass="math inline">\(f\)</span> is a <em>bijection</em> (1 to 1 and onto)</li>
</ul></li>
</ul></li>
<li>For some set <spanclass="math inline">\(\mathbb A\)</span> the image of <spanclass="math inline">\(\mathbb A\)</span> by <spanclass="math inline">\(f\)</span> is <spanclass="math inline">\(f(\mathbb A) = \{ f(x) : x \in \mathbb A \}\)</span>. We can also define the inverse of an image even when the function itself isn’t invertible: <spanclass="math inline">\(f^{-1}(\mathbb A)\)</span></li>
<li><spanclass="math inline">\(|\mathbb A|\)</span> size (number of elements) of <spanclass="math inline">\(\mathbb A\)</span></li>
<li>Rule of addition:
<ul>
<li>If <spanclass="math inline">\(\mathbb A, \mathbb B \subseteq \mathbb X\)</span> and <spanclass="math inline">\(|\mathbb A|, |\mathbb B| \in \mathbb N\)</span> and <spanclass="math inline">\(\mathbb A \cap \mathbb B = \emptyset\)</span> then <spanclass="math inline">\(|\mathbb A \cup \mathbb B| = |\mathbb A| + |\mathbb B|\)</span></li>
<li>Can be generalized as: <spanclass="math display">\[