mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
129 lines
No EOL
33 KiB
HTML
129 lines
No EOL
33 KiB
HTML
<!DOCTYPE HTML>
|
|
<html><head><meta charset="utf-8"><title>Function.Bijection</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">-- Bijections</a>
|
|
<a id="120" class="Comment">------------------------------------------------------------------------</a>
|
|
|
|
<a id="194" class="Symbol">{-#</a> <a id="198" class="Keyword">OPTIONS</a> <a id="206" class="Pragma">--cubical-compatible</a> <a id="227" class="Pragma">--safe</a> <a id="234" class="Symbol">#-}</a>
|
|
|
|
<a id="239" class="Comment">-- Note: use of the standard function hierarchy is encouraged. The</a>
|
|
<a id="306" class="Comment">-- module `Function` re-exports `Bijective`, `IsBijection` and</a>
|
|
<a id="369" class="Comment">-- `Bijection`. The alternative definitions found in this file will</a>
|
|
<a id="437" class="Comment">-- eventually be deprecated.</a>
|
|
|
|
<a id="467" class="Keyword">module</a> <a id="474" href="Function.Bijection.html" class="Module">Function.Bijection</a> <a id="493" class="Keyword">where</a>
|
|
|
|
<a id="500" class="Keyword">open</a> <a id="505" class="Keyword">import</a> <a id="512" href="Data.Product.html" class="Module">Data.Product</a>
|
|
<a id="525" class="Keyword">open</a> <a id="530" class="Keyword">import</a> <a id="537" href="Level.html" class="Module">Level</a>
|
|
<a id="543" class="Keyword">open</a> <a id="548" class="Keyword">import</a> <a id="555" href="Relation.Binary.html" class="Module">Relation.Binary</a>
|
|
<a id="571" class="Keyword">open</a> <a id="576" class="Keyword">import</a> <a id="583" href="Relation.Binary.PropositionalEquality.html" class="Module">Relation.Binary.PropositionalEquality</a> <a id="621" class="Symbol">as</a> <a id="624" class="Module">P</a>
|
|
<a id="626" class="Keyword">open</a> <a id="631" class="Keyword">import</a> <a id="638" href="Function.Equality.html" class="Module">Function.Equality</a> <a id="656" class="Symbol">as</a> <a id="659" class="Module">F</a>
|
|
<a id="663" class="Keyword">using</a> <a id="669" class="Symbol">(</a><a id="670" href="Function.Equality.html#1227" class="Function Operator">_⟶_</a><a id="673" class="Symbol">;</a> <a id="675" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a><a id="680" class="Symbol">)</a> <a id="682" class="Keyword">renaming</a> <a id="691" class="Symbol">(</a><a id="692" href="Function.Equality.html#1540" class="Function Operator">_∘_</a> <a id="696" class="Symbol">to</a> <a id="699" class="Function Operator">_⟪∘⟫_</a><a id="704" class="Symbol">)</a>
|
|
<a id="706" class="Keyword">open</a> <a id="711" class="Keyword">import</a> <a id="718" href="Function.Injection.html" class="Module">Function.Injection</a> <a id="739" class="Symbol">as</a> <a id="742" class="Module">Inj</a> <a id="747" class="Keyword">hiding</a> <a id="754" class="Symbol">(</a><a id="755" href="Function.Injection.html#2060" class="Function">id</a><a id="757" class="Symbol">;</a> <a id="759" href="Function.Injection.html#2171" class="Function Operator">_∘_</a><a id="762" class="Symbol">;</a> <a id="764" href="Function.Injection.html#1727" class="Function">injection</a><a id="773" class="Symbol">)</a>
|
|
<a id="775" class="Keyword">open</a> <a id="780" class="Keyword">import</a> <a id="787" href="Function.Surjection.html" class="Module">Function.Surjection</a> <a id="808" class="Symbol">as</a> <a id="811" class="Module">Surj</a> <a id="816" class="Keyword">hiding</a> <a id="823" class="Symbol">(</a><a id="824" href="Function.Surjection.html#3236" class="Function">id</a><a id="826" class="Symbol">;</a> <a id="828" href="Function.Surjection.html#3520" class="Function Operator">_∘_</a><a id="831" class="Symbol">;</a> <a id="833" href="Function.Surjection.html#2791" class="Function">surjection</a><a id="843" class="Symbol">)</a>
|
|
<a id="845" class="Keyword">open</a> <a id="850" class="Keyword">import</a> <a id="857" href="Function.LeftInverse.html" class="Module">Function.LeftInverse</a> <a id="878" class="Symbol">as</a> <a id="881" class="Module">Left</a> <a id="886" class="Keyword">hiding</a> <a id="893" class="Symbol">(</a><a id="894" href="Function.LeftInverse.html#3422" class="Function">id</a><a id="896" class="Symbol">;</a> <a id="898" href="Function.LeftInverse.html#3611" class="Function Operator">_∘_</a><a id="901" class="Symbol">;</a> <a id="903" href="Function.LeftInverse.html#3015" class="Function">leftInverse</a><a id="914" class="Symbol">)</a>
|
|
|
|
<a id="917" class="Comment">------------------------------------------------------------------------</a>
|
|
<a id="990" class="Comment">-- Bijective functions.</a>
|
|
|
|
<a id="1015" class="Keyword">record</a> <a id="Bijective"></a><a id="1022" href="Function.Bijection.html#1022" class="Record">Bijective</a> <a id="1032" class="Symbol">{</a><a id="1033" href="Function.Bijection.html#1033" class="Bound">f₁</a> <a id="1036" href="Function.Bijection.html#1036" class="Bound">f₂</a> <a id="1039" href="Function.Bijection.html#1039" class="Bound">t₁</a> <a id="1042" href="Function.Bijection.html#1042" class="Bound">t₂</a><a id="1044" class="Symbol">}</a>
|
|
<a id="1063" class="Symbol">{</a><a id="1064" href="Function.Bijection.html#1064" class="Bound">From</a> <a id="1069" class="Symbol">:</a> <a id="1071" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1078" href="Function.Bijection.html#1033" class="Bound">f₁</a> <a id="1081" href="Function.Bijection.html#1036" class="Bound">f₂</a><a id="1083" class="Symbol">}</a> <a id="1085" class="Symbol">{</a><a id="1086" href="Function.Bijection.html#1086" class="Bound">To</a> <a id="1089" class="Symbol">:</a> <a id="1091" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1098" href="Function.Bijection.html#1039" class="Bound">t₁</a> <a id="1101" href="Function.Bijection.html#1042" class="Bound">t₂</a><a id="1103" class="Symbol">}</a>
|
|
<a id="1122" class="Symbol">(</a><a id="1123" href="Function.Bijection.html#1123" class="Bound">to</a> <a id="1126" class="Symbol">:</a> <a id="1128" href="Function.Bijection.html#1064" class="Bound">From</a> <a id="1133" href="Function.Equality.html#1227" class="Function Operator">⟶</a> <a id="1135" href="Function.Bijection.html#1086" class="Bound">To</a><a id="1137" class="Symbol">)</a> <a id="1139" class="Symbol">:</a>
|
|
<a id="1158" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1162" class="Symbol">(</a><a id="1163" href="Function.Bijection.html#1033" class="Bound">f₁</a> <a id="1166" href="Agda.Primitive.html#804" class="Primitive Operator">⊔</a> <a id="1168" href="Function.Bijection.html#1036" class="Bound">f₂</a> <a id="1171" href="Agda.Primitive.html#804" class="Primitive Operator">⊔</a> <a id="1173" href="Function.Bijection.html#1039" class="Bound">t₁</a> <a id="1176" href="Agda.Primitive.html#804" class="Primitive Operator">⊔</a> <a id="1178" href="Function.Bijection.html#1042" class="Bound">t₂</a><a id="1180" class="Symbol">)</a> <a id="1182" class="Keyword">where</a>
|
|
<a id="1190" class="Keyword">field</a>
|
|
<a id="Bijective.injective"></a><a id="1200" href="Function.Bijection.html#1200" class="Field">injective</a> <a id="1211" class="Symbol">:</a> <a id="1213" href="Function.Injection.html#856" class="Function">Injective</a> <a id="1224" href="Function.Bijection.html#1123" class="Bound">to</a>
|
|
<a id="Bijective.surjective"></a><a id="1231" href="Function.Bijection.html#1231" class="Field">surjective</a> <a id="1242" class="Symbol">:</a> <a id="1244" href="Function.Surjection.html#1003" class="Record">Surjective</a> <a id="1255" href="Function.Bijection.html#1123" class="Bound">to</a>
|
|
|
|
<a id="1261" class="Keyword">open</a> <a id="1266" href="Function.Surjection.html#1003" class="Module">Surjective</a> <a id="1277" href="Function.Bijection.html#1231" class="Field">surjective</a> <a id="1288" class="Keyword">public</a>
|
|
|
|
<a id="Bijective.left-inverse-of"></a><a id="1298" href="Function.Bijection.html#1298" class="Function">left-inverse-of</a> <a id="1314" class="Symbol">:</a> <a id="1316" href="Function.Surjection.html#1185" class="Function">from</a> <a id="1321" href="Function.LeftInverse.html#998" class="Function Operator">LeftInverseOf</a> <a id="1335" href="Function.Bijection.html#1123" class="Bound">to</a>
|
|
<a id="1340" href="Function.Bijection.html#1298" class="Function">left-inverse-of</a> <a id="1356" href="Function.Bijection.html#1356" class="Bound">x</a> <a id="1358" class="Symbol">=</a> <a id="1360" href="Function.Bijection.html#1200" class="Field">injective</a> <a id="1370" class="Symbol">(</a><a id="1371" href="Function.Surjection.html#1218" class="Function">right-inverse-of</a> <a id="1388" class="Symbol">(</a><a id="1389" href="Function.Bijection.html#1123" class="Bound">to</a> <a id="1392" href="Function.Equality.html#1073" class="Field Operator">⟨$⟩</a> <a id="1396" href="Function.Bijection.html#1356" class="Bound">x</a><a id="1397" class="Symbol">))</a>
|
|
|
|
<a id="1401" class="Comment">------------------------------------------------------------------------</a>
|
|
<a id="1474" class="Comment">-- The set of all bijections between two setoids.</a>
|
|
|
|
<a id="1525" class="Keyword">record</a> <a id="Bijection"></a><a id="1532" href="Function.Bijection.html#1532" class="Record">Bijection</a> <a id="1542" class="Symbol">{</a><a id="1543" href="Function.Bijection.html#1543" class="Bound">f₁</a> <a id="1546" href="Function.Bijection.html#1546" class="Bound">f₂</a> <a id="1549" href="Function.Bijection.html#1549" class="Bound">t₁</a> <a id="1552" href="Function.Bijection.html#1552" class="Bound">t₂</a><a id="1554" class="Symbol">}</a>
|
|
<a id="1573" class="Symbol">(</a><a id="1574" href="Function.Bijection.html#1574" class="Bound">From</a> <a id="1579" class="Symbol">:</a> <a id="1581" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1588" href="Function.Bijection.html#1543" class="Bound">f₁</a> <a id="1591" href="Function.Bijection.html#1546" class="Bound">f₂</a><a id="1593" class="Symbol">)</a> <a id="1595" class="Symbol">(</a><a id="1596" href="Function.Bijection.html#1596" class="Bound">To</a> <a id="1599" class="Symbol">:</a> <a id="1601" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1608" href="Function.Bijection.html#1549" class="Bound">t₁</a> <a id="1611" href="Function.Bijection.html#1552" class="Bound">t₂</a><a id="1613" class="Symbol">)</a> <a id="1615" class="Symbol">:</a>
|
|
<a id="1634" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1638" class="Symbol">(</a><a id="1639" href="Function.Bijection.html#1543" class="Bound">f₁</a> <a id="1642" href="Agda.Primitive.html#804" class="Primitive Operator">⊔</a> <a id="1644" href="Function.Bijection.html#1546" class="Bound">f₂</a> <a id="1647" href="Agda.Primitive.html#804" class="Primitive Operator">⊔</a> <a id="1649" href="Function.Bijection.html#1549" class="Bound">t₁</a> <a id="1652" href="Agda.Primitive.html#804" class="Primitive Operator">⊔</a> <a id="1654" href="Function.Bijection.html#1552" class="Bound">t₂</a><a id="1656" class="Symbol">)</a> <a id="1658" class="Keyword">where</a>
|
|
<a id="1666" class="Keyword">field</a>
|
|
<a id="Bijection.to"></a><a id="1676" href="Function.Bijection.html#1676" class="Field">to</a> <a id="1686" class="Symbol">:</a> <a id="1688" href="Function.Bijection.html#1574" class="Bound">From</a> <a id="1693" href="Function.Equality.html#1227" class="Function Operator">⟶</a> <a id="1695" href="Function.Bijection.html#1596" class="Bound">To</a>
|
|
<a id="Bijection.bijective"></a><a id="1702" href="Function.Bijection.html#1702" class="Field">bijective</a> <a id="1712" class="Symbol">:</a> <a id="1714" href="Function.Bijection.html#1022" class="Record">Bijective</a> <a id="1724" href="Function.Bijection.html#1676" class="Field">to</a>
|
|
|
|
<a id="1730" class="Keyword">open</a> <a id="1735" href="Function.Bijection.html#1022" class="Module">Bijective</a> <a id="1745" href="Function.Bijection.html#1702" class="Field">bijective</a> <a id="1755" class="Keyword">public</a>
|
|
|
|
<a id="Bijection.injection"></a><a id="1765" href="Function.Bijection.html#1765" class="Function">injection</a> <a id="1775" class="Symbol">:</a> <a id="1777" href="Function.Injection.html#1231" class="Record">Injection</a> <a id="1787" href="Function.Bijection.html#1574" class="Bound">From</a> <a id="1792" href="Function.Bijection.html#1596" class="Bound">To</a>
|
|
<a id="1797" href="Function.Bijection.html#1765" class="Function">injection</a> <a id="1807" class="Symbol">=</a> <a id="1809" class="Keyword">record</a>
|
|
<a id="1820" class="Symbol">{</a> <a id="1822" href="Function.Injection.html#1375" class="Field">to</a> <a id="1832" class="Symbol">=</a> <a id="1834" href="Function.Bijection.html#1676" class="Field">to</a>
|
|
<a id="1841" class="Symbol">;</a> <a id="1843" href="Function.Injection.html#1401" class="Field">injective</a> <a id="1853" class="Symbol">=</a> <a id="1855" href="Function.Bijection.html#1200" class="Function">injective</a>
|
|
<a id="1869" class="Symbol">}</a>
|
|
|
|
<a id="Bijection.surjection"></a><a id="1874" href="Function.Bijection.html#1874" class="Function">surjection</a> <a id="1885" class="Symbol">:</a> <a id="1887" href="Function.Surjection.html#1400" class="Record">Surjection</a> <a id="1898" href="Function.Bijection.html#1574" class="Bound">From</a> <a id="1903" href="Function.Bijection.html#1596" class="Bound">To</a>
|
|
<a id="1908" href="Function.Bijection.html#1874" class="Function">surjection</a> <a id="1919" class="Symbol">=</a> <a id="1921" class="Keyword">record</a>
|
|
<a id="1932" class="Symbol">{</a> <a id="1934" href="Function.Surjection.html#1547" class="Field">to</a> <a id="1945" class="Symbol">=</a> <a id="1947" href="Function.Bijection.html#1676" class="Field">to</a>
|
|
<a id="1954" class="Symbol">;</a> <a id="1956" href="Function.Surjection.html#1574" class="Field">surjective</a> <a id="1967" class="Symbol">=</a> <a id="1969" href="Function.Bijection.html#1231" class="Function">surjective</a>
|
|
<a id="1984" class="Symbol">}</a>
|
|
|
|
<a id="1989" class="Keyword">open</a> <a id="1994" href="Function.Surjection.html#1400" class="Module">Surjection</a> <a id="2005" href="Function.Bijection.html#1874" class="Function">surjection</a> <a id="2016" class="Keyword">public</a>
|
|
<a id="2027" class="Keyword">using</a> <a id="2033" class="Symbol">(</a><a id="2034" href="Function.Surjection.html#2056" class="Function">equivalence</a><a id="2045" class="Symbol">;</a> <a id="2047" href="Function.Surjection.html#1641" class="Function">right-inverse</a><a id="2060" class="Symbol">;</a> <a id="2062" href="Function.Surjection.html#1881" class="Function">from-to</a><a id="2069" class="Symbol">)</a>
|
|
|
|
<a id="Bijection.left-inverse"></a><a id="2074" href="Function.Bijection.html#2074" class="Function">left-inverse</a> <a id="2087" class="Symbol">:</a> <a id="2089" href="Function.LeftInverse.html#1485" class="Record">LeftInverse</a> <a id="2101" href="Function.Bijection.html#1574" class="Bound">From</a> <a id="2106" href="Function.Bijection.html#1596" class="Bound">To</a>
|
|
<a id="2111" href="Function.Bijection.html#2074" class="Function">left-inverse</a> <a id="2124" class="Symbol">=</a> <a id="2126" class="Keyword">record</a>
|
|
<a id="2137" class="Symbol">{</a> <a id="2139" href="Function.LeftInverse.html#1635" class="Field">to</a> <a id="2155" class="Symbol">=</a> <a id="2157" href="Function.Bijection.html#1676" class="Field">to</a>
|
|
<a id="2164" class="Symbol">;</a> <a id="2166" href="Function.LeftInverse.html#1667" class="Field">from</a> <a id="2182" class="Symbol">=</a> <a id="2184" href="Function.Surjection.html#1185" class="Function">from</a>
|
|
<a id="2193" class="Symbol">;</a> <a id="2195" href="Function.LeftInverse.html#1699" class="Field">left-inverse-of</a> <a id="2211" class="Symbol">=</a> <a id="2213" href="Function.Bijection.html#1298" class="Function">left-inverse-of</a>
|
|
<a id="2233" class="Symbol">}</a>
|
|
|
|
<a id="2238" class="Keyword">open</a> <a id="2243" href="Function.LeftInverse.html#1485" class="Module">LeftInverse</a> <a id="2255" href="Function.Bijection.html#2074" class="Function">left-inverse</a> <a id="2268" class="Keyword">public</a> <a id="2275" class="Keyword">using</a> <a id="2281" class="Symbol">(</a><a id="2282" href="Function.LeftInverse.html#2264" class="Function">to-from</a><a id="2289" class="Symbol">)</a>
|
|
|
|
<a id="2292" class="Comment">------------------------------------------------------------------------</a>
|
|
<a id="2365" class="Comment">-- The set of all bijections between two sets (i.e. bijections with</a>
|
|
<a id="2433" class="Comment">-- propositional equality)</a>
|
|
|
|
<a id="2461" class="Keyword">infix</a> <a id="2467" class="Number">3</a> <a id="2469" href="Function.Bijection.html#2474" class="Function Operator">_⤖_</a>
|
|
|
|
<a id="_⤖_"></a><a id="2474" href="Function.Bijection.html#2474" class="Function Operator">_⤖_</a> <a id="2478" class="Symbol">:</a> <a id="2480" class="Symbol">∀</a> <a id="2482" class="Symbol">{</a><a id="2483" href="Function.Bijection.html#2483" class="Bound">f</a> <a id="2485" href="Function.Bijection.html#2485" class="Bound">t</a><a id="2486" class="Symbol">}</a> <a id="2488" class="Symbol">→</a> <a id="2490" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2494" href="Function.Bijection.html#2483" class="Bound">f</a> <a id="2496" class="Symbol">→</a> <a id="2498" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2502" href="Function.Bijection.html#2485" class="Bound">t</a> <a id="2504" class="Symbol">→</a> <a id="2506" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2510" class="Symbol">_</a>
|
|
<a id="2512" href="Function.Bijection.html#2512" class="Bound">From</a> <a id="2517" href="Function.Bijection.html#2474" class="Function Operator">⤖</a> <a id="2519" href="Function.Bijection.html#2519" class="Bound">To</a> <a id="2522" class="Symbol">=</a> <a id="2524" href="Function.Bijection.html#1532" class="Record">Bijection</a> <a id="2534" class="Symbol">(</a><a id="2535" href="Relation.Binary.PropositionalEquality.Properties.html#3981" class="Function">P.setoid</a> <a id="2544" href="Function.Bijection.html#2512" class="Bound">From</a><a id="2548" class="Symbol">)</a> <a id="2550" class="Symbol">(</a><a id="2551" href="Relation.Binary.PropositionalEquality.Properties.html#3981" class="Function">P.setoid</a> <a id="2560" href="Function.Bijection.html#2519" class="Bound">To</a><a id="2562" class="Symbol">)</a>
|
|
|
|
<a id="bijection"></a><a id="2565" href="Function.Bijection.html#2565" class="Function">bijection</a> <a id="2575" class="Symbol">:</a> <a id="2577" class="Symbol">∀</a> <a id="2579" class="Symbol">{</a><a id="2580" href="Function.Bijection.html#2580" class="Bound">f</a> <a id="2582" href="Function.Bijection.html#2582" class="Bound">t</a><a id="2583" class="Symbol">}</a> <a id="2585" class="Symbol">{</a><a id="2586" href="Function.Bijection.html#2586" class="Bound">From</a> <a id="2591" class="Symbol">:</a> <a id="2593" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2597" href="Function.Bijection.html#2580" class="Bound">f</a><a id="2598" class="Symbol">}</a> <a id="2600" class="Symbol">{</a><a id="2601" href="Function.Bijection.html#2601" class="Bound">To</a> <a id="2604" class="Symbol">:</a> <a id="2606" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2610" href="Function.Bijection.html#2582" class="Bound">t</a><a id="2611" class="Symbol">}</a> <a id="2613" class="Symbol">→</a>
|
|
<a id="2627" class="Symbol">(</a><a id="2628" href="Function.Bijection.html#2628" class="Bound">to</a> <a id="2631" class="Symbol">:</a> <a id="2633" href="Function.Bijection.html#2586" class="Bound">From</a> <a id="2638" class="Symbol">→</a> <a id="2640" href="Function.Bijection.html#2601" class="Bound">To</a><a id="2642" class="Symbol">)</a> <a id="2644" class="Symbol">(</a><a id="2645" href="Function.Bijection.html#2645" class="Bound">from</a> <a id="2650" class="Symbol">:</a> <a id="2652" href="Function.Bijection.html#2601" class="Bound">To</a> <a id="2655" class="Symbol">→</a> <a id="2657" href="Function.Bijection.html#2586" class="Bound">From</a><a id="2661" class="Symbol">)</a> <a id="2663" class="Symbol">→</a>
|
|
<a id="2677" class="Symbol">(∀</a> <a id="2680" class="Symbol">{</a><a id="2681" href="Function.Bijection.html#2681" class="Bound">x</a> <a id="2683" href="Function.Bijection.html#2683" class="Bound">y</a><a id="2684" class="Symbol">}</a> <a id="2686" class="Symbol">→</a> <a id="2688" href="Function.Bijection.html#2628" class="Bound">to</a> <a id="2691" href="Function.Bijection.html#2681" class="Bound">x</a> <a id="2693" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">≡</a> <a id="2695" href="Function.Bijection.html#2628" class="Bound">to</a> <a id="2698" href="Function.Bijection.html#2683" class="Bound">y</a> <a id="2700" class="Symbol">→</a> <a id="2702" href="Function.Bijection.html#2681" class="Bound">x</a> <a id="2704" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">≡</a> <a id="2706" href="Function.Bijection.html#2683" class="Bound">y</a><a id="2707" class="Symbol">)</a> <a id="2709" class="Symbol">→</a>
|
|
<a id="2723" class="Symbol">(∀</a> <a id="2726" href="Function.Bijection.html#2726" class="Bound">x</a> <a id="2728" class="Symbol">→</a> <a id="2730" href="Function.Bijection.html#2628" class="Bound">to</a> <a id="2733" class="Symbol">(</a><a id="2734" href="Function.Bijection.html#2645" class="Bound">from</a> <a id="2739" href="Function.Bijection.html#2726" class="Bound">x</a><a id="2740" class="Symbol">)</a> <a id="2742" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">≡</a> <a id="2744" href="Function.Bijection.html#2726" class="Bound">x</a><a id="2745" class="Symbol">)</a> <a id="2747" class="Symbol">→</a>
|
|
<a id="2761" href="Function.Bijection.html#2586" class="Bound">From</a> <a id="2766" href="Function.Bijection.html#2474" class="Function Operator">⤖</a> <a id="2768" href="Function.Bijection.html#2601" class="Bound">To</a>
|
|
<a id="2771" href="Function.Bijection.html#2565" class="Function">bijection</a> <a id="2781" href="Function.Bijection.html#2781" class="Bound">to</a> <a id="2784" href="Function.Bijection.html#2784" class="Bound">from</a> <a id="2789" href="Function.Bijection.html#2789" class="Bound">inj</a> <a id="2793" href="Function.Bijection.html#2793" class="Bound">invʳ</a> <a id="2798" class="Symbol">=</a> <a id="2800" class="Keyword">record</a>
|
|
<a id="2809" class="Symbol">{</a> <a id="2811" href="Function.Bijection.html#1676" class="Field">to</a> <a id="2821" class="Symbol">=</a> <a id="2823" href="Relation.Binary.PropositionalEquality.html#1807" class="Function">P.→-to-⟶</a> <a id="2832" href="Function.Bijection.html#2781" class="Bound">to</a>
|
|
<a id="2837" class="Symbol">;</a> <a id="2839" href="Function.Bijection.html#1702" class="Field">bijective</a> <a id="2849" class="Symbol">=</a> <a id="2851" class="Keyword">record</a>
|
|
<a id="2862" class="Symbol">{</a> <a id="2864" href="Function.Bijection.html#1200" class="Field">injective</a> <a id="2875" class="Symbol">=</a> <a id="2877" href="Function.Bijection.html#2789" class="Bound">inj</a>
|
|
<a id="2885" class="Symbol">;</a> <a id="2887" href="Function.Bijection.html#1231" class="Field">surjective</a> <a id="2898" class="Symbol">=</a> <a id="2900" class="Keyword">record</a>
|
|
<a id="2913" class="Symbol">{</a> <a id="2915" href="Function.Surjection.html#1185" class="Field">from</a> <a id="2932" class="Symbol">=</a> <a id="2934" href="Relation.Binary.PropositionalEquality.html#1807" class="Function">P.→-to-⟶</a> <a id="2943" href="Function.Bijection.html#2784" class="Bound">from</a>
|
|
<a id="2954" class="Symbol">;</a> <a id="2956" href="Function.Surjection.html#1218" class="Field">right-inverse-of</a> <a id="2973" class="Symbol">=</a> <a id="2975" href="Function.Bijection.html#2793" class="Bound">invʳ</a>
|
|
<a id="2986" class="Symbol">}</a>
|
|
<a id="2992" class="Symbol">}</a>
|
|
<a id="2996" class="Symbol">}</a>
|
|
|
|
<a id="2999" class="Comment">------------------------------------------------------------------------</a>
|
|
<a id="3072" class="Comment">-- Identity and composition. (Note that these proofs are superfluous,</a>
|
|
<a id="3142" class="Comment">-- given that Bijection is equivalent to Function.Inverse.Inverse.)</a>
|
|
|
|
<a id="id"></a><a id="3211" href="Function.Bijection.html#3211" class="Function">id</a> <a id="3214" class="Symbol">:</a> <a id="3216" class="Symbol">∀</a> <a id="3218" class="Symbol">{</a><a id="3219" href="Function.Bijection.html#3219" class="Bound">s₁</a> <a id="3222" href="Function.Bijection.html#3222" class="Bound">s₂</a><a id="3224" class="Symbol">}</a> <a id="3226" class="Symbol">{</a><a id="3227" href="Function.Bijection.html#3227" class="Bound">S</a> <a id="3229" class="Symbol">:</a> <a id="3231" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3238" href="Function.Bijection.html#3219" class="Bound">s₁</a> <a id="3241" href="Function.Bijection.html#3222" class="Bound">s₂</a><a id="3243" class="Symbol">}</a> <a id="3245" class="Symbol">→</a> <a id="3247" href="Function.Bijection.html#1532" class="Record">Bijection</a> <a id="3257" href="Function.Bijection.html#3227" class="Bound">S</a> <a id="3259" href="Function.Bijection.html#3227" class="Bound">S</a>
|
|
<a id="3261" href="Function.Bijection.html#3211" class="Function">id</a> <a id="3264" class="Symbol">{</a><a id="3265" class="Argument">S</a> <a id="3267" class="Symbol">=</a> <a id="3269" href="Function.Bijection.html#3269" class="Bound">S</a><a id="3270" class="Symbol">}</a> <a id="3272" class="Symbol">=</a> <a id="3274" class="Keyword">record</a>
|
|
<a id="3283" class="Symbol">{</a> <a id="3285" href="Function.Bijection.html#1676" class="Field">to</a> <a id="3295" class="Symbol">=</a> <a id="3297" href="Function.Equality.html#1437" class="Function">F.id</a>
|
|
<a id="3304" class="Symbol">;</a> <a id="3306" href="Function.Bijection.html#1702" class="Field">bijective</a> <a id="3316" class="Symbol">=</a> <a id="3318" class="Keyword">record</a>
|
|
<a id="3329" class="Symbol">{</a> <a id="3331" href="Function.Bijection.html#1200" class="Field">injective</a> <a id="3342" class="Symbol">=</a> <a id="3345" href="Function.Injection.html#1401" class="Field">Injection.injective</a> <a id="3367" class="Symbol">(</a><a id="3368" href="Function.Injection.html#2060" class="Function">Inj.id</a> <a id="3375" class="Symbol">{</a><a id="3376" class="Argument">S</a> <a id="3378" class="Symbol">=</a> <a id="3380" href="Function.Bijection.html#3269" class="Bound">S</a><a id="3381" class="Symbol">})</a>
|
|
<a id="3388" class="Symbol">;</a> <a id="3390" href="Function.Bijection.html#1231" class="Field">surjective</a> <a id="3401" class="Symbol">=</a> <a id="3403" href="Function.Surjection.html#1574" class="Field">Surjection.surjective</a> <a id="3425" class="Symbol">(</a><a id="3426" href="Function.Surjection.html#3236" class="Function">Surj.id</a> <a id="3434" class="Symbol">{</a><a id="3435" class="Argument">S</a> <a id="3437" class="Symbol">=</a> <a id="3439" href="Function.Bijection.html#3269" class="Bound">S</a><a id="3440" class="Symbol">})</a>
|
|
<a id="3447" class="Symbol">}</a>
|
|
<a id="3451" class="Symbol">}</a>
|
|
|
|
<a id="3454" class="Keyword">infixr</a> <a id="3461" class="Number">9</a> <a id="3463" href="Function.Bijection.html#3468" class="Function Operator">_∘_</a>
|
|
|
|
<a id="_∘_"></a><a id="3468" href="Function.Bijection.html#3468" class="Function Operator">_∘_</a> <a id="3472" class="Symbol">:</a> <a id="3474" class="Symbol">∀</a> <a id="3476" class="Symbol">{</a><a id="3477" href="Function.Bijection.html#3477" class="Bound">f₁</a> <a id="3480" href="Function.Bijection.html#3480" class="Bound">f₂</a> <a id="3483" href="Function.Bijection.html#3483" class="Bound">m₁</a> <a id="3486" href="Function.Bijection.html#3486" class="Bound">m₂</a> <a id="3489" href="Function.Bijection.html#3489" class="Bound">t₁</a> <a id="3492" href="Function.Bijection.html#3492" class="Bound">t₂</a><a id="3494" class="Symbol">}</a>
|
|
<a id="3504" class="Symbol">{</a><a id="3505" href="Function.Bijection.html#3505" class="Bound">F</a> <a id="3507" class="Symbol">:</a> <a id="3509" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3516" href="Function.Bijection.html#3477" class="Bound">f₁</a> <a id="3519" href="Function.Bijection.html#3480" class="Bound">f₂</a><a id="3521" class="Symbol">}</a> <a id="3523" class="Symbol">{</a><a id="3524" href="Function.Bijection.html#3524" class="Bound">M</a> <a id="3526" class="Symbol">:</a> <a id="3528" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3535" href="Function.Bijection.html#3483" class="Bound">m₁</a> <a id="3538" href="Function.Bijection.html#3486" class="Bound">m₂</a><a id="3540" class="Symbol">}</a> <a id="3542" class="Symbol">{</a><a id="3543" href="Function.Bijection.html#3543" class="Bound">T</a> <a id="3545" class="Symbol">:</a> <a id="3547" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3554" href="Function.Bijection.html#3489" class="Bound">t₁</a> <a id="3557" href="Function.Bijection.html#3492" class="Bound">t₂</a><a id="3559" class="Symbol">}</a> <a id="3561" class="Symbol">→</a>
|
|
<a id="3569" href="Function.Bijection.html#1532" class="Record">Bijection</a> <a id="3579" href="Function.Bijection.html#3524" class="Bound">M</a> <a id="3581" href="Function.Bijection.html#3543" class="Bound">T</a> <a id="3583" class="Symbol">→</a> <a id="3585" href="Function.Bijection.html#1532" class="Record">Bijection</a> <a id="3595" href="Function.Bijection.html#3505" class="Bound">F</a> <a id="3597" href="Function.Bijection.html#3524" class="Bound">M</a> <a id="3599" class="Symbol">→</a> <a id="3601" href="Function.Bijection.html#1532" class="Record">Bijection</a> <a id="3611" href="Function.Bijection.html#3505" class="Bound">F</a> <a id="3613" href="Function.Bijection.html#3543" class="Bound">T</a>
|
|
<a id="3615" href="Function.Bijection.html#3615" class="Bound">f</a> <a id="3617" href="Function.Bijection.html#3468" class="Function Operator">∘</a> <a id="3619" href="Function.Bijection.html#3619" class="Bound">g</a> <a id="3621" class="Symbol">=</a> <a id="3623" class="Keyword">record</a>
|
|
<a id="3632" class="Symbol">{</a> <a id="3634" href="Function.Bijection.html#1676" class="Field">to</a> <a id="3644" class="Symbol">=</a> <a id="3646" href="Function.Bijection.html#1676" class="Field">to</a> <a id="3649" href="Function.Bijection.html#3615" class="Bound">f</a> <a id="3651" href="Function.Bijection.html#699" class="Function Operator">⟪∘⟫</a> <a id="3655" href="Function.Bijection.html#1676" class="Field">to</a> <a id="3658" href="Function.Bijection.html#3619" class="Bound">g</a>
|
|
<a id="3662" class="Symbol">;</a> <a id="3664" href="Function.Bijection.html#1702" class="Field">bijective</a> <a id="3674" class="Symbol">=</a> <a id="3676" class="Keyword">record</a>
|
|
<a id="3687" class="Symbol">{</a> <a id="3689" href="Function.Bijection.html#1200" class="Field">injective</a> <a id="3700" class="Symbol">=</a> <a id="3703" href="Function.Injection.html#1401" class="Field">Injection.injective</a> <a id="3725" class="Symbol">(</a><a id="3726" href="Function.Injection.html#2171" class="Function Operator">Inj._∘_</a> <a id="3735" class="Symbol">(</a><a id="3736" href="Function.Bijection.html#1765" class="Function">injection</a> <a id="3746" href="Function.Bijection.html#3615" class="Bound">f</a><a id="3747" class="Symbol">)</a> <a id="3750" class="Symbol">(</a><a id="3751" href="Function.Bijection.html#1765" class="Function">injection</a> <a id="3761" href="Function.Bijection.html#3619" class="Bound">g</a><a id="3762" class="Symbol">))</a>
|
|
<a id="3769" class="Symbol">;</a> <a id="3771" href="Function.Bijection.html#1231" class="Field">surjective</a> <a id="3782" class="Symbol">=</a> <a id="3784" href="Function.Surjection.html#1574" class="Field">Surjection.surjective</a> <a id="3806" class="Symbol">(</a><a id="3807" href="Function.Surjection.html#3520" class="Function Operator">Surj._∘_</a> <a id="3816" class="Symbol">(</a><a id="3817" href="Function.Bijection.html#1874" class="Function">surjection</a> <a id="3828" href="Function.Bijection.html#3615" class="Bound">f</a><a id="3829" class="Symbol">)</a> <a id="3831" class="Symbol">(</a><a id="3832" href="Function.Bijection.html#1874" class="Function">surjection</a> <a id="3843" href="Function.Bijection.html#3619" class="Bound">g</a><a id="3844" class="Symbol">))</a>
|
|
<a id="3851" class="Symbol">}</a>
|
|
<a id="3855" class="Symbol">}</a> <a id="3857" class="Keyword">where</a> <a id="3863" class="Keyword">open</a> <a id="3868" href="Function.Bijection.html#1532" class="Module">Bijection</a>
|
|
</pre></body></html> |