Skip to content

Commit

Permalink
Implementation besides plotting is done. Proof for complement of prod…
Browse files Browse the repository at this point in the history
…uct algebra is in the making
  • Loading branch information
tomsch420 committed May 30, 2024
1 parent 5fa267a commit 62acad7
Show file tree
Hide file tree
Showing 17 changed files with 448 additions and 1,752 deletions.
52 changes: 52 additions & 0 deletions examples/product_spaces.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,58 @@
"execution_count": 62,
"outputs": []
},
{
"metadata": {},
"cell_type": "markdown",
"source": [
"## Complement of the Product Algebra\n",
"\n",
"[This](https://www.math.ucdavis.edu/~hunter/m206/ch4_measure_notes.pdf) mentions that the complement of an element of the product measure is constructed by\n",
"$$\n",
" (A \\times B)^c = (A^c \\times B) \\cup (A \\times B^c) \\cup (A^c \\times B^c).\n",
"$$\n",
"It is easy to see that this construction would produce exponential many elements with respect to the number of variables. This is unfortunate.\n",
"However, the correct complement can be formed with linear many terms, which is way more efficient. The following equations describe a proof by induction on how that can be done.\n",
"\n",
"Let\n",
"\\begin{align*}\n",
" \\mathbb{A} &= A \\cup A^c \\, , \\\\\n",
" \\mathbb{B} &= B \\cup B^c \\text{ and }\\\\\n",
" \\mathbb{C} &= C \\cup C^c.\n",
"\\end{align*}\n",
"\n",
"### Induction Assumption\n",
"\n",
"\\begin{align*}\n",
" (A \\times B)^c = (A^c \\times \\mathbb{B}) \\cup (A \\times B^C)\n",
"\\end{align*}\n",
"Proof:\n",
"\\begin{align*}\n",
" (A \\times B)^c &= (A^c \\times B) \\cup (A \\times B^c) \\cup (A^c \\times B^c) \\\\\n",
" &= (A^c \\times B) \\cup (A^c \\times B^c) \\cup (A \\times B^c) \\\\\n",
" &= ( A^c \\times (B \\cup B^c) ) \\cup (A \\times B^c) \\\\\n",
" &= (A^c \\times \\mathbb{B}) \\cup (A \\times B^C) \\square\n",
"\\end{align*}\n",
"\n",
"### Induction Step\n",
"\n",
"\\begin{align*}\n",
" (A \\times B \\times C)^c = (A^c \\times \\mathbb{B} \\times \\mathbb{C}) \\cup (A \\times B^C \\times \\mathbb{C} ) \\cup (A \\times B \\times C^c)\n",
"\\end{align*}\n",
"Proof:\n",
"\\begin{align*}\n",
" (A \\times B \\times C)^c &= (A^c \\times B \\times C) \\cup (A \\times B^c \\times C) \\cup (A \\times B \\times C^c) \\cup \n",
" (A^c \\times B^c \\times C) \\cup (A^c \\times B \\times C^c) \\cup (A \\times B^c \\times C^c) \\cup \n",
" (A^c \\times B^c \\times C^c) \\\\\n",
" &= (C \\times \\underbrace{(A^c \\times B) \\cup (A \\times B^c) \\cup (A^c \\times B^c))}_{\\text{Induction Assumption}} \\cup\n",
" (C^c \\times \\underbrace{(A^c \\times B) \\cup (A \\times B^c) \\cup (A^c \\times B^c))}_{\\text{Induction Assumption}} \\cup (A \\times B \\times C^c) \\\\\n",
" &= (C \\times (A^c \\times \\mathbb{B}) \\cup (A \\times B^C)) \\cup \n",
" (C^c \\times (A^c \\times \\mathbb{B}) \\cup (A \\times B^C)) \\cup (A \\times B \\times C^c)\\\\\n",
" &= \n",
"\\end{align*}\n"
],
"id": "511cdcad45f76bab"
},
{
"cell_type": "markdown",
"source": [
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
portion~=2.4.2
numpy~=1.26.1
plotly~=5.20.0
typing_extensions

sortedcontainers~=2.4.0
59 changes: 0 additions & 59 deletions src/random_events/better_variables.py

This file was deleted.

Loading

0 comments on commit 62acad7

Please sign in to comment.