<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/public/default.xsl"?>
<fr:tree xmlns:fr="http://www.forester-notes.org" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xml="http://www.w3.org/XML/1998/namespace" root="false" base-url="/public/">
  <fr:frontmatter>
    <fr:authors>
      <fr:author>
        <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link>
      </fr:author>
      <fr:contributor>
        <fr:link href="/mirco-giacobbe/" title="Mirco Giacobbe" uri="https://forest.topos.site/mirco-giacobbe/" display-uri="https://forest.topos.site/mirco-giacobbe" type="local">Mirco Giacobbe</fr:link>
      </fr:contributor>
      <fr:contributor>
        <fr:link href="/diptarko-roy/" title="Diptarko Roy" uri="https://forest.topos.site/diptarko-roy/" display-uri="https://forest.topos.site/diptarko-roy" type="local">Diptarko Roy</fr:link>
      </fr:contributor>
    </fr:authors>
    <fr:date>
      <fr:year>2025</fr:year>
      <fr:month>2</fr:month>
      <fr:day>7</fr:day>
    </fr:date>
    <fr:uri>https://forest.topos.site/djm-00CP/</fr:uri>
    <fr:display-uri>https://forest.topos.site/djm-00CP</fr:display-uri>
    <fr:route>/djm-00CP/</fr:route>
    <fr:title text="On the representability of Lyapunov-type functions">On the representability of Lyapunov-type functions</fr:title>
    <fr:taxon>section</fr:taxon>
  </fr:frontmatter>
  <fr:mainmatter>

<html:p>This is a note to write down ideas generated during the ARIA Safeguarded AI workshop in York, Feb. 3 - 7 2025. These ideas were the result of collaboration with <fr:link href="/mirco-giacobbe/" title="Mirco Giacobbe" uri="https://forest.topos.site/mirco-giacobbe/" display-uri="https://forest.topos.site/mirco-giacobbe" type="local">Mirco Giacobbe</fr:link> and <fr:link href="/diptarko-roy/" title="Diptarko Roy" uri="https://forest.topos.site/diptarko-roy/" display-uri="https://forest.topos.site/diptarko-roy" type="local">Diptarko Roy</fr:link>.</html:p><html:p>In short, the main observation of this note is that the Lyapunov-type functions which witness the satisfaction of LTL formulas concerning non-deterministic discrete-time discrete-space automata are representable in a <fr:link href="https://forest.topos.site/dcst-2025-1/" type="external">double categorical systems theory</fr:link> of such automata, nicely matching <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">my</fr:link> <fr:link href="https://forest.topos.site/djm-008J/" type="external">proposal</fr:link> for assume-guarantee reasoning via tight bimodules between systems theories (in this case, a restriction of the tight-hom bimodule of the aforementioned systems theory). As a result, <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">I</fr:link> have a proposal for the general shape of the compositionality of Lyapunov-type functions, which <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">I</fr:link> hope will be a useful guide in future collaboration with <fr:link href="/mirco-giacobbe/" title="Mirco Giacobbe" uri="https://forest.topos.site/mirco-giacobbe/" display-uri="https://forest.topos.site/mirco-giacobbe" type="local">Mirco</fr:link> and <fr:link href="/diptarko-roy/" title="Diptarko Roy" uri="https://forest.topos.site/diptarko-roy/" display-uri="https://forest.topos.site/diptarko-roy" type="local">Dip</fr:link> aiming towards the development of a fully compositional theory of Lyapunov-type guarantees on system behavior.</html:p><html:p><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">I</fr:link> will adopt the terminology and point of view of <fr:link href="http://davidjaz.com/Papers/DynamicalBook.pdf" type="external">my book</fr:link>, specifically the first three chapters, for the rest of this note.</html:p><html:p>We begin with a generalization of the double category of <fr:link href="/djm-00B6/" title="double category of Spivak lenses" uri="https://forest.topos.site/djm-00B6/" display-uri="https://forest.topos.site/djm-00B6" type="local">Spivak lenses</fr:link>, also known as the "Grothendieck double construction" of the indexed category <fr:tex display="inline"><![CDATA[\mathsf {Bun} : C^{\mathsf {op}} \to  \mathcal {C}\mathsf {at}]]></fr:tex> in <fr:link href="/myers-2021-double/" title="Double Categories of Open Dynamical Systems (Extended Abstract)" uri="https://forest.topos.site/myers-2021-double/" display-uri="https://forest.topos.site/myers-2021-double" type="local">my ACT 2020 paper</fr:link> (see also Definition 3.5.0.6 of <fr:link href="http://davidjaz.com/Papers/DynamicalBook.pdf" type="external">my book</fr:link>), to allow for inequations in the notion of morphism of systems. </html:p><html:p>If you aren't deep into categories, feel free to skip to <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local">definition <fr:contextual-number uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" /></fr:link> below.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>7</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CQ/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CQ</fr:display-uri><fr:route>/djm-00CQ/</fr:route><fr:title text="double category of lenses and colax squares.">double category of lenses and colax squares.</fr:title><fr:taxon>construction</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>Let <fr:tex display="inline"><![CDATA[E : B^{\mathsf {op}} \to  2\mathcal {C}\mathsf {at}]]></fr:tex> be a 2-category (strictly) indexed by a 1-category <fr:tex display="inline"><![CDATA[B]]></fr:tex>. We define the strict double category <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {cx}}]]></fr:tex> of <html:strong>charts, lenses, and <html:em>colax</html:em> squares</html:strong> as follows:
<html:ol><html:li>
		The tight category of <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {cx}}]]></fr:tex> is the Grothendieck construction of the indexed category <fr:tex display="inline"><![CDATA[\tau _{1}E : B^{\mathsf {op}} \to  \mathcal {C}\mathsf {at}]]></fr:tex> of the underlying indexed category of <fr:tex display="inline"><![CDATA[E]]></fr:tex>.
	</html:li>
	<html:li>
		The loose category of <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {cx}}]]></fr:tex> is the Grothendieck construction of the indexed category <fr:tex display="inline"><![CDATA[\tau _{1}E^{\mathsf {op}} : B^{\mathsf {op}} \to  \mathcal {C}\mathsf {at}]]></fr:tex> of the pointwise opposite of the underlying indexed category of <fr:tex display="inline"><![CDATA[E]]></fr:tex>.
	</html:li>
	<html:li>
		A square
		
<html:figure><fr:resource hash="980cf83fba32435617c710c795496a6e"><fr:resource-content><html:img src="https://forest.topos.site/980cf83fba32435617c710c795496a6e.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
\begin {tikzcd}
	{{A_1^- \choose  A_1^+}} & {{A_3^- \choose  A_3^+}} \\
	{{A_2^- \choose  A_2^+}} & {{A_4^- \choose  A_4^+}}
	\arrow [""{name=0, anchor=center, inner sep=0}, "{{j_1^{\sharp } \choose  j_1}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{{f_1^{\flat } \choose  f_1}}"', from=1-1, to=2-1]
	\arrow ["{{f_2^{\flat } \choose  f_2}}", from=1-2, to=2-2]
	\arrow [""{name=1, anchor=center, inner sep=0}, "{{j_2^{\sharp } \choose  j_2}}"', "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow ["\alpha ", shorten <=4pt, shorten >=4pt, Rightarrow, from=0, to=1]
\end {tikzcd}
		]]></fr:resource-source></fr:resource></html:figure>


	consists of a commuting square as on the left and a 2-cell in <fr:tex display="inline"><![CDATA[E(A_1^+)]]></fr:tex> as on the right:
	
<html:figure><fr:resource hash="0c1e028a886864f950da062b5979806b"><fr:resource-content><html:img src="https://forest.topos.site/0c1e028a886864f950da062b5979806b.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
		\begin {tikzcd}
	{A_1^+} & {A_3^+} & {j_1^{\ast }A_3^-} && {A_1^-} \\
	{A_2^+} & {A_4^+} & {j_1^{\ast }f_2^{\ast }A_4^-} & {f_1^{\ast }j_2^{\ast }A_4^-} & {f_1^{\ast }A_2^-}
	\arrow ["{j_1}", from=1-1, to=1-2]
	\arrow ["{f_1}"', from=1-1, to=2-1]
	\arrow ["{f_2}", from=1-2, to=2-2]
	\arrow ["{j_1^{\sharp }}", from=1-3, to=1-5]
	\arrow ["{j_1^{\ast }f_2^{\flat }}"', from=1-3, to=2-3]
	\arrow ["\alpha "', shorten <=11pt, shorten >=11pt, Rightarrow, from=1-5, to=2-3]
	\arrow ["{f_1^{\flat }}", from=1-5, to=2-5]
	\arrow ["{j_2}"', from=2-1, to=2-2]
	\arrow [Rightarrow, no head, from=2-3, to=2-4]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=2-4, to=2-5]
\end {tikzcd}
	]]></fr:resource-source></fr:resource></html:figure></html:li>
	<html:li>
		Composition of squares is given by whiskering in the appropriate direction.
		<html:ol><html:li>
				For loose composition of the following squares
				
<html:figure><fr:resource hash="4c8653a95de49cc908c336172130ee7c"><fr:resource-content><html:img src="https://forest.topos.site/4c8653a95de49cc908c336172130ee7c.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
					\begin {tikzcd}
	{{A_1^- \choose  A_1^+}} & {{A_3^- \choose  A_3^+}} & {{A_5^- \choose  A_5^+}} \\
	{{A_2^- \choose  A_2^+}} & {{A_4^- \choose  A_4^+}} & {{A_6^- \choose  A_6^+}}
	\arrow [""{name=0, anchor=center, inner sep=0}, "{{j_1^{\sharp } \choose  j_1}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{{f_1^{\flat } \choose  f_1}}"', from=1-1, to=2-1]
	\arrow [""{name=1, anchor=center, inner sep=0}, "{{j_3^{\sharp } \choose  j_3}}", "\shortmid "{marking}, from=1-2, to=1-3]
	\arrow ["{{f_2^{\flat } \choose  f_2}}", from=1-2, to=2-2]
	\arrow ["{{f_3^{\flat } \choose  f_3}}", from=1-3, to=2-3]
	\arrow [""{name=2, anchor=center, inner sep=0}, "{{j_2^{\sharp } \choose  j_2}}"', "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow [""{name=3, anchor=center, inner sep=0}, "{{j_4^{\sharp } \choose  j_4}}"', "\shortmid "{marking}, from=2-2, to=2-3]
	\arrow ["\alpha ", shorten <=4pt, shorten >=4pt, Rightarrow, from=0, to=2]
	\arrow ["\beta ", shorten <=4pt, shorten >=4pt, Rightarrow, from=1, to=3]
\end {tikzcd}
				]]></fr:resource-source></fr:resource></html:figure>

				 we form the whisker <fr:tex display="inline"><![CDATA[j_1^{\ast }\beta  \star  \alpha ]]></fr:tex> as in the following diagram:
				
