diff --git a/info4/kapitel-0/Mengentheorie.ipynb b/info4/kapitel-0/Mengentheorie.ipynb
index e5bf56b464d4946cbd6368b73bf1de721558a28a..2ce3414ef4d19f763799e2b20e2f23df4aa292bc 100644
--- a/info4/kapitel-0/Mengentheorie.ipynb
+++ b/info4/kapitel-0/Mengentheorie.ipynb
@@ -5912,12 +5912,1650 @@
     ":pref DOT_ENGINE=dot"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Definitions- und Wertebereich\n",
+    "\n",
+    "Definitionsbereich (Domain in Englisch):\n",
+    "* $dom(r) = \\{a \\mid \\exists b.((a,b)\\in r)\\}$\n",
+    "\n",
+    "Wertebereich (Bildmenge, Range in Englisch):\n",
+    "* $ran(r) = \\{b \\mid \\exists a.((a,b)\\in r)\\}$\n",
+    "          "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 164,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(2\\mapsto 1),(4\\mapsto 2),(6\\mapsto 3),(8\\mapsto 4),(10\\mapsto 5)\\}$"
+      ],
+      "text/plain": [
+       "{(2↦1),(4↦2),(6↦3),(8↦4),(10↦5)}"
+      ]
+     },
+     "execution_count": 164,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":let h {a,b| a∈1..10 ∧ b∈1..10 & b*2=a}"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 165,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{2,4,6,8,10\\}$"
+      ],
+      "text/plain": [
+       "{2,4,6,8,10}"
+      ]
+     },
+     "execution_count": 165,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "{a| ∃b.((a,b)∈h)}"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 166,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{1,2,3,4,5\\}$"
+      ],
+      "text/plain": [
+       "{1,2,3,4,5}"
+      ]
+     },
+     "execution_count": 166,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "{b| ∃a.((a,b)∈h)}"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 167,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{2,4,6,8,10\\}$"
+      ],
+      "text/plain": [
+       "{2,4,6,8,10}"
+      ]
+     },
+     "execution_count": 167,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "dom(h)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(2\\mapsto 1),(4\\mapsto 2),(6\\mapsto 3),(8\\mapsto 4),(10\\mapsto 5)\\}$"
+      ],
+      "text/plain": [
+       "{(2↦1),(4↦2),(6↦3),(8↦4),(10↦5)}"
+      ]
+     },
+     "execution_count": 14,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":let h {a,b| a∈1..10 ∧ b∈1..10 & b*2=a}"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 15,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "image/svg+xml": [
+       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
+       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
+       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
+       "<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
+       " -->\n",
+       "<!-- Title: state Pages: 1 -->\n",
+       "<svg width=\"206pt\" height=\"314pt\"\n",
+       " viewBox=\"0.00 0.00 206.00 314.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
+       "<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 310)\">\n",
+       "<title>state</title>\n",
+       "<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-310 203,-310 203,5 -4,5\"/>\n",
+       "<!-- 10 -->\n",
+       "<g id=\"node1\" class=\"node\"><title>10</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-306 0,-306 0,-270 54,-270 54,-306\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-283.8\" font-family=\"Times,serif\" font-size=\"14.00\">10</text>\n",
+       "</g>\n",
+       "<!-- 5 -->\n",
+       "<g id=\"node3\" class=\"node\"><title>5</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-216 0,-216 0,-180 54,-180 54,-216\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">5</text>\n",
+       "</g>\n",
+       "<!-- 10&#45;&gt;5 -->\n",
+       "<g id=\"edge2\" class=\"edge\"><title>10&#45;&gt;5</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M27,-269.614C27,-257.24 27,-240.369 27,-226.22\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"30.5001,-226.05 27,-216.05 23.5001,-226.05 30.5001,-226.05\"/>\n",
+       "<text text-anchor=\"middle\" x=\"30.5\" y=\"-238.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "<!-- 8 -->\n",
+       "<g id=\"node4\" class=\"node\"><title>8</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-306 72,-306 72,-270 126,-270 126,-306\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-283.8\" font-family=\"Times,serif\" font-size=\"14.00\">8</text>\n",
+       "</g>\n",
+       "<!-- 4 -->\n",
+       "<g id=\"node6\" class=\"node\"><title>4</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-216 72,-216 72,-180 126,-180 126,-216\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">4</text>\n",
+       "</g>\n",
+       "<!-- 8&#45;&gt;4 -->\n",
+       "<g id=\"edge4\" class=\"edge\"><title>8&#45;&gt;4</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M99,-269.614C99,-257.24 99,-240.369 99,-226.22\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"102.5,-226.05 99,-216.05 95.5001,-226.05 102.5,-226.05\"/>\n",
+       "<text text-anchor=\"middle\" x=\"102.5\" y=\"-238.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "<!-- 2 -->\n",
+       "<g id=\"node11\" class=\"node\"><title>2</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-126 72,-126 72,-90 126,-90 126,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "</g>\n",
+       "<!-- 4&#45;&gt;2 -->\n",
+       "<g id=\"edge8\" class=\"edge\"><title>4&#45;&gt;2</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M99,-179.614C99,-167.24 99,-150.369 99,-136.22\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"102.5,-136.05 99,-126.05 95.5001,-136.05 102.5,-136.05\"/>\n",
+       "<text text-anchor=\"middle\" x=\"102.5\" y=\"-148.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "<!-- 6 -->\n",
+       "<g id=\"node7\" class=\"node\"><title>6</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"198,-306 144,-306 144,-270 198,-270 198,-306\"/>\n",
+       "<text text-anchor=\"middle\" x=\"171\" y=\"-283.8\" font-family=\"Times,serif\" font-size=\"14.00\">6</text>\n",
+       "</g>\n",
+       "<!-- 3 -->\n",
+       "<g id=\"node9\" class=\"node\"><title>3</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"198,-216 144,-216 144,-180 198,-180 198,-216\"/>\n",
+       "<text text-anchor=\"middle\" x=\"171\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
+       "</g>\n",
+       "<!-- 6&#45;&gt;3 -->\n",
+       "<g id=\"edge6\" class=\"edge\"><title>6&#45;&gt;3</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M171,-269.614C171,-257.24 171,-240.369 171,-226.22\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"174.5,-226.05 171,-216.05 167.5,-226.05 174.5,-226.05\"/>\n",
+       "<text text-anchor=\"middle\" x=\"174.5\" y=\"-238.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "<!-- 1 -->\n",
+       "<g id=\"node13\" class=\"node\"><title>1</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-36 72,-36 72,-0 126,-0 126,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "</g>\n",
+       "<!-- 2&#45;&gt;1 -->\n",
+       "<g id=\"edge10\" class=\"edge\"><title>2&#45;&gt;1</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M99,-89.614C99,-77.2403 99,-60.3686 99,-46.2198\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"102.5,-46.0504 99,-36.0504 95.5001,-46.0504 102.5,-46.0504\"/>\n",
+       "<text text-anchor=\"middle\" x=\"102.5\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "</g>\n",
+       "</svg>"
+      ],
+      "text/plain": [
+       "<Dot visualization: expr_as_graph [dhd={(1,\"nein\"),(2,\"nein\"),(3,\"ja\"),(4,\"nein\"),(5,\"nein\"),(6,\"ja\"),(7,\"nein\")} & h={(2,1),(4,2),(6,3),(8,4),(10,5)}(\"h\",h)]>"
+      ]
+     },
+     "execution_count": 15,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":dot expr_as_graph (\"h\",h)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(1\\mapsto\\text{\"nein\"}),(2\\mapsto\\text{\"nein\"}),(3\\mapsto\\text{\"ja\"}),(4\\mapsto\\text{\"nein\"}),(5\\mapsto\\text{\"nein\"}),(6\\mapsto\\text{\"ja\"}),(7\\mapsto\\text{\"nein\"})\\}$"
+      ],
+      "text/plain": [
+       "{(1↦\"nein\"),(2↦\"nein\"),(3↦\"ja\"),(4↦\"nein\"),(5↦\"nein\"),(6↦\"ja\"),(7↦\"nein\")}"
+      ]
+     },
+     "execution_count": 9,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":let d {x,y| x:1..7 ∧ (x mod 3 =0 => y = \"ja\") ∧ (x mod 3 >0 => y= \"nein\")}"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{1,2,3,4,5,6,7\\}$"
+      ],
+      "text/plain": [
+       "{1,2,3,4,5,6,7}"
+      ]
+     },
+     "execution_count": 10,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "dom(d)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{\\text{\"ja\"},\\text{\"nein\"}\\}$"
+      ],
+      "text/plain": [
+       "{\"ja\",\"nein\"}"
+      ]
+     },
+     "execution_count": 11,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "ran(d)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 12,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "image/svg+xml": [
+       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
+       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
+       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
+       "<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
+       " -->\n",
+       "<!-- Title: state Pages: 1 -->\n",
+       "<svg width=\"494pt\" height=\"134pt\"\n",
+       " viewBox=\"0.00 0.00 494.00 134.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
+       "<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 130)\">\n",
+       "<title>state</title>\n",
+       "<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-130 491,-130 491,5 -4,5\"/>\n",
+       "<!-- 7 -->\n",
+       "<g id=\"node1\" class=\"node\"><title>7</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-126 0,-126 0,-90 54,-90 54,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">7</text>\n",
+       "</g>\n",
+       "<!-- &quot;nein&quot; -->\n",
+       "<g id=\"node3\" class=\"node\"><title>&quot;nein&quot;</title>\n",
+       "<polygon fill=\"#fff68f\" stroke=\"#fff68f\" points=\"198,-36 144,-36 144,-0 198,-0 198,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"171\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">&quot;nein&quot;</text>\n",
+       "</g>\n",
+       "<!-- 7&#45;&gt;&quot;nein&quot; -->\n",
+       "<g id=\"edge2\" class=\"edge\"><title>7&#45;&gt;&quot;nein&quot;</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M54.0853,-90.4479C76.8692,-76.5243 109.644,-56.4953 134.698,-41.1844\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"136.839,-43.9781 143.547,-35.7771 133.189,-38.0052 136.839,-43.9781\"/>\n",
+       "<text text-anchor=\"middle\" x=\"115.5\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d</text>\n",
+       "</g>\n",
+       "<!-- 6 -->\n",
+       "<g id=\"node4\" class=\"node\"><title>6</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"414,-126 360,-126 360,-90 414,-90 414,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"387\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">6</text>\n",
+       "</g>\n",
+       "<!-- &quot;ja&quot; -->\n",
+       "<g id=\"node6\" class=\"node\"><title>&quot;ja&quot;</title>\n",
+       "<polygon fill=\"#fff68f\" stroke=\"#fff68f\" points=\"450,-36 396,-36 396,-0 450,-0 450,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"423\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">&quot;ja&quot;</text>\n",
+       "</g>\n",
+       "<!-- 6&#45;&gt;&quot;ja&quot; -->\n",
+       "<g id=\"edge4\" class=\"edge\"><title>6&#45;&gt;&quot;ja&quot;</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M394.112,-89.614C399.274,-76.9977 406.348,-59.7052 412.204,-45.3907\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"415.478,-46.6311 416.025,-36.0504 408.999,-43.9807 415.478,-46.6311\"/>\n",
+       "<text text-anchor=\"middle\" x=\"411.5\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d</text>\n",
+       "</g>\n",
+       "<!-- 5 -->\n",
+       "<g id=\"node7\" class=\"node\"><title>5</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-126 72,-126 72,-90 126,-90 126,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">5</text>\n",
+       "</g>\n",
+       "<!-- 5&#45;&gt;&quot;nein&quot; -->\n",
+       "<g id=\"edge6\" class=\"edge\"><title>5&#45;&gt;&quot;nein&quot;</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M113.225,-89.614C123.845,-76.6338 138.515,-58.7037 150.415,-44.1595\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"153.426,-46.0064 157.05,-36.0504 148.008,-41.5737 153.426,-46.0064\"/>\n",
+       "<text text-anchor=\"middle\" x=\"145.5\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d</text>\n",
+       "</g>\n",
+       "<!-- 4 -->\n",
+       "<g id=\"node9\" class=\"node\"><title>4</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"198,-126 144,-126 144,-90 198,-90 198,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"171\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">4</text>\n",
+       "</g>\n",
+       "<!-- 4&#45;&gt;&quot;nein&quot; -->\n",
+       "<g id=\"edge8\" class=\"edge\"><title>4&#45;&gt;&quot;nein&quot;</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M171,-89.614C171,-77.2403 171,-60.3686 171,-46.2198\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"174.5,-46.0504 171,-36.0504 167.5,-46.0504 174.5,-46.0504\"/>\n",
+       "<text text-anchor=\"middle\" x=\"174.5\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d</text>\n",
+       "</g>\n",
+       "<!-- 3 -->\n",
+       "<g id=\"node11\" class=\"node\"><title>3</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"486,-126 432,-126 432,-90 486,-90 486,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"459\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
+       "</g>\n",
+       "<!-- 3&#45;&gt;&quot;ja&quot; -->\n",
+       "<g id=\"edge10\" class=\"edge\"><title>3&#45;&gt;&quot;ja&quot;</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M451.888,-89.614C446.726,-76.9977 439.652,-59.7052 433.796,-45.3907\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"437.001,-43.9807 429.975,-36.0504 430.522,-46.6311 437.001,-43.9807\"/>\n",
+       "<text text-anchor=\"middle\" x=\"447.5\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d</text>\n",
+       "</g>\n",
+       "<!-- 2 -->\n",
+       "<g id=\"node13\" class=\"node\"><title>2</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"270,-126 216,-126 216,-90 270,-90 270,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"243\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "</g>\n",
+       "<!-- 2&#45;&gt;&quot;nein&quot; -->\n",
+       "<g id=\"edge12\" class=\"edge\"><title>2&#45;&gt;&quot;nein&quot;</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M228.775,-89.614C218.155,-76.6338 203.485,-58.7037 191.585,-44.1595\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"193.992,-41.5737 184.95,-36.0504 188.574,-46.0064 193.992,-41.5737\"/>\n",
+       "<text text-anchor=\"middle\" x=\"217.5\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d</text>\n",
+       "</g>\n",
+       "<!-- 1 -->\n",
+       "<g id=\"node15\" class=\"node\"><title>1</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"342,-126 288,-126 288,-90 342,-90 342,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"315\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "</g>\n",
+       "<!-- 1&#45;&gt;&quot;nein&quot; -->\n",
+       "<g id=\"edge14\" class=\"edge\"><title>1&#45;&gt;&quot;nein&quot;</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M287.915,-90.4479C265.131,-76.5243 232.356,-56.4953 207.302,-41.1844\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"208.811,-38.0052 198.453,-35.7771 205.161,-43.9781 208.811,-38.0052\"/>\n",
+       "<text text-anchor=\"middle\" x=\"259.5\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d</text>\n",
+       "</g>\n",
+       "</g>\n",
+       "</svg>"
+      ],
+      "text/plain": [
+       "<Dot visualization: expr_as_graph [dhd={(1,\"nein\"),(2,\"nein\"),(3,\"ja\"),(4,\"nein\"),(5,\"nein\"),(6,\"ja\"),(7,\"nein\")} & h={(2,1)}(\"d\",d)]>"
+      ]
+     },
+     "execution_count": 12,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":dot expr_as_graph (\"d\",d)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Relationales Abbild und Umkehrrelation\n",
+    "   \n",
+    "Abbild:\n",
+    " * $r[A] = \\{b \\mid \\exists a.((a,b)\\in r \\wedge a\\in A)\\}$\n",
+    "\n",
+    "Umkehrrelation:\n",
+    " * $r^{-1} = \\{(b,a) \\mid  (a,b)\\in r \\}$\\\\\n",
+    "\n",
+    "Im Notebook muss für die Umkehrrelation leider Tilde (~) verwendet werden: "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{4,5\\}$"
+      ],
+      "text/plain": [
+       "{4,5}"
+      ]
+     },
+     "execution_count": 16,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "h[8..10]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 17,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{\\text{\"ja\"}\\}$"
+      ],
+      "text/plain": [
+       "{\"ja\"}"
+      ]
+     },
+     "execution_count": 17,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "d[{3,6}]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 19,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\renewcommand{\\emptyset}{\\mathord\\varnothing}\\emptyset$"
+      ],
+      "text/plain": [
+       "∅"
+      ]
+     },
+     "execution_count": 19,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "d[{0}]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 26,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(\\text{\"ja\"}\\mapsto 3),(\\text{\"ja\"}\\mapsto 6),(\\text{\"nein\"}\\mapsto 1),(\\text{\"nein\"}\\mapsto 2),(\\text{\"nein\"}\\mapsto 4),(\\text{\"nein\"}\\mapsto 5),(\\text{\"nein\"}\\mapsto 7)\\}$"
+      ],
+      "text/plain": [
+       "{(\"ja\"↦3),(\"ja\"↦6),(\"nein\"↦1),(\"nein\"↦2),(\"nein\"↦4),(\"nein\"↦5),(\"nein\"↦7)}"
+      ]
+     },
+     "execution_count": 26,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "d~"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 38,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "image/svg+xml": [
+       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
+       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
+       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
+       "<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
+       " -->\n",
+       "<!-- Title: state Pages: 1 -->\n",
+       "<svg width=\"494pt\" height=\"134pt\"\n",
+       " viewBox=\"0.00 0.00 494.00 134.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
+       "<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 130)\">\n",
+       "<title>state</title>\n",
+       "<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-130 491,-130 491,5 -4,5\"/>\n",
+       "<!-- &quot;nein&quot; -->\n",
+       "<g id=\"node1\" class=\"node\"><title>&quot;nein&quot;</title>\n",
+       "<polygon fill=\"#fff68f\" stroke=\"#fff68f\" points=\"198,-126 144,-126 144,-90 198,-90 198,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"171\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">&quot;nein&quot;</text>\n",
+       "</g>\n",
+       "<!-- 7 -->\n",
+       "<g id=\"node3\" class=\"node\"><title>7</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-36 0,-36 0,-0 54,-0 54,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">7</text>\n",
+       "</g>\n",
+       "<!-- &quot;nein&quot;&#45;&gt;7 -->\n",
+       "<g id=\"edge2\" class=\"edge\"><title>&quot;nein&quot;&#45;&gt;7</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M143.719,-91.5608C133.251,-85.5518 121.229,-78.5478 110.427,-72 94.5084,-62.3502 77.0995,-51.3612 62.3222,-41.901\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"63.8037,-38.6929 53.4982,-36.2339 60.021,-44.5828 63.8037,-38.6929\"/>\n",
+       "<text text-anchor=\"middle\" x=\"118.286\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d~</text>\n",
+       "</g>\n",
+       "<!-- 5 -->\n",
+       "<g id=\"node5\" class=\"node\"><title>5</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-36 72,-36 72,-0 126,-0 126,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">5</text>\n",
+       "</g>\n",
+       "<!-- &quot;nein&quot;&#45;&gt;5 -->\n",
+       "<g id=\"edge4\" class=\"edge\"><title>&quot;nein&quot;&#45;&gt;5</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M156.775,-89.614C146.155,-76.6338 131.485,-58.7037 119.585,-44.1595\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"121.992,-41.5737 112.95,-36.0504 116.574,-46.0064 121.992,-41.5737\"/>\n",
+       "<text text-anchor=\"middle\" x=\"149.286\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d~</text>\n",
+       "</g>\n",
+       "<!-- 4 -->\n",
+       "<g id=\"node7\" class=\"node\"><title>4</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"198,-36 144,-36 144,-0 198,-0 198,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"171\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">4</text>\n",
+       "</g>\n",
+       "<!-- &quot;nein&quot;&#45;&gt;4 -->\n",
+       "<g id=\"edge6\" class=\"edge\"><title>&quot;nein&quot;&#45;&gt;4</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M171,-89.614C171,-77.2403 171,-60.3686 171,-46.2198\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"174.5,-46.0504 171,-36.0504 167.5,-46.0504 174.5,-46.0504\"/>\n",
+       "<text text-anchor=\"middle\" x=\"178.286\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d~</text>\n",
+       "</g>\n",
+       "<!-- 2 -->\n",
+       "<g id=\"node9\" class=\"node\"><title>2</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"270,-36 216,-36 216,-0 270,-0 270,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"243\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "</g>\n",
+       "<!-- &quot;nein&quot;&#45;&gt;2 -->\n",
+       "<g id=\"edge8\" class=\"edge\"><title>&quot;nein&quot;&#45;&gt;2</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M185.225,-89.614C195.845,-76.6338 210.515,-58.7037 222.415,-44.1595\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"225.426,-46.0064 229.05,-36.0504 220.008,-41.5737 225.426,-46.0064\"/>\n",
+       "<text text-anchor=\"middle\" x=\"221.286\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d~</text>\n",
+       "</g>\n",
+       "<!-- 1 -->\n",
+       "<g id=\"node11\" class=\"node\"><title>1</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"342,-36 288,-36 288,-0 342,-0 342,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"315\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "</g>\n",
+       "<!-- &quot;nein&quot;&#45;&gt;1 -->\n",
+       "<g id=\"edge10\" class=\"edge\"><title>&quot;nein&quot;&#45;&gt;1</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M198.187,-91.7663C208.802,-85.7232 221.034,-78.6418 232,-72 247.985,-62.3177 265.453,-51.2405 280.222,-41.7252\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"282.534,-44.3978 289.031,-36.0288 278.733,-38.5196 282.534,-44.3978\"/>\n",
+       "<text text-anchor=\"middle\" x=\"267.286\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d~</text>\n",
+       "</g>\n",
+       "<!-- &quot;ja&quot; -->\n",
+       "<g id=\"node12\" class=\"node\"><title>&quot;ja&quot;</title>\n",
+       "<polygon fill=\"#fff68f\" stroke=\"#fff68f\" points=\"450,-126 396,-126 396,-90 450,-90 450,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"423\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">&quot;ja&quot;</text>\n",
+       "</g>\n",
+       "<!-- 6 -->\n",
+       "<g id=\"node14\" class=\"node\"><title>6</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"414,-36 360,-36 360,-0 414,-0 414,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"387\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">6</text>\n",
+       "</g>\n",
+       "<!-- &quot;ja&quot;&#45;&gt;6 -->\n",
+       "<g id=\"edge12\" class=\"edge\"><title>&quot;ja&quot;&#45;&gt;6</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M415.888,-89.614C410.726,-76.9977 403.652,-59.7052 397.796,-45.3907\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"401.001,-43.9807 393.975,-36.0504 394.522,-46.6311 401.001,-43.9807\"/>\n",
+       "<text text-anchor=\"middle\" x=\"416.286\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d~</text>\n",
+       "</g>\n",
+       "<!-- 3 -->\n",
+       "<g id=\"node16\" class=\"node\"><title>3</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"486,-36 432,-36 432,-0 486,-0 486,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"459\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
+       "</g>\n",
+       "<!-- &quot;ja&quot;&#45;&gt;3 -->\n",
+       "<g id=\"edge14\" class=\"edge\"><title>&quot;ja&quot;&#45;&gt;3</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M430.112,-89.614C435.274,-76.9977 442.348,-59.7052 448.204,-45.3907\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"451.478,-46.6311 452.025,-36.0504 444.999,-43.9807 451.478,-46.6311\"/>\n",
+       "<text text-anchor=\"middle\" x=\"452.286\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">d~</text>\n",
+       "</g>\n",
+       "</g>\n",
+       "</svg>"
+      ],
+      "text/plain": [
+       "<Dot visualization: expr_as_graph [dhd={(1,\"nein\"),(2,\"nein\"),(3,\"ja\"),(4,\"nein\"),(5,\"nein\"),(6,\"ja\"),(7,\"nein\")} & h={(2,1),(4,2),(6,3),(8,4),(10,5)}(\"d~\",d~)]>"
+      ]
+     },
+     "execution_count": 38,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":dot expr_as_graph (\"d~\",d~)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Man kann natürlich auch beide Operatore verknüpfen, zum Beispiel um herauszufinden welche Zahlen durch 3 teilbar sind:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 40,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{3,6\\}$"
+      ],
+      "text/plain": [
+       "{3,6}"
+      ]
+     },
+     "execution_count": 40,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "d~[{\"ja\"}]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 54,
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    ":unlet d"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 32,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/latex": [
+       "$1 = 2$"
+      ],
+      "text/plain": [
+       "1 = 2"
+      ]
+     },
+     "execution_count": 32,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "# Binäre Relationen - Verknüpfung\n",
+    "   \n",
+    "Wir können Relationen $r_1$ und $r_2$ mit dem Operator ``;'' verknüpfen:\n",
+    "* $(r_1 ; r_2)$ = $\\{(a,c) \\mid \\exists b. ( (a,b)\\in r_1 \\wedge (b,c)\\in r_2)\\}$.\n",
+    "\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 42,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(1\\mapsto 4),(1\\mapsto 8)\\}$"
+      ],
+      "text/plain": [
+       "{(1↦4),(1↦8)}"
+      ]
+     },
+     "execution_count": 42,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "({1↦2, 2↦3} ; {2↦4, 2↦8})"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "\n",
+    "Man kann eine Relation auch mit sich selber verknüpfen wenn Werte- und Definitionsbereich kompatibel sind.\n",
+    "Zum Beispiel $h^2 = (h;h)$:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 49,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(4\\mapsto 1),(8\\mapsto 2)\\}$"
+      ],
+      "text/plain": [
+       "{(4↦1),(8↦2)}"
+      ]
+     },
+     "execution_count": 49,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "(h ; h)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 50,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "image/svg+xml": [
+       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
+       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
+       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
+       "<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
+       " -->\n",
+       "<!-- Title: state Pages: 1 -->\n",
+       "<svg width=\"910pt\" height=\"256pt\"\n",
+       " viewBox=\"0.00 0.00 910.00 256.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
+       "<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 252)\">\n",
+       "<title>state</title>\n",
+       "<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-252 907,-252 907,5 -4,5\"/>\n",
+       "<!-- abs2_3 -->\n",
+       "<g id=\"node1\" class=\"node\"><title>abs2_3</title>\n",
+       "<ellipse fill=\"none\" stroke=\"black\" cx=\"114\" cy=\"-222\" rx=\"38.0899\" ry=\"18\"/>\n",
+       "<text text-anchor=\"middle\" x=\"114\" y=\"-217.8\" font-family=\"Times,serif\" font-size=\"14.00\">abs2_3</text>\n",
+       "</g>\n",
+       "<!-- abs2_4 -->\n",
+       "<g id=\"node3\" class=\"node\"><title>abs2_4</title>\n",
+       "<ellipse fill=\"none\" stroke=\"black\" cx=\"456\" cy=\"-116\" rx=\"38.0899\" ry=\"18\"/>\n",
+       "<text text-anchor=\"middle\" x=\"456\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\">abs2_4</text>\n",
+       "</g>\n",
+       "<!-- abs2_3&#45;&gt;abs2_4 -->\n",
+       "<g id=\"edge2\" class=\"edge\"><title>abs2_3&#45;&gt;abs2_4</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M127.315,-205.029C141.732,-187.917 163.375,-162.817 168.598,-160 209.069,-138.172 337.623,-125.628 408.301,-120.213\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"408.581,-123.702 418.292,-119.466 408.059,-116.722 408.581,-123.702\"/>\n",
+       "<text text-anchor=\"middle\" x=\"425.701\" y=\"-164.8\" font-family=\"Times,serif\" font-size=\"14.00\">LET h BE &#160;h={(2|&#45;&gt;1),(4|&#45;&gt;2),(6|&#45;&gt;3),(8|&#45;&gt;4),(10|&#45;&gt;5)} IN &quot;h&quot; |&#45;&gt; h |&#45;&gt; &quot;hh&quot; |&#45;&gt; (h ; h) END</text>\n",
+       "</g>\n",
+       "<!-- abs1_2 -->\n",
+       "<g id=\"node5\" class=\"node\"><title>abs1_2</title>\n",
+       "<ellipse fill=\"none\" stroke=\"black\" cx=\"38\" cy=\"-116\" rx=\"38.0899\" ry=\"18\"/>\n",
+       "<text text-anchor=\"middle\" x=\"38\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\">abs1_2</text>\n",
+       "</g>\n",
+       "<!-- abs2_3&#45;&gt;abs1_2 -->\n",
+       "<g id=\"edge4\" class=\"edge\"><title>abs2_3&#45;&gt;abs1_2</title>\n",
+       "<path fill=\"none\" stroke=\"sienna\" d=\"M99.282,-205.132C92.1936,-197.211 83.7441,-187.345 76.7882,-178 68.358,-166.674 59.8465,-153.523 52.953,-142.337\"/>\n",
+       "<polygon fill=\"sienna\" stroke=\"sienna\" points=\"55.7616,-140.219 47.5805,-133.487 49.7778,-143.851 55.7616,-140.219\"/>\n",
+       "<text text-anchor=\"middle\" x=\"94.1059\" y=\"-164.8\" font-family=\"Times,serif\" font-size=\"14.00\">$from</text>\n",
+       "</g>\n",
+       "<!-- &quot;hh&quot; -->\n",
+       "<g id=\"node7\" class=\"node\"><title>&quot;hh&quot;</title>\n",
+       "<polygon fill=\"#fff68f\" stroke=\"#fff68f\" points=\"148,-134 94,-134 94,-98 148,-98 148,-134\"/>\n",
+       "<text text-anchor=\"middle\" x=\"121\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\">&quot;hh&quot;</text>\n",
+       "</g>\n",
+       "<!-- abs2_3&#45;&gt;&quot;hh&quot; -->\n",
+       "<g id=\"edge6\" class=\"edge\"><title>abs2_3&#45;&gt;&quot;hh&quot;</title>\n",
+       "<path fill=\"none\" stroke=\"#473c8b\" d=\"M113.725,-203.883C113.663,-191.641 113.856,-174.784 115.004,-160 115.399,-154.913 116.005,-149.51 116.681,-144.314\"/>\n",
+       "<polygon fill=\"#473c8b\" stroke=\"#473c8b\" points=\"120.19,-144.498 118.126,-134.106 113.259,-143.516 120.19,-144.498\"/>\n",
+       "<text text-anchor=\"middle\" x=\"133.498\" y=\"-164.8\" font-family=\"Times,serif\" font-size=\"14.00\">$to_el</text>\n",
+       "</g>\n",
+       "<!-- &quot;h&quot; -->\n",
+       "<g id=\"node9\" class=\"node\"><title>&quot;h&quot;</title>\n",
+       "<polygon fill=\"#fff68f\" stroke=\"#fff68f\" points=\"65,-36 11,-36 11,-0 65,-0 65,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"38\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">&quot;h&quot;</text>\n",
+       "</g>\n",
+       "<!-- abs1_2&#45;&gt;&quot;h&quot; -->\n",
+       "<g id=\"edge8\" class=\"edge\"><title>abs1_2&#45;&gt;&quot;h&quot;</title>\n",
+       "<path fill=\"none\" stroke=\"sienna\" d=\"M38,-97.8371C38,-83.5031 38,-62.8066 38,-46.2158\"/>\n",
+       "<polygon fill=\"sienna\" stroke=\"sienna\" points=\"41.5001,-46.0143 38,-36.0143 34.5001,-46.0143 41.5001,-46.0143\"/>\n",
+       "<text text-anchor=\"middle\" x=\"55.1059\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">$from</text>\n",
+       "</g>\n",
+       "<!-- abs2_1 -->\n",
+       "<g id=\"node11\" class=\"node\"><title>abs2_1</title>\n",
+       "<ellipse fill=\"none\" stroke=\"black\" cx=\"671\" cy=\"-18\" rx=\"38.0899\" ry=\"18\"/>\n",
+       "<text text-anchor=\"middle\" x=\"671\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">abs2_1</text>\n",
+       "</g>\n",
+       "<!-- abs1_2&#45;&gt;abs2_1 -->\n",
+       "<g id=\"edge10\" class=\"edge\"><title>abs1_2&#45;&gt;abs2_1</title>\n",
+       "<path fill=\"none\" stroke=\"#473c8b\" d=\"M60.2104,-101.03C67.8108,-96.843 76.5362,-92.6619 85,-90 277.376,-29.4962 520.258,-20.057 622.325,-18.9274\"/>\n",
+       "<polygon fill=\"#473c8b\" stroke=\"#473c8b\" points=\"622.655,-22.4247 632.623,-18.8368 622.593,-15.425 622.655,-22.4247\"/>\n",
+       "<text text-anchor=\"middle\" x=\"243.498\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">$to_el</text>\n",
+       "</g>\n",
+       "<!-- (10\\|&#45;\\&gt;5) -->\n",
+       "<g id=\"node12\" class=\"node\"><title>(10\\|&#45;\\&gt;5)</title>\n",
+       "<polygon fill=\"burlywood\" stroke=\"burlywood\" points=\"512.5,-91.2 512.5,-140.8 581.5,-140.8 581.5,-91.2 512.5,-91.2\"/>\n",
+       "<text text-anchor=\"middle\" x=\"522.25\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"532,-91.2 532,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"547\" y=\"-124.2\" font-family=\"Times,serif\" font-size=\"14.00\">10</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"532,-116 562,-116 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"547\" y=\"-99.4\" font-family=\"Times,serif\" font-size=\"14.00\">5</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"562,-91.2 562,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"571.75\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "</g>\n",
+       "<!-- (10\\|&#45;\\&gt;5)&#45;&gt;abs2_1 -->\n",
+       "<g id=\"edge12\" class=\"edge\"><title>(10\\|&#45;\\&gt;5)&#45;&gt;abs2_1</title>\n",
+       "<path fill=\"none\" stroke=\"#473c8b\" d=\"M567.931,-91.1053C579.116,-79.1378 593.536,-64.9134 608.004,-54 616.709,-47.434 626.788,-41.2823 636.296,-36.0239\"/>\n",
+       "<polygon fill=\"#473c8b\" stroke=\"#473c8b\" points=\"638.009,-39.0766 645.174,-31.2715 634.706,-32.9052 638.009,-39.0766\"/>\n",
+       "<text text-anchor=\"middle\" x=\"625.498\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">$to_el</text>\n",
+       "</g>\n",
+       "<!-- (8\\|&#45;\\&gt;4) -->\n",
+       "<g id=\"node14\" class=\"node\"><title>(8\\|&#45;\\&gt;4)</title>\n",
+       "<polygon fill=\"burlywood\" stroke=\"burlywood\" points=\"600,-91.2 600,-140.8 662,-140.8 662,-91.2 600,-91.2\"/>\n",
+       "<text text-anchor=\"middle\" x=\"609.75\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"619.5,-91.2 619.5,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"631\" y=\"-124.2\" font-family=\"Times,serif\" font-size=\"14.00\">8</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"619.5,-116 642.5,-116 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"631\" y=\"-99.4\" font-family=\"Times,serif\" font-size=\"14.00\">4</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"642.5,-91.2 642.5,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"652.25\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "</g>\n",
+       "<!-- (8\\|&#45;\\&gt;4)&#45;&gt;abs2_1 -->\n",
+       "<g id=\"edge14\" class=\"edge\"><title>(8\\|&#45;\\&gt;4)&#45;&gt;abs2_1</title>\n",
+       "<path fill=\"none\" stroke=\"#473c8b\" d=\"M639.459,-91.0441C643.605,-79.7155 648.815,-66.0602 654.004,-54 655.312,-50.9596 656.743,-47.8008 658.2,-44.6804\"/>\n",
+       "<polygon fill=\"#473c8b\" stroke=\"#473c8b\" points=\"661.391,-46.121 662.559,-35.5908 655.079,-43.0939 661.391,-46.121\"/>\n",
+       "<text text-anchor=\"middle\" x=\"671.498\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">$to_el</text>\n",
+       "</g>\n",
+       "<!-- (6\\|&#45;\\&gt;3) -->\n",
+       "<g id=\"node16\" class=\"node\"><title>(6\\|&#45;\\&gt;3)</title>\n",
+       "<polygon fill=\"burlywood\" stroke=\"burlywood\" points=\"680,-91.2 680,-140.8 742,-140.8 742,-91.2 680,-91.2\"/>\n",
+       "<text text-anchor=\"middle\" x=\"689.75\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"699.5,-91.2 699.5,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"711\" y=\"-124.2\" font-family=\"Times,serif\" font-size=\"14.00\">6</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"699.5,-116 722.5,-116 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"711\" y=\"-99.4\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"722.5,-91.2 722.5,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"732.25\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "</g>\n",
+       "<!-- (6\\|&#45;\\&gt;3)&#45;&gt;abs2_1 -->\n",
+       "<g id=\"edge16\" class=\"edge\"><title>(6\\|&#45;\\&gt;3)&#45;&gt;abs2_1</title>\n",
+       "<path fill=\"none\" stroke=\"#473c8b\" d=\"M703.134,-90.9667C699.218,-79.6211 694.212,-65.9739 689,-54 687.664,-50.9301 686.179,-47.7532 684.653,-44.6226\"/>\n",
+       "<polygon fill=\"#473c8b\" stroke=\"#473c8b\" points=\"687.688,-42.8681 680.052,-35.5235 681.441,-46.0269 687.688,-42.8681\"/>\n",
+       "<text text-anchor=\"middle\" x=\"712.498\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">$to_el</text>\n",
+       "</g>\n",
+       "<!-- (4\\|&#45;\\&gt;2) -->\n",
+       "<g id=\"node18\" class=\"node\"><title>(4\\|&#45;\\&gt;2)</title>\n",
+       "<polygon fill=\"burlywood\" stroke=\"burlywood\" points=\"760,-91.2 760,-140.8 822,-140.8 822,-91.2 760,-91.2\"/>\n",
+       "<text text-anchor=\"middle\" x=\"769.75\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"779.5,-91.2 779.5,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"791\" y=\"-124.2\" font-family=\"Times,serif\" font-size=\"14.00\">4</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"779.5,-116 802.5,-116 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"791\" y=\"-99.4\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"802.5,-91.2 802.5,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"812.25\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "</g>\n",
+       "<!-- (4\\|&#45;\\&gt;2)&#45;&gt;abs2_1 -->\n",
+       "<g id=\"edge18\" class=\"edge\"><title>(4\\|&#45;\\&gt;2)&#45;&gt;abs2_1</title>\n",
+       "<path fill=\"none\" stroke=\"#473c8b\" d=\"M771.257,-91.0714C760.664,-79.095 746.944,-64.8727 733,-54 724.666,-47.5015 714.983,-41.4398 705.782,-36.2478\"/>\n",
+       "<polygon fill=\"#473c8b\" stroke=\"#473c8b\" points=\"707.265,-33.0703 696.809,-31.3619 703.917,-39.218 707.265,-33.0703\"/>\n",
+       "<text text-anchor=\"middle\" x=\"769.498\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">$to_el</text>\n",
+       "</g>\n",
+       "<!-- (2\\|&#45;\\&gt;1) -->\n",
+       "<g id=\"node20\" class=\"node\"><title>(2\\|&#45;\\&gt;1)</title>\n",
+       "<polygon fill=\"burlywood\" stroke=\"burlywood\" points=\"840,-91.2 840,-140.8 902,-140.8 902,-91.2 840,-91.2\"/>\n",
+       "<text text-anchor=\"middle\" x=\"849.75\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"859.5,-91.2 859.5,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"871\" y=\"-124.2\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"859.5,-116 882.5,-116 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"871\" y=\"-99.4\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"882.5,-91.2 882.5,-140.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"892.25\" y=\"-111.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "</g>\n",
+       "<!-- (2\\|&#45;\\&gt;1)&#45;&gt;abs2_1 -->\n",
+       "<g id=\"edge20\" class=\"edge\"><title>(2\\|&#45;\\&gt;1)&#45;&gt;abs2_1</title>\n",
+       "<path fill=\"none\" stroke=\"#473c8b\" d=\"M844.522,-91.1914C829.434,-78.6578 809.661,-63.8827 790,-54 766.535,-42.2055 738.421,-33.7055 715.412,-28.0377\"/>\n",
+       "<polygon fill=\"#473c8b\" stroke=\"#473c8b\" points=\"716.102,-24.6044 705.565,-25.7061 714.489,-31.416 716.102,-24.6044\"/>\n",
+       "<text text-anchor=\"middle\" x=\"835.498\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">$to_el</text>\n",
+       "</g>\n",
+       "<!-- (8\\|&#45;\\&gt;2) -->\n",
+       "<g id=\"node22\" class=\"node\"><title>(8\\|&#45;\\&gt;2)</title>\n",
+       "<polygon fill=\"burlywood\" stroke=\"burlywood\" points=\"677,-197.2 677,-246.8 739,-246.8 739,-197.2 677,-197.2\"/>\n",
+       "<text text-anchor=\"middle\" x=\"686.75\" y=\"-217.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"696.5,-197.2 696.5,-246.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"708\" y=\"-230.2\" font-family=\"Times,serif\" font-size=\"14.00\">8</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"696.5,-222 719.5,-222 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"708\" y=\"-205.4\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"719.5,-197.2 719.5,-246.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"729.25\" y=\"-217.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "</g>\n",
+       "<!-- (8\\|&#45;\\&gt;2)&#45;&gt;abs2_4 -->\n",
+       "<g id=\"edge22\" class=\"edge\"><title>(8\\|&#45;\\&gt;2)&#45;&gt;abs2_4</title>\n",
+       "<path fill=\"none\" stroke=\"#473c8b\" d=\"M705.527,-197.14C702.87,-184.104 697.37,-168.854 686,-160 653.934,-135.03 542.952,-153.597 504,-142 498.484,-140.358 492.86,-138.07 487.495,-135.54\"/>\n",
+       "<polygon fill=\"#473c8b\" stroke=\"#473c8b\" points=\"488.698,-132.225 478.198,-130.811 485.525,-138.465 488.698,-132.225\"/>\n",
+       "<text text-anchor=\"middle\" x=\"716.498\" y=\"-164.8\" font-family=\"Times,serif\" font-size=\"14.00\">$to_el</text>\n",
+       "</g>\n",
+       "<!-- (4\\|&#45;\\&gt;1) -->\n",
+       "<g id=\"node24\" class=\"node\"><title>(4\\|&#45;\\&gt;1)</title>\n",
+       "<polygon fill=\"burlywood\" stroke=\"burlywood\" points=\"757,-197.2 757,-246.8 819,-246.8 819,-197.2 757,-197.2\"/>\n",
+       "<text text-anchor=\"middle\" x=\"766.75\" y=\"-217.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"776.5,-197.2 776.5,-246.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"788\" y=\"-230.2\" font-family=\"Times,serif\" font-size=\"14.00\">4</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"776.5,-222 799.5,-222 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"788\" y=\"-205.4\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "<polyline fill=\"none\" stroke=\"burlywood\" points=\"799.5,-197.2 799.5,-246.8 \"/>\n",
+       "<text text-anchor=\"middle\" x=\"809.25\" y=\"-217.8\" font-family=\"Times,serif\" font-size=\"14.00\"> </text>\n",
+       "</g>\n",
+       "<!-- (4\\|&#45;\\&gt;1)&#45;&gt;abs2_4 -->\n",
+       "<g id=\"edge24\" class=\"edge\"><title>(4\\|&#45;\\&gt;1)&#45;&gt;abs2_4</title>\n",
+       "<path fill=\"none\" stroke=\"#473c8b\" d=\"M774.691,-197.188C765.854,-183.821 752.952,-168.219 737,-160 690.836,-136.214 553.929,-156.284 504,-142 498.467,-140.417 492.834,-138.161 487.465,-135.643\"/>\n",
+       "<polygon fill=\"#473c8b\" stroke=\"#473c8b\" points=\"488.667,-132.328 478.166,-130.92 485.497,-138.569 488.667,-132.328\"/>\n",
+       "<text text-anchor=\"middle\" x=\"775.498\" y=\"-164.8\" font-family=\"Times,serif\" font-size=\"14.00\">$to_el</text>\n",
+       "</g>\n",
+       "</g>\n",
+       "</svg>"
+      ],
+      "text/plain": [
+       "<Dot visualization: expr_as_graph [dhd={(1,\"nein\"),(2,\"nein\"),(3,\"ja\"),(4,\"nein\"),(5,\"nein\"),(6,\"ja\"),(7,\"nein\")} & h={(2,1),(4,2),(6,3),(8,4),(10,5)}(\"h\",h)]>"
+      ]
+     },
+     "execution_count": 50,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":dot expr_as_graph (\"h\",h,\"hh\",(h;h))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 47,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "image/svg+xml": [
+       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
+       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
+       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
+       "<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
+       " -->\n",
+       "<!-- Title: state Pages: 1 -->\n",
+       "<svg width=\"134pt\" height=\"134pt\"\n",
+       " viewBox=\"0.00 0.00 134.00 134.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
+       "<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 130)\">\n",
+       "<title>state</title>\n",
+       "<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-130 131,-130 131,5 -4,5\"/>\n",
+       "<!-- 8 -->\n",
+       "<g id=\"node1\" class=\"node\"><title>8</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-126 0,-126 0,-90 54,-90 54,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">8</text>\n",
+       "</g>\n",
+       "<!-- 2 -->\n",
+       "<g id=\"node3\" class=\"node\"><title>2</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-36 0,-36 0,-0 54,-0 54,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "</g>\n",
+       "<!-- 8&#45;&gt;2 -->\n",
+       "<g id=\"edge2\" class=\"edge\"><title>8&#45;&gt;2</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M27,-89.614C27,-77.2403 27,-60.3686 27,-46.2198\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"30.5001,-46.0504 27,-36.0504 23.5001,-46.0504 30.5001,-46.0504\"/>\n",
+       "<text text-anchor=\"middle\" x=\"34\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">hh</text>\n",
+       "</g>\n",
+       "<!-- 4 -->\n",
+       "<g id=\"node4\" class=\"node\"><title>4</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-126 72,-126 72,-90 126,-90 126,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">4</text>\n",
+       "</g>\n",
+       "<!-- 1 -->\n",
+       "<g id=\"node6\" class=\"node\"><title>1</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-36 72,-36 72,-0 126,-0 126,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "</g>\n",
+       "<!-- 4&#45;&gt;1 -->\n",
+       "<g id=\"edge4\" class=\"edge\"><title>4&#45;&gt;1</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M99,-89.614C99,-77.2403 99,-60.3686 99,-46.2198\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"102.5,-46.0504 99,-36.0504 95.5001,-46.0504 102.5,-46.0504\"/>\n",
+       "<text text-anchor=\"middle\" x=\"106\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">hh</text>\n",
+       "</g>\n",
+       "</g>\n",
+       "</svg>"
+      ],
+      "text/plain": [
+       "<Dot visualization: expr_as_graph [dhd={(1,\"nein\"),(2,\"nein\"),(3,\"ja\"),(4,\"nein\"),(5,\"nein\"),(6,\"ja\"),(7,\"nein\")} & h={(2,1),(4,2),(6,3),(8,4),(10,5)}(\"hh\",(h;h))]>"
+      ]
+     },
+     "execution_count": 47,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":dot expr_as_graph (\"hh\",(h;h))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 48,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "image/svg+xml": [
+       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
+       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
+       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
+       "<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
+       " -->\n",
+       "<!-- Title: state Pages: 1 -->\n",
+       "<svg width=\"206pt\" height=\"314pt\"\n",
+       " viewBox=\"0.00 0.00 206.00 314.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
+       "<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 310)\">\n",
+       "<title>state</title>\n",
+       "<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-310 203,-310 203,5 -4,5\"/>\n",
+       "<!-- 10 -->\n",
+       "<g id=\"node1\" class=\"node\"><title>10</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-306 0,-306 0,-270 54,-270 54,-306\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-283.8\" font-family=\"Times,serif\" font-size=\"14.00\">10</text>\n",
+       "</g>\n",
+       "<!-- 5 -->\n",
+       "<g id=\"node3\" class=\"node\"><title>5</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-216 0,-216 0,-180 54,-180 54,-216\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">5</text>\n",
+       "</g>\n",
+       "<!-- 10&#45;&gt;5 -->\n",
+       "<g id=\"edge2\" class=\"edge\"><title>10&#45;&gt;5</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M27,-269.614C27,-257.24 27,-240.369 27,-226.22\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"30.5001,-226.05 27,-216.05 23.5001,-226.05 30.5001,-226.05\"/>\n",
+       "<text text-anchor=\"middle\" x=\"30.5\" y=\"-238.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "<!-- 8 -->\n",
+       "<g id=\"node4\" class=\"node\"><title>8</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-306 72,-306 72,-270 126,-270 126,-306\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-283.8\" font-family=\"Times,serif\" font-size=\"14.00\">8</text>\n",
+       "</g>\n",
+       "<!-- 4 -->\n",
+       "<g id=\"node6\" class=\"node\"><title>4</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-216 72,-216 72,-180 126,-180 126,-216\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">4</text>\n",
+       "</g>\n",
+       "<!-- 8&#45;&gt;4 -->\n",
+       "<g id=\"edge4\" class=\"edge\"><title>8&#45;&gt;4</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M99,-269.614C99,-257.24 99,-240.369 99,-226.22\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"102.5,-226.05 99,-216.05 95.5001,-226.05 102.5,-226.05\"/>\n",
+       "<text text-anchor=\"middle\" x=\"102.5\" y=\"-238.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "<!-- 2 -->\n",
+       "<g id=\"node11\" class=\"node\"><title>2</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-126 72,-126 72,-90 126,-90 126,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "</g>\n",
+       "<!-- 4&#45;&gt;2 -->\n",
+       "<g id=\"edge8\" class=\"edge\"><title>4&#45;&gt;2</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M99,-179.614C99,-167.24 99,-150.369 99,-136.22\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"102.5,-136.05 99,-126.05 95.5001,-136.05 102.5,-136.05\"/>\n",
+       "<text text-anchor=\"middle\" x=\"102.5\" y=\"-148.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "<!-- 6 -->\n",
+       "<g id=\"node7\" class=\"node\"><title>6</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"198,-306 144,-306 144,-270 198,-270 198,-306\"/>\n",
+       "<text text-anchor=\"middle\" x=\"171\" y=\"-283.8\" font-family=\"Times,serif\" font-size=\"14.00\">6</text>\n",
+       "</g>\n",
+       "<!-- 3 -->\n",
+       "<g id=\"node9\" class=\"node\"><title>3</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"198,-216 144,-216 144,-180 198,-180 198,-216\"/>\n",
+       "<text text-anchor=\"middle\" x=\"171\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
+       "</g>\n",
+       "<!-- 6&#45;&gt;3 -->\n",
+       "<g id=\"edge6\" class=\"edge\"><title>6&#45;&gt;3</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M171,-269.614C171,-257.24 171,-240.369 171,-226.22\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"174.5,-226.05 171,-216.05 167.5,-226.05 174.5,-226.05\"/>\n",
+       "<text text-anchor=\"middle\" x=\"174.5\" y=\"-238.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "<!-- 1 -->\n",
+       "<g id=\"node13\" class=\"node\"><title>1</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"126,-36 72,-36 72,-0 126,-0 126,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"99\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "</g>\n",
+       "<!-- 2&#45;&gt;1 -->\n",
+       "<g id=\"edge10\" class=\"edge\"><title>2&#45;&gt;1</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M99,-89.614C99,-77.2403 99,-60.3686 99,-46.2198\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"102.5,-46.0504 99,-36.0504 95.5001,-46.0504 102.5,-46.0504\"/>\n",
+       "<text text-anchor=\"middle\" x=\"102.5\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">h</text>\n",
+       "</g>\n",
+       "</g>\n",
+       "</svg>"
+      ],
+      "text/plain": [
+       "<Dot visualization: expr_as_graph [dhd={(1,\"nein\"),(2,\"nein\"),(3,\"ja\"),(4,\"nein\"),(5,\"nein\"),(6,\"ja\"),(7,\"nein\")} & h={(2,1),(4,2),(6,3),(8,4),(10,5)}(\"h\",h)]>"
+      ]
+     },
+     "execution_count": 48,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":dot expr_as_graph (\"h\",(h))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Transitive und Reflexive Hülle\n",
+    "   \n",
+    "Gegeben eine Relation $r$ von $A$ nach $A$\n",
+    "*  $r^0 = \\{(a,a) \\mid a\\in A\\}$\n",
+    "*  $r^1 = r$\n",
+    "*  $r^k = (r^{k-1} ; r) = (r ; r^{k-1})$\n",
+    "*  $r^*$ = $\\bigcup_{i\\geq 0} r^i$\n",
+    "\n",
+    "Die transitive Hülle von $r$ ist:\n",
+    "* $r^+$ = $\\bigcup_{i\\geq 1} r^i$"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 51,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{1,2,3\\}$"
+      ],
+      "text/plain": [
+       "{1,2,3}"
+      ]
+     },
+     "execution_count": 51,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":let A {1,2,3}"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 52,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(1\\mapsto 2),(2\\mapsto 3)\\}$"
+      ],
+      "text/plain": [
+       "{(1↦2),(2↦3)}"
+      ]
+     },
+     "execution_count": 52,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":let r {(1,2), (2,3)}"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 62,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "image/svg+xml": [
+       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
+       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
+       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
+       "<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
+       " -->\n",
+       "<!-- Title: state Pages: 1 -->\n",
+       "<svg width=\"62pt\" height=\"224pt\"\n",
+       " viewBox=\"0.00 0.00 62.00 224.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
+       "<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 220)\">\n",
+       "<title>state</title>\n",
+       "<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-220 59,-220 59,5 -4,5\"/>\n",
+       "<!-- 2 -->\n",
+       "<g id=\"node1\" class=\"node\"><title>2</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-126 0,-126 0,-90 54,-90 54,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "</g>\n",
+       "<!-- 3 -->\n",
+       "<g id=\"node3\" class=\"node\"><title>3</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-36 0,-36 0,-0 54,-0 54,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
+       "</g>\n",
+       "<!-- 2&#45;&gt;3 -->\n",
+       "<g id=\"edge2\" class=\"edge\"><title>2&#45;&gt;3</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M27,-89.614C27,-77.2403 27,-60.3686 27,-46.2198\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"30.5001,-46.0504 27,-36.0504 23.5001,-46.0504 30.5001,-46.0504\"/>\n",
+       "<text text-anchor=\"middle\" x=\"29.3303\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">r</text>\n",
+       "</g>\n",
+       "<!-- 1 -->\n",
+       "<g id=\"node4\" class=\"node\"><title>1</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-216 0,-216 0,-180 54,-180 54,-216\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "</g>\n",
+       "<!-- 1&#45;&gt;2 -->\n",
+       "<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;2</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M27,-179.614C27,-167.24 27,-150.369 27,-136.22\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"30.5001,-136.05 27,-126.05 23.5001,-136.05 30.5001,-136.05\"/>\n",
+       "<text text-anchor=\"middle\" x=\"29.3303\" y=\"-148.8\" font-family=\"Times,serif\" font-size=\"14.00\">r</text>\n",
+       "</g>\n",
+       "</g>\n",
+       "</svg>"
+      ],
+      "text/plain": [
+       "<Dot visualization: expr_as_graph [ArhA={1,2,3} & r={(1,2),(2,3)} & h={(2,1),(4,2),(6,3),(8,4),(10,5)}(\"r\",r)]>"
+      ]
+     },
+     "execution_count": 62,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":dot expr_as_graph (\"r\",r)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 56,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(1\\mapsto 3)\\}$"
+      ],
+      "text/plain": [
+       "{(1↦3)}"
+      ]
+     },
+     "execution_count": 56,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "(r;r)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "In B kann man $r^0$ auch als die Identitätsrelation über A beschreiben:"
+   ]
+  },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 67,
    "metadata": {},
