Wednesday, February 18, 2026

The Dorgans of Rhode Island

Draft. Requires support for MathJax, to format the table.
Five generations of Dorgans.

\[ \boxed { \begin{array} {l|c|c} 1 & {} \rlap{\text{Edward F. (1893) + Eva C. (1903)}} \\ 2 & \text{Raymond C. (1928)} & \text{Robert J. (1943)} \\ 3 & \text{Gerald L. (victim) + Linda (victim)} & \text{Robert Kevin (aka Roberta Esposito, shooter, deceased)  (1970)} \\ 4 & \text{Rhonda Lee (victim, deceased)} & \\ 5 & \text{Aidan (victim, deceased)} & \\ \end{array} } \]

So the transgender psychopath Robert Kevin Dorgan shot his biological cousin Gerald L. and killed his niece (and former wife) Rhonda Lee and her (and their) son Aidan.
What a psychopath.

Family dats is from 

https://www.providencejournal.com/live-story/news/crime/2026/02/17/pawtucket-shooting-suspect-identified-robert-dorgan-roberta-esposito-how-many-killed-and-injured/88715579007/#glc88726296007

Quote:




The three others who were critically injured were Rhonda's parents, Linda and Gerald Dorgan, as well as a family friend Thomas Geruso.

...

Why both families have the last name Dorgan
Eryn Dion

Both the Pawtucket ice rink shooter, Robert Dorgan (who also went by Roberta), 
and one of their victims, Rhonda Dorgan, 
had the same last name before they were married in 1992, court records show. 
This is because they are first cousins, once removed.

The 1950 U.S. Census for the state of Rhode Island lays out the family dynamic.

It lists the family of Edward F. Dorgan, 57, and his wife, Eva C. Dorgan, 47, living on Farnum Pike in Smithfield. 
Among others living with them were two sons: 
Raymond C. Dorgan, 22, and Robert J. Dorgan, 7, at the time of the Census.

The Robert J. Dorgan in the 1950 census was the father of shooter Robert Kevin Dorgan, also called Roberta.

Meanwhile, Raymond C. Dorgan, fathered Gerald L. Dorgan, who, with his wife, Linda Dorgan, are in critical condition after the shooting. 
Their daughter was Rhonda Lee Dorgan, who married and then divorced the shooter.

That means Edward F. Dorgan is the shooter's grandfather and Rhonda Lee’s great-grandfather. 
Looked at it another way, Rhonda’s grandfather is the shooter's uncle.

Wednesday, November 26, 2025

Pleasant conversations

I tend to view many math books as pleasant conversations, albeit one-sided, as we cannot talk back to the author(s).

But in reading many math texts, as I certainly have done, it becames clear that the author or authors are viewing this in part as a conversation, where they in their prefaces talk in personal terms.

Thursday, June 19, 2025

Duality in logic and algebra

In logic, we consider a proposition $A$ and its negation $\lnot A$.
If we have a logical implication $A\to B$, 
then we also have its contrapositive $\lnot A \leftarrow \lnot B$.

In linear algebra, we consider a vector space $V$ and its dual $V^\star$.
https://en.wikipedia.org/wiki/Dual_space
If we have a linear transformation $L : V\to W$, 
then we also have its dual transformation $V^\star \leftarrow W^\star : L^\star$.


To see the similarity between the situations, 
we need to write $\lnot B$ and elements of $W^\star$ as arrows, and 
the transformations from 
$A\to B$ to $\lnot A \leftarrow \lnot B$ and  $V\to W$ to $V^\star \leftarrow W^\star$
as simply composition of arrows.

In logic, we follow intuitionistic logic 
and define $\bot$, falsum. as the always false proposition, 
and the negation of a proposition $B$ as the implication $B\to \bot$, i.e., $B$ implies that false proposition $\bot$.
Thus we write the proposition $\lnot B$ as the implication arrow $B\to\bot$, $B$ implies $\bot$.

In linear algebra, each vector space has, by definition of vector space, a field $k$ of scalars which it is a vector space "over".
In the basic examples the field $k$ is either the real numbers $\R$ or the complex numbers $\bf C$.
Then given a vector space $W$ we define its dual $W^\star$ as the vector space of linear transformations from $W$ to its ground field $k$.
Thus an element of $W^\star$ is a linear transformation $W\to k$.

Without further ado, here are some diagrams illustrating the above, comparing fragments of logic and algebra, 
including writing logical implications as if they were linear transformations between vector spaces (this is definitely non-standard):

$$\begin{array} {} A && \xrightarrow[\kern8em]{\textstyle\alpha} && B \\ & \llap{\lnot A} \searrow & \xleftarrow{\textstyle\alpha\kern.2em \text{contrapositive} = \alpha^\star} & \swarrow \rlap{\lnot B} \\ \\ && \bot & \\ \end{array}$$

$$\begin{array} {} V && \xrightarrow[\kern4em]{\textstyle L} && W \\ & \llap{V^\star \ni L^\star t = t\circ L} \searrow & \xleftarrow[\kern 1em]{\textstyle L^\star} & \swarrow \rlap{t \in W^\star} \\ && k & \\ \end{array}$$

$$\begin{array} {} A && \xleftarrow[\kern8em]{\textstyle \alpha \kern.2em \text{converse} = \alpha^{-1}} && B \\ & \llap{\lnot A} \searrow & \xrightarrow{ \textstyle \alpha \kern.2em \text{inverse} = {(\alpha^{-1})}^\star } & \swarrow \rlap{\lnot B} \\ \\ && \bot & \\ \end{array}$$

$$\begin{array} {} V && \xleftarrow[\kern4em]{\textstyle L^{-1}} && W \\ & \llap{V^\star \ni s} \searrow & \xrightarrow[\kern 1em]{\textstyle {(L^{-1}})^\star} & \swarrow \rlap{s\circ L^{-1} = {(L^{-1}})^\star s \in W^\star} \\ && k & \\ \end{array}$$

So $\alpha \kern.2em \text{inverse}$ is the contrapositive of $\alpha \kern.2em \text{converse}$.

AFAIK it is not customary in logic to label implications.
However, to emphasize the similarity of logic to algebra, I have done that here.
Again, the suggested correspondence is between $\lnot B$ and $W^\star$, etc.
$t$ and $s$ are just shown to show how the dual transformations act on the dual spaces.


---------

<B>An application to functions between sets</b>

