bsc-leon-vatthauer/public/Categories.Object.Kernel.html

62 lines
No EOL
21 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.Object.Kernel</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="Keyword">open</a> <a id="42" class="Keyword">import</a> <a id="49" href="Categories.Category.html" class="Module">Categories.Category</a>
<a id="69" class="Keyword">open</a> <a id="74" class="Keyword">import</a> <a id="81" href="Categories.Object.Zero.html" class="Module">Categories.Object.Zero</a>
<a id="105" class="Comment">-- Kernels of morphisms.</a>
<a id="130" class="Comment">-- https://ncatlab.org/nlab/show/kernel</a>
<a id="170" class="Keyword">module</a> <a id="177" href="Categories.Object.Kernel.html" class="Module">Categories.Object.Kernel</a> <a id="202" class="Symbol">{</a><a id="203" href="Categories.Object.Kernel.html#203" class="Bound">o</a> <a id="205" href="Categories.Object.Kernel.html#205" class="Bound"></a> <a id="207" href="Categories.Object.Kernel.html#207" class="Bound">e</a><a id="208" class="Symbol">}</a> <a id="210" class="Symbol">{</a><a id="211" href="Categories.Object.Kernel.html#211" class="Bound">𝒞</a> <a id="213" class="Symbol">:</a> <a id="215" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="224" href="Categories.Object.Kernel.html#203" class="Bound">o</a> <a id="226" href="Categories.Object.Kernel.html#205" class="Bound"></a> <a id="228" href="Categories.Object.Kernel.html#207" class="Bound">e</a><a id="229" class="Symbol">}</a> <a id="231" class="Symbol">(</a><a id="232" href="Categories.Object.Kernel.html#232" class="Bound">zero</a> <a id="237" class="Symbol">:</a> <a id="239" href="Categories.Object.Zero.html#940" class="Record">Zero</a> <a id="244" href="Categories.Object.Kernel.html#211" class="Bound">𝒞</a><a id="245" class="Symbol">)</a> <a id="247" class="Keyword">where</a>
<a id="254" class="Keyword">open</a> <a id="259" class="Keyword">import</a> <a id="266" href="Level.html" class="Module">Level</a> <a id="272" class="Keyword">using</a> <a id="278" class="Symbol">(</a><a id="279" href="Agda.Primitive.html#804" class="Primitive Operator">_⊔_</a><a id="282" class="Symbol">)</a>
<a id="285" class="Keyword">open</a> <a id="290" class="Keyword">import</a> <a id="297" href="Categories.Morphism.html" class="Module">Categories.Morphism</a> <a id="317" href="Categories.Object.Kernel.html#211" class="Bound">𝒞</a>
<a id="319" class="Keyword">open</a> <a id="324" class="Keyword">import</a> <a id="331" href="Categories.Morphism.Reasoning.html" class="Module">Categories.Morphism.Reasoning</a> <a id="361" href="Categories.Object.Kernel.html#211" class="Bound">𝒞</a>
<a id="365" class="Keyword">hiding</a> <a id="372" class="Symbol">(</a><a id="373" href="Categories.Morphism.Reasoning.Core.html#4290" class="Function">glue</a><a id="377" class="Symbol">)</a>
<a id="380" class="Keyword">open</a> <a id="385" href="Categories.Category.Core.html#442" class="Module">Category</a> <a id="394" href="Categories.Object.Kernel.html#211" class="Bound">𝒞</a>
<a id="396" class="Keyword">open</a> <a id="401" href="Categories.Object.Zero.html#940" class="Module">Zero</a> <a id="406" href="Categories.Object.Kernel.html#232" class="Bound">zero</a>
<a id="412" class="Keyword">open</a> <a id="417" href="Categories.Category.Core.html#2462" class="Module">HomReasoning</a>
<a id="431" class="Keyword">private</a>
<a id="441" class="Keyword">variable</a>
<a id="454" href="Categories.Object.Kernel.html#454" class="Generalizable">A</a> <a id="456" href="Categories.Object.Kernel.html#456" class="Generalizable">B</a> <a id="458" href="Categories.Object.Kernel.html#458" class="Generalizable">X</a> <a id="460" class="Symbol">:</a> <a id="462" href="Categories.Category.Core.html#559" class="Function">Obj</a>
<a id="470" href="Categories.Object.Kernel.html#470" class="Generalizable">f</a> <a id="472" href="Categories.Object.Kernel.html#472" class="Generalizable">h</a> <a id="474" href="Categories.Object.Kernel.html#474" class="Generalizable">i</a> <a id="476" href="Categories.Object.Kernel.html#476" class="Generalizable">j</a> <a id="478" href="Categories.Object.Kernel.html#478" class="Generalizable">k</a> <a id="480" class="Symbol">:</a> <a id="482" href="Categories.Object.Kernel.html#454" class="Generalizable">A</a> <a id="484" href="Categories.Category.Core.html#575" class="Function Operator"></a> <a id="486" href="Categories.Object.Kernel.html#456" class="Generalizable">B</a>
<a id="489" class="Comment">-- Note: We could define Kernels directly as equalizers or as pullbacks, but it seems somewhat</a>
<a id="584" class="Comment">-- cleaner to just define them &quot;as is&quot; to avoid mucking about with extra morphisms that can</a>
<a id="676" class="Comment">-- get in the way. For example, if we defined them as &#39;Pullback f !&#39; then our &#39;p₂&#39; projection</a>
<a id="770" class="Comment">-- would _always_ be trivially equal to &#39;¡ : K ⇒ zero&#39;.</a>
<a id="827" class="Keyword">record</a> <a id="IsKernel"></a><a id="834" href="Categories.Object.Kernel.html#834" class="Record">IsKernel</a> <a id="843" class="Symbol">{</a><a id="844" href="Categories.Object.Kernel.html#844" class="Bound">A</a> <a id="846" href="Categories.Object.Kernel.html#846" class="Bound">B</a> <a id="848" href="Categories.Object.Kernel.html#848" class="Bound">K</a><a id="849" class="Symbol">}</a> <a id="851" class="Symbol">(</a><a id="852" href="Categories.Object.Kernel.html#852" class="Bound">k</a> <a id="854" class="Symbol">:</a> <a id="856" href="Categories.Object.Kernel.html#848" class="Bound">K</a> <a id="858" href="Categories.Category.Core.html#575" class="Function Operator"></a> <a id="860" href="Categories.Object.Kernel.html#844" class="Bound">A</a><a id="861" class="Symbol">)</a> <a id="863" class="Symbol">(</a><a id="864" href="Categories.Object.Kernel.html#864" class="Bound">f</a> <a id="866" class="Symbol">:</a> <a id="868" href="Categories.Object.Kernel.html#844" class="Bound">A</a> <a id="870" href="Categories.Category.Core.html#575" class="Function Operator"></a> <a id="872" href="Categories.Object.Kernel.html#846" class="Bound">B</a><a id="873" class="Symbol">)</a> <a id="875" class="Symbol">:</a> <a id="877" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="881" class="Symbol">(</a><a id="882" href="Categories.Object.Kernel.html#203" class="Bound">o</a> <a id="884" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="886" href="Categories.Object.Kernel.html#205" class="Bound"></a> <a id="888" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="890" href="Categories.Object.Kernel.html#207" class="Bound">e</a><a id="891" class="Symbol">)</a> <a id="893" class="Keyword">where</a>
<a id="901" class="Keyword">field</a>
<a id="IsKernel.commute"></a><a id="911" href="Categories.Object.Kernel.html#911" class="Field">commute</a> <a id="919" class="Symbol">:</a> <a id="921" href="Categories.Object.Kernel.html#864" class="Bound">f</a> <a id="923" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="925" href="Categories.Object.Kernel.html#852" class="Bound">k</a> <a id="927" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="929" href="Categories.Object.Zero.html#674" class="Function">zero⇒</a>
<a id="IsKernel.universal"></a><a id="939" href="Categories.Object.Kernel.html#939" class="Field">universal</a> <a id="949" class="Symbol">:</a> <a id="951" class="Symbol"></a> <a id="953" class="Symbol">{</a><a id="954" href="Categories.Object.Kernel.html#954" class="Bound">X</a><a id="955" class="Symbol">}</a> <a id="957" class="Symbol">{</a><a id="958" href="Categories.Object.Kernel.html#958" class="Bound">h</a> <a id="960" class="Symbol">:</a> <a id="962" href="Categories.Object.Kernel.html#954" class="Bound">X</a> <a id="964" href="Categories.Category.Core.html#575" class="Function Operator"></a> <a id="966" href="Categories.Object.Kernel.html#844" class="Bound">A</a><a id="967" class="Symbol">}</a> <a id="969" class="Symbol"></a> <a id="971" href="Categories.Object.Kernel.html#864" class="Bound">f</a> <a id="973" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="975" href="Categories.Object.Kernel.html#958" class="Bound">h</a> <a id="977" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="979" href="Categories.Object.Zero.html#674" class="Function">zero⇒</a> <a id="985" class="Symbol"></a> <a id="987" href="Categories.Object.Kernel.html#954" class="Bound">X</a> <a id="989" href="Categories.Category.Core.html#575" class="Function Operator"></a> <a id="991" href="Categories.Object.Kernel.html#848" class="Bound">K</a>
<a id="IsKernel.factors"></a><a id="998" href="Categories.Object.Kernel.html#998" class="Field">factors</a> <a id="1006" class="Symbol">:</a> <a id="1008" class="Symbol"></a> <a id="1010" class="Symbol">{</a><a id="1011" href="Categories.Object.Kernel.html#1011" class="Bound">eq</a> <a id="1014" class="Symbol">:</a> <a id="1016" href="Categories.Object.Kernel.html#864" class="Bound">f</a> <a id="1018" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1020" href="Categories.Object.Kernel.html#472" class="Generalizable">h</a> <a id="1022" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1024" href="Categories.Object.Zero.html#674" class="Function">zero⇒</a><a id="1029" class="Symbol">}</a> <a id="1031" class="Symbol"></a> <a id="1033" href="Categories.Object.Kernel.html#472" class="Generalizable">h</a> <a id="1035" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1037" href="Categories.Object.Kernel.html#852" class="Bound">k</a> <a id="1039" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1041" href="Categories.Object.Kernel.html#939" class="Field">universal</a> <a id="1051" href="Categories.Object.Kernel.html#1011" class="Bound">eq</a>
<a id="IsKernel.unique"></a><a id="1058" href="Categories.Object.Kernel.html#1058" class="Field">unique</a> <a id="1065" class="Symbol">:</a> <a id="1067" class="Symbol"></a> <a id="1069" class="Symbol">{</a><a id="1070" href="Categories.Object.Kernel.html#1070" class="Bound">eq</a> <a id="1073" class="Symbol">:</a> <a id="1075" href="Categories.Object.Kernel.html#864" class="Bound">f</a> <a id="1077" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1079" href="Categories.Object.Kernel.html#472" class="Generalizable">h</a> <a id="1081" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1083" href="Categories.Object.Zero.html#674" class="Function">zero⇒</a><a id="1088" class="Symbol">}</a> <a id="1090" class="Symbol"></a> <a id="1092" href="Categories.Object.Kernel.html#472" class="Generalizable">h</a> <a id="1094" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1096" href="Categories.Object.Kernel.html#852" class="Bound">k</a> <a id="1098" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1100" href="Categories.Object.Kernel.html#474" class="Generalizable">i</a> <a id="1102" class="Symbol"></a> <a id="1104" href="Categories.Object.Kernel.html#474" class="Generalizable">i</a> <a id="1106" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1108" href="Categories.Object.Kernel.html#939" class="Field">universal</a> <a id="1118" href="Categories.Object.Kernel.html#1070" class="Bound">eq</a>
<a id="IsKernel.universal-resp-≈"></a><a id="1124" href="Categories.Object.Kernel.html#1124" class="Function">universal-resp-≈</a> <a id="1141" class="Symbol">:</a> <a id="1143" class="Symbol"></a> <a id="1145" class="Symbol">{</a><a id="1146" href="Categories.Object.Kernel.html#1146" class="Bound">eq</a> <a id="1149" class="Symbol">:</a> <a id="1151" href="Categories.Object.Kernel.html#864" class="Bound">f</a> <a id="1153" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1155" href="Categories.Object.Kernel.html#472" class="Generalizable">h</a> <a id="1157" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1159" href="Categories.Object.Zero.html#674" class="Function">zero⇒</a><a id="1164" class="Symbol">}</a> <a id="1166" class="Symbol">{</a><a id="1167" href="Categories.Object.Kernel.html#1167" class="Bound">eq</a> <a id="1171" class="Symbol">:</a> <a id="1173" href="Categories.Object.Kernel.html#864" class="Bound">f</a> <a id="1175" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1177" href="Categories.Object.Kernel.html#474" class="Generalizable">i</a> <a id="1179" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1181" href="Categories.Object.Zero.html#674" class="Function">zero⇒</a><a id="1186" class="Symbol">}</a> <a id="1188" class="Symbol"></a>
<a id="1194" href="Categories.Object.Kernel.html#472" class="Generalizable">h</a> <a id="1196" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1198" href="Categories.Object.Kernel.html#474" class="Generalizable">i</a> <a id="1200" class="Symbol"></a> <a id="1202" href="Categories.Object.Kernel.html#939" class="Field">universal</a> <a id="1212" href="Categories.Object.Kernel.html#1146" class="Bound">eq</a> <a id="1215" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1217" href="Categories.Object.Kernel.html#939" class="Field">universal</a> <a id="1227" href="Categories.Object.Kernel.html#1167" class="Bound">eq</a>
<a id="1233" href="Categories.Object.Kernel.html#1124" class="Function">universal-resp-≈</a> <a id="1250" href="Categories.Object.Kernel.html#1250" class="Bound">h≈i</a> <a id="1254" class="Symbol">=</a> <a id="1256" href="Categories.Object.Kernel.html#1058" class="Field">unique</a> <a id="1263" class="Symbol">(</a><a id="1264" href="Categories.Category.Core.html#3005" class="Function"></a> <a id="1266" href="Categories.Object.Kernel.html#1250" class="Bound">h≈i</a> <a id="1270" href="Categories.Category.Core.html#3061" class="Function Operator"></a> <a id="1272" href="Categories.Object.Kernel.html#998" class="Field">factors</a><a id="1279" class="Symbol">)</a>
<a id="IsKernel.universal-∘"></a><a id="1284" href="Categories.Object.Kernel.html#1284" class="Function">universal-∘</a> <a id="1296" class="Symbol">:</a> <a id="1298" href="Categories.Object.Kernel.html#864" class="Bound">f</a> <a id="1300" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1302" href="Categories.Object.Kernel.html#852" class="Bound">k</a> <a id="1304" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1306" href="Categories.Object.Kernel.html#472" class="Generalizable">h</a> <a id="1308" href="Categories.Category.Core.html#595" class="Function Operator"></a> <a id="1310" href="Categories.Object.Zero.html#674" class="Function">zero⇒</a>
<a id="1319" href="Categories.Object.Kernel.html#1284" class="Function">universal-∘</a> <a id="1331" class="Symbol">{</a><a id="1332" class="Argument">h</a> <a id="1334" class="Symbol">=</a> <a id="1336" href="Categories.Object.Kernel.html#1336" class="Bound">h</a><a id="1337" class="Symbol">}</a> <a id="1339" class="Symbol">=</a> <a id="1341" href="Relation.Binary.Reasoning.Base.Single.html#1925" class="Function Operator">begin</a>
<a id="1351" href="Categories.Object.Kernel.html#864" class="Bound">f</a> <a id="1353" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1355" href="Categories.Object.Kernel.html#852" class="Bound">k</a> <a id="1357" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1359" href="Categories.Object.Kernel.html#1336" class="Bound">h</a> <a id="1361" href="Relation.Binary.Reasoning.Setoid.html#1061" class="Function">≈⟨</a> <a id="1364" href="Categories.Morphism.Reasoning.Core.html#2048" class="Function">pullˡ</a> <a id="1370" href="Categories.Object.Kernel.html#911" class="Field">commute</a> <a id="1378" href="Relation.Binary.Reasoning.Setoid.html#1061" class="Function"></a>
<a id="1384" href="Categories.Object.Zero.html#674" class="Function">zero⇒</a> <a id="1390" href="Categories.Category.Core.html#656" class="Function Operator"></a> <a id="1392" href="Categories.Object.Kernel.html#1336" class="Bound">h</a> <a id="1394" href="Relation.Binary.Reasoning.Setoid.html#1061" class="Function">≈⟨</a> <a id="1397" href="Categories.Object.Zero.html#827" class="Function">zero-∘ʳ</a> <a id="1405" href="Categories.Object.Kernel.html#1336" class="Bound">h</a> <a id="1407" href="Relation.Binary.Reasoning.Setoid.html#1061" class="Function"></a>
<a id="1413" href="Categories.Object.Zero.html#674" class="Function">zero⇒</a> <a id="1419" href="Relation.Binary.Reasoning.Base.Single.html#2564" class="Function Operator"></a>
<a id="1422" class="Keyword">record</a> <a id="Kernel"></a><a id="1429" href="Categories.Object.Kernel.html#1429" class="Record">Kernel</a> <a id="1436" class="Symbol">{</a><a id="1437" href="Categories.Object.Kernel.html#1437" class="Bound">A</a> <a id="1439" href="Categories.Object.Kernel.html#1439" class="Bound">B</a><a id="1440" class="Symbol">}</a> <a id="1442" class="Symbol">(</a><a id="1443" href="Categories.Object.Kernel.html#1443" class="Bound">f</a> <a id="1445" class="Symbol">:</a> <a id="1447" href="Categories.Object.Kernel.html#1437" class="Bound">A</a> <a id="1449" href="Categories.Category.Core.html#575" class="Function Operator"></a> <a id="1451" href="Categories.Object.Kernel.html#1439" class="Bound">B</a><a id="1452" class="Symbol">)</a> <a id="1454" class="Symbol">:</a> <a id="1456" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1460" class="Symbol">(</a><a id="1461" href="Categories.Object.Kernel.html#203" class="Bound">o</a> <a id="1463" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1465" href="Categories.Object.Kernel.html#205" class="Bound"></a> <a id="1467" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1469" href="Categories.Object.Kernel.html#207" class="Bound">e</a><a id="1470" class="Symbol">)</a> <a id="1472" class="Keyword">where</a>
<a id="1480" class="Keyword">field</a>
<a id="1491" class="Symbol">{</a><a id="Kernel.kernel"></a><a id="1492" href="Categories.Object.Kernel.html#1492" class="Field">kernel</a><a id="1498" class="Symbol">}</a> <a id="1500" class="Symbol">:</a> <a id="1502" href="Categories.Category.Core.html#559" class="Function">Obj</a>
<a id="Kernel.kernel⇒"></a><a id="1511" href="Categories.Object.Kernel.html#1511" class="Field">kernel⇒</a> <a id="1519" class="Symbol">:</a> <a id="1521" href="Categories.Object.Kernel.html#1492" class="Field">kernel</a> <a id="1528" href="Categories.Category.Core.html#575" class="Function Operator"></a> <a id="1530" href="Categories.Object.Kernel.html#1437" class="Bound">A</a>
<a id="Kernel.isKernel"></a><a id="1537" href="Categories.Object.Kernel.html#1537" class="Field">isKernel</a> <a id="1546" class="Symbol">:</a> <a id="1548" href="Categories.Object.Kernel.html#834" class="Record">IsKernel</a> <a id="1557" href="Categories.Object.Kernel.html#1511" class="Field">kernel⇒</a> <a id="1565" href="Categories.Object.Kernel.html#1443" class="Bound">f</a>
<a id="1570" class="Keyword">open</a> <a id="1575" href="Categories.Object.Kernel.html#834" class="Module">IsKernel</a> <a id="1584" href="Categories.Object.Kernel.html#1537" class="Field">isKernel</a> <a id="1593" class="Keyword">public</a>
<a id="IsKernel⇒Kernel"></a><a id="1601" href="Categories.Object.Kernel.html#1601" class="Function">IsKernel⇒Kernel</a> <a id="1617" class="Symbol">:</a> <a id="1619" href="Categories.Object.Kernel.html#834" class="Record">IsKernel</a> <a id="1628" href="Categories.Object.Kernel.html#478" class="Generalizable">k</a> <a id="1630" href="Categories.Object.Kernel.html#470" class="Generalizable">f</a> <a id="1632" class="Symbol"></a> <a id="1634" href="Categories.Object.Kernel.html#1429" class="Record">Kernel</a> <a id="1641" href="Categories.Object.Kernel.html#470" class="Generalizable">f</a>
<a id="1643" href="Categories.Object.Kernel.html#1601" class="Function">IsKernel⇒Kernel</a> <a id="1659" class="Symbol">{</a><a id="1660" class="Argument">k</a> <a id="1662" class="Symbol">=</a> <a id="1664" href="Categories.Object.Kernel.html#1664" class="Bound">k</a><a id="1665" class="Symbol">}</a> <a id="1667" href="Categories.Object.Kernel.html#1667" class="Bound">isKernel</a> <a id="1676" class="Symbol">=</a> <a id="1678" class="Keyword">record</a>
<a id="1687" class="Symbol">{</a> <a id="1689" href="Categories.Object.Kernel.html#1511" class="Field">kernel⇒</a> <a id="1697" class="Symbol">=</a> <a id="1699" href="Categories.Object.Kernel.html#1664" class="Bound">k</a>
<a id="1703" class="Symbol">;</a> <a id="1705" href="Categories.Object.Kernel.html#1537" class="Field">isKernel</a> <a id="1714" class="Symbol">=</a> <a id="1716" href="Categories.Object.Kernel.html#1667" class="Bound">isKernel</a>
<a id="1727" class="Symbol">}</a>
</pre></body></html>