bsc-leon-vatthauer/public/Category.Functor.html

48 lines
12 KiB
HTML
Raw Normal View History

2023-08-19 16:11:22 +02:00
<!DOCTYPE HTML>
<html><head><meta charset="utf-8"><title>Category.Functor</title><link rel="stylesheet" href="Agda.css"></head><body><pre class="Agda"><a id="1" class="Comment">------------------------------------------------------------------------</a>
<a id="74" class="Comment">-- The Agda standard library</a>
<a id="103" class="Comment">--</a>
<a id="106" class="Comment">-- Functors</a>
<a id="118" class="Comment">------------------------------------------------------------------------</a>
<a id="192" class="Comment">-- Note that currently the functor laws are not included here.</a>
<a id="256" class="Symbol">{-#</a> <a id="260" class="Keyword">OPTIONS</a> <a id="268" class="Pragma">--cubical-compatible</a> <a id="289" class="Pragma">--safe</a> <a id="296" class="Symbol">#-}</a>
<a id="301" class="Keyword">module</a> <a id="308" href="Category.Functor.html" class="Module">Category.Functor</a> <a id="325" class="Keyword">where</a>
<a id="332" class="Keyword">open</a> <a id="337" class="Keyword">import</a> <a id="344" href="Function.html" class="Module">Function</a> <a id="353" class="Keyword">hiding</a> <a id="360" class="Symbol">(</a><a id="361" href="Function.Core.html#655" class="Function">Morphism</a><a id="369" class="Symbol">)</a>
<a id="371" class="Keyword">open</a> <a id="376" class="Keyword">import</a> <a id="383" href="Level.html" class="Module">Level</a>
<a id="390" class="Keyword">open</a> <a id="395" class="Keyword">import</a> <a id="402" href="Relation.Binary.PropositionalEquality.html" class="Module">Relation.Binary.PropositionalEquality</a>
<a id="441" class="Keyword">private</a>
<a id="451" class="Keyword">variable</a>
<a id="464" href="Category.Functor.html#464" class="Generalizable"></a> <a id="466" href="Category.Functor.html#466" class="Generalizable"></a> <a id="469" href="Category.Functor.html#469" class="Generalizable">ℓ″</a> <a id="472" class="Symbol">:</a> <a id="474" href="Agda.Primitive.html#591" class="Postulate">Level</a>
<a id="484" href="Category.Functor.html#484" class="Generalizable">A</a> <a id="486" href="Category.Functor.html#486" class="Generalizable">B</a> <a id="488" href="Category.Functor.html#488" class="Generalizable">X</a> <a id="490" href="Category.Functor.html#490" class="Generalizable">Y</a> <a id="492" class="Symbol">:</a> <a id="494" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="498" href="Category.Functor.html#464" class="Generalizable"></a>
<a id="501" class="Keyword">record</a> <a id="RawFunctor"></a><a id="508" href="Category.Functor.html#508" class="Record">RawFunctor</a> <a id="519" class="Symbol">(</a><a id="520" href="Category.Functor.html#520" class="Bound">F</a> <a id="522" class="Symbol">:</a> <a id="524" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="528" href="Category.Functor.html#464" class="Generalizable"></a> <a id="530" class="Symbol"></a> <a id="532" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="536" href="Category.Functor.html#466" class="Generalizable"></a><a id="538" class="Symbol">)</a> <a id="540" class="Symbol">:</a> <a id="542" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="546" class="Symbol">(</a><a id="547" href="Agda.Primitive.html#774" class="Primitive">suc</a> <a id="551" href="Category.Functor.html#528" class="Bound"></a> <a id="553" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="555" href="Category.Functor.html#536" class="Bound"></a><a id="557" class="Symbol">)</a> <a id="559" class="Keyword">where</a>
<a id="567" class="Keyword">infixl</a> <a id="574" class="Number">4</a> <a id="576" href="Category.Functor.html#617" class="Field Operator">_&lt;$&gt;_</a> <a id="582" href="Category.Functor.html#648" class="Function Operator">_&lt;$_</a>
<a id="589" class="Keyword">infixl</a> <a id="596" class="Number">1</a> <a id="598" href="Category.Functor.html#697" class="Function Operator">_&lt;&amp;&gt;_</a>
<a id="607" class="Keyword">field</a>
<a id="RawFunctor._&lt;$&gt;_"></a><a id="617" href="Category.Functor.html#617" class="Field Operator">_&lt;$&gt;_</a> <a id="623" class="Symbol">:</a> <a id="625" class="Symbol">(</a><a id="626" href="Category.Functor.html#484" class="Generalizable">A</a> <a id="628" class="Symbol"></a> <a id="630" href="Category.Functor.html#486" class="Generalizable">B</a><a id="631" class="Symbol">)</a> <a id="633" class="Symbol"></a> <a id="635" href="Category.Functor.html#520" class="Bound">F</a> <a id="637" href="Category.Functor.html#484" class="Generalizable">A</a> <a id="639" class="Symbol"></a> <a id="641" href="Category.Functor.html#520" class="Bound">F</a> <a id="643" href="Category.Functor.html#486" class="Generalizable">B</a>
<a id="RawFunctor._&lt;$_"></a><a id="648" href="Category.Functor.html#648" class="Function Operator">_&lt;$_</a> <a id="653" class="Symbol">:</a> <a id="655" href="Category.Functor.html#484" class="Generalizable">A</a> <a id="657" class="Symbol"></a> <a id="659" href="Category.Functor.html#520" class="Bound">F</a> <a id="661" href="Category.Functor.html#486" class="Generalizable">B</a> <a id="663" class="Symbol"></a> <a id="665" href="Category.Functor.html#520" class="Bound">F</a> <a id="667" href="Category.Functor.html#484" class="Generalizable">A</a>
<a id="671" href="Category.Functor.html#671" class="Bound">x</a> <a id="673" href="Category.Functor.html#648" class="Function Operator">&lt;$</a> <a id="676" href="Category.Functor.html#676" class="Bound">y</a> <a id="678" class="Symbol">=</a> <a id="680" href="Function.Base.html#645" class="Function">const</a> <a id="686" href="Category.Functor.html#671" class="Bound">x</a> <a id="688" href="Category.Functor.html#617" class="Field Operator">&lt;$&gt;</a> <a id="692" href="Category.Functor.html#676" class="Bound">y</a>
<a id="RawFunctor._&lt;&amp;&gt;_"></a><a id="697" href="Category.Functor.html#697" class="Function Operator">_&lt;&amp;&gt;_</a> <a id="703" class="Symbol">:</a> <a id="705" href="Category.Functor.html#520" class="Bound">F</a> <a id="707" href="Category.Functor.html#484" class="Generalizable">A</a> <a id="709" class="Symbol"></a> <a id="711" class="Symbol">(</a><a id="712" href="Category.Functor.html#484" class="Generalizable">A</a> <a id="714" class="Symbol"></a> <a id="716" href="Category.Functor.html#486" class="Generalizable">B</a><a id="717" class="Symbol">)</a> <a id="719" class="Symbol"></a> <a id="721" href="Category.Functor.html#520" class="Bound">F</a> <a id="723" href="Category.Functor.html#486" class="Generalizable">B</a>
<a id="727" href="Category.Functor.html#697" class="Function Operator">_&lt;&amp;&gt;_</a> <a id="733" class="Symbol">=</a> <a id="735" href="Function.Base.html#1563" class="Function">flip</a> <a id="740" href="Category.Functor.html#617" class="Field Operator">_&lt;$&gt;_</a>
<a id="747" class="Comment">-- A functor morphism from F₁ to F₂ is an operation op such that</a>
<a id="812" class="Comment">-- op (F₁ f x) ≡ F₂ f (op x)</a>
<a id="842" class="Keyword">record</a> <a id="Morphism"></a><a id="849" href="Category.Functor.html#849" class="Record">Morphism</a> <a id="858" class="Symbol">{</a><a id="859" href="Category.Functor.html#859" class="Bound">F₁</a> <a id="862" class="Symbol">:</a> <a id="864" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="868" href="Category.Functor.html#464" class="Generalizable"></a> <a id="870" class="Symbol"></a> <a id="872" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="876" href="Category.Functor.html#466" class="Generalizable"></a><a id="878" class="Symbol">}</a> <a id="880" class="Symbol">{</a><a id="881" href="Category.Functor.html#881" class="Bound">F₂</a> <a id="884" class="Symbol">:</a> <a id="886" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="890" href="Category.Functor.html#464" class="Generalizable"></a> <a id="892" class="Symbol"></a> <a id="894" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="898" href="Category.Functor.html#469" class="Generalizable">ℓ″</a><a id="900" class="Symbol">}</a>
<a id="918" class="Symbol">(</a><a id="919" href="Category.Functor.html#919" class="Bound">fun₁</a> <a id="924" class="Symbol">:</a> <a id="926" href="Category.Functor.html#508" class="Record">RawFunctor</a> <a id="937" href="Category.Functor.html#859" class="Bound">F₁</a><a id="939" class="Symbol">)</a>
<a id="957" class="Symbol">(</a><a id="958" href="Category.Functor.html#958" class="Bound">fun₂</a> <a id="963" class="Symbol">:</a> <a id="965" href="Category.Functor.html#508" class="Record">RawFunctor</a> <a id="976" href="Category.Functor.html#881" class="Bound">F₂</a><a id="978" class="Symbol">)</a> <a id="980" class="Symbol">:</a> <a id="982" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="986" class="Symbol">(</a><a id="987" href="Agda.Primitive.html#774" class="Primitive">suc</a> <a id="991" href="Category.Functor.html#868" class="Bound"></a> <a id="993" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="995" href="Category.Functor.html#876" class="Bound"></a> <a id="998" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1000" href="Category.Functor.html#898" class="Bound">ℓ″</a><a id="1002" class="Symbol">)</a> <a id="1004" class="Keyword">where</a>
<a id="1012" class="Keyword">open</a> <a id="1017" href="Category.Functor.html#508" class="Module">RawFunctor</a>
<a id="1030" class="Keyword">field</a>
<a id="Morphism.op"></a><a id="1040" href="Category.Functor.html#1040" class="Field">op</a> <a id="1047" class="Symbol">:</a> <a id="1049" href="Category.Functor.html#859" class="Bound">F₁</a> <a id="1052" href="Category.Functor.html#488" class="Generalizable">X</a> <a id="1054" class="Symbol"></a> <a id="1056" href="Category.Functor.html#881" class="Bound">F₂</a> <a id="1059" href="Category.Functor.html#488" class="Generalizable">X</a>
<a id="Morphism.op-&lt;$&gt;"></a><a id="1065" href="Category.Functor.html#1065" class="Field">op-&lt;$&gt;</a> <a id="1072" class="Symbol">:</a> <a id="1074" class="Symbol">(</a><a id="1075" href="Category.Functor.html#1075" class="Bound">f</a> <a id="1077" class="Symbol">:</a> <a id="1079" href="Category.Functor.html#488" class="Generalizable">X</a> <a id="1081" class="Symbol"></a> <a id="1083" href="Category.Functor.html#490" class="Generalizable">Y</a><a id="1084" class="Symbol">)</a> <a id="1086" class="Symbol">(</a><a id="1087" href="Category.Functor.html#1087" class="Bound">x</a> <a id="1089" class="Symbol">:</a> <a id="1091" href="Category.Functor.html#859" class="Bound">F₁</a> <a id="1094" href="Category.Functor.html#488" class="Generalizable">X</a><a id="1095" class="Symbol">)</a> <a id="1097" class="Symbol"></a>
<a id="1112" href="Category.Functor.html#1040" class="Field">op</a> <a id="1115" class="Symbol">(</a><a id="1116" href="Category.Functor.html#919" class="Bound">fun₁</a> <a id="1121" class="Symbol">.</a><a id="1122" href="Category.Functor.html#617" class="Field Operator">_&lt;$&gt;_</a> <a id="1128" href="Category.Functor.html#1075" class="Bound">f</a> <a id="1130" href="Category.Functor.html#1087" class="Bound">x</a><a id="1131" class="Symbol">)</a> <a id="1133" href="Agda.Builtin.Equality.html#133" class="Datatype Operator"></a> <a id="1135" href="Category.Functor.html#958" class="Bound">fun₂</a> <a id="1140" class="Symbol">.</a><a id="1141" href="Category.Functor.html#617" class="Field Operator">_&lt;$&gt;_</a> <a id="1147" href="Category.Functor.html#1075" class="Bound">f</a> <a id="1149" class="Symbol">(</a><a id="1150" href="Category.Functor.html#1040" class="Field">op</a> <a id="1153" href="Category.Functor.html#1087" class="Bound">x</a><a id="1154" class="Symbol">)</a>
</pre></body></html>