We want to see that this checks out with the description from <ref>, i.e. that it is the set of equivalence classes in $\ord{5}\sqcup\ord{3}$ generated by the relation $\{f(a)\sim g(a)\mid a\in\ord{4}\}$. If we denote elements of $\ord{5}$ as $\{1,\ldots,5\}$ and those of $\ord{3}$ as $\{1',2',3'\}$, we can redraw the functions $f,g$:

\[
\begin{tikzcd}[ampersand replacement=\&, row sep=0]
1\& \bullet\ar[l, -]\ar[r, -]\&1'\\
2\& \bullet\ar[dl, -]\ar[ur, -]\&2'\\
3\& \bullet\ar[ddl, -]\ar[ur,-]\&3'\\
4\& \bullet\ar[dl, -]\ar[ur, -]\\
\end{tikzcd}
\]

which says we take the equivalence relation on $\ord{5}\sqcup\ord{3}$ generated by: $1\sim 1'$, , $3\sim 1'$, $5\sim 2'$, and $5\sim 3'$. The equivalence classes are $\{1,1',3\}$, $\{2\}$, $\{4\}$, and $\{5,2',3'\}$. These four are exactly the four elements in the set labeled `pushout' in <ref>.

In <ref> we asked “why?” three times.

* Give a justification for “why?$^1$.”

* Give a justification for “why?$^2$.”

* Give a justification for “why?$^3$.”

* The diagram to the left commutes because $\varnothing$ is initial,
and so has a unique map $\varnothing \to X + Y$. This implies we
must have $f\cp \iota_X = g \cp \iota_Y$.

* There is a unique map $X + Y \to T$ making the diagram in
(<ref>) commute simply by the universal property
of the coproduct (<ref>) applied to the maps
$x\colon X \to T$ and $y\colon Y \to T$.

* Suppose $X+_\varnothing Y$ exists. By the universal property of
$\varnothing$, given any pair of arrows $x\colon X \to T$ and $y\colon Y
\to T$, the diagram

\[
\begin{tikzcd}[ampersand replacement =\&]
\varnothing \ar[r,"f"] \ar[d,"g"']\&X\ar[d,"x"]\\
Y\ar[r,"y"'] \& T
\end{tikzcd}
\]

commutes. This means, by the universal property of the pushout
$X+_\varnothing Y$, there exists a unique map $t\colon X+_\varnothing Y \to T$
such that $\iota_X \cp t = x$ and $\iota_Y \cp t =y$. Thus
$X+_\varnothing Y$ is the coproduct $X+Y$.

Check that the pushout of pushouts from <ref> satisfies the universal property of the colimit for the original diagram, <ref>.

We have to check that the colimit of the diagram shown left really is given by taking three pushouts as shown right:

\[
\begin{tikzcd}[ampersand replacement=\&]
\&
\end{tikzcd}
\hspace{1in}
\begin{tikzcd}[ampersand replacement=\&]
\&
R\ar[ul, phantom, very near start, "\ulcorner"]\ar[d]\\
Q\ar[ul, phantom, very near start, "\ulcorner"]\ar[r]\&
S\ar[ul, phantom, very near start, "\ulcorner"]
\end{tikzcd}
\]

That is, we need to show that $S$, together with the maps from $A$, $B$, $X$, $Y$, and $Z$, has the required universal property. So suppose given an object $T$ with two commuting diagrams as shown:

\[
\begin{tikzcd}[ampersand replacement=\&]
\&
\\
\&
\end{tikzcd}
\]

We need to show there is a unique map $S\to T$ making everything commute. Since $Q$ is a pushout of $X\from A\to Y$, there is a unique map $Q\to T$ making a commutative triangle with $Y$, and since $R$ is the pushout of $Y\from B\to Z$, there is a unique map $R\to T$ making a commutative triangle with $Y$. This implies that there is a commuting $(Y,Q,R,T)$ square, and hence a unique map $S\to T$ from its pushout making everything commute. This is what we wanted to show.

Use the formula to show that pushouts—colimits on a diagram $X \xleftarrow{f}
N \xrightarrow{g} Y$—agree with the description we gave in <ref>.

The formula in <ref> says that the pushout $X+_NY$ is given
by the set of equivalence classes of $X \sqcup N \sqcup Y$ under the equivalence
relation generated by $x \sim n$ if $x=f(n)$, and $y \sim n$ if $y = g(n)$,
where $x \in X$, $y\in Y$, $n \in N$.  Since for every $n \in N$ there exists an
$x \in X$ such that $x=f(n)$, this set is equal to the set of equivalence
classes of $X \sqcup Y$ under the equivalence relation generated by $x \sim y$
if there exists $n$ such that $x=f(n)$ and $y = g(n)$. This is exactly the
description of <ref>.

In <ref> we showed morphisms $A\to B$ and $B\to C$ in
$\cospan{\finset}$. Draw their monoidal product as a morphism $A+B\to
B+C$ in $\cospan{\finset}$.

The monoidal product is

\[
\begin{tikzpicture}[x=1.25cm]
\begin{pgfonlayer}{nodelayer}
\node [contact, outer sep=5pt] (6) at (-2, 1) {};
\node [contact, outer sep=5pt] (7) at (-2, -0.5) {};
\node [contact, outer sep=5pt] (8) at (-2, 0.5) {};
\node [contact, outer sep=5pt] (9) at (-2, -0) {};
\node [contact, outer sep=5pt] (10) at (-2, -1) {};
\node [contact, outer sep=5pt] (-2a) at (-2, -1.5) {};
\node [contact, outer sep=5pt] (-1a) at (-2, -2) {};
\node [contact, outer sep=5pt] (0a) at (-2, -2.5) {};
\node [contact, outer sep=5pt] (1a) at (-2, -3) {};
\node [contact, outer sep=5pt] (2a) at (-2, -3.5) {};
\node [contact, outer sep=5pt] (3a) at (-2, -4) {};
\node [contact, outer sep=5pt] (15) at (-0.5, 0.875) {};
\node [contact, outer sep=5pt] (28) at (-0.5, 0.25) {};
\node [contact, outer sep=5pt] (16) at (-0.5, -0.125) {};
\node [contact, outer sep=5pt] (29) at (-0.5, -0.5) {};
\node [contact, outer sep=5pt] (17) at (-0.5, -1) {};
\node [contact, outer sep=5pt] (21) at (-0.5, -1.75) {};
\node [contact, outer sep=5pt] (23) at (-0.5, -2.25) {};
\node [contact, outer sep=5pt] (24) at (-0.5, -2.75) {};
\node [contact, outer sep=5pt] (22) at (-0.5, -3.25) {};
\node [contact, outer sep=5pt] (18) at (-0.5, -4) {};
\node [contact, outer sep=5pt] (-2) at (1, 1) {};
\node [contact, outer sep=5pt] (-1) at (1, 0.5) {};
\node [contact, outer sep=5pt] (0) at (1, 0) {};
\node [contact, outer sep=5pt] (1) at (1, -0.5) {};
\node [contact, outer sep=5pt] (2) at (1, -1) {};
\node [contact, outer sep=5pt] (3) at (1, -1.5) {};
\node [contact, outer sep=5pt] (19) at (1, -2) {};
\node [contact, outer sep=5pt] (14) at (1, -2.5) {};
\node [contact, outer sep=5pt] (11) at (1, -3) {};
\node [contact, outer sep=5pt] (13) at (1, -3.5) {};
\node [contact, outer sep=5pt] (12) at (1, -4) {};
\node [style=none] (a) at (-2, -4.75) {$A+B$};
\node [style=none] (n) at (-.5, -4.75) {$N+P$};
\node [style=none] (b) at (1, -4.75) {$B+C$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\begin{scope}[->,shorten <=10pt,shorten >=10pt]
\draw (6.center) to (15.center);
\draw (8.center) to (15.center);
\draw (-2.center) to (15.center);
\draw (-1.center) to (15.center);
\draw (9.center) to (16.center);
\draw (7.center) to (16.center);
\draw (10.center) to (17.center);
\draw (2.center) to (17.center);
\draw (3.center) to (17.center);
\draw (0.center) to (28.center);
\draw (1.center) to (29.center);
\draw (3a.center) to (18.center);
\draw (-2a.center) to (21.center);
\draw (-1a.center) to (21.center);
\draw (1a.center) to (22.center);
\draw (2a.center) to (22.center);
\draw (0a.center) to (24.center);
\draw (11.center) to (22.center);
\draw (12.center) to (18.center);
\draw (13.center) to (22.center);
\draw (14.center) to (23.center);
\draw (19.center) to (21.center);
\end{scope}
\end{pgfonlayer}
\end{tikzpicture}
\]

Depicting the composite of cospans in <ref> with the wire
notation gives

\[
\begin{aligned}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [contact, outer sep=5pt] (6) at (-2, 1) {};
\node [contact, outer sep=5pt] (7) at (-2, -0.5) {};
\node [contact, outer sep=5pt] (8) at (-2, 0.5) {};
\node [contact, outer sep=5pt] (9) at (-2, -0) {};
\node [contact, outer sep=5pt] (10) at (-2, -1) {};
\node [outer sep=5pt] (15) at (-0.5, 0.875) {};
\node [outer sep=5pt] (28) at (-0.5, 0.25) {};
\node [outer sep=5pt] (16) at (-0.5, -0.125) {};
\node [outer sep=5pt] (29) at (-0.5, -0.5) {};
\node [outer sep=5pt] (17) at (-0.5, -1) {};
\node [contact, outer sep=5pt] (-2) at (1, 1.25) {};
\node [contact, outer sep=5pt] (-1) at (1, 0.75) {};
\node [contact, outer sep=5pt] (0) at (1, 0.25) {};
\node [contact, outer sep=5pt] (1) at (1, -0.25) {};
\node [contact, outer sep=5pt] (2) at (1, -0.75) {};
\node [contact, outer sep=5pt] (3) at (1, -1.25) {};
\node [outer sep=5pt] (18) at (2.5, -1.125) {};
\node [outer sep=5pt] (21) at (2.5, 1) {};
\node [outer sep=5pt] (22) at (2.5, -0.375) {};
\node [outer sep=5pt] (23) at (2.5, 0.475) {};
\node [outer sep=5pt] (24) at (2.5, 0.25) {};
\node [contact, outer sep=5pt] (19) at (4, 1) {};
\node [contact, outer sep=5pt] (14) at (4, 0.5) {};
\node [contact, outer sep=5pt] (11) at (4, -0) {};
\node [contact, outer sep=5pt] (13) at (4, -0.5) {};
\node [contact, outer sep=5pt] (12) at (4, -1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\begin{scope}[very thick]
\draw (6.center) to (15.center);
\draw (8.center) to (15.center);
\draw (-2.center) to (15.center);
\draw (-1.center) to (15.center);
\draw (9.center) to (16.center);
\draw (7.center) to (16.center);
\draw (10.center) to (17.center);
\draw (2.center) to (17.center);
\draw (3.center) to (17.center);
\draw (0.center) to (28.center);
\draw (1.center) to (29.center);
\draw (3.center) to (18.center);
\draw (-2.center) to (21.center);
\draw (-1.center) to (21.center);
\draw (1.center) to (22.center);
\draw (2.center) to (22.center);
\draw (0.center) to (24.center);
\draw (11.center) to (22.center);
\draw (12.center) to (18.center);
\draw (13.center) to (22.center);
\draw (14.center) to (23.center);
\draw (19.center) to (21.center);
\end{scope}
\end{pgfonlayer}
\end{tikzpicture}
\end{aligned}
\quad=\quad
\begin{aligned}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [contact, outer sep=5pt] (2) at (-2, 1) {};
\node [contact, outer sep=5pt] (3) at (-2, -0.5) {};
\node [contact, outer sep=5pt] (4) at (-2, 0.5) {};
\node [contact, outer sep=5pt] (5) at (-2, -0) {};
\node [contact, outer sep=5pt] (6) at (-2, -1) {};
\node [outer sep=5pt] (11) at (-0.5, 0.875) {};
\node [outer sep=5pt] (12) at (-0.5, 0.35) {};
\node [draw, fill=black, circle, inner sep=1.2pt] (extra) at (-0.5, 0.05) {};
\node [outer sep=5pt] (14) at (-0.5, -0.2) {};
\node [outer sep=5pt] (15) at (-0.5, -0.7) {};
\node [contact, outer sep=5pt] (7) at (1, -0) {};
\node [contact, outer sep=5pt] (8) at (1, -1) {};
\node [contact, outer sep=5pt] (9) at (1, -0.5) {};
\node [contact, outer sep=5pt] (10) at (1, 0.5) {};
\node [contact, outer sep=5pt] (13) at (1, 1) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\begin{scope}[very thick]
\draw (2.center) to (11.center);
\draw (4.center) to (11.center);
\draw (5.center) to (14.center);
\draw (3.center) to (14.center);
\draw (6.center) to (15.center);
\draw (7.center) to (15.center);
\draw (8.center) to (15.center);
\draw (9.center) to (15.center);
\draw (10.center) to (12.center);
\draw (13.center) to (11.center);
\end{scope}
\end{pgfonlayer}
\end{tikzpicture}
\end{aligned}
\]

Comparing <ref> and <ref>, describe the
composition rule in $\cospan\finset$ in terms of wires and connected

Let $x$ and $y$ be composable cospans in $\cospan\finset$. In terms of wires and
connected components, the composition rule in $\cospan\finset$ says that (i) the
composite cospan has a unique element in the apex for every connected component
of the concatenation of the wire diagrams $x$ and $y$, and (ii) in the wire
diagram for $x\cp y$, each element of the feet is connected by a wire to the
element representing the connected component to which it belongs.

Which morphisms in the following list are equal?

\[
\begin{tikzpicture}[spider diagram]
\node[spider={2}{3}, fill=black] (a) {};
\end{tikzpicture}
\]

\[
\begin{tikzpicture}[spider diagram]
\node[spider={2}{0}, fill=black] (a) {};
\node[spider={0}{3}, fill=black, right=.5 of a] (b) {};
\end{tikzpicture}
\]

\[
\begin{tikzpicture}[spider diagram]
\node[spider={1}{2}, fill=black] (a) {};
\node[spider={2}{2}, fill=black, right=1 of a] (b) {};
\node[spider={1}{1}, fill=black, below=.5 of a] (c) {};
\node[spider={1}{1}, fill=black, right=1 of c] (d) {};
\begin{scope}
\draw (a_out1) to (b_in1);
\draw (a_out2) to (b_in2);
\draw (c_out1) to (d_in1);
\end{scope}
\end{tikzpicture}
\]

\[
\begin{tikzpicture}[spider diagram]
\node[spider={2}{2}, fill=black] (a) {};
\node[spider={2}{3}, fill=black, right=1 of a] (b) {};
\begin{scope}
\draw (a_out1) to (b_in1);
\draw (a_out2) to (b_in2);
\end{scope}
\end{tikzpicture}
\]

\[
\begin{tikzpicture}[spider diagram]
\node[spider={1}{2}, fill=black] (a) {};
\node[spider={2}{2}, fill=black, right=1 of a] (b) {};
\node[spider={1}{2}, fill=black, below=.5 of a] (c) {};
\node[spider={2}{1}, fill=black, right=1 of c] (d) {};
\begin{scope}
\draw (a_out1) to (b_in1);
\draw (a_out2) to (b_in2);
\draw (c_out1) to (d_in1);
\draw (c_out2) to (d_in2);
\end{scope}
\end{tikzpicture}
\]

\[
\begin{tikzpicture}[spider diagram]
\node[spider={1}{2}, fill=black] (a) {};
\node[spider={1}{2}, fill=black, below=.8 of a] (b) {};
\node[spider={2}{2}, fill=black, below right=.36 and .9 of a] (c) {};
\node[spider={2}{1}, fill=black, right=1.9 of a] (d) {};
\begin{scope}
\draw (a_out1) to (d_in1);
\draw (a_out2) to (c_in1);
\draw (b_out1) to (c_in2);
\draw (b_out2) to (d_out1|-b_out2);
\draw (c_out1) to (d_in2);
\draw (c_out2) to (d_out1|-c_out2);
\end{scope}
\end{tikzpicture}
\]

Morphisms 1, 4, and 6 are equal, and morphisms 3 and 5 are equal. Morphism 3 is
not equal to any other depicted morphism. This is an immediate consequence of

* What label should be on the input to $h$?

* What label should be on the output of $g$?

* What label should be on the fourth output wire of the composite?

* The input to $h$ should be labelled $B$.

* The output of $g$ should be labelled $D$, since we know from the
labels in the top right that $h$ is a morphism $B \to D \otimes D$.

* The fourth output wire of the composite should be labelled $D$

By <ref>, the category $\cospan\finset$ is a hypergraph
category. (In fact it is a hypergraph prop.) Draw the Frobenius maps for the
object $\ord{1}$ in $\cospan\finset$ using both the function and wiring
depictions as in <ref>.

We draw the function depictions above, and the wiring depictions below. Note
that we depict the empty set with blank space.

\[
\begin{aligned}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [contact, outer sep=5pt] (i1) at (-1, 0.25) {};
\node [contact, outer sep=5pt] (i2) at (-1, -.25) {};
\node [contact, outer sep=5pt] (a) at (-0, 0) {};
\node [contact, outer sep=5pt] (o) at (1, 0) {};
\node [contact, outer sep=5pt] (i1w) at (-1, -0.75) {};
\node [contact, outer sep=5pt] (i2w) at (-1, -1.25) {};
\node [outer sep=5pt] (aw) at (-0, -1) {};
\node [contact, outer sep=5pt] (ow) at (1, -1) {};
\node [style=none] (4) at (-1, -1.75) {$1+1$};
\node [style=none] (20) at (0, -1.75) {$1$};
\node [style=none] (30) at (1, -1.75) {$1$};
\node [style=none] (30) at (0, -2.5) {multiplication $\mu_1$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\begin{scope}[->,shorten <=10pt,shorten >=10pt]
\draw (i1.center) to (a.center);
\draw (i2.center) to (a.center);
\draw (o.center) to (a.center);
\end{scope}
\begin{scope}[very thick]
\draw (i1w.center) to (aw.center);
\draw (i2w.center) to (aw.center);
\draw (ow.center) to (aw.center);
\end{scope}
\end{pgfonlayer}
\end{tikzpicture}
\end{aligned}
\hspace{1cm}
\begin{aligned}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node (i1) at (-1, 0.25) {};
\node [contact, outer sep=5pt] (a) at (-0, 0) {};
\node [contact, outer sep=5pt] (o) at (1, 0) {};
\node [outer sep=5pt] (aw) at (-0, -1) {};
\node [contact, outer sep=5pt] (ow) at (1, -1) {};
\node [style=none] (4) at (-1, -1.75) {$\varnothing$};
\node [style=none] (20) at (0, -1.75) {$1$};
\node [style=none] (30) at (1, -1.75) {$1$};
\node [style=none] (30) at (0, -2.5) {unit $\eta_1$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\begin{scope}[->,shorten <=10pt,shorten >=10pt]
\draw (o.center) to (a.center);
\end{scope}
\begin{scope}[very thick]
\draw (ow.center) to (aw.center);
\end{scope}
\end{pgfonlayer}
\end{tikzpicture}
\end{aligned}
\hspace{1cm}
\begin{aligned}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [contact, outer sep=5pt] (i) at (-1, 0) {};
\node [contact, outer sep=5pt] (a) at (-0, 0) {};
\node [contact, outer sep=5pt] (o1) at (1, 0.25) {};
\node [contact, outer sep=5pt] (o2) at (1, -.25) {};
\node [contact, outer sep=5pt] (iw) at (-1, -1) {};
\node [outer sep=5pt] (aw) at (-0, -1) {};
\node [contact, outer sep=5pt] (o1w) at (1, -0.75) {};
\node [contact, outer sep=5pt] (o2w) at (1, -1.25) {};
\node [style=none] (4) at (-1, -1.75) {$1$};
\node [style=none] (20) at (0, -1.75) {$1$};
\node [style=none] (30) at (1, -1.75) {$1+1$};
\node [style=none] (30) at (0, -2.5) {comultiplication $\delta_1$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\begin{scope}[->,shorten <=10pt,shorten >=10pt]
\draw (i.center) to (a.center);
\draw (o1.center) to (a.center);
\draw (o2.center) to (a.center);
\end{scope}
\begin{scope}[very thick]
\draw (iw.center) to (aw.center);
\draw (aw.center) to (o1w.center);
\draw (aw.center) to (o2w.center);
\end{scope}
\end{pgfonlayer}
\end{tikzpicture}
\end{aligned}
\hspace{1cm}
\begin{aligned}
\begin{tikzpicture}
\begin{pgfonlayer}{nodelayer}
\node [contact, outer sep=5pt] (i) at (-1, 0) {};
\node [contact, outer sep=5pt] (a) at (-0, 0) {};
\node [contact, outer sep=5pt] (iw) at (-1, -1) {};
\node [outer sep=5pt] (aw) at (-0, -1) {};
\node [style=none] (4) at (-1, -1.75) {$1$};
\node [style=none] (20) at (0, -1.75) {$1$};
\node [style=none] (30) at (1, -1.75) {$\varnothing$};
\node [style=none] (30) at (0, -2.5) {counit $\epsilon_1$};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\begin{scope}[->,shorten <=10pt,shorten >=10pt]
\draw (i.center) to (a.center);
\end{scope}
\begin{scope}[very thick]
\draw (iw.center) to (aw.center);
\end{scope}
\end{pgfonlayer}
\end{tikzpicture}
\end{aligned}
\]

Using your knowledge of colimits, show that the maps defined in
<ref> do indeed obey the special law (see

The special law says that the composite of cospans

\[
\spec{.1\textwidth} = X \xrightarrow{\id} X \xleftarrow{\copair{\id,\id}} X+X
\xrightarrow{\copair{\id,\id}} X \xleftarrow{\id} X
\]

is the identity. This comes down to checking that the square

\begin{equation} \label{eqn.pushout_questionmark}
\begin{tikzcd}[ampersand replacement=\&]
X+X \ar[d,"\copair{\id,\id}"'] \ar[r,"\copair{\id,\id}"] \&
X\ar[d,"\id"]  \\
X \ar[r,"\id"'] \& X
\end{tikzcd}
\end{equation}

is a pushout square. It is trivial to see that the square commutes. Suppose
now that we have maps $f\colon X \to Y$ and $g\colon X \to Y$ such that

\[
\begin{tikzcd}[ampersand replacement=\&]
X+X \ar[d,"\copair{\id,\id}"'] \ar[r,"\copair{\id,\id}"] \&
X\ar[d,"f"]  \\
X \ar[r,"g"'] \& T
\end{tikzcd}
\]

Write $\iota_1\colon X \to X+X$ for the map into the first copy of $X$ in
$X+X$, given by the definition of coproduct. Then, using the fact that
$\iota_1 \cp \copair{\id,\id} = \id$ from <ref> 1, and
the commutativity of the above square, we have $f=
\iota_1\cp\copair{\id,\id}\cp f =\iota_1\cp\copair{\id,\id}\cp g = g$. This
means that $f\colon X \to T$ is the unique map such that

\[
\begin{tikzcd}[ampersand replacement=\&]
X \ar[r,"\copair{\id,\id}"] \ar[d,"\copair{\id,\id}"'] \& X \ar[d,"\id"]
\ar[ddr,"f", bend left] \\
X \ar[r,"\id"'] \ar[drr,"g=f"', bend right=20pt] \& X \ar[dr,dashed, "f"] \\[-7pt]
\&\&[-15pt]T
\end{tikzcd}
\]

commutes, and so (<ref>) is a pushout square.

Fill in the missing diagram in the proof of <ref>.

The missing diagram is

\[
\begin{aligned}
\begin{tikzpicture}[yscale=.7]
\begin{pgfonlayer}{nodelayer}
\node [style=none] (left) at (-1.5, 1) {};
\node [style=none] (helpl) at (-0.5, 1) {};
\node [style=none] (unith) at (-0.5, 0) {};
\node [style=bdot] (unit) at (-0.75, 0) {};
\node [style=bdot] (mult) at (0, .5) {};
\node [style=bdot] (comult) at (.5, .5) {};
\node [style=none] (counith) at (1, 1) {};
\node [style=bdot] (counit) at (1.25, 1) {};
\node [style=none] (helpr) at (1, 0) {};
\node [style=none] (right) at (2, 0) {};
\end{pgfonlayer}
\begin{pgfonlayer}{edgelayer}
\draw (left.center) to (helpl.center);
\draw (unit.center) to (unith.center);
\draw [bend left, looseness=1.00] (helpl.center) to (mult.center);
\draw [bend right, looseness=1.00] (unith.center) to (mult.center);
\draw (mult) to (comult);
\draw [bend left, looseness=1.00] (comult.center) to (counith.center);
\draw [bend right, looseness=1.00] (comult.center) to (helpr.center);
\draw (counith.center) to (counit.center);
\draw (helpr.center) to (right.center);
\end{pgfonlayer}
\end{tikzpicture}
\end{aligned}
\]

Check that the maps $\varphi_{S,T}$ defined in <ref> are natural in
$S$ and $T$. In other words, given $f\colon S\to S'$ and $g\colon T\to T'$, show that the diagram below commutes:

\[
\begin{tikzcd}[column sep=large,ampersand replacement=\&]
\powset(S)\times\powset(T)\ar[r,"\varphi_{S,T}"] \ar[d,"\im_f\times \im_g"']\&
\powset(S\times T)\ar[d, "\im_{f\times g}"]\\
\powset(S')\times\powset(T')\ar[r, "\varphi_{S',T'}"']\&
\powset(S'\times T')
\end{tikzcd}
\]

Let $A \subseteq S$ and $B \subseteq T$. Then

\begin{align*}
\varphi_{S',T'}\left((\im_f\times \im_g)(A \times B)\right)
&= \varphi_{S',T'}(\{f(a) \mid a \in A\} \times \{g(b) \mid b \in B\}) \\
&= \{(f(a),g(b)) \mid a \in A, \, b \in B\} \\
&= \im_{f\times g}(A \times B) \\
&= \im_{f\times g}(\varphi_{S,T}(A,B)).
\end{align*}

Thus the required square commutes.

Suppose you're worried that the notation $\cospan{\cat{C}}$ looks like the notation $\cospan{F}$, even though they're very different. An expert tells you “they're not so different; one is a special case of the other. Just use the constant functor $F(c)\coloneqq\{*\}$.” What do they mean?

They mean that every category $\cospan{\cat{C}}$ is equal to a category
$\cospan{F}$, for some well-chosen $F$. They also tell you how to choose this
$F$: take the functor $F\colon \cat{C} \to \smset$ that sends every object of
$\cat{C}$ to the set $\{\ast\}$, and every morphism of $\cat{C}$ to the identity
function on $\{\ast\}$. Of course, you will have to check this functor is a lax
symmetric monoidal functor, but in fact this is not hard to do.

To check that $\cospan{\cat{C}}$ is equal to $\cospan{F}$, first observe that
they have the same objects: the objects of $\cat{C}$. Next, observe that a
morphism in $\cospan{F}$ is a cospan $X \leftarrow N \rightarrow Y$ in $\cat{C}$
together with an element of $FN = \{\ast\}$. But $FN$ also has a unique element,
$\ast$! So there's no choice here, and we can consider morphisms of $\cospan{F}$
just to be cospans in $\cat{C}$. Moreover, composition of morphisms in
$\cospan{F}$ is simply the usual composition of cospans via pushout, so
$\cospan{F} =\cospan{\cat{C}}$.

(More technically, we might say that $\cospan{\cat{C}}$ and $\cospan{F}$ are
isomorphic, where the isomorphism is the identity-on-objects functor
$\cospan{\cat{C}} \to \cospan{F}$ that simply decorates each cospan with $\ast$,
and its inverse is the one that forgets this $\ast$. But this is close enough to
equal that many category theorists, us included, don't mind saying equal in this

Write a tuple $(V,A,s,t,\ell)$ that represents the circuit in

We can represent the circuit in <ref> by the tuple
$(V,A,s,t,\ell)$ where $V=\{\textrm{ul},\textrm{ur},\textrm{dl},\textrm{dr}\}$,
$A=\{\textrm{r1},\textrm{r2},\textrm{r3},\textrm{c1},\textrm{i1}\}$, and $s$, $t$, and $\ell$ are
defined by the table

\[
\begin{tabular}{c | c c c c c}
& r1 & r2 & r3 & c1 & i1 \\ \hline
$s(-)$ & dl & ul & ur & ul & dl \\
$t(-)$ & ul & ur & dr & ur & dr \\
$\ell(-)$ & $1\Omega$ & $2\Omega$ & $1\Omega$ & $3F$ & $1H$
\end{tabular}
\]

To understand this functor better, let $c\in F(\ord{4})$ be the circuit

\[
\begin{tikzpicture}[circuit ee IEC, set resistor graphic=var resistor IEC graphic]
\node[contact]         (A) at (0,0) {};
\node[contact]         (B) at (2,0) {};
\node[contact]         (C) at (3,0) {};
\node[contact]         (D) at (5,0) {};
\path (A) edge  [capacitor] node[label={[label distance=1pt]90:{$3F$}}]
{} (B);
\path (C) edge  [resistor] node[label={[label distance=1pt]90:{$3\Omega$}}]
{} (D);
\node[below=0 of A, font=\scriptsize] {$1$};
\node[below=0 of B, font=\scriptsize] {$2$};
\node[below=0 of C, font=\scriptsize] {$3$};
\node[below=0 of D, font=\scriptsize] {$4$};
\end{tikzpicture}
\]

and let $f\colon \ord{4} \to \ord{3}$ be the function

\[
\begin{tikzpicture}[y=.5cm]
\node[contact]         (A) at (0,0) {};
\node[contact]         (B) at (2,0) {};
\node[contact]         (C) at (3,0) {};
\node[contact]         (D) at (5,0) {};
\node[contact]         (1) at (1,-2) {};
\node[contact]         (2) at (2.5,-2) {};
\node[contact]         (3) at (4,-2) {};
\begin{scope}[font=\scriptsize]
\node[above=0 of A] {$1$};
\node[above=0 of B] {$2$};
\node[above=0 of C] {$3$};
\node[above=0 of D] {$4$};
\node[below=0 of 1] {$1$};
\node[below=0 of 2] {$2$};
\node[below=0 of 3] {$3$};
\end{scope}
\begin{scope}[function]
\draw (A) to (1);
\draw (B) to (2);
\draw (C) to (2);
\draw (D) to (3);
\end{scope}
\end{tikzpicture}
\]

What is the circuit $\elec(f)(c)$?

The circuit $\elec(f)(c)$ is

\[
\begin{tikzpicture}[circuit ee IEC, set resistor graphic=var resistor IEC graphic]
\node[contact]         (A) at (0,0) {};
\node[contact]         (B) at (2,0) {};
\node[contact]         (D) at (4,0) {};
\path (A) edge  [bulb] (B);
\path (B) edge  [resistor] node["$3\Omega$"]
{} (D);
\node[below=0 of A, font=\scriptsize] {$1$};
\node[below=0 of B, font=\scriptsize] {$2\sim 3$};
\node[below=0 of D, font=\scriptsize] {$4$};
\end{tikzpicture}
\]

Suppose we have circuits

\[
\begin{aligned}
\begin{tikzpicture}[circuit ee IEC, set make contact graphic=var make contact IEC graphic]
\node at (-.5,0) {$b\coloneq$};
\node[contact]         (A) at (0,0) {};
\node[contact]         (B) at (2,0) {};
\path (A) edge  [battery] (B);
\end{tikzpicture}
\end{aligned}
\qquad
\mbox{and}
\qquad
\begin{aligned}
\begin{tikzpicture}[circuit ee IEC, set resistor graphic=var resistor IEC graphic]
\node at (-.5,0) {$s\coloneq$};
\node[contact]         (A) at (0,0) {};
\node[contact]         (B) at (2,0) {};
\path (A) edge  [make contact] (B);
\end{tikzpicture}
\end{aligned}
\]

in $\elec(\ord{2})$. Use the definition of $\psi_{V,V'}$ from
(<ref>) to figure out what $4$-vertex circuit $\psi_{\ord{2},\ord{2}}(b,s) \in
\elec(\ord{2} + \ord{2}) = \elec(\ord{4})$ should be.

The circuit $\psi_{\ord{2},\ord{2}}(b,s)$ is the disjoint union of the two
labelled graphs $b$ and $s$:

\[
\begin{aligned}
\begin{tikzpicture}[circuit ee IEC, set make contact graphic=var make contact IEC graphic]
\node[contact]         (A) at (0,0) {};
\node[contact]         (B) at (2,0) {};
\node[contact]         (C) at (4,0) {};
\node[contact]         (D) at (6,0) {};
\path (A) edge  [battery] (B);
\path (C) edge  [make contact] (D);
\end{tikzpicture}
\end{aligned}
\]

Morphisms of $\cospan\elec$ are $\elec$-decorated cospans, as defined in
<ref>. This means (<ref>) depicts a
cospan together with a decoration, which is some $C$-circuit
$(V,A,s,t,\ell) \in \elec(\ord{2})$. What is it?

The cospan is the cospan $\ord{1} \To{f} \ord{2} \From{g} \ord{1}$, where
$f(1)=1$ and $g(1)=2$. The decoration is the $C$-circuit
$(\ord{2},\{a\},s,t,\ell)$, where $s(a)=1$, $t(a)=2$ and $\ell(a)=\battery$.

Refer back to the example at the beginning of <ref>. In
particular, consider the composition of circuits in
<ref>. Express the two circuits in this diagram as
morphisms in $\cospan\elec$, and compute their composite. Does it match the
picture in <ref>?

Recall the circuit $C\coloneqq (V,A,s,t,\ell)$ from the solution to
<ref>. Then the first decorated cospan is given by the cospan
$\ord{1} \To{f} V \From{g} \ord{2}$, $f(1) =\textrm{ul}$, $g(1) =\textrm{ur}$,
and $g(2) =\textrm{ur}$, decorated by circuit $C$.
The second decorated cospan is given by the cospan $\ord{2} \To{f'} V' \From{g'}
\ord{2}$ and the circuit $C'\coloneqq(V',A',s',t',\ell')$, where $V'=\{l,r,d\}$,
$A'=\{\textrm{r}1',\textrm{r}2'\}$, and the functions are given by the tables

\[
\begin{tabular}{c | c c}
& 1 & 2 \\ \hline
$f'(-)$ &  l & d\\
$g'(-)$ & r & r\\
\end{tabular}
\hspace{2cm}
\begin{tabular}{c | c c}
& r1' & r2' \\ \hline
$s(-)$ &  l & r\\
$t(-)$ & r & d\\
$\ell(-)$ & $5\Omega$ & $8\Omega$
\end{tabular}
\]

To compose these, we first take the pushout of $V \From{g} \ord{2} \To{f'} V'$.
This gives the a new apex $V''
=\{\textrm{ul},\textrm{dl},\textrm{dr},\textrm{m},\textrm{r}\}$ with five
elements, and composite cospan $\ord{1} \To{h} V'' \From{k} \ord{2}$ given by
$h(1) = \textrm{ul}$, $k(1) = \textrm{r}$ and $k(2) =\textrm{m}$. The new
circuit is given by $(V,''A+A',s,''t,''\ell'')$ where the functions are given by

\[
\begin{tabular}{c | c c c c c c c}
& r1 & r2 & r3 & c1 & i1 & r1' & r2' \\ \hline
$s''(-)$ & dl & ul & m & ul & dl & m & r \\
$t''(-)$ & ul & m & dr & m & dr & r & m \\
$\ell''(-)$ & $1\Omega$ & $2\Omega$ & $1\Omega$ & $3F$ & $1H$ & $5\Omega$ &
\end{tabular}
\]

This is exactly what is depicted in <ref>.

Write $x$ for the open circuit in (<ref>). Also define cospans $\eta\colon 0\to 2$ and $\eta\colon 2\to 0$ as follows:

\[
\eta \coloneqq
\quad
\begin{aligned}
\begin{tikzpicture}[circuit ee IEC, set resistor graphic=var resistor IEC
graphic, set make contact graphic=var make contact IEC graphic]
\node (i) at (-1,0) {$\varnothing$};
\node [contact] (m) at (0,0) {};
\node [draw, rounded corners, gray, inner ysep=10pt, inner xsep=10pt, fit=(m)] {};
\node [draw, inner sep=1.5pt,circle] (a) at (1,.5) {};
\node [draw, inner sep=1.5pt,circle] (b) at (1,-.5) {};
\begin{scope}[mapsto]
\draw (a) to (m);
\draw (b) to (m);
\end{scope}
\end{tikzpicture}
\end{aligned}
\hspace{1in}
\begin{aligned}
\begin{tikzpicture}[circuit ee IEC, set resistor graphic=var resistor IEC
graphic, set make contact graphic=var make contact IEC graphic]
\node (i) at (1,0) {$\varnothing$};
\node [contact] (m) at (0,0) {};
\node [draw, rounded corners, gray, inner ysep=10pt, inner xsep=10pt, fit=(m)] {};
\node [draw, inner sep=1.5pt,circle] (a) at (-1,.5) {};
\node [draw, inner sep=1.5pt,circle] (b) at (-1,-.5) {};
\begin{scope}[mapsto]
\draw (a) to (m);
\draw (b) to (m);
\end{scope}
\end{tikzpicture}
\end{aligned}
\quad
\]

where each of these are decorated by the empty circuit
$(\ord{1},\varnothing,!,!,!) \in \elec(\ord{1})$.
As usual $!$ denotes the unique function, in this case from the empty set to the relevant codomain.

Compute the composite $\eta \cp x \cp \epsilon$ in $\cospan\elec$. This is a
morphism $\ord{0} \to \ord{0}$; we call such things closed circuits.

Composing $\eta$ and $x$ we have

\begin{align*}
\eta \cp x
\begin{aligned}
\begin{tikzpicture}[circuit ee IEC, set resistor graphic=var resistor IEC
graphic, set make contact graphic=var make contact IEC graphic]
\node (i) at (-1,.5) {$\varnothing$};
\node [contact] (n) at (0,.5) {};
\node [draw, inner sep=1.5pt,circle] (a2) at (1,1) {};
\node [draw, inner sep=1.5pt,circle] (a) at (1,0) {};
\node [contact] (l2) at (2,1) {};
\node [contact] (m2) at (4,1) {};
\node [contact] (r2) at (6,1) {};
\node [contact] (l) at (2,0) {};
\node [contact] (m) at (4,0) {};
\node [contact] (r) at (6,0) {};
\node [draw, inner sep=1.5pt,circle] (b) at (7,0) {};
\node [draw, inner sep=1.5pt,circle] (b2) at (7,1) {};
\node [draw, rounded corners, gray, inner ysep=10pt, inner xsep=10pt, fit=(n)] {};
\node [draw, rounded corners, gray, inner ysep=10pt, inner xsep=10pt, fit=(l2) (r)] {};
\draw (l2) to [battery] (m2);
\draw (m2) to [make contact] (r2);
\draw (l) to [bulb] (m);
\draw (m) to [resistor] (r);
\begin{scope}[mapsto]
\draw (a) to (n);
\draw (a2) to (n);
\draw (a) to (l);
\draw (a2) to (l2);
\draw (b) to (r);
\draw (b2) to (r2);
\end{scope}
\end{tikzpicture}
\end{aligned}
\\
\begin{aligned}
\begin{tikzpicture}[circuit ee IEC, set resistor graphic=var resistor IEC
graphic, set make contact graphic=var make contact IEC graphic]
\node (i) at (1,.5) {$\varnothing$};
\node [contact] (m2) at (4,1) {};
\node [contact] (r2) at (6,1) {};
\node [contact] (l) at (2,0.5) {};
\node [contact] (m) at (4,0) {};
\node [contact] (r) at (6,0) {};
\node [draw, inner sep=1.5pt,circle] (b) at (7,0) {};
\node [draw, inner sep=1.5pt,circle] (b2) at (7,1) {};
\node [draw, rounded corners, gray, inner ysep=10pt, inner xsep=10pt, fit=(l)
(r) (r2)] {};
\draw (l) to [battery] (m2);
\draw (m2) to [make contact] (r2);
\draw (l) to [bulb] (m);
\draw (m) to [resistor] (r);
\begin{scope}[mapsto]
\draw (b) to (r);
\draw (b2) to (r2);
\end{scope}
\end{tikzpicture}
\end{aligned}
\end{align*}

and composing the result of $\epsilon$ gives

\begin{align*}
\eta \cp x \cp \epsilon
\begin{aligned}
\begin{tikzpicture}[circuit ee IEC, set resistor graphic=var resistor IEC
graphic, set make contact graphic=var make contact IEC graphic]
\node (i) at (1,.5) {$\varnothing$};
\node [contact] (m2) at (4,1) {};
\node [contact] (r2) at (6,1) {};
\node [contact] (l) at (2,0.5) {};
\node [contact] (m) at (4,0) {};
\node [contact] (r) at (6,0) {};
\node [draw, inner sep=1.5pt,circle] (b) at (7,0) {};
\node [draw, inner sep=1.5pt,circle] (b2) at (7,1) {};
\node [contact] (n) at (8,0.5) {};
\node (i) at (9,0.5) {$\varnothing$};
\node [draw, rounded corners, gray, inner ysep=10pt, inner xsep=10pt, fit=(l)
(r) (r2)] {};
\node [draw, rounded corners, gray, inner ysep=10pt, inner xsep=10pt, fit=(n)] {};
\draw (l) to [battery] (m2);
\draw (m2) to [make contact] (r2);
\draw (l) to [bulb] (m);
\draw (m) to [resistor] (r);
\begin{scope}[mapsto]
\draw (b) to (r);
\draw (b2) to (r2);
\draw (b) to (n);
\draw (b2) to (n);
\end{scope}
\end{tikzpicture}
\end{aligned}
\\
\begin{aligned}
\begin{tikzpicture}[circuit ee IEC, set resistor graphic=var resistor IEC
graphic, set make contact graphic=var make contact IEC graphic]
\node (i) at (1,.5) {$\varnothing$};
\node [contact] (m2) at (4,1) {};
\node [contact] (l) at (2,0.5) {};
\node [contact] (m) at (4,0) {};
\node [contact] (r) at (6,0.5) {};
\node [draw, rounded corners, gray, inner ysep=10pt, inner xsep=10pt, fit=(l)
(r) (m) (m2)] {};
\draw (l) to [battery] (m2);
\draw (m2) to [make contact] (r);
\draw (l) to [bulb] (m);
\draw (m) to [resistor] (r);
\node (i) at (7,.5) {$\varnothing$};
\end{tikzpicture}
\end{aligned}
\end{align*}

* Consider the following cospan $f\in\oprdcospan(2,2; 2)$:

\[
\begin{tikzpicture}[x=.25cm, y=.75cm]
\begin{scope}[every node/.style={draw, inner sep=1.5pt, fill, circle}]
\node (a1) {};
\node[right=1 of a1] (a2) {};
\node[right=2 of a2] (a3) {};
\node[right=1 of a3] (a4) {};
\node at ($(a2)!.5!(a3)+(0,-1)$) (b2) {};
\node[left=1 of b2] (b1) {};
\node[right=1 of b2] (b3) {};
\node at ($(b1)!.5!(b2)+(0,-1)$) (c1) {};
\node[right=1 of c1] (c2) {};
\end{scope}
\begin{scope}[every node/.style={draw, rounded corners, gray, inner ysep=5pt, inner xsep=5pt}]
\node [fit=(a1) (a2)] {};
\node [fit=(a3) (a4)] {};
\node [fit=(b1) (b3)] {};
\node [fit=(b1) (b3)] {};
\node [fit=(c1) (c2)] {};
\end{scope}
\begin{scope}[mapsto]
\draw (a1) -- (b1);
\draw (a2) -- (b2);
\draw (a3) -- (b2);
\draw (a4) -- (b3);
\draw (c1) -- (b1);
\draw (c2) -- (b3);
\end{scope}
\end{tikzpicture}
\]

Draw it as a wiring diagram with two inner circles, each with two ports, and one outer circle with two ports.

* Draw the wiring diagram corresponding to the following cospan $g\in\oprdcospan(2,2,2;0)$:

\[
\begin{tikzpicture}[x=.25cm, y=.75cm]
\begin{scope}[every node/.style={draw, inner sep=1.5pt, fill, circle}]
\node (a11) {};
\node[right=1 of a11] (a12) {};
\node[right=2 of a12] (a21) {};
\node[right=1 of a21] (a22) {};
\node[right=2 of a22] (a31) {};
\node[right=1 of a31] (a32) {};
\node at ($(a21)!.5!(a22)+(0,-2)$) (b2) {};
\node[left=1 of b2] (b1) {};
\node[right=1 of b2] (b3) {};
\end{scope}
\node at ($(b2)+(0,-1)$) {$\varnothing$};
\begin{scope}[every node/.style={draw, rounded corners, gray, inner ysep=7pt, inner xsep=5pt}]
\node [fit=(a11) (a12)] {};
\node [fit=(a21) (a22)] {};
\node [fit=(a31) (a32)] {};
\node [fit=(b1) (b3)] {};
\end{scope}
\begin{scope}[mapsto]
\draw (a11) -- (b2);
\draw (a12) -- (b1);
\draw (a21) -- (b1);
\draw (a22) -- (b3);
\draw (a31) -- (b3);
\draw (a32) -- (b2);
\end{scope}
\end{tikzpicture}
\]

* Compute the cospan $g\circ_1 f$. What is its arity?

* Draw the cospan $g\circ_1 f$. Do you see it as substitution?

* The cospan shown left corresponds to the wiring diagram shown right:

\[
\begin{tikzpicture}[x=.25cm, y=.75cm]
\begin{scope}[every node/.style={draw, inner sep=1.5pt, fill, circle}]
\node (a1) {};
\node[right=1 of a1] (a2) {};
\node[right=2 of a2] (a3) {};
\node[right=1 of a3] (a4) {};
\node at ($(a2)!.5!(a3)+(0,-1)$) (b2) {};
\node[left=1 of b2] (b1) {};
\node[right=1 of b2] (b3) {};
\node at ($(b1)!.5!(b2)+(0,-1)$) (c1) {};
\node[right=1 of c1] (c2) {};
\end{scope}
\begin{scope}[every node/.style={draw, rounded corners, gray, inner ysep=5pt, inner xsep=5pt}]
\node [fit=(a1) (a2)] (inner1) {};
\node [fit=(a3) (a4)] (inner2) {};
\node [fit=(b1) (b3)] (links) {};
\node [fit=(c1) (c2)] (outer){};
\end{scope}
\node[left=1 of inner1, gray] (lab) {inner circles' ports};
\node[gray, left] at (lab.east|-links) {links};
\node[gray, left] at (lab.east|-outer) {outer circle's ports};
\begin{scope}[mapsto]
\draw (a1) -- (b1);
\draw (a2) -- (b2);
\draw (a3) -- (b2);
\draw (a4) -- (b3);
\draw (c1) -- (b1);
\draw (c2) -- (b3);
\end{scope}
\end{tikzpicture}
\hspace{.6in}
\begin{tikzpicture}[unoriented WD, pack size=25pt, pack inside color=white, pack
outside color=black, link size=2pt, font=\footnotesize, spacing=30pt]
\node[pack] at (0,0) (f) {};
\node[pack, right=.6 of f] (g) {};
\node[outer pack, inner xsep=3pt, inner ysep=3pt, fit=(f) (g) ] (fg) {};
\node[link,  left=.2 of f.west] (link1) {};
\node[link] at ($(f)!.5!(g)$) (link2) {};
\node[link,  right=.2 of g.east] (link3) {};
\draw (fg.west) -- (link1);
\draw (f.west) -- (link1);
\draw (f.east) -- (link2);
\draw (g.west) -- (link2);
\draw (g.east) -- (link3);
\draw (fg.east) -- (link3);
\end{tikzpicture}
\]

It has two inner circles, each with two ports. One port of the first is wired to a port of the second. One port of the first is wired to the outside circle, and one port of the second is wired to the outside circle. This is exactly what the cospan says to do.

* The cospan shown left corresponds to the wiring diagram shown right:

\[
\begin{tikzpicture}[x=.25cm, y=.75cm]
\begin{scope}[every node/.style={draw, inner sep=1.5pt, fill, circle}]
\node (a11) {};
\node[right=1 of a11] (a12) {};
\node[right=2 of a12] (a21) {};
\node[right=1 of a21] (a22) {};
\node[right=2 of a22] (a31) {};
\node[right=1 of a31] (a32) {};
\node at ($(a21)!.5!(a22)+(0,-1)$) (b2) {};
\node[left=1 of b2] (b1) {};
\node[right=1 of b2] (b3) {};
\end{scope}
\coordinate (helper) at ($(b2)+(0,-1)$) {};
\begin{scope}[every node/.style={draw, rounded corners, gray, inner ysep=5pt, inner xsep=5pt}]
\node [fit=(a11) (a12)] (inner1) {};
\node [fit=(a21) (a22)] (inner2) {};
\node [fit=(a31) (a32)] (inner3) {};
\node [fit=(b1) (b3)] (links) {};
\node [fit=(helper)] (outer){};
\end{scope}
\node[left=1 of inner1, gray] (lab) {inner circles' ports};
\node[gray, left] at (lab.east|-links) {links};
\node[gray, left] at (lab.east|-outer) {outer circle's ports};
\begin{scope}[mapsto]
\draw (a11) -- (b2);
\draw (a12) -- (b1);
\draw (a21) -- (b1);
\draw (a22) -- (b3);
\draw (a31) -- (b3);
\draw (a32) -- (b2);
\end{scope}
\end{tikzpicture}
\hspace{.6in}
\begin{tikzpicture}[unoriented WD, pack size=15pt, pack inside color=white, pack
outside color=black, link size=2pt, font=\footnotesize, spacing=20pt]
\node[pack] (f) {};
\node[pack, right=1 of f] (g) {};
\node[pack] at ($(f)!.5!(g)+(0,-1.5)$) (h) {};
\node[outer pack, inner xsep=3pt, inner ysep=0pt, fit=(f) (g) (h)] (fgh) {};
\node[link] at ($(f)!.5!(g)$) (linkfg) {};
\node[link] at ($(f)!.5!(h)$) (linkfh) {};
\node[link] at ($(g)!.5!(h)$) (linkgh) {};
\draw (f) -- (linkfg);
\draw (g) -- (linkfg);
\draw (f) -- (linkfh);
\draw (h) -- (linkfh);
\draw (g) -- (linkgh);
\draw (h) -- (linkgh);
\end{tikzpicture}
\]

* The composite $g\circ_1 f$ has arity $(2,2,2,2;0)$; there is a depiction on the left:

\[
\begin{tikzpicture}[x=.25cm, y=.75cm]
\begin{scope}[every node/.style={draw, inner sep=1.5pt, fill, circle}]
\node (a01) {};
\node[right=1 of a01] (a02) {};
\node[right=2 of a02] (a11) {};
\node[right=1 of a11] (a12) {};
\node[right=2 of a12] (a21) {};
\node[right=1 of a21] (a22) {};
\node[right=2 of a22] (a31) {};
\node[right=1 of a31] (a32) {};
\node at ($(a12)!.5!(a21)+(0,-1)$) (b2) {};
\node[left=1 of b2] (b1) {};
\node[right=1 of b2] (b3) {};
\node[below=.3 of b2] (b0) {};
\end{scope}
\coordinate (helper) at ($(b0)+(0,-1)$);
\begin{scope}[every node/.style={draw, rounded corners, gray, inner ysep=5pt, inner xsep=5pt}]
\node [fit=(a01) (a02)] (inner 1) {};
\node [fit=(a11) (a12)] {};
\node [fit=(a21) (a22)] {};
\node [fit=(a31) (a32)] {};
\node [fit=(b0) (b1) (b3)] (links) {};
\node [fit=(helper)] (outer) {};
\end{scope}
\node[left=1 of inner1, gray] (lab) {inner circles' ports};
\node[gray, left] at (lab.east|-links) {links};
\node[gray, left] at (lab.east|-outer) {outer circle's ports};
\begin{scope}[mapsto]
\draw (a01) to[bend right] (b0);
\draw (a32) to[bend left] (b0);
\draw (a02) -- (b1);
\draw (a11) -- (b1);
\draw (a12) -- (b2);
\draw (a21) -- (b2);
\draw (a22) -- (b3);
\draw (a31) -- (b3);
\end{scope}
\end{tikzpicture}
\hspace{.6in}
\begin{tikzpicture}[unoriented WD, pack size=15pt, pack inside color=white, pack
outside color=black, link size=2pt, font=\footnotesize, spacing=20pt]
\node[pack] (f) {};
\node[pack, right=1 of f] (g) {};
\node[pack, below=1 of f] (h) {};
\node[pack, below=1 of g] (i) {};
\node[outer pack, inner xsep=3pt, inner ysep=0pt, fit=(f) (g) (h) (i)] {};
\node[link] at ($(f)!.5!(g)$) (linkfg) {};
\node[link] at ($(f)!.5!(h)$) (linkfh) {};
\node[link] at ($(g)!.5!(i)$) (linkgi) {};
\node[link] at ($(h)!.5!(i)$) (linkhi) {};
\draw (f) -- (linkfg);
\draw (g) -- (linkfg);
\draw (f) -- (linkfh);
\draw (h) -- (linkfh);
\draw (g) -- (linkgi);
\draw (i) -- (linkgi);
\draw (h) -- (linkhi);
\draw (i) -- (linkhi);
\end{tikzpicture}
\]

* The associated wiring diagram is shown on the right above. One can see that one diagram has been substituted in to a circle of the other.

§ SOLUTIONS FOR <REF>.

Prove <ref> using the definition of limit from <ref>.

In the commutative diagram below, suppose the $(B,C,B',C')$ square is a pullback:

\[
\begin{tikzcd}[ampersand replacement=\&]
A\ar[r, "f"]\ar[d, "h_1"]\&B\ar[r, "g"]\ar[d, "h_2"]\&C\ar[d, "h_3"]\\
A'\ar[r, "f'"']\&B'\ar[r, "g'"']\&C'\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

We need to show that the $(A,B,A',B')$ square is a pullback iff the $(A,C,A',C')$ rectangle is a pullback.

Suppose first that $(A,B,A',B')$ is a pullback, and take any $(X,p,q)$ as in the following diagram:

\[
\begin{tikzcd}[ampersand replacement=\&]
X\ar[rrrd, bend left=15pt, "p"]\ar[rdd, bend right=15pt, "q"']\&[-15pt]\\[-5pt]
\&A\ar[r, "f"]\ar[d, "h_1"]\&B\ar[r, pos=.4, "g"]\ar[d, "h_2"']\&C\ar[d, "h_3"']\\
\&A'\ar[r, "f'"']\&B'\ar[r, "g'"']\&C'\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

where $q\cp f'\cp g'=p\cp h_3$. Then by the universal property of the $(B,C,B',C')$ pullback, we get a unique dotted arrow $r$ making the left-hand diagram below commute:

\[
\begin{tikzcd}[ampersand replacement=\&]
X\ar[rrrd, bend left=15pt, "p"]\ar[rrdd, bend right=15pt, "q\cp f'"']\ar[rrd, dashed, "r"']\&[-15pt]\\[-5pt]
\&\&B\ar[r, pos=.4, "g"]\ar[d, "h_2"']\&C\ar[d, "h_3"']\\
\&\&B'\ar[r, "g'"']\&C'\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\hspace{1in}
\begin{tikzcd}[ampersand replacement=\&]
X\ar[rrd, bend left=15pt, "r"]\ar[rdd, bend right=15pt, "q"']\ar[rd, dashed, "r'"]\&[-15pt]\\[-5pt]
\&A\ar[r, "f"]\ar[d, "h_1"]\&B\ar[r, pos=.4, "g"]\ar[d, "h_2"']\&C\ar[d, "h_3"']\\
\&A'\ar[r, "f'"']\&B'\ar[r, "g'"']\&C'\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

In other words $r\cp h_2=g\cp f'$ and $r\cp g=p$. Then by the universal property of the $(A,B,A',B')$ pullback, we get a unique dotted arrow $r'\colon X\to A$ making the right-hand diagram commute, i.e. $r'\cp f=r$ and $r'\cp h_1=q$. This gives the existence of an $r$ with the required property, $r'\cp f=r$ and $r'\cp f\cp g=r\cp g=p$. To see uniqueness, suppose given another morphisms $r_0$ such that $r_0\cp f\cp g=p$ and $r_0\cp h_1=q$:

\[
\begin{tikzcd}[ampersand replacement=\&]
X\ar[dr, "r_0"]\ar[rrrd, bend left=15pt, "p"]\ar[rdd, bend right=20pt, "q"']\&[-15pt]\\[-5pt]
\&A\ar[r, "f"]\ar[d, "h_1"]\&B\ar[r, pos=.4, "g"]\ar[d, "h_2"']\&C\ar[d, "h_3"']\\
\&A'\ar[r, "f'"']\&B'\ar[r, "g'"']\&C'\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

Then by the uniqueness of $r$, we must have $r_0\cp f=r$, and then by the uniqueness of $r'$, we must have $r_0=r'$. This proves the first result.

The second is similar. Suppose that $(A,C,A',C')$ and $(B,C,B',C')$ are pullbacks and suppose given a commutative diagram of the following form:

\[
\begin{tikzcd}[ampersand replacement=\&]
X\ar[rrd, bend left=15pt, "r"]\ar[rdd, bend right=15pt, "q"']\&[-15pt]\\[-5pt]
\&A\ar[r, "f"]\ar[d, "h_1"]\&B\ar[r, pos=.4, "g"]\ar[d, "h_2"']\&C\ar[d, "h_3"']\\
\&A'\ar[r, "f'"']\&B'\ar[r, "g'"']\&C'\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

i.e. where $r\cp h_2=q\cp f'$. Then letting $p\coloneqq r\cp g$, we have

\[p\cp h_3=r\cp g\cp h_3=r\cp h_2\cp g'=q\cp f'\cp g'\]

so by the universal property of the $(A,C,A',C')$ pullback, there is a unique morphism $r'\colon X\to A$ such that $r'\cp f\cp g=p$ and $r_0\cp h_1=q$, as shown:

\[
\begin{tikzcd}[ampersand replacement=\&]
X\ar[dr, "r'"]\ar[rrd, gray, bend left=15pt, "r" description]\ar[rrrd, bend left=15pt, "p"]\ar[rdd, bend right=20pt, "q"']\&[-15pt]\\[-5pt]
\&A\ar[r, "f"]\ar[d, "h_1"]\&B\ar[r, pos=.4, "g"]\ar[d, "h_2"']\&C\ar[d, "h_3"']\\
\&A'\ar[r, "f'"']\&B'\ar[r, "g'"']\&C'\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

But now let $r_0\coloneqq r'\cp f$. It satisfies $r_0\cp g=p$ and $r_0\cp h_2=q\cp f'$, and $r$ satisfies the same equations: $r\cp g=p$ and $r\cp h_2=q\cp f'$. Hence by the universal property of the $(B,C,B',C')$ pullback $r_0=r'$. It follows that $r'$ is a pullback of the $(A,B,A',B')$ square, as desired.

Show that in $\smset$, monomorphisms are just injections:

* Show that if $f$ is a monomorphism then it is injective.

* Show that if $f\colon A\to B$ is injective then it is a monomorphism.

A function $f\colon A\to B$ is injective iff for all $a_1,a_2\in A$, if $f(a_1)=f(a_2)$ then $a_1=a_2$. It is a monomorphism iff for all sets $X$ and functions $g_1,g_2\colon X\to A$, if $g_1\cp f=g_2\cp f$ then $g_1=g_2$. Indeed, this comes directly from the universal property of the pullback from <ref>,

\[
\begin{tikzcd}[ampersand replacement=\&]
X\ar[ddr, bend right=20pt, "g_1"']\ar[drr, bend left=20pt, "g_2"]\ar[dr, dashed]
\&[-10pt]\\[-10pt]
\&A\ar[r, "\id_A"]\ar[d, "\id_A"']\&A\ar[d, "f"]\\
\&A\ar[r, "f"']\&B\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

because the dashed arrow is forced to equal both $g_1$ and $g_2$, thus forcing $g_1=g_2$.

* Suppose $f$ is a monomorphism, let $a_1,a_2\in A$ be elements, and suppose $f(a_1)=f(a_2)$. Let $X=\{*\}$ be a one element set, and let $g_1,g_2\colon X\to A$ be given by $g_1(*)\coloneqq a_1$ and $g_2(*)\coloneqq a_2$. Then $g_1\cp f=g_2\cp f$, so $g_1=g_2$, so $a_1=a_2$.

* Suppose that $f$ is an injection, let $X$ be any set, and let $g_1,g_2\colon X\to A$ be such that $g_1\cp f=g_2\cp f$. We will have $g_1=g_2$ if we can show that $g_1(x)=g_2(x)$ for every $x\in X$. So take any $x\in X$; since $f(g_1(x))=f(g_2(x))$ and $f$ is injective, we have $g_1(x)=g_2(x)$ as desired.

* Show that the pullback of an isomorphism along any morphism is an isomorphism. That is, suppose that $i\colon B'\to B$ is an isomorphism and $f\colon A\to B$ is any morphism. Show that $i'$ is an isomorphism, in the following diagram:

\[
\begin{tikzcd}[ampersand replacement=\&]
A'\ar[r, "f'"]\ar[d, pos=.6, "i'"', "\cong"]\&B'\ar[d, pos=.6, "i", "\cong"']\\
A\ar[r, "f"']\&B\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

* Show that for any map $f\colon A\to B$, the square shown is a pullback:

\[
\begin{tikzcd}
A\ar[r, "f"]\ar[d, equal]&
A\ar[d, equal]\\
B\ar[r, "f"']&
B\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

* Suppose we have a pullback as shown, where $i$ is an isomorphism:

\[
\begin{tikzcd}[ampersand replacement=\&]
A'\ar[r, "f'"]\ar[d, "i'"']\&B'\ar[d, "i", "\cong"']\\
A\ar[r, "f"']\&B\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

Let $j\coloneqq i\inv$ be the inverse of $i$, and consider $g\coloneqq (f\cp j)\colon A\to B'$. Then $g\cp i=f$, so by the existence part of the universal property, there is a map $j'\colon A\to A'$ such that $j'\cp i'=\id_A$ and $j'\cp f'=f\cp j$. We will be done if we can show $i'\cp j'=\id_{A'}$. One checks that $(i'\cp j')\cp i'=i'$ and that $(i'\cp j')\cp f'=i'\cp f\cp j=f'\cp i\cp j=f'$. But $\id_{A'}$ also satisfies those properties: $\id_{A'}\cp i'=i'$ and $\id_{A'}\cp f'=f'$, so by the uniqueness part of the universal property, $(i'\cp j')=\id_{A'}$.

* We need to show that the following diagram is a pullback:

\[
\begin{tikzcd}[ampersand replacement=\&]
A\ar[r, "f"]\ar[d, equal]\&
B\ar[d, equal]\\
A\ar[r, "f"']\&
B\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

So take any object $X$ and morphisms $g\colon X\to A$ and $h\colon X\to B$ such that $g\cp f=h\cp\id_B$. We need to show there is a unique morphism $r\colon X\to A$ such that $r\cp\id_A=g$ and $r\cp f=h$. That's easy: the first requirement forces $r=g$ and the second requirement is then fulfilled.

Let $\cat{C}$ be a category and suppose the following diagram is a pullback in $\cat{C}$:

\[
\begin{tikzcd}[ampersand replacement=\&]
A'\ar[r]\ar[d, "f'"']\&A\ar[d, tail, "f"]\\
B'\ar[r]\&B\ar[ul, phantom, very near end, "\lrcorner"]
\end{tikzcd}
\]

Use <ref> to show that if $f$ is a monomorphism, then so is $f'$.

Consider the diagram shown left, in which all three squares are pullbacks:

\[
\begin{tikzcd}[ampersand replacement=\&, sep=small]
\&\&
A\ar[rd, equal]\ar[dd, equal]\\
\&A'\ar[rr, crossing over, pos=.25, "g"]\&\&
A\ar[dd, pos=.25, "f"]\\
A'\ar[rr, pos=.75, "g"']\ar[dr, "f'"']\&\&
A\ar[rd, "f"]\\
\&B'\ar[from=uu, crossing over, pos=.25, "f'"']\ar[rr, "h"']\&\&
\end{tikzcd}
\hspace{1in}
\begin{tikzcd}[ampersand replacement=\&, sep=small]
A'\ar[rr, "g"]\ar[dd, equal]\ar[rd, equal]\ar[drrr, gray, dotted]\&\&
A\ar[rd, equal]\ar[dd, equal]\\
\&A'\ar[rr, crossing over, pos=.25, "g"]\&\&
A\ar[dd, pos=.25, "f"]\\
A'\ar[rr, pos=.75, "g"']\ar[dr, "f'"']\ar[drrr, gray, dotted]\&\&
A\ar[rd, "f"]\\
\&B'\ar[from=uu, crossing over, pos=.25, "f'"']\ar[rr, "h"']\&\&
\end{tikzcd}
\]

The front and bottom squares are the same—the assumed pullback—and the right-hand square is a pullback because $f$ is assumed monic. We can complete it to the commutative diagram shown right, where the back square and top square are pullbacks by <ref>. Our goal is to show that the left-hand square is a pullback.

To do this, we use two applications of the pasting lemma, <ref>.
Since the right-hand face is a pullback and the back face is a pullback, the diagonal rectangle (lightly drawn) is also a pullback. Since the front face is a pullback, the left-hand face is also a pullback.

Factor the following function $f\colon \ord{3}\to \ord{3}$ as an epimorphism followed by a monomorphism.

\[
\begin{tikzpicture}
\foreach \x in {0,...,2}
{\draw (0,.4-.4*\x) node (X0\x) {$\bullet$};}
\node[draw, ellipse, inner sep=0pt, fit=(X00) (X02)] (X0) {};
\foreach \x in {0,...,2}
{\draw (2,.4-.4*\x) node (Y0\x) {$\bullet$};}
\node[draw, ellipse, inner sep=0pt, fit=(Y00) (Y02)] (Y0) {};
\draw[mapsto] (X00.center) -- (Y01.center);
\draw[mapsto] (X01.center) -- (Y01.center);
\draw[mapsto] (X02.center) -- (Y02.center);
\end{tikzpicture}
\]

The following is an epi-mono factorization of $f$:

\[
\begin{tikzpicture}
\foreach \x in {0,...,2}
{\draw (0,.4-.4*\x) node (X0\x) {$\bullet$};}
\node[draw, ellipse, inner sep=0pt, fit=(X00) (X02)] (X0) {};
\foreach \x in {1,...,2}
{\draw (2,.4-.4*\x) node (Y0\x) {$\bullet$};}
\node[draw, ellipse, inner sep=0pt, fit=(Y01) (Y02)] (Y0) {};
\foreach \x in {0,...,2}
{\draw (4,.4-.4*\x) node (Z0\x) {$\bullet$};}
\node[draw, ellipse, inner sep=0pt, fit=(Z00) (Z02)] (Y0) {};
\begin{scope}[short=-2pt, mapsto]
\draw (X00) -- (Y01);
\draw (X01) -- (Y01);
\draw (X02) -- (Y02);
\draw (Y01) -- (Z01);
\draw (Y02) -- (Z02);
\end{scope}
\end{tikzpicture}
\]

Let $\cat{V}=(V,\leq,I,\otimes,\multimap)$ be a (unital, commutative) quantale—see
<ref>—and suppose it satisfies the following for all $v,w,x\in V$:

* $v\leq I$,

* $v\otimes w\leq v$ and $v\otimes w\leq w$

* $if $x≤v$ and $x≤w$ then $x≤v⊗w$.
\end{enumerate}
\begin{enumerate}
\item Show that $\cat{V}$ is a cartesian closed category, in fact a cartesian closed preorder.
\item Can every cartesian closed preorder be obtained in this way?
\qedhere
\end{enumerate}
\begin{enumerate}
\item If $\cat{V}$ is a quantale with the stated properties, then
\begin{itemize}
\item $I$ serves as a top element: $v\leq I$ for all $v\in V$.
\item $v\otimes w$ serves as a meet operation, i.e.\ it satisfies the same universal property as $\wedge$, namely $v\otimes w$ is a greatest lower bound for $v$ and $w$.
\end{itemize}
Now the $\multimap$ operation satisfies the same universal property as exponentiation (hom-object) does, namely $v\leq (w\multimap x)$ iff $v\otimes W\leq x$. So $\cat{V}$ is a cartesian closed category, and of course it is a preorder.
\item Not every cartesian closed preorder comes from a quantale with the stated properties, because quantales have all joins and cartesian closed preorders need not. Finding a counterexample---a cartesian closed preorder that is missing some joins---takes some ingenuity, but it can be done. Here's one we came up with:
\[
\begin{tikzcd}[ampersand replacement=\&, sep=small, font=\small]
(0,3)\ar[from=r, -, dotted]\ar[from=d, -, dotted]
\&{}\\
(1,2)\ar[from=r, -, dotted]\ar[from=d, -, dotted]
\&{}\\
(1,1)\ar[from=r, -, dotted]\ar[from=d, -, dotted]
\&{}\\
(3,0)\ar[from=r, -, dotted]\ar[from=d, -, dotted]
\&{}\\
\end{tikzcd}
\]
This is the product preorder $\nn\op\times\nn\op$: its objects are pairs $(a,b)\in\nn\times\nn$ with $(a,b)\leq(a',b')$ iff, in the usual ordering on $\nn$ we have $a'\leq a$ and $b'\leq b$. But you can just look at the diagram.\\

It has a top element, $(0,0)$, and it has binary meets, $(a,b)\wedge(a',b')=(\max(a,a'),\max(b,b'))$. But it has no bottom element, so it has no empty join. Thus we will be done if we can show that for each $x,y$, the hom-object $x\multimap y$ exists. The formula for it is $x\multimap y=\bigvee\{w\mid w\wedge x\leq y\}$, i.e.\ we need these particular joins to exist. Since $y\wedge x\leq y$, we have $y\leq x\multimap y$. So we can replace the formula with $x\multimap y=\bigvee\{w\mid y\leq w\text{ and }w\wedge x\leq y\}$. But the set of elements in $\nn\op\times\nn\op$ that are bigger than $y$ is finite and nonempty.%
\footnote{If $y=(a,b)$ then there are exactly $(a+1)*(b+1)$ elements $y'$ for which $y\leq y'$.}
So this is a finite nonempty join, and $\nn\op\times\nn\op$ has all finite nonempty joins: they are given by $\inf$.
\end{enumerate}

\sol{exc.characteristic_practice}{
Let $X=\NN=\{0,1,2,\ldots\}$ and $Y=\ZZ=\{\ldots,-1,0,1,2,\ldots\}$; we have
$X\ss Y$, so consider it as a monomorphism $m\colon X\to Y$. It has a
characteristic function $\corners{m}\colon Y\to\BB$, as in
\cref{def.subobject_classifier}.
\begin{enumerate}
\item What is $\corners{m}(-5)\in\BB$?
\item What is $\corners{m}(0)\in\BB$?
\end{enumerate}
Let $m\colon \ZZ\to\BB$ be the characteristic function of the inclusion $\nn\ss\zz$.

\begin{enumerate*}[itemjoin=\hspace{1in}]
\item $\corners{m}(-5)=\false$.
\item $\corners{m}(0)=\true.$
\end{enumerate*}

\sol{exc.simple_char_funs}{
\begin{enumerate}
\item Consider the identity function $\id_\NN\colon \NN\to \NN$. It is an
injection, so it has a characteristic function $\corners{\id_\NN}\colon
\NN\to\BB$.  Give a concrete description of $\corners{\id_\NN}$, i.e.\ its
exact value for each natural number $n\in\NN$.
\item Consider the unique function $!_\NN\colon\varnothing\to\NN$ from the
empty set. Give a concrete description of $\corners{!_\NN}$.
\end{enumerate}
\begin{enumerate}
\item The characteristic function $\corners{\id_\NN}\colon\NN\to\BB$ sends each $n\in\nn$ to $\true$.
\item Let $!_\NN\colon\varnothing\to\nn$ be the inclusion of the empty set. The characteristic function $\corners{!_\NN}\colon\NN\to\BB$ sends each $n\in\nn$ to $\false$.
\end{enumerate}

\sol{exc.neg_char}{
Every boolean has a negation, $\neg\false=\true$ and $\neg\true=\false$. The function $\neg\colon\BB\to\BB$ is the characteristic function of some thing, (*?*).
\begin{enumerate}
\item What sort of thing should (*?*) be? For example, should $\neg$ be the characteristic function of an object? A topos? A morphism? A subobject? A pullback diagram?
\item Now that you know the sort of thing (*?*) is, which thing of that sort is it?
\end{enumerate}
\begin{enumerate}
\item The sort of thing (*?*) we're looking for is a subobject of $\BB$, say $A\ss\BB$. This would have a characteristic function, and we're trying to find the $A$ for which the characteristic function is $\neg\colon\BB\to\BB$.
\item The question now asks ``what is $A$?'' The answer is $\{\false\}\ss\BB$.
\end{enumerate}

\sol{exc.implies_char}{
Given two booleans $P,Q$, define $P\imp Q$ to mean $P=(P\wedge Q)$.
\begin{enumerate}
\item Write down the truth table for the statement $P=(P\wedge Q)$:
\[
\begin{array}{cc||c|c}
P&Q&P\wedge Q&P=(P\wedge Q)\\
\true&\true&\?&\?\\
\true&\false&\?&\?\\
\false&\true&\?&\?\\
\false&\false&\?&\?\\
\end{array}
\]
\item If you already have an idea what $P\imp Q$ should mean, does it agree with the last column of table above?
\item What is the characteristic function $m\colon \BB\times\BB\to\BB$ for $P\imp Q$?
\item What subobject does $m$ classify?
\end{enumerate}
\begin{enumerate}
\item Here is the truth table for $P=(P\wedge Q)$:
\begin{equation}\label{eqn.truth_table_imp}
\begin{array}{cc||c|c}
P&Q&P\wedge Q&P=(P\wedge Q)\\
\true&\true&\true&\true\\
\true&\false&\false&\false\\
\false&\true&\false&\true\\
\false&\false&\false&\true\\
\end{array}
\end{equation}
\item Yes!
\item The characteristic function for $P\imp Q$ is the function $\corners{\imp}\colon\BB\times\BB\to\BB$ given by the first, second, and fourth column of \cref{eqn.truth_table_imp}.
\item It classifies the subset $\{(\true,\true),(\false,\true),(\false,\false)\ss\BB\times\BB$.
\end{enumerate}

\sol{exc.even_prime_10}{
Consider the sets $E\coloneqq\{n\in\NN\mid n\text{ is even}\}$, $P\coloneqq\{n\in\NN\mid n\text{ is prime}\}$, and $T\coloneqq\{n\in\NN\mid n\geq 10\}$. Each is a subset of $\NN$, so defines a function $\NN\to\BB$.
\begin{enumerate}
\item What is $\corners{E}(17)$?
\item What is $\corners{P}(17)$?
\item What is $\corners{T}(17)$?
\item Name the smallest three elements in the set classified by $(\corners{E}\wedge\corners{P})\vee\corners{T}$.
\end{enumerate}
Say that $\corners{E},\corners{P},\corners{T}\colon\nn\to\bb$ classify respectively the subsets $E\coloneqq\{n\in\NN\mid n\text{ is even}\}$, $P\coloneqq\{n\in\NN\mid n\text{ is prime}\}$, and $T\coloneqq\{n\in\NN\mid n\geq 10\}$ of $\nn$.
\begin{enumerate}
\item $\corners{E}(17)=\false$ because $17$ is not even.
\item $\corners{P}(17)=\true$ because $17$ is prime.
\item $\corners{T}(17)=\true$ because $17\geq 10$.
\item The set classified by $(\corners{E}\wedge\corners{P})\vee\corners{T}$ is that of all natural numbers that are either above 10 or an even prime. The smallest three elements of this set are $2, 10, 11$.
\end{enumerate}

\sol{ex.usual_top_R}{
\begin{enumerate}
\item What is the 1-dimensional analogue of $\epsilon$-balls as found in \cref{ex.usual_R}? That is, for each $x\in\RR$, define $B(x,\epsilon)$.
\item When is an arbitrary subset $U\ss\RR$ called open, in analogy with \cref{ex.usual_R}?
\item Find three open sets $U_1$, $U_2$, and $U$ in $\RR$, such that $(U_i)_{i\in\{1,2\}}$ covers $U$.
\item Find an open set $U$ and a collection $(U_i)_{i\in I}$ of opens sets where $I$ is infinite, such that $(U_i)_{i\in I}$ covers $U$.
\end{enumerate}
\begin{enumerate}
\item The 1-dimensional analogue of an $\epsilon$-ball around a point $x\in\RR$ is $B(x,\epsilon)\coloneqq\{x'\in\RR\mid |x-x'|<\epsilon\}$, i.e.\ the set of all points within $\epsilon$ of $x$.
\item A subset $U\ss\RR$ is open if, for every $x\in U$ there is some $\epsilon>0$ such that $B(x,\epsilon)\ss U$.
\item Let $U_1\coloneqq\{x\in\RR\mid 0<x<2\}$ and $U_2\coloneqq\{x\in\RR\mid 1<x<3\}$. Then $U\coloneqq U_1\cup U_2=\{x\in\RR\mid 0<x<3\}$.
\item Let $I=\{1,2,3,4,\ldots\}$ and for each $i\in I$ let $U_i\coloneqq\{x\in\RR\mid \frac{1}{i}<x<1\}$, so we have $U_1\ss U_2\ss U_3\ss\cdots$. Their union is $U\coloneqq\bigcup_{i\in I}U_i=\{x\in\RR\mid 0<x<1\}$.
\end{enumerate}

\sol{exc.course_fine}{
\begin{enumerate}
\item Verify that for any set $X$, what we called $\Op_{\mathrm{crse}}$ in \cref{ex.coarse_fine} really is a topology, i.e.\ satisfies the conditions of \cref{def.topological_space}.
\item Verify also that $\Op_{\mathrm{fine}}$ really is a topology.
\item Show that if $(X,\powset(X))$ is discrete and $(Y,\Op_Y)$ is any topological space, then every function $X\to Y$ is continuous.
\end{enumerate}
\begin{enumerate}
\item The coarse topology on $X$ is the one whose only open sets are $X\ss X$ and $\varnothing\ss X$. This is a topology because it contains the top and bottom subsets, it is closed under finite intersection (the intersection $A\cap B$ is $\varnothing$ iff one or the other is $\varnothing$), and it is closed under arbitrary union (the union $\bigcup_{i\in I}A_i$ is $X$ iff $A_i=X$ for some $i\in I$).
\item The fine topology on $X$ is the one where every subset $A\ss X$ is considered open. All the conditions on a topology say ``if such-and-such then such-and-such is open,'' but these are all satisfied because everything is open!
\item If $(X,\powset(X))$ is discrete, $(Y,\Op_Y)$ is any topological space, and $f\colon X\to Y$ is any function then it is continuous. Indeed, this just means that for any open set $U\ss Y$ the preimage $f\inv(U)\ss X$ is open, and everything in $X$ is open.
\end{enumerate}

\sol{exc.opens_Sierp}{
Recall the Sierpinski space, say $(X,\Op_1)$ from \cref{ex.Sierpinski}.
\begin{enumerate}
\item Write down the Hasse diagram for its preorder of opens.
\item Write down all the coverings.
\end{enumerate}
\begin{enumerate}
\item The Hasse diagram for the Sierpinsky topology is \fbox{$\varnothing\to\{1\}\to\{1,2\}$}.
\item A set $(U_i)_{i\in I}$ covers $U$ iff either
\begin{itemize}
\item $I=\varnothing$ and $U=\varnothing$; or
\item $U_i=U$ for some $i\in I$.
\end{itemize}
In other words, the only way that some collection of these sets could cover another set $U$ is if that collection contains $U$ or if $U$ is empty and the collection is also empty.
\end{enumerate}

\sol{exc.subspace_topology}{
Given any topological space $(X,\Op)$, any subset $Y\subseteq X$ can be given the
\emph{subspace topology}, call it $\Op_{?\cap Y}$. This topology defines any $A \subseteq Y$ to be open, $A\in\Op_{?\cap Y}$,
if there is an open set $B\in\Op$ such that $A = B \cap Y$.
\begin{enumerate}
\item Find a $B\in\Op$ that shows that the whole set $Y$ is open, i.e.\ $Y\in\Op_{?\cap Y}$.
\item Show that $\Op_{?\cap Y}$ is a topology in the sense of \cref{def.topological_space}.%
\footnote{Hint 1: for any set $I$, collection of sets $(U_i)_{i\in I}$ with $U_i\ss X$, and set $V\ss X$, one has $\left(\bigcup_{i\in I}U_i\right)\cap V=\bigcup_{i\in I}(U_i\cap V)$. Hint 2: for any $U, V, W\ss X$, one has $(U\cap W)\cap (V\cap W)=(U\cap V)\cap W$.}
\item Show that the inclusion function $Y \hookrightarrow X$ is a
continuous function.
\end{enumerate}
Let $(X,\Op)$ be a topological space, suppose that $Y\ss X$ is a subset, and consider the subspace topology $\Op_{?\cap Y}$.
\begin{enumerate}
\item We want to show that $Y\in\Op_{?\cap Y}$. We need to find $B\in\Op$ such that $Y=B\cap Y$; this is easy, you could take $B=Y$ or $B=X$, or anything in between.
\item We still need to show that $\Op_{?\cap Y}$ contains $\varnothing$ and is closed under finite intersection and arbitrary union. $\varnothing=\varnothing\cap Y$, so according to the formula, $\varnothing\in\Op_{?\cap Y}$. Suppose that $A_1,A_2\in\Op_{?\cap Y}$. Then there exist $B_1,B_2\in\Op$ with $A_1=B_1\cap Y$ and $A_2=B_2\cap Y$. But then $A_1\cap A_2=(B_1\cap Y)\cap (B_2\cap Y)=(B_1\cap B_2)\cap Y$, so it is in $\Op_{?\cap Y}$ since $B_1\cap B_2\in\Op$. The same idea works for arbitrary unions: given a set $I$ and $A_i$ for each $i\in I$, we have $A_i=B_i\cap Y$ for some $B_i\in\Op$, and
\[\bigcup_{i\in I}A_i=\bigcup_{i\in I}(B_i\cap Y)=\left(\bigcup_{i\in i}B_i\right)\cap Y\in\Op_{?\cap Y}.\]
\end{enumerate}

\sol{exc.top_sp_quantale}{
In \cref{subsec.Lawv_metric_spaces,subsec.preorders_Bool_enriched} we discussed how $\Bool$-categories are preorders and $\Cost$-categories are Lawvere metric spaces, and in \cref{subsec.variations_quantale} we imagined interpretations of $\cat{V}$-categories for other quantales $\cat{V}$.

If $(X,\Op)$ is a topological space and $\cat{V}$ the corresponding quantale as in \cref{rem.top_sp_quantale}, how might we imagine a $\cat{V}$-category?
Let's imagine a $\cat{V}$-category $\cat{C}$, where $\cat{V}$ is the quantale corresponding to the open sets of a topological space $(X,\Op)$. Its Hasse diagram would be a set of dots and some arrows between them, each labeled by an open set $U\ss\Op$. It might look something like this:
\[
\begin{tikzpicture}[font=\scriptsize, x=1cm]
\node (a) {$\LMO{A}$};
\node[right=1 of a] (b) {$\LMO{B}$};
\node[below=1 of a] (c) {$\LMO[under]{C}$};
\node[right=1 of c] (d) {$\LMO[under]{D}$};
\draw[->] (c) to node[above left=-1pt and -1pt] {$U_5$} (b);
\draw[bend right,->] (a) to node[left] {$U_1$} (c);
\draw[bend left,->] (d) to node[below] {$U_2$} (c);
\draw[bend right,->] (b) to node[above] {$U_3$} (a);
\draw[bend left,->] (b) to node[right] {$U_4$} (d);
\node[draw, inner sep=20pt, fit=(a) (b) (c) (d)] (X) {};
\node[left=0 of X, font=\normalsize] {$\cat{C}\coloneqq$};
\end{tikzpicture}
\]
Recall from \cref{sec.enrichment} that the `distance' between two points is computed by taking the join, over all paths between them, of the monoidal product of distances along that path. For example, $\cat{C}(B,C)=(U_3\wedge U_1)\vee(U_4\wedge U_2)$, because $\wedge$ is the monoidal product in $\cat{V}$.\\

In general, we can thus imagine the open set $\cat{C}(a,b)$ as a kind of `size restriction' for getting from $a$ to $b$, like bridges that your truck needs to pass under. The size restriction for getting from $a$ to itself is $X$: no restriction. In general, to go on any given route (path) from $a$ to $b$, you have to fit under every bridge in the path, so we take their meet. But we can go along any path, so we take the join over all paths.

\sol{exc.fiber_practice}{
Consider the function $f\colon X\to Y$ shown in \cref{eqn.sections_of_function}.
\begin{enumerate}
\item What is the fiber of $f$ over $a$?
\item What is the fiber of $f$ over $c$?
\item What is the fiber of $f$ over $d$?
\item Gave an example of a function $f'\colon X\to Y$ for which every fiber has either one or two elements.
\end{enumerate}
\begin{equation}\label{eqn.sections_of_function_redraw}
\begin{tikzpicture}[y=.35cm, baseline=(f),
every label quotes/.style={font=\scriptsize, above, label distance=-5pt}]
\node["$a$"] (Ya) {$\bullet$};
\node[right=1 of Ya,  "$b$"] (Yb) {$\bullet$};
\node[right=1 of Yb,  "$c$"] (Yc) {$\bullet$};
\node[right=1 of Yc,  "$d$"] (Yd) {$\bullet$};
\node[right=1 of Yd,  "$e$"] (Ye) {$\bullet$};
\node[draw, inner ysep=4pt, fit={(Ya) ($(Yb.north)+(0,1ex)$) (Ye)}] (Y) {};
\node[left=0 of Y] (Ylab) {$Y\coloneqq$};
\node[above=4 of Ya, "$a_1$"] (Xa1) {$\bullet$};
\node[above=1 of Xa1, "$a_2$"] (Xa2) {$\bullet$};
\node[above=4 of Yb, "$b_1$"] (Xb1) {$\bullet$};
\node[above=1 of Xb1, "$b_2$"] (Xb2) {$\bullet$};
\node[above=1 of Xb2, "$b_3$"] (Xb3) {$\bullet$};
\node[above=4 of Yc, "$c_1$"] (Xc1) {$\bullet$};
\node[above=4 of Ye, "$e_1$"] (Xe1) {$\bullet$};
\node[above=1 of Xe1, "$e_2$"] (Xe2) {$\bullet$};
\node[draw, inner ysep=3pt, fit={(Xa2) ($(Xb3.north)+(0,1ex)$) (Xe1)}] (X) {};
\node[left=0 of X] {$X\coloneqq$};
\draw[->, shorten <=3pt, shorten >=3pt] (X) to node[left] (f) {$f$} (Y);
\end{tikzpicture}
\end{equation}
\begin{enumerate}
\item The fiber of $f$ over $a$ is $\{a_1,a_2\}$.
\item The fiber of $f$ over $c$ is $\{c_1\}$.
\item The fiber of $f$ over $d$ is $\varnothing$.
\item A function $f'\colon X\to Y$ for which every fiber has either one or two elements is shown below.
\end{enumerate}
\[
\begin{tikzpicture}[y=.35cm, every label quotes/.style={font=\scriptsize, above, label distance=-5pt}, baseline=(f)]
\node["$a$"] (Ya) {$\bullet$};
\node[right=1 of Ya,  "$b$"] (Yb) {$\bullet$};
\node[right=1 of Yb,  "$c$"] (Yc) {$\bullet$};
\node[right=1 of Yc,  "$d$"] (Yd) {$\bullet$};
\node[right=1 of Yd,  "$e$"] (Ye) {$\bullet$};
\node[draw, inner ysep=4pt, fit={(Ya) ($(Yb.north)+(0,1ex)$) (Ye)}] (Y) {};
\node[left=0 of Y] (Ylab) {$Y\coloneqq$};
\node[above=4 of Ya, "$e_1$"] (Xa1) {$\bullet$};
\node[above=1 of Xa1, "$a_2$"] (Xa2) {$\bullet$};
\node[above=4 of Yb, "$b_1$"] (Xb1) {$\bullet$};
\node[above=1 of Xb1, "$c_1$"] (Xb2) {$\bullet$};
\node[above=4 of Yc, "$b_2$"] (Xc1) {$\bullet$};
\node[above=4 of Yd, "$b_3$"] (Xe1) {$\bullet$};
\node[above=4 of Ye, "$a_1$"] (Xe1) {$\bullet$};
\node[above=1 of Xe1, "$e_2$"] (Xe2) {$\bullet$};
\node[draw, inner ysep=3pt, fit={(Xa2) ($(Xb3.north)+(0,1ex)$) (Xe1)}] (X) {};
\node[left=0 of X] {$X\coloneqq$};
\draw[->, shorten <=3pt, shorten >=3pt] (X) to node[left] (f) {$f$} (Y);
\end{tikzpicture}
\]

\sol{exc.presheaf_ex_cont}{
Refer to \cref{eqn.sections_of_function}.
\begin{enumerate}
\item Let $V_1=\{a,b,c\}$. Draw all the sections over it, i.e.\ all elements of $\Fun{Sec}_f(V_1)$, as we did in \cref{eqn.all_six_sections}.
\item Let $V_2=\{a,b,c,d\}$. Again draw all the sections, $\Fun{Sec}_f(V_2)$.
\item Let $V_3=\{a,b,d,e\}$. How many sections (elements of $\Fun{Sec}_f(V_3)$) are there?
\end{enumerate}
Refer to \cref{eqn.sections_of_function_redraw}.
\begin{enumerate}
\item Here is a drawing of all six sections over $V_1=\{a,b,c\}$:
\[
\begin{tikzpicture}[y=.25cm, x=.1cm, every label/.style={font=\scriptsize}, trim left=2cm]
\node (Ya6) {};
\foreach \i [remember=\i as \lasti (initially 6)] in {0,...,5} {
\node[label={[below=6.5pt]:$a$}, right=17 of Ya\lasti]   (Ya\i)  {$\bullet$};
\node[label={[below=5pt]:$b$}, right=1 of Ya\i]  (Yb\i)  {$\bullet$};
\node[label={[below=6.5pt]:$c$}, right=1 of Yb\i]  (Yc\i)  {$\bullet$};
\node[above=4 of Ya\i]  (Xa1\i) {$\bullet$};
\node[above=1 of Xa1\i] (Xa2\i) {$\bullet$};
\node[above=4 of Yb\i]  (Xb1\i) {$\bullet$};
\node[above=1 of Xb1\i] (Xb2\i) {$\bullet$};
\node[above=1 of Xb2\i] (Xb3\i) {$\bullet$};
\node[above=4 of Yc\i]  (Xc1\i) {$\bullet$};
\node[draw, fit=(Ya\i) (Yb\i) (Yc\i)] (Y\i) {};
\node[draw, fit=(Xa1\i) (Xb3\i) (Xc1\i)] (X\i) {};
\draw[->, shorten <=3pt, shorten >=3pt] (X\i) -- (Y\i);
\tikzmath{
int \a, \b, \ii;
\a = 1+div(\i, 3);
\b = 1+mod(\i,3);
\ii=1+\i;
\node[above=0 of X\i] {$g_{\ii}$};
\begin{scope}[|->, dashed, thick, blue, shorten >=-2pt]
\draw[ bend left=10pt] (Ya\i) to (Xa\a\i);
\draw[bend right=10pt] (Yb\i) to (Xb\b\i);
\draw[bend right=10pt] (Yc\i) to (Xc1\i);
\node[circle, dotted, draw] at (Xa\a\i) {};
\node[circle, dotted, draw] at (Xb\b\i) {};
\node[circle, dotted, draw] at (Xc1\i) {};
\end{scope}
\end{tikzpicture}
\]
\item When $V_2=\{a,b,c,d\}$, there are no sections: $\Fun{Sec}_f(V_2)=\varnothing$.
\item When $V_3=\{a,b,d,e\}$, the set $\Fun{Sec}_f(V_3)$) has $2*3*1*2=12$ elements.
\end{enumerate}

\sol{exc.section_practice}{
\begin{enumerate}
\item Write out the sets of sections $\Fun{Sec}_f(\{a,b,c\})$ and $\Fun{Sec}_f(\{a,c\})$.
\item Draw lines from the first to the second to indicate the restriction map.
\end{enumerate}
$\Fun{Sec}_f(\{a,b,c\})$ and $\Fun{Sec}_f(\{a,c\})$ are drawn as the top row (six-element set) and bottom row (two-element set) below, and the restriction map is also shown:
\[
\begin{tikzcd}[ampersand replacement=\&, column sep=8pt]
(a_1,b_1,c_1)\ar[dr, |->]\&
(a_1,b_2,c_1)\ar[d, |->]\&
(a_1,b_3,c_1)\ar[dl, |->]\&
(a_2,b_1,c_1)\ar[dr, |->]\&
(a_2,b_2,c_1)\ar[d, |->]\&
(a_2,b_3,c_1)\ar[dl, |->]\\
\&(a_1,c_1)\&\&\&
\end{tikzcd}
\]

\sol{exc.sections_agree_overlap}{
Again let $U_1=\{a,b\}$ and $U_2=\{b,e\}$, so the overlap is $U_1\cap U_2=\{b\}$.
\begin{enumerate}
\item Find a section $g_1\in\Fun{Sec}_f(U_1)$ and a section $g_2\in\Fun{Sec}_f(U_2)$ that \emph{do not} agree on the overlap.
\item For your answer ($g_1,g_2)$ in part 1, can you find a section $g\in\Fun{Sec}_f(U_1\cup U_2)$ such that $\restrict{g}{U_1}=g_1$ and $\restrict{g}{U_2}=g_2$?
\item Find a section $h_1\in\Fun{Sec}_f(U_1)$ and a section $h_2\in\Fun{Sec}_f(U_2)$ that \emph{do} agree on the overlap, but which are different than our choice in \cref{eqn.one_section}.
\item Can you find a section $h\in\Fun{Sec}_f(U_1\cup U_2)$ such that $\restrict{h}{U_1}=h_1$ and $\restrict{h}{U_2}=h_2$?
\end{enumerate}
\begin{enumerate}
\item Let $g_1\coloneqq(a_1,b_1)$ and $g_2\coloneqq(b_2,e_1)$; these do not agree on the overlap.
\item No, there's no section $g\in\Fun{Sec}_f(U_1\cup U_2)$ for which $\restrict{g}{U_1}=g_1$ and $\restrict{g}{U_2}=g_2$.
\end{enumerate}
\[
\begin{tikzpicture}[y=.4cm, x=.4cm, every label quotes/.style={font=\scriptsize, above, label distance=-5pt}, baseline=(f)]
\node["$a$"] (Ya)  {$\bullet$};
\node[right=1 of Ya, red, "$b$" red]  (Yb)  {$\bullet$};
\node[above=4 of Ya,  "$a_1$"]  (Xa1) {$\bullet$};
\node[above=1 of Xa1, "$a_2$"] (Xa2) {$\bullet$};
\node[above=4 of Yb,  "$b_1$"]  (Xb1) {$\bullet$};
\node[above=1 of Xb1, "$b_2$"] (Xb2) {$\bullet$};
\node[above=1 of Xb2, "$b_3$"] (Xb3) {$\bullet$};
\node[draw, fit={(Ya) ($(Yb.north east)+(0,1)$)}] (Y) {};
\node[draw, fit={(Xa1) ($(Xb3.north east)+(0,1)$)}] (X) {};
\draw[->, shorten <=3pt, shorten >=3pt] (X) to node (f) {} (Y);
\node[above=0 of X] {$h_1$};
\begin{scope}[|->, dashed, thick, blue, shorten <=2pt, shorten >=-2pt]
\draw[bend left] (Ya) to (Xa2);
\draw[red, bend right] (Yb) to (Xb3);
\node[circle, dotted, draw] at (Xa2) {};
\node[red, circle, dotted, draw] at (Xb3) {};
\end{scope}
\node[right=5 of Yb, red, "$b$" red]   (Ybb)  {$\bullet$};
\node[right=1 of Ybb,  "$e$"]   (Yee)  {$\bullet$};
\node[above=4 of Ybb,  "$b_1$"] (Xbb1) {$\bullet$};
\node[above=1 of Xbb1, "$b_2$"] (Xbb2) {$\bullet$};
\node[above=1 of Xbb2, "$b_3$"] (Xbb3) {$\bullet$};
\node[above=4 of Yee,  "$e_1$"] (Xee1) {$\bullet$};
\node[above=1 of Xee1, "$e_2$"] (Xee2) {$\bullet$};
\node[draw, fit={(Ybb) ($(Yee.north east)+(0,1)$)}] (YY) {};
\node[draw, fit={(Xee1) ($(Xbb3.north west)+(0,1)$)}] (XX) {};
\draw[->, shorten <=3pt, shorten >=3pt] (XX) -- (YY);
\node[above=0 of XX] {$h_2$};
\begin{scope}[|->, dashed, thick, blue, shorten <=2pt, shorten >=-2pt]
\draw[red, bend left] (Ybb) to (Xbb3);
\draw[green!50!black, bend right] (Yee) to (Xee1);
\node[red, circle, dotted, draw] at (Xbb3) {};
\node[green!50!black, circle, dotted, draw] at (Xee1) {};
\end{scope}
\node[above left=0 and 1 of Y.south west] {3.};
\node[right=12 of Ybb, "$a$"] (Ya)  {$\bullet$};
\node[right=1 of Ya, red, "$b$" red]  (Yb)  {$\bullet$};
\node[right=1 of Yb,  "$e$"]   (Yee)  {$\bullet$};
\node[above=4 of Ya,  "$a_1$"]  (Xa1) {$\bullet$};
\node[above=1 of Xa1, "$a_2$"] (Xa2) {$\bullet$};
\node[above=4 of Yb,  "$b_1$"]  (Xb1) {$\bullet$};
\node[above=1 of Xb1, "$b_2$"] (Xb2) {$\bullet$};
\node[above=1 of Xb2, "$b_3$"] (Xb3) {$\bullet$};
\node[above=4 of Yee,  "$e_1$"] (Xee1) {$\bullet$};
\node[above=1 of Xee1, "$e_2$"] (Xee2) {$\bullet$};
\node[draw, fit={(Ya) ($(Yb.north east)+(0,1)$) (Yee)}] (Y) {};
\node[draw, fit={(Xa1) ($(Xb3.north east)+(0,1)$) (Xee1)}] (X) {};
\draw[->, shorten <=3pt, shorten >=3pt] (X) -- (Y);
\node[above=0 of X] {glued section};
\begin{scope}[|->, dashed, thick, blue, shorten <=2pt, shorten >=-2pt]
\draw[bend left] (Ya) to (Xa2);
\draw[red, bend right] (Yb) to (Xb3);
\draw[bend right, green!50!black] (Yee) to (Xee1);
\node[circle, dotted, draw] at (Xa2) {};
\node[circle, red, dotted, draw] at (Xb3) {};
\node[circle, green!50!black, dotted, draw] at (Xee1) {};
\end{scope}
\node[above left=0 and 1 of Y.south west] {4.};
\end{tikzpicture}
\]

\sol{exc.whats_the_sheaf}{
If $M$ is a sphere as in \cref{ex.tangent_bundle}, we know from \cref{def.sheaf} that we can consider the category $\Shv(M)$ of sheaves on $M$; in fact, such categories are toposes and these are what we're getting to.

But are the sheaves on $M$ the vector fields? That is, is there a one-to-one correspondence between sheaves on $M$ and vector fields on $M$? If so, why? If not, how are sheaves on $M$ and vector fields on $M$ related?
No, there is not a one-to-one correspondence between sheaves on $M$ and vector fields on $M$. The relationship between sheaves on $M$ and vector fields on $M$ is that the \emph{set of all} vector fields on $M$ corresponds to \emph{one} sheaf, namely $\Fun{Sec}_\pi$, where $\pi\colon TM\to M$ is the tangent bundle as described in \cref{ex.tangent_bundle}. There are so many sheaves on $M$ that they don't even form a set (it's just a `collection'); again, one member of this gigantic collection is the sheaf $\Fun{Sec}_\pi$ of all possible vector fields on $M$.

\sol{exc.sierpinski}{
Consider the Sierpinski space $(\{1,2\},\Op_1)$ from \cref{ex.Sierpinski}.
\begin{enumerate}
\item What is the category $\Op$ for this space? (You may have already figured this out in \cref{exc.opens_Sierp}; if not, do so now.)
\item What does a presheaf on $\Op$ consist of?
\item What is the sheaf condition for $\Op$?
\item How do we identify a sheaf on $\Op$ with a function?
\end{enumerate}
\begin{enumerate}
\item The Hasse diagram for the Sierpinsky topology is \fbox{$\varnothing\to\{1\}\to\{1,2\}$}\,.
\item A presheaf $F$ on $\Op$ consists of any three sets and any two functions $F(\{1,2\})\to F(\{1\})\to F(\varnothing)$ between them.
\item Recall from \cref{exc.opens_Sierp} that the only non-trivial covering (a covering of $U$ is \emph{non-trivial} if it does not contain $U$) occurs when $U=\varnothing$ in which case the empty family over $U$ is a cover.
\item As explained in \cref{ex.empty_cover}, $F$ will be a sheaf iff $F(\varnothing)\cong\{1\}$. Thus we the category of sheaves is equivalent to that of just two sets and one function $F(\{1,2\})\to F(\{1\})$.
\end{enumerate}

\sol{exc.booleans_as_subspace_1}{
Let $X=\Cat{1}$ be the one point space. We said above that its subobject classifier is the set $\bb$ of booleans, but how does that align with the definition of $\Omega$ given in \cref{eqn.omega_as_opens}?
The one-point space $X=\{1\}$ has two open sets, $\varnothing$ and $\{1\}$, and every sheaf $S\in\Shv(X)$ assigns $S(\varnothing)=\{()\}$ by the sheaf condition (see \cref{ex.empty_cover}). So the only data in a sheaf $S\in\Shv(X)$ is the set $S(\{1\})$. This is how we get the correspondence between sets and sheaves on the one point space.

According to \cref{eqn.omega_as_opens}, the subobject classifier $\Omega\colon\Op(X)\op\to\smset$ in $\Shv(X)$ should be the functor where $\Omega(\{1\})$ is the set of open sets of $\{1\}$. So we're hoping to see that there is a one-to-one correspondence between the set $\Op(\{1\})$ and the set $\bb=\{\true,\false\}$ of booleans. Indeed there is: there are two open sets of $\{1\}$, as we said, $\varnothing$ and $\{1\}$, and these correspond to $\false$ and $\true$ respectively.

\sol{exc.Omega_functorial}{
\begin{enumerate}
\item Show that the definition of $\Omega$ given above in \cref{eqn.omega_as_opens,eqn.omega_open_rest} is functorial, i.e., that whenever $W\ss V\ss U$, the restriction map $\Omega(U)\to\Omega(V)$ followed by the restriction map $\Omega(V)\to\Omega(W)$ is the same as the restriction map $\Omega(U)\to\Omega(W)$.
\item Is that all that's necessary to conclude that $\Omega$ is a presheaf?
\end{enumerate}
By \cref{eqn.omega_as_opens,eqn.omega_open_rest} the definition of $\Omega(U)$ is $\Omega(U)\coloneqq\{U'\in\Op\mid U'\ss U\}$, and the definition of the restriction map for $V\ss U$ is $U'\mapsto U'\cap V$.
\begin{enumerate}
\item It is functorial: given $W\ss V\ss U$ and $U'\ss U$, we indeed have $(U'\cap V)\cap W=U'\cap W$, since $W\ss V$. For functoriality, we also need preservation of identities, and this amounts to $U'\cap U=U'$ for all $U'\ss U$.
\item	Yes, a presheaf is just a functor; the above check is enough.
\end{enumerate}

\sol{exc.classify_subgraph}{
Consider the subgraph $G'\ss G$ shown here:
\[
\boxCD{
\begin{tikzcd}[ampersand replacement=\&]
\LMO{A}\ar[r]\&\LMO{B}\&\LMO{C}
\end{tikzcd}
\quad\ss\quad
\boxCD{
\begin{tikzcd}[ampersand replacement=\&]
\LMO{A}\ar[r, shift left, "f"]\&\LMO{B}\ar[l, shift left, "g"]\ar[r, "h"]\&\LMO{C}\ar[r, "i"]\&\LMO{D}
\end{tikzcd}
\]
Find the graph homomorphism $\corners{G'}\colon G\to\Omega$ classifying it. See \cref{ex.subobject_classifier_graphs}.
We need a graph homomorphism of the following form:
\[
\boxCD{
\begin{tikzcd}[ampersand replacement=\&]
\LMO{A}\ar[r, shift left, "f"]\&\LMO{B}\ar[l, shift left, "g"]\ar[r, "h"]\&\LMO{C}\ar[r, "i"]\&\LMO{D}
\end{tikzcd}
\To{\quad\corners{G'}\quad}
\boxCD{
\begin{tikzcd}[column sep=70pt, ampersand replacement=\&]
\ar[loop left, "{(0,0;\ 0)}"]
\ar[r, bend left=15pt, "{(0, V;\ 0)}"]
\&
\ar[loop above, "{(V, V;\ 0)}"]
\ar[loop below, "{(V, V;\ A)}"]
\ar[l, bend left=15pt, "{(V, 0;\ 0)}"]
\end{tikzcd}
\]
There is only one that classifies $G'$, and here it is. Let's write $\gamma\coloneqq\corners{G'}$.
\begin{itemize}
\item Since $D$ is missing from $G'$, we have $\gamma(D)=0$ (vertex: missing).
\item Since vertices $A,B,C$ are present in $G'$ we have $\gamma(A)=\gamma(B)=\gamma(C)=V$ (vertex: present).
\item The above forces $\gamma(i)=(V,0;0)$ (arrow from present vertex to missing vertex: missing).
\item Since the arrow $f$ is in $G'$, we have $\gamma(f)=(V,V; A)$ (arrow from present vertex to present vertex: present).
\item Since the arrows $g$ and $h$ are missing in $G'$, we have $\gamma(g)=\gamma(h)=(V,V; 0)$ (arrow from present vertex to present vertex: missing).
\end{itemize}

\sol{exc.real_line_logic}{
Consider the real line $\RR$ as a topological space, and consider the open subset $U=\RR-\{0\}$.
\begin{enumerate}
\item What open subset is $\neg U$?
\item What open subset is $\neg\neg U$?
\item Is it true that $U\ss\neg\neg U$?
\item Is it true that $\neg\neg U\ss U$?
\end{enumerate}
With $U=\RR-\{0\}\ss\RR$, we have:
\begin{enumerate}
\item The complement of $U$ is $\RR-U=\{0\}$ and $\neg U$ is its interior, which is $\neg U=\varnothing$.
\item The complement of $\neg U$ is $\RR-\varnothing=\RR$, and this is open, so $\neg\neg U=\RR$.
\item It is true that $U\ss\neg\neg U$.
\item It is false that $\neg\neg U\ss^?U$.
\end{enumerate}

\sol{exc.top_bot_practice}{
Let $(X,\Op)$ be a topological space.
\begin{enumerate}
\item Suppose the symbol $\top$ corresponds to an open set such that for any open set $V\in\Op$, we have $(\top\wedge V)=V$. Which open set is it?
\item Other things we should expect from $\top$ include $(\top\vee V)=\top$ and $(V\imp \top)=\top)$ and $(\top\imp V)=V$. Do these hold for your answer to 1?
\item The symbol $\bot$ corresponds to an open set $U\in\Op$ such that for any open set $V\in\Op$, we have $(\bot\vee V)=V$. Which open set is it?
\item Other things we should expect from $\bot$ include $(\bot\wedge V)=\bot$ and $(\bot\imp V)=\top)$. Do these hold for your answer to 1?
\end{enumerate}
\begin{enumerate}
\item If for any $V\in\Op$ we have $\top\wedge V=V$ then when $V=X$ we have $\top\wedge X\coloneqq\top\cap X=X$, but anything intersected with $X$ is itself, so $\top=\top\cap X=X$.
\item $(\top\vee V)\coloneqq (X\cup V)=X$ holds and $(V\imp X)=\bigcup_{\{R\in\Op\mid R\cap V\ss X\}}R=X$ holds because $(X\cap V)\ss X$.
\item If for any set $V\in\Op$ we have $(\bot\vee V)=V$, then when $V=\emptyset$ we have $(\bot\vee\varnothing)=(\bot\cup\varnothing)=\varnothing$, but anything unioned with $\varnothing$ is itself, so $\bot=\bot\cup\varnothing=\varnothing$.
\item $(\bot\wedge V)=(\varnothing\cap V)=\varnothing$ holds, and $(\bot\imp V)=\bigcup_{\{R\in\Op\mid R\cap\varnothing\ss V\}}R=X$ holds because $(X\cap\varnothing)\ss V$.
\end{enumerate}

\sol{exc.weather_bob}{
Just now we described how a predicate $p\colon S\to\Omega$, such as ``\dots likes the weather,'' acts on sections $s\in S(U)$, say $s=\mathrm{Bob}$. But by \cref{def.subobject_classifier}, any predicate $p\colon S\to\Omega$ to the subobject classifier also defines a subobject of $\{S\mid p\}\ss S$. Describe the sections of this subsheaf.
$S$ is the sheaf of people, the set of which changes over time: a section in $S$ over any interval of time is a person who is alive throughout that interval. A section in the subobject $\{S\mid p\}$ over  any interval of time is a person who is alive \emph{and likes the weather} throughout that interval of time.

\sol{exc.vdash}{
Give an example of a space $X$, a sheaf $S\in\Shv(X)$, and two predicates $p,q\colon S\to\Omega$ for which $p(s)\vdash_{s:S} q(s)$ holds. You do not have to be formal.
We need an example of a space $X$, a sheaf $S\in\Shv(X)$, and two predicates $p,q\colon S\to\Omega$ for which $p(s)\vdash_{s:S} q(s)$ holds. Take $X$ to be the one-point space, take $S$ to be the sheaf corresponding to the set $S=\nn$, let $p(s)$ be the predicate ``$24\leq s\leq 28$,'' and let $q(s)$ be the predicate ``$s$ is not prime.'' Then $p(s)\vdash_{s:S} q(s)$ holds.\\

As an informal example, take $X$ to be the surface of the earth, take $S$ to be the sheaf of vector fields as in \cref{ex.tangent_bundle} thought of in terms of wind-blowing. Let $p$ be the predicate ``the wind is blowing due east at somewhere between 2 and 5 kilometers per hour'' and let $q$ be the predicate ``the wind is blowing at somewhere between 1 and 5 kilometers per hour.'' Then $p(s)\vdash_{s:S} q(s)$ holds. This means that for any open set $U$, if the wind is blowing due east at somewhere between 2 and 5 kilometers per hour throughout $U$, then the wind is blowing at somewhere between 1 and 5 kilometers per hour throughout $U$ as well.
\sol{exc.predicate_practice}{
In the topos $\Cat{Set}$, where $\Omega=\BB$, consider the predicate $p\colon\NN\times\ZZ\to\BB$ given by
\[
\begin{cases}
\true&\tn{ if }n\leq|z|\\
\false&\tn{ if }n>|z|.
\end{cases}
\]
\begin{enumerate}
\item What is the set of $n\in\NN$ for which the predicate $\forall(z:\ZZ)\ldotp p(n,z)$ holds?
\item What is the set of $n\in\NN$ for which the predicate $\exists(z:\ZZ)\ldotp p(n,z)$ holds?
\item What is the set of $z\in\ZZ$ for which the predicate $\forall(n:\NN)\ldotp p(n,z)$ holds?
\item What is the set of $z\in\ZZ$ for which the predicate $\exists(n:\NN)\ldotp p(n,z)$ holds?
\end{enumerate}
We have the predicate $p\colon\NN\times\ZZ\to\BB$ given by $p(n,z)$ iff $n\leq|z|$.
\begin{enumerate}
\item The predicate $\forall(z:\ZZ)\ldotp p(n,z)$ holds for $\{0\}\ss\NN$.
\item The predicate $\exists(z:\ZZ)\ldotp p(n,z)$ holds for $\NN\ss\NN$.
\item The predicate $\forall(n:\NN)\ldotp p(n,z)$ holds for $\varnothing\ss\ZZ$.
\item The predicate $\exists(n:\NN)\ldotp p(n,z)$ holds for $\ZZ\ss\ZZ$.
\end{enumerate}

\sol{exc.worrying_news_universal}{
Suppose $s$ is a person alive throughout the interval $U$. Apply the above definition to the example $p(s,t)=$ ``person $s$ is worried about news $t$'' from above. Here, $T(V)$ is the set of items that are in the news throughout the interval $V$.
\begin{enumerate}
\item What open subset of $U$ is $\forall(t:T)\ldotp p(s,t)$ for a person $s$?
\item Does it have the semantic meaning you'd expect, given the less formal description in \cref{subsec.quantification}?
\end{enumerate}
Suppose $s$ is a person alive throughout the interval $U$. Apply the above definition to the example $p(s,t)=$ ``person $s$ is worried about news $t$'' from above.
\begin{enumerate}
\item The formula says that $\forall(t:T)\ldotp p(s,t)$ ``returns the largest open set $V\ss U$ for which $p(\restrict{s}{V},t)=V$ for all $t\in T(V)$.'' Note that $T(V)$ is the set of items that are in the news throughout the interval $V$. Substituting, this becomes ``the largest interval of time $V\ss U$ over which person $s$ is worried about news $t$ for every item $t$ that is in the news throughout $V$.'' In other words, for $V$ to be nonempty, the person $s$ would have to be worried about \emph{every single item of news} throughout $V$. My guess is that there's a festival happening or a happy kitten somewhere that person $s$ is not worried about, but maybe I'm assuming that person $s$ is sufficiently mentally ``normal.'' There may be people who are sometimes worried about literally everything in the news; we ask you to please be kind to them.
\item Yes, it is exactly the same description.
\end{enumerate}

\sol{exc.worrying_news_existential}{
Apply the above definition to the ``person $s$ is worried about news $t$'' example above. \begin{enumerate}
\item What open set is $\exists(t:T)\ldotp p(s,t)$ for a person $s$?
\item Does it have the semantic meaning you'd expect?
\end{enumerate}
Suppose $s$ is a person alive throughout the interval $U$. Apply the above definition to the example $p(s,t)=$ ``person $s$ is worried about news $t$'' from above.
\begin{enumerate}
\item The formula says that $\exists(t:T)\ldotp p(s,t)$ ``returns the union $V=\bigcup_iV_i$ of all the open sets $V_i$ for which there exists some $t_i\in T(V_i)$ satisfying $p(\restrict{s}{V_i},t_i)=V_i$.'' Substituting, this becomes ``the union of all time intervals $V_i$ for which there is some item $t_i$ in the news about which $s$ is worried throughout $V_i$.'' In other words it is all the time that $s$ is worried about at least one thing in the news. Perhaps when $s$ is sleeping or concentrating on something, she is not worried about anything, in which case intervals of sleeping or concentrating would not be subsets of $V$. But if $s$ said ``there's been such a string of bad news this past year, it's like I'm always worried about something!,'' she is saying that it's like $V=$``this past year.''
\item This seems like a good thing for ``there exists a piece of news that worries $s$'' to mean: the news itself is allowed to change as long as the person's worry remains. Someone might disagree and think that the predicate should mean ``there is one piece of news that worries $s$ throughout the whole interval $V$.'' In that case, perhaps this person is working within a different topos, e.g.\ one where the site has fewer coverings. Indeed, it is the notion of covering that makes existential quantification work the way it does.
\end{enumerate}

\sol{exc.two_defs_of_closure}{
Suppose $j\colon\Omega\to\Omega$ is a morphism of sheaves on $X$, such that $p\leq j(p)$ holds for all $U\ss X$ and $p\in\Omega(U)$. Show that for all $q\in\Omega(U)$ we have $j(j(q))\leq j(q)$ iff $j(j(q))=j(q)$.
It is clear that if $j(j(q))=j(q)$ then $j(j(q))\leq j(q)$ by reflexivity. On the other hand, assume the hypothesis, that $p\leq j(p)$ for all $U\ss X$ and $p\in\Omega(U)$. If $j(j(q))\leq j(q)$, then letting $p\coloneqq j(q)$ we have both $j(p)\leq p$ and $p\leq j(p)$. This means $p\cong j(p)$, but $\Omega$ is a poset (not just a preorder) so $p=j(p)$, i.e.\ $j(j(q))= j(q)$ as desired.

\sol{exc.check_modality}{
Let $S$ be the sheaf of people as in \cref{subsec.predicates}, and let $j\colon\Omega\to\Omega$ be ``assuming Bob is in San Diego...''
\begin{enumerate}
\item Name any predicate $p\colon S\to\Omega$, such as ``likes the weather.''
\item Choose a time interval $U$. For an arbitrary person $s\in S(U)$, what sort of thing is $p(s)$, and what does it mean?
\item What sort of thing is $j(p(s))$ and what does it mean?
\item Is it true that $p(s)\leq j(p(s))$? Explain briefly.
\item Is it true that $j(j(p(s))=j(p(s)$? Explain briefly.
\item Choose another predicate $q\colon S\to\Omega$. Is it true that $j(p\wedge q)=j(p)\wedge j(q)$? Explain briefly.
\end{enumerate}
Let $S$ be the sheaf of people and $j$ be ``assuming Bob is in San Diego...''
\begin{enumerate}
\item Take $p(s)$ to be ``$s$ likes the weather.''
\item Let $U$ be the interval 2019/01/01 -- 2019/02/01. For an arbitrary person $s\in S(U)$, $p(s)$ is a subset of $U$, and it means the subset of $U$ throughout which $s$ likes the weather.
\item Similarly $j(p(s))$ is a subset of $U$, and it means the subset of $U$ throughout which, assuming Bob is in San Diego, $s$ liked the weather. In other words, $j(p(s))$ is true whenever Bob is not in San Diego, and it is true whenever $s$ likes the weather.
\item It is true that $p(s)\leq j(p(s))$, by the `in other words' above.
\item It is true that $j(j(p(s))=j(p(s)$, because suppose given a time during which ``if Bob is in San Diego then if Bob is in San Diego then $s$ likes the weather.'' Then if Bob is in San Diego during this time then $s$ likes the weather. But that is exactly what $j(p(s))$ means.
\item Take $q(s)$ to be ``$s$ is happy.'' Suppose ``if Bob is in San Diego then both $s$ likes the weather and $s$ is happy.'' Then both ``if Bob is in San Diego then $s$ likes the weather'' and ``if Bob is in San Diego then $s$ is happy'' are true too. The converse is equally clear.
\end{enumerate}

\sol{exc.explain_intervals}{
\begin{enumerate}
\item Explain why $[2,6]\in o_{[0,8]}$.
\item Explain why $[2,6]\not\in o_{[0,5]}\cup o_{[4,8]}$.
\end{enumerate}
We have $o_{[a,b]}\coloneqq\{[d,u]\in\IR\mid a<d\leq u<b\}$.
\begin{enumerate}
\item Since $0\leq 2\leq 6\leq 8$, we have $[2,6]\in o_{[0,8]}$ by the above formula.
\item In order to have $[2,6]\in^? o_{[0,5]}\cup o_{[4,8]}$, we would need to have either $[2,6]\in^? o_{[0,5]}$ or $[2,6]\in^? o_{[4,8]}$. But the formula does not hold in either case.
\end{enumerate}

\sol{exc.R_subsp_IR}{
Show that a subset $U\ss\RR$ is open in the subspace topology of $\RR\ss\IR$ iff $U\cap\RR$ is open in the usual topology on $\RR$ defined in \cref{ex.usual_R}.
A subset $U\ss\RR$ is open in the subspace topology of $\RR\ss\IR$ iff there is an open set $U'\ss\IR$ with $U=U'\cap\RR$. We want to show that this is the case iff $U$ is open in the usual topology.

Suppose that $U$ is open in the subspace topology. Then $U=U'\cap\RR$, where $U'\ss\IR$ is the union of some basic opens, $U'=\bigcup_{i\in I}o_{[a_i,b_i]}$, where $o_{[a_i,b_i]}=\{[d,u]\in\IR\mid a_i<d<u<b_i\}$. Since $\RR=\{[x,x]\in\IR\}$, the intersection $U'\cap\RR$ will then be
\[U=\bigcup_{i\in I}\{x\in\RR\mid a_i<x<b_i\}\]
and this is just the union of open balls $B(m_i,r_i)$ where $m_i\coloneqq\frac{a_i+b_i}{2}$ is the midpoint and $r_i\coloneqq\frac{b_i-a_i}{2}$ is the radius of the interval $(a_i,b_i)$. The open balls $B(m_i,r_i)$ are open in the usual topology on $\RR$ and the union of opens is open, so $U$ is open in the usual topology.

Suppose that $U$ is open in the usual topology. Then $U=\bigcup_{j\in J}B(m_j,\epsilon_j)$ for some set $J$. Let $a_j\coloneqq m_j-\epsilon_j$ and $b_j\coloneqq m_j+\epsilon_j$. Then \[U=\bigcup_{j\in J}\{x\in\RR\mid a_j<x<b_j\}=\bigcup_{j\in J}(o_{[a_j,b_j]}\cap\RR)=\left(\bigcup_{j\in J}o_{[a_j,b_j]}\right)\cap\RR\]
which is open in the subspace topology.

\sol{exc.interval_domain_top}{
Fix any topological space $(X,\Op_X)$ and any subset $R\ss\IR$ of the interval domain. Define $H_X(U)\coloneqq\{f\colon U\cap R\to X\mid f\text{ is continuous}\}$.
\begin{enumerate}
\item Is $H_X$ a presheaf? If not, why not; if so, what are the restriction maps?
\item Is $H_X$ a sheaf? Why or why not?
\end{enumerate}
Fix any topological space $(X,\Op_X)$ and any subset $R\ss\IR$ of the interval domain. Define $H_X(U)\coloneqq\{f\colon U\cap R\to X\mid f\text{ is continuous}\}$.
\begin{enumerate}
\item $H_X$ is a presheaf: given $V\ss U$ the restriction map sends the continuous function $f\colon U\cap R\to X$ to its restriction along the subset $V\cap R\ss U\cap R$.
\item It is a sheaf: given any family $U_i$ of open sets with $U=\bigcup_iU_i$ and a continuous function $f_i\colon U_i\cap R\to X$ for each $i$, agreeing on overlaps, they can be glued together to give a continuous function on all of $U\cap R$, since $U\cap R=(\bigcup_iU_i)\cap R=\bigcup_i(U_i\cap R)$.
\end{enumerate}

\finishSolutionChapter

\end{document}