----
> [!definition] Definition. ([[categorical pullback]])
> Let $\mathsf{C}$ be a [[category]]. A **pullback** or **fiber product** in $\mathsf{C}$ is the [[categorical limit|limit]] of the [[diagram]][^1]
>
> ```tikz
> \usepackage{tikz-cd}
> \usepackage{amsmath}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBoBGAXVJADcBDAGwFcYkQANEAX1PU1z5CKcqWLU6TVuwCaPPiAzY8BIqKo0GLNohAAtHhJhQA5vCKgAZgCcIAWyRkQOCEgBMmqTpCWQNRvQARjCMAAoCKsIg1lgmABY48la2Doiizq6IHpLa7CaG3EA
> \begin{tikzcd}
> & Y \arrow[d, "g"] \\
> X \arrow[r, "f"'] & Z
> \end{tikzcd}
> \end{document}
> ```
> Explicitly, a pullback of the morphisms $f$ and $g$ consists of an object $L$, together with morphisms $\lambda_{X}:P \to X$, $\lambda_{Y}:P \to Y$ for which the square commutes:
>
> ```tikz
> \usepackage{tikz-cd}
> \usepackage{amsmath}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBpiBdUkANwEMAbAVxiRABkQBfU9TXfIRQBGclVqMWbAJrdeIDNjwEiZYePrNWiEAA05fJYKKj11TVJ0AtbuJhQA5vCKgAZgCcIAWyQAmajgQSADM5pLaIK4g1Ax0AEYwDAAK-MpCIO5YDgAWOAaRnj6IoiCBIWFabA75Ht5IZKVBxRWWIAA6bbFecVB0APqyPG6F9QFN-hKVOh1dPf2+0SCxCcmpxjqZOXlcFFxAA
> \begin{tikzcd}
> L \arrow[r, "\lambda_Y"] \arrow[d, "\lambda_X"'] & Y \arrow[d, "g"] \\
> X \arrow[r, "f"'] & Z
> \end{tikzcd}
> \end{document}
> ```
> and $L$ is [[universal property|universal]] with respect to this diagram. That is, for any other such triple $(M, \mu_{X}, \mu_{Y} )$ for which the square commutes, there is a unique morphism $M \to L$ making all relevant diagrams commute.
>
> ```tikz
> \usepackage{tikz-cd}
> \usepackage{amsmath}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZARgBpiBdUkANwEMAbAVxiRABkQBfU9TXfIRQAmclVqMWbAJrdeIDNjwEiZYePrNWiEAA05fJYKKj11TVJ0AtAwv7KhyAAyknGydpABFbuJhQAc3giUAAzACcIAFskURAcCCQAZnMPNlCQagY6ACMYBgAFe2MdcKwAgAscWwjopDJ4xMQUiS02AJrImMQXRvrUtp0AHSHsqJyoOgB9WR4wrqRehNiByxARsYnp4UyQbLzC4pVS8qrOusQAFmplxAa8sChk3otPEaimGfPu677EOIeT0QAFoki80sMhh8pvosrl8kUjMcQGVKtU5iBaj8bk1wYN1kMYAAPLBwHBwAAEAEJdgwsGBPJM4BV-L4uEA
> \begin{tikzcd}
> M \arrow[rrd, "\mu_Y", bend left] \arrow[rdd, "\mu_X"', bend right] \arrow[rd, "\exists !", dashed] & & \\
> & L \arrow[r, "\lambda_Y"] \arrow[d, "\lambda_X"'] & Y \arrow[d, "g"] \\
> & X \arrow[r, "f"'] & Z
> \end{tikzcd}
> \end{document}
> ```
>
> So the pullback is the 'most general' way to complete two morphisms into a commutative square. We denote it by $X \times_{Z} Y$.
> [!equivalence] Equivalence. (A Yoneda Perspective)
> Given a [[diagram]]
>
> > ```tikz
> > \usepackage{tikz-cd}
> > \usepackage{amsmath}
> > \begin{document}
> > \begin{tikzcd}
> > & Y \arrow[d, "g"] \\
> > X \arrow[r, "f"'] & Z
> > \end{tikzcd}
> > \end{document}
> > > ```
> > >
i
>
in a [[category]] $\mathsf{C}$, the pullback $X \times_{Z} Y$ is the object of $\mathsf{C}$ which [[representable functor|represents]] the [[contravariant functor|functor]] $\text{Hom}(-,X) \times_{\text{Hom}(-,Z)} \text{Hom}\big(-,Y\big)$. Concretely, this means $X \times_{Z} Y$ is the object of $\mathsf{C}$ for which there is a natural bijection $\text{Hom}_{\mathsf{C}}(W, X \times_{Z} Y) \cong \{ (\alpha, \beta) \in \text{Hom}(W,X) \times \text{Hom}(W,Z) :f \circ \alpha=g \circ \beta \}.$
>
> for all objects $W$ of $\mathsf{C}$.
> [!proof ]- Proof of Equivalence.
> Call the [[natural transformation]] $\text{Hom}\big(-, L\big)$
>
> Suppose we are given an object $L$ of $\mathsf{C}$ which [[representable functor|represents]] the fiber-product-of-hom-functors [[contravariant functor|functor]] $\text{Hom}(-,X) \times_{\text{Hom}(-,Z)} \text{Hom}\big(-,Y\big)$, as witnessed by some [[natural transformation|natural isomorphism of functors]] $\Xi: \text{Hom}\big(-, L\big) \to \text{Hom}(-,X) \times_{\text{Hom}(-,Z)} \text{Hom}\big(-,Y\big).$
> Focus first on the $L$-component $\Xi_{L}: \text{Hom}(L,L) \xrightarrow{\sim}\text{Hom}(-,X) \times_{\text{Hom}(-,Z)} \text{Hom}\big(-,Y\big).$
> The identity $1_{L} \in \text{Hom}\big(L,L\big)$ gets uniquely identified under $\Xi_{L}$ with *some* pair $(\lambda_{X}, \lambda_{Y}):=(\Xi_{L}^{(X)}(1_{L}), \Xi_{L}^{(Y)}(1_{L})) \in \text{Hom}(L, X) \times \text{Hom}(L,Z)$ satisfying $f \circ \lambda_{X}=g \circ \lambda_{Y}$. Thus there is a commutative square
>
> ```tikz
> \usepackage{tikz-cd}
> \usepackage{amsmath}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBoBGAXVJADcBDAGwFcYkQANEAX1PU1z5CKcqWLU6TVuwCaPPiAzY8BIqKo0GLNohAAtef2VCiZcZqk6QAGR4SYUAObwioAGYAnCAFskZEDgQSABMFtrsbiA0jPQARjCMAAoCKsIgHliOABY4hiCePkiiAUGIoZLhuo5RIDHxSSkmuowwbrm87l6+iADMNIF+YdK6ADojMd6xUPQA+lzRcQnJxqq6GdntCgXdfSVFQ1ZjE1OzctyU3EA
> \begin{tikzcd}
> L \arrow[d, "\lambda_X"'] \arrow[r, "\lambda_Y"] & Y \arrow[d, "g"] \\
> X \arrow[r, "f"'] & Z
> \end{tikzcd}
> \end{document}
> ```
> We want to show it is universal.
>
> *Claim: once $1_{L}$ has been determined, the entire natural transformation $\Xi$ is determined.* Indeed, let $W$ be an arbitrary object of $\mathsf{C}$. What is $\Xi_{W}=(\Xi_{W}^{(X)}, \Xi_{W}^{(Y)})$?
> For any $\gamma \in \text{Hom}(W, L)$ there is a [[natural transformation|naturality square]]
>
> ```tikz
> \usepackage{tikz-cd}
> \usepackage{amsmath}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBpiBdUkANwEMAbAVxiRAB12cYAPHYABIQAtgF8AFAHVSAGQCUIUaXSZc+QigCM5KrUYs2nbn0EiJM2XIAEnMFiuaA+jMXKQGbHgJEym3fWZWRA4uXn4hMSlSAA1rIyxheEdgIzDTSOkALTlRG1CTCIlpAE0FJRVPdSJtP2oAg2DUgrNxC1i8vES4ZKbwlotsq1Fe9PNSUsVdGCgAc3giUAAzACcRJG0QHAgkMj1AtgBaPIBjLGXjvJm6YWE6EGoGOgAjGAYABVUvDRBlrBmACxwriWq2ESAAzNQtkgAEx1fRBEDiI6cU7nS7XW6kKwo9hoi6cK43OgKB7PV4fSreYK-AFA8ogFZrRC7aGIOF7BohaJYRySe4gR4vd6fKo0v6A4GM0HrKHbRCQzmIzg8vmTURAA
> \begin{tikzcd}
> {\text{Hom}(W,L)} \arrow[d, "\Xi_W"'] & {\text{Hom}(L,L) \ni 1_L} \arrow[l, "- \circ \gamma"'] \arrow[d, "\Xi_W"] \\
> {\text{Hom}(W,X) \times_{\text{Hom}(W,Z)} \text{Hom}(W,Y)} & {\text{Hom}(L,X) \times_{\text{Hom}(L,Z) }\text{Hom}(L,Y)} \arrow[l, "{(- \circ \gamma, - \circ \gamma)}"']
> \end{tikzcd}
> \end{document}
> ```
> Examining $1_{L} \in \text{Hom}\big(L,L\big)$ in particular, it tells us that $\Xi_{W}(1_{L} \circ \gamma)=\big( \Xi_{W}^{(X)}(1_{L}) \circ \gamma, \Xi_{W}^{(Y)}(1_{L}) \circ \gamma \big)=(\lambda_{X} \circ \gamma, \lambda_{Y} \circ \gamma).$
> Since $\Xi_{W}(1_{L} \circ \gamma)=\Xi_{W}(\gamma)$, we see that $\Xi_{W}(\gamma)$ is determined.
>
> Now, suppose we are given $W$ in $\mathsf{C}$ together with morphisms $\alpha:W \to X$ and $\beta:W \to Y$ also producing a commutative square:
>
> ```tikz
> \usepackage{tikz-cd}
> \usepackage{amsmath}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBpiBdUkANwEMAbAVxiRAHUQBfU9TXfIRQAmUgEYqtRizYBNbrxAZseAkTGlhk+s1aIQADQV8VgoqK3UdM-QC1ukmFADm8IqABmAJwgBbJKIgOBBIAMxW0nogHiDUDHQARjAMAAr8qkIgXljOABY4xtE+-ogaQSGI4VK6bM6F3n5IZOUB1ElgUEgAtKHN1lEAOgOMaLl0sSDxSanpZvrZeQU8nsVN1MFIZe2dlX2RbENJOONcFFxAA
> \begin{tikzcd}
> W \arrow[rdd, "\alpha"', bend right] \arrow[rrd, "\beta", bend left] & & \\
> & & Y \arrow[d, "g"] \\
> & X \arrow[r, "f"'] & Z
> \end{tikzcd}
> \end{document}
> ```
> The pair $(\alpha ,\beta)$ belongs to $\text{Hom}(W,X) \times_{\text{Hom}(W,Z)} \text{Hom}(W,Y)$ by construction, and therefore corresponds under the [[bijection]] $\Xi_{W}$ to a morphism $W \xrightarrow{\gamma} L$. Now, $(\alpha, \beta)=\Xi_{W}(\gamma)=(\lambda_{X} \circ \gamma, \gamma_{Y} \circ \gamma)$
> whence the diagram
>
> ```tikz
> \usepackage{tikz-cd}
> \usepackage{amsmath}
> \begin{document}
> % https://tikzcd.yichuanshen.de/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBpiBdUkANwEMAbAVxiRAHUQBfU9TXfIRQAmUgEYqtRizYBNbrxAZseAkTGlhk+s1aIQADQV8VgoqK3UdM-QC1jS-qqHINEq9L0gAMt0kwoAHN4IlAAMwAnCABbJFEQHAgkAGYPXTYwkGoGOgAjGAYABSczfQisQIALHAdImKQNBKTEVKl0-UDaqNjEMia46nywKCQAWmS+6y8AHWnGNEq6LJAc-KKStTKK6q763upEhsGYYZTJzzZZ-JwlnnDupAAWA+b4qcvpnOjcqDoAfSM2TyBWKpk2IHKVRqdxAdR6z36iEa730sy+P3+8hhcKQfUOiARKJAs0CdGi0VuFC4QA
> \begin{tikzcd}
> W \arrow[rdd, "\alpha"', bend right] \arrow[rrd, "\beta", bend left] \arrow[rd, "\gamma"] & & \\
> & L \arrow[d, "\lambda_X"'] \arrow[r, "\lambda_Y"] & Y \arrow[d, "g"] \\
> & X \arrow[r, "f"'] & Z
> \end{tikzcd}
> \end{document}
> ```
> commutes. Finally, note that $\gamma$ is obviously unique: if there exists $\gamma'$ such that $\alpha=\lambda_{X} \circ \gamma'$ and $\beta=\lambda_{Y} \circ \gamma'$, then $\Xi_{W}(\gamma')=(\alpha , \beta)=\Xi_{W}(\gamma)$, and hence $\gamma'=\gamma$ since $\Xi_{W}$ is a [[bijection]].
> [!basicproperties]
> The Yoneda perspective helps check identities of fiber products. For example it allows us to verify $(A \times_{B} C) \times_{C} D \cong A \times_{B} D$ ('cancel $C