\documentclass[11pt,reqno]{amsart} \usepackage[a4paper,textwidth=150mm,textheight=228mm,centering]{geometry} \usepackage{amsmath,amssymb,amsthm,mathtools} \usepackage{mathrsfs} \usepackage{tikz-cd} \usetikzlibrary{calc,fit,arrows.meta} \tikzset{cgtip/.tip={Triangle[length=2.2pt,width=3pt]},>=cgtip} \tikzcdset{arrow style=tikz,diagrams={>=cgtip}} \usepackage{booktabs,array,tabularx} \usepackage{enumitem} \setlist{itemsep=1pt,topsep=2pt,parsep=0pt} \setlist[enumerate]{font=\upshape} \makeatletter\@beginparpenalty=\@M\makeatother % Section headings: larger, bold and left-aligned, with more space above, so chapter breaks stand out. \makeatletter \renewcommand\section{\@startsection{section}{1}{\z@}{2.5\linespacing\@plus\linespacing}{1.2\linespacing}{\normalfont\Large\bfseries\def\@secnumfont{\bfseries}}} \renewcommand\subsection{\@startsection{subsection}{2}{\z@}{.9\linespacing\@plus.4\linespacing}{.35\linespacing}{\normalfont\large\bfseries\def\@secnumfont{\bfseries}}} % Table of contents: sections bold and flush left, subsections indented. \def\l@section{\@tocline{1}{0pt}{0pt}{}{\bfseries}} \def\l@subsection{\@tocline{2}{0pt}{1.5pc}{5pc}{}} \makeatother \usepackage[expansion=false]{microtype} \usepackage[section]{placeins} \usepackage{flafter} \usepackage[colorlinks=true,linkcolor={blue!50!black},citecolor={green!40!black},urlcolor={blue!50!black}]{hyperref} \numberwithin{equation}{section} \theoremstyle{plain} \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \newtheorem{convention}[theorem]{Convention} \newtheorem{example}[theorem]{Example} \newtheorem{remark}[theorem]{Remark} \newtheorem{construction}[theorem]{Construction} \newcommand{\cat}[1]{\mathscr{#1}} \newcommand{\dbl}[1]{\mathbb{#1}} \newcommand{\dfun}[1]{\boldsymbol{#1}} \newcommand{\Cat}{\mathbf{Cat}} \newcommand{\CAT}{\mathbf{CAT}} \newcommand{\Set}{\mathrm{Set}} \newcommand{\Ctx}{\mathbf{Ctx}} \newcommand{\lto}{\mathrel{\ooalign{$\rightarrow$\cr\hidewidth$\mapstochar\mkern3mu$\hidewidth\cr}}} \DeclareMathOperator{\src}{src} \DeclareMathOperator{\tgt}{tgt} \newcommand{\yu}{\mathrm{y}} \newcommand{\op}{\mathrm{op}} % 1-categorical standard names upright, their double-categorical versions bold italic. \newcommand{\Hom}{\mathrm{Hom}} \newcommand{\id}{\mathrm{id}} \newcommand{\sq}{\mathbin{;}} \medmuskip=4mu plus 2mu minus 1mu \newcommand{\semiglyph}[1]{\tikz[baseline=-0.3ex,line join=round,x=1ex,y=1ex]{% \path[#1] (0,0.78) circle (0.3); \path[#1] (0.32,0.0) arc (0:180:0.32) .. controls (-0.32,-0.24) and (-0.08,-0.3) .. (-0.02,-0.3) .. controls (-0.02,-0.52) and (-0.14,-0.76) .. (-0.36,-0.95) .. controls (0.08,-0.84) and (0.32,-0.5) .. (0.32,0.0) -- cycle;}} % The thin outline keeps the white glyph hollow at 110 and 200 dpi (0.55pt filled its tail). \newcommand{\wsemi}{\mathbin{\semiglyph{fill=white,draw=black,line width=0.35pt}}} \newcommand{\kcomp}{\mathbin{\tikz[baseline=-0.3ex,line join=round,x=1ex,y=1ex]{% \path[fill=white,draw=black,line width=0.35pt] (0,0.78) circle (0.3); \path[fill=black] (0.32,0.0) arc (0:180:0.32) .. controls (-0.32,-0.24) and (-0.08,-0.3) .. (-0.02,-0.3) .. controls (-0.02,-0.52) and (-0.14,-0.76) .. (-0.36,-0.95) .. controls (0.08,-0.84) and (0.32,-0.5) .. (0.32,0.0) -- cycle;}}} \newcommand{\C}{\cat C} \newcommand{\A}{\cat A} \newcommand{\Stat}{\mathrm{Stat}} \newcommand{\Fam}{\mathrm{Fam}} \newcommand{\Supp}{\mathit{Supp}} \newcommand{\cop}{\mathrm{copy}} \newcommand{\del}{\mathrm{del}} \newcommand{\pr}{\mathrm{pr}} \newcommand{\fan}[1]{\langle #1\rangle} \newcommand{\tr}{\top} \newcommand{\PS}{\mathrm{PS}} \newcommand{\BayesLens}{\mathrm{BayesLens}} \input{sd.tex} \input{figs.tex} \newcommand{\B}{\cat B} \newcommand{\CB}{\mathbf{C}_{\B}} \newcommand{\one}{\mathbf 1} \title[Bayesian Updating with Contextful Arrows]{Bayesian Updating with Contextful Arrows} \author{Kotaro Kamiya} \date{November 2026} \raggedbottom \hyphenpenalty=1000 \exhyphenpenalty=1000 \widowpenalty=10000 \clubpenalty=10000 \displaywidowpenalty=10000 \begin{document} \begin{abstract} Many formulations of Bayesian updating with Markov categories are known, among them the dagger on probability spaces, Bayesian lenses and their dependent version, the recursion of the Bayes filter and conditional composition. A question common to many of them is how to make updating compositional, so that a posterior becomes the next prior; the author's earlier work also raised it, as the relation between sequential and batch updating. This paper gives one answer by composing contextful arrows. The states of a Markov category $\C$ form a base $\B=(I/\C)^{\op}$, and their lifts, the joint states with a given marginal, form a presheaf $L$ on $\B$. A foot makes $L$ a contextful arrow $\B\lto\B$: the marginal foot recovers the chain rule of Bayesian lenses, and the joint foot makes each joint state the next state. With the joint foot, the lifts to an object $Y$ give a strong monoidal functor $K$ from $\C$ to the monoidal category of contextful arrows on $\B$, whose runs are conditional composites. Through $K$ the symmetry of $\C$ becomes a swap of two lifts, and this swap is a Bayesian inversion. The coherence of $K$ then gives the agreement of sequential and batch updating and recovers the recursion of the Bayes filter. These facts are known; here they follow from one strong monoidal functor. \end{abstract} \maketitle \vfill \begin{center} \begin{tikzpicture}[x=10mm,y=10mm, mb/.style={draw=black!70,rounded corners=2pt,font=\footnotesize,align=center,fill=black!4,inner sep=3.5pt,text width=40mm,minimum height=13mm}, mp/.style={->,thick,shorten <=1mm,shorten >=1mm}, lb/.style={font=\scriptsize,inner sep=1.5pt}] \node[mb] (L) at (0,0) {\textbf{Lifts}\\ joint states $\gamma\in L_Y(\rho)$ with marginal $\rho$, a family on $\B=(I/\C)^{\op}$}; \node[mb] (K) at (5.25,0) {\textbf{Contextful arrows}\\ $K(Y):=(L_Y,r)$ with the joint foot; $K\colon\C\to\CB$ is strong monoidal}; \node[mb] (S) at (10.5,0) {\textbf{Swaps}\\ $s:=\Phi\sq K(\sigma)\sq\Phi^{-1}$ is a Bayesian inversion}; \draw[mp] (L)--(K); \draw[mp] (K)--(S); \node (r0) at (0.3,-2.4) {a run $(\pi,\gamma_1,\dots,\gamma_n)$}; \node (r1) at (10.2,-2.4) {the run of posteriors}; \node (j0) at (0.3,-4.6) {one joint state}; \node (j1) at (10.2,-4.6) {the batch posterior}; \draw[mp] (r0)--node[above,lb]{sequential: $S_1\sq\cdots\sq S_n$}(r1); \draw[mp] (j0)--node[below,lb]{batch: $K(\sigma)$}(j1); \draw[mp] (r0)--node[left,lb]{$\Phi$}(j0); \draw[mp] (r1)--node[right,lb]{$\Phi$}(j1); \node[lb] at (5.25,-3.5) {$=$ by the coherence of $K$}; \end{tikzpicture} \end{center} \vfill \begin{center}\begin{minipage}{0.86\textwidth}\small The paper in one picture. The lifts of states form contextful arrows, and with the joint foot they give a strong monoidal functor $K$ whose swaps are Bayesian inversions. A run of $K$ is sequential updating; its comparison $\Phi$ collapses it into one joint state, and the square, the coherence of $K$ (Lemma~\ref{lem:coh}), says that sequential and batch updating agree (Theorem~\ref{thm:seq}).\end{minipage}\end{center} \vfill \clearpage \setcounter{tocdepth}{1} {\small\tableofcontents} \section{Introduction} \subsection{The question} Let $\C$ be a Markov category, $\pi\colon I\to X$ a state and $f\colon X\to Y$ a channel. A Bayesian inversion $f^\dagger_\pi\colon Y\to X$ depends on the prior $\pi$, and inversions compose by the chain rule $(f\sq g)^\dagger_\pi\sim_{\pi\sq f\sq g}g^\dagger_{\pi\sq f}\sq f^\dagger_\pi$ up to almost sure equality \cite{CJ19,Smi20}. Many formulations of Bayesian updating organise this rule, among them the dagger on the category $\PS(\C)$ of probability spaces \cite{KW21,Fri20}, Bayesian lenses and their dependent version \cite{Smi20,BH22,BHS23}, the recursion of the Bayes filter \cite{FKMSW24} and conditional composition \cite{DLRS25}. A question common to many of them is how to make updating compositional, so that a posterior becomes the next prior, and how sequential updating, one datum at a time, then relates to batch updating on all data at once; Kamiya and Welliaveetil left it open beyond finite examples \cite{KW21}. In a Bayesian lens $(f,f^\sharp)$, for instance, the prior is the index $\pi$ of the backward part $f^\sharp_\pi$, fixed before the data and moved only by $\pi\mapsto\pi\sq g$ along a channel $g$, so the posterior $\delta_y\sq f^\dagger_\pi$, which is not a pushforward of $\pi$, never becomes the index of the next backward part. Ordinary lenses do not help, because composing lenses copies the input, and \[ \sdCopyAfter\ \neq\ \sdCopyBefore \] in general: copying is natural only for deterministic channels. The semicolons of this paper treat the prior differently. The black semicolon $\sq$ composes channels: it fixes $\pi$ and pushes it forward to $\pi\sq f$. The white semicolon $\wsemi$ is the dependent sum, of channels (Section~\ref{sec:markov}) and of families (Section~\ref{sec:ctx}): it keeps what the first part produced and lets the second part read it. The composite $\kcomp$ of contextful arrows (Definition~\ref{def:ctx}) reads the second at the output of the first, its foot. When the foot returns the joint state, each joint state is passed on as the next state, and this is sequential updating. \subsection{Contributions} \begin{table}[tbp]\centering \begin{tabularx}{\textwidth}{@{}>{\raggedright\arraybackslash}p{24mm}>{\raggedright\arraybackslash}X>{\raggedright\arraybackslash}p{38mm}@{}} \toprule topic & known & here\\ \midrule Bayesian lenses & compose by the chain rule \cite[Thm.~5.2]{Smi20}, \cite[Thm.~4.3.14]{Smi22}; inversion is not monoidal \cite[Rem.~4.3.18]{Smi22} & the marginal foot $m$ (Proposition~\ref{prop:section}, Table~\ref{tab:feet}); $K$ sends $\otimes$ to $\kcomp$ (Theorem~\ref{thm:K}), not to a parallel product\\ probability spaces & the dagger on $\PS(\C)$ \cite[Rem.~13.10]{Fri20}, \cite{KW21}; disintegrating in the other direction \cite[Sec.~3, Cor.~5.6]{CJ19}; pushing a coupling along the permutation \cite[Sec.~3.3, Thm.~2]{CDDG17} & the contextad of disintegrations (Proposition~\ref{prop:dis}); the swap (Proposition~\ref{prop:swap})\\ conditional composition & keeps the intermediate outputs, associative and unital \cite[Def.~2.3, Prop.~2.5]{DLRS25} & the runs of $K$ (Proposition~\ref{prop:runs})\\ sequential and batch & double conditionals are conditionals \cite[Lemma~11.11]{Fri20}, and conditioning commutes with composition \cite[Lemma~11.12]{Fri20}; measure-theoretically for supervised models \cite[Thm.~3.1]{Le25}; left open beyond finite examples \cite[Secs.~4.1--4.2, Rem.~4.6]{KW21}; finite Pearl updates \cite[Lemma~4.1(2), Prop.~4.3(3)]{Jac19} & the coherence of $K$ (Theorem~\ref{thm:seq})\\ Bayes filter & its recursion computes the batch conditional \cite[Prop.~4.2, 4.7]{FKMSW24} & recovered by swaps (Remark~\ref{rem:filter})\\ dependent Bayesian lenses & backward objects depend on the state \cite[Sec.~4, Prop.~15]{BH22}, \cite[Def.~15, Prop.~21]{BHS23}; joint priors set aside \cite[Rem.~5.2.13]{Smi22}; updating in $\PS(\C)$ is not a process \cite[Rem.~23]{BHS23} & not as a category; their canonical inversion (Remark~\ref{rem:dbl}); the joint foot $r$: a lift is again a state\\ contextads & contextful arrows \cite{CM24} & on one base, right-colax cells\\ \bottomrule \end{tabularx} \caption{Known formulations and results, and where they arise in this paper.}\label{tab:related} \end{table} Section~\ref{sec:lifts} takes the states of $\C$ as the base $\B:=(I/\C)^{\op}$ and the lifts of a state $\rho$ to $Y$, the states with marginal $\rho$, as a family $L_Y$ on $\B$. A Bayesian lens whose backward part is an inversion is a section of lifts (Proposition~\ref{prop:section}), and a foot makes $L_Y$ a contextful arrow $\B\lto\B$ in the sense of Capucci and Myers \cite{CM24}: the marginal foot $m$ gives the chain rule, the joint foot $r$ the next state. Section~\ref{sec:K} shows that $K(Y):=(L_Y,r)$ is a strong monoidal functor \[ K\colon(\C,\otimes,I)\longrightarrow(\CB,\kcomp,(\one_{\B},\varepsilon)) \] into the contextful arrows on $\B$ with right-colax cells (Theorem~\ref{thm:K}). Section~\ref{sec:updating} conjugates $K(\sigma)$ by the comparison $\Phi$ of $K$: the swap is a Bayesian inversion (Proposition~\ref{prop:swap}), and the coherence of $K$ gives the agreement of sequential and batch updating (Theorem~\ref{thm:seq}). Section~\ref{sec:ps} reads this in $\PS(\C)$, where the disintegrations form a contextad on $\PS(\C)$ (Proposition~\ref{prop:dis}), which carries the sequential updates as a dependent sum of predictives and posteriors (Proposition~\ref{prop:distel}). Several of the formulations above arise from this structure (Table~\ref{tab:related}): Bayesian lenses with the marginal foot, probability spaces and their dagger as the contextad of disintegrations, and conditional composition as the runs of $K$ (Proposition~\ref{prop:runs}); the recursion of the Bayes filter is recovered (Remark~\ref{rem:filter}). Dependent Bayesian lenses do not arise as a category, since they widen the backward part whereas contextful arrows move the index; only their canonical inversion does (Remark~\ref{rem:dbl}). The paper concerns the structure that yields known results, in the manner of abstract nonsense. \subsection{Related work}\label{sec:related} Table~\ref{tab:related} lists the known formulations and where they arise in this paper. The equation of Theorem~\ref{thm:seq} and the content of Proposition~\ref{prop:swap} are known; the paper derives both from one strong monoidal functor. \section{Preliminaries}\label{sec:prelim} \subsection{Markov categories}\label{sec:markov} Composition $f\sq g$ is diagrammatic, $f$ then $g$, also for functors and natural transformations. String diagrams of channels run top to bottom and draw a state as a triangle, a channel as a box, and copy and delete as dots. In a symmetric monoidal category an equation holds if and only if it holds up to isomorphism of diagrams \cite{JS91,Sel11}, and every Markov category is comonoid equivalent to a strict one \cite[Thm.~10.17]{Fri20}. Hence the diagrams prove equations in every Markov category, and the propositions below take $\C$ strict, which loses no generality. \begin{definition}[Markov categories, \cite{Fri20}]\label{def:markov} A \emph{Markov category} is a symmetric monoidal category $(\C,\otimes,I)$ with a commutative comonoid $(\cop_X,\del_X)$ on every object, compatible with $\otimes$, such that $\del$ is natural. Its morphisms are \emph{channels}, a channel $\pi\colon I\to X$ is a \emph{state} on $X$, and $\fan{f_1,\dots,f_n}:=\cop^{(n)}\sq(f_1\otimes\cdots\otimes f_n)$ for channels with a common domain. The symmetry is $\sigma$. \end{definition} Naturality of $\del$ makes $I$ terminal. For a state $\gamma$ on $A\otimes Y$, its \emph{marginal} on $A$ is $\gamma\sq(\id_A\otimes\del_Y)$. \begin{definition}[Almost sure equality and conditionals, \cite{Fri20}]\label{def:as} Let $\C$ be a Markov category. \begin{enumerate}[label=(\roman*),leftmargin=*] \item \emph{Almost sure equality.} For a state $\pi$ on $X$ and $g,g'\colon X\to Z$, $g\sim_\pi g'$ when $\pi\sq\fan{\id_X,g}=\pi\sq\fan{\id_X,g'}$. \item \emph{Conditionals.} For a state $\omega$ on $A\otimes Y$ with marginal $\rho$ on $A$, a conditional of $Y$ given $A$ is $d\colon A\to Y$ with $\omega=\rho\sq\fan{\id_A,d}$, and $\C$ \emph{has conditionals} when every such $\omega$ has one. Conditionals of other outputs are taken after the symmetry that brings the conditioned outputs to the left. \end{enumerate} \end{definition} \begin{definition}[Inversion at a state]\label{def:relinv} Let $\pi\colon I\to X$ and $f\colon X\to Y$. An \emph{inversion of $f$ at $\pi$} is $f^\dagger_\pi\colon Y\to X$ with \begin{equation}\label{eq:relinv} \pi\sq\fan{f,\id_X}=\pi\sq f\sq\fan{\id_Y,f^\dagger_\pi},\qquad\text{that is,}\qquad \sdDagInvB\ =\ \sdDagInvA \end{equation} \end{definition} An inversion of $f$ at $\pi$ is the Bayesian inversion of Cho and Jacobs and of Fritz \cite[Sec.~3]{CJ19}, \cite[Rem.~13.10]{Fri20}: it is a conditional of $X$ given $Y$ for the joint state $\pi\sq\fan{f,\id_X}$. Hence any two inversions of $f$ at $\pi$ agree $\sim_{\pi\sq f}$ \cite[Prop.~13.7]{Fri20}, and deleting $Y$ in \eqref{eq:relinv} gives $\pi\sq f\sq f^\dagger_\pi=\pi$. After the symmetry of the outputs, \eqref{eq:relinv} is the conditionals equation \begin{equation}\label{eq:cond} \pi\sq\fan{\id_X,f}=(\pi\sq f)\sq\fan{f^\dagger_\pi,\id_Y},\qquad\text{that is,}\qquad\sdCondL\ =\ \sdCondR \end{equation} is the root of this paper: one joint state, two conditionals. \begin{definition}[Probability spaces, \cite{Fri20}]\label{def:ps} Let $\C$ be a Markov category with conditionals, hence causal \cite[Prop.~11.34]{Fri20}. Its probability spaces form the category $\PS(\C)$ whose objects are the pairs $(X,\pi)$ of an object and a state on it, and whose morphisms $[h]_\pi\colon(X,\pi)\to(Y,\pi\sq h)$ are the classes of channels $h\colon X\to Y$ modulo $\sim_\pi$, with $[h]_\pi\sq[k]_{\pi\sq h}=[h\sq k]_\pi$ \cite[Lemma~13.4, Rem.~13.6, Prop.~13.9(a)]{Fri20}. \end{definition} \begin{proposition}[Inversion with supports]\label{prop:support} Let every state $\pi$ on $X$ have a chosen support, a pair $X_\pi\xrightarrow{i_\pi}X\xrightarrow{j_\pi}X_\pi$ with $i_\pi\sq j_\pi=\id$ such that $h\sim_\pi h'$ if and only if $i_\pi\sq h=i_\pi\sq h'$ \cite[Def.~13.20]{Fri20}, \cite[Def.~4]{BH22}. Then $\Supp(X,\pi):=X_\pi$ and $\Supp[h]_\pi:=i_\pi\sq h\sq j_{\pi\sq h}$ define a functor $\Supp\colon\PS(\C)\to\C$, which sends the class $[f^\dagger_\pi]_{\pi\sq f}$ of an inversion to the inversion $i_{\pi\sq f}\sq f^\dagger_\pi\sq j_\pi$ with support of Braithwaite and Hedges \cite[Prop.~15]{BH22}. Hence every equation between classes in $\PS(\C)$ holds strictly between supports. \end{proposition} \begin{proof} $\Supp$ is well defined because $i_\pi\sq h$ depends only on $[h]_\pi$. For $h\colon X\to Y$, $k\colon Y\to Z$ and $\rho:=\pi\sq h$, the support property turns $i_\rho\sq r_\rho\sq i_\rho=i_\rho$ into $[r_\rho\sq i_\rho]_\rho=[\id]_\rho$, hence $[h\sq r_\rho\sq i_\rho\sq k]_\pi=[h\sq k]_\pi$, and applying $i_\pi\sq-\sq r_{\rho\sq k}$ gives $\Supp[h]_\pi\sq\Supp[k]_\rho=\Supp[h\sq k]_\pi$, while identities go to $i_\pi\sq r_\pi=\id$. The value at $[f]^\dagger_\pi$ is the definition. \end{proof} The \emph{dependent sum} of channels $c\colon B\to Y$ and $d\colon B\otimes Y\to Z$ is \[ c\wsemi d:=\fan{\id_B,c}\sq\fan{\del_B\otimes\id_Y,d}\colon B\to Y\otimes Z, \] which keeps the output of $c$ and feeds both $B$ and it to $d$; it is the conditional composition of \cite[Def.~2.3]{DLRS25} and satisfies \begin{equation}\label{eq:dsum} \fan{\id_B,c\wsemi d}=\fan{\id_B,c}\sq\fan{\id_{B\otimes Y},d}, \end{equation} since both sides copy $B$, apply $c$ once and give copies of $B$ and $Y$ to $d$; this identity gives its unit and associativity laws \cite[Prop.~2.5]{DLRS25}. The proofs below use three rules for a state $\omega$ \cite[Lemma~13.4, Rem.~13.6, Lemma~13.5]{Fri20}: (a) $a\sim_\omega b$ implies $a\sq k\sim_\omega b\sq k$, (b) $a\sim_{\omega\sq h}b$ implies $h\sq a\sim_\omega h\sq b$, and (c) $a\sim_\omega b$ and $a'\sim_\omega b'$ imply $\fan{a,a'}\sim_\omega\fan{b,b'}$. \subsection{Contextful arrows on one base}\label{sec:ctx} A \emph{family} on a category $\B$ is here a presheaf $F\colon\B^{\op}\to\Set$ of large sets, and $\B\odot F$ is its category of elements: objects $(b,x)$ with $x\in F(b)$, and a morphism $(b',x')\to(b,x)$ is $u\colon b'\to b$ with $F(u)(x)=x'$. Its projection to $\B$ is a discrete fibration. With the dependent sum $(F\wsemi G)(b):=\coprod_{x\in F(b)}G(b,x)$ of $F$ and a family $G$ on $\B\odot F$, the families on all categories form a contextad on $\Cat$ in the sense of Capucci and Myers \cite{CM24}. This paper uses only its contextful arrows on one base. \begin{definition}[Contextful arrows on one base]\label{def:ctx} Let $\B$ be a category. The category $\CB$ has the following parts. \begin{enumerate}[label=(\roman*),leftmargin=*] \item \emph{Objects.} \emph{Contextful arrows} $(F,f)\colon\B\lto\B$: a family $F$ on $\B$ and any functor $f\colon\B\odot F\to\B$, its \emph{foot}. \item \emph{Cells.} A cell $(\theta,\varphi)\colon(F,f)\Rightarrow(F',f')$ is a natural transformation $\theta\colon F\Rightarrow F'$ together with a natural transformation $\varphi\colon(\B\odot\theta)\sq f'\Rightarrow f$, its \emph{foot cell}, where $\B\odot\theta$ sends $(b,x)$ to $(b,\theta_b x)$. Cells compose by $(\theta,\varphi)\sq(\theta',\varphi')=(\theta\sq\theta',((\B\odot\theta)\varphi')\sq\varphi)$. \item \emph{Composite.} $(F,f)\kcomp(G,g):=\bigl(F\wsemi f^*G,\ (b,x,y)\mapsto g(f(b,x),y)\bigr)$, where $f^*G:=f^{\op}\sq G$ is the base change of $G$ along $f$, so that $(F\wsemi f^*G)(b)=\{(x,y)\mid x\in F(b),\ y\in G(f(b,x))\}$ and a morphism $u\colon b'\to b$ acts by $(x,y)\mapsto(F(u)x,\,G(f(u))y)$ for the morphism $f(u)\colon f(b',F(u)x)\to f(b,x)$. \item \emph{Unit.} $(\one_{\B},\varepsilon)$ with $\one_{\B}(b)=\{\ast\}$ and $\varepsilon(b,\ast)=b$. \end{enumerate} \end{definition} \begin{figure}[htb]\centering \begin{tikzcd}[column sep=small,row sep=small] && \B\odot(F\wsemi f^*G)\arrow[dl]\arrow[dr]\arrow[dd,phantom,"\rotatebox{-45}{$\lrcorner$}" very near start] && \\ & \B\odot F\arrow[dl]\arrow[dr,"f"] && \B\odot G\arrow[dl]\arrow[dr,"g"] & \\ \B && \B && \B \end{tikzcd} \medskip \begin{tikzcd}[column sep=large,row sep=normal] & \B\odot F\arrow[dl]\arrow[dr,"f",""'{name=f}]\arrow[dd,"\B\odot\theta"'] & \\ \B && \B\\ & \B\odot F'\arrow[ul]\arrow[ur,"f'"',""{name=fp}] & \arrow[Rightarrow,from=fp,to=f,shorten=2mm,"\varphi"'] \end{tikzcd} \caption{In $\Cat$. Top: the composite $(F,f)\protect\kcomp(G,g)$, whose elements $(b,x,y)$ form the pullback of $f$ and the projection of $\B\odot G$. Bottom: a cell $(\theta,\varphi)\colon(F,f)\Rightarrow(F',f')$, strict on the projections and with $\varphi\colon(\B\odot\theta)\sq f'\Rightarrow f$ on the feet.}\label{fig:ctx} \end{figure} The cells are right-colax (Figure~\ref{fig:ctx}): the family is mapped on the nose and the foot up to $\varphi$, as for the 1-cells of the tricategory of spans of Capucci and Myers \cite[Sec.~1.3]{CM24}. Their double category of contextful arrows asks $\varphi$ to be an identity; the strong monoidal functor of Section~\ref{sec:K} needs the right-colax cells, because its action on channels moves the foot. \begin{lemma}[A monoidal category]\label{lem:monoidal} $(\CB,\kcomp,(\one_{\B},\varepsilon))$ is a monoidal category whose associator and unitors are the rebracketings $((x,y),z)\leftrightarrow(x,(y,z))$ and $(\ast,x)\leftrightarrow x\leftrightarrow(x,\ast)$ with identity foot cells. On cells, \[ (\theta,\varphi)\kcomp(\zeta,\psi):=\bigl((x,y)\mapsto(\theta x,\ \zeta\,G(\varphi_{(b,x)})y),\ \ \psi_{(f'(b,\theta x),\,G(\varphi)y)}\sq g(\varphi_{(b,x)},\id)\bigr) \] for $(\theta,\varphi)\colon(F,f)\Rightarrow(F',f')$ and $(\zeta,\psi)\colon(G,g)\Rightarrow(G',g')$, where $G(\varphi_{(b,x)})\colon G(f(b,x))\to G(f'(b,\theta x))$ restricts along $\varphi_{(b,x)}\colon f'(b,\theta x)\to f(b,x)$ and $g(\varphi_{(b,x)},\id)$ is $g$ applied to the morphism $(f'(b,\theta x),G(\varphi)y)\to(f(b,x),y)$ of $\B\odot G$. \end{lemma} \begin{proof} \emph{Composite.} $F\wsemi f^*G$ is a family since $F$, $G$ and $f$ are functors, and $(b,x,y)\mapsto g(f(b,x),y)$ is a functor on its elements, so $\kcomp$ is well defined on objects. \emph{Cells.} The first component of $(\theta,\varphi)\kcomp(\zeta,\psi)$ is natural in $b$ because $\theta$, $\zeta$ and $\varphi$ are natural and $G$ is a functor, and it lands in $F'\wsemi f'^*G'$ since $\zeta$ maps $G(f'(b,\theta x))$ to $G'(f'(b,\theta x))$. Its second component goes from $g'(f'(b,\theta x),\zeta G(\varphi)y)$ through $g(f'(b,\theta x),G(\varphi)y)$ to $g(f(b,x),y)$ and is natural as a composite of natural transformations. \emph{Functoriality.} For identity cells both components are identities. For composable cells, both sides of the interchange law apply $\theta\sq\theta'$ to $x$ and, to $y$, restrict along the composite foot cell and then apply $\zeta\sq\zeta'$; this agrees because restriction along $\varphi$ commutes with $\zeta$ by naturality of $\zeta$, and the foot cells agree because $g$ is a functor on $\B\odot G$. \emph{Coherence.} Both bracketings of a triple composite have the elements $(x,y,z)$ with $y\in G(f(b,x))$ and $z\in H(g(f(b,x),y))$, the same foot and the same action of morphisms, so the rebracketings are isomorphisms of families with identity foot cells, natural in cells by the formula above. The pentagon and triangle hold because they compare rebracketings of the same tuples. \end{proof} A monoid in $\CB$ is a contextful arrow $(F,f)$ with cells $\eta\colon(\one_{\B},\varepsilon)\Rightarrow(F,f)$ and $\mu\colon(F,f)\kcomp(F,f)\Rightarrow(F,f)$ satisfying the monoid laws. \section{Lifts}\label{sec:lifts} From now on $\C$ is a strict Markov category with conditionals. \begin{definition}[States and lifts]\label{def:lifts} \leavevmode \begin{enumerate}[label=(\roman*),leftmargin=*] \item \emph{The base.} $\B:=(I/\C)^{\op}$. Its objects are the states $\rho\colon I\to A$, and a morphism $\rho'\to\rho$ from a state $\rho'$ on $A'$ is a channel $u\colon A\to A'$ with $\rho\sq u=\rho'$. \item \emph{Lifts.} For an object $Y$, the \emph{lifts} of $\rho$ to $Y$ are \[ L_Y(\rho):=\{\gamma\colon I\to A\otimes Y\mid\gamma\sq(\id_A\otimes\del_Y)=\rho\}, \] and a morphism $u\colon\rho'\to\rho$ acts by $L_Y(u)(\gamma):=\gamma\sq(u\otimes\id_Y)$. \item \emph{All lifts.} $L(\rho):=\{(Y,\gamma)\mid Y\in\C,\ \gamma\in L_Y(\rho)\}=\coprod_{Y\in\C}L_Y(\rho)$, with the same action. \end{enumerate} \end{definition} $L_Y(u)$ lands in $L_Y(\rho')$ because $(u\otimes\id_Y)\sq(\id_{A'}\otimes\del_Y)=(\id_A\otimes\del_Y)\sq u$, so $L_Y$ and $L$ are families on $\B$. A lift fixes one marginal only: fixing also the marginal $\nu$ on $Y$ gives the Fr\'echet class of couplings of $\rho$ and $\nu$~\cite{Fre51}, and $L_Y(\rho)$ is the disjoint union of these classes over the states $\nu$ on $Y$. The sum in $L$ runs over the objects of $\C$ only; channels between the $Y$ act in Section~\ref{sec:K}. \begin{proposition}[Lifts as kernels]\label{prop:kernel} Let $\rho$ be a state on $A$. Then $[d]_\rho\mapsto\rho\sq\fan{\id_A,d}$ is a bijection from the classes of channels $d\colon A\to Y$ modulo $\sim_\rho$ onto $L_Y(\rho)$ \cite[Thm.~5.5]{CJ19}, \cite[Prop.~13.9(b)]{Fri20}. \end{proposition} \begin{proposition}[Bayesian lenses as sections]\label{prop:section} Let $f\colon X\to Y$ be a channel. \begin{enumerate}[label=(\roman*),leftmargin=*] \item \emph{A lift.} At a state $\pi$ on $X$, the lens component $(f,f^\dagger_\pi)$ of a Bayesian lens whose backward part is an inversion determines the lift $\pi\sq\fan{\id_X,f}=(\pi\sq f)\sq\fan{f^\dagger_\pi,\id_Y}\in L_Y(\pi)$, and every almost sure choice of $f^\dagger_\pi$ gives this lift. \item \emph{A section.} Bundled over all states, the lens $(f,f^\sharp)$ with $f^\sharp_\pi=f^\dagger_\pi$ determines $(\pi\sq\fan{\id_X,f})_\pi\in\prod_{\pi\in\mathrm{Hom}_{\C}(I,X)}L_Y(\pi)$, a section of the projection $\coprod_\pi L_Y(\pi)\to\C(I,X)$. \end{enumerate} \end{proposition} \begin{proof} (i) is~\eqref{eq:cond}, and its right-hand side depends only on the class of $f^\dagger_\pi$ modulo $\sim_{\pi\sq f}$ by Definition~\ref{def:as}(i). (ii) follows by taking (i) at every $\pi$. \end{proof} \begin{definition}[Two feet]\label{def:feet} The family $L_Y$ has two feet $\B\odot L_Y\to\B$: \begin{enumerate}[label=(\roman*),leftmargin=*] \item \emph{the marginal foot} $m(\rho,\gamma):=\gamma\sq(\del_A\otimes\id_Y)$, a state on $Y$, with $m(u):=\id_Y$; \item \emph{the joint foot} $r(\rho,\gamma):=\gamma$, a state on $A\otimes Y$, with $r(u):=u\otimes\id_Y$. \end{enumerate} \end{definition} Both are functors: $m(u)$ is a morphism because $\gamma\sq(u\otimes\id_Y)\sq(\del_{A'}\otimes\id_Y)=\gamma\sq(\del_A\otimes\id_Y)$, and $r(u)$ is one by the definition of $L_Y(u)$. Hence $(L_Y,m)$ and $(L_Y,r)$ are contextful arrows $\B\lto\B$ (Figure~\ref{fig:feet}), and Table~\ref{tab:feet} compares their composites at $\pi$ for $\gamma_1:=\pi\sq\fan{\id_X,f}$, $\gamma_2':=(\pi\sq f)\sq\fan{\id_Y,g}$ and $\gamma_2:=\gamma_1\sq\fan{\id_{X\otimes Y},\del_X\otimes g}$. \begin{figure}[htb]\centering $\sdLiftDelY\ =\ \sdState{\rho}{A}\qquad\qquad m(\rho,\gamma)=\ \sdLiftDelA\qquad\qquad r(\rho,\gamma)=\ \sdLift$ \caption{In $\C$. A lift $\gamma\in L_Y(\rho)$ has marginal $\rho$ (left); its marginal foot deletes $A$, its joint foot is $\gamma$ itself (right).}\label{fig:feet} \end{figure} \begin{table}[htb]\centering \begin{tabular}{@{}lll@{}} \toprule & marginal foot $m$ & joint foot $r$\\ \midrule foot at $\pi$ & $\pi\sq f$ & $\gamma_1$\\ element at $\pi$ & $(\gamma_1,\gamma_2')$ & $(\gamma_1,\gamma_2)$\\ to one lift & glue on $Y$, delete $Y$ & keep the last lift\\ result & $\pi\sq\fan{\id_X,f\sq g}\in L_Z(\pi)$ & $\gamma_2\in L_{Y\otimes Z}(\pi)$\\ inversion & $(f\sq g)^\dagger_\pi\sim_{\pi\sq f\sq g}g^\dagger_{\pi\sq f}\sq f^\dagger_\pi$, at each step & one inversion, at the end\\ \bottomrule \end{tabular} \caption{The composites $(L_Y,m)\protect\kcomp(L_Z,m)$ and $(L_Y,r)\protect\kcomp(L_Z,r)$ at a state $\pi$ on $X$, for $f\colon X\to Y$ and $g\colon Y\to Z$. Gluing $(\gamma_1,\gamma_2')$ on $Y$ gives $\pi\sq\fan{\id_X,f\sq\fan{\id_Y,g}}$, the dependent sum of Proposition~\ref{prop:rev}(ii), and deleting $Y$ reads off the chain rule of Bayesian lenses (Proposition~\ref{prop:rev}(iii)).}\label{tab:feet} \end{table} \section{The strong monoidal functor of lifts}\label{sec:K} \begin{definition}[The functor $K$]\label{def:K} For an object $Y$, $K(Y):=(L_Y,r)\colon\B\lto\B$. For a channel $g\colon Y\to Y'$, $K(g)\colon K(Y)\Rightarrow K(Y')$ is the cell with $\theta_g(\gamma):=\gamma\sq(\id_A\otimes g)$ and foot cell $(\varphi_g)_{(\rho,\gamma)}:=\id_A\otimes g\colon r(\rho,\theta_g\gamma)\to r(\rho,\gamma)$, the morphism of $\B$ given by the channel $\id_A\otimes g\colon A\otimes Y\to A\otimes Y'$. \end{definition} $\theta_g$ is natural since $(u\otimes\id_Y)\sq(\id_{A'}\otimes g)=(\id_A\otimes g)\sq(u\otimes\id_{Y'})$, $\theta_g(\gamma)$ is again a lift of $\rho$ by naturality of $\del$, and $\varphi_g$ is a morphism $\gamma\sq(\id_A\otimes g)\to\gamma$ of $\B$ by its definition. The foot cell is not an identity, which is why $\CB$ has right-colax cells. \begin{table}[htb]\centering \begin{tabular}{@{}llll@{}} \toprule & datum & on lifts at $\rho$ & foot cell\\ \midrule object & $K(Y)$ & $L_Y(\rho)$, foot $r$ & \\ channel $g\colon Y\to Y'$ & $K(g)$ & $\gamma\mapsto\gamma\sq(\id_A\otimes g)$ & $\id_A\otimes g$\\ symmetry & $K(\sigma_{X,Y})$ & $\gamma\mapsto\gamma\sq(\id_A\otimes\sigma_{X,Y})$ & $\id_A\otimes\sigma_{X,Y}$\\ comparison on $\otimes$ & $\Phi_{X,Y}$ & $(\gamma,\gamma')\mapsto\gamma'$ & identity\\ its inverse & $\Phi_{X,Y}^{-1}$ & $\gamma'\mapsto(\gamma'\sq(\id_{A\otimes X}\otimes\del_Y),\gamma')$ & identity\\ comparison on $I$ & $\Phi_0$ & $\ast\mapsto\rho\in L_I(\rho)=\{\rho\}$ & identity\\ unit of $(L,r)$ & $\eta$ & $\ast\mapsto(I,\rho)$ & identity\\ product of $(L,r)$ & $\mu$ & $((X,\gamma),(Y,\gamma'))\mapsto(X\otimes Y,\gamma')$ & identity\\ \bottomrule \end{tabular} \caption{The strong monoidal functor $K\colon(\C,\otimes,I)\to(\CB,\protect\kcomp,(\one_{\B},\varepsilon))$ and the monoid of lifts, on lifts $\gamma\in L_X(\rho)$ and $\gamma'\in L_Y(\gamma)$ of a state $\rho$ on $A$.}\label{tab:K} \end{table} \begin{theorem}[Lifts form a strong monoidal functor]\label{thm:K} The data of Table~\ref{tab:K} form a strong monoidal functor $K\colon(\C,\otimes,I)\to(\CB,\kcomp,(\one_{\B},\varepsilon))$ with comparisons $\Phi$ and $\Phi_0$, and a monoid $((L,r),\eta,\mu)$ in $\CB$ whose product $\mu$ restricts on the summands to $\Phi$. \end{theorem} \begin{proof} \emph{Functor.} $K(\id_Y)$ is the identity cell and $K(g)\sq K(g')=K(g\sq g')$, since $(\id_A\otimes g)\sq(\id_A\otimes g')=\id_A\otimes(g\sq g')$ on both components. \emph{Comparison on $\otimes$.} An element of $(L_X\wsemi r^*L_Y)(\rho)$ is a pair $(\gamma,\gamma')$ with $\gamma\in L_X(\rho)$ and $\gamma'\in L_Y(r(\rho,\gamma))=L_Y(\gamma)$, that is, a state $\gamma'$ on $A\otimes X\otimes Y$ with marginal $\gamma$ on $A\otimes X$, whose marginal on $A$ is $\rho$. Hence $\gamma'\in L_{X\otimes Y}(\rho)$, and $\gamma$ is recovered from $\gamma'$ as its marginal, so $\Phi_{X,Y}$ is a bijection at each $\rho$. It is natural in $\rho$ because both sides act by $-\sq(u\otimes\id_{X\otimes Y})$, and the feet agree: the composite foot sends $(\rho,\gamma,\gamma')$ to $r(\gamma,\gamma')=\gamma'=r(\rho,\gamma')$. \emph{Naturality.} For $g\colon X\to X'$ and $h\colon Y\to Y'$, the cell $K(g)\kcomp K(h)$ of Lemma~\ref{lem:monoidal} sends $(\gamma,\gamma')$ to $(\gamma\sq(\id\otimes g),\gamma'\sq(\id\otimes g\otimes\id_Y)\sq(\id\otimes\id\otimes h))$, since restriction along $(\varphi_g)$ is $L_Y(\id_A\otimes g)$. Its image under $\Phi$ is $\gamma'\sq(\id_A\otimes g\otimes h)=\theta_{g\otimes h}(\gamma')$, and its foot cell is $\id_A\otimes g\otimes h$, which is that of $K(g\otimes h)$. \emph{Unit.} $L_I(\rho)=\{\rho\}$ since $\del_I=\id_I$, and the foot of $K(I)$ at $\rho$ is $\rho=\varepsilon(\rho,\ast)$. \emph{Coherence.} Both sides of the associativity axiom send a triple $(\gamma,\gamma',\gamma'')$ of consecutive lifts to $\gamma''$, and both sides of the unit axioms send $(\ast,\gamma)$ and $(\gamma,\ast)$ to $\gamma$, since $\C$ is strict. \emph{Monoid.} $(L,r)$ is the sum of the $K(Y)$ over the objects of $\C$, and $\kcomp$ preserves these sums in each variable because the elements of a composite are pairs. Hence $\eta$ and $\mu$ are cells, and the monoid laws are those of $\Phi$ and $\Phi_0$ on summands, together with the associativity and unit of $\otimes$ on objects. \end{proof} An element of $K(Y_1)\kcomp\cdots\kcomp K(Y_n)$ at $\rho$ is a \emph{run}: a chain $(\gamma_1,\dots,\gamma_n)$ of lifts with $\gamma_k\in L_{Y_k}(\gamma_{k-1})$ and $\gamma_0=\rho$, and the $n$-fold comparison $\Phi$ sends it to $\gamma_n\in L_{Y_1\otimes\cdots\otimes Y_n}(\rho)$ (Figure~\ref{fig:run}). Sequential updating keeps the run; batch updating takes $\Phi$. \begin{figure}[htb]\centering $\sdRun$ \caption{In $\C$. A run $(\gamma_1,\gamma_2)$ of $K(X)\protect\kcomp K(Y)$ at $\rho$, with $\gamma_1=\rho\sq\fan{\id_A,d_1}$ (dashed) and $\gamma_2=\gamma_1\sq\fan{\id_{A\otimes X},d_2}$ by Proposition~\ref{prop:kernel}; $\Phi$ sends it to the whole diagram $\gamma_2$.}\label{fig:run} \end{figure} \begin{proposition}[Runs are conditional composites]\label{prop:runs} Let $\rho$ be a state on $A$, and for $1\le k\le n$ let $d_k\colon A\otimes Y_1\otimes\cdots\otimes Y_{k-1}\to Y_k$ be channels. Put $\gamma_0:=\rho$ and $\gamma_k:=\gamma_{k-1}\sq\fan{\id,d_k}$. Then $(\gamma_1,\dots,\gamma_n)$ is a run of $K(Y_1)\kcomp\cdots\kcomp K(Y_n)$ at $\rho$, every run is of this form with each $d_k$ unique up to $\sim_{\gamma_{k-1}}$, and $\Phi$ sends it to $\gamma_n=\rho\sq\fan{\id_A,d_1\wsemi\cdots\wsemi d_n}$, where $\wsemi$ is the dependent sum of channels of Section~\ref{sec:markov}, the conditional composition of \cite[Def.~2.3]{DLRS25}, in any bracketing \cite[Prop.~2.5]{DLRS25}. \end{proposition} \begin{proof} Deleting $Y_k$ from $\gamma_{k-1}\sq\fan{\id,d_k}$ gives $\gamma_{k-1}$ by naturality of $\del$, so $\gamma_k\in L_{Y_k}(\gamma_{k-1})$, and $\gamma_{k-1}$ is the point $r(\gamma_{k-2},\gamma_{k-1})$ (for $k\ge2$) at which the $k$-th family is read; conversely Proposition~\ref{prop:kernel} at $\gamma_{k-1}$ gives $d_k$. The comparison $\Phi$ sends a run to its last lift (Table~\ref{tab:K}), and induction on $k$ with~\eqref{eq:dsum} gives $\gamma_n=\rho\sq\fan{\id_A,d_1\wsemi\cdots\wsemi d_n}$. \end{proof} With the marginal foot $m$ instead, the $k$-th lift is read at the marginal on $Y_{k-1}$ ($Y_0:=A$), so each $d_k$ reads only $Y_{k-1}$, and a run is a chain of couplings that glues to a Markov chain. \section{Swaps and updating}\label{sec:updating} \begin{definition}[Swaps]\label{def:swap} For objects $X$ and $Y$, the \emph{swap} is the invertible cell \[ s_{X,Y}:=\Phi_{X,Y}\sq K(\sigma_{X,Y})\sq\Phi_{Y,X}^{-1}\colon K(X)\kcomp K(Y)\Rightarrow K(Y)\kcomp K(X). \] Drawing a run as a tower whose $k$-th \emph{floor} is the factor $K(Y_k)$ carrying the lift $\gamma_k$ (Figure~\ref{fig:coh}), $s_{X,Y}$ moves the floor $X$ above the floor $Y$; it \emph{elevates} $X$ over $Y$. \end{definition} \begin{proposition}[Swaps are inversions]\label{prop:swap} \leavevmode \begin{enumerate}[label=(\roman*),leftmargin=*] \item \emph{At any state.} At $\rho$ on $A$, $s_{X,Y}(\gamma,\gamma')=(\delta,\gamma'\sq(\id_A\otimes\sigma_{X,Y}))$, where $\delta$ is the marginal of $\gamma'\sq(\id_A\otimes\sigma_{X,Y})$ on $A\otimes Y$. \item \emph{At the unit.} At the state $\id_I$, a pair is $(\pi,\pi\sq\fan{\id_X,f})$ for a state $\pi$ on $X$ and a channel $f\colon X\to Y$, unique up to $\sim_\pi$, and \[ s_{X,Y}(\pi,\ \pi\sq\fan{\id_X,f})=\bigl(\pi\sq f,\ (\pi\sq f)\sq\fan{\id_Y,f^\dagger_\pi}\bigr). \] The swap exchanges a prior and its lift along $f$ for the predictive and its lift along the inversion $f^\dagger_\pi$. \end{enumerate} \end{proposition} \begin{proof} (i) $\Phi$ sends $(\gamma,\gamma')$ to $\gamma'$, $K(\sigma)$ sends $\gamma'$ to $\gamma'\sq(\id_A\otimes\sigma_{X,Y})$, and $\Phi^{-1}$ splits off the marginal. (ii) By Proposition~\ref{prop:kernel} at $\rho=\id_I$, every pair is of the stated form. By (i), $s$ sends it to the marginal $\pi\sq f$ and the state $\pi\sq\fan{\id_X,f}\sq\sigma_{X,Y}$, and \[ \sdCondLsigma\ =\ \sdDagInvB\ =\ \sdDagInvA \] by the commutativity of $\cop$ and by~\eqref{eq:relinv}. \end{proof} \begin{lemma}[Coherence of elevation]\label{lem:coh} For objects $X,Y_1,\dots,Y_n$, let $S_k:=\id\kcomp s_{X,Y_k}\kcomp\id$ elevate $X$ over the $k$-th floor in $K(Y_1)\kcomp\cdots\kcomp K(Y_{k-1})\kcomp K(X)\kcomp K(Y_k)\kcomp\cdots\kcomp K(Y_n)$. Then \[ S_1\sq S_2\sq\cdots\sq S_n\sq\Phi=\Phi\sq K(\sigma_{X,\,Y_1\otimes\cdots\otimes Y_n}) \] as cells $K(X)\kcomp K(Y_1)\kcomp\cdots\kcomp K(Y_n)\Rightarrow K(Y_1\otimes\cdots\otimes Y_n\otimes X)$, where $\Phi$ is the $(n+1)$-fold comparison. \end{lemma} \begin{proof} By naturality of $\Phi$ (Theorem~\ref{thm:K}), $S_k\sq\Phi=\Phi\sq K(\id_{Y_{k}})$ with $Y_{k}:=Y_{k+1}\otimes\cdots\otimes Y_n$, since $s_{X,Y_k}$ is $\Phi\sq K(\sigma)\sq\Phi^{-1}$ and $\Phi$ is coherent. Composing over $k$ and using functoriality of $K$ gives $\Phi\sq K$ applied to $(\sigma_{X,Y_1}\otimes\id)\sq\cdots\sq(\id\otimes\sigma_{X,Y_n})$, which is $\sigma_{X,\,Y_1\otimes\cdots\otimes Y_n}$ by the hexagon axiom of the symmetry. \end{proof} Updating reads Lemma~\ref{lem:coh} at the unit state (Figure~\ref{fig:coh}). \begin{figure}[htb]\centering \begin{tikzcd}[column sep=large,row sep=large] \tower{Y_2\colon f\\ Y_1\colon f\\ X\colon\pi}\arrow[r,"S_1"]\arrow[d,"\Phi"'] & \tower{Y_2\colon f\\ X\colon f^\dagger_\pi\\ Y_1\colon\pi\sq f}\arrow[r,"S_2"] & \tower{X\colon p_2\\ Y_2\colon f^\dagger_\pi\sq f\\ Y_1\colon\pi\sq f}\arrow[d,"\Phi"]\\ \tower{X\otimes Y_1\otimes Y_2\colon\pi\sq\fan{\id_X,f,f}}\arrow[rr,"K(\sigma_{X,\,Y_1\otimes Y_2})"'] & & \tower{Y_1\otimes Y_2\otimes X\colon(\pi\sq\fan{f,f})\sq\fan{\id,\fan{f,f}^\dagger_\pi}} \end{tikzcd} \caption{In $\CB$ at the unit state $\id_I$, for $n=2$ and $f_1=f_2=f$. A run is drawn as a tower of floors, each floor the channel that gives its object from the floors below (Proposition~\ref{prop:kernel}); each $S_k$ is an inversion (Proposition~\ref{prop:swap}), $p_2$ is the second sequential update of Definition~\ref{def:obs}, and the square is Lemma~\ref{lem:coh}.}\label{fig:coh} \end{figure} Kamiya and Welliaveetil define sequential and batch updates at data \cite[Secs.~4.1--4.2]{KW21}; the following definition keeps the data as inputs. \begin{definition}[Sequential and batch updates]\label{def:obs} Let $\pi$ be a state on $X$ and $f_k\colon X\to Y_k$ channels for $1\le k\le n$, with $Y_{\le k}:=Y_1\otimes\cdots\otimes Y_k$ and $F_k:=\fan{f_1,\dots,f_k}\colon X\to Y_{\le k}$, $F_0:=\del_X$. \begin{enumerate}[label=(\roman*),leftmargin=*] \item \emph{Batch update.} An inversion $F_n^\dagger$ of $F_n$ at $\pi$. \item \emph{Sequential updates.} $\zeta_0:=\pi$ and $p_0:=\pi$, and for $k\ge1$ a conditional $p_k\colon Y_{\le k}\to X$ of $X$ given $Y_{\le k}$ for the state $\zeta_{k-1}\sq(\id_{Y_{