bsc-leon-vatthauer/public/Function.Inverse.html

196 lines
No EOL
60 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>Function.Inverse</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">-- Inverses</a>
<a id="118" class="Comment">------------------------------------------------------------------------</a>
<a id="192" class="Symbol">{-#</a> <a id="196" class="Keyword">OPTIONS</a> <a id="204" class="Pragma">--cubical-compatible</a> <a id="225" class="Pragma">--safe</a> <a id="232" class="Symbol">#-}</a>
<a id="237" class="Comment">-- Note: use of the standard function hierarchy is encouraged. The</a>
<a id="304" class="Comment">-- module `Function` re-exports `Inverseᵇ`, `IsInverse` and</a>
<a id="364" class="Comment">-- `Inverse`. The alternative definitions found in this file will</a>
<a id="430" class="Comment">-- eventually be deprecated.</a>
<a id="460" class="Keyword">module</a> <a id="467" href="Function.Inverse.html" class="Module">Function.Inverse</a> <a id="484" class="Keyword">where</a>
<a id="491" class="Keyword">open</a> <a id="496" class="Keyword">import</a> <a id="503" href="Level.html" class="Module">Level</a>
<a id="509" class="Keyword">open</a> <a id="514" class="Keyword">import</a> <a id="521" href="Function.Base.html" class="Module">Function.Base</a> <a id="535" class="Keyword">using</a> <a id="541" class="Symbol">(</a><a id="542" href="Function.Base.html#1563" class="Function">flip</a><a id="546" class="Symbol">)</a>
<a id="548" class="Keyword">open</a> <a id="553" class="Keyword">import</a> <a id="560" href="Function.Bijection.html" class="Module">Function.Bijection</a> <a id="579" class="Keyword">hiding</a> <a id="586" class="Symbol">(</a><a id="587" href="Function.Bijection.html#3211" class="Function">id</a><a id="589" class="Symbol">;</a> <a id="591" href="Function.Bijection.html#3468" class="Function Operator">_∘_</a><a id="594" class="Symbol">;</a> <a id="596" href="Function.Bijection.html#2565" class="Function">bijection</a><a id="605" class="Symbol">)</a>
<a id="607" class="Keyword">open</a> <a id="612" class="Keyword">import</a> <a id="619" href="Function.Equality.html" class="Module">Function.Equality</a> <a id="637" class="Symbol">as</a> <a id="640" class="Module">F</a>
<a id="644" class="Keyword">using</a> <a id="650" class="Symbol">(</a><a id="651" href="Function.Equality.html#1227" class="Function Operator">_⟶_</a><a id="654" class="Symbol">)</a> <a id="656" class="Keyword">renaming</a> <a id="665" class="Symbol">(</a><a id="666" href="Function.Equality.html#1540" class="Function Operator">_∘_</a> <a id="670" class="Symbol">to</a> <a id="673" class="Function Operator">_⟪∘⟫_</a><a id="678" class="Symbol">)</a>
<a id="680" class="Keyword">open</a> <a id="685" class="Keyword">import</a> <a id="692" href="Function.LeftInverse.html" class="Module">Function.LeftInverse</a> <a id="713" class="Symbol">as</a> <a id="716" class="Module">Left</a> <a id="721" class="Keyword">hiding</a> <a id="728" class="Symbol">(</a><a id="729" href="Function.LeftInverse.html#3422" class="Function">id</a><a id="731" class="Symbol">;</a> <a id="733" href="Function.LeftInverse.html#3611" class="Function Operator">_∘_</a><a id="736" class="Symbol">)</a>
<a id="738" class="Keyword">open</a> <a id="743" class="Keyword">import</a> <a id="750" href="Relation.Binary.html" class="Module">Relation.Binary</a>
<a id="766" class="Keyword">open</a> <a id="771" class="Keyword">import</a> <a id="778" href="Relation.Binary.PropositionalEquality.html" class="Module">Relation.Binary.PropositionalEquality</a> <a id="816" class="Symbol">as</a> <a id="819" class="Module">P</a> <a id="821" class="Keyword">using</a> <a id="827" class="Symbol">(</a><a id="828" href="Relation.Binary.PropositionalEquality.html#1480" class="Function Operator">_≗_</a><a id="831" class="Symbol">;</a> <a id="833" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">_≡_</a><a id="836" class="Symbol">)</a>
<a id="838" class="Keyword">open</a> <a id="843" class="Keyword">import</a> <a id="850" href="Relation.Unary.html" class="Module">Relation.Unary</a> <a id="865" class="Keyword">using</a> <a id="871" class="Symbol">(</a><a id="872" href="Relation.Unary.html#1110" class="Function">Pred</a><a id="876" class="Symbol">)</a>
<a id="879" class="Comment">------------------------------------------------------------------------</a>
<a id="952" class="Comment">-- Inverses</a>
<a id="965" class="Keyword">record</a> <a id="_InverseOf_"></a><a id="972" href="Function.Inverse.html#972" class="Record Operator">_InverseOf_</a> <a id="984" class="Symbol">{</a><a id="985" href="Function.Inverse.html#985" class="Bound">f₁</a> <a id="988" href="Function.Inverse.html#988" class="Bound">f₂</a> <a id="991" href="Function.Inverse.html#991" class="Bound">t₁</a> <a id="994" href="Function.Inverse.html#994" class="Bound">t₂</a><a id="996" class="Symbol">}</a>
<a id="1017" class="Symbol">{</a><a id="1018" href="Function.Inverse.html#1018" class="Bound">From</a> <a id="1023" class="Symbol">:</a> <a id="1025" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1032" href="Function.Inverse.html#985" class="Bound">f₁</a> <a id="1035" href="Function.Inverse.html#988" class="Bound">f₂</a><a id="1037" class="Symbol">}</a> <a id="1039" class="Symbol">{</a><a id="1040" href="Function.Inverse.html#1040" class="Bound">To</a> <a id="1043" class="Symbol">:</a> <a id="1045" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1052" href="Function.Inverse.html#991" class="Bound">t₁</a> <a id="1055" href="Function.Inverse.html#994" class="Bound">t₂</a><a id="1057" class="Symbol">}</a>
<a id="1078" class="Symbol">(</a><a id="1079" href="Function.Inverse.html#1079" class="Bound">from</a> <a id="1084" class="Symbol">:</a> <a id="1086" href="Function.Inverse.html#1040" class="Bound">To</a> <a id="1089" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1091" href="Function.Inverse.html#1018" class="Bound">From</a><a id="1095" class="Symbol">)</a> <a id="1097" class="Symbol">(</a><a id="1098" href="Function.Inverse.html#1098" class="Bound">to</a> <a id="1101" class="Symbol">:</a> <a id="1103" href="Function.Inverse.html#1018" class="Bound">From</a> <a id="1108" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1110" href="Function.Inverse.html#1040" class="Bound">To</a><a id="1112" class="Symbol">)</a> <a id="1114" class="Symbol">:</a>
<a id="1135" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1139" class="Symbol">(</a><a id="1140" href="Function.Inverse.html#985" class="Bound">f₁</a> <a id="1143" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1145" href="Function.Inverse.html#988" class="Bound">f₂</a> <a id="1148" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1150" href="Function.Inverse.html#991" class="Bound">t₁</a> <a id="1153" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1155" href="Function.Inverse.html#994" class="Bound">t₂</a><a id="1157" class="Symbol">)</a> <a id="1159" class="Keyword">where</a>
<a id="1167" class="Keyword">field</a>
<a id="_InverseOf_.left-inverse-of"></a><a id="1177" href="Function.Inverse.html#1177" class="Field">left-inverse-of</a> <a id="1194" class="Symbol">:</a> <a id="1196" href="Function.Inverse.html#1079" class="Bound">from</a> <a id="1201" href="Function.LeftInverse.html#998" class="Function Operator">LeftInverseOf</a> <a id="1216" href="Function.Inverse.html#1098" class="Bound">to</a>
<a id="_InverseOf_.right-inverse-of"></a><a id="1223" href="Function.Inverse.html#1223" class="Field">right-inverse-of</a> <a id="1240" class="Symbol">:</a> <a id="1242" href="Function.Inverse.html#1079" class="Bound">from</a> <a id="1247" href="Function.LeftInverse.html#1198" class="Function Operator">RightInverseOf</a> <a id="1262" href="Function.Inverse.html#1098" class="Bound">to</a>
<a id="1266" class="Comment">------------------------------------------------------------------------</a>
<a id="1339" class="Comment">-- The set of all inverses between two setoids</a>
<a id="1387" class="Keyword">record</a> <a id="Inverse"></a><a id="1394" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="1402" class="Symbol">{</a><a id="1403" href="Function.Inverse.html#1403" class="Bound">f₁</a> <a id="1406" href="Function.Inverse.html#1406" class="Bound">f₂</a> <a id="1409" href="Function.Inverse.html#1409" class="Bound">t₁</a> <a id="1412" href="Function.Inverse.html#1412" class="Bound">t₂</a><a id="1414" class="Symbol">}</a>
<a id="1431" class="Symbol">(</a><a id="1432" href="Function.Inverse.html#1432" class="Bound">From</a> <a id="1437" class="Symbol">:</a> <a id="1439" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1446" href="Function.Inverse.html#1403" class="Bound">f₁</a> <a id="1449" href="Function.Inverse.html#1406" class="Bound">f₂</a><a id="1451" class="Symbol">)</a> <a id="1453" class="Symbol">(</a><a id="1454" href="Function.Inverse.html#1454" class="Bound">To</a> <a id="1457" class="Symbol">:</a> <a id="1459" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1466" href="Function.Inverse.html#1409" class="Bound">t₁</a> <a id="1469" href="Function.Inverse.html#1412" class="Bound">t₂</a><a id="1471" class="Symbol">)</a> <a id="1473" class="Symbol">:</a>
<a id="1490" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1494" class="Symbol">(</a><a id="1495" href="Function.Inverse.html#1403" class="Bound">f₁</a> <a id="1498" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1500" href="Function.Inverse.html#1406" class="Bound">f₂</a> <a id="1503" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1505" href="Function.Inverse.html#1409" class="Bound">t₁</a> <a id="1508" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1510" href="Function.Inverse.html#1412" class="Bound">t₂</a><a id="1512" class="Symbol">)</a> <a id="1514" class="Keyword">where</a>
<a id="1522" class="Keyword">field</a>
<a id="Inverse.to"></a><a id="1532" href="Function.Inverse.html#1532" class="Field">to</a> <a id="1543" class="Symbol">:</a> <a id="1545" href="Function.Inverse.html#1432" class="Bound">From</a> <a id="1550" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1552" href="Function.Inverse.html#1454" class="Bound">To</a>
<a id="Inverse.from"></a><a id="1559" href="Function.Inverse.html#1559" class="Field">from</a> <a id="1570" class="Symbol">:</a> <a id="1572" href="Function.Inverse.html#1454" class="Bound">To</a> <a id="1575" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1577" href="Function.Inverse.html#1432" class="Bound">From</a>
<a id="Inverse.inverse-of"></a><a id="1586" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="1597" class="Symbol">:</a> <a id="1599" href="Function.Inverse.html#1559" class="Field">from</a> <a id="1604" href="Function.Inverse.html#972" class="Record Operator">InverseOf</a> <a id="1614" href="Function.Inverse.html#1532" class="Field">to</a>
<a id="1620" class="Keyword">open</a> <a id="1625" href="Function.Inverse.html#972" class="Module Operator">_InverseOf_</a> <a id="1637" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="1648" class="Keyword">public</a>
<a id="Inverse.left-inverse"></a><a id="1658" href="Function.Inverse.html#1658" class="Function">left-inverse</a> <a id="1671" class="Symbol">:</a> <a id="1673" href="Function.LeftInverse.html#1485" class="Record">LeftInverse</a> <a id="1685" href="Function.Inverse.html#1432" class="Bound">From</a> <a id="1690" href="Function.Inverse.html#1454" class="Bound">To</a>
<a id="1695" href="Function.Inverse.html#1658" class="Function">left-inverse</a> <a id="1708" class="Symbol">=</a> <a id="1710" class="Keyword">record</a>
<a id="1721" class="Symbol">{</a> <a id="1723" href="Function.LeftInverse.html#1635" class="Field">to</a> <a id="1739" class="Symbol">=</a> <a id="1741" href="Function.Inverse.html#1532" class="Field">to</a>
<a id="1748" class="Symbol">;</a> <a id="1750" href="Function.LeftInverse.html#1667" class="Field">from</a> <a id="1766" class="Symbol">=</a> <a id="1768" href="Function.Inverse.html#1559" class="Field">from</a>
<a id="1777" class="Symbol">;</a> <a id="1779" href="Function.LeftInverse.html#1699" class="Field">left-inverse-of</a> <a id="1795" class="Symbol">=</a> <a id="1797" href="Function.Inverse.html#1177" class="Function">left-inverse-of</a>
<a id="1817" class="Symbol">}</a>
<a id="1822" class="Keyword">open</a> <a id="1827" href="Function.LeftInverse.html#1485" class="Module">LeftInverse</a> <a id="1839" href="Function.Inverse.html#1658" class="Function">left-inverse</a> <a id="1852" class="Keyword">public</a>
<a id="1863" class="Keyword">using</a> <a id="1869" class="Symbol">(</a><a id="1870" href="Function.LeftInverse.html#1839" class="Function">injective</a><a id="1879" class="Symbol">;</a> <a id="1881" href="Function.LeftInverse.html#2075" class="Function">injection</a><a id="1890" class="Symbol">)</a>
<a id="Inverse.bijection"></a><a id="1895" href="Function.Inverse.html#1895" class="Function">bijection</a> <a id="1905" class="Symbol">:</a> <a id="1907" href="Function.Bijection.html#1532" class="Record">Bijection</a> <a id="1917" href="Function.Inverse.html#1432" class="Bound">From</a> <a id="1922" href="Function.Inverse.html#1454" class="Bound">To</a>
<a id="1927" href="Function.Inverse.html#1895" class="Function">bijection</a> <a id="1937" class="Symbol">=</a> <a id="1939" class="Keyword">record</a>
<a id="1950" class="Symbol">{</a> <a id="1952" href="Function.Bijection.html#1676" class="Field">to</a> <a id="1962" class="Symbol">=</a> <a id="1964" href="Function.Inverse.html#1532" class="Field">to</a>
<a id="1971" class="Symbol">;</a> <a id="1973" href="Function.Bijection.html#1702" class="Field">bijective</a> <a id="1983" class="Symbol">=</a> <a id="1985" class="Keyword">record</a>
<a id="1998" class="Symbol">{</a> <a id="2000" href="Function.Bijection.html#1200" class="Field">injective</a> <a id="2011" class="Symbol">=</a> <a id="2013" href="Function.LeftInverse.html#1839" class="Function">injective</a>
<a id="2029" class="Symbol">;</a> <a id="2031" href="Function.Bijection.html#1231" class="Field">surjective</a> <a id="2042" class="Symbol">=</a> <a id="2044" class="Keyword">record</a>
<a id="2059" class="Symbol">{</a> <a id="2061" href="Function.Surjection.html#1185" class="Field">from</a> <a id="2078" class="Symbol">=</a> <a id="2080" href="Function.Inverse.html#1559" class="Field">from</a>
<a id="2093" class="Symbol">;</a> <a id="2095" href="Function.Surjection.html#1218" class="Field">right-inverse-of</a> <a id="2112" class="Symbol">=</a> <a id="2114" href="Function.Inverse.html#1223" class="Function">right-inverse-of</a>
<a id="2139" class="Symbol">}</a>
<a id="2147" class="Symbol">}</a>
<a id="2153" class="Symbol">}</a>
<a id="2158" class="Keyword">open</a> <a id="2163" href="Function.Bijection.html#1532" class="Module">Bijection</a> <a id="2173" href="Function.Inverse.html#1895" class="Function">bijection</a> <a id="2183" class="Keyword">public</a>
<a id="2194" class="Keyword">using</a> <a id="2200" class="Symbol">(</a><a id="2201" href="Function.Surjection.html#2056" class="Function">equivalence</a><a id="2212" class="Symbol">;</a> <a id="2214" href="Function.Bijection.html#1231" class="Function">surjective</a><a id="2224" class="Symbol">;</a> <a id="2226" href="Function.Bijection.html#1874" class="Function">surjection</a><a id="2236" class="Symbol">;</a> <a id="2238" href="Function.Surjection.html#1641" class="Function">right-inverse</a><a id="2251" class="Symbol">;</a>
<a id="2264" href="Function.LeftInverse.html#2264" class="Function">to-from</a><a id="2271" class="Symbol">;</a> <a id="2273" href="Function.Surjection.html#1881" class="Function">from-to</a><a id="2280" class="Symbol">)</a>
<a id="2283" class="Comment">------------------------------------------------------------------------</a>
<a id="2356" class="Comment">-- The set of all inverses between two sets (i.e. inverses with</a>
<a id="2420" class="Comment">-- propositional equality)</a>
<a id="2448" class="Keyword">infix</a> <a id="2454" class="Number">3</a> <a id="2456" href="Function.Inverse.html#2466" class="Function Operator">_↔_</a> <a id="2460" href="Function.Inverse.html#2555" class="Function Operator">_↔̇_</a>
<a id="_↔_"></a><a id="2466" href="Function.Inverse.html#2466" class="Function Operator">_↔_</a> <a id="2470" class="Symbol">:</a> <a id="2472" class="Symbol"></a> <a id="2474" class="Symbol">{</a><a id="2475" href="Function.Inverse.html#2475" class="Bound">f</a> <a id="2477" href="Function.Inverse.html#2477" class="Bound">t</a><a id="2478" class="Symbol">}</a> <a id="2480" class="Symbol"></a> <a id="2482" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2486" href="Function.Inverse.html#2475" class="Bound">f</a> <a id="2488" class="Symbol"></a> <a id="2490" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2494" href="Function.Inverse.html#2477" class="Bound">t</a> <a id="2496" class="Symbol"></a> <a id="2498" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2502" class="Symbol">_</a>
<a id="2504" href="Function.Inverse.html#2504" class="Bound">From</a> <a id="2509" href="Function.Inverse.html#2466" class="Function Operator"></a> <a id="2511" href="Function.Inverse.html#2511" class="Bound">To</a> <a id="2514" class="Symbol">=</a> <a id="2516" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="2524" class="Symbol">(</a><a id="2525" href="Relation.Binary.PropositionalEquality.Properties.html#3981" class="Function">P.setoid</a> <a id="2534" href="Function.Inverse.html#2504" class="Bound">From</a><a id="2538" class="Symbol">)</a> <a id="2540" class="Symbol">(</a><a id="2541" href="Relation.Binary.PropositionalEquality.Properties.html#3981" class="Function">P.setoid</a> <a id="2550" href="Function.Inverse.html#2511" class="Bound">To</a><a id="2552" class="Symbol">)</a>
<a id="_↔̇_"></a><a id="2555" href="Function.Inverse.html#2555" class="Function Operator">_↔̇_</a> <a id="2560" class="Symbol">:</a> <a id="2562" class="Symbol"></a> <a id="2564" class="Symbol">{</a><a id="2565" href="Function.Inverse.html#2565" class="Bound">i</a> <a id="2567" href="Function.Inverse.html#2567" class="Bound">f</a> <a id="2569" href="Function.Inverse.html#2569" class="Bound">t</a><a id="2570" class="Symbol">}</a> <a id="2572" class="Symbol">{</a><a id="2573" href="Function.Inverse.html#2573" class="Bound">I</a> <a id="2575" class="Symbol">:</a> <a id="2577" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2581" href="Function.Inverse.html#2565" class="Bound">i</a><a id="2582" class="Symbol">}</a> <a id="2584" class="Symbol"></a> <a id="2586" href="Relation.Unary.html#1110" class="Function">Pred</a> <a id="2591" href="Function.Inverse.html#2573" class="Bound">I</a> <a id="2593" href="Function.Inverse.html#2567" class="Bound">f</a> <a id="2595" class="Symbol"></a> <a id="2597" href="Relation.Unary.html#1110" class="Function">Pred</a> <a id="2602" href="Function.Inverse.html#2573" class="Bound">I</a> <a id="2604" href="Function.Inverse.html#2569" class="Bound">t</a> <a id="2606" class="Symbol"></a> <a id="2608" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2612" class="Symbol">_</a>
<a id="2614" href="Function.Inverse.html#2614" class="Bound">From</a> <a id="2619" href="Function.Inverse.html#2555" class="Function Operator">↔̇</a> <a id="2622" href="Function.Inverse.html#2622" class="Bound">To</a> <a id="2625" class="Symbol">=</a> <a id="2627" class="Symbol"></a> <a id="2629" class="Symbol">{</a><a id="2630" href="Function.Inverse.html#2630" class="Bound">i</a><a id="2631" class="Symbol">}</a> <a id="2633" class="Symbol"></a> <a id="2635" href="Function.Inverse.html#2614" class="Bound">From</a> <a id="2640" href="Function.Inverse.html#2630" class="Bound">i</a> <a id="2642" href="Function.Inverse.html#2466" class="Function Operator"></a> <a id="2644" href="Function.Inverse.html#2622" class="Bound">To</a> <a id="2647" href="Function.Inverse.html#2630" class="Bound">i</a>
<a id="inverse"></a><a id="2650" href="Function.Inverse.html#2650" class="Function">inverse</a> <a id="2658" class="Symbol">:</a> <a id="2660" class="Symbol"></a> <a id="2662" class="Symbol">{</a><a id="2663" href="Function.Inverse.html#2663" class="Bound">f</a> <a id="2665" href="Function.Inverse.html#2665" class="Bound">t</a><a id="2666" class="Symbol">}</a> <a id="2668" class="Symbol">{</a><a id="2669" href="Function.Inverse.html#2669" class="Bound">From</a> <a id="2674" class="Symbol">:</a> <a id="2676" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2680" href="Function.Inverse.html#2663" class="Bound">f</a><a id="2681" class="Symbol">}</a> <a id="2683" class="Symbol">{</a><a id="2684" href="Function.Inverse.html#2684" class="Bound">To</a> <a id="2687" class="Symbol">:</a> <a id="2689" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2693" href="Function.Inverse.html#2665" class="Bound">t</a><a id="2694" class="Symbol">}</a> <a id="2696" class="Symbol"></a>
<a id="2708" class="Symbol">(</a><a id="2709" href="Function.Inverse.html#2709" class="Bound">to</a> <a id="2712" class="Symbol">:</a> <a id="2714" href="Function.Inverse.html#2669" class="Bound">From</a> <a id="2719" class="Symbol"></a> <a id="2721" href="Function.Inverse.html#2684" class="Bound">To</a><a id="2723" class="Symbol">)</a> <a id="2725" class="Symbol">(</a><a id="2726" href="Function.Inverse.html#2726" class="Bound">from</a> <a id="2731" class="Symbol">:</a> <a id="2733" href="Function.Inverse.html#2684" class="Bound">To</a> <a id="2736" class="Symbol"></a> <a id="2738" href="Function.Inverse.html#2669" class="Bound">From</a><a id="2742" class="Symbol">)</a> <a id="2744" class="Symbol"></a>
<a id="2756" class="Symbol">(∀</a> <a id="2759" href="Function.Inverse.html#2759" class="Bound">x</a> <a id="2761" class="Symbol"></a> <a id="2763" href="Function.Inverse.html#2726" class="Bound">from</a> <a id="2768" class="Symbol">(</a><a id="2769" href="Function.Inverse.html#2709" class="Bound">to</a> <a id="2772" href="Function.Inverse.html#2759" class="Bound">x</a><a id="2773" class="Symbol">)</a> <a id="2775" href="Agda.Builtin.Equality.html#133" class="Datatype Operator"></a> <a id="2777" href="Function.Inverse.html#2759" class="Bound">x</a><a id="2778" class="Symbol">)</a> <a id="2780" class="Symbol"></a>
<a id="2792" class="Symbol">(∀</a> <a id="2795" href="Function.Inverse.html#2795" class="Bound">x</a> <a id="2797" class="Symbol"></a> <a id="2799" href="Function.Inverse.html#2709" class="Bound">to</a> <a id="2802" class="Symbol">(</a><a id="2803" href="Function.Inverse.html#2726" class="Bound">from</a> <a id="2808" href="Function.Inverse.html#2795" class="Bound">x</a><a id="2809" class="Symbol">)</a> <a id="2811" href="Agda.Builtin.Equality.html#133" class="Datatype Operator"></a> <a id="2813" href="Function.Inverse.html#2795" class="Bound">x</a><a id="2814" class="Symbol">)</a> <a id="2816" class="Symbol"></a>
<a id="2828" href="Function.Inverse.html#2669" class="Bound">From</a> <a id="2833" href="Function.Inverse.html#2466" class="Function Operator"></a> <a id="2835" href="Function.Inverse.html#2684" class="Bound">To</a>
<a id="2838" href="Function.Inverse.html#2650" class="Function">inverse</a> <a id="2846" href="Function.Inverse.html#2846" class="Bound">to</a> <a id="2849" href="Function.Inverse.html#2849" class="Bound">from</a> <a id="2854" href="Function.Inverse.html#2854" class="Bound">from∘to</a> <a id="2862" href="Function.Inverse.html#2862" class="Bound">to∘from</a> <a id="2870" class="Symbol">=</a> <a id="2872" class="Keyword">record</a>
<a id="2881" class="Symbol">{</a> <a id="2883" href="Function.Inverse.html#1532" class="Field">to</a> <a id="2888" class="Symbol">=</a> <a id="2890" href="Relation.Binary.PropositionalEquality.html#1807" class="Function">P.→-to-⟶</a> <a id="2899" href="Function.Inverse.html#2846" class="Bound">to</a>
<a id="2904" class="Symbol">;</a> <a id="2906" href="Function.Inverse.html#1559" class="Field">from</a> <a id="2911" class="Symbol">=</a> <a id="2913" href="Relation.Binary.PropositionalEquality.html#1807" class="Function">P.→-to-⟶</a> <a id="2922" href="Function.Inverse.html#2849" class="Bound">from</a>
<a id="2929" class="Symbol">;</a> <a id="2931" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="2942" class="Symbol">=</a> <a id="2944" class="Keyword">record</a>
<a id="2955" class="Symbol">{</a> <a id="2957" href="Function.Inverse.html#1177" class="Field">left-inverse-of</a> <a id="2974" class="Symbol">=</a> <a id="2976" href="Function.Inverse.html#2854" class="Bound">from∘to</a>
<a id="2988" class="Symbol">;</a> <a id="2990" href="Function.Inverse.html#1223" class="Field">right-inverse-of</a> <a id="3007" class="Symbol">=</a> <a id="3009" href="Function.Inverse.html#2862" class="Bound">to∘from</a>
<a id="3021" class="Symbol">}</a>
<a id="3025" class="Symbol">}</a>
<a id="3028" class="Comment">------------------------------------------------------------------------</a>
<a id="3101" class="Comment">-- If two setoids are in bijective correspondence, then there is an</a>
<a id="3169" class="Comment">-- inverse between them</a>
<a id="fromBijection"></a><a id="3194" href="Function.Inverse.html#3194" class="Function">fromBijection</a> <a id="3208" class="Symbol">:</a>
<a id="3212" class="Symbol"></a> <a id="3214" class="Symbol">{</a><a id="3215" href="Function.Inverse.html#3215" class="Bound">f₁</a> <a id="3218" href="Function.Inverse.html#3218" class="Bound">f₂</a> <a id="3221" href="Function.Inverse.html#3221" class="Bound">t₁</a> <a id="3224" href="Function.Inverse.html#3224" class="Bound">t₂</a><a id="3226" class="Symbol">}</a> <a id="3228" class="Symbol">{</a><a id="3229" href="Function.Inverse.html#3229" class="Bound">From</a> <a id="3234" class="Symbol">:</a> <a id="3236" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3243" href="Function.Inverse.html#3215" class="Bound">f₁</a> <a id="3246" href="Function.Inverse.html#3218" class="Bound">f₂</a><a id="3248" class="Symbol">}</a> <a id="3250" class="Symbol">{</a><a id="3251" href="Function.Inverse.html#3251" class="Bound">To</a> <a id="3254" class="Symbol">:</a> <a id="3256" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3263" href="Function.Inverse.html#3221" class="Bound">t₁</a> <a id="3266" href="Function.Inverse.html#3224" class="Bound">t₂</a><a id="3268" class="Symbol">}</a> <a id="3270" class="Symbol"></a>
<a id="3274" href="Function.Bijection.html#1532" class="Record">Bijection</a> <a id="3284" href="Function.Inverse.html#3229" class="Bound">From</a> <a id="3289" href="Function.Inverse.html#3251" class="Bound">To</a> <a id="3292" class="Symbol"></a> <a id="3294" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="3302" href="Function.Inverse.html#3229" class="Bound">From</a> <a id="3307" href="Function.Inverse.html#3251" class="Bound">To</a>
<a id="3310" href="Function.Inverse.html#3194" class="Function">fromBijection</a> <a id="3324" href="Function.Inverse.html#3324" class="Bound">b</a> <a id="3326" class="Symbol">=</a> <a id="3328" class="Keyword">record</a>
<a id="3337" class="Symbol">{</a> <a id="3339" href="Function.Inverse.html#1532" class="Field">to</a> <a id="3350" class="Symbol">=</a> <a id="3352" href="Function.Bijection.html#1676" class="Field">Bijection.to</a> <a id="3365" href="Function.Inverse.html#3324" class="Bound">b</a>
<a id="3369" class="Symbol">;</a> <a id="3371" href="Function.Inverse.html#1559" class="Field">from</a> <a id="3382" class="Symbol">=</a> <a id="3384" href="Function.Surjection.html#1185" class="Function">Bijection.from</a> <a id="3399" href="Function.Inverse.html#3324" class="Bound">b</a>
<a id="3403" class="Symbol">;</a> <a id="3405" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="3416" class="Symbol">=</a> <a id="3418" class="Keyword">record</a>
<a id="3429" class="Symbol">{</a> <a id="3431" href="Function.Inverse.html#1177" class="Field">left-inverse-of</a> <a id="3448" class="Symbol">=</a> <a id="3450" href="Function.Bijection.html#1298" class="Function">Bijection.left-inverse-of</a> <a id="3476" href="Function.Inverse.html#3324" class="Bound">b</a>
<a id="3482" class="Symbol">;</a> <a id="3484" href="Function.Inverse.html#1223" class="Field">right-inverse-of</a> <a id="3501" class="Symbol">=</a> <a id="3503" href="Function.Surjection.html#1218" class="Function">Bijection.right-inverse-of</a> <a id="3530" href="Function.Inverse.html#3324" class="Bound">b</a>
<a id="3536" class="Symbol">}</a>
<a id="3540" class="Symbol">}</a>
<a id="3543" class="Comment">------------------------------------------------------------------------</a>
<a id="3616" class="Comment">-- Inverse is an equivalence relation</a>
<a id="3655" class="Comment">-- Reflexivity</a>
<a id="id"></a><a id="3671" href="Function.Inverse.html#3671" class="Function">id</a> <a id="3674" class="Symbol">:</a> <a id="3676" class="Symbol"></a> <a id="3678" class="Symbol">{</a><a id="3679" href="Function.Inverse.html#3679" class="Bound">s₁</a> <a id="3682" href="Function.Inverse.html#3682" class="Bound">s₂</a><a id="3684" class="Symbol">}</a> <a id="3686" class="Symbol"></a> <a id="3688" href="Relation.Binary.Definitions.html#1348" class="Function">Reflexive</a> <a id="3698" class="Symbol">(</a><a id="3699" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="3707" class="Symbol">{</a><a id="3708" href="Function.Inverse.html#3679" class="Bound">s₁</a><a id="3710" class="Symbol">}</a> <a id="3712" class="Symbol">{</a><a id="3713" href="Function.Inverse.html#3682" class="Bound">s₂</a><a id="3715" class="Symbol">})</a>
<a id="3718" href="Function.Inverse.html#3671" class="Function">id</a> <a id="3721" class="Symbol">{</a><a id="3722" class="Argument">x</a> <a id="3724" class="Symbol">=</a> <a id="3726" href="Function.Inverse.html#3726" class="Bound">S</a><a id="3727" class="Symbol">}</a> <a id="3729" class="Symbol">=</a> <a id="3731" class="Keyword">record</a>
<a id="3740" class="Symbol">{</a> <a id="3742" href="Function.Inverse.html#1532" class="Field">to</a> <a id="3753" class="Symbol">=</a> <a id="3755" href="Function.Equality.html#1437" class="Function">F.id</a>
<a id="3762" class="Symbol">;</a> <a id="3764" href="Function.Inverse.html#1559" class="Field">from</a> <a id="3775" class="Symbol">=</a> <a id="3777" href="Function.Equality.html#1437" class="Function">F.id</a>
<a id="3784" class="Symbol">;</a> <a id="3786" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="3797" class="Symbol">=</a> <a id="3799" class="Keyword">record</a>
<a id="3810" class="Symbol">{</a> <a id="3812" href="Function.Inverse.html#1177" class="Field">left-inverse-of</a> <a id="3829" class="Symbol">=</a> <a id="3831" href="Function.LeftInverse.html#1699" class="Field">LeftInverse.left-inverse-of</a> <a id="3859" href="Function.Inverse.html#3936" class="Function">id</a>
<a id="3867" class="Symbol">;</a> <a id="3869" href="Function.Inverse.html#1223" class="Field">right-inverse-of</a> <a id="3886" class="Symbol">=</a> <a id="3888" href="Function.LeftInverse.html#1699" class="Field">LeftInverse.left-inverse-of</a> <a id="3916" href="Function.Inverse.html#3936" class="Function">id</a>
<a id="3924" class="Symbol">}</a>
<a id="3928" class="Symbol">}</a> <a id="3930" class="Keyword">where</a> <a id="3936" href="Function.Inverse.html#3936" class="Function">id</a> <a id="3940" class="Symbol">=</a> <a id="3942" href="Function.LeftInverse.html#3422" class="Function">Left.id</a> <a id="3950" class="Symbol">{</a><a id="3951" class="Argument">S</a> <a id="3953" class="Symbol">=</a> <a id="3955" href="Function.Inverse.html#3726" class="Bound">S</a><a id="3956" class="Symbol">}</a>
<a id="3959" class="Comment">-- Transitivity</a>
<a id="3976" class="Keyword">infixr</a> <a id="3983" class="Number">9</a> <a id="3985" href="Function.Inverse.html#3990" class="Function Operator">_∘_</a>
<a id="_∘_"></a><a id="3990" href="Function.Inverse.html#3990" class="Function Operator">_∘_</a> <a id="3994" class="Symbol">:</a> <a id="3996" class="Symbol"></a> <a id="3998" class="Symbol">{</a><a id="3999" href="Function.Inverse.html#3999" class="Bound">f₁</a> <a id="4002" href="Function.Inverse.html#4002" class="Bound">f₂</a> <a id="4005" href="Function.Inverse.html#4005" class="Bound">m₁</a> <a id="4008" href="Function.Inverse.html#4008" class="Bound">m₂</a> <a id="4011" href="Function.Inverse.html#4011" class="Bound">t₁</a> <a id="4014" href="Function.Inverse.html#4014" class="Bound">t₂</a><a id="4016" class="Symbol">}</a> <a id="4018" class="Symbol"></a>
<a id="4026" href="Relation.Binary.Definitions.html#1747" class="Function">TransFlip</a> <a id="4036" class="Symbol">(</a><a id="4037" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="4045" class="Symbol">{</a><a id="4046" href="Function.Inverse.html#3999" class="Bound">f₁</a><a id="4048" class="Symbol">}</a> <a id="4050" class="Symbol">{</a><a id="4051" href="Function.Inverse.html#4002" class="Bound">f₂</a><a id="4053" class="Symbol">}</a> <a id="4055" class="Symbol">{</a><a id="4056" href="Function.Inverse.html#4005" class="Bound">m₁</a><a id="4058" class="Symbol">}</a> <a id="4060" class="Symbol">{</a><a id="4061" href="Function.Inverse.html#4008" class="Bound">m₂</a><a id="4063" class="Symbol">})</a>
<a id="4082" class="Symbol">(</a><a id="4083" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="4091" class="Symbol">{</a><a id="4092" href="Function.Inverse.html#4005" class="Bound">m₁</a><a id="4094" class="Symbol">}</a> <a id="4096" class="Symbol">{</a><a id="4097" href="Function.Inverse.html#4008" class="Bound">m₂</a><a id="4099" class="Symbol">}</a> <a id="4101" class="Symbol">{</a><a id="4102" href="Function.Inverse.html#4011" class="Bound">t₁</a><a id="4104" class="Symbol">}</a> <a id="4106" class="Symbol">{</a><a id="4107" href="Function.Inverse.html#4014" class="Bound">t₂</a><a id="4109" class="Symbol">})</a>
<a id="4128" class="Symbol">(</a><a id="4129" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="4137" class="Symbol">{</a><a id="4138" href="Function.Inverse.html#3999" class="Bound">f₁</a><a id="4140" class="Symbol">}</a> <a id="4142" class="Symbol">{</a><a id="4143" href="Function.Inverse.html#4002" class="Bound">f₂</a><a id="4145" class="Symbol">}</a> <a id="4147" class="Symbol">{</a><a id="4148" href="Function.Inverse.html#4011" class="Bound">t₁</a><a id="4150" class="Symbol">}</a> <a id="4152" class="Symbol">{</a><a id="4153" href="Function.Inverse.html#4014" class="Bound">t₂</a><a id="4155" class="Symbol">})</a>
<a id="4158" href="Function.Inverse.html#4158" class="Bound">f</a> <a id="4160" href="Function.Inverse.html#3990" class="Function Operator"></a> <a id="4162" href="Function.Inverse.html#4162" class="Bound">g</a> <a id="4164" class="Symbol">=</a> <a id="4166" class="Keyword">record</a>
<a id="4175" class="Symbol">{</a> <a id="4177" href="Function.Inverse.html#1532" class="Field">to</a> <a id="4188" class="Symbol">=</a> <a id="4190" href="Function.Inverse.html#1532" class="Field">to</a> <a id="4195" href="Function.Inverse.html#4158" class="Bound">f</a> <a id="4197" href="Function.Inverse.html#673" class="Function Operator">⟪∘⟫</a> <a id="4201" href="Function.Inverse.html#1532" class="Field">to</a> <a id="4206" href="Function.Inverse.html#4162" class="Bound">g</a>
<a id="4210" class="Symbol">;</a> <a id="4212" href="Function.Inverse.html#1559" class="Field">from</a> <a id="4223" class="Symbol">=</a> <a id="4225" href="Function.Inverse.html#1559" class="Field">from</a> <a id="4230" href="Function.Inverse.html#4162" class="Bound">g</a> <a id="4232" href="Function.Inverse.html#673" class="Function Operator">⟪∘⟫</a> <a id="4236" href="Function.Inverse.html#1559" class="Field">from</a> <a id="4241" href="Function.Inverse.html#4158" class="Bound">f</a>
<a id="4245" class="Symbol">;</a> <a id="4247" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="4258" class="Symbol">=</a> <a id="4260" class="Keyword">record</a>
<a id="4271" class="Symbol">{</a> <a id="4273" href="Function.Inverse.html#1177" class="Field">left-inverse-of</a> <a id="4290" class="Symbol">=</a> <a id="4292" href="Function.LeftInverse.html#1699" class="Field">LeftInverse.left-inverse-of</a> <a id="4320" class="Symbol">(</a><a id="4321" href="Function.LeftInverse.html#3611" class="Function Operator">Left._∘_</a> <a id="4330" class="Symbol">(</a><a id="4331" href="Function.Inverse.html#1658" class="Function">left-inverse</a> <a id="4345" href="Function.Inverse.html#4158" class="Bound">f</a><a id="4346" class="Symbol">)</a> <a id="4348" class="Symbol">(</a><a id="4349" href="Function.Inverse.html#1658" class="Function">left-inverse</a> <a id="4363" href="Function.Inverse.html#4162" class="Bound">g</a><a id="4364" class="Symbol">))</a>
<a id="4371" class="Symbol">;</a> <a id="4373" href="Function.Inverse.html#1223" class="Field">right-inverse-of</a> <a id="4390" class="Symbol">=</a> <a id="4392" href="Function.LeftInverse.html#1699" class="Field">LeftInverse.left-inverse-of</a> <a id="4420" class="Symbol">(</a><a id="4421" href="Function.LeftInverse.html#3611" class="Function Operator">Left._∘_</a> <a id="4430" class="Symbol">(</a><a id="4431" href="Function.Surjection.html#1641" class="Function">right-inverse</a> <a id="4445" href="Function.Inverse.html#4162" class="Bound">g</a><a id="4446" class="Symbol">)</a> <a id="4448" class="Symbol">(</a><a id="4449" href="Function.Surjection.html#1641" class="Function">right-inverse</a> <a id="4463" href="Function.Inverse.html#4158" class="Bound">f</a><a id="4464" class="Symbol">))</a>
<a id="4471" class="Symbol">}</a>
<a id="4475" class="Symbol">}</a> <a id="4477" class="Keyword">where</a> <a id="4483" class="Keyword">open</a> <a id="4488" href="Function.Inverse.html#1394" class="Module">Inverse</a>
<a id="4497" class="Comment">-- Symmetry.</a>
<a id="sym"></a><a id="4511" href="Function.Inverse.html#4511" class="Function">sym</a> <a id="4515" class="Symbol">:</a> <a id="4517" class="Symbol"></a> <a id="4519" class="Symbol">{</a><a id="4520" href="Function.Inverse.html#4520" class="Bound">f₁</a> <a id="4523" href="Function.Inverse.html#4523" class="Bound">f₂</a> <a id="4526" href="Function.Inverse.html#4526" class="Bound">t₁</a> <a id="4529" href="Function.Inverse.html#4529" class="Bound">t₂</a><a id="4531" class="Symbol">}</a> <a id="4533" class="Symbol"></a>
<a id="4541" href="Relation.Binary.Definitions.html#1433" class="Function">Sym</a> <a id="4545" class="Symbol">(</a><a id="4546" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="4554" class="Symbol">{</a><a id="4555" href="Function.Inverse.html#4520" class="Bound">f₁</a><a id="4557" class="Symbol">}</a> <a id="4559" class="Symbol">{</a><a id="4560" href="Function.Inverse.html#4523" class="Bound">f₂</a><a id="4562" class="Symbol">}</a> <a id="4564" class="Symbol">{</a><a id="4565" href="Function.Inverse.html#4526" class="Bound">t₁</a><a id="4567" class="Symbol">}</a> <a id="4569" class="Symbol">{</a><a id="4570" href="Function.Inverse.html#4529" class="Bound">t₂</a><a id="4572" class="Symbol">})</a> <a id="4575" class="Symbol">(</a><a id="4576" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="4584" class="Symbol">{</a><a id="4585" href="Function.Inverse.html#4526" class="Bound">t₁</a><a id="4587" class="Symbol">}</a> <a id="4589" class="Symbol">{</a><a id="4590" href="Function.Inverse.html#4529" class="Bound">t₂</a><a id="4592" class="Symbol">}</a> <a id="4594" class="Symbol">{</a><a id="4595" href="Function.Inverse.html#4520" class="Bound">f₁</a><a id="4597" class="Symbol">}</a> <a id="4599" class="Symbol">{</a><a id="4600" href="Function.Inverse.html#4523" class="Bound">f₂</a><a id="4602" class="Symbol">})</a>
<a id="4605" href="Function.Inverse.html#4511" class="Function">sym</a> <a id="4609" href="Function.Inverse.html#4609" class="Bound">inv</a> <a id="4613" class="Symbol">=</a> <a id="4615" class="Keyword">record</a>
<a id="4624" class="Symbol">{</a> <a id="4626" href="Function.Inverse.html#1559" class="Field">from</a> <a id="4637" class="Symbol">=</a> <a id="4639" href="Function.Inverse.html#1532" class="Field">to</a>
<a id="4644" class="Symbol">;</a> <a id="4646" href="Function.Inverse.html#1532" class="Field">to</a> <a id="4657" class="Symbol">=</a> <a id="4659" href="Function.Inverse.html#1559" class="Field">from</a>
<a id="4666" class="Symbol">;</a> <a id="4668" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="4679" class="Symbol">=</a> <a id="4681" class="Keyword">record</a>
<a id="4692" class="Symbol">{</a> <a id="4694" href="Function.Inverse.html#1177" class="Field">left-inverse-of</a> <a id="4711" class="Symbol">=</a> <a id="4713" href="Function.Inverse.html#1223" class="Function">right-inverse-of</a>
<a id="4734" class="Symbol">;</a> <a id="4736" href="Function.Inverse.html#1223" class="Field">right-inverse-of</a> <a id="4753" class="Symbol">=</a> <a id="4755" href="Function.Inverse.html#1177" class="Function">left-inverse-of</a>
<a id="4775" class="Symbol">}</a>
<a id="4779" class="Symbol">}</a> <a id="4781" class="Keyword">where</a> <a id="4787" class="Keyword">open</a> <a id="4792" href="Function.Inverse.html#1394" class="Module">Inverse</a> <a id="4800" href="Function.Inverse.html#4609" class="Bound">inv</a>
<a id="4805" class="Comment">------------------------------------------------------------------------</a>
<a id="4878" class="Comment">-- Transformations</a>
<a id="map"></a><a id="4898" href="Function.Inverse.html#4898" class="Function">map</a> <a id="4902" class="Symbol">:</a> <a id="4904" class="Symbol"></a> <a id="4906" class="Symbol">{</a><a id="4907" href="Function.Inverse.html#4907" class="Bound">f₁</a> <a id="4910" href="Function.Inverse.html#4910" class="Bound">f₂</a> <a id="4913" href="Function.Inverse.html#4913" class="Bound">t₁</a> <a id="4916" href="Function.Inverse.html#4916" class="Bound">t₂</a><a id="4918" class="Symbol">}</a> <a id="4920" class="Symbol">{</a><a id="4921" href="Function.Inverse.html#4921" class="Bound">From</a> <a id="4926" class="Symbol">:</a> <a id="4928" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="4935" href="Function.Inverse.html#4907" class="Bound">f₁</a> <a id="4938" href="Function.Inverse.html#4910" class="Bound">f₂</a><a id="4940" class="Symbol">}</a> <a id="4942" class="Symbol">{</a><a id="4943" href="Function.Inverse.html#4943" class="Bound">To</a> <a id="4946" class="Symbol">:</a> <a id="4948" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="4955" href="Function.Inverse.html#4913" class="Bound">t₁</a> <a id="4958" href="Function.Inverse.html#4916" class="Bound">t₂</a><a id="4960" class="Symbol">}</a>
<a id="4970" class="Symbol">{</a><a id="4971" href="Function.Inverse.html#4971" class="Bound">f₁</a> <a id="4975" href="Function.Inverse.html#4975" class="Bound">f₂</a> <a id="4979" href="Function.Inverse.html#4979" class="Bound">t₁</a> <a id="4983" href="Function.Inverse.html#4983" class="Bound">t₂</a><a id="4986" class="Symbol">}</a>
<a id="4996" class="Symbol">{</a><a id="4997" href="Function.Inverse.html#4997" class="Bound">From</a> <a id="5003" class="Symbol">:</a> <a id="5005" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="5012" href="Function.Inverse.html#4971" class="Bound">f₁</a> <a id="5016" href="Function.Inverse.html#4975" class="Bound">f₂</a><a id="5019" class="Symbol">}</a> <a id="5021" class="Symbol">{</a><a id="5022" href="Function.Inverse.html#5022" class="Bound">To</a> <a id="5026" class="Symbol">:</a> <a id="5028" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="5035" href="Function.Inverse.html#4979" class="Bound">t₁</a> <a id="5039" href="Function.Inverse.html#4983" class="Bound">t₂</a><a id="5042" class="Symbol">}</a> <a id="5044" class="Symbol"></a>
<a id="5052" class="Symbol">(</a><a id="5053" href="Function.Inverse.html#5053" class="Bound">t</a> <a id="5055" class="Symbol">:</a> <a id="5057" class="Symbol">(</a><a id="5058" href="Function.Inverse.html#4921" class="Bound">From</a> <a id="5063" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5065" href="Function.Inverse.html#4943" class="Bound">To</a><a id="5067" class="Symbol">)</a> <a id="5069" class="Symbol"></a> <a id="5071" class="Symbol">(</a><a id="5072" href="Function.Inverse.html#4997" class="Bound">From</a> <a id="5078" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5080" href="Function.Inverse.html#5022" class="Bound">To</a><a id="5083" class="Symbol">))</a> <a id="5086" class="Symbol"></a>
<a id="5094" class="Symbol">(</a><a id="5095" href="Function.Inverse.html#5095" class="Bound">f</a> <a id="5097" class="Symbol">:</a> <a id="5099" class="Symbol">(</a><a id="5100" href="Function.Inverse.html#4943" class="Bound">To</a> <a id="5103" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5105" href="Function.Inverse.html#4921" class="Bound">From</a><a id="5109" class="Symbol">)</a> <a id="5111" class="Symbol"></a> <a id="5113" class="Symbol">(</a><a id="5114" href="Function.Inverse.html#5022" class="Bound">To</a> <a id="5118" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5120" href="Function.Inverse.html#4997" class="Bound">From</a><a id="5125" class="Symbol">))</a> <a id="5128" class="Symbol"></a>
<a id="5136" class="Symbol">(∀</a> <a id="5139" class="Symbol">{</a><a id="5140" href="Function.Inverse.html#5140" class="Bound">to</a> <a id="5143" href="Function.Inverse.html#5143" class="Bound">from</a><a id="5147" class="Symbol">}</a> <a id="5149" class="Symbol"></a> <a id="5151" href="Function.Inverse.html#5143" class="Bound">from</a> <a id="5156" href="Function.Inverse.html#972" class="Record Operator">InverseOf</a> <a id="5166" href="Function.Inverse.html#5140" class="Bound">to</a> <a id="5169" class="Symbol"></a> <a id="5171" href="Function.Inverse.html#5095" class="Bound">f</a> <a id="5173" href="Function.Inverse.html#5143" class="Bound">from</a> <a id="5178" href="Function.Inverse.html#972" class="Record Operator">InverseOf</a> <a id="5188" href="Function.Inverse.html#5053" class="Bound">t</a> <a id="5190" href="Function.Inverse.html#5140" class="Bound">to</a><a id="5192" class="Symbol">)</a> <a id="5194" class="Symbol"></a>
<a id="5202" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="5210" href="Function.Inverse.html#4921" class="Bound">From</a> <a id="5215" href="Function.Inverse.html#4943" class="Bound">To</a> <a id="5218" class="Symbol"></a> <a id="5220" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="5228" href="Function.Inverse.html#4997" class="Bound">From</a> <a id="5234" href="Function.Inverse.html#5022" class="Bound">To</a>
<a id="5238" href="Function.Inverse.html#4898" class="Function">map</a> <a id="5242" href="Function.Inverse.html#5242" class="Bound">t</a> <a id="5244" href="Function.Inverse.html#5244" class="Bound">f</a> <a id="5246" href="Function.Inverse.html#5246" class="Bound">pres</a> <a id="5251" href="Function.Inverse.html#5251" class="Bound">eq</a> <a id="5254" class="Symbol">=</a> <a id="5256" class="Keyword">record</a>
<a id="5265" class="Symbol">{</a> <a id="5267" href="Function.Inverse.html#1532" class="Field">to</a> <a id="5278" class="Symbol">=</a> <a id="5280" href="Function.Inverse.html#5242" class="Bound">t</a> <a id="5282" href="Function.Inverse.html#1532" class="Field">to</a>
<a id="5287" class="Symbol">;</a> <a id="5289" href="Function.Inverse.html#1559" class="Field">from</a> <a id="5300" class="Symbol">=</a> <a id="5302" href="Function.Inverse.html#5244" class="Bound">f</a> <a id="5304" href="Function.Inverse.html#1559" class="Field">from</a>
<a id="5311" class="Symbol">;</a> <a id="5313" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="5324" class="Symbol">=</a> <a id="5326" href="Function.Inverse.html#5246" class="Bound">pres</a> <a id="5331" href="Function.Inverse.html#1586" class="Field">inverse-of</a>
<a id="5344" class="Symbol">}</a> <a id="5346" class="Keyword">where</a> <a id="5352" class="Keyword">open</a> <a id="5357" href="Function.Inverse.html#1394" class="Module">Inverse</a> <a id="5365" href="Function.Inverse.html#5251" class="Bound">eq</a>
<a id="zip"></a><a id="5369" href="Function.Inverse.html#5369" class="Function">zip</a> <a id="5373" class="Symbol">:</a> <a id="5375" class="Symbol"></a> <a id="5377" class="Symbol">{</a><a id="5378" href="Function.Inverse.html#5378" class="Bound">f₁₁</a> <a id="5382" href="Function.Inverse.html#5382" class="Bound">f₂₁</a> <a id="5386" href="Function.Inverse.html#5386" class="Bound">t₁₁</a> <a id="5390" href="Function.Inverse.html#5390" class="Bound">t₂₁</a><a id="5393" class="Symbol">}</a>
<a id="5403" class="Symbol">{</a><a id="5404" href="Function.Inverse.html#5404" class="Bound">From₁</a> <a id="5410" class="Symbol">:</a> <a id="5412" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="5419" href="Function.Inverse.html#5378" class="Bound">f₁₁</a> <a id="5423" href="Function.Inverse.html#5382" class="Bound">f₂₁</a><a id="5426" class="Symbol">}</a> <a id="5428" class="Symbol">{</a><a id="5429" href="Function.Inverse.html#5429" class="Bound">To₁</a> <a id="5433" class="Symbol">:</a> <a id="5435" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="5442" href="Function.Inverse.html#5386" class="Bound">t₁₁</a> <a id="5446" href="Function.Inverse.html#5390" class="Bound">t₂₁</a><a id="5449" class="Symbol">}</a>
<a id="5459" class="Symbol">{</a><a id="5460" href="Function.Inverse.html#5460" class="Bound">f₁₂</a> <a id="5464" href="Function.Inverse.html#5464" class="Bound">f₂₂</a> <a id="5468" href="Function.Inverse.html#5468" class="Bound">t₁₂</a> <a id="5472" href="Function.Inverse.html#5472" class="Bound">t₂₂</a><a id="5475" class="Symbol">}</a>
<a id="5485" class="Symbol">{</a><a id="5486" href="Function.Inverse.html#5486" class="Bound">From₂</a> <a id="5492" class="Symbol">:</a> <a id="5494" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="5501" href="Function.Inverse.html#5460" class="Bound">f₁₂</a> <a id="5505" href="Function.Inverse.html#5464" class="Bound">f₂₂</a><a id="5508" class="Symbol">}</a> <a id="5510" class="Symbol">{</a><a id="5511" href="Function.Inverse.html#5511" class="Bound">To₂</a> <a id="5515" class="Symbol">:</a> <a id="5517" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="5524" href="Function.Inverse.html#5468" class="Bound">t₁₂</a> <a id="5528" href="Function.Inverse.html#5472" class="Bound">t₂₂</a><a id="5531" class="Symbol">}</a>
<a id="5541" class="Symbol">{</a><a id="5542" href="Function.Inverse.html#5542" class="Bound">f₁</a> <a id="5545" href="Function.Inverse.html#5545" class="Bound">f₂</a> <a id="5548" href="Function.Inverse.html#5548" class="Bound">t₁</a> <a id="5551" href="Function.Inverse.html#5551" class="Bound">t₂</a><a id="5553" class="Symbol">}</a> <a id="5555" class="Symbol">{</a><a id="5556" href="Function.Inverse.html#5556" class="Bound">From</a> <a id="5561" class="Symbol">:</a> <a id="5563" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="5570" href="Function.Inverse.html#5542" class="Bound">f₁</a> <a id="5573" href="Function.Inverse.html#5545" class="Bound">f₂</a><a id="5575" class="Symbol">}</a> <a id="5577" class="Symbol">{</a><a id="5578" href="Function.Inverse.html#5578" class="Bound">To</a> <a id="5581" class="Symbol">:</a> <a id="5583" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="5590" href="Function.Inverse.html#5548" class="Bound">t₁</a> <a id="5593" href="Function.Inverse.html#5551" class="Bound">t₂</a><a id="5595" class="Symbol">}</a> <a id="5597" class="Symbol"></a>
<a id="5605" class="Symbol">(</a><a id="5606" href="Function.Inverse.html#5606" class="Bound">t</a> <a id="5608" class="Symbol">:</a> <a id="5610" class="Symbol">(</a><a id="5611" href="Function.Inverse.html#5404" class="Bound">From₁</a> <a id="5617" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5619" href="Function.Inverse.html#5429" class="Bound">To₁</a><a id="5622" class="Symbol">)</a> <a id="5624" class="Symbol"></a> <a id="5626" class="Symbol">(</a><a id="5627" href="Function.Inverse.html#5486" class="Bound">From₂</a> <a id="5633" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5635" href="Function.Inverse.html#5511" class="Bound">To₂</a><a id="5638" class="Symbol">)</a> <a id="5640" class="Symbol"></a> <a id="5642" class="Symbol">(</a><a id="5643" href="Function.Inverse.html#5556" class="Bound">From</a> <a id="5648" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5650" href="Function.Inverse.html#5578" class="Bound">To</a><a id="5652" class="Symbol">))</a> <a id="5655" class="Symbol"></a>
<a id="5663" class="Symbol">(</a><a id="5664" href="Function.Inverse.html#5664" class="Bound">f</a> <a id="5666" class="Symbol">:</a> <a id="5668" class="Symbol">(</a><a id="5669" href="Function.Inverse.html#5429" class="Bound">To₁</a> <a id="5673" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5675" href="Function.Inverse.html#5404" class="Bound">From₁</a><a id="5680" class="Symbol">)</a> <a id="5682" class="Symbol"></a> <a id="5684" class="Symbol">(</a><a id="5685" href="Function.Inverse.html#5511" class="Bound">To₂</a> <a id="5689" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5691" href="Function.Inverse.html#5486" class="Bound">From₂</a><a id="5696" class="Symbol">)</a> <a id="5698" class="Symbol"></a> <a id="5700" class="Symbol">(</a><a id="5701" href="Function.Inverse.html#5578" class="Bound">To</a> <a id="5704" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="5706" href="Function.Inverse.html#5556" class="Bound">From</a><a id="5710" class="Symbol">))</a> <a id="5713" class="Symbol"></a>
<a id="5721" class="Symbol">(∀</a> <a id="5724" class="Symbol">{</a><a id="5725" href="Function.Inverse.html#5725" class="Bound">to₁</a> <a id="5729" href="Function.Inverse.html#5729" class="Bound">from₁</a> <a id="5735" href="Function.Inverse.html#5735" class="Bound">to₂</a> <a id="5739" href="Function.Inverse.html#5739" class="Bound">from₂</a><a id="5744" class="Symbol">}</a> <a id="5746" class="Symbol"></a>
<a id="5757" href="Function.Inverse.html#5729" class="Bound">from₁</a> <a id="5763" href="Function.Inverse.html#972" class="Record Operator">InverseOf</a> <a id="5773" href="Function.Inverse.html#5725" class="Bound">to₁</a> <a id="5777" class="Symbol"></a> <a id="5779" href="Function.Inverse.html#5739" class="Bound">from₂</a> <a id="5785" href="Function.Inverse.html#972" class="Record Operator">InverseOf</a> <a id="5795" href="Function.Inverse.html#5735" class="Bound">to₂</a> <a id="5799" class="Symbol"></a>
<a id="5810" href="Function.Inverse.html#5664" class="Bound">f</a> <a id="5812" href="Function.Inverse.html#5729" class="Bound">from₁</a> <a id="5818" href="Function.Inverse.html#5739" class="Bound">from₂</a> <a id="5824" href="Function.Inverse.html#972" class="Record Operator">InverseOf</a> <a id="5834" href="Function.Inverse.html#5606" class="Bound">t</a> <a id="5836" href="Function.Inverse.html#5725" class="Bound">to₁</a> <a id="5840" href="Function.Inverse.html#5735" class="Bound">to₂</a><a id="5843" class="Symbol">)</a> <a id="5845" class="Symbol"></a>
<a id="5853" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="5861" href="Function.Inverse.html#5404" class="Bound">From₁</a> <a id="5867" href="Function.Inverse.html#5429" class="Bound">To₁</a> <a id="5871" class="Symbol"></a> <a id="5873" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="5881" href="Function.Inverse.html#5486" class="Bound">From₂</a> <a id="5887" href="Function.Inverse.html#5511" class="Bound">To₂</a> <a id="5891" class="Symbol"></a> <a id="5893" href="Function.Inverse.html#1394" class="Record">Inverse</a> <a id="5901" href="Function.Inverse.html#5556" class="Bound">From</a> <a id="5906" href="Function.Inverse.html#5578" class="Bound">To</a>
<a id="5909" href="Function.Inverse.html#5369" class="Function">zip</a> <a id="5913" href="Function.Inverse.html#5913" class="Bound">t</a> <a id="5915" href="Function.Inverse.html#5915" class="Bound">f</a> <a id="5917" href="Function.Inverse.html#5917" class="Bound">pres</a> <a id="5922" href="Function.Inverse.html#5922" class="Bound">eq₁</a> <a id="5926" href="Function.Inverse.html#5926" class="Bound">eq₂</a> <a id="5930" class="Symbol">=</a> <a id="5932" class="Keyword">record</a>
<a id="5941" class="Symbol">{</a> <a id="5943" href="Function.Inverse.html#1532" class="Field">to</a> <a id="5954" class="Symbol">=</a> <a id="5956" href="Function.Inverse.html#5913" class="Bound">t</a> <a id="5958" class="Symbol">(</a><a id="5959" href="Function.Inverse.html#1532" class="Field">to</a> <a id="5964" href="Function.Inverse.html#5922" class="Bound">eq₁</a><a id="5967" class="Symbol">)</a> <a id="5969" class="Symbol">(</a><a id="5970" href="Function.Inverse.html#1532" class="Field">to</a> <a id="5975" href="Function.Inverse.html#5926" class="Bound">eq₂</a><a id="5978" class="Symbol">)</a>
<a id="5982" class="Symbol">;</a> <a id="5984" href="Function.Inverse.html#1559" class="Field">from</a> <a id="5995" class="Symbol">=</a> <a id="5997" href="Function.Inverse.html#5915" class="Bound">f</a> <a id="5999" class="Symbol">(</a><a id="6000" href="Function.Inverse.html#1559" class="Field">from</a> <a id="6005" href="Function.Inverse.html#5922" class="Bound">eq₁</a><a id="6008" class="Symbol">)</a> <a id="6010" class="Symbol">(</a><a id="6011" href="Function.Inverse.html#1559" class="Field">from</a> <a id="6016" href="Function.Inverse.html#5926" class="Bound">eq₂</a><a id="6019" class="Symbol">)</a>
<a id="6023" class="Symbol">;</a> <a id="6025" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="6036" class="Symbol">=</a> <a id="6038" href="Function.Inverse.html#5917" class="Bound">pres</a> <a id="6043" class="Symbol">(</a><a id="6044" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="6055" href="Function.Inverse.html#5922" class="Bound">eq₁</a><a id="6058" class="Symbol">)</a> <a id="6060" class="Symbol">(</a><a id="6061" href="Function.Inverse.html#1586" class="Field">inverse-of</a> <a id="6072" href="Function.Inverse.html#5926" class="Bound">eq₂</a><a id="6075" class="Symbol">)</a>
<a id="6079" class="Symbol">}</a> <a id="6081" class="Keyword">where</a> <a id="6087" class="Keyword">open</a> <a id="6092" href="Function.Inverse.html#1394" class="Module">Inverse</a>
</pre></body></html>