For any function $f:X\to Y$ in $\Set$, we have:
$$\begin{array} {} X && \xrightarrow{\textstyle f } &&  Y \\ \\ \hline \\ \llap{x=x' \kern1.5em} \hom x X {x'} && \xrightarrow [ \textstyle f \text{ preserves equality} ] { \textstyle \boxed{ \alpha = \hom x f {x'} } } && \hom {xf} Y {x'f} \rlap{\kern1.5em xf=x'f }   \\  & \llap{  x \neq x' \kern1.5em \lnot {\hom x X {x'} } \kern1.5em \hom x X {x'} \backslash \bot } \searrow & \xleftarrow[\textstyle \alpha \text{ contrapositive, } f \text{ reflects apartness}] { \textstyle \alpha \backslash \bot = \alpha^\star } & \swarrow \rlap{ \hom {xf} Y {x'f} \backslash \bot \kern1.5em \lnot \hom {xf} Y {x'f} \kern1.5em xf \neq x'f } \\ \\ && \bot & \\ \end{array}$$

Above the horizontal line is the function $f : X \to Y$ considered as an arrow in $\Set$.
What is below the horizontal line is
a biindexed (indexed by $x,x' \in X$) diagram in the category $\bftwo = \{\bot\lt\top\}$ of Boolean truth values.


The condition that $f$ is an <em>injection</em>
https://en.wikipedia.org/wiki/Injective_function 
may be described as the requirement that each $\boxed{ \hom x f {x'} }$ be invertible:

$$\begin{array} {} X && \xrightarrow{\textstyle f } && Y \\ \\ \hline \\ \llap{x=x' \kern1.5em} \hom x X {x'} && \xleftarrow [ \textstyle \alpha \text{ converse, } f \text{ reflects equality} ] { \textstyle \boxed{ \beta = {(\hom x f {x'} )}\inv } } && \hom {xf} Y {x'f} \rlap{\kern1.5em xf=x'f \kern1.5em \hom x R y \land \hom {x'} R y }  \\ & \llap{ x \neq x' \kern1.5em \lnot {\hom x X {x'} } \kern1.5em \hom x X {x'} \backslash \bot } \searrow & \xrightarrow[\textstyle \alpha \text{ inverse, } f \text{ preserves apartness} ] { \textstyle \beta \backslash \bot = \beta^\star } & \swarrow \rlap{ \hom {xf} Y {x'f} \backslash \bot \kern1.5em \lnot \hom {xf} Y {x'f} \kern1.5em xf \neq x'f } \\ \\ && \bot & \\ \end{array}$$

Below each horizontal arrows is how that arrow relates to the basic arrow $\alpha$, in the language of elementary propositional logic 
https://en.wikipedia.org/wiki/Contraposition .

In the language of category theory, 

1. any function between sets yields a faithful functor between the corresponding discrete categories, 

2. the function is an injection if and only if the corresponding functor is fully faithful.

Tuesday, June 17, 2025

Sets, multisets, families, lists, sequences

Our goal is to compare these familiar, basic structures.
All of these, except for set, are simple examples of functions.

For ready comparison, we place these structures in a table.
In the title of this post, the structures were listed starting with the simplest.
In the table, we place the simplest at the bottom of the table.

\[ \boxed { \begin{array} { l | ccl | c | c } & \text{source} && \text{target} & {\textstyle\text{repetitions}} \atop {\textstyle\text{allowed}} & \text{ordered} \\ \\ \hline \\ \text{infinite sequence} & \N & \to & S & \text{Y} & \text{Y} \\ \text{finite sequence, list, $n$-tuple} & [n] & \to & S & \text{Y} & \text{Y} \\ \text{family, indexed collection, general function} & I & \to & S & \text{Y} & \text{N} \\ \text{multiset} & S & \to & \N & \text{Y} & \text{N} \\ \text{predicate} & S & \to & \bftwo = \{\bot\lt\top\} & \text{Y} & \text{N} \\ \text{set} & & & S & \text{N} & \text{N} \\ \end{array} } \]

$S$ and $I$ are arbitrary sets.

The list structure, by that name, is used extensively in Sheldon Axler's popular text "Linear Algebra Done Right."

Saturday, November 23, 2024

Different use of a matrix and its transpose

We want to establish a string of equalities.
That string will use several substitutions which involve basis expansions, 
so it is helpful to state those basis expansions first.

Since $\source{(v_j)_{1\le j\le n}}$ is a basis for $\source V$, there exists $\source{ \boxed{ (x_j)_{1\le j\le n} } }$ such that

\[ \source{ v \xlongequal[ \text{in terms of the $(v_j)_{1\le j\le n}$ basis of $V$} ] { \text{expanding $v\in V$} } v_1x_1 + \dots + v_nx_n } \; . \]

Since $\target{(w_i)_{1\le i\le m}}$ is a basis for $\target W$, there exists $\leftadj{ \boxed{ (a_{\target i\source j})_{\target{1\le i\le m},\source{1\le j\le n}} } }$ such that

\[ \target{ \source{v_1}\leftadj L \xlongequal[ \text{in terms of the  $(w_i)_{1\le i\le m}$ basis of $W$} ] { \text{expanding $\source{v_1}\leftadj L \in W$} } \begin{Bmatrix} {} w_1 \leftadj a_{\target1\source1} \\ \vdots \\ w_m \leftadj a_{\target m\source1} \\ \end{Bmatrix}  , \kern2em \ldots \kern2em , \source{v_n}\leftadj L  \xlongequal[ \text{in terms of the  $(w_i)_{1\le i\le m}$ basis of $W$} ] { \text{expanding $\source{v_n}\leftadj L \in W$ }  } \begin{Bmatrix} {} w_1 \leftadj a_{\target1\source n} \\ \vdots \\ w_m \leftadj a_{\target m\source n} \\ \end{Bmatrix} } \]

(Note:  
The column vectors of $(\leftadj a_{\target i\source j})_{\target{1\le i\le m},\source{1\le j\le n}}$, written horizontally,
combine to form the transpose of $\leftadj{ M^{\source v}_{\target w} (L) }$.)

So,  
\[ \begin{array} {} \target{ \begin{Bmatrix} {}  w_1 (\source v \leftadj L)_1 \\ \vdots \\ w_m (\source v \leftadj L)_m \\ \end{Bmatrix} \xlongequal [\text{in terms of the  $\target{(w_i)_{1\le i\le m}}$ basis of $W$}] {\text{expanding $\source v\leftadj L \in W$}} \source v\leftadj L \mathrel{\source{ \xlongequal[ \text{in terms of the $\source{(v_j)_{1\le j\le n}}$ basis of $V$} ] { \text{expanding $v\in V$} } }}   \source{ ( v_1x_1 + \dots + v_nx_n  ) } \leftadj L \mathrel{\leftadj{ \xlongequal[\text{linear}]L} } \source{ v_1} \leftadj L \source{x_1} + \dots + \source{v_n} \leftadj L \source{x_n} = \\ \xlongequal[ \text{in terms of the  $\target{(w_i)_{1\le i\le m}}$ basis of $W$} ] { \text{expanding each $\source{v_j}\leftadj L \in W$} }  \left( \source{v_1}\leftadj L = \begin{Bmatrix} {} \target{w_1} \leftadj a_{\target1\source1} \\ \target\vdots \\ \target{w_m} \leftadj a_{\target m\source1} \\ \end{Bmatrix} \right) \source{x_1} + \dots + \left( \source{v_n}\leftadj L = \begin{Bmatrix} {} \target{w_1} \leftadj a_{\target1\source n} \\ \target\vdots \\ \target{w_m} \leftadj a_{\target m\source n} \\ \end{Bmatrix} \right) \source{x_n} \\ \xlongequal [\text{dist.}] { \text{dist., Fubini,} }\begin{Bmatrix} {} w_1  \source{(\leftadj A_{\target1} \cdot X)} \\ \vdots \\ w_m \source{(\leftadj A_{\target m} \cdot X)} \\ \end{Bmatrix} } \end{array} \]

\[ \boxed{ \begin{array} {c|ccc}  \target{w_1} \source{(\leftadj A_{\target1} \cdot X)} = \target{w_1} \source{ ( \sum_{j=1}^n \leftadj a_{\target1 j} x_j ) } & \target{w_1} \leftadj a_{\target1 \source1} \source{x_1} & \source\dots & \target{w_1} \leftadj a_{\target1\source n} \source{x_n} \\ \target\vdots & \target\vdots & \target\vdots & \target\vdots \\ \target{w_m} \source{(\leftadj A_{\target m} \cdot X)} = \target {w_m} \source{ ( \sum_{j=1}^n \leftadj a_{\target m j} x_j ) } & \target{w_m} \leftadj a_{\target m \source 1} \source{x_1} & \source\dots & \target{w_m} \leftadj a_{\target m\source n } \source{x_n} \\ \hline \\ \begin{array} {} { \displaystyle \mathop{ \target{\sum_{i=1}^m} } \mathop{ \source{\sum_{j=1}^n} } \target{w_i} \leftadj a_{\target i\target j} \source{x_j} } \\ \Vert\rlap{\text{Fubini}} \\ { \displaystyle \mathop{ \source{\sum_{j=1}^n} } \mathop{ \target{\sum_{i=1}^m} } \target{w_i} \leftadj a_{\target i\target j} \source{x_j}  } \end{array} & \target{ \begin{Bmatrix} {} w_1 \leftadj a_{1\source1} \\ \target\vdots \\ w_m \leftadj a_{m\source1} \\ \end{Bmatrix} } \source{x_1} & \source\dots & \target{ \begin{Bmatrix} {} w_1 \leftadj a_{1\source n} \\ \target\vdots \\ w_m \leftadj a_{m\source n} \\ \end{Bmatrix} } \source{x_n} \\ & \target\Vert && \target\Vert \\ & \target{ (w \cdot \leftadj A^{\source1}) } \source{x_1} & \source\dots & \target{ (w \cdot \leftadj A^{\source n}) } \source{x_n} \\ \end{array} } \]

---------------

To some extent this follows the notation and setup of Chapter IV, Section 3 of Serge Lang's Linear Algebra, 3e.
The notation deviates from that in these ways:

1. If $f$ is a function and $v$ is in the domain of $f$, we write the value of $f$ at $v$ any of three ways: $f(v)$ or $fv$ or $vf$.
As long as it is known which is a function and which can be an argument to that function, that should not be a problem.

2. Sometimes we have a column of values which need to be added up.
We introduce a notation which gives a vertical version of the standard symbol $\Sigma$ for summation.
For example,
\[ \begin{Bmatrix} {} v_1 \\ \vdots \\ v_n \end{Bmatrix} = \sum_{i=1}^n v_i \; \text{whereas} \begin{pmatrix} {} v_1 \\ \vdots \\ v_n \end{pmatrix} \text{is just a vertically oriented $n$-tuple.} \]

3. Consider the situation:
$f:X\to Y$ is a function and $e$ and $e'$ two expressions denoting the same element of $X$.
We introduce the expression 
$(e=e')f$ to 
1. Indicate that $e$ and $e'$ denote the same element in $X$, and 2. return the element of $Y$ which is the value of $f$ under $f$.
For a simple example,
\[ 2+3=5 \Rightarrow (2+3)^2=5^2 =25 = (2+3=5)^2 \, . \]

4. For an example, which appeared above, combining these notational conversations, consider 
\[ \source { \left( \begin{Bmatrix} {} v_1 x_1 \\ \vdots \\ v_n x_n \\ \end{Bmatrix} \xlongequal[\text{basis}]v v \right) } \leftadj F \; , \]
which follows from
\[ \source{ v_1x_1 + \dots + v_nx_n \xlongequal[\text{basis}]v v } \]
and returns the common value
\[ \source{ (v_1x_1 + \dots + v_nx_n)\leftadj F \mathrel{\target =} v\leftadj F } \; . \]

----------

Here is another approach to the same subject:

\[ \target { \left( \leftadj { \left( M^{\source v}_{\target w} (F) = A =con \begin{pmatrix} {} a_{\green1\blue1} & a_{\green1\blue2} & \dots & a_{\green1\blue n} \\ && \vdots \\ a_{\green m\blue1} & a_{\green m\blue2} & \dots & a_{\green m\blue n} \\ \end{pmatrix} \right) } \source { \begin{pmatrix} {} x_1 \\ \vdots \\ x_n \\ \end{pmatrix} } \right) X_w\inv = \begin{Bmatrix} {} ( w_1 \leftadj a_{1,1} + \dots + w_m \leftadj a_{m,1} & \xlongequal[\text{basis}] w & \source{v_1} \leftadj F ) \source{x_1} \\ & \vdots \\ ( w_1 \leftadj a_{1,n} + \dots + w_m \leftadj a_{m,n} & \xlongequal[\text{basis}] w & {\source{v_n}} \leftadj F ) \source{x_n} \\ \end{Bmatrix} } \leftadj { \xlongequal[\text {linear}]F } \source { \left( \begin{Bmatrix} {} v_1 x_1 \\ \vdots \\ v_n x_n \\ \end{Bmatrix} \xlongequal[\text{basis}]v v \right) } \leftadj F = \source v \leftadj F \]


Thursday, October 10, 2024

Preorders and their special cases

\[ \boxed { \begin{array} {} & \text {Preorders = Thin Categories} & \\ & \text {reflexive:} \; x \leq x & \\ & \text {transitive:}\; x\leq y \;\&\; y\leq z \Rightarrow x\leq z & \\ \boxed { \begin{array} {} \text {Partial Order} \\ \text {skeletal:}\; x\leq y \;\&\; y\leq x \Rightarrow x=y \\ \text {example: power set } X\mathcal P \\ \end{array} } & \boxed { \begin{array} {} \text{Intersection} \\ \text{Discrete Order: only $x=x$ allowed } \\ \end{array} } & \boxed { \begin{array} {} \text {Equivalence Relation} \\ \text {symmetric: } x\leq y \Rightarrow y\leq x \\ \text{example: congruence } m \equiv n \; (\text{mod } k) \\ \end{array} } \\ \end{array}  } \]

For a relation between partial orders and total orders, see

"Partial orders are the free conservative cocompletion of total orders"
Calin Tataru
http://www.tac.mta.ca/tac/volumes/44/1/44-01abs.html

Wednesday, October 9, 2024

Groups in linear algebra and elementary geometry

There are several groups that play an important role in linear algebra and elementary geometry.
The following table shows what they are and the relations between them.
It includes the simplest possible example, the one-dimensional real case.
In the table $\bf k$ is an arbitrary commutative field (like $\R$ or $\bf C$).

\[ \boxed {\begin{array} {l|cccccccc} & \text {rotations} & \subset & \text {isometries} & \subset & \text {affine transformations} \\ \hline \text{$n$-dimensional affine transformations} & \text {Isom}_n^+ ({\bf k}) =  \text {SO}_n ({\bf k}) \ltimes \text {Trans}_n ({\bf k}) & \subset & \text {Isom}_n ({\bf k}) = \text {O}_n ({\bf k})  \ltimes \text {Trans}_n ({\bf k}) & \subset & \text {Aff}_n ({\bf k}) = \text {GL}_n ({\bf k})  \ltimes \text {Trans}_n ({\bf k}) \\ & \cup &&  \cup && \cup \\ \text{$n$-dimensional linear transformations} & \text {SO}_n ({\bf k}) & \subset & \text {O}_n ({\bf k})  & \subset & \text {GL}_n ({\bf k}) \\ \\ \text{one-dimensional affine transformations} & \text {Isom}_1^+ (\R) = \{x \mapsto x+b \mid b \in \R \} & \subset & \text {Isom}_1 (\R) = \{x \mapsto \pm x+b \mid b \in \R \} & \subset & \text {Aff}_1 (\R) = \{x \mapsto a x+b \mid a, b \in \R, a\not=0 \} \\ & \cup && \cup && \cup \\ \text{one-dimensional linear transformations} & \text {SO}_1(\R) = \text {O}_1^+(\R) \cong \{1\in\R\} & \subset & \text {O}_1 (\R) \cong \{1,-1\in\R\} & \subset & \text {GL}_1 (\R) \cong \{a\in\R: a\not= 0\}  \\ \hline  & \text{translations} \\ \end{array} } \]
The $\ltimes$ symbol denotes semi-direct product.
The reason for the notation $a$ as opposed to $A$ 
is because $A$ is customary notation for matrices, while $a$ is more appropriate for real numbers 
(which of course can be viewed as $1\times 1$ real matrices).




Reference: Andrew Baker, Matrix Groups 

Friday, August 9, 2024

Steps Feynman omits in his "Tips on Physics"

Let me start with my exposition of a basic result about differentiation:

Suppose $u$ and $v$ are two functions from $\R$ to $\R$: $u,v : \R \to \R$.
Then we can form their (pointwise) product, and then differentiate that.
The product rule for differentiation, followed by an elementary algebraic manipulation, then yields:

\[ (uv)' \xlongequal {\text{product rule}} u'v + uv' \xlongequal{\text{algebra}} uv(u'/u+v'/v) \]

That combined the product rule with some simple algebraic manipulations.

That is a simple, general, fact which may or may not be of general significance.

Now let's see what Feynman does in (1.3) through (1.6) of "Feynman's Tips on Physics".

He both generalizes and specializes the above.

He generalizes it to a four-way product:

\[ (uvwx)' = u'vwx + uv'wx + uvw'x + uvwx' = uvwx \Big[ {u' \over u} + {v' \over v} + {w' \over w} + {x' \over x} \Big] \]

------

Next he specializes to the casa where each of $u,v,w,x$ are powers of a polynomial, e.g. $u = p^a$, where $p$ is a polynomial and $a$ is a fixed, constant real number.

To differentiate $p^a$, we need to realize that that is the composite of two functions, the polynomial $p$ and the monomial $x^a$.
Let us write the latter as $x^a = xR_a$ ($x$ raised to the $a$-th power).

We differentiate that function as follows:
\[ (x^a)' = x{R_a}' = x a {R_{a-1}} = a x^{a-1} . \]

Now we can apply the chain rule to differentiate the composite:

\[ (p^a)' = (pR_a)' \xlongequal {\text{chain}} p' \cdot (p{R_a}') = p' \cdot (a(pR_{a-1})) = p' \cdot (a p^{a-1}) . \]

And so, if $u = p^a$, we have 
\[ {u' \over u} = {(p^a)' \over p^a} = { p' a p^{a-1} \over p^a } = a {p' \over p} . \]

And this is what Feynman applies four times to get his (1.6).

Sunday, August 4, 2024

Juxtaposition, multiplication, application, and composition

Juxtaposition is certainly a common, efficient way of combining two things.
I want to give here three separate examples of such.

1. Multiplication 
If $a$ and $b$ are two real numbers, we routinely write $ab$ to denote their (multiplicative) product.
If necessary, we put a centered dot between them to prevent ambiguity.
Thus, for example, $5\cdot 7 = 35$, while $57$ is just that.

2. Function application.
Suppose $x$ is a real number, and $f:\R\to\R$ is a real-valued function of one real variable.
It is convenient to write $xf$ for the value of $f$ at $x$.
Of course more conventional ways of writing this are $(x)f$ or $f(x)$, depending on whether you are letting functions operate to the right or left of their argument.

3. Composition 
Suppose we have three sets $X, Y$ and $Z$, 
and functions $f:X\to Y$ and $g:Y\to Z$.
We can then define a composite function $fg$ by $x(fg) = (xf)g$.

Friday, April 26, 2024

Dominique Bourn's "From Groups to Categorial Algebra"

DRAFT. ONLY BEING "PUBLISHED" SO I CAN SEE WHAT IT LOOKS LIKE WHEN PROCESSED BY MATHJAX.

This book actually covers a lot of ground.

I want to focus on a small, but significant, part of that.

Let us consider three topics:
equivalence relation 
equivalence class (or, in group theory, coset)
normal subgroup.

To what extent can these concepts be generalized beyond the theory of groups, and how may they be generalized?


Consider the important and ubiquitous concept of "equivalence relation"
https://en.wikipedia.org/wiki/Equivalence_relation
This is normally defined as a relation, say $R$, on a set, say $X$, which is reflexive, symmetric, and transitive.
These are in turn defined by the effect of $R$ on elements of $X$.
E.g., saying that $R$ is symmetric means that,
writing the relation $R$ as $\sim $, 
for all $x,y\in X$, $x\sim y \implies y\sim x$.

Now, Bourn's strategy is to translate these conditions into category theory, 
so they may be applied to a wide variety of categories, 
beyond merely the category of sets.

As background, Bourn notes that a relation in $\Set$ is a special case of a graph in $\Set$, 
which can be described as a parallel pair of arrows $A \rightrightarrows N$ from the set of arrows IN the graph to the set of nodes in the graph.
A relation is the special case of a graph where the parallel pair is jointly monomorphic, that is, for any two nodes $N1=x$ and $N2=y$, there is at most one arrow from $N1=x$ to $N2=y$.
These two definitions, that 
a graph is a partial pair of arrows and 
a relation is a jointly monomorphic parallel pair of arrows,
may easily be interpreted in an arbitrary category, not just the category of sets.

The reflectivity condition may easily be interpreted in both $\Set$ and in an arbitrary category, for both graphs and relations, as a joint section for the parallel pair.

-----

Next, Bourn gives a single condition on (the reflexive relation $R$) which is logically equivalent to (the conjunction of the symmetry and transitive conditions on $R$).

But that single condition, 
on the relation $R$ (on $X$), 
is a very special case of a much more widely applicable condition, 
so let me put it in that broader context.

If $a,b\in X$ are related by the relation $R$, 
it is conventional to indicate that by writing $a\sim b$.
I am going to write that as a labeled arrow $a \xrightarrow {\textstyle r} b$, 
labelling the specific relation with a letter.
Likewise writing $a\sim c$ as 
$a \xrightarrow {\textstyle s} c$.

Now let us start with the situation 

\[ \begin{array} {} && b \\ & \llap{r} \nearrow \\ a & \xrightarrow [\textstyle s] {} & c \\ \end{array} \]

I.e., $a$ is related to both $b$ and $c$ by relations labelled respectively $r$ and $s$.

Given that situation, there is a condition, which Bourn calls the "horn-filler condition" but which might equally well be called the "extension condition".
The "extension condition" is that, in that situation, 
there exists an arrow (a relation) $r\backslash s : b\to c$.
Thus the extension condition means that we have three arrows, i.e. relations, as shown here:

\[ \begin{array} {} && b \\ & \llap{r} \nearrow & \downarrow \rlap{\exists r\backslash s} \\ a & \xrightarrow [\textstyle s] {} & c \\ \end{array} \]

Now let us see how the horn-filler or extension condition, for a reflexive relation, implies both the symmetry and transitivity conditions.

We combine both into a single diagram:

\[ \begin{array} {} && b \rlap{ \xrightarrow[\kern7.5em]{\textstyle s} } &&&& c \\  & \llap r \nearrow && \searrow \rlap{ r^{-1} } \\ a \rlap{ \xrightarrow[\textstyle 1_a]{\kern9em} } &&&& a \\ \end{array} \]
Note that here we apply the horn-filler, or extension, condition twice, 
first to get $r\inv$, and thus the symmetry condition, and 
second, using $r\inv$, to get a relation $rs$ (not shown) from $a$ to $c$, 
which gives the transitivity condition.

Bourn thus having triumphantly shown how both the symmetry and transitivity conditions follow from a single condition, 
the horn-filler or extension condition, 
his next task is to show how that condition may be translated into category theory.

He does that using the categorical notion of pullback.
In particular, the collection of "horns" (which may be described more categorically as "spans")
is precisely the kernel pair of $d_0 : R \to X$, 
which is the pullback (of $\Delta_X$) in the pullback diagram
\[ \begin{array} {} \boxed{ KP(d_0:R\to X) } = \{<r:a\to b, s:c\to d> : a=c \} & \xrightarrow{} & X & \ni & x\\ \downarrow && \downarrow \rlap{ \Delta_X } && \downarrow \\ R\times R & \xrightarrow [\textstyle d_0\times d_0] {} & X\times X & \ni & <x,x> \\ <r:a\to b, s:c\to d> & \mapsto & <a,c> \\ \end{array} \]
Thus $KP(d_0:R\to X) = \{<r:a\to b, s:a\to c> \}$, the set of all spans, or horns, in $R$.

OTOH, the collection of horns/spans satisfying the extension condition also is a pullback!
Namely the pullback (of $R\to X\times X$) in the diagram 
(where $KP(d_0:R\to X)$ is abbreviated to $KP(d_0)$, or even just $KP$)
\[ \begin{array} {} &&&& R \\ &&&& \downarrow \\ KP(d_0) & \rightarrowtail & R\times R & \xrightarrow [d_1\times d_1] {} & X\times X \\ && \Vert & \Vert & \Vert \\ && \nabla R & \xrightarrow [\nabla d_1] {} & \nabla X \\<r:a\to b, s:a\to c> & \mapsto & <r,s> & \mapsto & <b,c> \\ \end{array} \]
That is,
$({(d_1\times d_1)} | KP : KP\to X\times X)\inv (R) = \{<r:a\to b, s:a\to c> : b \mathrel{ {\sim_R} } c \}$

Bourn in fact considers a larger set, not merely a subset of the horns:

\[ \begin{array} {} <r:a\to b, s:c\to d, \rho: b\to d > && \rho: b\to d \\ \boxed{ {d_1}\inv R } & \xrightarrow {} & R \\ \downarrow&& \downarrow \\  R\times R & \xrightarrow [d_1\times d_1] {} & X\times X \\  \Vert & \Vert & \Vert \\ \nabla R & \xrightarrow [\nabla d_1] {} & \nabla X \\<r:a\to b, s:c\to d>  & \mapsto & <b,d> \\ \end{array} \]
That is,
${(d_1\times d_1)}\inv (R) = \{ <r:a\to b, s:c\to d> : b \mathrel{ {\sim_R} } d \}$

Then the condition that every horn/span has an extension becomes 
\[ \boxed{ KP(d_0) \subseteq {d_1}\inv R } \]

-----

We can combine the various pieces of the above into one quite useful large diagram.

\[ \begin{array} {} &&&& <r:a\to b, s:c\to d, \rho: b\to d > && \rho: b\to d \\ && \big\{ <r:a\to b, s:a\to c, \rho: b\to c> \big\} & \rightarrowtail & \boxed{ {d_1}\inv R } & \xrightarrow {} & R \\ && \downarrow && \downarrow&& \downarrow \\ <r:a\to b, s:a\to c> & \in & \boxed{ KP(d_0) } & \rightarrowtail & R\times R & \xrightarrow [d_1\times d_1] {} & X\times X \\ &&&& \Vert & \Vert & \Vert \\ &&&& \nabla R & \xrightarrow [\nabla d_1] {} & \nabla X \\ &&&& <r:a\to b, s:c\to d>  & \mapsto & <b,d> \\ && \downarrow && \downarrow \rlap{d_0\times d_0} \\ a & \in & X & \xrightarrow [\Delta_X] {} & X\times X \\ &&&& <a,c> \\ \end{array} \]

------------------------------

Suppose $\boxed{ R \rightarrowtail G\times G }$ is an internal relation in the category of groups.
Then relations have inverses, and we can multiply them.
So, writing the relation as $\sim$, 
if $g\sim h$ then, taking the inverse of the relation, also $g\inv \sim h\inv$.
And if as well $a\sim b$, then, multiplying the relations, $ga \sim hb$.

If further $R$, or $\sim$, is a reflexive relation, i.e. $(\forall g\in G) (g\sim g)$, 
then, somewhat surprisingly, $\sim$ is in fact an internal equivalence relation!

Let's see why that is so.

Reflectivity gives $(\forall a\in G)(a\sim a)$.
Then if also $g\sim h$, multiplication of the relations gives $ga \sim ha$ and $ag\sim ah$.

For symmetry, we have:
\[\begin{array} {} g\sim h \\ h\inv \sim g\inv \\ h\sim g \\ \end{array} \]

For transitivity, we have
\[ \begin{array} {} g\sim h \\ h\inv \sim g\inv \\ h \sim k \\ \hline e = h\inv h \sim g\inv k \\ g \sim k \\ \end{array} \]

Let us also note that finitely complete categories in which every internal reflexive relation is an internal equivalence relation 
(like the category of groups)
are called, by Bourn and others, <b>Mal'tsev categories</b>.
https://ncatlab.org/nlab/show/Malcev+category

-------------------

This information, i.e. structure, may be described as a 2-category, 
with only one 0-cell, 
whose 1-cells are the elements $g$ of the group $G$, 
whose vertical category is the relations $r$ in the equivalence relation $R$, 
whose horizontal composition on 1-cells is the group composition in $G$, and 
whose horizontal composition on 2-cells (i.e., elements of $R$) is the group operation in $R$.
Vertical composition of 2-cells is composition of relations.
To see this, consider the equality of 2-diagrams
\[ \begin{array} {} \xrightarrow [\kern3em] {\textstyle g} && \xrightarrow [\kern3em] {\textstyle a} && \xrightarrow [\kern6em] {\textstyle ga} \\ \llap r \Big\Downarrow && \Big\Downarrow \rlap s  && \Big\Downarrow \rlap {rs} \\ \xrightarrow [\textstyle h] {} && \xrightarrow [\textstyle b] {} & = & \xrightarrow [\textstyle hb] {} \\ \Big\Downarrow && \Big\Downarrow  && \Big\Downarrow \\ \xrightarrow [\textstyle k] {} && \xrightarrow [\textstyle c] {} && \xrightarrow [\textstyle kc] {} \\ \end{array} \]

This may alternatively be depicted as
\[ \begin{array} {} \xrightarrow [\kern3em] {\textstyle g} && \xrightarrow [\kern3em] {\textstyle h} && \xrightarrow [\kern6em] {\textstyle gh} \\ \llap r \Big\Downarrow && \Big\Downarrow \rlap {s} && \Big\Downarrow \rlap {rs} \\ \xrightarrow [\textstyle g'] {} && \xrightarrow [\textstyle h'] {} & = & \xrightarrow [\textstyle g'h'] {} \\  \llap{r'} \Big\Downarrow && \Big\Downarrow \rlap{s'}  && \Big\Downarrow \rlap{r's'} \\ \xrightarrow [\textstyle g''] {} && \xrightarrow [\textstyle h''] {} && \xrightarrow [\textstyle g''h''] {} \\ \end{array} \]
or
\[ \begin{array} {} \xrightarrow [\kern3em] {\textstyle g} && \xrightarrow [\kern3em] {\textstyle g'} && \xrightarrow [\kern6em] {\textstyle gg'} \\ \llap r \Big\Downarrow && \Big\Downarrow \rlap {r'}  && \Big\Downarrow \rlap {rr'} \\ \xrightarrow [\textstyle h] {} && \xrightarrow [\textstyle h'] {} & = & \xrightarrow [\textstyle hh'] {} \\ \llap s \Big\Downarrow &&  \Big\Downarrow \rlap {s'} && \Big\Downarrow \rlap{ss'} \\ \xrightarrow [\textstyle k] {} && \xrightarrow [\textstyle k'] {} && \xrightarrow [\textstyle kk'] {} \\ \end{array} \]

We may diagram this situation as a diagram of sets:
\[ \begin{array} {} \calC_0 & \leftarrow & \calC_h = G \ni g & \to & \calC_0 \\ \uparrow && \uparrow &&  \uparrow \\ \calC_v & \leftarrow & \calC_2 = R \ni r & \to & \calC_v \\ \downarrow && \downarrow && \downarrow \\ \calC_0 & \leftarrow & \calC_h = G \ni h & \to & \calC_0 \\ \end{array} \]
where $\calC_0$ and $\calC_v$ are both trivial, i.e., one-element sets.


Wednesday, April 17, 2024

A (categorical) diagram for the Chain Rule (more reasonably called the Composition Rule)

The standard proof of the Chain Rule
(for which I suggest a better name is the Composition Rule),
for the derivative $(\blue f \green g)'$ of the composition of two differentiable functions between three vector spaces:
\[ \begin{array} {} && F \\ & \blue{ \llap f \nearrow } && \green{ \searrow \rlap g } \\ \blue E & {} \rlap{ \kern-.5em \xrightarrow [\textstyle \blue f \green g] {\kern6em} } &&& \green G \\  \end{array} \]
 shows a bunch of equations, with some being substituted into others to yield the final desired result.

As an example of this, see the proof of the Chain Rule 
given in Chapter XVII, Section 3 of Serge Lang's well-known <I>Undergraduate Analysis</I>.
(Actually, he only assumes $f$ and $g$ are defined on suitable open sets of $E$ and $F$, but for simplicity we will assume they are globally defined.)

Just giving the equations omits some important information: in which vector space are the equations holding, and in which vector space do the variables live?
Of course the knowledgeable reader can infer that, but it seems to me it would aid the understanding of the proof, and the situation, to make that "typing" information explicit.

That is easy to do with a categorical diagram.

I don't have sophisticated enough diagramming software to let me show you the full diagram in this blog, but I can tell you how to draw it for yourself on a sheet of paper.

Here is the key part, which in the full diagram is inscribed in the $E\to F\to G$ triangle drawn above.

\[ \begin{array} {} &&& F &&& \\ && \llap{\blue{xf}} \Bigg\uparrow & \blue{ \begin{array} {} h \black k \\ \black\Longrightarrow \\ h(xf') \mathrel {\black +} (h\psi_f) \mathrel \cdot |h| \\ \end{array} } & \Bigg\uparrow \rlap{ \blue{ (x+h)f = xf \mathrel{\black+} h \black k = xf + h(xf') + (h\psi_f) \cdot |h| } } \\ & \blue{  \xleftarrow [\kern3em] {\textstyle x+h} } &&&& \xrightarrow [\kern18em] {\textstyle xfg} \\ \blue E & \blue{ \smash{\Bigg\Uparrow} \rlap h } && \rightadj 1 && \smash{ \Bigg\Downarrow } \rlap{ \kern-6em (hk) (xfg') + \big( (hk)\psi_g \big) \cdot |hk| } & G \\ & \blue{ \xleftarrow[\textstyle x] {} } &&&& \xrightarrow [ \textstyle (x+h)fg = (xf+hk)g ] {} \\ \\ \hline \\ {} \rlap{ \blue{ \big(h(xf') \mathrel {\black +}  (h\psi_f) \mathrel \cdot |h|  \big) } (xfg') + \green{ \big( (hk)\psi_g \big) \cdot |hk| } } \\ {} \rlap{ \blue{h(xf')} (xfg') \mathrel {\black +} \blue{ \big((h\psi_f) \mathrel \cdot |h| \big) } (xfg') + \green{ \big( (hk)\psi_g \big) \cdot |hk| } } \\ \end{array} \]

----------

There are several notational conventions at play here.

\[ \begin{array} {l|cccc|cc|cccc} & \text{mult} & \text{appl} & \text{comp} & \text{appl+comp} & \lambda\text{ fn} & \lambda\text{ number} & \rightadj{ \text{the derivative} } \\ \hline \text{Lang} & xy & f(x) & g\circ f & g(f(x)) & \lambda(h) & \lambda h & f(\source{x+h}) \mathrel{\target=} f(\source x) \mathrel{\target+} \big(f'(\source x)= \rightadj D f(\source x)\big)(\source h) \mathrel{\target+} \source{|h|}\psi(\source h) \\ \text{Harbaugh} & x\cdot y & xf & fg & xfg & h\lambda & h\cdot\lambda & \source{(x+h)}f \mathrel{\target=} \source x f \mathrel{\target+} \source h \cdot  \big(\source x (f'=f\rightadj D)\big) \mathrel{\target+} (\source h \psi)\cdot \source{|h|} \\ \text{example} &&&&&&& \source{(x+h)}^2 \mathrel{\target=} \source x ^2 \mathrel{\target+} \source h \cdot ( \source x \cdot \rightadj 2 ) \mathrel{\target+} \source{ \big( h\cdot h = ({h\cdot h \over |h|}) \cdot |h| \big) } \\ \end{array} \]

-------

Here is a higher level formulation of the Chain Rule:

\[ \begin{array} {} \blue x && \blue{x,x} && \blue{ x, xf} && \blue{xf'}, \blue{xf}\green{g'} && \blue{(xf')} \green{ (\blue{xf}  g') } \\ \blue E & \blue{ \xrightarrow {\textstyle \Delta} } & \blue{ E\times E } & \blue{ \xrightarrow { \textstyle E\times f} } & \blue E \times F & \xrightarrow {\textstyle \blue{f'} \times \green{g'} } & \blue{ \hom E L {\black F} } \times \green{ \hom {\black F} L G } & \rightadj\to & \hom {\blue E} L {\green G} \\ {} \rlap { \kern1em \rightadj { \xrightarrow [ \textstyle (\blue f \green g)' ] {\kern 36em} } } \\ \blue x &&&&&&&& \blue x \rightadj{ (\blue f \green g)' } \\ \end{array} \]

Tuesday, December 19, 2023

The mathematics of paradoxes (barbers and diagonal arguments)


This document is repetitive in places. Editing is planned.

We look at some ways to formalize some of the popular “paradoxes”.  
This introduces some formalization techniques
in a, hopefully, enjoyable, easily understandable setting.

Note: There are two interplays at work here:

The interplay between (informal language) and (mathematical formalisms), 

and, within mathematics, the interplay (in fact a bijection) between 

(predicates on a set $U$) and (subsets of that set $U$).

$\def\sigmarel{\mathrel\sigma}$

$\def\Irr{ \text{Irr} } \def\To{\Rightarrow} \def\rtimes{\mathop {\rightadj\times}} \def\rtop{{\rightadj\top}} \def\lbot{{\leftadj\bot}} \def\rlnot{{\rightadj\lnot}} \def\lDelta{{\leftadj\Delta}} \def\su{{\source u}} \def\tv{{\target v}}$

$\def\S{\mathrel S}$ $\Newextarrow{\xLongrightarrow}{3,2}{0x21D2}$

For the mathematics, let us start with some recollections.
Given any set $\boxed U$, 
there is a "diagonal function" (an example of what can be called a "comultiplication") $\boxed{ \lDelta_U : U \mathrel{\leftadj\to} U \rtimes U : u \mapsto \langle u,u \rangle }$.
In cases where $U$ is evident, the subscript $U$ can be omitted.
Also the set $\boxed{ \bftwo = \{\lbot, \rtop\} }$ has a "negation" endofunction $\boxed{ \rlnot : 2 \mathrel{ \rightadj\to } 2 : \lbot \mapsto \rtop, \rtop \mapsto \lbot }$) which interchanges $\lbot,\rtop$.
The negation endofunction $\rlnot$ is of course a permutation on a finite set, 
and may be written using cycle notation as a 2-cycle, the transposition $(\lbot,\rtop)$.
It will later be of significance that this endofunction does not have a fixed point, i.e., is what combinatorists call "a derangement".

Given $\lDelta$ and $\rlnot$, for any relation $\boxed{ R: U\times U \to \bftwo }$, 
we can postcompose with $\rlnot$, precompose with $\lDelta$, or both:

\[ \boxed{ \begin{array} {ccccc|l|c|l} R & : & U\times U & \to & \bftwo & \text{basic relation} & \homst u R v & \text{$\su$ is $R$-related to $\tv$} \\ R\rlnot & : & U\times U & \to & \bftwo & \text{negated relation} & \rlnot {\homst u R v} & \text{$\su$ is not $R$-related to $\tv$} \\ \lDelta R & : & U & \to & \bftwo & \text{diagonal of the basic relation} & \hom u R u & \text{$u$ is $R$-related to itself} \\ \lDelta R \rlnot & : & U & \to & \bftwo & \text{diagonal of the negated relation} = {} & \rlnot {\hom u R u} & \text{$u$ is not $R$-related to itself} \\ &&&&& \text{negation of the basic diagonal} \\ \end{array} } \]
The first two rows represent <I>relations</I> on $U$;
the last two rows represent <I>predicates</I> on $U$.
It is the last row, (the negated diagonal) or (the diagonal of the negated relation), 
that is essential to the "diagonal arguments" to be discussed.
For want of a better name, I call it the "Irreflexivity" predicate for $R$, $\boxed{ \Irr_R = \lDelta R \rlnot }$.
This last plays such a large role in the development 
that it is useful to show in detail how it acts on elements $u\in U$:
\[ \boxed{ \begin{array} {} \boxed{\Irr_R} & : & U & \xrightarrow[\kern3em]{\textstyle \lDelta}& U \rtimes U & \xrightarrow[\kern3em]{\textstyle \boxed{R}} & \bftwo & \xrightarrow[\kern3em]{\textstyle \rlnot} & \bftwo \\ && u & \mapsto & \langle u,u \rangle & \mapsto & \hom u R u & \mapsto & \rlnot \hom u R u \\ \end{array} } \]

This pre- and post- composition business can most perspicuously be presented as a tetrahedron,
where the triple composite $\lDelta R \rlnot$, the Irreflexivity predicate, needs to be imagined as a long northeast diagonal arrow.
\[ \boxed{ \begin{array} {} && U \rtimes U \rlap{ \xrightarrow [\kern9em] {\textstyle R \rlnot} } &&&& \bftwo \\ & \llap{ \lDelta } \nearrow && \searrow \rlap{R} && \nearrow \rlap{\rlnot} \\  U \rlap{ \xrightarrow [\textstyle \lDelta R] {\kern12em} } &&&& \bftwo \\ \end{array} } \]
Note that the two relations are the two arrows whose source is $U \rtimes U$, 
while the two predicates are the lower two of the three arrows whose source is $U$.


The basic issue, which is the heart of many of the so-called "paradoxes",
can now be presented very cleanly and simply, using the Irreflexivity predicate.

<b>Theorem (Irreflexivity predicates are never representable)</b>
Given (any binary relation $\boxed {R : U \times U \to 2}$ (2.)) on (any set $\boxed U$ (1.)).
(its Irreflexivity predicate $\boxed{\Irr_R}$ (3.)) 
cannot be (represented (6) by $R$).
In other words, ($R$-irreflexivity (3.)) is not ($R$-representable (6.)).

(The numbers in parentheses will be used below.
They not only give a time sequence for constructing the argument
but also link together the various ways of presenting the argument.)

There is a  well-defined framework within which all these so-called "diagonal arguments" can be placed.
Placing those arguments in this framework helps distinguish "the forest from the trees".

Here we give it in a series of numbered steps.

They assume we are working in the category of sets, but they apply in other suitable categories.

1. Consider a set $\boxed U$, the "universe".

2. Consider a binary relation, $\boxed{ R : U \rtimes U \to (2 = \{\lbot,\rtop\}) : \langle u,v \rangle \mapsto \hom u R v}$ on $U$.

3. Using (the diagonal map $\lDelta : U \leftadj\to U \rtimes U : u \mapsto \langle u,u \rangle$) and (the negation map $\rlnot : 2 \rightadj\to 2 : \lbot \mapsto \rtop, \rtop \mapsto \lbot$), 
define (the <b>irreflexivity predicate</b> $\boxed{ \Irr_R = \lDelta R \rlnot : U \to 2 : u \mapsto \rlnot \hom u R u }\;$) on $U$.

4. The question now is, "Can $\Irr_R$ be represented by an element of $U$?". 
Suppose it can. 
Let $\boxed{ b\in U }$ be the putative representing element.

5. Form the predicate $\boxed{ \hom b R - : U \to 2 }$ on $U$.

6. We now expand the representability assertion. 
The assertion that ($b$ represents $\Irr_R$) is 
the assertion that (there exists an equality $\boxed{ {(\hom b R - = \Irr_R)} : U \to 2 }$ in $\hom U \Set 2$ ), which is defined to mean 
the statement in first order logic ( $(\forall u\in U)(\hom b R u \iff \Irr_R u)$ ), which by the definition of $\Irr$ is 
( $(\forall u\in U)(\hom b R u \iff \rlnot \hom u R u )$ ).

7. Instantiate that universal quantification at $b\in U$, getting $\boxed{ \hom b R b \iff \rlnot \hom b R b }$, i.e., $\hom b R b \in 2$ is a fixed point for $\rlnot$.

8. But (the negation $\rlnot : 2 \to 2$) does not have a fixed point ($\rlnot\lbot = \rtop$ and $\rlnot\rtop = \lbot$), so we have reached a contradiction. (In the familiar, concrete, and easily understandable "barber paradox", if we give the English language meaning of $\hom b R b$ in this case, (representability evaluated at $b$) becomes "if the barber shaves himself, then he doesn't shave himself, and if he doesn't shave himself, then he shaves himself".)

9. Therefore such a representing $b\in U$ cannot exist.

Here is a diagram in the category $\Set$ of sets which illustrates that framework:
\[ \boxed{ \begin{array} {} && 1 & \xrightarrow{\textstyle \boxed{b} \; (4.)} & U \\ && \big\uparrow && \big\uparrow \\ && 1 \rtimes U & \xrightarrow{ \smash{\textstyle b \rtimes U} } & U \rtimes U \rlap{ \xrightarrow [\smash{\kern15em}] { \smash{\textstyle \boxed{R} \; (2.)} } } &&&& \bftwo \\ && {\wr\Vert} && \Vert &&&& \Vert \\ && \llap{(1.) \;} U \rlap{ \xrightarrow[\kern27em]{\textstyle \hom b R -  \; (5.) } } &&&&&& \bftwo \\ 1 & \xrightarrow { \smash{\textstyle \; \boxed{b} \; (7.) \;} } & \Vert & {} \rlap{ \kern-3.4em \text{? predicate $\Irr_R$ below $R$-representable by $b$ (6.)?} } &&&&& \Vert \\ && \llap{ \boxed{\Irr_R} \; (3.) : {} } U & \leftadj{ \xrightarrow[\textstyle \lDelta]{\kern3em} } & U \rtimes U & \xrightarrow[\textstyle \boxed{R} \; (2.)]{\kern3em} & \bftwo & \rightadj{ \xrightarrow[\textstyle \rlnot] {\kern3em} } & \bftwo \\ && u & \leftadj\mapsto & \langle u,u \rangle & \mapsto & \hom u R u & \rightadj\mapsto & \lnot {\hom u R u} \\ \end{array} } \]
(The numbers in parentheses show a time sequence for building this diagram.)

Now we apply that general result in some special cases.
 

First, the barber “paradox”, sometimes phrased as

(A town (1.)) has (a barber (4.)) 
who ((shaves (2.)) all those, and only those (6.))
(who do not shave themselves ("the irreflexives") (3)).
Does (the barber (7.)) shave himself?
We can formalize this situation as follows:

  1. Let $\boxed U$ (for “universe”) be the population in question.
  2. Define a binary relation $\boxed\S$ on $U$ by $u\S v \iff u \mathrel{\text{shaves}} v$.
  3. Form (the irreflexivity predicate $\boxed{\Irr_S(u)} = \rlnot(u\S u)$ on $U$), in words, "$u$ does not shave himself".
  4. Let $\exists \boxed b\in U$ (the barber), the putative barber.
  5. Form the predicate $\hom b S -$, which characterizes the people whom $b$ shaves.
  6. Suppose that $\hom b S -$ represents $\Irr_S$, i.e. $(\forall u\in U)\bigl(b\S u \iff \lnot(u\S u)\bigr)$ - we may say "$\Irr_S$ is $\S$-representable by $b$", or, in the English language, "the barber shaves precisely those who do not shave themselves".
  7. Instantiate the above universal quantification at $b\in U$, obtaining
    $\boxed{ (b\S b) \iff \rlnot(b\S b) }$,
    a contradiction, since $\rlnot$ does have a fixed point, in particular, $(b\S b)$ is not a fixed point for $\rlnot$.
  8. Conclusion: There cannot exist a $b\in U$ which $S$-represents $\Irr_S$.
    In other words, such a barber cannot exist.
  9. However, such a barber can exist, if we strike the requirement that the barber be <i>in the town</i>, and allow him to be outside of the town, i.e. in a larger metropolitan area. Such a $b$ would be outside the scope of applicability of the universal quantification. This is the origin of the large/small distinction which permeates logical studies.

At a "meta"-level, we may note that there are three levels of language being used to describe this situation.

There is the level of category theory, see the diagram above.

I call this the "1-D" level.

Then there is the level of first-order logic, exemplified by such formula as "$(\forall u\in U)\bigl(b\S u \iff \lnot(u\S u)\bigr)$".

I call that the "0-D" level.

Finally, there is the English language.

Examples of that appear above.

<hr / >

It is also worth noting that the problem is caused by the bidirectional nature of the "if and only if";

that is, if we replace the "iff" with a one-directional implication, in either direction, 

that one-directional implication can be satisfied.

\[ \boxed{ \begin{array} {ccccc|cccccc}  \kern2em &  &  {} \rlap{ \kern-7em \text{if you don't shave yourself,} }  &&&&&& {} \rlap{ \kern-5em \text{if the barber shaves you,} }  \\ & & {} \rlap{ \kern-7em \text{then the barber shaves you} } &&&&&& {} \rlap{ \kern-6em \text{then you didn't shave yourself} }   \\   \hline & \lnot {(\hom x S x )} & \To & \hom b S x & \kern2em && \kern2em & \hom b S x & \To & \rlnot {(\hom x S x )}    \\   \hline  & \rlnot {(\hom b S b )} & \To & \hom b S b &&&& \hom b S b & \To & \rlnot {(\hom b S b )} & \kern2em & \red X     \\     & \bot && \rtop  &&&&& \bot    \\   &   & \rtop  \\  \hline & && &&&&\rlnot {(\hom b S b )}  & \To & \rlnot {(\hom b S b )} \\ & &&&&&& \rtop && \rtop \\ & &&&&&&& \rtop \\  \end{array}  }  \]  

The range of possibilities, and their consequences, can be presented by a Venn diagram or an old-fashioned truth table:

Venn diagram (annotated) for $ \big( b S x \iff \rlnot (x S x) \big) $:

\[ \boxed{ \begin{array} {} \kern8em && \lbot \buildrel \rtop \over \Rightarrow \rtop && \kern8em \\ & & \lbot \buildrel \lbot \over \Leftarrow \rtop \\ && \boxed{ \lnot ( \hom b S b ) } \\ \\ & {} \rlap{ \kern-6em \boxed{ \begin{array} {} \\ \rtop \buildrel \rtop \over \Leftrightarrow \rtop \\ \rtop \To \hom b S x & \kern6em \\ \\ \end{array} } } & \begin{array} {} \rtop \buildrel \lbot \over \Rightarrow \lbot \\ \rtop \buildrel \rtop \over \Leftarrow \lbot \\ \boxed{ \hom b S b } \\ \end{array} & {} \rlap{ \kern-6em \boxed{ \begin{array} {} \kern6em \\ \\ & \lbot \buildrel \rtop \over \Leftrightarrow \lbot \\ & \rtop \To \hom x S x \\ \\ \\ \end{array} } } \\ \\ \end{array} } \]

Truth table:

\[ \boxed{ \begin{array} {cccc|cc|cc}  \hom b S b &  \hom b S x  &  \hom x S x  &  \rlnot {(\hom x S x )}  &  [ \hom b S x \Rightarrow \rlnot {(\hom x S x )} ]  &  [ \hom b S x \Leftarrow  \rlnot {(\hom x S x )}  ]  &  \hom b S x \Leftrightarrow \rlnot {(\hom x S x )}  \\  \hline  \rtop &  \rtop  & \rtop  &  \lbot & \leftadj{ \boxed\bot } & \rtop & \lbot  \\ &  \rtop & \lbot & \rtop &  \rtop &  \rtop &   \rtop \\  &  \lbot   &  \rtop & \lbot  & \rtop & \rtop & \rtop  \\ \lbot &  \lbot & \lbot & \rtop & \rtop & \leftadj{ \boxed\bot }  & \lbot   \\   \end{array}  }  \]

The paradox can be understood in terms of that truth table.

There are three salient facts with regard to that table:

1) the truth values in the second and third columns are opposite,

2) the one-directional implications (in both directions) are between the first and third columns, 

3) if we let $x=b$, then the truth values in the first two columns must be identical, thus only the first and last rows of the table are relevant, and for those cases (rows) the truth values in the first and third columns are opposite.

In those cases (rows), precisely one of the one-directional implications is satisfied, not both.

Thus in either case, the truth value of the if-and-only-if is $\lbot$, i.e., "false".


The above argument was presented in classical first-order logic terms.

The argument may also be presented (in terms of category theory), via (a diagram in the category of sets).

(This diagram precisely duplicates the above diagram, except that the letter $R$, for an arbitrary relation, is replaced by the letter $S$, for "shaves".)

\[  \boxed{  \begin{array} {} && 1 & \xrightarrow{\textstyle b \; (3.)} & U  \\  && \big\uparrow && \big\uparrow  \\  && 1 \times U  &  \xrightarrow{ \smash{\textstyle b \times U} }  & U \times U  \rlap{  \xrightarrow [\smash{\kern15em}] { \smash{\textstyle S \; (2.)} }  }  &&&& \bftwo  \\  &&  {\wr\Vert}  && \Vert &&&& \Vert  \\    &&  U \rlap{ \xrightarrow[\kern27em]{\textstyle \hom b S -} }  &&&&&&  \bftwo  \\  1 & \xrightarrow { \smash{\textstyle \; b \;  (4.) \;} } & \Vert  &  {} \rlap{ \kern-2.8em \Irr_S \text{ $\S$-representable by $b$ (3.) ???} }  &&&&&  \Vert  \\    &\Irr_S \rlap{\; :} &  U &  \xrightarrow[\textstyle \lDelta]{\kern3em} & U \times U &  \xrightarrow[\textstyle S]{\kern3em} & \bftwo & \xrightarrow[\textstyle \lnot] {\kern3em} & \bftwo  \\   &&  u &  \mapsto &  \langle u,u \rangle  &  \mapsto  &  \hom u S u  &  \mapsto  &  \rlnot {\hom u S u}  \\  \end{array}  }   \]

The (categorical) point is that 

the hypothesized equality (3) that was questioned in "predicate below $\S$-representable by $b$ ???", 

when evaluated (4) at $b$, instantly gives a contradiction.

(The paranthesized numbers refer to the text above.)

It is useful to state what we just proved abstractly and mathematically:


Theorem:

Given (any binary relation $\boxed S$ on any set $\boxed U$), 

using $\lDelta$ and $\rlnot$ we may form (a predicate $\boxed{ (\text{Irr}_S = \lDelta S \rlnot) }$ on $U$) 

which cannot be $S$-represented (i.e., represented by $S$).

<hr />


Leaving (our categorical aside) and (returning to the main text), 

that is about as fast as it is possible to dispose of the original question.


It is instructive, however, to compare this proof that (such a barber cannot exist)
to the proof that (there cannot be a truly universal set, i.e., “the set of all sets”),
sometimes called “Russell’s paradox”.
Recall the proof that such a universal set cannot exist:

  1. Let $U$ ("the universe") be the set of all sets.
  2. Let $\text{Irr}_{\in} = \{u\in U \mid u \notin u \}$ (the irreflexives relative to ${\in}$)  (axiom schema of separation).
  3. Assume $\text{Irr}_{\in} \in U$.
  4. Consider the proposition: $\text{Irr}_{\in} \in \text{Irr}_{\in}$. Assume it is either true or false. Consider each alternative:
    $\text{Irr}_{\in} \in \text{Irr}_{\in} \xLongrightarrow{\text{defn $\text{Irr}_{\in}$}} \text{Irr}_{\in} \notin \text{Irr}_{\in}$.
    $\text{Irr}_{\in} \notin \text{Irr}_{\in} \xLongrightarrow{\text{defn $\text{Irr}_{\in}$}} \text{Irr}_{\in} \in\text{Irr}_{\in} $.
    Thus in either case we have a contradiction.
  5. Conclusion: $\text{Irr}_{\in}\subseteq U$, but $\text{Irr}_{\in} \notin U$.
  6. Thus the need for a larger universe, which includes both the members of the original universe $U$, and $\text{Irr}_{\in} = \{ u\in U \mathrel | u\notin u \}$.


As a slight variation, we can express the above argument as follows:

Let $U$ (for “universe”) be the population in question, the collection of all sets.

Consider the binary relation $\S$ on $U$ defined by $u\S v \iff u \in v$, 

i.e., $S$ is just a name for the membership relation in $U$.

Assume (the predicate $\lnot(u\S u)$ on $U$) is $\S$-representable, 

i.e., $\exists X \in U$ such that

$(\forall u\in U)\bigl(u\S X \iff \lnot(u\S u)\bigr)$ 

(this is (the comprehension scheme) applied to (the predicate $\lnot(u\S u)$ on $U$).

Instantiate the above universal at $X\in U$, obtaining

$\boxed{ \bigl(X\S X \iff \rlnot(X\S X)\bigr) }$,

a contradiction.


Conclusion: There cannot exist an $X\in U$ satisfying the condition asserted for $X$, i.e., $X= \{ u\in U | u\notin u \}$.

Thus, just as 

the barber who shaved all those in a town who did not shave themselves

cannot himself be a member of that town,

so $\{ u\in U | u\notin u \}$ cannot itself be a member of $U$,.

Thus the need for another universe to which it can belong.

And if we want the new universe to include the original "universe", our new universe must perforce be a larger universe.

We can express in words parts of the above.

$X = \{u\in U |  \rlnot (\hom u S u) \}$ is the set of $\{u\in U\}$ which do not self-$S$-relate, i.e., relate to themselves under $S$.

If that set $X = \{u\in U |  \rlnot \hom u S u \}$ is $S$-representable, 

then we have our contradiction as above.

<hr />

We can obtain a hybrid of those two proofs as follows:

  1. Let $U$ be the population in question.
  2. Define a binary relation $\S$ on $U$ by $u\S v \iff u \mathrel{\text{shaves}} v$.
  3. Let $X = \{u\in U \mid \rlnot(u\S u) \}$.
  4. Assume $X$ is representable by the relation $\S$, i.e.,
    $(\exists b\in U)(u\in X \iff b\S u)$, i.e.,
    $X = \{u\in U \mid b\S u\}$.
  5. Ask the equivalent questions:
    Does $b\S b$? (This is the barber question.)
    Is $b\in X$?
    We have
    $b\S b \iff b\in X \iff \rlnot(b\S b)$.
    A contradiction.
  6. Conclusion: Such a $b$ cannot exist, i.e.,
    $X = \{u\in U \mid \rlnot(u\S u)\}$ exists as a legitimate subset of $U$,
    but it is not representable by $\S$.

All that is much more than is necessary merely to prove that the hypothesized barber cannot exist,
but contains reasoning, in this simple setting,
that occurs in more complex situations.


We can extend this argument to prove a key result in set theory,
that any set is strictly smaller than its power set (the set of subsets of the original set).
In fact, this is the application in which Georg Cantor originally introduced this argument,
now commonly known as the "Cantor diagonal argument."

Rather than proving the theorem in the form stated above,
we use the result that, given a set $X$,
the set of its subsets is in bijection with (so is of the same size as)
the set of functions from $X$ to $2$.
So we prove that,
for any set $X$, $|X| \lt |2^X|$,
where $2^X = \{\,\text{functions}\, X\to 2\}$.
This is proved by showing that there cannot be a surjection from $X$ to $2^X$,
because the existence of such a surjection would lead to a contradiction.

  1. Let $X$ be a set in $\Set$.
    Let $2^X = \hom X \Set 2 = \{\,\text{functions}\, X\buildrel f \over \to 2\}$.
    Let \[\begin{array}{} X \times 2^X & \xrightarrow{\text{eval}} & 2\\ \langle x, f \rangle & \mapsto & xf = (x)f\\ \end{array}\] be the evaluation function.
  2. Suppose there exists a surjection $\boxed{X\buildrel \sigma \over \twoheadrightarrow 2^X}$.
    (We will draw a contradiction from this assumption.)
  3. The exponential transpose of the function $X\buildrel \sigma \over \twoheadrightarrow 2^X$
    is a relation, which we shall also call $\sigma$, $\boxed{X\times X \buildrel \sigma \over \to 2}$.
    The hypothesis that (the original function $\sigma$ was a surjection)
    is equivalent to (the following assertion about the relation $\sigma$):
  4. For each $X \buildrel f \over \to 2$, there exists an $x_0\in X$ such that
    $f = - \mathrel\sigma x_0$ (using $-$ as a placeholder for the missing variable),
    i.e., $\boxed{ xf \iff x \mathrel\sigma x_0 }$.
    (We call this condition “$\sigma$-representability”.)
  5. Apply this to the function $\Irr_\sigma : X\to 2$
    which takes $x\in X$ to $x\, \Irr_\sigma = \rlnot(x \mathrel\sigma x) \in 2$.
    By $\sigma$-representability, there exists an $x_0\in X$ such that
    $\rlnot (x \mathrel\sigma x) \iff x \mathrel\sigma x_0$.
    Take $x=x_0$ to obtain the contradiction.


$\def\P{{\bf P}} \def\twotoP{{2^{\P}}} $

This argument, with a little extra work, show that the real numbers are not countable,
or as it sometimes said, "denumberable."
To get this result we apply the above with $X=\P$, the set of positive integers $\{1,2,3,\ldots\}$.
Applying the above directly we have $\P \lt \twotoP$.

We can embed (produce an injection) of $\twotoP$ in $\R$: $\twotoP \buildrel i \over \rightarrowtail \R$.
The idea is $\twotoP = \{ \text{functions} \; \P \to 2\}$,
so its elements, e.g. $\P \buildrel a \over \to 2$ may be written as
sequences, $a_1, a_2, a_3, \ldots$, indexed by $\{1,2,3,\ldots\}$, of elements of $2$.
Further, we now regard our handy-dandy set $2$ as consisting, not of truth values
but of the integers $0$ and $1$.
Given a sequence $a_1, a_2, a_3, \ldots$ we map it to the real number $$.a_1a_2a_3\ldots = \sum_{n=1}^\infty a_n10^{-n} \in \R ,$$ so we have the injection \[\begin{array}{} \twotoP & \buildrel i \over \rightarrowtail & \R\\ \langle a_0, a_1, a_2, \ldots \rangle & \mapsto & .a_1a_2a_3\ldots = \displaystyle\sum_{n=1}^\infty a_n10^{-n} \end{array}\]

Now, we know there cannot be a surjection of $\P$ onto $\twotoP$
and it would seem intuitive that then there cannot be a surjection from $\P$ onto $\R$,
which is even larger.
However it is worth giving a detailed proof of that,
as it illustrates several ideas which are generally useful and significant.

Suppose there were a surjection $\P \buildrel e \over \twoheadrightarrow \R$.
Then consider the diagram \[\begin{array}{} & & \P \\ & & \twoheaddownarrow \rlap e \\ \twotoP & \buildrel i \over \rightarrowtail & \R \\ \end{array}\] Expand the diagram to: \[\begin{array}{} \twotoP \times_\R \P & \buildrel i' \over \rightarrowtail & \P \\ \llap{e'}\twoheaddownarrow & \raise8pt\hbox{$\lrcorner$}\qquad & \twoheaddownarrow \rlap e \\ \twotoP & \buildrel i \over \rightarrowtail & \R \\ \end{array}\] where $\twotoP \times_\R \P$ is the pullback of $i$ and $e$,
thus $\twotoP \times_\R \P = \{ n\in\P \mid ne \in (\twotoP)i \}$.
(The small $\lrcorner$ is the standard categorial notation indicating that
what is "inside" the corner is a pullback.)


<hr />


We now apply the basic set-theoretical result that, for all sets $X$, $\boxed{ X \buildrel \scriptscriptstyle \text{Cantor} \over \lt \big( 2^X = [X,2] \big) }$ (<i>strictly</i> less than) 

to obtain a basic result in the theory of categories:

<b>Theorem</b> (Mac Lane CWM Proposition V.2.3) $\def\bfA{{\mathbf A}}$

If a category $\bfA$ has <i>all</i> limits, no matter how large, 

then $\bfA$ is a preorder (i.e., for all $a,b \in \bfA$, there is at most one arrow in $\hom a \bfA b$ ).


Proof:

We argue by contradiction.

Suppose not.

Suppose for some $a, \rightcat b \in \bfA$ there are two distinct arrows $\boxed{ h,k : a \to \rightcat b }$ in $\hom a \bfA {\rightcat b}$, so $2 \cong \{h,k\} \subseteq \hom a \bfA {\rightcat b}$.

Thus for any set $X$, we have 

\[ \boxed{  \begin{array} {ccccccccccl} && 2 & \cong & \rightcat{ \{h,k\} } & \subseteq & \rightcat{ \hom {\leftcat a} \bfA b } &&&&&& \text{now apply} [X,-] : \Set\to\Set \\ && [X,2] & \cong & \rightcat{ [X,\{h,k\}] } &\subseteq & \rightcat{  [X, \hom {\leftcat a} \bfA {\rightcat b}]  }  & \rightadj{ \buildrel * \over \cong } &  \leftcat{   \hom a \bfA {  \rightadj{  (\prod_{\rightcat{x\in X}} {\rightcat b}) }  }   }  & \subseteq & \text{Arr}(\bfA) & \kern1em & \text{so, taking cardinalities,}  \\  |X| & \buildrel \text{Cantor} \over \lt & |[X,2]| & = & \rightcat{ |[X,\{h,k\}]| } &\le & \rightcat{  |[X, \hom {\leftcat a} \bfA {\rightcat b}]|  }   & \rightadj{ \buildrel * \over \cong } & \leftcat{  | \hom a \bfA { \rightadj{ (\prod_{\rightcat{x\in X}} {\rightcat b}) } } |   }   & \le & |\text{Arr}(\bfA)|  &&  \text{now take } X = \text{Arr}(\bfA)  \\   |{\text{Arr}(\bfA)}|  & \buildrel \text{Cantor} \over \lt & |[{\text{Arr}(\bfA)},2]| & = & \rightcat{ |[{\text{Arr}(\bfA)},\{h,k\}]| } &\le &  \rightcat{  |[\text{Arr}(\bfA), \hom {\leftcat a} \bfA {\rightcat b}]|  }  & \rightadj{ \buildrel * \over \cong } & \leftcat{  | \hom a \bfA { \rightadj{ (\prod_{\rightcat{f\in \text{Arr}(\bfA)}} {\rightcat b}) } } |   }  & \le & |\text{Arr}(\bfA)|   \\   \end{array}  } \]

Now recall the defining property of a categorical product, for $X$ a set (this is sometimes denoted $X \cotensor {\rightcat b}$, and called the <em>cotensor</em> of $X$ and $\rightcat b$, or <em>power</em> ${\rightcat b}^X$ of $\rightcat b$ by $X$):

$ \hom a \bfA { (\prod_{x\in X} {\rightcat b} ) } \cong [X, \hom a \bfA {\rightcat b} ]$.

Combining that property of the product with the above numerical inequality gives, for any set $X$, 

$|X| \lt |\hom a \bfA { (\prod_{x\in X} {\rightcat b}) }|$.

Now let $X = {\text{Arr}(\bfA)} $, the collection of<em>all<em> arrows in $\bfA$.

The result: 

$|\text{Arr}(\bfA)| \lt |\hom a \bfA { (\prod_{f \in \text{Arr}(\bfA)} {\rightcat b}) }|$,

But $|\hom a \bfA { (\prod_{f \in \text{Arr}(\bfA)} {\rightcat b}) }| \le |\text{Arr}(\bfA)|$, 

so $|\text{Arr}(\bfA)| \lt |\text{Arr}(\bfA)|$, clearly impossible.


We may sharpen the conclusion as follows:

If $\bfA,a, \rightcat b, h,k,X$ are as above, 

then a NECESSARY condition for $\prod_{x\in X} {\rightcat b} = {\rightcat b}^X$ to exist is that $|X| \lt |\text{Arr}(\bfA)|$.



The instance of the diagonal argument which is applicable here runs as follows:

If a function $\sigma : \text{Arr}(\bfA) \to [\text{Arr}(\bfA),2]$ is surjective, then there would have to exist an $f_0\in \text{Arr}(\bfA)$ such that \[ (\forall f \in \text{Arr}(\bfA)) \Big( (f_0 \sigmarel f) \iff  \neg (f \sigmarel f) \Big) \, .\] Then, in analogy to the previous cases, instantiating at $f_0$  deliverers a contradiction.



<hr />

Lawvere has generalized this by generalizing the role of the endofunction $\rlnot : 2 \to 2$.

\[ \boxed{    \begin{array} {cccc|cc}  2 & \xrightarrow [\kern 3em] {\textstyle \rlnot} & 2 \\  \Omega & \xrightarrow [\kern 3em] {\textstyle \rlnot} & \Omega    &&& (\forall \omega \in \Omega) (\rlnot\omega \not= \omega)   \\   Y & \xrightarrow [\kern 3em] {\textstyle t}  & Y   &&&   (\forall y \in Y) (yt \not= y)    \\   \end{array}   }    \]

i.e., each of $\rlnot$ and $t$ lack a <b>fixed point</b>,

i.e., in the parlance of combinatorial mathematics, each is a <I>derangement</I>.

\[ \boxed{ \begin{array} {} && 1 & \xrightarrow{\textstyle \boxed{b} \; (3.)} & U \\ && \big\uparrow && \big\uparrow \\ && 1 \times U & \xrightarrow{ \smash{\textstyle b \times U} } & U \times U \rlap{ \xrightarrow [\smash{\kern20em}] { \smash{\textstyle \boxed{R} \; (2.)} } } &&&& (\bftwo = \Omega = Y)    \\ && {\wr\Vert} && \Vert &&&& \Vert \\ && U \rlap{ \xrightarrow[\kern32em]{\textstyle \hom b R - \; (3.) } } &&&&&& (\bftwo = \Omega = Y) \\ 1 & \xrightarrow { \smash{\textstyle \; \boxed{b} \; (4.) \;} } & \Vert & {} \rlap{ \kern-3.4em \text{? predicate $\Irr_R$ below $R$-representable by $b$ (3.) ?} } &&&&& \Vert \\ && \llap{ \boxed{\Irr_R} : {} } U & \xrightarrow[\textstyle \lDelta]{\kern3em} & U \times U & \xrightarrow[\textstyle \boxed{R}]{\kern3em} & (\bftwo = \Omega = Y)  & \xrightarrow[\textstyle \rlnot = t] {\kern3em} & (\bftwo = \Omega = Y)   \\ && u & \mapsto & \langle u,u \rangle & \mapsto & \hom u R u & \mapsto & \rlnot {\hom u R u} = ({\hom u R u})t  \\ \end{array} } \]

Consider $\Irr_R = \lDelta R \rlnot$, the bottom long left-to-right arrow, which starts at $U$. 

The question is: 

Can (that arrow) be $R$-represented by (an object $b$)?

If so, we have (an arrow $\hom b R -$ as above it), 

and (an equality between those two arrows)

But then, precomposing (that pair of parallel arrows) with (the representing object $b$), 

we find (a fixed point for $t$), 

namely, ($\hom b R b \cong {(\hom b R b )} t$).

This is Theorem 6.5 of Noson S. Yanofsky, <I>Theoretical Computer Science for the Working Category Theorist</I>.

The earlier examples, the barber, Russell, and Cantor "paradoxes", use the contrapositive of this:

If $t: Y \to Y$ does not have a fixed point, 

 then $\Delta R t$ is not $R$-representable.

Specifically, they take $t: Y \to Y$ to be $\rlnot : 2 \to 2$.

Since $\rlnot \rtop = \lbot$ and $\rlnot \lbot = \rtop$, 

$\rlnot$ does not have a fixed point.

<hr>

------------

Here are some useful references:

Yanofsky's excellent 23-page paper: 

"A Universal Approach to Self-Referential Paradoxes Incompleteness and Fixed Points",

http://arxiv.org/abs/math/0305282

which is both introductory and comprehensive!


John Baez:


https://golem.ph.utexas.edu/category/2006/12/classical_vs_quantum_computati_8.html


Vishal Lama:

https://topologicalmusings.wordpress.com/2010/07/11/self-referential-paradoxes-incompleteness-and-fixed-points/


<hr>

-----------

What is below is an alternative approach to the paradoxes.

I have a choice on how to present this.

I could present the usual "paradox", which involves negation at two levels.

Or I could initially just present the kernel of the argument, the "positive version", which does not use negation, and replaces

the familiar truth-value set $2 = \{\lbot,\rtop\}$

(with its logical negation endofunction $\rlnot: 2\to 2$)

with an arbitrary set, say $\boxed Y$ 

(with an arbitrary endofunction on $Y$ called in various sources $\boxed{t:Y\to Y}$ or $\boxed{\alpha:Y\to Y}$ ).

Then, from that positive version, the usual version of the paradoxes can be derived, 

 by introducing negatives, in three steps, at two levels.

So let us begin with a diagram which illustrates the positive version.

\[ \boxed{ \begin{array} {} && \langle b,b \rangle && \hom b R b \\ && \langle x,x \rangle && \hom x R x \\ && X\times X & \xrightarrow {\textstyle R} & Y \\ && \llap \lDelta \Bigg\uparrow & \Big |\Big | \rlap{  \scriptstyle \kern-3.7em \text{representation} } & \Bigg\downarrow \rlap{t \text{ or } \alpha} \\ 1 & \xrightarrow [\textstyle x,b] {\kern3em} & X & \xrightarrow [\textstyle \hom b R -] {\kern3em} & Y \\ &&&&& \boxed{ \begin{array} {ccl} {\hom x R x}\alpha & \rightadj{ {\hom b R b}\alpha } & \text{top leg} \\ || & \rightadj{ || } \\ \hom b R x & \rightadj{ \hom b R b } & \text{bottom leg} \\ \text{representation at $x$} & \rightadj{ \text{representation at $b$} } \\ \end{array} } \\ \end{array} } \]

Thus we see that

IF $\hom b R -$ equals $\lDelta R \alpha$ (i.e., $b$ $R$-represents $\lDelta R \alpha$)

THEN $\rightadj{ \hom b R b}$ is a $\rightadj{ \text{fixed point} }$ for $\alpha$.


1. Now consider the case $ \alpha = \rlnot : 2\to2$. (This is internal to the category $\Set$.)

2. $\rlnot$ has NO fixed points. (This statement, and the next, are ABOUT the category $\Set$, not internal to it.)

3. Thus $\lDelta R \rlnot$ CANNOT be $R$-represented.

One now obtains the various diagonal "paradoxes", 

e.g. the barber and Russell paradoxes,

by suitable selection of the set $X$ (or $U$), and the relation $R$ (or $S$) on it.

<hr /> 


Thursday, July 27, 2023

A categorical setting for elementary probability theory

(Early draft; I will be expanding this in the future.)

The basic idea is this:
Given a finite set $X$ and a subset $A\subseteq X$, 
we may regard the ratio of the size of $A$ to the size of $X$ 
as being the <I>probability</I> 
that a randomly chosen element of $X$ will be in $A$.

Thus given $A$ and its superset $X$, 
we have not only 
the inclusion relation between $A$ and $X$, which we may regard as being an arrow in the usual category $\Set$ of sets and functions, 
but also 
the positive rational number $\boxed{ |A| \over |X| }$, a number often called by probabilists <I>the probability of $A$</I> 
(when $X$ is assumed known).
Now, the positive rational numbers in fact form the objects of a discrete closed monoidal category (under multiplication) (details below).
Thus the above allows us to view the collection of sets as being the objects of an enriched category, enriched in the discrete closed monoidal category of positive rational numbers.

<hr />

That covers the notion of absolute probability. 
Let us now consider the notion of relative or conditional probability.

Suppose $X$ contains two sets, $A$ and $B$.
We may ask:
If $A$ is true, what is the probability that $B$ is true, 
and visa versa.
We may also ask:
What is the relation between those two probabilities (the equation that gives that is called "Bayes Theorem").

Let us depict this situation with a diagram;

\[ \boxed{ \begin{array} {} & A\cap B & \xrightarrow{ \textstyle{ A\cap B \over B } } & B & \\ & \llap{ A\cap B \over A } \Bigg\downarrow & \llap{ \scriptstyle \text{Bayes} } \nearrow \rlap{ {A \over B} } & \Bigg\downarrow \rlap{ {B \over X} } & \\ & A & \xrightarrow[ \textstyle{ A \over X } ]{} & X \\ \end{array} } \]

In the diagram,
at the vertices, the symbols $X, A, B, A\cap B$ denote <I>sets</I>;
when labelling arrows, they denote <I>positive integers</I>, viz the number of elements in the set, often denoted e.g. $|A|$.
Thus the ratios shown are ratios of positive integers, thus rational numbers.

Thus in the diagram
the bottom and right arrows give the absolute probabilities of $A$ and $B$ respectively,
The left arrow gives the relative or conditional probability of $B$ relative to $A$;
the top arrow gives that of $A$ relative to $B$. 
The commutativity of each triangle follows from elementary algebra. 
The commutativity of the upper left triangle, when interpreted in terms of probabilities, is Bayes Theorem:
\[ P(A|B) = P(B|A){P(A) \over P(B)} \]

Another example: 
A bipartite partition $A,B$ of $X$ together with a. third sunset $W$.
Note that we have changed notation so that $A,B$ form the two parts of the bipartite partition.
We will diagram this situation as:

\[ \boxed{ \begin{array} {} {} \rlap{ \kern-3em {A\cap W \over A} {A\over X} +  {B\cap W \over B} {B\over X} \xlongequal{\text{cancel}} {A\cap W \over X} + {B\cap W \over X} \xlongequal{\text{distribute}} {(A\cup B)\cap W \over X } \xlongequal{A\cup B = X} {W\over X} } \\ \\ \hline \\ \kern5em & A\cap W & \xrightarrow{ \textstyle{A\cap W \over W} } & W & \xleftarrow{ \textstyle{B\cap W \over W} } & B\cap W & \kern5em \\ & \llap{ A\cap W \over A } \Bigg\downarrow && \Bigg\downarrow \rlap{ W \over X } && \Bigg\downarrow \rlap{ B\cap W \over B } & \\ & A & \xrightarrow[ \textstyle{A \over X} ] {} & X & \xleftarrow[ \textstyle{B \over X} ] {} & B & \\ \end{array} } \]

In several of the examples in the chapter on conditional (or relative) probability in <I<Fat Chance</I>, 
we are given:
0. The numerical value for the bottom two arrows and the two side arrows.
From those values we may compute (setting $|X| = 1$):
1. The numerical values of the upper two corners $A\cap W, B\cap W$.
2. Using the fact that those last two form a partition of $W$ (the pullback of a partition is a partition), we add those last two values to get $|W|$.
3. Now that this is known, we may compute any and all of the three remaining conditional probabilities given by the three remaining arrows.

Such diagrams are useful in displaying numerical information associated with probability situations.
For example, consider the "Monty Hall" situation described in Section 9.1 of <I>Fat Chance</I>.
(And whose precise assumptions are emphasized here:
https://en.wikipedia.org/wiki/Monty_Hall_problem#Standard_assumptions )
The various expressions mentioned in the book are shown in this diagram:
\[ \boxed{ \begin{array} {} \kern8em & A\land W & \xrightarrow{  } & W & \xleftarrow{ } & B\land W & \kern9em \\ & \llap{ P(W|A) = {k-1 \over n-2} } \Bigg\downarrow &&  && \Bigg\downarrow \rlap{ P(W|B) = {k \over n-2} } & \\ & \llap{ \text{your guess is right} = {} } A & \xrightarrow[ \textstyle{ P(A) = {k \over n} } ] {} & X & \xleftarrow[ \textstyle{ P(B) = {n-k \over n} } ] {} & B \rlap{ {} = \text{ your guess is wrong} } & \\ &&& {} \rlap{\kern-10em X = \text{set of doors;} \; |X| = n = \text{number of doors;} \; k = \text{number of cars} } \\ \end{array} } \]
To get the original, basic, Monty Hall situation, take $n=3$, $k=1$.

Saturday, July 8, 2023

Bayes' Theorem -- relations between ratios

This is a preliminary draft.
$\def\bA{{\blue A}} \def\gB{{\green B}}$

First, we give a diagrammatic version of the Bayes situation, 
using the abstract letters $\bA$ and $\gB$ for two subsets of the larger, but finite, set $X$:

\[ \boxed{ \begin{array} {} && \bA \rlap{ \blue{ \xrightarrow [\kern9em] {\textstyle {A \over \black X}} } } &&&& X \\ & \blue{ \llap{ A \cap \gB \over A } \nearrow } \rlap{ \scriptstyle \kern.8em \red{\text{Bayes}} } && \searrow \rlap{\bA \over \gB} && \green{ \nearrow \rlap{ B \over \black X } } \\ \rightadj{ \boxed{\bA \mathrel{\rightadj \cap} \gB} } \rlap{ \green{ \xrightarrow [\textstyle {\bA \mathrel{\rightadj \cap} B \over B} ] {\kern9em} } } &&&& \gB \\ \end{array} } \]

Here the expressions $\bA, \gB, \bA \mathrel{\rightadj \cap} \gB, X$, 
when they are <I>vertices</I> of the diagram, represent sets, 
and the arrows between them represent set-theoretic inclusion.
On the other hand, 
when those expressions are part of <I>the labels</I> of the arrows of the diagram, 
they represent the natural numbers which are the number of elements in the corresponding set.
Thus the quotients shown are either absolute or relative (i.e., conditional) probabilities:
the two shown arrows going into $X$ are labeled with <I>absolute</I> probabilities, 
while the two shown arrows going out of $\bA \mathrel{\rightadj \cap} \gB$ are labeled with <I>relative</I> or <I>conditional</I> probabilities.

Now we present Bayes' theorem as it is traditionally stated, using only  numbers and elementary algebra.
In its simplest, clearest, form, it is the top equation, Bayes-0, (which is trivially true) in the box below.
{For the time being, ignore the lower equation; 
it differs from the top equation only in notation and a trivial equality.)

\[ \boxed{  \begin{array} {ccccc|l}  {H \cap D \over D} & \xlongequal{\text{Bayes-0}} & {H \cap D \over H} & \times & \red{ {H \over D} } & \text{ numbers} \\ \\ \hline \\ P(H|D) & \xlongequal{\text{Bayes}}  & P(D|H) & \times & \red{ P(H) \over P(D) } & \text{ (sub)sets or properties} \\  \end{array}  }  \]

That's it! That bit of very elementary algebra  
(which we might call "the switch of denominators, i.e. contexts", relative to ${H\cap D}$)  
in the top line, Bayes-0,
is the essence of Bayes' Theorem.  

What remains is to explain how that relates to the setup for, and traditional statement of, Bayes' Theorem.
I.e., what it all means.


Here is the setup for the situation. 
For concreteness, we will consider a special case of the general situation which is easily understood.

Suppose we have a population, a specific group of Americans.
We poll them and ask two questions of them: are you a Democrat (a member of the Democratic Party), and are you a homosexual?
We will call the set of people self-describing as Democrats set $\boxed D$, and similarly we let set $\boxed H$ consist of those who self-describe as homosexuals.
We also, for simplicity, let the symbols $D$ and $H$ denote the number of individuals in each set.
The context should make clear whether the symbol denotes a set or a number.

Next we have the intersection $H \cap D$ of sets $D$ and $H$, consisting of those individuals who described themselves as both Democrats and homosexual.
We denote this set by $\boxed{ H\cap D }$. So $H \cap D$, is the set of homosexual Democrats.
Again,  $H\cap D$ will also denote the number of individuals in that set.

With that setup and those definitions out of the way, we can now pose some questions. 

1. What fraction of the Democrats are homosexual? The answer is easy, it is the fraction $H\cap D \over D$.

2. What fraction of the homosexuals are Democrats? The answer is again easy, it is the fraction $H\cap D\over H$.

3. What relation, if any, is there between those two fractions?
The answer is given in the boxed equation Bayes-0 above (whose proof is a triviality), which is called "Bayes' Theorem".

4. What is the use of this equation? Well, if you know any two of those three ratios, it shows the third is determined, and gives you an easy way to calculate it.

Let us illustrate this with a hypothetical numerical example. 
Suppose 80% of homosexuals were Democrats, so ${H\cap D  \over H} = .8$, and
the ratio of Democrats to ALL homosexuals (20% of whom are not Democrats) was 10 to 1, so $\red{ {H\over D} = .1 }$. 
Then, instantiating the equation Bayes-0 with these two assumptions, we get 
\[ \boxed{ \begin{array} {} {H\cap D \over D} & \xlongequal{\text{Bayes-0}} & {H\cap D \over H} & \times & \red{ {H \over D} } \\ \\ \hline \\  {H\cap D \over D} & \xlongequal{\text{Bayes-0}} & .8 & \times & \red{.1} & = & .08 \end{array}  } \]
i.e. our two assumptions imply 8% of Democrats are homosexual.

For a diagrammatic presentation (with some possible numbers for population sizes), see
\[ \boxed{ \begin{array} {} H = 10 & \xleftarrow{ \textstyle {H\cap D \over H} = .8 } & H\cap D = 8 \\ \downarrow & \red{ \searrow \rlap{ {H\over D} = .1 } } & \downarrow \rlap{ {H\cap D \over D} = .08 } \\ X & \xleftarrow{} & D = 100 \\ \end{array} } \]
You can visualize this geometrically.
Imagine a strip divided into three regions.
The first is two units long.
The second is eight units long.
The last is 92 units long.
Let $H$ be the union of the first two parts,
$D$ the union of the last two parts.
Then $H\cap D$ is the second part.
\[ \color{lightpink} { H=10 \atop \Rule{10mm}{5mm}{0mm} } {} \rlap{ \kern-6mm 8 } {} \rlap{ \color{blue} { \kern-10mm \lower5ex { \Rule{100mm}{5mm}{0mm} \atop D=100 } } } \]
(This is a form of Venn diagram.)

So under our two assumptions we have
80% of homosexuals are Democrats, while 
8% of Democrats are homosexuals.
Further, these two statistics IMPLY the ratio of Democrats to homosexuals is 10 to 1, 
since any two of the ratios in the Bayes equation determine the third.

The fact that we want to stress is:
If 80% of homosexuals are Democrats, 
that DOES NOT imply that
80% of Democrats are homosexuals. 
I.e., you can't invert conditional probabilities.
In words, the fact that $H\cap D$ is quite large relative to $H$ (80% in our hypothetical example) says nothing about how large $H\cap D$ is relative to $D$. 
That depends entirely on the ratio of $D$ to $H$.
Precisely, Bayes Theorem says:
\[ \boxed{ \begin{array} {}  { {H\cap D}/H \over {H\cap D}/D } &  \xlongequal {\text{Bayes-0}} & \red{ {D \over H} } \\ \\ \hline \\ {80\% \over 8\%} & \xlongequal {\text{Bayes}}  & \red{ {10 \over 1} } \\  \end{array}  } \; . \]

There is a folk saying related to this phenomenon:
"A big fish in a small pond versus 
a small fish in a large pond."
Here clearly $H\cap D$ (the homosexual Democrats) is (are) the "fish", 
while the "small pond" and "large pond" are respectively the homosexuals and the Democrats.
Bayes theorem states the relation between the various ratios involved, 
the fish to each pond, and between the ponds.
To put it in common sense terms:
If you know the ratio of the pond sizes, 
and the fraction of the small pond the fish takes up, 
then you can easily calculate the fraction of the large pond it would take up.
E.g.,
if the fish is half of the small pond, 
and the large pond is three times the size of the small pond, 
then the fish would be $1/6$ of the large pond.

For another, perhaps hypothetical, example, 
if 90% of men with prostate cancer have high levels of PSA, 
that DOES NOT imply that
90% of men with high levels of PSA will get prostate cancer.

There is a geometrical way of viewing this situation.
Imagine two rectangles, one with its long side horizontal, labeled $H$, 
and one with its long side vertical, labeled $V$.
Suppose they have some overlap, i.e., a non-empty intersection, labeled $H\cap V$.
Again, we let the same label stand for both 
the designated geometric region (a set of points) and 
its area (a number).

Considering the three numbers, i.e. the areas, 
as before we have the three ratios and the simple relation between those ratios

\[ \boxed{ \begin{array} {} H\cap V \over V & \xlongequal{\text{Bayes}} & H\cap V \over H & \times & \red{ {H \over V} } \\ \\ \hline \\ P(H|V) & \xlongequal{\text{Bayes}} & P(V|H) & \times & \red{ P(H) \over P(V) } \\ \end{array} } \]

relating the ratios of their areas.
In fact, this same equation applies to any two measurable regions with a measurable intersection, but it is easier to visualize for rectangles.


For the general situation, 3Blue1Brown has a good elementary discussion:

https://youtube.com/watch?v=HZGCoVF3YvM

Here we instantiate our original presentation of Bayes' Theorem into an instance relevant to that video.
Here $L$ = the set of librarians (or the number of such), and $B$ = the set of book-lovers (or the number of such).
\[ \boxed{ \begin{array} {ccccc|l} {B \cap L \over L} & \xlongequal{\text{Bayes-0}} & {B \cap L \over B} & \times & \red{ {B \over L} } & \text{ numbers} \\ \\ \hline \\ P(B|L) & \xlongequal{\text{Bayes}} & P(L|B) & \times & \red{ P(B) \over P(L} ) & \text{ (sub)sets or properties} \\ \hline \text{high} && \text{low} & \times & \red{\text{large}} & \text{ qualitative description} \\ \hline .8 & = & .016 & \times & \red{50} & \text{ made-up, but plausible, numbers} \end{array} }  \]
Here we repeat our original description of Bayes' Theorem, but using the notation of that video, and introduce the terminology it uses for various parts of the equation. 
Here $H$ = hypothesis, $E$ = evidence.

\[ \boxed{  \begin{array} {ccccc|l}  H\cap E \over E & \xlongequal{\text{Bayes-0}} & H\cap E \over H & \times & \red{ H \over E } & \text{ numbers} \\ \\ \hline \\ P(H|E) & \xlongequal{\text{Bayes}}  & P(E|H) & \times & \red{ P(H) \over P(E) } & \text{ (sub)sets or properties} \\ \hline \text{posterior} & \xlongequal{\text{Bayes}} & \text{likelihood} & \times & \red{ \text{prior} \over {} \text{evidence} } & \text{ descriptive words} \end{array}  }  \]

There is also a five minute video:

https://youtu.be/XQoLVl31ZfQ

-----

Diagrams in preliminary states:

\[ \boxed{ \begin{array} {} \kern2em & {} \rlap{ \xrightarrow [\kern8em] {L\cap B = 8}  } && \kern1em && {} \rlap{ \xrightarrow [\kern8em] {L=10} } \\ && \llap{L = 10} \searrow && \llap{ {L \cap B \over L} \kern-.5em } \nearrow & \kern1em {} \rlap{ \lower3ex{ \scriptstyle \kern-2em \text{Bayes-0} } } & \llap{ {L \over B} \kern-.5em } \searrow && \nearrow \rlap{ B = 500 } & \kern4em \\ &&& {} \rlap{ \xrightarrow [ .016 = {8 \over 500} = {L \cap B \over B } = P(L|B) ] {\kern8em} } &&&&  \\  \end{array} } \]

\[ \boxed{ \begin{array} {} && \green{B \cap L = 4}  \\  & \green{ \llap{ \boxed{{L\over B\cap L } = {10\over 4} = 2.5 } } \swarrow } && \red{  \nwarrow \rlap { {B\cap L \over B\cap F} = {4\over 20} } } \\  \green{ \boxed{L = 10} } &    & \green\downarrow &&   \\  && & &&  \\ \green\downarrow & \red{ \nwarrow \rlap{ \scriptstyle {L\over F} = {10\over 200} } } & B & \xleftarrow {} & \green{B \cap F = 20} \\ & \swarrow && \swarrow \rlap{ \boxed{{F\over B\cap F} = {200\over 20} = 10} } \\ X & \xleftarrow{} & \boxed{F = 200} \\ \end{array} } \]
An equation:
\[ \boxed{ \begin{array} {} \red{4\over 20} & = & \green{4\over 10} & \times & \red{10\over 200} & \times & {200\over 20} \\ \hline  \red{B\cap L \over B\cap F} & = & \green{B\cap L \over L} & \times & \red{L \over F} & \times & {F \over B\cap F} \\ \hline & = & {{B\cap L} / L} \over {{B\cap F} / F} & \times & \red{L \over F}  \\ \hline & = & {4/10} \over {20/200} & \times & \red{10 \over 200} \\ \hline & = & 4 & \times & \red{1 \over 20} \\ \end{array} } \]

Two bipartite partitions of a set, say $X$, yields this diagram:

The general case, say $X=A+B$ and $X=W+L$:
\[ \boxed{ \begin{array} {} \kern1em & A\cap W & \xrightarrow{ \textstyle {A\cap W \over W} } & W & \xleftarrow{ \textstyle {B\cap W \over W} } & B\cap W & \kern1em \\ & \llap{ A\cap W \over A } \Bigg\downarrow & \raise1ex{ A\cap W \over X } & \Bigg\downarrow \rlap{ W\over X } & \raise1ex{ B\cap W \over X } & \Bigg\downarrow \rlap{ B\cap W \over B } & \\ & A & \xrightarrow { \raise0ex{ \smash{ \textstyle{ A\over X } } } } & X & \xleftarrow { \raise0ex { \smash{ \textstyle{B\over X} } } } & B & \\ & \llap{ {A\cap L \over A} } \Bigg\uparrow & A\cap L \over X & \Bigg\uparrow \rlap{ L\over X } &  B\cap L \over X & \Bigg\uparrow \rlap{ B\cap L \over B } & \\ & A\cap L & \xrightarrow [ \textstyle{A\cap L \over L} ] {} & L & \xleftarrow [ \textstyle{B\cap L \over L} ] {} & B\cap L & \\ \end{array} } \]

For the special case in Section 9.4 of <I>Fat Chance</I>, A=Left, B=Right and W=Tracy, L=Paul, 
we get this diagram:
\[ \boxed{ \begin{array} {} \kern4em & T\cap L = 15 & \xrightarrow{} & T = 47 & \xleftarrow{} & T\cap R = 32 & \kern4em \\ & \llap{ \boxed{ {T\cap L \over L} = {3\over 4} } } \Bigg\downarrow && \Bigg\downarrow && \Bigg\downarrow \rlap{ \boxed{  {T\cap R \over R} = {2\over 5} } }  & \\ & L = 20 &  \xrightarrow { \raise2ex{  \smash{ \boxed{  {L\over X} = {1\over 5} = .2 } } } } & X = 100 &  \xleftarrow { \raise2ex { \smash{ \boxed{ {R\over X} = {4\over 5} = .8 } } } } & R = 80 & \\ & \llap{ \boxed{ {P\cap L \over L} = {1\over 4} } } \Bigg\uparrow && \Bigg\uparrow && \Bigg\uparrow \rlap{ \boxed{ {P\cap R \over R} = {3\over 5} } }  & \\ & P\cap L = 5 & \xrightarrow{} & P = 53 & \xleftarrow{} & P\cap R = 48 & \\ \end{array} } \]

--------

The following pertains to the video https://youtu.be/R13BD8qKeTg .

The situation is this:
There is a certain disease $\boxed H$, and a certain test $\boxed E$ for that disease.
(See below for the letters.)

You have been tested for the disease,
and tested positive.
But that doesn't necessarily mean you have it - the test is not a perfect indicator. 
Some people without the disease test positive (false positives). $\lnot H \land E = E-H$.
And some people with the disease will not be detected by the test (false negatives). $H \land \lnot E = H-E$.
If the test were a perfect indicator we would have $H=E$ and both the above differences would be zero (or empty).

To analyze this situation,
let $\boxed H$ be the <I>hypothesis</I>, that you have the disease. Also the number representing the probability that you have it, that is, the fraction of the general population that has it.
Let $\boxed E$ be the <I>evidence</I>, that you tested positive under the test.
Also the number representing the probability that a general member of the population will test positive in that particular test.

So clearly what we are interested in is $\boxed{P(H|E) = {H\land E \over E}}$, that is, if you tested positive in that particular test (the E), what is the probability that you actually have the disease (the H)?

In the video, the narrator gives three items of numerical information (numbers), using words to describe what those numbers mean:

$\boxed{P(H) = .001 = {1 \over 1000}}$ = fraction of people with the disease.
$\boxed{P(E|H) = {H\land E \over H} = .99 = {99\over 100}}$ = fraction of those with the disease who test positive = the rate of valid positives.
$\boxed{P(E|\lnot H) = {\lnot H \land E \over \lnot H} = .01 = {1\over 100}}$ = fraction of those without the disease who test positive = the rate of false positives.
That is all he tells you.
Those are the knowns.
Note that the last two tell you what the testing probabilities will be IF you know whether you have the disease or not.
I.e. they are backward from what we want : to go from test result to disease probability.

From that we infer 
$P(\lnot H) = 1-P(H) = 1-.001 = .999$ (the fraction without the disease).

Now let's see how we can use that information to solve the problem, 
i.e. calculate P(H|E).

First we must calculate P(E):
\[ \begin{array} {} P(E) & = && P\big( E\land {(H\lor \lnot H)} \big) \\ & = && P\big( {(E\land H)} \lor {(E\land \lnot H)} \big) \\ & = & P(E\land H) & + & P(E\land{\lnot H}) \\ & = & \boxed{P(E|H)}\,\boxed{P(H)} & + & \boxed{P(E|\lnot H}\,P(\lnot H) \\ & = & \boxed{.99} \times \boxed{.001} & + & \boxed{.01} \times .999 \\ & = & .00099 & + & .00999 \\ && \text{valid positives} && \text{false positives} \\ & = && .01098 \\ & \sim && 1.1\% \\ &&& \text{all positives} \\ \end{array} \]

With that calculation out of the way, now we may apply the simple, basic Bayes' Theorem to get the answer:

First a little recall:
Again, $H$ = hypothesis = you have the disease, 
$E$ = evidence = your test returned positive.

\[ \boxed{ \begin{array} {ccccc|l} H\cap E \over E & \xlongequal{\text{Bayes-0}} & H\cap E \over H & \times & \red{ H \over E } & \text{ numbers} \\ \\ \hline \\ P(H|E) & \xlongequal{\text{Bayes}} & P(E|H) & \times & \red{ P(H) \over P(E) } & \text{ (sub)sets or properties} \\ \hline \text{posterior} & \xlongequal{\text{Bayes}} & \text{likelihood} & \times & \red{ \text{prior = hypothesis} \over {} \text{evidence} } & \text{ descriptive words} \\ \\ \hline \\ P(H|E) & \xlongequal{\text{Bayes}} & .99 & \times & \red{ .001 \over .01098 } & \\ &  = & .99 & \times & \red{ 1 \over 10.98 } \\ & \sim & .99 & \times & \red{ 1 \over 11 } \\ &  = & .09 \\ & = & 9\% \\ \end{array} } \]
And that is the answer the narrator gives, but we went through the details, 
and found the various intermediate results, which have their own  interest.
-----------------
Let us put some of the above information in a diagram, where the information provided by the narrator is given in boxes:

\[ \begin{array} {} && \text{valid positives} && \leftadj{ \text{all positives} } && \text{false positives} \\ && H\land E \atop P(H\land E) = {99\over100,000} \sim {1\over1,000} & \xrightarrow [{99\over\leftadj{1,098}} \sim {1\over\leftadj{11}}] { H\land E \over \leftadj E} & \leftadj{ E \atop P(E) = {(\blue{99}+\blue{999})=1,098\over100,000} \sim {11\over 1,000} } & \xleftarrow [{999\over\leftadj{1,098}} \sim {10\over\leftadj{11}}] { \lnot H\land E \over \leftadj E} & \lnot H \land E \atop P(\lnot H \land E) = {999\over100,000} \sim {1\over100} = {10\over1,000} \\  && \llap{\text{rate of valid positives} \; \boxed{ {H\land E \over H} = {99\over100} } } \Bigg\downarrow &&&& \Bigg\downarrow \rlap{ \boxed{ {\lnot H \land E \over \lnot H} = {1\over100} } \; \text{rate of false positives} } \\  && \boxed{ H \atop P(H) = .001 = {1\over1000} = {100\over100,000} } &&&& \lnot H \atop P(\lnot H) = .999 = {999\over1000} = {99,900\over100,000} \\ && \text{have the disease} &&&& \text{don't have the disease} \\  \end{array} \]

Here the input parameters are varied to consider another case 
(where the test is much more successful), 
where the test is 100% successful on those who have the disease, 
but for those who don't have the disease, fails only $1\over1K$ of the time:


\[ \begin{array} {} && \text{valid positives} && \leftadj{ \text{all positives} } && \text{false positives} \\ && H\land E \atop P(H\land E) = {1\over 1K} = {1K\over 1M} & \xrightarrow [{1K\over \leftadj{1,999}} \sim {1\over{\leftadj2}}] {H\land E \over \leftadj E} & \leftadj{ E \atop { P(E) = {(\blue{1K}+\blue{999} = 1,999)\over1M} \sim {2K\over1M} = {2\over1K} } } & \xleftarrow { \lnot H\land E \over \leftadj E} & \lnot H \land E \atop P(\lnot H \land E) = {999\over1M} \sim {1K\over 1M} \\ && \llap{ \text{rate of valid positives} \; \boxed{ {H\land E \over H} = 1 } } \Bigg\downarrow &&&& \Bigg\downarrow   \rlap{ \boxed{ {\lnot H \land E \over \lnot H} = {1\over1K} = .001 } \; \text{rate of false positives} } \\ && \boxed{ H \atop P(H) = .001 = {1\over 1K} } &&&& \lnot H \atop P(\lnot H) = .999 = {999\over 1K} \sim 1 \\ && \text{have the disease} &&&& \text{don't have the disease} \\ \end{array} \]

Let us now tackle the issues of independence and correlation, whether positive or negative.
Here are several equivalent formulations of <I>positive correlation</I>, showing the symmetry of the formulations.
For <I>negative correlation</I> or <I>independence</I>, 
merely replace $\lt$, shown here in vertical mode as $\vee$, 
by $\gt$ or $=$.

\[ \boxed{ \begin{array} {ccccc|ccccccccc|ccccc} {H\cap D  = HD \over H} & = & {8\over10} & = & {4\over5} & \bA \cap \gB \over \bA &&  {\bA \cap \gB \over \bA} \times {\bA \over X} & = & \bA \cap \gB \over X & = &  {\bA \cap \gB \over \gB} \times {\gB \over X} &&  \bA \cap \gB \over \gB & {H\cap D = HD \over D} & = & {8\over100} & = & {2\over25} \\ \vee & \iff & \vee & \iff & \vee & \vee & \iff & \vee & \iff & \vee & \iff & \vee & \iff & \vee & \vee & \iff & \vee & \iff & \vee \\ {D\over X} & = & {100\over200} & = & {1\over 2} & \gB \over X && {\bA \over X} \times {\gB \over X} & = & {\bA \over X} \times {\gB \over X} & = &   {\bA \over X} \times {\gB \over X} &&  \bA \over X & {H\over X} & = & 10\over200 & = & 1\over20 \\ \hline &&&&& {(\bA\cap\gB)/\bA} \over \gB/X &&&&  (\bA\cap\gB)/X \over (\bA/X) \times (\gB/X) &&&& {(\bA\cap\gB)/\gB} \over \bA/X &&&&& 2/25 \over 1/20 \\ &&&& 8\over5 &&&&& (\bA\cap\gB) \times X \over \bA \times \gB &&&&&&&&& {40\over25} = {8\over5} \\ \end{array} } \]

In the above box, note that
the leftmost general inequality means a positive correlation between $B$ and $A$, while
the rightmost general inequality means a positive correlation between $A$ and $B$.