···11+---
22+date: 2024-05-15
33+title: On Applying Repeated Operators to the Empty Set
44+tags: [math]
55+mathjax: yes
66+---
77+88+99+This is a sort of "theorem" that I made up in my mind has been itching me since my years in higher math education.
1010+1111+## Context
1212+1313+Let $E$ a set and $o \in E^2 \to E$, such that $(E, o)$ forms a [monoid](https://en.wikipedia.org/wiki/Monoid).
1414+1515+We then define $\mathcal O$ as the _repeated variant_ of the binary operator $o$:
1616+1717+$$
1818+\begin{align*}
1919+\mathcal O : E^\mathbb N &\to E \\
2020+ (a_n)_n &\mapsto a_0\ o\ a_1\ o\ a_2\ o\ \ldots\ o\ a_n
2121+\end{align*}
2222+$$
2323+2424+using an infix notation for $o$, defined as you would expect: $A\ o\ B = o(A, B)$.
2525+2626+2727+This is why we need $(E, o)$ to be a monoid, instead of a unital magma: we need the operator to be associative, so that the repeated application of the operator is well-defined.
2828+2929+Note how repeated operators have their argument in a sequence space instead of a set. This is because:
3030+3131+1. we need to _iterate_ over the elements, which requires a well-defined order on the elements (otherwise, we would need $o$ to be commutative and therefore $(E, o)$ to be a group instead of just a monoid)
3232+1. We also want to be able to represent repeated operations on duplicates, which sets cannot represent.
3333+3434+3535+## Theorem
3636+3737+For any repeated operator $\mathcal O$:
3838+3939+$$
4040+\mathcal O(()) = \operatorname{unit} E
4141+$$
4242+4343+where $\operatorname{unit} E$ is the unit element of the monoid $(E, o)$.
4444+4545+## Application to ∀ and ∃
4646+4747+This looks really abstract right now, but consider the two statements that we (at least in France) are told to be "self-evident":
4848+4949+- For any proposition $\mathcal P$, $\forall e \in \emptyset,\ \mathcal P(e)$ is true
5050+- For any proposition $\mathcal P$, $\exists e \in \emptyset,\ \mathcal P(e)$ is false
5151+5252+But $\forall$ (resp. $\exists$) are just syntactic sugar for the repeated variants of the logical and $\land$ (resp. logical or $\lor$) operators. So, in fact, the two statements are equivalent to:
5353+5454+- For any proposition $\mathcal P$, $\bigwedge_{e \in \emptyset} \mathcal P(e)$ is true
5555+- For any proposition $\mathcal P$, $\bigvee_{e \in \emptyset} \mathcal P(e)$ is false
5656+5757+Now, we can prove these statements with the preceding theorem:
5858+5959+1. $\bigwedge$ is the repeated variant of $\land$.
6060+1. $(\{\top, \bot\}, \land)$ is a monoid:
6161+ - $\land$ is a binary operation on $\{\top, \bot\}$.
6262+ - $\land$ is associative: $a \land (b \land c) = (a \land b) \land c$.
6363+ - $\land$ has a unit element $\top$ (as $a \land \top = a$ for any $a$) and $\top \in \{\top, \bot\}$.
6464+1. $\operatorname{unit} \{\top, \bot\} = \top$.
6565+6666+Therefore, $\bigwedge(()) = \top$.
6767+6868+## Adapting conventional set notation
6969+7070+You'll have noticed how the previous statement is kind of akwardly written: we say $\mathcal O(()) = \ldots$ instead of the much more usual notations, $\mathcal O_{a \in \emptyset} a = \ldots$ or $\mathcal O_{\emptyset} = \ldots$.
7171+7272+This is because we decided to model the repeated operators as functions over sequences, instead of sets.
7373+7474+But, as long as the set is ordered, we can trivially adapt the notation:
7575+7676+Let $(E, \geq)$ an ordered set and $o$ a binary operator such that $(E, o)$ forms a monoid.
7777+7878+We define the set-to-sequence function $\operatorname{seq}$ as:
7979+8080+$$
8181+\begin{align*}
8282+\operatorname{seq} : \mathcal P(E) &\to E^\mathbb N \\
8383+\emptyset &\mapsto () \\
8484+\{a\} &\mapsto (a) \\
8585+\{a\} \cup A &\mapsto \operatorname{seq}(\{ e \in A | e \lt a \}) \sqcup \{a\} \sqcup \operatorname{seq}(\{ e \in A | e \geq a \})
8686+\end{align*}
8787+$$
8888+8989+You'll notice that $\operatorname{seq}$ is basically a [quicksort](https://en.wikipedia.org/wiki/Quicksort) algorithm.
9090+9191+The interesting thing to note though, is that the function is _not_ bijective, as converting a sequence back to a set would require dropping duplicates. But most usages of repeated operators don't operate on duplicate elements anyways.
9292+9393+With that said, we can overload the notation of $\mathcal O$ to accept sets:
9494+9595+$$
9696+\forall P \in \mathcal P(E), \quad \mathcal O_P := \mathcal O(\operatorname{seq}(P))
9797+$$
9898+9999+Then, we can finally state:
100100+101101+$$
102102+\begin{align*}
103103+\bigwedge_\emptyset &= \top \\
104104+\bigvee_\emptyset &= \bot
105105+\end{align*}
106106+$$
107107+108108+## Proof
109109+110110+The proof is actually reaaaally trivial, that's why I put "theorem" in quotes in the introduction. It's more of a way to have fun with (excessive?) formalization of simple things haha
111111+112112+Anyway, here is the proof.
113113+114114+Let $E$ a set and $o \in E^2 \to E$ such that $(E, o)$ is a monoid. Let $\mathcal O$ be the repeated variant of $o$ and $e$ the unit element of $(E, o)$.
115115+116116+**Proof by contradiction.**
117117+118118+Assume that $\mathcal O(()) \neq e$.
119119+120120+Then:
121121+122122+$$
123123+\begin{align*}
124124+ \mathcal O((a_1)) &= \mathcal O((a_1) \sqcup ()) \\
125125+ &= a_1\ o\ \mathcal O(()) \\
126126+\end{align*}
127127+$$
128128+129129+But we also have, by definition: $\mathcal O((a_1)) = a_1 = a_1\ o\ e$.
130130+131131+We thus have $e = \mathcal O(())$, which is a contradiction.
132132+133133+So, $\mathcal O(()) = e$.
134134+135135+## Applications
136136+137137+| Operation | Application | |
138138+| --------- | ------------------------------------------------------ |-- |
139139+| $+$ | $\sum_\emptyset = 0$ | |
140140+| $\cdot$ | $\prod_\emptyset = 1$ | |
141141+| $\max$ | $\max_\emptyset = -\infty$ | |
142142+| $\min$ | $\min_\emptyset = \infty$ | |
143143+| $\land$ | $\forall \emptyset = \top$ | |
144144+| $\lor$ | $\exists \emptyset = \bot$ | |
145145+| $\cup$ | $\bigcup_\emptyset = \emptyset$ | |
146146+| $\cap$ | $\bigcap_\emptyset = \mathbb U$ | where $\mathbb U$ is the universe set |