diff --git a/info4/kapitel-0/Mengentheorie.ipynb b/info4/kapitel-0/Mengentheorie.ipynb index 96767457f52c7aa03427f82263223f3af0701ea5..3e5d2a5f07a46facb29de7f756ebfb9cf9919f31 100644 --- a/info4/kapitel-0/Mengentheorie.ipynb +++ b/info4/kapitel-0/Mengentheorie.ipynb @@ -545,7 +545,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# Ein Theorem\n", + "# Ein Theorem (Distributivgesetz 1)\n", "\n", "Für alle Mengen $x$, $y$, $z$ gilt:\n", "* $x \\cup (y \\cap z) = (x\\cup y) \\cap (x\\cup z)$\n", @@ -599,6 +599,148 @@ "({2,3,55}∪{2,44,77})∩({2,3,55}∪{2,44,66})" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Beweis von $x \\cup (y \\cap z) = (x\\cup y) \\cap (x\\cup z)$\n", + "\n", + "Lemmata:\n", + "1. $x \\cup y = \\{a \\mid a\\in x \\vee a\\in y\\}$\n", + "2. $x \\cap y = \\{a \\mid a\\in x \\wedge a\\in y\\}$\n", + "3. $a \\in \\{b \\mid P(b)\\} \\equiv P(a)$\n", + "4. $\\phi \\vee (\\psi \\wedge \\rho) \\equiv (\\phi \\vee \\psi) \\wedge (\\phi \\vee \\rho)$\n", + "\n", + "Ãquivalenzbeweis \n", + "1. $x \\cup (y \\cap z)$\n", + "2. (Lemma 1) $\\Longleftrightarrow$ $\\{a \\mid a\\in x \\vee a\\in (y \\cap z)\\}$ \n", + "3. (Lemma 2) $\\Longleftrightarrow$ $\\{a \\mid a\\in x \\vee a\\in \\{b \\mid b\\in y \\wedge b\\in z\\} \\}$ \n", + "4. (Lemma 3) $\\Longleftrightarrow$ $\\{a \\mid a\\in x \\vee (a\\in y \\wedge a\\in z) \\}$\n", + "5. (Lemma 4) $\\Longleftrightarrow$ $\\{a \\mid (a\\in x \\vee a\\in y) \\wedge (a\\in x \\vee a\\in z) \\}$\n", + "6. (Lemma 3, $\\Leftarrow$) $\\Longleftrightarrow$ $\\{a \\mid a\\in \\{b \\mid b\\in x \\vee b\\in y\\} \\wedge a\\in \\{b \\mid b\\in x \\vee b\\in z\\} \\}$\n", + "7. (Lemma 1, $\\Leftarrow$) $\\Longleftrightarrow$ $\\{a \\mid a\\in x \\cup y \\wedge a\\in x \\cup z) \\}$\n", + "8. (Lemma 2, $\\Leftarrow$) $(x\\cup y) \\cap (x\\cup z)$" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Gesetze\n", + "\n", + "Für alle Mengen $x$, $y$, $z$ gilt:\n", + "* $x \\cup y = y \\cup x$ (Kommutativ 1)\n", + "* $x \\cap y = y \\cap x$ (Kommutativ 2)\n", + "* $x \\cup (y \\cup z) = (x\\cup y) \\cup z$ (Assoziativ 1)\n", + "* $x \\cap (y \\cap z) = (x\\cap y) \\cap z$ (Assoziativ 2)\n", + "* $x \\cup (y \\cap z) = (x\\cup y) \\cap (x\\cup z)$ (Distributiv 1, siehe oben)\n", + "* $x \\cap (y \\cup z) = (x\\cap y) \\cup (x\\cap z)$ (Distributiv 2)\n", + "* $z \\setminus (x \\cup y) = (z\\setminus x) \\cap (z\\setminus y)$ (De Morgan 1)\n", + "* $z \\setminus (x \\cap y) = (z\\setminus x) \\cup (z\\setminus y)$ (De Morgan 2)\n", + "* $x \\cup \\emptyset = x$ (Leere Menge 1)\n", + "* $x \\cap \\emptyset = \\emptyset$ (Leere Menge 2)\n", + "* $x \\cap (z \\setminus x) = \\emptyset$ (Leere Menge 3)" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [ + { + "data": { + "text/markdown": [ + "$\\{1,3,7,9\\}$" + ], + "text/plain": [ + "{1,3,7,9}" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(1..10) \\ ({2,4,6,8} ∪ {5,10}) // De Morgan 1 - linke Seite" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/markdown": [ + "$\\{1,3,5,7,9,10\\}$" + ], + "text/plain": [ + "{1,3,5,7,9,10}" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(1..10) \\ {2,4,6,8}" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "data": { + "text/markdown": [ + "$\\{1,2,3,4,6,7,8,9\\}$" + ], + "text/plain": [ + "{1,2,3,4,6,7,8,9}" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "(1..10) \\ {5,10}" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/markdown": [ + "$\\{1,3,7,9\\}$" + ], + "text/plain": [ + "{1,3,7,9}" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "((1..10) \\ {2,4,6,8}) ∩ ((1..10) \\ {5,10}) // De Morgan 1 - rechte Seite" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Gesetze von De Morgan: $Op1( x ~ Op2 ~ y)$ wird umgewandelt nach $Op1(x) ~ Op2' ~ Op1(y)$, wo Op2' der duale Operator von Op2 ist." + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/info4/kapitel-0/img/Venn.pdf b/info4/kapitel-0/img/Venn.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a95d99be94cc8c7f2aba5852085a15e7f688d7d9 Binary files /dev/null and b/info4/kapitel-0/img/Venn.pdf differ