-   "outputs": [],
-   "source": []
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(1\\mapsto 1),(2\\mapsto 2),(3\\mapsto 3)\\}$"
+      ],
+      "text/plain": [
+       "{(1↦1),(2↦2),(3↦3)}"
+      ]
+     },
+     "execution_count": 67,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "id(A)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Die transitive und reflexive Hülle ist hier:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 60,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(1\\mapsto 1),(1\\mapsto 2),(1\\mapsto 3),(2\\mapsto 2),(2\\mapsto 3),(3\\mapsto 3)\\}$"
+      ],
+      "text/plain": [
+       "{(1↦1),(1↦2),(1↦3),(2↦2),(2↦3),(3↦3)}"
+      ]
+     },
+     "execution_count": 60,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "id(A) \\/ r \\/ (r;r) \\/ (r;r;r) \\/ (r;r;r;r)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 61,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "image/svg+xml": [
+       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
+       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
+       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
+       "<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
+       " -->\n",
+       "<!-- Title: state Pages: 1 -->\n",
+       "<svg width=\"127pt\" height=\"224pt\"\n",
+       " viewBox=\"0.00 0.00 126.66 224.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
+       "<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 220)\">\n",
+       "<title>state</title>\n",
+       "<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-220 123.661,-220 123.661,5 -4,5\"/>\n",
+       "<!-- 3 -->\n",
+       "<g id=\"node1\" class=\"node\"><title>3</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-36 0,-36 0,-0 54,-0 54,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
+       "</g>\n",
+       "<!-- 3&#45;&gt;3 -->\n",
+       "<g id=\"edge2\" class=\"edge\"><title>3&#45;&gt;3</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M54.2408,-26.2419C64.0239,-26.4192 72,-23.6719 72,-18 72,-14.5437 69.0382,-12.1734 64.5105,-10.8891\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"64.5639,-7.3739 54.2408,-9.75806 63.7975,-14.3318 64.5639,-7.3739\"/>\n",
+       "<text text-anchor=\"middle\" x=\"77.8303\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">r*</text>\n",
+       "</g>\n",
+       "<!-- 2 -->\n",
+       "<g id=\"node3\" class=\"node\"><title>2</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"89,-126 35,-126 35,-90 89,-90 89,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"62\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "</g>\n",
+       "<!-- 2&#45;&gt;3 -->\n",
+       "<g id=\"edge4\" class=\"edge\"><title>2&#45;&gt;3</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M55.0851,-89.614C50.0673,-76.9977 43.1896,-59.7052 37.4963,-45.3907\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"40.7294,-44.0489 33.7814,-36.0504 34.225,-46.636 40.7294,-44.0489\"/>\n",
+       "<text text-anchor=\"middle\" x=\"52.8303\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">r*</text>\n",
+       "</g>\n",
+       "<!-- 2&#45;&gt;2 -->\n",
+       "<g id=\"edge6\" class=\"edge\"><title>2&#45;&gt;2</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M89.2408,-116.242C99.0239,-116.419 107,-113.672 107,-108 107,-104.544 104.038,-102.173 99.5105,-100.889\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"99.5639,-97.3739 89.2408,-99.7581 98.7975,-104.332 99.5639,-97.3739\"/>\n",
+       "<text text-anchor=\"middle\" x=\"112.83\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">r*</text>\n",
+       "</g>\n",
+       "<!-- 1 -->\n",
+       "<g id=\"node6\" class=\"node\"><title>1</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-216 0,-216 0,-180 54,-180 54,-216\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "</g>\n",
+       "<!-- 1&#45;&gt;3 -->\n",
+       "<g id=\"edge8\" class=\"edge\"><title>1&#45;&gt;3</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M23.0751,-179.897C20.0025,-165.587 15.9833,-144.583 14.3394,-126 12.9295,-110.062 12.9295,-105.938 14.3394,-90 15.6366,-75.3365 18.4126,-59.1664 21.0356,-45.9664\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"24.4777,-46.6042 23.0751,-36.1026 17.6227,-45.1867 24.4777,-46.6042\"/>\n",
+       "<text text-anchor=\"middle\" x=\"20.8303\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">r*</text>\n",
+       "</g>\n",
+       "<!-- 1&#45;&gt;2 -->\n",
+       "<g id=\"edge10\" class=\"edge\"><title>1&#45;&gt;2</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M33.9149,-179.614C38.9327,-166.998 45.8104,-149.705 51.5037,-135.391\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"54.775,-136.636 55.2186,-126.05 48.2706,-134.049 54.775,-136.636\"/>\n",
+       "<text text-anchor=\"middle\" x=\"52.8303\" y=\"-148.8\" font-family=\"Times,serif\" font-size=\"14.00\">r*</text>\n",
+       "</g>\n",
+       "<!-- 1&#45;&gt;1 -->\n",
+       "<g id=\"edge12\" class=\"edge\"><title>1&#45;&gt;1</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M54.2408,-206.242C64.0239,-206.419 72,-203.672 72,-198 72,-194.544 69.0382,-192.173 64.5105,-190.889\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"64.5639,-187.374 54.2408,-189.758 63.7975,-194.332 64.5639,-187.374\"/>\n",
+       "<text text-anchor=\"middle\" x=\"77.8303\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">r*</text>\n",
+       "</g>\n",
+       "</g>\n",
+       "</svg>"
+      ],
+      "text/plain": [
+       "<Dot visualization: expr_as_graph [ArhA={1,2,3} & r={(1,2),(2,3)} & h={(2,1),(4,2),(6,3),(8,4),(10,5)}(\"r*\",id(A)\\/r\\/(r;r)\\/((r;r);r)\\/(((r;r);r);r))]>"
+      ]
+     },
+     "execution_count": 61,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":dot expr_as_graph (\"r*\",id(A) \\/ r \\/ (r;r) \\/ (r;r;r) \\/ (r;r;r;r))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Die transitive Hülle wird in B als ```closure1``` geschrieben:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 63,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{(1\\mapsto 2),(1\\mapsto 3),(2\\mapsto 3)\\}$"
+      ],
+      "text/plain": [
+       "{(1↦2),(1↦3),(2↦3)}"
+      ]
+     },
+     "execution_count": 63,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "closure1(r)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 65,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "image/svg+xml": [
+       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
+       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
+       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
+       "<!-- Generated by graphviz version 2.28.0 (20110509.1545)\n",
+       " -->\n",
+       "<!-- Title: state Pages: 1 -->\n",
+       "<svg width=\"102pt\" height=\"224pt\"\n",
+       " viewBox=\"0.00 0.00 102.00 224.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
+       "<g id=\"graph1\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 220)\">\n",
+       "<title>state</title>\n",
+       "<polygon fill=\"white\" stroke=\"white\" points=\"-4,5 -4,-220 99,-220 99,5 -4,5\"/>\n",
+       "<!-- 2 -->\n",
+       "<g id=\"node1\" class=\"node\"><title>2</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"54,-126 0,-126 0,-90 54,-90 54,-126\"/>\n",
+       "<text text-anchor=\"middle\" x=\"27\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">2</text>\n",
+       "</g>\n",
+       "<!-- 3 -->\n",
+       "<g id=\"node3\" class=\"node\"><title>3</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"94,-36 40,-36 40,-0 94,-0 94,-36\"/>\n",
+       "<text text-anchor=\"middle\" x=\"67\" y=\"-13.8\" font-family=\"Times,serif\" font-size=\"14.00\">3</text>\n",
+       "</g>\n",
+       "<!-- 2&#45;&gt;3 -->\n",
+       "<g id=\"edge2\" class=\"edge\"><title>2&#45;&gt;3</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M34.9027,-89.614C40.6374,-76.9977 48.4976,-59.7052 55.0042,-45.3907\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"58.298,-46.6024 59.2498,-36.0504 51.9254,-43.7058 58.298,-46.6024\"/>\n",
+       "<text text-anchor=\"middle\" x=\"57.2776\" y=\"-58.8\" font-family=\"Times,serif\" font-size=\"14.00\">r+</text>\n",
+       "</g>\n",
+       "<!-- 1 -->\n",
+       "<g id=\"node4\" class=\"node\"><title>1</title>\n",
+       "<polygon fill=\"#cdba96\" stroke=\"#cdba96\" points=\"94,-216 40,-216 40,-180 94,-180 94,-216\"/>\n",
+       "<text text-anchor=\"middle\" x=\"67\" y=\"-193.8\" font-family=\"Times,serif\" font-size=\"14.00\">1</text>\n",
+       "</g>\n",
+       "<!-- 1&#45;&gt;2 -->\n",
+       "<g id=\"edge6\" class=\"edge\"><title>1&#45;&gt;2</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M59.0973,-179.614C53.3626,-166.998 45.5024,-149.705 38.9958,-135.391\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"42.0746,-133.706 34.7502,-126.05 35.702,-136.602 42.0746,-133.706\"/>\n",
+       "<text text-anchor=\"middle\" x=\"57.2776\" y=\"-148.8\" font-family=\"Times,serif\" font-size=\"14.00\">r+</text>\n",
+       "</g>\n",
+       "<!-- 1&#45;&gt;3 -->\n",
+       "<g id=\"edge4\" class=\"edge\"><title>1&#45;&gt;3</title>\n",
+       "<path fill=\"none\" stroke=\"firebrick\" d=\"M67,-179.933C67,-148.966 67,-83.2989 67,-46.1292\"/>\n",
+       "<polygon fill=\"firebrick\" stroke=\"firebrick\" points=\"70.5001,-46.0157 67,-36.0157 63.5001,-46.0158 70.5001,-46.0157\"/>\n",
+       "<text text-anchor=\"middle\" x=\"73.2776\" y=\"-103.8\" font-family=\"Times,serif\" font-size=\"14.00\">r+</text>\n",
+       "</g>\n",
+       "</g>\n",
+       "</svg>"
+      ],
+      "text/plain": [
+       "<Dot visualization: expr_as_graph [ArhA={1,2,3} & r={(1,2),(2,3)} & h={(2,1),(4,2),(6,3),(8,4),(10,5)}(\"r+\",closure1(r))]>"
+      ]
+     },
+     "execution_count": 65,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    ":dot expr_as_graph (\"r+\",closure1(r))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Man kann die transitive Hülle natürlich mit den anderen Operatoren verknüpfen, zum Beispiel um auszurechnen von welchen Knoten aus man den Knoten 3 erreichen kann:"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 69,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{1,2\\}$"
+      ],
+      "text/plain": [
+       "{1,2}"
+      ]
+     },
+     "execution_count": 69,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "closure1(r)~[{3}]"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Anmerkung: die reflexive und transitive Hülle in B wird als ```closure``` geschrieben, ist bei Relationen über Zahlen immer unendlich."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 72,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$/*@symbolic*/ \\{\\mathit{z\\_},\\mathit{z\\_\\_}\\mid \\mathit{z\\_} \\mapsto \\mathit{z\\_\\_} \\in \\{(1\\mapsto 2),(1\\mapsto 3),(2\\mapsto 3)\\} \\lor \\mathit{z\\_} = \\mathit{z\\_\\_}\\}$"
+      ],
+      "text/plain": [
+       "/*@symbolic*/ {z_,z__∣z_ ↦ z__ ∈ {(1↦2),(1↦3),(2↦3)} ∨ z_ = z__}"
+      ]
+     },
+     "execution_count": 72,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "closure(r)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 71,
+   "metadata": {},
+   "outputs": [
+    {
+     "data": {
+      "text/markdown": [
+       "$\\{1,2,3\\}$"
+      ],
+      "text/plain": [
+       "{1,2,3}"
+      ]
+     },
+     "execution_count": 71,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "closure(r)~[{3}]"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Funktionen\n",
+    "   \n",
+    "Was unterscheidet Funktionen von Relationen?\n",
+    "Wie kann man Funktionen in Mengentheorie und Logik darstellen?"
+   ]
   }
  ],
  "metadata": {