mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
83 lines
14 KiB
HTML
83 lines
14 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
|
||
<head>
|
||
<meta charset="utf-8" />
|
||
<meta name="generator" content="pandoc" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||
<title>Monad.Instance.K</title>
|
||
<style>
|
||
code{white-space: pre-wrap;}
|
||
span.smallcaps{font-variant: small-caps;}
|
||
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
||
div.column{flex: auto; overflow-x: auto;}
|
||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||
/* The extra [class] is a hack that increases specificity enough to
|
||
override a similar rule in reveal.js */
|
||
ul.task-list[class]{list-style: none;}
|
||
ul.task-list li input[type="checkbox"] {
|
||
font-size: inherit;
|
||
width: 0.8em;
|
||
margin: 0 0.8em 0.2em -1.6em;
|
||
vertical-align: middle;
|
||
}
|
||
</style>
|
||
<link rel="stylesheet" href="Agda.css" />
|
||
<!--[if lt IE 9]>
|
||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||
<![endif]-->
|
||
</head>
|
||
<body>
|
||
<!--
|
||
<pre class="Agda"><a id="14" class="Keyword">open</a> <a id="19" class="Keyword">import</a> <a id="26" href="Level.html" class="Module">Level</a>
|
||
<a id="32" class="Keyword">open</a> <a id="37" class="Keyword">import</a> <a id="44" href="Categories.FreeObjects.Free.html" class="Module">Categories.FreeObjects.Free</a> <a id="72" class="Keyword">using</a> <a id="78" class="Symbol">(</a><a id="79" href="Categories.FreeObjects.Free.html#485" class="Record">FreeObject</a><a id="89" class="Symbol">;</a> <a id="91" href="Categories.FreeObjects.Free.html#1758" class="Function">FO⇒Functor</a><a id="101" class="Symbol">;</a> <a id="103" href="Categories.FreeObjects.Free.html#7309" class="Function">FO⇒LAdj</a><a id="110" class="Symbol">)</a>
|
||
<a id="112" class="Keyword">open</a> <a id="117" class="Keyword">import</a> <a id="124" href="Categories.Functor.Core.html" class="Module">Categories.Functor.Core</a> <a id="148" class="Keyword">using</a> <a id="154" class="Symbol">(</a><a id="155" href="Categories.Functor.Core.html#248" class="Record">Functor</a><a id="162" class="Symbol">)</a>
|
||
<a id="164" class="Keyword">open</a> <a id="169" class="Keyword">import</a> <a id="176" href="Categories.Adjoint.html" class="Module">Categories.Adjoint</a> <a id="195" class="Keyword">using</a> <a id="201" class="Symbol">(</a><a id="202" href="Categories.Adjoint.html#7818" class="Function Operator">_⊣_</a><a id="205" class="Symbol">)</a>
|
||
<a id="207" class="Keyword">open</a> <a id="212" class="Keyword">import</a> <a id="219" href="Categories.Adjoint.Properties.html" class="Module">Categories.Adjoint.Properties</a> <a id="249" class="Keyword">using</a> <a id="255" class="Symbol">(</a><a id="256" href="Categories.Adjoint.Properties.html#9436" class="Function">adjoint⇒monad</a><a id="269" class="Symbol">)</a>
|
||
<a id="271" class="Keyword">open</a> <a id="276" class="Keyword">import</a> <a id="283" href="Categories.Monad.html" class="Module">Categories.Monad</a> <a id="300" class="Keyword">using</a> <a id="306" class="Symbol">(</a><a id="307" href="Categories.Monad.html#454" class="Record">Monad</a><a id="312" class="Symbol">)</a>
|
||
<a id="314" class="Keyword">open</a> <a id="319" class="Keyword">import</a> <a id="326" href="Categories.Monad.Relative.html" class="Module">Categories.Monad.Relative</a> <a id="352" class="Keyword">using</a> <a id="358" class="Symbol">()</a> <a id="361" class="Keyword">renaming</a> <a id="370" class="Symbol">(</a><a id="371" href="Categories.Monad.Relative.html#602" class="Record">Monad</a> <a id="377" class="Symbol">to</a> <a id="380" class="Record">RMonad</a><a id="386" class="Symbol">)</a>
|
||
<a id="388" class="Keyword">open</a> <a id="393" class="Keyword">import</a> <a id="400" href="Category.Ambient.html" class="Module">Category.Ambient</a> <a id="417" class="Keyword">using</a> <a id="423" class="Symbol">(</a><a id="424" href="Category.Ambient.html#1681" class="Record">Ambient</a><a id="431" class="Symbol">)</a>
|
||
<a id="433" class="Keyword">open</a> <a id="438" class="Keyword">import</a> <a id="445" href="Categories.Monad.Construction.Kleisli.html" class="Module">Categories.Monad.Construction.Kleisli</a>
|
||
</pre>-->
|
||
<h1 id="the-monad-k">The monad K</h1>
|
||
<pre class="Agda"><a id="515" class="Keyword">module</a> <a id="522" href="Monad.Instance.K.html" class="Module">Monad.Instance.K</a> <a id="539" class="Symbol">{</a><a id="540" href="Monad.Instance.K.html#540" class="Bound">o</a> <a id="542" href="Monad.Instance.K.html#542" class="Bound">ℓ</a> <a id="544" href="Monad.Instance.K.html#544" class="Bound">e</a><a id="545" class="Symbol">}</a> <a id="547" class="Symbol">(</a><a id="548" href="Monad.Instance.K.html#548" class="Bound">ambient</a> <a id="556" class="Symbol">:</a> <a id="558" href="Category.Ambient.html#1681" class="Record">Ambient</a> <a id="566" href="Monad.Instance.K.html#540" class="Bound">o</a> <a id="568" href="Monad.Instance.K.html#542" class="Bound">ℓ</a> <a id="570" href="Monad.Instance.K.html#544" class="Bound">e</a><a id="571" class="Symbol">)</a> <a id="573" class="Keyword">where</a>
|
||
<a id="581" class="Keyword">open</a> <a id="586" href="Category.Ambient.html#1681" class="Module">Ambient</a> <a id="594" href="Monad.Instance.K.html#548" class="Bound">ambient</a>
|
||
<a id="604" class="Keyword">open</a> <a id="609" class="Keyword">import</a> <a id="616" href="Category.Construction.ElgotAlgebras.html" class="Module">Category.Construction.ElgotAlgebras</a> <a id="652" href="Categories.Category.Extensive.html#734" class="Function">cocartesian</a>
|
||
<a id="666" class="Keyword">open</a> <a id="671" class="Keyword">import</a> <a id="678" href="Algebra.Elgot.html" class="Module">Algebra.Elgot</a> <a id="692" href="Categories.Category.Extensive.html#734" class="Function">cocartesian</a> <a id="704" class="Keyword">using</a> <a id="710" class="Symbol">(</a><a id="711" href="Algebra.Elgot.html#15964" class="Record">Elgot-Algebra</a><a id="724" class="Symbol">)</a>
|
||
<a id="728" class="Keyword">open</a> <a id="733" class="Keyword">import</a> <a id="740" href="Algebra.Elgot.Free.html" class="Module">Algebra.Elgot.Free</a> <a id="759" href="Categories.Category.Extensive.html#734" class="Function">cocartesian</a> <a id="771" class="Keyword">using</a> <a id="777" class="Symbol">(</a><a id="778" href="Algebra.Elgot.Free.html#1441" class="Function">FreeElgotAlgebra</a><a id="794" class="Symbol">;</a> <a id="796" href="Algebra.Elgot.Free.html#1197" class="Function">elgotForgetfulF</a><a id="811" class="Symbol">)</a>
|
||
<a id="815" class="Keyword">open</a> <a id="820" class="Keyword">import</a> <a id="827" href="Algebra.Elgot.Stable.html" class="Module">Algebra.Elgot.Stable</a> <a id="848" href="Category.Ambient.html#2762" class="Function">distributive</a> <a id="861" class="Keyword">using</a> <a id="867" class="Symbol">(</a><a id="868" href="Algebra.Elgot.Stable.html#2437" class="Record">IsStableFreeElgotAlgebra</a><a id="892" class="Symbol">)</a>
|
||
|
||
<a id="897" class="Keyword">open</a> <a id="902" href="Categories.Category.Core.html#1530" class="Module">Equiv</a>
|
||
<a id="910" class="Keyword">open</a> <a id="915" href="Category.Ambient.html#9087" class="Module">MR</a> <a id="918" href="Category.Ambient.html#1757" class="Field">C</a>
|
||
<a id="922" class="Keyword">open</a> <a id="927" href="Category.Ambient.html#9069" class="Module">M</a> <a id="929" href="Category.Ambient.html#1757" class="Field">C</a>
|
||
<a id="933" class="Keyword">open</a> <a id="938" href="Categories.Category.Core.html#2462" class="Module">HomReasoning</a>
|
||
</pre>
|
||
<h2 id="definition">Definition</h2>
|
||
<p>The monad is defined by existence of free uniform-iteration algebras.
|
||
Since free objects yield and adjunctions, this yields a monad.</p>
|
||
<pre class="Agda"> <a id="1116" class="Keyword">record</a> <a id="MonadK"></a><a id="1123" href="Monad.Instance.K.html#1123" class="Record">MonadK</a> <a id="1130" class="Symbol">:</a> <a id="1132" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1136" class="Symbol">(</a><a id="1137" href="Agda.Primitive.html#931" class="Primitive">suc</a> <a id="1141" href="Monad.Instance.K.html#540" class="Bound">o</a> <a id="1143" href="Agda.Primitive.html#961" class="Primitive Operator">⊔</a> <a id="1145" href="Agda.Primitive.html#931" class="Primitive">suc</a> <a id="1149" href="Monad.Instance.K.html#542" class="Bound">ℓ</a> <a id="1151" href="Agda.Primitive.html#961" class="Primitive Operator">⊔</a> <a id="1153" href="Agda.Primitive.html#931" class="Primitive">suc</a> <a id="1157" href="Monad.Instance.K.html#544" class="Bound">e</a><a id="1158" class="Symbol">)</a> <a id="1160" class="Keyword">where</a>
|
||
<a id="1170" class="Keyword">field</a>
|
||
<a id="MonadK.freealgebras"></a><a id="1182" href="Monad.Instance.K.html#1182" class="Field">freealgebras</a> <a id="1195" class="Symbol">:</a> <a id="1197" class="Symbol">∀</a> <a id="1199" href="Monad.Instance.K.html#1199" class="Bound">X</a> <a id="1201" class="Symbol">→</a> <a id="1203" href="Algebra.Elgot.Free.html#1441" class="Function">FreeElgotAlgebra</a> <a id="1220" href="Monad.Instance.K.html#1199" class="Bound">X</a>
|
||
<a id="MonadK.stable"></a><a id="1228" href="Monad.Instance.K.html#1228" class="Field">stable</a> <a id="1235" class="Symbol">:</a> <a id="1237" class="Symbol">∀</a> <a id="1239" href="Monad.Instance.K.html#1239" class="Bound">X</a> <a id="1241" class="Symbol">→</a> <a id="1243" href="Algebra.Elgot.Stable.html#2437" class="Record">IsStableFreeElgotAlgebra</a> <a id="1268" class="Symbol">(</a><a id="1269" href="Monad.Instance.K.html#1182" class="Field">freealgebras</a> <a id="1282" href="Monad.Instance.K.html#1239" class="Bound">X</a><a id="1283" class="Symbol">)</a>
|
||
|
||
<a id="1290" class="Comment">-- helper for accessing elgot algebras</a>
|
||
<a id="MonadK.algebras"></a><a id="1333" href="Monad.Instance.K.html#1333" class="Function">algebras</a> <a id="1342" class="Symbol">:</a> <a id="1344" class="Symbol">∀</a> <a id="1346" class="Symbol">(</a><a id="1347" href="Monad.Instance.K.html#1347" class="Bound">X</a> <a id="1349" class="Symbol">:</a> <a id="1351" href="Categories.Category.Core.html#559" class="Function">Obj</a><a id="1354" class="Symbol">)</a> <a id="1356" class="Symbol">→</a> <a id="1358" href="Algebra.Elgot.html#15964" class="Record">Elgot-Algebra</a>
|
||
<a id="1376" href="Monad.Instance.K.html#1333" class="Function">algebras</a> <a id="1385" href="Monad.Instance.K.html#1385" class="Bound">X</a> <a id="1387" class="Symbol">=</a> <a id="1389" href="Categories.FreeObjects.Free.html#838" class="Field">FreeObject.FX</a> <a id="1403" class="Symbol">(</a><a id="1404" href="Monad.Instance.K.html#1182" class="Field">freealgebras</a> <a id="1417" href="Monad.Instance.K.html#1385" class="Bound">X</a><a id="1418" class="Symbol">)</a>
|
||
|
||
<a id="MonadK.freeF"></a><a id="1425" href="Monad.Instance.K.html#1425" class="Function">freeF</a> <a id="1431" class="Symbol">:</a> <a id="1433" href="Categories.Functor.Core.html#248" class="Record">Functor</a> <a id="1441" href="Category.Ambient.html#1757" class="Field">C</a> <a id="1443" href="Category.Construction.ElgotAlgebras.html#939" class="Function">Elgot-Algebras</a>
|
||
<a id="1462" href="Monad.Instance.K.html#1425" class="Function">freeF</a> <a id="1468" class="Symbol">=</a> <a id="1470" href="Categories.FreeObjects.Free.html#1758" class="Function">FO⇒Functor</a> <a id="1481" href="Algebra.Elgot.Free.html#1197" class="Function">elgotForgetfulF</a> <a id="1497" href="Monad.Instance.K.html#1182" class="Field">freealgebras</a>
|
||
|
||
<a id="MonadK.adjoint"></a><a id="1519" href="Monad.Instance.K.html#1519" class="Function">adjoint</a> <a id="1527" class="Symbol">:</a> <a id="1529" href="Monad.Instance.K.html#1425" class="Function">freeF</a> <a id="1535" href="Categories.Adjoint.html#7818" class="Function Operator">⊣</a> <a id="1537" href="Algebra.Elgot.Free.html#1197" class="Function">elgotForgetfulF</a>
|
||
<a id="1557" href="Monad.Instance.K.html#1519" class="Function">adjoint</a> <a id="1565" class="Symbol">=</a> <a id="1567" href="Categories.FreeObjects.Free.html#7309" class="Function">FO⇒LAdj</a> <a id="1575" href="Algebra.Elgot.Free.html#1197" class="Function">elgotForgetfulF</a> <a id="1591" href="Monad.Instance.K.html#1182" class="Field">freealgebras</a>
|
||
|
||
<a id="MonadK.monadK"></a><a id="1609" href="Monad.Instance.K.html#1609" class="Function">monadK</a> <a id="1616" class="Symbol">:</a> <a id="1618" href="Categories.Monad.html#454" class="Record">Monad</a> <a id="1624" href="Category.Ambient.html#1757" class="Field">C</a>
|
||
<a id="1630" href="Monad.Instance.K.html#1609" class="Function">monadK</a> <a id="1637" class="Symbol">=</a> <a id="1639" href="Categories.Adjoint.Properties.html#9436" class="Function">adjoint⇒monad</a> <a id="1653" href="Monad.Instance.K.html#1519" class="Function">adjoint</a>
|
||
<a id="1665" class="Keyword">module</a> <a id="MonadK.monadK"></a><a id="1672" href="Monad.Instance.K.html#1672" class="Module">monadK</a> <a id="1679" class="Symbol">=</a> <a id="1681" href="Categories.Monad.html#454" class="Module">Monad</a> <a id="1687" href="Monad.Instance.K.html#1609" class="Function">monadK</a>
|
||
|
||
<a id="MonadK.kleisliK"></a><a id="1699" href="Monad.Instance.K.html#1699" class="Function">kleisliK</a> <a id="1708" class="Symbol">:</a> <a id="1710" href="Categories.Monad.Construction.Kleisli.html#882" class="Function">KleisliTriple</a> <a id="1724" href="Category.Ambient.html#1757" class="Field">C</a>
|
||
<a id="1730" href="Monad.Instance.K.html#1699" class="Function">kleisliK</a> <a id="1739" class="Symbol">=</a> <a id="1741" href="Categories.Monad.Construction.Kleisli.html#2851" class="Function">Monad⇒Kleisli</a> <a id="1755" href="Category.Ambient.html#1757" class="Field">C</a> <a id="1757" href="Monad.Instance.K.html#1609" class="Function">monadK</a>
|
||
<a id="1768" class="Keyword">module</a> <a id="MonadK.kleisliK"></a><a id="1775" href="Monad.Instance.K.html#1775" class="Module">kleisliK</a> <a id="1784" class="Symbol">=</a> <a id="1786" href="Monad.Instance.K.html#380" class="Module">RMonad</a> <a id="1793" href="Monad.Instance.K.html#1699" class="Function">kleisliK</a>
|
||
|
||
<a id="1807" class="Keyword">module</a> <a id="MonadK.K"></a><a id="1814" href="Monad.Instance.K.html#1814" class="Module">K</a> <a id="1816" class="Symbol">=</a> <a id="1818" href="Categories.Functor.Core.html#248" class="Module">Functor</a> <a id="1826" href="Categories.Monad.html#525" class="Function">monadK.F</a>
|
||
</pre>
|
||
</body>
|
||
</html>
|