mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
51 lines
19 KiB
HTML
51 lines
19 KiB
HTML
|
<!DOCTYPE HTML>
|
|||
|
<html><head><meta charset="utf-8"><title>Categories.Category</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="36" class="Keyword">module</a> <a id="43" href="Categories.Category.html" class="Module">Categories.Category</a> <a id="63" class="Keyword">where</a>
|
|||
|
|
|||
|
<a id="70" class="Keyword">open</a> <a id="75" class="Keyword">import</a> <a id="82" href="Level.html" class="Module">Level</a>
|
|||
|
|
|||
|
<a id="89" class="Comment">-- The main definitions are in:</a>
|
|||
|
<a id="121" class="Keyword">open</a> <a id="126" class="Keyword">import</a> <a id="133" href="Categories.Category.Core.html" class="Module">Categories.Category.Core</a> <a id="158" class="Keyword">public</a>
|
|||
|
|
|||
|
<a id="166" class="Keyword">private</a>
|
|||
|
<a id="176" class="Keyword">variable</a>
|
|||
|
<a id="189" href="Categories.Category.html#189" class="Generalizable">o</a> <a id="191" href="Categories.Category.html#191" class="Generalizable">ℓ</a> <a id="193" href="Categories.Category.html#193" class="Generalizable">e</a> <a id="195" class="Symbol">:</a> <a id="197" href="Agda.Primitive.html#591" class="Postulate">Level</a>
|
|||
|
|
|||
|
<a id="204" class="Comment">-- Convenience functions for working over multiple categories at once:</a>
|
|||
|
<a id="275" class="Comment">-- C [ x , y ] (for x y objects of C) - Hom_C(x , y)</a>
|
|||
|
<a id="328" class="Comment">-- C [ f ≈ g ] (for f g arrows of C) - that f and g are equivalent arrows</a>
|
|||
|
<a id="403" class="Comment">-- C [ f ∘ g ] (for f g composable arrows of C) - composition in C</a>
|
|||
|
<a id="470" class="Keyword">infix</a> <a id="476" class="Number">10</a> <a id="480" href="Categories.Category.html#502" class="Function Operator">_[_,_]</a> <a id="487" href="Categories.Category.html#609" class="Function Operator">_[_≈_]</a> <a id="494" href="Categories.Category.html#700" class="Function Operator">_[_∘_]</a>
|
|||
|
|
|||
|
<a id="_[_,_]"></a><a id="502" href="Categories.Category.html#502" class="Function Operator">_[_,_]</a> <a id="509" class="Symbol">:</a> <a id="511" class="Symbol">(</a><a id="512" href="Categories.Category.html#512" class="Bound">C</a> <a id="514" class="Symbol">:</a> <a id="516" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="525" href="Categories.Category.html#189" class="Generalizable">o</a> <a id="527" href="Categories.Category.html#191" class="Generalizable">ℓ</a> <a id="529" href="Categories.Category.html#193" class="Generalizable">e</a><a id="530" class="Symbol">)</a> <a id="532" class="Symbol">→</a> <a id="534" class="Symbol">(</a><a id="535" href="Categories.Category.html#535" class="Bound">X</a> <a id="537" class="Symbol">:</a> <a id="539" href="Categories.Category.Core.html#559" class="Field">Category.Obj</a> <a id="552" href="Categories.Category.html#512" class="Bound">C</a><a id="553" class="Symbol">)</a> <a id="555" class="Symbol">→</a> <a id="557" class="Symbol">(</a><a id="558" href="Categories.Category.html#558" class="Bound">Y</a> <a id="560" class="Symbol">:</a> <a id="562" href="Categories.Category.Core.html#559" class="Field">Category.Obj</a> <a id="575" href="Categories.Category.html#512" class="Bound">C</a><a id="576" class="Symbol">)</a> <a id="578" class="Symbol">→</a> <a id="580" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="584" href="Categories.Category.html#191" class="Generalizable">ℓ</a>
|
|||
|
<a id="586" href="Categories.Category.html#502" class="Function Operator">_[_,_]</a> <a id="593" class="Symbol">=</a> <a id="595" href="Categories.Category.Core.html#575" class="Field Operator">Category._⇒_</a>
|
|||
|
|
|||
|
<a id="_[_≈_]"></a><a id="609" href="Categories.Category.html#609" class="Function Operator">_[_≈_]</a> <a id="616" class="Symbol">:</a> <a id="618" class="Symbol">(</a><a id="619" href="Categories.Category.html#619" class="Bound">C</a> <a id="621" class="Symbol">:</a> <a id="623" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="632" href="Categories.Category.html#189" class="Generalizable">o</a> <a id="634" href="Categories.Category.html#191" class="Generalizable">ℓ</a> <a id="636" href="Categories.Category.html#193" class="Generalizable">e</a><a id="637" class="Symbol">)</a> <a id="639" class="Symbol">→</a> <a id="641" class="Symbol">∀</a> <a id="643" class="Symbol">{</a><a id="644" href="Categories.Category.html#644" class="Bound">X</a> <a id="646" href="Categories.Category.html#646" class="Bound">Y</a><a id="647" class="Symbol">}</a> <a id="649" class="Symbol">(</a><a id="650" href="Categories.Category.html#650" class="Bound">f</a> <a id="652" href="Categories.Category.html#652" class="Bound">g</a> <a id="654" class="Symbol">:</a> <a id="656" href="Categories.Category.html#619" class="Bound">C</a> <a id="658" href="Categories.Category.html#502" class="Function Operator">[</a> <a id="660" href="Categories.Category.html#644" class="Bound">X</a> <a id="662" href="Categories.Category.html#502" class="Function Operator">,</a> <a id="664" href="Categories.Category.html#646" class="Bound">Y</a> <a id="666" href="Categories.Category.html#502" class="Function Operator">]</a><a id="667" class="Symbol">)</a> <a id="669" class="Symbol">→</a> <a id="671" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="675" href="Categories.Category.html#193" class="Generalizable">e</a>
|
|||
|
<a id="677" href="Categories.Category.html#609" class="Function Operator">_[_≈_]</a> <a id="684" class="Symbol">=</a> <a id="686" href="Categories.Category.Core.html#595" class="Field Operator">Category._≈_</a>
|
|||
|
|
|||
|
<a id="_[_∘_]"></a><a id="700" href="Categories.Category.html#700" class="Function Operator">_[_∘_]</a> <a id="707" class="Symbol">:</a> <a id="709" class="Symbol">(</a><a id="710" href="Categories.Category.html#710" class="Bound">C</a> <a id="712" class="Symbol">:</a> <a id="714" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="723" href="Categories.Category.html#189" class="Generalizable">o</a> <a id="725" href="Categories.Category.html#191" class="Generalizable">ℓ</a> <a id="727" href="Categories.Category.html#193" class="Generalizable">e</a><a id="728" class="Symbol">)</a> <a id="730" class="Symbol">→</a> <a id="732" class="Symbol">∀</a> <a id="734" class="Symbol">{</a><a id="735" href="Categories.Category.html#735" class="Bound">X</a> <a id="737" href="Categories.Category.html#737" class="Bound">Y</a> <a id="739" href="Categories.Category.html#739" class="Bound">Z</a><a id="740" class="Symbol">}</a> <a id="742" class="Symbol">(</a><a id="743" href="Categories.Category.html#743" class="Bound">f</a> <a id="745" class="Symbol">:</a> <a id="747" href="Categories.Category.html#710" class="Bound">C</a> <a id="749" href="Categories.Category.html#502" class="Function Operator">[</a> <a id="751" href="Categories.Category.html#737" class="Bound">Y</a> <a id="753" href="Categories.Category.html#502" class="Function Operator">,</a> <a id="755" href="Categories.Category.html#739" class="Bound">Z</a> <a id="757" href="Categories.Category.html#502" class="Function Operator">]</a><a id="758" class="Symbol">)</a> <a id="760" class="Symbol">→</a> <a id="762" class="Symbol">(</a><a id="763" href="Categories.Category.html#763" class="Bound">g</a> <a id="765" class="Symbol">:</a> <a id="767" href="Categories.Category.html#710" class="Bound">C</a> <a id="769" href="Categories.Category.html#502" class="Function Operator">[</a> <a id="771" href="Categories.Category.html#735" class="Bound">X</a> <a id="773" href="Categories.Category.html#502" class="Function Operator">,</a> <a id="775" href="Categories.Category.html#737" class="Bound">Y</a> <a id="777" href="Categories.Category.html#502" class="Function Operator">]</a><a id="778" class="Symbol">)</a> <a id="780" class="Symbol">→</a> <a id="782" href="Categories.Category.html#710" class="Bound">C</a> <a id="784" href="Categories.Category.html#502" class="Function Operator">[</a> <a id="786" href="Categories.Category.html#735" class="Bound">X</a> <a id="788" href="Categories.Category.html#502" class="Function Operator">,</a> <a id="790" href="Categories.Category.html#739" class="Bound">Z</a> <a id="792" href="Categories.Category.html#502" class="Function Operator">]</a>
|
|||
|
<a id="794" href="Categories.Category.html#700" class="Function Operator">_[_∘_]</a> <a id="801" class="Symbol">=</a> <a id="803" href="Categories.Category.Core.html#656" class="Field Operator">Category._∘_</a>
|
|||
|
|
|||
|
<a id="817" class="Keyword">module</a> <a id="Definitions"></a><a id="824" href="Categories.Category.html#824" class="Module">Definitions</a> <a id="836" class="Symbol">(</a><a id="837" href="Categories.Category.html#837" class="Bound">𝓒</a> <a id="839" class="Symbol">:</a> <a id="841" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="850" href="Categories.Category.html#189" class="Generalizable">o</a> <a id="852" href="Categories.Category.html#191" class="Generalizable">ℓ</a> <a id="854" href="Categories.Category.html#193" class="Generalizable">e</a><a id="855" class="Symbol">)</a> <a id="857" class="Keyword">where</a>
|
|||
|
<a id="865" class="Keyword">open</a> <a id="870" href="Categories.Category.Core.html#442" class="Module">Category</a> <a id="879" href="Categories.Category.html#837" class="Bound">𝓒</a>
|
|||
|
|
|||
|
<a id="Definitions.CommutativeSquare"></a><a id="884" href="Categories.Category.html#884" class="Function">CommutativeSquare</a> <a id="902" class="Symbol">:</a> <a id="904" class="Symbol">{</a><a id="905" href="Categories.Category.html#905" class="Bound">A</a> <a id="907" href="Categories.Category.html#907" class="Bound">B</a> <a id="909" href="Categories.Category.html#909" class="Bound">C</a> <a id="911" href="Categories.Category.html#911" class="Bound">D</a> <a id="913" class="Symbol">:</a> <a id="915" href="Categories.Category.Core.html#559" class="Field">Obj</a><a id="918" class="Symbol">}</a> <a id="920" class="Symbol">→</a> <a id="922" class="Symbol">(</a><a id="923" href="Categories.Category.html#923" class="Bound">f</a> <a id="925" class="Symbol">:</a> <a id="927" href="Categories.Category.html#905" class="Bound">A</a> <a id="929" href="Categories.Category.Core.html#575" class="Field Operator">⇒</a> <a id="931" href="Categories.Category.html#907" class="Bound">B</a><a id="932" class="Symbol">)</a> <a id="934" class="Symbol">(</a><a id="935" href="Categories.Category.html#935" class="Bound">g</a> <a id="937" class="Symbol">:</a> <a id="939" href="Categories.Category.html#905" class="Bound">A</a> <a id="941" href="Categories.Category.Core.html#575" class="Field Operator">⇒</a> <a id="943" href="Categories.Category.html#909" class="Bound">C</a><a id="944" class="Symbol">)</a> <a id="946" class="Symbol">(</a><a id="947" href="Categories.Category.html#947" class="Bound">h</a> <a id="949" class="Symbol">:</a> <a id="951" href="Categories.Category.html#907" class="Bound">B</a> <a id="953" href="Categories.Category.Core.html#575" class="Field Operator">⇒</a> <a id="955" href="Categories.Category.html#911" class="Bound">D</a><a id="956" class="Symbol">)</a> <a id="958" class="Symbol">(</a><a id="959" href="Categories.Category.html#959" class="Bound">i</a> <a id="961" class="Symbol">:</a> <a id="963" href="Categories.Category.html#909" class="Bound">C</a> <a id="965" href="Categories.Category.Core.html#575" class="Field Operator">⇒</a> <a id="967" href="Categories.Category.html#911" class="Bound">D</a><a id="968" class="Symbol">)</a> <a id="970" class="Symbol">→</a> <a id="972" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="976" class="Symbol">_</a>
|
|||
|
<a id="980" href="Categories.Category.html#884" class="Function">CommutativeSquare</a> <a id="998" href="Categories.Category.html#998" class="Bound">f</a> <a id="1000" href="Categories.Category.html#1000" class="Bound">g</a> <a id="1002" href="Categories.Category.html#1002" class="Bound">h</a> <a id="1004" href="Categories.Category.html#1004" class="Bound">i</a> <a id="1006" class="Symbol">=</a> <a id="1008" href="Categories.Category.html#1002" class="Bound">h</a> <a id="1010" href="Categories.Category.Core.html#656" class="Field Operator">∘</a> <a id="1012" href="Categories.Category.html#998" class="Bound">f</a> <a id="1014" href="Categories.Category.Core.html#595" class="Field Operator">≈</a> <a id="1016" href="Categories.Category.html#1004" class="Bound">i</a> <a id="1018" href="Categories.Category.Core.html#656" class="Field Operator">∘</a> <a id="1020" href="Categories.Category.html#1000" class="Bound">g</a>
|
|||
|
|
|||
|
<a id="1023" class="Comment">-- Combinators for commutative diagram</a>
|
|||
|
<a id="1062" class="Comment">-- The idea is to use the combinators to write commutations in a more readable way.</a>
|
|||
|
<a id="1146" class="Comment">-- It starts with [_⇒_]⟨_≈_⟩, and within the third and fourth places, use _⇒⟨_⟩_ to</a>
|
|||
|
<a id="1230" class="Comment">-- connect morphisms with the intermediate object specified.</a>
|
|||
|
<a id="1291" class="Keyword">module</a> <a id="Commutation"></a><a id="1298" href="Categories.Category.html#1298" class="Module">Commutation</a> <a id="1310" class="Symbol">(</a><a id="1311" href="Categories.Category.html#1311" class="Bound">𝓒</a> <a id="1313" class="Symbol">:</a> <a id="1315" href="Categories.Category.Core.html#442" class="Record">Category</a> <a id="1324" href="Categories.Category.html#189" class="Generalizable">o</a> <a id="1326" href="Categories.Category.html#191" class="Generalizable">ℓ</a> <a id="1328" href="Categories.Category.html#193" class="Generalizable">e</a><a id="1329" class="Symbol">)</a> <a id="1331" class="Keyword">where</a>
|
|||
|
<a id="1339" class="Keyword">open</a> <a id="1344" href="Categories.Category.Core.html#442" class="Module">Category</a> <a id="1353" href="Categories.Category.html#1311" class="Bound">𝓒</a>
|
|||
|
|
|||
|
<a id="1358" class="Keyword">infix</a> <a id="1364" class="Number">1</a> <a id="1366" href="Categories.Category.html#1379" class="Function Operator">[_⇒_]⟨_≈_⟩</a>
|
|||
|
<a id="Commutation.[_⇒_]⟨_≈_⟩"></a><a id="1379" href="Categories.Category.html#1379" class="Function Operator">[_⇒_]⟨_≈_⟩</a> <a id="1390" class="Symbol">:</a> <a id="1392" class="Symbol">∀</a> <a id="1394" class="Symbol">(</a><a id="1395" href="Categories.Category.html#1395" class="Bound">A</a> <a id="1397" href="Categories.Category.html#1397" class="Bound">B</a> <a id="1399" class="Symbol">:</a> <a id="1401" href="Categories.Category.Core.html#559" class="Field">Obj</a><a id="1404" class="Symbol">)</a> <a id="1406" class="Symbol">→</a> <a id="1408" href="Categories.Category.html#1395" class="Bound">A</a> <a id="1410" href="Categories.Category.Core.html#575" class="Field Operator">⇒</a> <a id="1412" href="Categories.Category.html#1397" class="Bound">B</a> <a id="1414" class="Symbol">→</a> <a id="1416" href="Categories.Category.html#1395" class="Bound">A</a> <a id="1418" href="Categories.Category.Core.html#575" class="Field Operator">⇒</a> <a id="1420" href="Categories.Category.html#1397" class="Bound">B</a> <a id="1422" class="Symbol">→</a> <a id="1424" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1428" class="Symbol">_</a>
|
|||
|
<a id="1432" href="Categories.Category.html#1379" class="Function Operator">[</a> <a id="1434" href="Categories.Category.html#1434" class="Bound">A</a> <a id="1436" href="Categories.Category.html#1379" class="Function Operator">⇒</a> <a id="1438" href="Categories.Category.html#1438" class="Bound">B</a> <a id="1440" href="Categories.Category.html#1379" class="Function Operator">]⟨</a> <a id="1443" href="Categories.Category.html#1443" class="Bound">f</a> <a id="1445" href="Categories.Category.html#1379" class="Function Operator">≈</a> <a id="1447" href="Categories.Category.html#1447" class="Bound">g</a> <a id="1449" href="Categories.Category.html#1379" class="Function Operator">⟩</a> <a id="1451" class="Symbol">=</a> <a id="1453" href="Categories.Category.html#1443" class="Bound">f</a> <a id="1455" href="Categories.Category.Core.html#595" class="Field Operator">≈</a> <a id="1457" href="Categories.Category.html#1447" class="Bound">g</a>
|
|||
|
|
|||
|
<a id="1462" class="Keyword">infixl</a> <a id="1469" class="Number">2</a> <a id="1471" href="Categories.Category.html#1481" class="Function">connect</a>
|
|||
|
<a id="Commutation.connect"></a><a id="1481" href="Categories.Category.html#1481" class="Function">connect</a> <a id="1489" class="Symbol">:</a> <a id="1491" class="Symbol">∀</a> <a id="1493" class="Symbol">{</a><a id="1494" href="Categories.Category.html#1494" class="Bound">A</a> <a id="1496" href="Categories.Category.html#1496" class="Bound">C</a> <a id="1498" class="Symbol">:</a> <a id="1500" href="Categories.Category.Core.html#559" class="Field">Obj</a><a id="1503" class="Symbol">}</a> <a id="1505" class="Symbol">(</a><a id="1506" href="Categories.Category.html#1506" class="Bound">B</a> <a id="1508" class="Symbol">:</a> <a id="1510" href="Categories.Category.Core.html#559" class="Field">Obj</a><a id="1513" class="Symbol">)</a> <a id="1515" class="Symbol">→</a> <a id="1517" href="Categories.Category.html#1494" class="Bound">A</a> <a id="1519" href="Categories.Category.Core.html#575" class="Field Operator">⇒</a> <a id="1521" href="Categories.Category.html#1506" class="Bound">B</a> <a id="1523" class="Symbol">→</a> <a id="1525" href="Categories.Category.html#1506" class="Bound">B</a> <a id="1527" href="Categories.Category.Core.html#575" class="Field Operator">⇒</a> <a id="1529" href="Categories.Category.html#1496" class="Bound">C</a> <a id="1531" class="Symbol">→</a> <a id="1533" href="Categories.Category.html#1494" class="Bound">A</a> <a id="1535" href="Categories.Category.Core.html#575" class="Field Operator">⇒</a> <a id="1537" href="Categories.Category.html#1496" class="Bound">C</a>
|
|||
|
<a id="1541" href="Categories.Category.html#1481" class="Function">connect</a> <a id="1549" href="Categories.Category.html#1549" class="Bound">B</a> <a id="1551" href="Categories.Category.html#1551" class="Bound">f</a> <a id="1553" href="Categories.Category.html#1553" class="Bound">g</a> <a id="1555" class="Symbol">=</a> <a id="1557" href="Categories.Category.html#1553" class="Bound">g</a> <a id="1559" href="Categories.Category.Core.html#656" class="Field Operator">∘</a> <a id="1561" href="Categories.Category.html#1551" class="Bound">f</a>
|
|||
|
|
|||
|
<a id="1566" class="Keyword">syntax</a> <a id="1573" href="Categories.Category.html#1481" class="Function">connect</a> <a id="1581" class="Bound">B</a> <a id="1583" class="Bound">f</a> <a id="1585" class="Bound">g</a> <a id="1587" class="Symbol">=</a> <a id="1589" class="Bound">f</a> <a id="1591" class="Function">⇒⟨</a> <a id="1594" class="Bound">B</a> <a id="1596" class="Function">⟩</a> <a id="1598" class="Bound">g</a>
|
|||
|
</pre></body></html>
|