bsc-leon-vatthauer/agda/bsc-thesis/Categories.Monad.Strong.html
2024-02-09 17:53:52 +01:00

100 lines
No EOL
39 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML>
<html><head><meta charset="utf-8"><title>Categories.Monad.Strong</title><link rel="stylesheet" href="Agda.css"></head><body><pre class="Agda"><a id="1" class="Symbol">{-#</a> <a id="5" class="Keyword">OPTIONS</a> <a id="13" class="Pragma">--without-K</a> <a id="25" class="Pragma">--safe</a> <a id="32" class="Symbol">#-}</a>
<a id="37" class="Comment">-- Define Strong Monad; use the Wikipedia definition</a>
<a id="90" class="Comment">-- https://en.wikipedia.org/wiki/Strong_monad</a>
<a id="136" class="Comment">-- At the nLab, https://ncatlab.org/nlab/show/strong+monad</a>
<a id="195" class="Comment">-- there are two further definitions; the 2-categorical version is too complicated</a>
<a id="278" class="Comment">-- and the Moggi definition is a special case of the one here</a>
<a id="341" class="Keyword">module</a> <a id="348" href="Categories.Monad.Strong.html" class="Module">Categories.Monad.Strong</a> <a id="373" class="Keyword">where</a>
<a id="380" class="Keyword">open</a> <a id="385" class="Keyword">import</a> <a id="392" href="Level.html" class="Module">Level</a>
<a id="398" class="Keyword">open</a> <a id="403" class="Keyword">import</a> <a id="410" href="Data.Product.html" class="Module">Data.Product</a> <a id="423" class="Keyword">using</a> <a id="429" class="Symbol">(</a><a id="430" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">_,_</a><a id="433" class="Symbol">)</a>
<a id="436" class="Keyword">open</a> <a id="441" class="Keyword">import</a> <a id="448" href="Categories.Category.html" class="Module">Categories.Category</a>
<a id="468" class="Keyword">open</a> <a id="473" class="Keyword">import</a> <a id="480" href="Categories.Functor.html" class="Module">Categories.Functor</a> <a id="499" class="Keyword">renaming</a> <a id="508" class="Symbol">(</a><a id="509" href="Categories.Functor.html#349" class="Function">id</a> <a id="512" class="Symbol">to</a> <a id="515" class="Function">idF</a><a id="518" class="Symbol">)</a>
<a id="520" class="Keyword">open</a> <a id="525" class="Keyword">import</a> <a id="532" href="Categories.Category.Monoidal.html" class="Module">Categories.Category.Monoidal</a>
<a id="561" class="Keyword">open</a> <a id="566" class="Keyword">import</a> <a id="573" href="Categories.Category.Product.html" class="Module">Categories.Category.Product</a>
<a id="601" class="Keyword">open</a> <a id="606" class="Keyword">import</a> <a id="613" href="Categories.NaturalTransformation.html" class="Module">Categories.NaturalTransformation</a> <a id="646" class="Keyword">hiding</a> <a id="653" class="Symbol">(</a><a id="654" href="Categories.NaturalTransformation.Core.html#2132" class="Function">id</a><a id="656" class="Symbol">)</a>
<a id="658" class="Keyword">open</a> <a id="663" class="Keyword">import</a> <a id="670" href="Categories.Monad.html" class="Module">Categories.Monad</a>
<a id="688" class="Keyword">private</a>
<a id="698" class="Keyword">variable</a>
<a id="711" href="Categories.Monad.Strong.html#711" class="Generalizable">o</a> <a id="713" href="Categories.Monad.Strong.html#713" class="Generalizable"></a> <a id="715" href="Categories.Monad.Strong.html#715" class="Generalizable">e</a> <a id="717" class="Symbol">:</a> <a id="719" href="Agda.Primitive.html#742" class="Postulate">Level</a>
<a id="726" class="Comment">-- (left) strength on a monad</a>
<a id="757" class="Keyword">record</a> <a id="Strength"></a><a id="764" href="Categories.Monad.Strong.html#764" class="Record">Strength</a> <a id="773" class="Symbol">{</a><a id="774" href="Categories.Monad.Strong.html#774" class="Bound">C</a> <a id="776" class="Symbol">:</a> <a id="778" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="787" href="Categories.Monad.Strong.html#711" class="Generalizable">o</a> <a id="789" href="Categories.Monad.Strong.html#713" class="Generalizable"></a> <a id="791" href="Categories.Monad.Strong.html#715" class="Generalizable">e</a><a id="792" class="Symbol">}</a> <a id="794" class="Symbol">(</a><a id="795" href="Categories.Monad.Strong.html#795" class="Bound">V</a> <a id="797" class="Symbol">:</a> <a id="799" href="Categories.Category.Monoidal.Core.html#1287" class="Record">Monoidal</a> <a id="808" href="Categories.Monad.Strong.html#774" class="Bound">C</a><a id="809" class="Symbol">)</a> <a id="811" class="Symbol">(</a><a id="812" href="Categories.Monad.Strong.html#812" class="Bound">M</a> <a id="814" class="Symbol">:</a> <a id="816" href="Categories.Monad.html#454" class="Record">Monad</a> <a id="822" href="Categories.Monad.Strong.html#774" class="Bound">C</a><a id="823" class="Symbol">)</a> <a id="825" class="Symbol">:</a> <a id="827" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="831" class="Symbol">(</a><a id="832" href="Categories.Monad.Strong.html#787" class="Bound">o</a> <a id="834" href="Agda.Primitive.html#961" class="Primitive Operator"></a> <a id="836" href="Categories.Monad.Strong.html#789" class="Bound"></a> <a id="838" href="Agda.Primitive.html#961" class="Primitive Operator"></a> <a id="840" href="Categories.Monad.Strong.html#791" class="Bound">e</a><a id="841" class="Symbol">)</a> <a id="843" class="Keyword">where</a>
<a id="851" class="Keyword">open</a> <a id="856" href="Categories.Category.Core.html#442" class="Module">Category</a> <a id="865" href="Categories.Monad.Strong.html#774" class="Bound">C</a>
<a id="869" class="Keyword">open</a> <a id="874" href="Categories.Category.Monoidal.Core.html#1287" class="Module">Monoidal</a> <a id="883" href="Categories.Monad.Strong.html#795" class="Bound">V</a>
<a id="887" class="Keyword">private</a>
<a id="899" class="Keyword">module</a> <a id="Strength.M"></a><a id="906" href="Categories.Monad.Strong.html#906" class="Module">M</a> <a id="908" class="Symbol">=</a> <a id="910" href="Categories.Monad.html#454" class="Module">Monad</a> <a id="916" href="Categories.Monad.Strong.html#812" class="Bound">M</a>
<a id="920" class="Keyword">open</a> <a id="925" href="Categories.Monad.Strong.html#906" class="Module">M</a> <a id="927" class="Keyword">using</a> <a id="933" class="Symbol">(</a><a id="934" href="Categories.Monad.html#525" class="Function">F</a><a id="935" class="Symbol">)</a>
<a id="939" class="Keyword">open</a> <a id="944" href="Categories.NaturalTransformation.Core.html#466" class="Module">NaturalTransformation</a> <a id="966" href="Categories.Monad.html#547" class="Function">M.η</a> <a id="970" class="Keyword">using</a> <a id="976" class="Symbol">(</a><a id="977" href="Categories.NaturalTransformation.Core.html#783" class="Field">η</a><a id="978" class="Symbol">)</a>
<a id="982" class="Keyword">open</a> <a id="987" href="Categories.NaturalTransformation.Core.html#466" class="Module">NaturalTransformation</a> <a id="1009" href="Categories.Monad.html#583" class="Function">M.μ</a> <a id="1013" class="Keyword">renaming</a> <a id="1022" class="Symbol">(</a><a id="1023" href="Categories.NaturalTransformation.Core.html#783" class="Field">η</a> <a id="1025" class="Symbol">to</a> <a id="1028" class="Field">μ</a><a id="1029" class="Symbol">)</a>
<a id="1033" class="Keyword">open</a> <a id="1038" href="Categories.Functor.Core.html#248" class="Module">Functor</a> <a id="1046" href="Categories.Monad.html#525" class="Function">F</a>
<a id="1050" class="Keyword">field</a>
<a id="Strength.strengthen"></a><a id="1060" href="Categories.Monad.Strong.html#1060" class="Field">strengthen</a> <a id="1071" class="Symbol">:</a> <a id="1073" href="Categories.NaturalTransformation.Core.html#466" class="Record">NaturalTransformation</a> <a id="1095" class="Symbol">(</a><a id="1096" href="Categories.Category.Monoidal.Core.html#1355" class="Function"></a> <a id="1098" href="Categories.Functor.html#747" class="Function Operator">∘F</a> <a id="1101" class="Symbol">(</a><a id="1102" href="Categories.Monad.Strong.html#515" class="Function">idF</a> <a id="1106" href="Categories.Category.Product.html#1962" class="Function Operator"></a> <a id="1108" href="Categories.Monad.html#525" class="Function">F</a><a id="1109" class="Symbol">))</a> <a id="1112" class="Symbol">(</a><a id="1113" href="Categories.Monad.html#525" class="Function">F</a> <a id="1115" href="Categories.Functor.html#747" class="Function Operator">∘F</a> <a id="1118" href="Categories.Category.Monoidal.Core.html#1355" class="Function"></a><a id="1119" class="Symbol">)</a>
<a id="1124" class="Keyword">module</a> <a id="Strength.strengthen"></a><a id="1131" href="Categories.Monad.Strong.html#1131" class="Module">strengthen</a> <a id="1142" class="Symbol">=</a> <a id="1144" href="Categories.NaturalTransformation.Core.html#466" class="Module">NaturalTransformation</a> <a id="1166" href="Categories.Monad.Strong.html#1060" class="Field">strengthen</a>
<a id="1179" class="Keyword">private</a>
<a id="1191" class="Keyword">module</a> <a id="Strength.t"></a><a id="1198" href="Categories.Monad.Strong.html#1198" class="Module">t</a> <a id="1200" class="Symbol">=</a> <a id="1202" href="Categories.Monad.Strong.html#1131" class="Module">strengthen</a>
<a id="1216" class="Keyword">field</a>
<a id="1226" class="Comment">-- strengthening with 1 is irrelevant</a>
<a id="Strength.identityˡ"></a><a id="1268" href="Categories.Monad.Strong.html#1268" class="Field">identityˡ</a> <a id="1278" class="Symbol">:</a> <a id="1280" class="Symbol">{</a><a id="1281" href="Categories.Monad.Strong.html#1281" class="Bound">A</a> <a id="1283" class="Symbol">:</a> <a id="1285" href="Categories.Category.Core.html#559" class="Function">Obj</a><a id="1288" class="Symbol">}</a> <a id="1290" class="Symbol"></a> <a id="1292" href="Categories.Functor.Core.html#455" class="Function">F₁</a> <a id="1295" class="Symbol">(</a><a id="1296" href="Categories.Morphism.html#2006" class="Function">unitorˡ.from</a><a id="1308" class="Symbol">)</a> <a id="1310" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1312" href="Categories.NaturalTransformation.Core.html#783" class="Function">t.η</a> <a id="1316" class="Symbol">(</a><a id="1317" href="Categories.Category.Monoidal.Core.html#1380" class="Function">unit</a> <a id="1322" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="1324" href="Categories.Monad.Strong.html#1281" class="Bound">A</a><a id="1325" class="Symbol">)</a> <a id="1327" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1329" href="Categories.Morphism.html#2006" class="Function">unitorˡ.from</a>
<a id="1346" class="Comment">-- commutes with unit (of monad)</a>
<a id="Strength.η-comm"></a><a id="1383" href="Categories.Monad.Strong.html#1383" class="Field">η-comm</a> <a id="1390" class="Symbol">:</a> <a id="1392" class="Symbol">{</a><a id="1393" href="Categories.Monad.Strong.html#1393" class="Bound">A</a> <a id="1395" href="Categories.Monad.Strong.html#1395" class="Bound">B</a> <a id="1397" class="Symbol">:</a> <a id="1399" href="Categories.Category.Core.html#559" class="Function">Obj</a><a id="1402" class="Symbol">}</a> <a id="1404" class="Symbol"></a> <a id="1406" href="Categories.NaturalTransformation.Core.html#783" class="Function">t.η</a> <a id="1410" class="Symbol">(</a><a id="1411" href="Categories.Monad.Strong.html#1393" class="Bound">A</a> <a id="1413" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="1415" href="Categories.Monad.Strong.html#1395" class="Bound">B</a><a id="1416" class="Symbol">)</a> <a id="1418" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1420" class="Symbol">(</a><a id="1421" href="Categories.Category.Core.html#630" class="Function">id</a> <a id="1424" href="Categories.Category.Monoidal.Core.html#1536" class="Function Operator">⊗₁</a> <a id="1427" href="Categories.NaturalTransformation.Core.html#783" class="Function">η</a> <a id="1429" href="Categories.Monad.Strong.html#1395" class="Bound">B</a><a id="1430" class="Symbol">)</a> <a id="1432" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1434" href="Categories.NaturalTransformation.Core.html#783" class="Function">η</a> <a id="1436" class="Symbol">(</a><a id="1437" href="Categories.Monad.Strong.html#1393" class="Bound">A</a> <a id="1439" href="Categories.Category.Monoidal.Core.html#1435" class="Function Operator">⊗₀</a> <a id="1442" href="Categories.Monad.Strong.html#1395" class="Bound">B</a><a id="1443" class="Symbol">)</a>
<a id="1449" class="Comment">-- strength commutes with multiplication</a>
<a id="Strength.μ-η-comm"></a><a id="1494" href="Categories.Monad.Strong.html#1494" class="Field">μ-η-comm</a> <a id="1503" class="Symbol">:</a> <a id="1505" class="Symbol">{</a><a id="1506" href="Categories.Monad.Strong.html#1506" class="Bound">A</a> <a id="1508" href="Categories.Monad.Strong.html#1508" class="Bound">B</a> <a id="1510" class="Symbol">:</a> <a id="1512" href="Categories.Category.Core.html#559" class="Function">Obj</a><a id="1515" class="Symbol">}</a> <a id="1517" class="Symbol"></a> <a id="1519" href="Categories.Monad.Strong.html#1028" class="Function">μ</a> <a id="1521" class="Symbol">(</a><a id="1522" href="Categories.Monad.Strong.html#1506" class="Bound">A</a> <a id="1524" href="Categories.Category.Monoidal.Core.html#1435" class="Function Operator">⊗₀</a> <a id="1527" href="Categories.Monad.Strong.html#1508" class="Bound">B</a><a id="1528" class="Symbol">)</a> <a id="1530" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1532" href="Categories.Functor.Core.html#455" class="Function">F₁</a> <a id="1535" class="Symbol">(</a><a id="1536" href="Categories.NaturalTransformation.Core.html#783" class="Function">t.η</a> <a id="1540" class="Symbol">(</a><a id="1541" href="Categories.Monad.Strong.html#1506" class="Bound">A</a> <a id="1543" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="1545" href="Categories.Monad.Strong.html#1508" class="Bound">B</a><a id="1546" class="Symbol">))</a> <a id="1549" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1551" href="Categories.NaturalTransformation.Core.html#783" class="Function">t.η</a> <a id="1555" class="Symbol">(</a><a id="1556" href="Categories.Monad.Strong.html#1506" class="Bound">A</a> <a id="1558" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="1560" href="Categories.Functor.Core.html#432" class="Function">F₀</a> <a id="1563" href="Categories.Monad.Strong.html#1508" class="Bound">B</a><a id="1564" class="Symbol">)</a>
<a id="1572" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1574" href="Categories.NaturalTransformation.Core.html#783" class="Function">t.η</a> <a id="1578" class="Symbol">(</a><a id="1579" href="Categories.Monad.Strong.html#1506" class="Bound">A</a> <a id="1581" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="1583" href="Categories.Monad.Strong.html#1508" class="Bound">B</a><a id="1584" class="Symbol">)</a> <a id="1586" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1588" class="Symbol">(</a><a id="1589" href="Categories.Category.Core.html#630" class="Function">id</a> <a id="1592" href="Categories.Category.Monoidal.Core.html#1536" class="Function Operator">⊗₁</a> <a id="1595" href="Categories.Monad.Strong.html#1028" class="Function">μ</a> <a id="1597" href="Categories.Monad.Strong.html#1508" class="Bound">B</a><a id="1598" class="Symbol">)</a>
<a id="1604" class="Comment">-- consecutive applications of strength commute (i.e. strength is associative)</a>
<a id="Strength.strength-assoc"></a><a id="1687" href="Categories.Monad.Strong.html#1687" class="Field">strength-assoc</a> <a id="1702" class="Symbol">:</a> <a id="1705" class="Symbol">{</a><a id="1706" href="Categories.Monad.Strong.html#1706" class="Bound">A</a> <a id="1708" href="Categories.Monad.Strong.html#1708" class="Bound">B</a> <a id="1710" href="Categories.Monad.Strong.html#1710" class="Bound">C</a> <a id="1712" class="Symbol">:</a> <a id="1714" href="Categories.Category.Core.html#559" class="Function">Obj</a><a id="1717" class="Symbol">}</a> <a id="1719" class="Symbol"></a> <a id="1721" href="Categories.Functor.Core.html#455" class="Function">F₁</a> <a id="1724" href="Categories.Morphism.html#2006" class="Function">associator.from</a> <a id="1740" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1742" href="Categories.NaturalTransformation.Core.html#783" class="Function">t.η</a> <a id="1746" class="Symbol">(</a><a id="1747" href="Categories.Monad.Strong.html#1706" class="Bound">A</a> <a id="1749" href="Categories.Category.Monoidal.Core.html#1435" class="Function Operator">⊗₀</a> <a id="1752" href="Categories.Monad.Strong.html#1708" class="Bound">B</a> <a id="1754" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="1756" href="Categories.Monad.Strong.html#1710" class="Bound">C</a><a id="1757" class="Symbol">)</a>
<a id="1765" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1767" href="Categories.NaturalTransformation.Core.html#783" class="Function">t.η</a> <a id="1771" class="Symbol">(</a><a id="1772" href="Categories.Monad.Strong.html#1706" class="Bound">A</a> <a id="1774" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="1776" href="Categories.Monad.Strong.html#1708" class="Bound">B</a> <a id="1778" href="Categories.Category.Monoidal.Core.html#1435" class="Function Operator">⊗₀</a> <a id="1781" href="Categories.Monad.Strong.html#1710" class="Bound">C</a><a id="1782" class="Symbol">)</a> <a id="1784" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1786" class="Symbol">(</a><a id="1787" href="Categories.Category.Core.html#630" class="Function">id</a> <a id="1790" href="Categories.Category.Monoidal.Core.html#1536" class="Function Operator">⊗₁</a> <a id="1793" href="Categories.NaturalTransformation.Core.html#783" class="Function">t.η</a> <a id="1797" class="Symbol">(</a><a id="1798" href="Categories.Monad.Strong.html#1708" class="Bound">B</a> <a id="1800" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="1802" href="Categories.Monad.Strong.html#1710" class="Bound">C</a><a id="1803" class="Symbol">))</a> <a id="1806" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1808" href="Categories.Morphism.html#2006" class="Function">associator.from</a>
<a id="1825" class="Keyword">record</a> <a id="StrongMonad"></a><a id="1832" href="Categories.Monad.Strong.html#1832" class="Record">StrongMonad</a> <a id="1844" class="Symbol">{</a><a id="1845" href="Categories.Monad.Strong.html#1845" class="Bound">C</a> <a id="1847" class="Symbol">:</a> <a id="1849" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="1858" href="Categories.Monad.Strong.html#711" class="Generalizable">o</a> <a id="1860" href="Categories.Monad.Strong.html#713" class="Generalizable"></a> <a id="1862" href="Categories.Monad.Strong.html#715" class="Generalizable">e</a><a id="1863" class="Symbol">}</a> <a id="1865" class="Symbol">(</a><a id="1866" href="Categories.Monad.Strong.html#1866" class="Bound">V</a> <a id="1868" class="Symbol">:</a> <a id="1870" href="Categories.Category.Monoidal.Core.html#1287" class="Record">Monoidal</a> <a id="1879" href="Categories.Monad.Strong.html#1845" class="Bound">C</a><a id="1880" class="Symbol">)</a> <a id="1882" class="Symbol">:</a> <a id="1884" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1888" class="Symbol">(</a><a id="1889" href="Categories.Monad.Strong.html#1858" class="Bound">o</a> <a id="1891" href="Agda.Primitive.html#961" class="Primitive Operator"></a> <a id="1893" href="Categories.Monad.Strong.html#1860" class="Bound"></a> <a id="1895" href="Agda.Primitive.html#961" class="Primitive Operator"></a> <a id="1897" href="Categories.Monad.Strong.html#1862" class="Bound">e</a><a id="1898" class="Symbol">)</a> <a id="1900" class="Keyword">where</a>
<a id="1908" class="Keyword">field</a>
<a id="StrongMonad.M"></a><a id="1918" href="Categories.Monad.Strong.html#1918" class="Field">M</a> <a id="1927" class="Symbol">:</a> <a id="1929" href="Categories.Monad.html#454" class="Record">Monad</a> <a id="1935" href="Categories.Monad.Strong.html#1845" class="Bound">C</a>
<a id="StrongMonad.strength"></a><a id="1941" href="Categories.Monad.Strong.html#1941" class="Field">strength</a> <a id="1950" class="Symbol">:</a> <a id="1952" href="Categories.Monad.Strong.html#764" class="Record">Strength</a> <a id="1961" href="Categories.Monad.Strong.html#1866" class="Bound">V</a> <a id="1963" href="Categories.Monad.Strong.html#1918" class="Field">M</a>
<a id="1968" class="Keyword">module</a> <a id="StrongMonad.M"></a><a id="1975" href="Categories.Monad.Strong.html#1975" class="Module">M</a> <a id="1977" class="Symbol">=</a> <a id="1979" href="Categories.Monad.html#454" class="Module">Monad</a> <a id="1985" href="Categories.Monad.Strong.html#1918" class="Field">M</a>
<a id="1989" class="Keyword">open</a> <a id="1994" href="Categories.Monad.Strong.html#764" class="Module">Strength</a> <a id="2003" href="Categories.Monad.Strong.html#1941" class="Field">strength</a> <a id="2012" class="Keyword">public</a>
<a id="2020" class="Comment">-- right strength</a>
<a id="2039" class="Keyword">record</a> <a id="RightStrength"></a><a id="2046" href="Categories.Monad.Strong.html#2046" class="Record">RightStrength</a> <a id="2060" class="Symbol">{</a><a id="2061" href="Categories.Monad.Strong.html#2061" class="Bound">C</a> <a id="2063" class="Symbol">:</a> <a id="2065" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="2074" href="Categories.Monad.Strong.html#711" class="Generalizable">o</a> <a id="2076" href="Categories.Monad.Strong.html#713" class="Generalizable"></a> <a id="2078" href="Categories.Monad.Strong.html#715" class="Generalizable">e</a><a id="2079" class="Symbol">}</a> <a id="2081" class="Symbol">(</a><a id="2082" href="Categories.Monad.Strong.html#2082" class="Bound">V</a> <a id="2084" class="Symbol">:</a> <a id="2086" href="Categories.Category.Monoidal.Core.html#1287" class="Record">Monoidal</a> <a id="2095" href="Categories.Monad.Strong.html#2061" class="Bound">C</a><a id="2096" class="Symbol">)</a> <a id="2098" class="Symbol">(</a><a id="2099" href="Categories.Monad.Strong.html#2099" class="Bound">M</a> <a id="2101" class="Symbol">:</a> <a id="2103" href="Categories.Monad.html#454" class="Record">Monad</a> <a id="2109" href="Categories.Monad.Strong.html#2061" class="Bound">C</a><a id="2110" class="Symbol">)</a> <a id="2112" class="Symbol">:</a> <a id="2114" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="2118" class="Symbol">(</a><a id="2119" href="Categories.Monad.Strong.html#2074" class="Bound">o</a> <a id="2121" href="Agda.Primitive.html#961" class="Primitive Operator"></a> <a id="2123" href="Categories.Monad.Strong.html#2076" class="Bound"></a> <a id="2125" href="Agda.Primitive.html#961" class="Primitive Operator"></a> <a id="2127" href="Categories.Monad.Strong.html#2078" class="Bound">e</a><a id="2128" class="Symbol">)</a> <a id="2130" class="Keyword">where</a>
<a id="2138" class="Keyword">open</a> <a id="2143" href="Categories.Category.Core.html#442" class="Module">Category</a> <a id="2152" href="Categories.Monad.Strong.html#2061" class="Bound">C</a>
<a id="2156" class="Keyword">open</a> <a id="2161" href="Categories.Category.Monoidal.Core.html#1287" class="Module">Monoidal</a> <a id="2170" href="Categories.Monad.Strong.html#2082" class="Bound">V</a>
<a id="2174" class="Keyword">private</a>
<a id="2186" class="Keyword">module</a> <a id="RightStrength.M"></a><a id="2193" href="Categories.Monad.Strong.html#2193" class="Module">M</a> <a id="2195" class="Symbol">=</a> <a id="2197" href="Categories.Monad.html#454" class="Module">Monad</a> <a id="2203" href="Categories.Monad.Strong.html#2099" class="Bound">M</a>
<a id="2207" class="Keyword">open</a> <a id="2212" href="Categories.Monad.Strong.html#2193" class="Module">M</a> <a id="2214" class="Keyword">using</a> <a id="2220" class="Symbol">(</a><a id="2221" href="Categories.Monad.html#525" class="Function">F</a><a id="2222" class="Symbol">)</a>
<a id="2226" class="Keyword">open</a> <a id="2231" href="Categories.NaturalTransformation.Core.html#466" class="Module">NaturalTransformation</a> <a id="2253" href="Categories.Monad.html#547" class="Function">M.η</a> <a id="2257" class="Keyword">using</a> <a id="2263" class="Symbol">(</a><a id="2264" href="Categories.NaturalTransformation.Core.html#783" class="Field">η</a><a id="2265" class="Symbol">)</a>
<a id="2269" class="Keyword">open</a> <a id="2274" href="Categories.NaturalTransformation.Core.html#466" class="Module">NaturalTransformation</a> <a id="2296" href="Categories.Monad.html#583" class="Function">M.μ</a> <a id="2300" class="Keyword">renaming</a> <a id="2309" class="Symbol">(</a><a id="2310" href="Categories.NaturalTransformation.Core.html#783" class="Field">η</a> <a id="2312" class="Symbol">to</a> <a id="2315" class="Field">μ</a><a id="2316" class="Symbol">)</a>
<a id="2320" class="Keyword">open</a> <a id="2325" href="Categories.Functor.Core.html#248" class="Module">Functor</a> <a id="2333" href="Categories.Monad.html#525" class="Function">F</a>
<a id="2337" class="Keyword">field</a>
<a id="RightStrength.strengthen"></a><a id="2347" href="Categories.Monad.Strong.html#2347" class="Field">strengthen</a> <a id="2358" class="Symbol">:</a> <a id="2360" href="Categories.NaturalTransformation.Core.html#466" class="Record">NaturalTransformation</a> <a id="2382" class="Symbol">(</a><a id="2383" href="Categories.Category.Monoidal.Core.html#1355" class="Function"></a> <a id="2385" href="Categories.Functor.html#747" class="Function Operator">∘F</a> <a id="2388" class="Symbol">(</a><a id="2389" href="Categories.Monad.html#525" class="Function">F</a> <a id="2391" href="Categories.Category.Product.html#1962" class="Function Operator"></a> <a id="2393" href="Categories.Monad.Strong.html#515" class="Function">idF</a><a id="2396" class="Symbol">))</a> <a id="2399" class="Symbol">(</a><a id="2400" href="Categories.Monad.html#525" class="Function">F</a> <a id="2402" href="Categories.Functor.html#747" class="Function Operator">∘F</a> <a id="2405" href="Categories.Category.Monoidal.Core.html#1355" class="Function"></a><a id="2406" class="Symbol">)</a>
<a id="2411" class="Keyword">module</a> <a id="RightStrength.strengthen"></a><a id="2418" href="Categories.Monad.Strong.html#2418" class="Module">strengthen</a> <a id="2429" class="Symbol">=</a> <a id="2431" href="Categories.NaturalTransformation.Core.html#466" class="Module">NaturalTransformation</a> <a id="2453" href="Categories.Monad.Strong.html#2347" class="Field">strengthen</a>
<a id="2466" class="Keyword">private</a>
<a id="2478" class="Keyword">module</a> <a id="RightStrength.u"></a><a id="2485" href="Categories.Monad.Strong.html#2485" class="Module">u</a> <a id="2487" class="Symbol">=</a> <a id="2489" href="Categories.Monad.Strong.html#2418" class="Module">strengthen</a>
<a id="2503" class="Keyword">field</a>
<a id="2513" class="Comment">-- strengthening with 1 is irrelevant</a>
<a id="RightStrength.identityˡ"></a><a id="2555" href="Categories.Monad.Strong.html#2555" class="Field">identityˡ</a> <a id="2565" class="Symbol">:</a> <a id="2567" class="Symbol">{</a><a id="2568" href="Categories.Monad.Strong.html#2568" class="Bound">A</a> <a id="2570" class="Symbol">:</a> <a id="2572" href="Categories.Category.Core.html#559" class="Function">Obj</a><a id="2575" class="Symbol">}</a> <a id="2577" class="Symbol"></a> <a id="2579" href="Categories.Functor.Core.html#455" class="Function">F₁</a> <a id="2582" class="Symbol">(</a><a id="2583" href="Categories.Morphism.html#2006" class="Function">unitorʳ.from</a><a id="2595" class="Symbol">)</a> <a id="2597" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="2599" href="Categories.NaturalTransformation.Core.html#783" class="Function">u.η</a> <a id="2603" class="Symbol">(</a><a id="2604" href="Categories.Monad.Strong.html#2568" class="Bound">A</a> <a id="2606" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="2608" href="Categories.Category.Monoidal.Core.html#1380" class="Function">unit</a><a id="2612" class="Symbol">)</a> <a id="2614" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="2616" href="Categories.Morphism.html#2006" class="Function">unitorʳ.from</a>
<a id="2633" class="Comment">-- commutes with unit (of monad)</a>
<a id="RightStrength.η-comm"></a><a id="2670" href="Categories.Monad.Strong.html#2670" class="Field">η-comm</a> <a id="2677" class="Symbol">:</a> <a id="2679" class="Symbol">{</a><a id="2680" href="Categories.Monad.Strong.html#2680" class="Bound">A</a> <a id="2682" href="Categories.Monad.Strong.html#2682" class="Bound">B</a> <a id="2684" class="Symbol">:</a> <a id="2686" href="Categories.Category.Core.html#559" class="Function">Obj</a><a id="2689" class="Symbol">}</a> <a id="2691" class="Symbol"></a> <a id="2693" href="Categories.NaturalTransformation.Core.html#783" class="Function">u.η</a> <a id="2697" class="Symbol">(</a><a id="2698" href="Categories.Monad.Strong.html#2680" class="Bound">A</a> <a id="2700" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="2702" href="Categories.Monad.Strong.html#2682" class="Bound">B</a><a id="2703" class="Symbol">)</a> <a id="2705" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="2707" class="Symbol">(</a><a id="2708" href="Categories.NaturalTransformation.Core.html#783" class="Function">η</a> <a id="2710" href="Categories.Monad.Strong.html#2680" class="Bound">A</a> <a id="2712" href="Categories.Category.Monoidal.Core.html#1536" class="Function Operator">⊗₁</a> <a id="2715" href="Categories.Category.Core.html#630" class="Function">id</a><a id="2717" class="Symbol">)</a> <a id="2719" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="2721" href="Categories.NaturalTransformation.Core.html#783" class="Function">η</a> <a id="2723" class="Symbol">(</a><a id="2724" href="Categories.Monad.Strong.html#2680" class="Bound">A</a> <a id="2726" href="Categories.Category.Monoidal.Core.html#1435" class="Function Operator">⊗₀</a> <a id="2729" href="Categories.Monad.Strong.html#2682" class="Bound">B</a><a id="2730" class="Symbol">)</a>
<a id="2736" class="Comment">-- strength commutes with multiplication</a>
<a id="RightStrength.μ-η-comm"></a><a id="2781" href="Categories.Monad.Strong.html#2781" class="Field">μ-η-comm</a> <a id="2790" class="Symbol">:</a> <a id="2792" class="Symbol">{</a><a id="2793" href="Categories.Monad.Strong.html#2793" class="Bound">A</a> <a id="2795" href="Categories.Monad.Strong.html#2795" class="Bound">B</a> <a id="2797" class="Symbol">:</a> <a id="2799" href="Categories.Category.Core.html#559" class="Function">Obj</a><a id="2802" class="Symbol">}</a> <a id="2804" class="Symbol"></a> <a id="2806" href="Categories.Monad.Strong.html#2315" class="Function">μ</a> <a id="2808" class="Symbol">(</a><a id="2809" href="Categories.Monad.Strong.html#2793" class="Bound">A</a> <a id="2811" href="Categories.Category.Monoidal.Core.html#1435" class="Function Operator">⊗₀</a> <a id="2814" href="Categories.Monad.Strong.html#2795" class="Bound">B</a><a id="2815" class="Symbol">)</a> <a id="2817" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="2819" href="Categories.Functor.Core.html#455" class="Function">F₁</a> <a id="2822" class="Symbol">(</a><a id="2823" href="Categories.NaturalTransformation.Core.html#783" class="Function">u.η</a> <a id="2827" class="Symbol">(</a><a id="2828" href="Categories.Monad.Strong.html#2793" class="Bound">A</a> <a id="2830" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="2832" href="Categories.Monad.Strong.html#2795" class="Bound">B</a><a id="2833" class="Symbol">))</a> <a id="2836" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="2838" href="Categories.NaturalTransformation.Core.html#783" class="Function">u.η</a> <a id="2842" class="Symbol">(</a><a id="2843" href="Categories.Functor.Core.html#432" class="Function">F₀</a> <a id="2846" href="Categories.Monad.Strong.html#2793" class="Bound">A</a> <a id="2848" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="2850" href="Categories.Monad.Strong.html#2795" class="Bound">B</a><a id="2851" class="Symbol">)</a>
<a id="2859" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="2861" href="Categories.NaturalTransformation.Core.html#783" class="Function">u.η</a> <a id="2865" class="Symbol">(</a><a id="2866" href="Categories.Monad.Strong.html#2793" class="Bound">A</a> <a id="2868" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="2870" href="Categories.Monad.Strong.html#2795" class="Bound">B</a><a id="2871" class="Symbol">)</a> <a id="2873" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="2875" class="Symbol">(</a><a id="2876" href="Categories.Monad.Strong.html#2315" class="Function">μ</a> <a id="2878" href="Categories.Monad.Strong.html#2793" class="Bound">A</a> <a id="2880" href="Categories.Category.Monoidal.Core.html#1536" class="Function Operator">⊗₁</a> <a id="2883" href="Categories.Category.Core.html#630" class="Function">id</a><a id="2885" class="Symbol">)</a>
<a id="2891" class="Comment">-- consecutive applications of strength commute (i.e. strength is associative)</a>
<a id="RightStrength.strength-assoc"></a><a id="2974" href="Categories.Monad.Strong.html#2974" class="Field">strength-assoc</a> <a id="2989" class="Symbol">:</a> <a id="2992" class="Symbol">{</a><a id="2993" href="Categories.Monad.Strong.html#2993" class="Bound">A</a> <a id="2995" href="Categories.Monad.Strong.html#2995" class="Bound">B</a> <a id="2997" href="Categories.Monad.Strong.html#2997" class="Bound">C</a> <a id="2999" class="Symbol">:</a> <a id="3001" href="Categories.Category.Core.html#559" class="Function">Obj</a><a id="3004" class="Symbol">}</a> <a id="3006" class="Symbol"></a> <a id="3008" href="Categories.Functor.Core.html#455" class="Function">F₁</a> <a id="3011" href="Categories.Morphism.html#2023" class="Function">associator.to</a> <a id="3025" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="3027" href="Categories.NaturalTransformation.Core.html#783" class="Function">u.η</a> <a id="3031" class="Symbol">(</a><a id="3032" href="Categories.Monad.Strong.html#2993" class="Bound">A</a> <a id="3034" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="3036" href="Categories.Monad.Strong.html#2995" class="Bound">B</a> <a id="3038" href="Categories.Category.Monoidal.Core.html#1435" class="Function Operator">⊗₀</a> <a id="3041" href="Categories.Monad.Strong.html#2997" class="Bound">C</a><a id="3042" class="Symbol">)</a>
<a id="3050" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="3052" href="Categories.NaturalTransformation.Core.html#783" class="Function">u.η</a> <a id="3056" class="Symbol">(</a><a id="3057" href="Categories.Monad.Strong.html#2993" class="Bound">A</a> <a id="3059" href="Categories.Category.Monoidal.Core.html#1435" class="Function Operator">⊗₀</a> <a id="3062" href="Categories.Monad.Strong.html#2995" class="Bound">B</a> <a id="3064" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="3066" href="Categories.Monad.Strong.html#2997" class="Bound">C</a><a id="3067" class="Symbol">)</a> <a id="3069" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="3071" class="Symbol">(</a><a id="3072" href="Categories.NaturalTransformation.Core.html#783" class="Function">u.η</a> <a id="3076" class="Symbol">(</a><a id="3077" href="Categories.Monad.Strong.html#2993" class="Bound">A</a> <a id="3079" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="3081" href="Categories.Monad.Strong.html#2995" class="Bound">B</a><a id="3082" class="Symbol">)</a> <a id="3084" href="Categories.Category.Monoidal.Core.html#1536" class="Function Operator">⊗₁</a> <a id="3087" href="Categories.Category.Core.html#630" class="Function">id</a><a id="3089" class="Symbol">)</a> <a id="3091" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="3093" href="Categories.Morphism.html#2023" class="Function">associator.to</a>
<a id="3108" class="Keyword">record</a> <a id="RightStrongMonad"></a><a id="3115" href="Categories.Monad.Strong.html#3115" class="Record">RightStrongMonad</a> <a id="3132" class="Symbol">{</a><a id="3133" href="Categories.Monad.Strong.html#3133" class="Bound">C</a> <a id="3135" class="Symbol">:</a> <a id="3137" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="3146" href="Categories.Monad.Strong.html#711" class="Generalizable">o</a> <a id="3148" href="Categories.Monad.Strong.html#713" class="Generalizable"></a> <a id="3150" href="Categories.Monad.Strong.html#715" class="Generalizable">e</a><a id="3151" class="Symbol">}</a> <a id="3153" class="Symbol">(</a><a id="3154" href="Categories.Monad.Strong.html#3154" class="Bound">V</a> <a id="3156" class="Symbol">:</a> <a id="3158" href="Categories.Category.Monoidal.Core.html#1287" class="Record">Monoidal</a> <a id="3167" href="Categories.Monad.Strong.html#3133" class="Bound">C</a><a id="3168" class="Symbol">)</a> <a id="3170" class="Symbol">:</a> <a id="3172" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="3176" class="Symbol">(</a><a id="3177" href="Categories.Monad.Strong.html#3146" class="Bound">o</a> <a id="3179" href="Agda.Primitive.html#961" class="Primitive Operator"></a> <a id="3181" href="Categories.Monad.Strong.html#3148" class="Bound"></a> <a id="3183" href="Agda.Primitive.html#961" class="Primitive Operator"></a> <a id="3185" href="Categories.Monad.Strong.html#3150" class="Bound">e</a><a id="3186" class="Symbol">)</a> <a id="3188" class="Keyword">where</a>
<a id="3196" class="Keyword">field</a>
<a id="RightStrongMonad.M"></a><a id="3206" href="Categories.Monad.Strong.html#3206" class="Field">M</a> <a id="3215" class="Symbol">:</a> <a id="3217" href="Categories.Monad.html#454" class="Record">Monad</a> <a id="3223" href="Categories.Monad.Strong.html#3133" class="Bound">C</a>
<a id="RightStrongMonad.rightStrength"></a><a id="3229" href="Categories.Monad.Strong.html#3229" class="Field">rightStrength</a> <a id="3243" class="Symbol">:</a> <a id="3245" href="Categories.Monad.Strong.html#2046" class="Record">RightStrength</a> <a id="3259" href="Categories.Monad.Strong.html#3154" class="Bound">V</a> <a id="3261" href="Categories.Monad.Strong.html#3206" class="Field">M</a>
<a id="3266" class="Keyword">module</a> <a id="RightStrongMonad.M"></a><a id="3273" href="Categories.Monad.Strong.html#3273" class="Module">M</a> <a id="3275" class="Symbol">=</a> <a id="3277" href="Categories.Monad.html#454" class="Module">Monad</a> <a id="3283" href="Categories.Monad.Strong.html#3206" class="Field">M</a>
<a id="3287" class="Keyword">open</a> <a id="3292" href="Categories.Monad.Strong.html#2046" class="Module">RightStrength</a> <a id="3306" href="Categories.Monad.Strong.html#3229" class="Field">rightStrength</a> <a id="3320" class="Keyword">public</a></pre></body></html>