<html:figure><fr:resource hash="02f45941aa25785cff9039836692453d"><fr:resource-content><html:img src="https://forest.topos.site/02f45941aa25785cff9039836692453d.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
					\begin {tikzcd}
	{j_1^{\ast }j_3^{\ast }A_5^-} && {j_1^{\ast }A_3^-} && {A_1^-} && {} \\
	{j_1^{\ast }j_3^{\ast }f_3^{\ast }A_6^-} & {j_1^{\ast }f_2^{\ast }j_{4}^{\ast }A_6^-} & {j_1^{\ast }f_2^{\ast }A_4^-} & {f_1^{\ast }j_2^{\ast }A_4^-} & {f_1^{\ast }A_2^-} \\
	{j_1^{\ast }j_3^{\ast }f_3^{\ast }A_6^-} && {j_1^{\ast }f_2^{\ast }A_4^-} && {f_1^{\ast }A_2^-}
	\arrow ["{j_1^{\ast }j_3^{\sharp }}", from=1-1, to=1-3]
	\arrow ["{j_1^{\ast }f_3^{\flat }}"', from=1-1, to=2-1]
	\arrow ["{j_1^{\sharp }}", from=1-3, to=1-5]
	\arrow ["{j_1^{\ast }\beta }"', shorten <=13pt, shorten >=13pt, Rightarrow, from=1-3, to=2-1]
	\arrow ["{j_1^{\ast }f_2^{\flat }}"', from=1-3, to=2-3]
	\arrow ["\alpha "', shorten <=11pt, shorten >=11pt, Rightarrow, from=1-5, to=2-3]
	\arrow ["{f_1^{\flat }}", from=1-5, to=2-5]
	\arrow [Rightarrow, no head, from=2-1, to=2-2]
	\arrow [Rightarrow, no head, from=2-1, to=3-1]
	\arrow ["{j_1^{\ast }f_2^{\ast }j_4^{\sharp }}"', from=2-2, to=2-3]
	\arrow [Rightarrow, no head, from=2-3, to=2-4]
	\arrow [Rightarrow, no head, from=2-3, to=3-3]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=2-4, to=2-5]
	\arrow [Rightarrow, no head, from=2-5, to=3-5]
	\arrow ["{j_2^{\ast }f_1^{\ast }j_4^{\sharp }}"', from=3-1, to=3-3]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=3-3, to=3-5]
\end {tikzcd}
				]]></fr:resource-source></fr:resource></html:figure></html:li>
			<html:li>
				For tight composition of squares:
				
<html:figure><fr:resource hash="dfd23ebaa0566fd1321368d23be1750a"><fr:resource-content><html:img src="https://forest.topos.site/dfd23ebaa0566fd1321368d23be1750a.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
\begin {tikzcd}
	{{A_1^- \choose  A_1^+}} & {{A_3^- \choose  A_3^+}} \\
	{{A_2^- \choose  A_2^+}} & {{A_4^- \choose  A_4^+}} \\
	{{A_5^- \choose  A_5^+}} & {{A_6^- \choose  A_6^+}}
	\arrow [""{name=0, anchor=center, inner sep=0}, "{{j_1^{\sharp } \choose  j_1}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{{f_1^{\flat } \choose  f_1}}"', from=1-1, to=2-1]
	\arrow ["{{f_2^{\flat } \choose  f_2}}", from=1-2, to=2-2]
	\arrow [""{name=1, anchor=center, inner sep=0}, "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow ["{{f_3^{\flat } \choose  f_3}}"', from=2-1, to=3-1]
	\arrow ["{{f_4^{\flat } \choose  f_4}}", from=2-2, to=3-2]
	\arrow [""{name=2, anchor=center, inner sep=0}, "{{j_3^{\sharp } \choose  j_3}}"', "\shortmid "{marking}, from=3-1, to=3-2]
	\arrow ["\alpha ", shorten <=4pt, shorten >=4pt, Rightarrow, from=0, to=1]
	\arrow ["\beta ", shorten <=4pt, shorten >=4pt, Rightarrow, from=1, to=2]
\end {tikzcd}
				]]></fr:resource-source></fr:resource></html:figure>

				we form the whisker <fr:tex display="inline"><![CDATA[\alpha  \star  f_1^{\ast }\beta ]]></fr:tex> as in the following diagram:
				
<html:figure><fr:resource hash="6612bc33553ac1eda4bfff8639968e7a"><fr:resource-content><html:img src="https://forest.topos.site/6612bc33553ac1eda4bfff8639968e7a.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
					\begin {tikzcd}
	{j_1^{\ast }A_3^-} && {A_1^-} \\
	{j_1^{\ast }f_2^{\ast }A_4^-} & {f_1^{\ast }j_2^{\ast }A_4^-} & {f_1^{\ast }A_2^-} \\
	& {f_1^{\ast }j_2^{\ast }f_4^{\ast }A_5^-} \\
	{j_1^{\ast }f_2^{\ast }f_4^{\ast }A_5^-} & {f_1^{\ast }f_3^{\ast }j_3^{\ast }A_5^-} & {f_1^{\ast }f_3^{\ast }A_6^-}
	\arrow ["{j_1^{\sharp }}", from=1-1, to=1-3]
	\arrow ["{j_1^{\ast }f_2^{\flat }}"', from=1-1, to=2-1]
	\arrow ["\alpha "', shorten <=14pt, shorten >=14pt, Rightarrow, from=1-3, to=2-1]
	\arrow ["{f_1^{\flat }}", from=1-3, to=2-3]
	\arrow [Rightarrow, no head, from=2-1, to=2-2]
	\arrow ["{j_1^{\ast }f_2^{\ast }f_4^{\flat }}"', from=2-1, to=4-1]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=2-2, to=2-3]
	\arrow ["{f_1^{\ast }j_2^{\ast }f_4^{\flat }}"', from=2-2, to=3-2]
	\arrow ["{f_1^{\ast }\beta }"', shorten <=9pt, shorten >=9pt, Rightarrow, from=2-3, to=4-2]
	\arrow ["{f_1^{\ast }f_4^{\flat }}", from=2-3, to=4-3]
	\arrow [Rightarrow, no head, from=3-2, to=4-2]
	\arrow [Rightarrow, no head, from=4-1, to=4-2]
	\arrow ["{f_1^{\ast }f_3^{\ast }j_3^{\sharp }}"', from=4-2, to=4-3]
\end {tikzcd}
				]]></fr:resource-source></fr:resource></html:figure></html:li></html:ol></html:li>
	<html:li>
		Checking the associativity and interchange laws is straightforward but tedious.
	</html:li></html:ol></html:p><html:p>Dually, we define <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {lx}}(E) := \mathbb {L}\mathsf {ens}^{\mathsf {cx}}({E}^{\mathsf {co}})]]></fr:tex> to be the double category of lenses and <html:strong>lax</html:strong> squares:

<html:figure><fr:resource hash="4fa8fb41eedb3d7bfa3678f9a025f483"><fr:resource-content><html:img src="https://forest.topos.site/4fa8fb41eedb3d7bfa3678f9a025f483.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
\begin {tikzcd}
	{A_1^+} & {A_3^+} & {j_1^{\ast }A_3^-} && {A_1^-} \\
	{A_2^+} & {A_4^+} & {j_1^{\ast }f_2^{\ast }A_4^-} & {f_1^{\ast }j_2^{\ast }A_4^-} & {f_1^{\ast }A_2^-}
	\arrow ["{j_1}", from=1-1, to=1-2]
	\arrow ["{f_1}"', from=1-1, to=2-1]
	\arrow ["{f_2}", from=1-2, to=2-2]
	\arrow ["{j_1^{\sharp }}", from=1-3, to=1-5]
	\arrow ["{j_1^{\ast }f_2^{\flat }}"', from=1-3, to=2-3]
	\arrow ["{f_1^{\flat }}", from=1-5, to=2-5]
	\arrow ["{j_2}"', from=2-1, to=2-2]
	\arrow ["\alpha ", shorten <=11pt, shorten >=11pt, Rightarrow, from=2-3, to=1-5]
	\arrow [Rightarrow, no head, from=2-3, to=2-4]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=2-4, to=2-5]
\end {tikzcd}
]]></fr:resource-source></fr:resource></html:figure></html:p></fr:mainmatter></fr:tree><html:p>With <fr:link href="/djm-00CQ/" title="double category of lenses and colax squares." uri="https://forest.topos.site/djm-00CQ/" display-uri="https://forest.topos.site/djm-00CQ" type="local">construction <fr:contextual-number uri="https://forest.topos.site/djm-00CQ/" display-uri="https://forest.topos.site/djm-00CQ" /></fr:link> in hand, we are able to define the systems theory of interest: non-deterministic discrete-time discrete-space Moore machines.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>7</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CR/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CR</fr:display-uri><fr:route>/djm-00CR/</fr:route><fr:title text="non-deterministic discrete-time discrete-space Moore machines">non-deterministic discrete-time discrete-space Moore machines</fr:title><fr:taxon>definition</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>Let <fr:tex display="inline"><![CDATA[C \mapsto  \mathsf {Bikleisli}(C \times  -, \mathcal {P}) : \mathsf {Set}^{\mathsf {op}} \to  2\mathcal {C}\mathsf {at}]]></fr:tex> whose underlying indexed category sends a set <fr:tex display="inline"><![CDATA[C]]></fr:tex> to the bi-kleisli category of the comonad <fr:tex display="inline"><![CDATA[C \times  -]]></fr:tex> over the powerset monad <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex> (see Definition 2.6.4.1 and Theorem 2.6.4.5 of <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" /></fr:link>), equipped with a 2-category structure of pointwise containment:
<fr:tex display="block"><![CDATA[(f \subseteq  g ) := \forall  c,x,\, f(c, x) \subseteq  g(c, x)]]></fr:tex>
for <fr:tex display="inline"><![CDATA[f, g : C \times  X \to  \mathcal {P} Y]]></fr:tex>. Define the double category of <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-arenas <fr:tex display="inline"><![CDATA[\mathbb {A}\mathsf {rena}^{\mathsf {lx}}(\mathcal {P})]]></fr:tex> to be the double category <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {lx}}(\mathsf {Bikleisli}(\times ,\mathcal {P}))]]></fr:tex> with its feet replaced (Theorem 3.1.1 of <fr:link href="/courser-2020-open/" title="Open Systems: A Double Categorical Perspective" uri="https://forest.topos.site/courser-2020-open/" display-uri="https://forest.topos.site/courser-2020-open" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/courser-2020-open/" display-uri="https://forest.topos.site/courser-2020-open" /></fr:link>) by the deterministic charts (the inclusion <fr:tex display="inline"><![CDATA[\int \mathsf {cokleisli}(\times ) \hookrightarrow  \int \mathsf {Bikleisli}(\times ,\mathcal {P})]]></fr:tex> of the Grothendieck construction of the category of determinsitic charts (Definition 3.3.0.1 of <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" /></fr:link>)).
</html:p><html:p>We define the systems theory of
<html:strong>non-deterministic discrete-time discrete-space Moore machines</html:strong> (henceforth, "<fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines" for short) to be the systems theory with interface double category <fr:tex display="inline"><![CDATA[\mathbb {A}\mathsf {rena}^{\mathsf {lx}}(\mathcal {P})]]></fr:tex> associated to the section <fr:tex display="inline"><![CDATA[S \mapsto  {S \choose  S}]]></fr:tex> of the indexed category <fr:tex display="inline"><![CDATA[\mathsf {cokleisli}(\times )]]></fr:tex>. Explicitly: <html:ol><html:li>
		A <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine is a lens (<fr:link href="/djm-00CQ/" title="double category of lenses and colax squares." uri="https://forest.topos.site/djm-00CQ/" display-uri="https://forest.topos.site/djm-00CQ" type="local">loose morphism of <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {lx}}(\mathsf {Bikleisli}(\times , \mathcal {P}))]]></fr:tex></fr:link>) of the form <fr:tex display="inline"><![CDATA[{S \choose  S} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex>, which explicitly consists of two maps
		<fr:tex display="block"><![CDATA[
			\begin {cases}u : S \times  I \to  \mathcal {P} S \\ e : S \to  O \end {cases}
		]]></fr:tex>
		We say that <fr:tex display="inline"><![CDATA[{I \choose  O}]]></fr:tex> is the <html:strong>interface</html:strong> of the system <fr:tex display="inline"><![CDATA[{u \choose  e}]]></fr:tex>. (See Definition 2.1.0.1 of <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" /></fr:link>.)
 	</html:li>
	<html:li>
		A morphism of such systems (also known as a <html:em>refinement</html:em>) is a square
		
<html:figure><fr:resource hash="a580cbd833e205dbb9675a42bbf73988"><fr:resource-content><html:img src="https://forest.topos.site/a580cbd833e205dbb9675a42bbf73988.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
			\begin {tikzcd}
	{{S_1 \choose  S_1}} & {{I_1 \choose  O_1}} \\
	{{S_2 \choose  S_2}} & {{I_2 \choose  O_2}}
	\arrow [""{name=0, anchor=center, inner sep=0}, "{{u_1 \choose  e_1}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{{f \choose  f}}"', from=1-1, to=2-1]
	\arrow ["{{p^{\flat } \choose  p}}", from=1-2, to=2-2]
	\arrow [""{name=1, anchor=center, inner sep=0}, "{{u_2 \choose  e_2}}"', "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow [shorten <=4pt, shorten >=4pt, Rightarrow, from=0, to=1]
\end {tikzcd}
		]]></fr:resource-source></fr:resource></html:figure>

		in <fr:tex display="inline"><![CDATA[\mathbb {A}\mathsf {rena}^{\mathsf {lx}}(\mathcal {P})]]></fr:tex>. Explicitly, this consists of a <html:em>deterministic</html:em> chart <fr:tex display="inline"><![CDATA[{p^{\flat } \choose  p} : {I_1 \choose  O_1} \to  {I_2 \choose  O_2}]]></fr:tex>,
		<fr:tex display="block"><![CDATA[\begin {cases} p^{\flat } : O_1 \times  I_1 \to  I_2 \\ p : O_1 \to  O_2 \end {cases}]]></fr:tex>
		together with a map <fr:tex display="inline"><![CDATA[f : S_1 \to  S_2]]></fr:tex> on states so that
		<html:ol><html:li>
				For all states <fr:tex display="inline"><![CDATA[s \in  S_1]]></fr:tex>, we have <fr:tex display="inline"><![CDATA[e_2(f(s)) = p(e_1(s)) ]]></fr:tex>.
			</html:li>
			<html:li>
				For all <fr:tex display="inline"><![CDATA[s \in  S_1]]></fr:tex> and <fr:tex display="inline"><![CDATA[i \in  I_1]]></fr:tex>, we have
				<fr:tex display="block"><![CDATA[\forall  s' \in  u_1(s, i),\, f(s') \in  u_2(f(s), p^{\flat }(e(s), i)).]]></fr:tex></html:li></html:ol>
		(Compare these conditions to those of Definition 3.3.0.4 of <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" /></fr:link> for deterministic automata.)
	</html:li></html:ol></html:p></fr:mainmatter></fr:tree><html:p>This notion of systems theory is a slight generalization of the one which appears in <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">my book</fr:link>; namely, the morphisms involve a containment rather than an equality. This allows more maps between systems to be morphisms, and enables us to see more concepts as representable.</html:p><html:p>As a warmup, before getting into the representability of Lyapunov functions, let's see how traces of <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local"><fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines</fr:link> are representable by a simple system.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>8</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CS/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CS</fr:display-uri><fr:route>/djm-00CS/</fr:route><fr:title text="traces of \mathcal {P}-machines">traces of <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines</fr:title><fr:taxon>definition</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>Let <fr:tex display="inline"><![CDATA[{u \choose  e} : {S \choose  S} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex> be a <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local"><fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine</fr:link>. Given a sequence <fr:tex display="inline"><![CDATA[i : \mathbb {N} \to  I]]></fr:tex> of inputs and a sequence <fr:tex display="inline"><![CDATA[o : \mathbb {N} \to  O]]></fr:tex> of outputs, a <fr:tex display="inline"><![CDATA[{i \choose  o}]]></fr:tex>-<html:strong>trace</html:strong> of <fr:tex display="inline"><![CDATA[{u \choose  e}]]></fr:tex> is a sequence of states <fr:tex display="inline"><![CDATA[s : \mathbb {N} \to  S]]></fr:tex> so that
<html:ol><html:li>For all <fr:tex display="inline"><![CDATA[n \in  \mathbb {N}]]></fr:tex>, <fr:tex display="inline"><![CDATA[e(s_n) = o_n]]></fr:tex>.</html:li>
	<html:li>For all <fr:tex display="inline"><![CDATA[n \in  \mathbb {N}]]></fr:tex>, <fr:tex display="inline"><![CDATA[s_{n+1} \in  u(s_n, i_n)]]></fr:tex>.</html:li></html:ol></html:p></fr:mainmatter></fr:tree><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>8</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CU/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CU</fr:display-uri><fr:route>/djm-00CU/</fr:route><fr:title text="The clock \mathcal {P}-machine">The clock <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine</fr:title><fr:taxon>definition</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>Define the <html:strong>clock</html:strong> <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local"><fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine</fr:link> <fr:tex display="inline"><![CDATA[{+1 \choose  \mathrm {id}} : {\mathbb {N} \choose  \mathbb {N}} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {\ast  \choose  \mathbb {N}}]]></fr:tex> as follows:
<html:ol><html:li>The set of states of the clock system is <fr:tex display="inline"><![CDATA[\mathbb {N}]]></fr:tex>, the natural numbers. We output the time <fr:tex display="inline"><![CDATA[n \in  N]]></fr:tex>, and take no input (more precisely, the clock takes in a dummy input symbol <fr:tex display="inline"><![CDATA[I = \{\ast \}]]></fr:tex>).</html:li>
	<html:li>We expose the entire state, taking <fr:tex display="inline"><![CDATA[e = \mathrm {id}_{\mathbb {N}}]]></fr:tex>.</html:li>
	<html:li>The update <fr:tex display="inline"><![CDATA[u(n, \ast ) := \{n + 1\}]]></fr:tex> deterministically ticks the clock.</html:li></html:ol></html:p></fr:mainmatter></fr:tree><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>8</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CT/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CT</fr:display-uri><fr:route>/djm-00CT/</fr:route><fr:title text="traces of \mathcal {P}-machines are representable by the clock system">traces of <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines are representable by the clock system</fr:title><fr:taxon>theorem</fr:taxon></fr:frontmatter><fr:mainmatter><html:p><fr:link href="/djm-00CS/" title="traces of \mathcal {P}-machines" uri="https://forest.topos.site/djm-00CS/" display-uri="https://forest.topos.site/djm-00CS" type="local">traces of <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines</fr:link> are representable by <fr:link href="/djm-00CU/" title="The clock \mathcal {P}-machine" uri="https://forest.topos.site/djm-00CU/" display-uri="https://forest.topos.site/djm-00CU" type="local">the clock <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine</fr:link>.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>8</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CT-proof/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CT-proof</fr:display-uri><fr:route>/djm-00CT-proof/</fr:route><fr:title text="proof of theorem [https://forest.topos.site/djm-00CT/].">proof of <fr:link href="/djm-00CT/" title="traces of \mathcal {P}-machines are representable by the clock system" uri="https://forest.topos.site/djm-00CT/" display-uri="https://forest.topos.site/djm-00CT" type="local">theorem <fr:contextual-number uri="https://forest.topos.site/djm-00CT/" display-uri="https://forest.topos.site/djm-00CT" /></fr:link>.</fr:title><fr:taxon>proof</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>A morphism <fr:tex display="inline"><![CDATA[{+1 \choose  \mathrm {id}} : {\mathbb {N} \choose  \mathbb {N}} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {\ast  \choose  \mathbb {N}}]]></fr:tex> to a system <fr:tex display="inline"><![CDATA[{u \choose  e} : {S \choose  S} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex> consists of (as described in <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local">definition <fr:contextual-number uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" /></fr:link>):
<html:ol><html:li>
		A chart <fr:tex display="inline"><![CDATA[{i \choose  o} : {\ast  \choose  \mathbb {N}} \to  {I \choose  O}]]></fr:tex>, which consists of maps <fr:tex display="inline"><![CDATA[i : \mathbb {N} \times  \ast  \to  I]]></fr:tex> and <fr:tex display="inline"><![CDATA[o : \mathbb {N} \to  O]]></fr:tex>. We note that <fr:tex display="inline"><![CDATA[i]]></fr:tex> is equivalently a sequence <fr:tex display="inline"><![CDATA[i : \mathbb {N} \to  I]]></fr:tex>.
	</html:li>
	<html:li>
		A map <fr:tex display="inline"><![CDATA[s : \mathbb {N} \to  S]]></fr:tex> giving a sequence of states.
	</html:li></html:ol>
and this data is required to satisfy the two conditions for all <fr:tex display="inline"><![CDATA[n \in  \mathbb {N}]]></fr:tex> (and <fr:tex display="inline"><![CDATA[i \in  \ast ]]></fr:tex>, which we can elide):
<fr:tex display="block"><![CDATA[
	\begin {cases}
		e(s_{n}) = o_n\\
		\forall  n' \in  \{n+1\},\, s_{n'} \in  u(s_n, i_n)
	\end {cases}.
]]></fr:tex>
The last condition is an over-wrought way of saying that <fr:tex display="inline"><![CDATA[s_{n + 1} \in  u(s_n, i_n)]]></fr:tex>. Therefore, such maps are precisely traces.
</html:p></fr:mainmatter></fr:tree></fr:mainmatter></fr:tree><html:p>Note that the chart of a trace specifies the sequence of inputs, a necessary component to understand the system behavior. We'll see that the Lyapunov-style functions are representable, and similarly the chart component of that representability will encode the various <html:em>goals</html:em> of a Lyapunov function.</html:p><html:p>Let's begin with the simple case of a Lyapunov function which witnesses that a system evolves towards a goal. Our goal will be to prove that a system <fr:tex display="inline"><![CDATA[{u \choose  e} : {S \choose  S} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex> eventually reaches some goal <fr:tex display="inline"><![CDATA[G \subseteq  S]]></fr:tex>.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>9</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CV/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CV</fr:display-uri><fr:route>/djm-00CV/</fr:route><fr:title text="reach Lyapunov function">reach Lyapunov function</fr:title><fr:taxon>definition</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>Let <fr:tex display="inline"><![CDATA[{u \choose  e} : {S \choose  S} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex> be a <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local"><fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine</fr:link>. 


<html:ol><html:li>
		A <html:strong>labelling</html:strong> of outputs consists of a family of <html:em>goal</html:em> subsets <fr:tex display="inline"><![CDATA[G_i \subseteq  O]]></fr:tex> for each <fr:tex display="inline"><![CDATA[i \in  I]]></fr:tex>.
	</html:li>
	<html:li>
Given a labelled <fr:tex display="inline"><![CDATA[(G_i)_{i \in  I}]]></fr:tex>, a <html:strong>reach Lyapunov function</html:strong> for <fr:tex display="inline"><![CDATA[(G_i)_{i \in  I}]]></fr:tex> is a map <fr:tex display="inline"><![CDATA[V : S \to  \mathbb {N}]]></fr:tex> satisfying the following condition: 
For all <fr:tex display="inline"><![CDATA[s \in  S]]></fr:tex> and <fr:tex display="inline"><![CDATA[i \in  I]]></fr:tex>, if <fr:tex display="inline"><![CDATA[e(s) \not \in  G_i]]></fr:tex> then 
		<fr:tex display="block"><![CDATA[\forall  s' \in  u(s, i),\, V(s') < V(s).]]></fr:tex></html:li></html:ol></html:p></fr:mainmatter></fr:tree><html:p>Usually, we would not allow for different goals on every input; we would want <fr:tex display="inline"><![CDATA[G_i = G]]></fr:tex> for a fixed goal set <fr:tex display="inline"><![CDATA[G \subseteq  O]]></fr:tex> for all inputs. The generalization is suggested by the coming representability result, and could play a role in compositionality. It's something to watch out for, but I will say later how I think we can restrict ourselves to the case that <fr:tex display="inline"><![CDATA[G]]></fr:tex> is constant in <fr:tex display="inline"><![CDATA[i]]></fr:tex>.</html:p><html:p>Let's see the representative for the above notion of Lyapunov function.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>9</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CW/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CW</fr:display-uri><fr:route>/djm-00CW/</fr:route><fr:title text="reach spec \mathcal {P}-machine">reach spec <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine</fr:title><fr:taxon>definition</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>We define the <html:strong>reach spec <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine</html:strong> as follows:
<html:ol><html:li>
		The interface is <fr:tex display="inline"><![CDATA[{\mathcal {P}\{\mathsf {goal}\} \choose  \ast }]]></fr:tex> where <fr:tex display="inline"><![CDATA[\mathcal {P}\{\mathsf {goal}\} = \{\mathsf {goal}, \neg  \mathsf {goal}\}]]></fr:tex> is interpreted as the set of boolean expressions in the symbol <fr:tex display="inline"><![CDATA[\mathsf {goal}]]></fr:tex>, up to logical equivalence. We call the elements of <fr:tex display="inline"><![CDATA[\mathcal {P}\{\mathsf {goal}\}]]></fr:tex> the <html:strong>labels</html:strong>. The output set is a singleton <fr:tex display="inline"><![CDATA[\ast ]]></fr:tex>.
	</html:li>
	<html:li>
		The state space is <fr:tex display="inline"><![CDATA[\mathbb {N}]]></fr:tex>, the natural numbers.
	</html:li>
	<html:li>The expose function <fr:tex display="inline"><![CDATA[! : \mathbb {N} \to  \ast ]]></fr:tex> is the unique such function.</html:li>
	<html:li>The update function <fr:tex display="inline"><![CDATA[c : \mathbb {N} \times  \mathcal {P}\{\mathsf {goal}\} \to  \mathcal {P} \mathbb {N}]]></fr:tex> is defined by 
	<fr:tex display="block"><![CDATA[
		\begin {aligned}
		c(n, \mathsf {goal}) &:= \mathbb {N}\\
		c(n, \neg \mathsf {goal}) &:= \{k \mid  k < n\}
		\end {aligned}
	]]></fr:tex>
	We think of <fr:tex display="inline"><![CDATA[c(n, \ell )]]></fr:tex> as the <html:strong>condition</html:strong> which the Lyapunov function must satisfy on states labelled by <fr:tex display="inline"><![CDATA[\ell ]]></fr:tex>.
	</html:li></html:ol></html:p></fr:mainmatter></fr:tree><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>10</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CX/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CX</fr:display-uri><fr:route>/djm-00CX/</fr:route><fr:title text="reach Lyapunov functions for \mathcal {P}-machines are representable">reach Lyapunov functions for <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines are representable</fr:title><fr:taxon>theorem</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>For a <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local"><fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine</fr:link> <fr:tex display="inline"><![CDATA[{u \choose  e} : {S \choose  S} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex>,
<html:ol><html:li>
		A family of goals <fr:tex display="inline"><![CDATA[G_i \subseteq  O]]></fr:tex> for <fr:tex display="inline"><![CDATA[i \in  I]]></fr:tex> is represented by a chart <fr:tex display="inline"><![CDATA[{g \choose  !} : {I \choose  O} \to  {\mathcal {P}\{\mathsf {goal}\} \choose  \ast }]]></fr:tex>.
	</html:li>
	<html:li>
		Given a goal <fr:tex display="inline"><![CDATA[{g \choose  !} : {I \choose  O} \to  {\mathcal {P}\{\mathsf {goal}\} \choose  \ast }]]></fr:tex>, a <fr:link href="/djm-00CV/" title="reach Lyapunov function" uri="https://forest.topos.site/djm-00CV/" display-uri="https://forest.topos.site/djm-00CV" type="local">Lyapunov function for this goal</fr:link> <fr:tex display="inline"><![CDATA[V : S \to  \mathbb {N}]]></fr:tex> is equivalently a map of <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local"><fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines</fr:link> 
		
<html:figure><fr:resource hash="dfb4e00da715b7583ada4ddc0c1b5a16"><fr:resource-content><html:img src="https://forest.topos.site/dfb4e00da715b7583ada4ddc0c1b5a16.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
\begin {tikzcd}
	{{S \choose  S}} & {{I \choose  O}} \\
	{{\mathbb {N} \choose  \mathbb {N}}} & {{\mathcal {P}\{\mathsf {goal}\} \choose  \ast }}
	\arrow [""{name=0, anchor=center, inner sep=0}, "{{u \choose  e}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{{f \choose  f}}"', from=1-1, to=2-1]
	\arrow ["{{\ell  \choose  !}}", from=1-2, to=2-2]
	\arrow [""{name=1, anchor=center, inner sep=0}, "{{c \choose  !}}"', "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow [shorten <=5pt, shorten >=5pt, Rightarrow, from=0, to=1]
\end {tikzcd}
		]]></fr:resource-source></fr:resource></html:figure></html:li></html:ol></html:p></fr:mainmatter></fr:tree><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>13</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00DG/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00DG</fr:display-uri><fr:route>/djm-00DG/</fr:route><fr:title text="Remark on definition [https://forest.topos.site/djm-00CV/]">Remark on <fr:link href="/djm-00CV/" title="reach Lyapunov function" uri="https://forest.topos.site/djm-00CV/" display-uri="https://forest.topos.site/djm-00CV" type="local">definition <fr:contextual-number uri="https://forest.topos.site/djm-00CV/" display-uri="https://forest.topos.site/djm-00CV" /></fr:link></fr:title><fr:taxon>remark</fr:taxon></fr:frontmatter><fr:mainmatter>

<html:p>Now, the point of exhibiting a Lyapunov function is to witness the satisfaction of a system property. If we can exhibit a <fr:link href="/djm-00CW/" title="reach spec \mathcal {P}-machine" uri="https://forest.topos.site/djm-00CW/" display-uri="https://forest.topos.site/djm-00CW" type="local">reach Lyapunov function</fr:link>, then the system should actually reach the goal. <html:em>At the level of generality expressed above, this is not the case</html:em>. We need to restrict the kinds of systems involved, and the kinds of maps allowed to go into the representor so that our theorem holds; this follows <fr:link href="https://forest.topos.site/djm-008J/" type="external">my proposal for the use of tight bimodules between loose bimodules as the compositional theory of model validation</fr:link>, since these restrictions can be understood as restricting the hom tight-bimodule of <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local"><fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines</fr:link>, and then constraining which maps appear in it.</html:p><html:p>Let me be clear on that above point: with the definition as given above, we have two issues
<html:ol><html:li>First, if the system <fr:tex display="inline"><![CDATA[{u \choose  e} : {S \choose  S} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex> can <html:em>halt</html:em> in some state <fr:tex display="inline"><![CDATA[s]]></fr:tex> (that is, if <fr:tex display="inline"><![CDATA[u(s, i) = \emptyset ]]></fr:tex> for some <fr:tex display="inline"><![CDATA[i \in  I]]></fr:tex>), then a Lyapunov function <fr:tex display="inline"><![CDATA[V : S \to  \mathbb {N}]]></fr:tex> does not guarantee we reach the goal. This is because the condition on a Lyapunov function quantifies over <fr:tex display="inline"><![CDATA[u(s, i)]]></fr:tex>, and is therefore trivially satisfied if that set is empty. This problem is fixed by restricting to systems for which <fr:tex display="inline"><![CDATA[u(s, i)]]></fr:tex> is always non-empty (which is a perfectly good restriction, as the non-empty powerset monad is a submonad of the powerset monad).</html:li>
	<html:li>
		As remarked on above, we are allowing for a family of goals <fr:tex display="inline"><![CDATA[G_i \subseteq  S]]></fr:tex> which can switch with the input <fr:tex display="inline"><![CDATA[i \in  I]]></fr:tex>. However, to talk about "the" goal, we need this family to be constant in <fr:tex display="inline"><![CDATA[i]]></fr:tex>. We therefore want to restrict to labellings <fr:tex display="inline"><![CDATA[{\ell  \choose  !} : {I \choose  O} \to  {\mathcal {P}\{\mathsf {goal}\} \choose  \ast }]]></fr:tex> for which <fr:tex display="inline"><![CDATA[\ell  : O \times  I \to  \mathcal {P}\{\mathsf {goal}\}]]></fr:tex> is constant in <fr:tex display="inline"><![CDATA[I]]></fr:tex>. Luckily, such charts which are constant in the top component form a two-sided ideal in the category of charts, and so constitute a sub-bimodule of the hom tight-bimodule of <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines.
	</html:li></html:ol></html:p><html:p>
	It's worth thinking very carefully about this, and I haven't yet.
</html:p></fr:mainmatter></fr:tree><html:p>Now let's turn to the more general problem of verifying LTL formulas. I will summarize the approach used by <fr:link href="/abate-2024-stochastic/" title="Stochastic Omega-Regular Verification and Control with Supermartingales" uri="https://forest.topos.site/abate-2024-stochastic/" display-uri="https://forest.topos.site/abate-2024-stochastic" type="local">Mirco and Dip in their recent paper on Streett martingales</fr:link>; at least, I will give my rough understanding of the approach. Any errors in the following are <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">my</fr:link> own.</html:p><html:p>First, we need to have a tool in our toolbelt: Streett automata.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>10</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CZ/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CZ</fr:display-uri><fr:route>/djm-00CZ/</fr:route><fr:title text="deterministic Streett automaton">deterministic Streett automaton</fr:title><fr:taxon>definition</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>
	A <html:strong>deterministic Streett automaton</html:strong> is a deterministic finite automaton <fr:tex display="inline"><![CDATA[\delta  : Q \times  \mathcal {P} \Pi  \to  Q]]></fr:tex> together with a finite set of <html:strong>Streett pairs</html:strong> <fr:tex display="inline"><![CDATA[\mathsf {Acc}_Q = (A_i, B_i)_{i \in  I}]]></fr:tex> where <fr:tex display="inline"><![CDATA[A_i, B_i \subseteq  Q]]></fr:tex> are subsets of <fr:tex display="inline"><![CDATA[Q]]></fr:tex> and a start state <fr:tex display="inline"><![CDATA[q_0 \in  Q]]></fr:tex>.
</html:p><html:p>
	A Streett automaton is considered to run on an infinite trace of its inputs <fr:tex display="inline"><![CDATA[\tau  \in  (\mathcal {P} \Pi )^{\mathbb {N}}]]></fr:tex>, and it accepts this if for each <fr:tex display="inline"><![CDATA[i \in  I]]></fr:tex>, the trace of its behavior
	<fr:tex display="block"><![CDATA[q_{n+1} := \delta (q_n, \tau _n)]]></fr:tex>
	starting at <fr:tex display="inline"><![CDATA[q_0]]></fr:tex> either visits <fr:tex display="inline"><![CDATA[A_i]]></fr:tex> finitely many times or <fr:tex display="inline"><![CDATA[B_i]]></fr:tex> infinitely many times. 
</html:p></fr:mainmatter></fr:tree><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>10</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00CY/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00CY</fr:display-uri><fr:route>/djm-00CY/</fr:route><fr:title text="Streett automata recognize the \omega -regular languages">Streett automata recognize the <fr:tex display="inline"><![CDATA[\omega ]]></fr:tex>-regular languages</fr:title><fr:taxon>remark</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>Every language accepted by a <fr:link href="/djm-00CZ/" title="deterministic Streett automaton" uri="https://forest.topos.site/djm-00CZ/" display-uri="https://forest.topos.site/djm-00CZ" type="local">deterministic Streett automaton</fr:link> is <fr:link href="https://en.wikipedia.org/wiki/Omega-regular_language" type="external"><fr:tex display="inline"><![CDATA[\omega ]]></fr:tex>-regular</fr:link>, and vice-versa every <fr:tex display="inline"><![CDATA[\omega ]]></fr:tex>-regular language is accepted by a <fr:link href="/djm-00CZ/" title="deterministic Streett automaton" uri="https://forest.topos.site/djm-00CZ/" display-uri="https://forest.topos.site/djm-00CZ" type="local">determinstic Streett automaton</fr:link>.</html:p>
<html:p>!Comment: Where do I cite this from? !</html:p>
</fr:mainmatter></fr:tree><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>10</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00D0/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00D0</fr:display-uri><fr:route>/djm-00D0/</fr:route><fr:title text="Translation of LTL formulates into \omega -regular languages">Translation of LTL formulates into <fr:tex display="inline"><![CDATA[\omega ]]></fr:tex>-regular languages</fr:title><fr:taxon>theorem</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>The <fr:tex display="inline"><![CDATA[\omega ]]></fr:tex>-words satisfied by a <fr:link href="https://en.wikipedia.org/wiki/Linear_temporal_logic" type="external">linear time logic</fr:link> formula is an <fr:link href="https://en.wikipedia.org/wiki/Omega-regular_language" type="external"><fr:tex display="inline"><![CDATA[\omega ]]></fr:tex>-regular language</fr:link>.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>10</fr:day></fr:date><fr:taxon>proof</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>See <fr:link href="https://en.wikipedia.org/wiki/Linear_temporal_logic_to_Büchi_automaton" type="external">this wikipedia page</fr:link>.</html:p></fr:mainmatter></fr:tree></fr:mainmatter></fr:tree><html:p>This is all standard stuff that <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">I</fr:link> just didn't know. More to the point, this stuff is <html:em>effective</html:em> --- we can actually compute the Streett automaton that accepts the traces satisfied by an LTL formula in the context <fr:tex display="inline"><![CDATA[\Pi ]]></fr:tex>.</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>13</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00DE/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00DE</fr:display-uri><fr:route>/djm-00DE/</fr:route><fr:title text="Lyapunov representor for an LTL formula">Lyapunov representor for an LTL formula</fr:title><fr:taxon>definition</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>Let <fr:tex display="inline"><![CDATA[\varphi ]]></fr:tex> be an LTL formula defined over atomic propositions <fr:tex display="inline"><![CDATA[\Pi ]]></fr:tex> and let <fr:tex display="inline"><![CDATA[\delta _\varphi  : Q(\varphi ) \times  \mathcal {P}(\Pi ) \to  Q(\varphi )]]></fr:tex> be the <fr:link href="/djm-00CZ/" title="deterministic Streett automaton" uri="https://forest.topos.site/djm-00CZ/" display-uri="https://forest.topos.site/djm-00CZ" type="local">Streett automaton</fr:link> accepting its satisfied formulas with Streett pairs <fr:tex display="inline"><![CDATA[(A_j, B_j)_{j = 1}^n]]></fr:tex>.</html:p><html:p>Given positive real coefficients <fr:tex display="inline"><![CDATA[M, \varepsilon  > 0]]></fr:tex>, we define the <html:strong>Lyapunov representor</html:strong> <fr:tex display="inline"><![CDATA[\mathsf {L}(\varphi )]]></fr:tex> for <fr:tex display="inline"><![CDATA[\varphi ]]></fr:tex> as follows:
<html:ol><html:li>
		The interface is <fr:tex display="inline"><![CDATA[{\mathcal {P}(\Pi ) \choose  \ast }]]></fr:tex>.
	</html:li>
	<html:li>
		The set of states is <fr:tex display="inline"><![CDATA[\mathsf {L}(\varphi ) := \Pi _{i = 1}^n \mathbb {N}^{Q(\varphi )}]]></fr:tex>, the set of <fr:tex display="inline"><![CDATA[n]]></fr:tex>-tuples of functions from states on the states of the Streett automaton accepting <fr:tex display="inline"><![CDATA[\varphi ]]></fr:tex>.
	</html:li>
	<html:li>
		The expose function is the unique function <fr:tex display="inline"><![CDATA[! : \Pi _{i = 1}^n \mathbb {N}^{Q(\varphi )} \to  \ast ]]></fr:tex>, while the update <fr:tex display="inline"><![CDATA[c : \Pi _{i = 1}^n \mathbb {N}^{Q(\varphi )} \times  \mathcal {P}(\Pi ) \to  \mathcal {P} (\Pi _{i = 1}^n \mathbb {N}^{Q(\varphi )})]]></fr:tex> is given by defining <fr:tex display="inline"><![CDATA[c((n_j)_{j = 1}^n, \pi )]]></fr:tex> to be the set of all tuples <fr:tex display="inline"><![CDATA[(m_j)_{j = 1}^n]]></fr:tex> such that for all <fr:tex display="inline"><![CDATA[j]]></fr:tex> and <fr:tex display="inline"><![CDATA[q \in  Q(\varphi )]]></fr:tex>:
		<html:ol><html:li>
				If <fr:tex display="inline"><![CDATA[q \in  A_j - B_j]]></fr:tex>, then <fr:tex display="inline"><![CDATA[m_j(\delta _{\varphi }(q, \pi )) \leq  n_j(q) - \varepsilon ]]></fr:tex>.
			</html:li>
			<html:li>
				If <fr:tex display="inline"><![CDATA[q \in  B_j]]></fr:tex>, then <fr:tex display="inline"><![CDATA[m_j(\delta _{\varphi }(q, \pi )) \leq  n_j(q) + M]]></fr:tex>.
			</html:li>
			<html:li>
				If <fr:tex display="inline"><![CDATA[q \in  Q - (A_j \cup  B_j)]]></fr:tex>, then <fr:tex display="inline"><![CDATA[m_j(\delta _{\varphi }(q, \pi )) \leq  n_j(q)]]></fr:tex>.
			</html:li></html:ol></html:li></html:ol></html:p></fr:mainmatter></fr:tree><fr:tree show-metadata="false"><fr:frontmatter><fr:authors /><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>13</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00DF/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00DF</fr:display-uri><fr:route>/djm-00DF/</fr:route><fr:taxon>explication</fr:taxon></fr:frontmatter><fr:mainmatter><html:p>Let's see what a map into the <fr:link href="/djm-00DE/" title="Lyapunov representor for an LTL formula" uri="https://forest.topos.site/djm-00DE/" display-uri="https://forest.topos.site/djm-00DE" type="local">Lyapunov representor <fr:tex display="inline"><![CDATA[\mathsf {L}(\varphi )]]></fr:tex> for an LTL formula <fr:tex display="inline"><![CDATA[\varphi ]]></fr:tex></fr:link> looks like.</html:p><html:p>Let <fr:tex display="inline"><![CDATA[{u \choose  e} : {S \choose  S} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex> be a system.
<html:ol><html:li>
		A chart <fr:tex display="inline"><![CDATA[{g \choose  !} : {I \choose  O} \to  {\mathcal {P} \Pi  \choose  \ast }]]></fr:tex> consists of a function <fr:tex display="inline"><![CDATA[g : O \times  I \to  \mathcal {P} \Pi ]]></fr:tex>, labelling the outputs of this system by sets of propositions in the atomic formula <fr:tex display="inline"><![CDATA[\Pi ]]></fr:tex>. This takes the role of the observation function <fr:tex display="inline"><![CDATA[\langle \langle  - \rangle \rangle ]]></fr:tex> from page 8 of <fr:link href="/abate-2024-stochastic/" title="Stochastic Omega-Regular Verification and Control with Supermartingales" uri="https://forest.topos.site/abate-2024-stochastic/" display-uri="https://forest.topos.site/abate-2024-stochastic" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/abate-2024-stochastic/" display-uri="https://forest.topos.site/abate-2024-stochastic" /></fr:link>; specifically, we take <fr:tex display="inline"><![CDATA[\langle \langle  s \rangle  \rangle  := g(e(s), i)]]></fr:tex>, presuming that this is actually constant in <fr:tex display="inline"><![CDATA[i \in  I]]></fr:tex> (following <fr:link href="/djm-00DG/" title="Remark on definition [https://forest.topos.site/djm-00CV/]" uri="https://forest.topos.site/djm-00DG/" display-uri="https://forest.topos.site/djm-00DG" type="local">remark <fr:contextual-number uri="https://forest.topos.site/djm-00DG/" display-uri="https://forest.topos.site/djm-00DG" /></fr:link>). 
	</html:li>
	<html:li>
		A map <fr:tex display="inline"><![CDATA[V : S \to  \mathsf {L}(\varphi ) := \Pi _{j = 1}^n \mathbb {N}^{Q(\varphi )}]]></fr:tex> consists of <fr:tex display="inline"><![CDATA[n]]></fr:tex> functions <fr:tex display="inline"><![CDATA[V_j : S \times  Q(\varphi ) \to  \mathbb {N}]]></fr:tex>, which play the role of the <fr:tex display="inline"><![CDATA[V_j]]></fr:tex> from page 9 of <fr:link href="/abate-2024-stochastic/" title="Stochastic Omega-Regular Verification and Control with Supermartingales" uri="https://forest.topos.site/abate-2024-stochastic/" display-uri="https://forest.topos.site/abate-2024-stochastic" type="local"><html:em>ibid.</html:em></fr:link>. I will note at this point that if we need parameter sets <fr:tex display="inline"><![CDATA[\Theta _j]]></fr:tex> also, we can fold them into the definition of the Lyapunov representor as a further exponent, giving us a state space <fr:tex display="inline"><![CDATA[\Pi _{j = 1}^n \mathbb {N}^{Q(\varphi ) \times  \Theta _j}]]></fr:tex>.
	</html:li>
	<html:li>
		Such a map is a morphism of systems when for any <fr:tex display="inline"><![CDATA[s \in  S]]></fr:tex> and <fr:tex display="inline"><![CDATA[i \in  I]]></fr:tex>, we have 
		<fr:tex display="block"><![CDATA[\forall  s' \in  u(s, i),\, V(s') \in  c(V(s), g(e(s), i)).]]></fr:tex>
		Running through the definition of the terms involved, we see that this means that for all <fr:tex display="inline"><![CDATA[j]]></fr:tex> and <fr:tex display="inline"><![CDATA[q \in  Q(\varphi )]]></fr:tex> (and, if we kept them in, parameters <fr:tex display="inline"><![CDATA[\theta _j \in  \Theta _j]]></fr:tex>), we have:
		<html:ol><html:li>
				If <fr:tex display="inline"><![CDATA[q \in  A_j - B_j]]></fr:tex>, then <fr:tex display="inline"><![CDATA[V_j(s', \delta _{\varphi }(q, g(e(s), i))) \leq  V_j(s, q) - \varepsilon ]]></fr:tex>.
			</html:li>
			<html:li>
				If <fr:tex display="inline"><![CDATA[q \in  B_j]]></fr:tex>, then <fr:tex display="inline"><![CDATA[V_j(s', \delta _{\varphi }(q, g(e(s), i))) \leq  V_j(s, q) + M]]></fr:tex>.
			</html:li>
			<html:li>
				If <fr:tex display="inline"><![CDATA[q \in  Q - (A_j \cup  B_j)]]></fr:tex>, then <fr:tex display="inline"><![CDATA[V_j(s', \delta _{\varphi }(q, g(e(s), i))) \leq  V_j(s, q) ]]></fr:tex>.
			</html:li></html:ol>
		These conditions correspond to conditions (17), (18) and (19) of <fr:link href="/abate-2024-stochastic/" title="Stochastic Omega-Regular Verification and Control with Supermartingales" uri="https://forest.topos.site/abate-2024-stochastic/" display-uri="https://forest.topos.site/abate-2024-stochastic" type="local"><html:em>ibid.</html:em>, page 9</fr:link>, remembering that the post-distribution defined there given by the formula (14) corresponds precisely to, in the possibilistic setting, <fr:tex display="inline"><![CDATA[V_j(s', \delta _{\varphi }(q, g(e(s), i)))]]></fr:tex> for <fr:tex display="inline"><![CDATA[s' \in  u(s, i)]]></fr:tex>.
	</html:li></html:ol></html:p></fr:mainmatter></fr:tree><html:p>Now that we know that these Lyapunov certificates are representable, double categorical systems theory suggests a way to try and compose these. Let me write that down and muse about what it suggests. I will say that this is not the only thing I could try, it's just the most straightforward.</html:p><html:p>
	First, let's recall how <fr:link href="/djm-00CR/" title="non-deterministic discrete-time discrete-space Moore machines" uri="https://forest.topos.site/djm-00CR/" display-uri="https://forest.topos.site/djm-00CR" type="local"><fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines</fr:link> compose. Suppose we have systems <fr:tex display="inline"><![CDATA[{u_1 \choose  e_1} : {S_1 \choose  S_1} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I_1 \choose  O_1}]]></fr:tex> and <fr:tex display="inline"><![CDATA[{u_2 \choose  e_2} : {S_2 \choose  S_2} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I_2 \choose  O_2}]]></fr:tex>. A composition pattern which composes <fr:tex display="inline"><![CDATA[{u_1 \choose  e_1}]]></fr:tex> and <fr:tex display="inline"><![CDATA[{u_2 \choose  e_2}]]></fr:tex> into some new interface <fr:tex display="inline"><![CDATA[{I \choose  O}]]></fr:tex> is a lens
	<fr:tex display="block"><![CDATA[{w^{\sharp } \choose  w} : {I_1 \choose  O_1}\otimes  {I_2 \choose  O_2} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex>
	consisting of
	<fr:tex display="block"><![CDATA[
		\begin {cases}
		w^{\sharp } : I \times  (O_1 \times  O_2) \to  \mathcal {P}(I_1 \times  I_2) \\
		w : O_1 \times  O_2 \to  O
		\end {cases}
	]]></fr:tex>
	We say that <fr:tex display="inline"><![CDATA[{w^{\sharp } \choose  w}]]></fr:tex> is a <html:em>wiring diagram</html:em> if it just involves product projections and diagonals (duplication and deletion of variables) --- see Chapter 1 of <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" /></fr:link>. For simplicity, let's assume that <fr:tex display="inline"><![CDATA[w^{\sharp }]]></fr:tex> is deterministic, and therefore consists of two functions <fr:tex display="inline"><![CDATA[w^{\sharp }_i : I \times  (O_1 \times  O_2) \to  I_i]]></fr:tex>.
</html:p><html:p>
	Now, consider the following diagram:
	
<html:figure><fr:resource hash="ce3a4c5568f3c9c722df845136b5d227"><fr:resource-content><html:img src="https://forest.topos.site/ce3a4c5568f3c9c722df845136b5d227.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
\begin {tikzcd}
	{{S_1 \choose  S_1} \otimes  {S_2 \choose  S_2}} & {{I_1 \choose  O_1} \otimes  {I_2 \choose  O_2}} & {{I \choose  O}} \\
	{\mathsf {L}(\varphi _1)\otimes  \mathsf {L}(\varphi _2)} & {{\mathcal {P}\Pi _1 \choose  \ast } \otimes  {\mathcal {P}\Pi _2 \choose  \ast }} & {{\mathcal {P} \Pi _w \choose  \ast }} \\
	{\mathsf {L}(\varphi _w)} && {{\mathcal {P} \Pi _w \choose  \ast }}
	\arrow ["{{u_1 \choose  e_1} \otimes  {u_2 \choose  e_2}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{V_1 \otimes  V_2}"', from=1-1, to=2-1]
	\arrow ["{{w^{\sharp } \choose  w}}", "\shortmid "{marking}, from=1-2, to=1-3]
	\arrow ["{{g_1 \choose  !} \otimes  {g_2 \choose  !}}", from=1-2, to=2-2]
	\arrow ["{{g_w \choose  !}}", from=1-3, to=2-3]
	\arrow [shorten <=16pt, shorten >=16pt, Rightarrow, from=2-1, to=1-2]
	\arrow ["{{c_1 \choose  !} \otimes  {c_2 \choose  !}}"', "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow ["\nu "', from=2-1, to=3-1]
	\arrow ["{{\alpha  \choose  !}}"', "\shortmid "{marking}, from=2-2, to=2-3]
	\arrow [equals, from=2-3, to=3-3]
	\arrow [shorten <=90pt, shorten >=90pt, Rightarrow, from=3-1, to=2-3]
	\arrow ["{{c_w \choose  !}}"', "\shortmid "{marking}, from=3-1, to=3-3]
\end {tikzcd}
	]]></fr:resource-source></fr:resource></html:figure>

	If we had such a diagram, then we could compose the two Lyapunov functions <fr:tex display="inline"><![CDATA[V_1]]></fr:tex> and <fr:tex display="inline"><![CDATA[V_2]]></fr:tex> (witnessing <fr:tex display="inline"><![CDATA[S_1 \vDash  \varphi _1]]></fr:tex> and <fr:tex display="inline"><![CDATA[S_2 \vDash  \varphi _2]]></fr:tex> respectively) into a third <fr:tex display="inline"><![CDATA[\nu  \circ  (V_1 \times  V_2) : S_1 \times  S_2 \to  \mathsf {L}(\varphi _w)]]></fr:tex>, where <fr:tex display="inline"><![CDATA[\varphi _w]]></fr:tex> is itself meant to be some kind of composite (informed by <fr:tex display="inline"><![CDATA[{w^{\sharp } \choose  w}]]></fr:tex>) of the two formulas. There are three unknowns in the above diagram:
	<html:ol><html:li>
			The composite spec <fr:tex display="inline"><![CDATA[\varphi _w]]></fr:tex>, its primitives <fr:tex display="inline"><![CDATA[\Pi _w]]></fr:tex>, and the composite labelling <fr:tex display="inline"><![CDATA[g_w : O \times  I \to  \mathcal {P} \Pi _w]]></fr:tex>.
		</html:li>
		<html:li>
			The composition pattern <fr:tex display="inline"><![CDATA[{\alpha  \choose  1} : {\mathcal {P} \Pi _1 \choose  \ast } \otimes  {\mathcal {P} \Pi _2 \choose  \ast } \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {\mathcal {P} \Pi _w \choose  \ast }]]></fr:tex>, which consists of a map <fr:tex display="inline"><![CDATA[\alpha  : \mathcal {P} \Pi _w \to  \mathcal {P} \Pi _1 \times  \mathcal {P} \Pi _2]]></fr:tex> (if deterministic, though it could be taken non-deterministic to land in <fr:tex display="inline"><![CDATA[\mathcal {P}(\mathcal {P} \Pi _1 \times  \mathcal {P} \Pi _2)]]></fr:tex> instead). This constrains <fr:tex display="inline"><![CDATA[\Pi _w]]></fr:tex>, since we must be able to extract subsets of <fr:tex display="inline"><![CDATA[\Pi _1]]></fr:tex> and <fr:tex display="inline"><![CDATA[\Pi _2]]></fr:tex> from it. The above right square says that
			<fr:tex display="block"><![CDATA[
				\forall  i, o_1, o_2, \alpha (g_w(i, w(o_1, o_2))) = (g_1(w^{\sharp }_1(i, (o_1, o_2)), o_1), g_2(w^{\sharp }_2(i, (o_1, o_2)), o_2)).
			]]></fr:tex>
			If <fr:tex display="inline"><![CDATA[w^{\sharp }]]></fr:tex> and <fr:tex display="inline"><![CDATA[\alpha ]]></fr:tex> are non-deterministic, then the above equation becomes a containment. Note that if <fr:tex display="inline"><![CDATA[g_w \circ  w]]></fr:tex> is surjective, then the above equation determines <fr:tex display="inline"><![CDATA[\alpha ]]></fr:tex>; we could also minimally define a non-deterministic <fr:tex display="inline"><![CDATA[\alpha ]]></fr:tex> by the above equation on the image of <fr:tex display="inline"><![CDATA[g_w \circ  w]]></fr:tex>.
		</html:li>
		<html:li>
			Finally, <fr:tex display="inline"><![CDATA[\nu  : \mathsf {L}(\varphi _1) \otimes  \mathsf {L}(\varphi _2) \to  \mathsf {L}(\varphi _w)]]></fr:tex> must be a Lyapunov function for the composite system <fr:tex display="inline"><![CDATA[\mathsf {L}(\varphi _1) \otimes  \mathsf {L}(\varphi _2) \odot  {\alpha  \choose  \ast }]]></fr:tex>.
		</html:li></html:ol></html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>17</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00DH/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00DH</fr:display-uri><fr:route>/djm-00DH/</fr:route><fr:title text="Special case of a Lyapunov compositionality">Special case of a Lyapunov compositionality</fr:title><fr:taxon>example</fr:taxon></fr:frontmatter><fr:mainmatter>

<html:p>
	To get some idea of what we could do here, let's consider a special case. We can fix <fr:tex display="inline"><![CDATA[\alpha ]]></fr:tex> to be the diagonal, and <fr:tex display="inline"><![CDATA[w = \mathrm {id}]]></fr:tex> to be the identity too (which can always be arranged; we aren't obligated to hide any variables). The above right square then forces <fr:tex display="inline"><![CDATA[g_w(i, (o_1, o_2)) = g_j(w^{\sharp }_j(i, (o_1, o_2)), o_j)]]></fr:tex>, which works when <fr:tex display="inline"><![CDATA[g_1(w^{\sharp }_1(i, (o_1, o_2)), o_1) = g_2(w^{\sharp }_2(i, (o_1, o_2)), o_2)]]></fr:tex>.
</html:p><html:p>
	Making these restrictions, let's see what <fr:tex display="inline"><![CDATA[\nu ]]></fr:tex> we could use. For simplicitly, let's take <fr:tex display="inline"><![CDATA[\varphi _w := \varphi _1 \wedge  \varphi _2]]></fr:tex> to just be the conjunction; we may then take <fr:tex display="inline"><![CDATA[Q(\varphi _w) = Q(\varphi _1) \times  Q(\varphi _2)]]></fr:tex> with <fr:tex display="inline"><![CDATA[(A_{(j_1,j_2)}, B_{(j_1, j_2)}) := (A_{j_1} \times  A_{j_2}, B_{j_1} \times  B_{j_2})]]></fr:tex> (that is, <fr:tex display="inline"><![CDATA[n_1 \cdot  n_2]]></fr:tex> many Streett pairs), and so we deduce the following constraints on <fr:tex display="inline"><![CDATA[\nu  : \prod _{j_1}\mathbb {N}^{Q(\varphi _1)} \times  \prod _{j_1}\mathbb {N}^{Q(\varphi _1)} \to  \prod _{j_1, j_2} \mathbb {N}^{Q(\varphi _1) \times  Q(\varphi _2)}]]></fr:tex>:
	<html:ol><html:li>
			For all <fr:tex display="inline"><![CDATA[m^1_{j_1}]]></fr:tex> and <fr:tex display="inline"><![CDATA[m^2_{j_2}]]></fr:tex> satisfying the three conditions of <fr:link href="/djm-00DE/" title="Lyapunov representor for an LTL formula" uri="https://forest.topos.site/djm-00DE/" display-uri="https://forest.topos.site/djm-00DE" type="local">definition <fr:contextual-number uri="https://forest.topos.site/djm-00DE/" display-uri="https://forest.topos.site/djm-00DE" /></fr:link> for <fr:tex display="inline"><![CDATA[n^1_{j_1}]]></fr:tex> and <fr:tex display="inline"><![CDATA[n^2_{j_2}]]></fr:tex> and <fr:tex display="inline"><![CDATA[\pi  \in  \Pi ]]></fr:tex>, we have  
			<html:ol><html:li>
					If <fr:tex display="inline"><![CDATA[q_k \in  A_{j_{k}} - B_{j_{k}}]]></fr:tex>, then <fr:tex display="inline"><![CDATA[\nu _{j_1, j_2}((m^1_{j_1}, m^2_{j_2}), (\delta _1(q_1, \pi ), \delta _2(q_2, \pi ))) \leq  \nu ((n^1_{j_1}, n^2_{j_2}), (q_1, q_2)) - \varepsilon ]]></fr:tex></html:li>
				<html:li>
					If <fr:tex display="inline"><![CDATA[q_k \in  B_{j_{k}}]]></fr:tex>, then <fr:tex display="inline"><![CDATA[\nu _{j_1, j_2}((m^1_{j_1}, m^2_{j_2}), (\delta _1(q_1, \pi ), \delta _2(q_2, \pi ))) \leq  \nu ((n^1_{j_1}, n^2_{j_2}), (q_1, q_2)) + M]]></fr:tex></html:li>
				<html:li>
					If <fr:tex display="inline"><![CDATA[q_k \in  A_{j_{k}} - B_{j_{k}}]]></fr:tex>, then <fr:tex display="inline"><![CDATA[\nu _{j_1, j_2}((m^1_{j_1}, m^2_{j_2}), (\delta _1(q_1, \pi ), \delta _2(q_2, \pi ))) \leq  \nu ((n^1_{j_1}, n^2_{j_2}), (q_1, q_2)) ]]></fr:tex></html:li></html:ol></html:li></html:ol>
	These conditions will be satisfied by the sum <fr:tex display="inline"><![CDATA[\nu  = +]]></fr:tex>, setting <fr:tex display="inline"><![CDATA[\varepsilon  = \varepsilon _1 + \varepsilon _2]]></fr:tex> and <fr:tex display="inline"><![CDATA[M = M_1 + M_2]]></fr:tex>. We therefore conclude with the following theorem:
</html:p><fr:tree show-metadata="false"><fr:frontmatter><fr:authors><fr:author><fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link></fr:author></fr:authors><fr:date><fr:year>2025</fr:year><fr:month>2</fr:month><fr:day>17</fr:day></fr:date><fr:uri>https://forest.topos.site/djm-00DI/</fr:uri><fr:display-uri>https://forest.topos.site/djm-00DI</fr:display-uri><fr:route>/djm-00DI/</fr:route><fr:title text="sum of Lyapunov functions is Lyapunov, sometimes">sum of Lyapunov functions is Lyapunov, sometimes</fr:title><fr:taxon>theorem</fr:taxon></fr:frontmatter><fr:mainmatter>

<html:p>
	Suppose that <fr:tex display="inline"><![CDATA[(V_1, g_1) : S_1 \vDash  \varphi _1]]></fr:tex> and <fr:tex display="inline"><![CDATA[(V_2, g_2) : S_2 \vDash  \varphi _2]]></fr:tex> are Lyapunov functions witnessing the satisfaction of two LTL formulas, and let <fr:tex display="inline"><![CDATA[{w^{\sharp } \choose  \mathrm {id}} : {I_1 \choose  O_1} \otimes  {I_2 \choose  O_2} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O_1 \times  O_2}]]></fr:tex> be a composition pattern such that 
	<fr:tex display="block"><![CDATA[
		g_1(w^{\sharp }_1(i, (o_1, o_2)), (o_1, o_2)) = g_2(w^{\sharp }_2(i, (o_1, o_2)), (o_1, o_2))	
	]]></fr:tex>
	for all <fr:tex display="inline"><![CDATA[i \in  I]]></fr:tex>, <fr:tex display="inline"><![CDATA[o_1 \in  O_1]]></fr:tex> and <fr:tex display="inline"><![CDATA[o_2 \in  O_2]]></fr:tex>. Define <fr:tex display="block"><![CDATA[g(i, (o_1, o_2)) := g_1(w^{\sharp }_1(i, (o_1, o_2)), (o_1, o_2)) =  g_2(w^{\sharp }_2(i, (o_1, o_2)), (o_1, o_2))]]></fr:tex>. Then <fr:tex display="inline"><![CDATA[(V_1  + V_2, g) : (S_1 \otimes  S_2) \odot  {w^{\sharp } \choose  w} \vDash  \varphi _1 \wedge  \varphi _2]]></fr:tex> gives a Lyapunov function witnessing <fr:tex display="inline"><![CDATA[\varphi _1 \wedge  \varphi _2]]></fr:tex> on the coupling of <fr:tex display="inline"><![CDATA[S_1]]></fr:tex> with <fr:tex display="inline"><![CDATA[S_2]]></fr:tex>.
</html:p></fr:mainmatter></fr:tree><html:p>
	Note that if we presume that <fr:tex display="inline"><![CDATA[g_j]]></fr:tex> is constant in <fr:tex display="inline"><![CDATA[I_j]]></fr:tex>, then the above condition is trivially satisfied. Therefore, <fr:link href="/djm-00DI/" title="sum of Lyapunov functions is Lyapunov, sometimes" uri="https://forest.topos.site/djm-00DI/" display-uri="https://forest.topos.site/djm-00DI" type="local">theorem <fr:contextual-number uri="https://forest.topos.site/djm-00DI/" display-uri="https://forest.topos.site/djm-00DI" /></fr:link> intuitively says that  we should just be able to add the Lyapunov functions to witness a conjunction.
</html:p><html:p>
	In general, we can see that a more general compositionality theorem will require us to understand the ways that Streett automata compose according to the composition of their formulas. I would suggest looking first at regular composition, which only uses <fr:tex display="inline"><![CDATA[\exists ]]></fr:tex> and <fr:tex display="inline"><![CDATA[\wedge ]]></fr:tex>; these composites of formulas can be built functorially out of wiring diagrams for systems, and we should be able to give a functoriality for Streett automata out of this. 
</html:p></fr:mainmatter></fr:tree></fr:mainmatter>
  <fr:backmatter>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="References">References</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/alessandro-abate/" title="Alessandro Abate" uri="https://forest.topos.site/alessandro-abate/" display-uri="https://forest.topos.site/alessandro-abate" type="local">Alessandro Abate</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/mirco-giacobbe/" title="Mirco Giacobbe" uri="https://forest.topos.site/mirco-giacobbe/" display-uri="https://forest.topos.site/mirco-giacobbe" type="local">Mirco Giacobbe</fr:link>
              </fr:author>
              <fr:author>
                <fr:link href="/diptarko-roy/" title="Diptarko Roy" uri="https://forest.topos.site/diptarko-roy/" display-uri="https://forest.topos.site/diptarko-roy" type="local">Diptarko Roy</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2024</fr:year>
            </fr:date>
            <fr:uri>https://forest.topos.site/abate-2024-stochastic/</fr:uri>
            <fr:display-uri>https://forest.topos.site/abate-2024-stochastic</fr:display-uri>
            <fr:route>/abate-2024-stochastic/</fr:route>
            <fr:title text="Stochastic Omega-Regular Verification and Control with Supermartingales">Stochastic Omega-Regular Verification and Control with Supermartingales</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="doi">10.1007/978-3-031-65633-0_18</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@inbook{abate-2024-stochastic,
	title = {Stochastic Omega-Regular Verification and Control with Supermartingales},
	ISBN = {9783031656330},
	ISSN = {1611-3349},
	url = {http://dx.doi.org/10.1007/978-3-031-65633-0_18},
	DOI = {10.1007/978-3-031-65633-0_18},
	booktitle = {Computer Aided Verification},
	publisher = {Springer Nature Switzerland},
	author = {Abate, Alessandro and Giacobbe, Mirco and Roy, Diptarko},
	year = {2024},
	pages = {395–419}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter />
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2021</fr:year>
            </fr:date>
            <fr:uri>https://forest.topos.site/myers-2021-double/</fr:uri>
            <fr:display-uri>https://forest.topos.site/myers-2021-double</fr:display-uri>
            <fr:route>/myers-2021-double/</fr:route>
            <fr:title text="Double Categories of Open Dynamical Systems (Extended Abstract)">Double Categories of Open Dynamical Systems (Extended Abstract)</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="doi">10.4204/eptcs.333.11</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@article{myers-2021-double,
	title = {Double Categories of Open Dynamical Systems (Extended Abstract)},
	volume = {333},
	ISSN = {2075-2180},
	url = {http://dx.doi.org/10.4204/EPTCS.333.11},
	DOI = {10.4204/eptcs.333.11},
	journal = {Electronic Proceedings in Theoretical Computer Science},
	publisher = {Open Publishing Association},
	author = {Jaz Myers, David},
	year = {2021},
	month = {feb},
	pages = {154–167}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter />
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/kenny-courser/" title="Kenny Courser" uri="https://forest.topos.site/kenny-courser/" display-uri="https://forest.topos.site/kenny-courser" type="local">Kenny Courser</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2020</fr:year>
            </fr:date>
            <fr:uri>https://forest.topos.site/courser-2020-open/</fr:uri>
            <fr:display-uri>https://forest.topos.site/courser-2020-open</fr:display-uri>
            <fr:route>/courser-2020-open/</fr:route>
            <fr:title text="Open Systems: A Double Categorical Perspective">Open Systems: A Double Categorical Perspective</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="doi">10.48550/ARXIV.2008.02394</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@misc{courser-2020-open,
	doi = {10.48550/ARXIV.2008.02394},
	url = {https://arxiv.org/abs/2008.02394},
	author = {Courser, Kenny},
	keywords = {Category Theory (math.CT), FOS: Mathematics, FOS: Mathematics, 18B10, 18C10, 18C40, 18M05, 18M35, 18N10},
	title = {Open Systems: A Double Categorical Perspective},
	publisher = {arXiv},
	year = {2020},
	copyright = {arXiv.org perpetual, non-exclusive license}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter />
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link>
              </fr:author>
            </fr:authors>
            <fr:uri>https://forest.topos.site/myers-2021-book/</fr:uri>
            <fr:display-uri>https://forest.topos.site/myers-2021-book</fr:display-uri>
            <fr:route>/myers-2021-book/</fr:route>
            <fr:title text="Categorical Systems Theory">Categorical Systems Theory</fr:title>
            <fr:taxon>Reference</fr:taxon>
            <fr:meta name="url">http://davidjaz.com/Papers/DynamicalBook.pdf</fr:meta>
            <fr:meta name="bibtex"><![CDATA[@misc{myers-2021-book,
  title={Categorical Systems Theory},
  author={Myers, David Jaz},
  year={2021},
  url={http://davidjaz.com/Papers/DynamicalBook.pdf}
}]]></fr:meta>
          </fr:frontmatter>
          <fr:mainmatter />
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Context">Context</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Backlinks">Backlinks</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Related">Related</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>2</fr:month>
              <fr:day>7</fr:day>
            </fr:date>
            <fr:uri>https://forest.topos.site/djm-00CR/</fr:uri>
            <fr:display-uri>https://forest.topos.site/djm-00CR</fr:display-uri>
            <fr:route>/djm-00CR/</fr:route>
            <fr:title text="non-deterministic discrete-time discrete-space Moore machines">non-deterministic discrete-time discrete-space Moore machines</fr:title>
            <fr:taxon>definition</fr:taxon>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Let <fr:tex display="inline"><![CDATA[C \mapsto  \mathsf {Bikleisli}(C \times  -, \mathcal {P}) : \mathsf {Set}^{\mathsf {op}} \to  2\mathcal {C}\mathsf {at}]]></fr:tex> whose underlying indexed category sends a set <fr:tex display="inline"><![CDATA[C]]></fr:tex> to the bi-kleisli category of the comonad <fr:tex display="inline"><![CDATA[C \times  -]]></fr:tex> over the powerset monad <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex> (see Definition 2.6.4.1 and Theorem 2.6.4.5 of <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" /></fr:link>), equipped with a 2-category structure of pointwise containment:
<fr:tex display="block"><![CDATA[(f \subseteq  g ) := \forall  c,x,\, f(c, x) \subseteq  g(c, x)]]></fr:tex>
for <fr:tex display="inline"><![CDATA[f, g : C \times  X \to  \mathcal {P} Y]]></fr:tex>. Define the double category of <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-arenas <fr:tex display="inline"><![CDATA[\mathbb {A}\mathsf {rena}^{\mathsf {lx}}(\mathcal {P})]]></fr:tex> to be the double category <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {lx}}(\mathsf {Bikleisli}(\times ,\mathcal {P}))]]></fr:tex> with its feet replaced (Theorem 3.1.1 of <fr:link href="/courser-2020-open/" title="Open Systems: A Double Categorical Perspective" uri="https://forest.topos.site/courser-2020-open/" display-uri="https://forest.topos.site/courser-2020-open" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/courser-2020-open/" display-uri="https://forest.topos.site/courser-2020-open" /></fr:link>) by the deterministic charts (the inclusion <fr:tex display="inline"><![CDATA[\int \mathsf {cokleisli}(\times ) \hookrightarrow  \int \mathsf {Bikleisli}(\times ,\mathcal {P})]]></fr:tex> of the Grothendieck construction of the category of determinsitic charts (Definition 3.3.0.1 of <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" /></fr:link>)).
</html:p>
            <html:p>We define the systems theory of
<html:strong>non-deterministic discrete-time discrete-space Moore machines</html:strong> (henceforth, "<fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machines" for short) to be the systems theory with interface double category <fr:tex display="inline"><![CDATA[\mathbb {A}\mathsf {rena}^{\mathsf {lx}}(\mathcal {P})]]></fr:tex> associated to the section <fr:tex display="inline"><![CDATA[S \mapsto  {S \choose  S}]]></fr:tex> of the indexed category <fr:tex display="inline"><![CDATA[\mathsf {cokleisli}(\times )]]></fr:tex>. Explicitly: <html:ol><html:li>
		A <fr:tex display="inline"><![CDATA[\mathcal {P}]]></fr:tex>-machine is a lens (<fr:link href="/djm-00CQ/" title="double category of lenses and colax squares." uri="https://forest.topos.site/djm-00CQ/" display-uri="https://forest.topos.site/djm-00CQ" type="local">loose morphism of <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {lx}}(\mathsf {Bikleisli}(\times , \mathcal {P}))]]></fr:tex></fr:link>) of the form <fr:tex display="inline"><![CDATA[{S \choose  S} \mathrel {\mkern 3mu\vcenter {\hbox {$\shortmid $}}\mkern -10mu{\to }} {I \choose  O}]]></fr:tex>, which explicitly consists of two maps
		<fr:tex display="block"><![CDATA[
			\begin {cases}u : S \times  I \to  \mathcal {P} S \\ e : S \to  O \end {cases}
		]]></fr:tex>
		We say that <fr:tex display="inline"><![CDATA[{I \choose  O}]]></fr:tex> is the <html:strong>interface</html:strong> of the system <fr:tex display="inline"><![CDATA[{u \choose  e}]]></fr:tex>. (See Definition 2.1.0.1 of <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" /></fr:link>.)
 	</html:li>
	<html:li>
		A morphism of such systems (also known as a <html:em>refinement</html:em>) is a square
		
<html:figure><fr:resource hash="a580cbd833e205dbb9675a42bbf73988"><fr:resource-content><html:img src="https://forest.topos.site/a580cbd833e205dbb9675a42bbf73988.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
			\begin {tikzcd}
	{{S_1 \choose  S_1}} & {{I_1 \choose  O_1}} \\
	{{S_2 \choose  S_2}} & {{I_2 \choose  O_2}}
	\arrow [""{name=0, anchor=center, inner sep=0}, "{{u_1 \choose  e_1}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{{f \choose  f}}"', from=1-1, to=2-1]
	\arrow ["{{p^{\flat } \choose  p}}", from=1-2, to=2-2]
	\arrow [""{name=1, anchor=center, inner sep=0}, "{{u_2 \choose  e_2}}"', "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow [shorten <=4pt, shorten >=4pt, Rightarrow, from=0, to=1]
\end {tikzcd}
		]]></fr:resource-source></fr:resource></html:figure>

		in <fr:tex display="inline"><![CDATA[\mathbb {A}\mathsf {rena}^{\mathsf {lx}}(\mathcal {P})]]></fr:tex>. Explicitly, this consists of a <html:em>deterministic</html:em> chart <fr:tex display="inline"><![CDATA[{p^{\flat } \choose  p} : {I_1 \choose  O_1} \to  {I_2 \choose  O_2}]]></fr:tex>,
		<fr:tex display="block"><![CDATA[\begin {cases} p^{\flat } : O_1 \times  I_1 \to  I_2 \\ p : O_1 \to  O_2 \end {cases}]]></fr:tex>
		together with a map <fr:tex display="inline"><![CDATA[f : S_1 \to  S_2]]></fr:tex> on states so that
		<html:ol><html:li>
				For all states <fr:tex display="inline"><![CDATA[s \in  S_1]]></fr:tex>, we have <fr:tex display="inline"><![CDATA[e_2(f(s)) = p(e_1(s)) ]]></fr:tex>.
			</html:li>
			<html:li>
				For all <fr:tex display="inline"><![CDATA[s \in  S_1]]></fr:tex> and <fr:tex display="inline"><![CDATA[i \in  I_1]]></fr:tex>, we have
				<fr:tex display="block"><![CDATA[\forall  s' \in  u_1(s, i),\, f(s') \in  u_2(f(s), p^{\flat }(e(s), i)).]]></fr:tex></html:li></html:ol>
		(Compare these conditions to those of Definition 3.3.0.4 of <fr:link href="/myers-2021-book/" title="Categorical Systems Theory" uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/myers-2021-book/" display-uri="https://forest.topos.site/myers-2021-book" /></fr:link> for deterministic automata.)
	</html:li></html:ol></html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>2</fr:month>
              <fr:day>7</fr:day>
            </fr:date>
            <fr:uri>https://forest.topos.site/djm-00CQ/</fr:uri>
            <fr:display-uri>https://forest.topos.site/djm-00CQ</fr:display-uri>
            <fr:route>/djm-00CQ/</fr:route>
            <fr:title text="double category of lenses and colax squares.">double category of lenses and colax squares.</fr:title>
            <fr:taxon>construction</fr:taxon>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Let <fr:tex display="inline"><![CDATA[E : B^{\mathsf {op}} \to  2\mathcal {C}\mathsf {at}]]></fr:tex> be a 2-category (strictly) indexed by a 1-category <fr:tex display="inline"><![CDATA[B]]></fr:tex>. We define the strict double category <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {cx}}]]></fr:tex> of <html:strong>charts, lenses, and <html:em>colax</html:em> squares</html:strong> as follows:
<html:ol><html:li>
		The tight category of <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {cx}}]]></fr:tex> is the Grothendieck construction of the indexed category <fr:tex display="inline"><![CDATA[\tau _{1}E : B^{\mathsf {op}} \to  \mathcal {C}\mathsf {at}]]></fr:tex> of the underlying indexed category of <fr:tex display="inline"><![CDATA[E]]></fr:tex>.
	</html:li>
	<html:li>
		The loose category of <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {cx}}]]></fr:tex> is the Grothendieck construction of the indexed category <fr:tex display="inline"><![CDATA[\tau _{1}E^{\mathsf {op}} : B^{\mathsf {op}} \to  \mathcal {C}\mathsf {at}]]></fr:tex> of the pointwise opposite of the underlying indexed category of <fr:tex display="inline"><![CDATA[E]]></fr:tex>.
	</html:li>
	<html:li>
		A square
		
<html:figure><fr:resource hash="980cf83fba32435617c710c795496a6e"><fr:resource-content><html:img src="https://forest.topos.site/980cf83fba32435617c710c795496a6e.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
\begin {tikzcd}
	{{A_1^- \choose  A_1^+}} & {{A_3^- \choose  A_3^+}} \\
	{{A_2^- \choose  A_2^+}} & {{A_4^- \choose  A_4^+}}
	\arrow [""{name=0, anchor=center, inner sep=0}, "{{j_1^{\sharp } \choose  j_1}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{{f_1^{\flat } \choose  f_1}}"', from=1-1, to=2-1]
	\arrow ["{{f_2^{\flat } \choose  f_2}}", from=1-2, to=2-2]
	\arrow [""{name=1, anchor=center, inner sep=0}, "{{j_2^{\sharp } \choose  j_2}}"', "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow ["\alpha ", shorten <=4pt, shorten >=4pt, Rightarrow, from=0, to=1]
\end {tikzcd}
		]]></fr:resource-source></fr:resource></html:figure>


	consists of a commuting square as on the left and a 2-cell in <fr:tex display="inline"><![CDATA[E(A_1^+)]]></fr:tex> as on the right:
	
<html:figure><fr:resource hash="0c1e028a886864f950da062b5979806b"><fr:resource-content><html:img src="https://forest.topos.site/0c1e028a886864f950da062b5979806b.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
		\begin {tikzcd}
	{A_1^+} & {A_3^+} & {j_1^{\ast }A_3^-} && {A_1^-} \\
	{A_2^+} & {A_4^+} & {j_1^{\ast }f_2^{\ast }A_4^-} & {f_1^{\ast }j_2^{\ast }A_4^-} & {f_1^{\ast }A_2^-}
	\arrow ["{j_1}", from=1-1, to=1-2]
	\arrow ["{f_1}"', from=1-1, to=2-1]
	\arrow ["{f_2}", from=1-2, to=2-2]
	\arrow ["{j_1^{\sharp }}", from=1-3, to=1-5]
	\arrow ["{j_1^{\ast }f_2^{\flat }}"', from=1-3, to=2-3]
	\arrow ["\alpha "', shorten <=11pt, shorten >=11pt, Rightarrow, from=1-5, to=2-3]
	\arrow ["{f_1^{\flat }}", from=1-5, to=2-5]
	\arrow ["{j_2}"', from=2-1, to=2-2]
	\arrow [Rightarrow, no head, from=2-3, to=2-4]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=2-4, to=2-5]
\end {tikzcd}
	]]></fr:resource-source></fr:resource></html:figure></html:li>
	<html:li>
		Composition of squares is given by whiskering in the appropriate direction.
		<html:ol><html:li>
				For loose composition of the following squares
				
<html:figure><fr:resource hash="4c8653a95de49cc908c336172130ee7c"><fr:resource-content><html:img src="https://forest.topos.site/4c8653a95de49cc908c336172130ee7c.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
					\begin {tikzcd}
	{{A_1^- \choose  A_1^+}} & {{A_3^- \choose  A_3^+}} & {{A_5^- \choose  A_5^+}} \\
	{{A_2^- \choose  A_2^+}} & {{A_4^- \choose  A_4^+}} & {{A_6^- \choose  A_6^+}}
	\arrow [""{name=0, anchor=center, inner sep=0}, "{{j_1^{\sharp } \choose  j_1}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{{f_1^{\flat } \choose  f_1}}"', from=1-1, to=2-1]
	\arrow [""{name=1, anchor=center, inner sep=0}, "{{j_3^{\sharp } \choose  j_3}}", "\shortmid "{marking}, from=1-2, to=1-3]
	\arrow ["{{f_2^{\flat } \choose  f_2}}", from=1-2, to=2-2]
	\arrow ["{{f_3^{\flat } \choose  f_3}}", from=1-3, to=2-3]
	\arrow [""{name=2, anchor=center, inner sep=0}, "{{j_2^{\sharp } \choose  j_2}}"', "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow [""{name=3, anchor=center, inner sep=0}, "{{j_4^{\sharp } \choose  j_4}}"', "\shortmid "{marking}, from=2-2, to=2-3]
	\arrow ["\alpha ", shorten <=4pt, shorten >=4pt, Rightarrow, from=0, to=2]
	\arrow ["\beta ", shorten <=4pt, shorten >=4pt, Rightarrow, from=1, to=3]
\end {tikzcd}
				]]></fr:resource-source></fr:resource></html:figure>

				 we form the whisker <fr:tex display="inline"><![CDATA[j_1^{\ast }\beta  \star  \alpha ]]></fr:tex> as in the following diagram:
				
<html:figure><fr:resource hash="02f45941aa25785cff9039836692453d"><fr:resource-content><html:img src="https://forest.topos.site/02f45941aa25785cff9039836692453d.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
					\begin {tikzcd}
	{j_1^{\ast }j_3^{\ast }A_5^-} && {j_1^{\ast }A_3^-} && {A_1^-} && {} \\
	{j_1^{\ast }j_3^{\ast }f_3^{\ast }A_6^-} & {j_1^{\ast }f_2^{\ast }j_{4}^{\ast }A_6^-} & {j_1^{\ast }f_2^{\ast }A_4^-} & {f_1^{\ast }j_2^{\ast }A_4^-} & {f_1^{\ast }A_2^-} \\
	{j_1^{\ast }j_3^{\ast }f_3^{\ast }A_6^-} && {j_1^{\ast }f_2^{\ast }A_4^-} && {f_1^{\ast }A_2^-}
	\arrow ["{j_1^{\ast }j_3^{\sharp }}", from=1-1, to=1-3]
	\arrow ["{j_1^{\ast }f_3^{\flat }}"', from=1-1, to=2-1]
	\arrow ["{j_1^{\sharp }}", from=1-3, to=1-5]
	\arrow ["{j_1^{\ast }\beta }"', shorten <=13pt, shorten >=13pt, Rightarrow, from=1-3, to=2-1]
	\arrow ["{j_1^{\ast }f_2^{\flat }}"', from=1-3, to=2-3]
	\arrow ["\alpha "', shorten <=11pt, shorten >=11pt, Rightarrow, from=1-5, to=2-3]
	\arrow ["{f_1^{\flat }}", from=1-5, to=2-5]
	\arrow [Rightarrow, no head, from=2-1, to=2-2]
	\arrow [Rightarrow, no head, from=2-1, to=3-1]
	\arrow ["{j_1^{\ast }f_2^{\ast }j_4^{\sharp }}"', from=2-2, to=2-3]
	\arrow [Rightarrow, no head, from=2-3, to=2-4]
	\arrow [Rightarrow, no head, from=2-3, to=3-3]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=2-4, to=2-5]
	\arrow [Rightarrow, no head, from=2-5, to=3-5]
	\arrow ["{j_2^{\ast }f_1^{\ast }j_4^{\sharp }}"', from=3-1, to=3-3]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=3-3, to=3-5]
\end {tikzcd}
				]]></fr:resource-source></fr:resource></html:figure></html:li>
			<html:li>
				For tight composition of squares:
				
<html:figure><fr:resource hash="dfd23ebaa0566fd1321368d23be1750a"><fr:resource-content><html:img src="https://forest.topos.site/dfd23ebaa0566fd1321368d23be1750a.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
\begin {tikzcd}
	{{A_1^- \choose  A_1^+}} & {{A_3^- \choose  A_3^+}} \\
	{{A_2^- \choose  A_2^+}} & {{A_4^- \choose  A_4^+}} \\
	{{A_5^- \choose  A_5^+}} & {{A_6^- \choose  A_6^+}}
	\arrow [""{name=0, anchor=center, inner sep=0}, "{{j_1^{\sharp } \choose  j_1}}", "\shortmid "{marking}, from=1-1, to=1-2]
	\arrow ["{{f_1^{\flat } \choose  f_1}}"', from=1-1, to=2-1]
	\arrow ["{{f_2^{\flat } \choose  f_2}}", from=1-2, to=2-2]
	\arrow [""{name=1, anchor=center, inner sep=0}, "\shortmid "{marking}, from=2-1, to=2-2]
	\arrow ["{{f_3^{\flat } \choose  f_3}}"', from=2-1, to=3-1]
	\arrow ["{{f_4^{\flat } \choose  f_4}}", from=2-2, to=3-2]
	\arrow [""{name=2, anchor=center, inner sep=0}, "{{j_3^{\sharp } \choose  j_3}}"', "\shortmid "{marking}, from=3-1, to=3-2]
	\arrow ["\alpha ", shorten <=4pt, shorten >=4pt, Rightarrow, from=0, to=1]
	\arrow ["\beta ", shorten <=4pt, shorten >=4pt, Rightarrow, from=1, to=2]
\end {tikzcd}
				]]></fr:resource-source></fr:resource></html:figure>

				we form the whisker <fr:tex display="inline"><![CDATA[\alpha  \star  f_1^{\ast }\beta ]]></fr:tex> as in the following diagram:
				
<html:figure><fr:resource hash="6612bc33553ac1eda4bfff8639968e7a"><fr:resource-content><html:img src="https://forest.topos.site/6612bc33553ac1eda4bfff8639968e7a.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
					\begin {tikzcd}
	{j_1^{\ast }A_3^-} && {A_1^-} \\
	{j_1^{\ast }f_2^{\ast }A_4^-} & {f_1^{\ast }j_2^{\ast }A_4^-} & {f_1^{\ast }A_2^-} \\
	& {f_1^{\ast }j_2^{\ast }f_4^{\ast }A_5^-} \\
	{j_1^{\ast }f_2^{\ast }f_4^{\ast }A_5^-} & {f_1^{\ast }f_3^{\ast }j_3^{\ast }A_5^-} & {f_1^{\ast }f_3^{\ast }A_6^-}
	\arrow ["{j_1^{\sharp }}", from=1-1, to=1-3]
	\arrow ["{j_1^{\ast }f_2^{\flat }}"', from=1-1, to=2-1]
	\arrow ["\alpha "', shorten <=14pt, shorten >=14pt, Rightarrow, from=1-3, to=2-1]
	\arrow ["{f_1^{\flat }}", from=1-3, to=2-3]
	\arrow [Rightarrow, no head, from=2-1, to=2-2]
	\arrow ["{j_1^{\ast }f_2^{\ast }f_4^{\flat }}"', from=2-1, to=4-1]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=2-2, to=2-3]
	\arrow ["{f_1^{\ast }j_2^{\ast }f_4^{\flat }}"', from=2-2, to=3-2]
	\arrow ["{f_1^{\ast }\beta }"', shorten <=9pt, shorten >=9pt, Rightarrow, from=2-3, to=4-2]
	\arrow ["{f_1^{\ast }f_4^{\flat }}", from=2-3, to=4-3]
	\arrow [Rightarrow, no head, from=3-2, to=4-2]
	\arrow [Rightarrow, no head, from=4-1, to=4-2]
	\arrow ["{f_1^{\ast }f_3^{\ast }j_3^{\sharp }}"', from=4-2, to=4-3]
\end {tikzcd}
				]]></fr:resource-source></fr:resource></html:figure></html:li></html:ol></html:li>
	<html:li>
		Checking the associativity and interchange laws is straightforward but tedious.
	</html:li></html:ol></html:p>
            <html:p>Dually, we define <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}^{\mathsf {lx}}(E) := \mathbb {L}\mathsf {ens}^{\mathsf {cx}}({E}^{\mathsf {co}})]]></fr:tex> to be the double category of lenses and <html:strong>lax</html:strong> squares:

<html:figure><fr:resource hash="4fa8fb41eedb3d7bfa3678f9a025f483"><fr:resource-content><html:img src="https://forest.topos.site/4fa8fb41eedb3d7bfa3678f9a025f483.svg" /></fr:resource-content><fr:resource-source type="latex" part="preamble"><![CDATA[\usepackage {tikz-cd, amssymb, amsmath, mathtools, mathrsfs}]]></fr:resource-source><fr:resource-source type="latex" part="body"><![CDATA[
\begin {tikzcd}
	{A_1^+} & {A_3^+} & {j_1^{\ast }A_3^-} && {A_1^-} \\
	{A_2^+} & {A_4^+} & {j_1^{\ast }f_2^{\ast }A_4^-} & {f_1^{\ast }j_2^{\ast }A_4^-} & {f_1^{\ast }A_2^-}
	\arrow ["{j_1}", from=1-1, to=1-2]
	\arrow ["{f_1}"', from=1-1, to=2-1]
	\arrow ["{f_2}", from=1-2, to=2-2]
	\arrow ["{j_1^{\sharp }}", from=1-3, to=1-5]
	\arrow ["{j_1^{\ast }f_2^{\flat }}"', from=1-3, to=2-3]
	\arrow ["{f_1^{\flat }}", from=1-5, to=2-5]
	\arrow ["{j_2}"', from=2-1, to=2-2]
	\arrow ["\alpha ", shorten <=11pt, shorten >=11pt, Rightarrow, from=2-3, to=1-5]
	\arrow [Rightarrow, no head, from=2-3, to=2-4]
	\arrow ["{f_1^{\ast }j_2^{\sharp }}"', from=2-4, to=2-5]
\end {tikzcd}
]]></fr:resource-source></fr:resource></html:figure></html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/david-jaz-myers/" title="David Jaz Myers" uri="https://forest.topos.site/david-jaz-myers/" display-uri="https://forest.topos.site/david-jaz-myers" type="local">David Jaz Myers</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2025</fr:year>
              <fr:month>1</fr:month>
              <fr:day>23</fr:day>
            </fr:date>
            <fr:uri>https://forest.topos.site/djm-00B6/</fr:uri>
            <fr:display-uri>https://forest.topos.site/djm-00B6</fr:display-uri>
            <fr:route>/djm-00B6/</fr:route>
            <fr:title text="double category of Spivak lenses">double category of Spivak lenses</fr:title>
            <fr:taxon>definition</fr:taxon>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>The <html:strong>double category <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}(\pi  : E \to  B)]]></fr:tex> (often just <fr:tex display="inline"><![CDATA[\mathbb {L}\mathsf {ens}(E)]]></fr:tex> for short) of Spivak lenses (<fr:link href="/spivak-2019-generalized/" title="Generalized Lens Categories via functors \mathcal {C}^{\rm  op}\to \mathsf {Cat}" uri="https://forest.topos.site/spivak-2019-generalized/" display-uri="https://forest.topos.site/spivak-2019-generalized" type="local">Reference <fr:contextual-number uri="https://forest.topos.site/spivak-2019-generalized/" display-uri="https://forest.topos.site/spivak-2019-generalized" /></fr:link>) for the fibration <fr:tex display="inline"><![CDATA[\pi  : E \to  B]]></fr:tex></html:strong> is defined to be the <fr:link href="/djm-0088/" title="span construction of an adequate triple" uri="https://forest.topos.site/djm-0088/" display-uri="https://forest.topos.site/djm-0088" type="local">span construction</fr:link> of the <fr:link href="/djm-008E/" title="adequate triple of a cartesian fibration" uri="https://forest.topos.site/djm-008E/" display-uri="https://forest.topos.site/djm-008E" type="local">adequate triple associated to <fr:tex display="inline"><![CDATA[\pi ]]></fr:tex></fr:link>:
<fr:tex display="block"><![CDATA[\mathbb {L}\mathsf {ens}(E) := \mathbb {S}\mathsf {pan}(E, \mathsf {vert}, \mathsf {cart}).]]></fr:tex></html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://forest.topos.site/david-jaz-myers/</fr:uri>
            <fr:display-uri>https://forest.topos.site/david-jaz-myers</fr:display-uri>
            <fr:route>/david-jaz-myers/</fr:route>
            <fr:title text="David Jaz Myers">David Jaz Myers</fr:title>
            <fr:taxon>author</fr:taxon>
            <fr:meta name="email">davidjaz@topos.institute</fr:meta>
            <fr:meta name="affiliation">Topos Research UK, Oxford (UK)</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter />
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://forest.topos.site/diptarko-roy/</fr:uri>
            <fr:display-uri>https://forest.topos.site/diptarko-roy</fr:display-uri>
            <fr:route>/diptarko-roy/</fr:route>
            <fr:title text="Diptarko Roy">Diptarko Roy</fr:title>
            <fr:taxon>person</fr:taxon>
          </fr:frontmatter>
          <fr:mainmatter />
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://forest.topos.site/mirco-giacobbe/</fr:uri>
            <fr:display-uri>https://forest.topos.site/mirco-giacobbe</fr:display-uri>
            <fr:route>/mirco-giacobbe/</fr:route>
            <fr:title text="Mirco Giacobbe">Mirco Giacobbe</fr:title>
            <fr:taxon>person</fr:taxon>
          </fr:frontmatter>
          <fr:mainmatter />
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Contributions">Contributions</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
  </fr:backmatter>
</fr:tree>
