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

126 lines
No EOL
39 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.Equality</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">-- Function setoids and related constructions</a>
<a id="152" class="Comment">------------------------------------------------------------------------</a>
<a id="226" class="Symbol">{-#</a> <a id="230" class="Keyword">OPTIONS</a> <a id="238" class="Pragma">--cubical-compatible</a> <a id="259" class="Pragma">--safe</a> <a id="266" class="Symbol">#-}</a>
<a id="271" class="Comment">-- Note: use of the standard function hierarchy is encouraged. The</a>
<a id="338" class="Comment">-- module `Function` re-exports `Congruent`, `IsBijection` and</a>
<a id="401" class="Comment">-- `Bijection`. The alternative definitions found in this file will</a>
<a id="469" class="Comment">-- eventually be deprecated.</a>
<a id="499" class="Keyword">module</a> <a id="506" href="Function.Equality.html" class="Module">Function.Equality</a> <a id="524" class="Keyword">where</a>
<a id="531" class="Keyword">import</a> <a id="538" href="Function.Base.html" class="Module">Function.Base</a> <a id="552" class="Symbol">as</a> <a id="555" class="Module">Fun</a>
<a id="559" class="Keyword">open</a> <a id="564" class="Keyword">import</a> <a id="571" href="Level.html" class="Module">Level</a>
<a id="577" class="Keyword">open</a> <a id="582" class="Keyword">import</a> <a id="589" href="Relation.Binary.html" class="Module">Relation.Binary</a> <a id="605" class="Keyword">using</a> <a id="611" class="Symbol">(</a><a id="612" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a><a id="618" class="Symbol">)</a>
<a id="620" class="Keyword">open</a> <a id="625" class="Keyword">import</a> <a id="632" href="Relation.Binary.Indexed.Heterogeneous.html" class="Module">Relation.Binary.Indexed.Heterogeneous</a>
<a id="672" class="Keyword">using</a> <a id="678" class="Symbol">(</a><a id="679" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#798" class="Record">IndexedSetoid</a><a id="692" class="Symbol">;</a> <a id="694" href="Relation.Binary.Indexed.Heterogeneous.Core.html#1071" class="Function Operator">_=[_]⇒_</a><a id="701" class="Symbol">)</a>
<a id="703" class="Keyword">import</a> <a id="710" href="Relation.Binary.Indexed.Heterogeneous.Construct.Trivial.html" class="Module">Relation.Binary.Indexed.Heterogeneous.Construct.Trivial</a>
<a id="768" class="Symbol">as</a> <a id="771" class="Module">Trivial</a>
<a id="780" class="Comment">------------------------------------------------------------------------</a>
<a id="853" class="Comment">-- Functions which preserve equality</a>
<a id="891" class="Keyword">record</a> <a id="Π"></a><a id="898" href="Function.Equality.html#898" class="Record">Π</a> <a id="900" class="Symbol">{</a><a id="901" href="Function.Equality.html#901" class="Bound">f₁</a> <a id="904" href="Function.Equality.html#904" class="Bound">f₂</a> <a id="907" href="Function.Equality.html#907" class="Bound">t₁</a> <a id="910" href="Function.Equality.html#910" class="Bound">t₂</a><a id="912" class="Symbol">}</a>
<a id="923" class="Symbol">(</a><a id="924" href="Function.Equality.html#924" class="Bound">From</a> <a id="929" class="Symbol">:</a> <a id="931" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="938" href="Function.Equality.html#901" class="Bound">f₁</a> <a id="941" href="Function.Equality.html#904" class="Bound">f₂</a><a id="943" class="Symbol">)</a>
<a id="954" class="Symbol">(</a><a id="955" href="Function.Equality.html#955" class="Bound">To</a> <a id="958" class="Symbol">:</a> <a id="960" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#798" class="Record">IndexedSetoid</a> <a id="974" class="Symbol">(</a><a id="975" href="Relation.Binary.Bundles.html#1081" class="Field">Setoid.Carrier</a> <a id="990" href="Function.Equality.html#924" class="Bound">From</a><a id="994" class="Symbol">)</a> <a id="996" href="Function.Equality.html#907" class="Bound">t₁</a> <a id="999" href="Function.Equality.html#910" class="Bound">t₂</a><a id="1001" class="Symbol">)</a> <a id="1003" class="Symbol">:</a>
<a id="1014" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1018" class="Symbol">(</a><a id="1019" href="Function.Equality.html#901" class="Bound">f₁</a> <a id="1022" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1024" href="Function.Equality.html#904" class="Bound">f₂</a> <a id="1027" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1029" href="Function.Equality.html#907" class="Bound">t₁</a> <a id="1032" href="Agda.Primitive.html#804" class="Primitive Operator"></a> <a id="1034" href="Function.Equality.html#910" class="Bound">t₂</a><a id="1036" class="Symbol">)</a> <a id="1038" class="Keyword">where</a>
<a id="1046" class="Keyword">infixl</a> <a id="1053" class="Number">5</a> <a id="1055" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a>
<a id="1063" class="Keyword">field</a>
<a id="Π._⟨$⟩_"></a><a id="1073" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a> <a id="1079" class="Symbol">:</a> <a id="1081" class="Symbol">(</a><a id="1082" href="Function.Equality.html#1082" class="Bound">x</a> <a id="1084" class="Symbol">:</a> <a id="1086" href="Relation.Binary.Bundles.html#1081" class="Field">Setoid.Carrier</a> <a id="1101" href="Function.Equality.html#924" class="Bound">From</a><a id="1105" class="Symbol">)</a> <a id="1107" class="Symbol"></a> <a id="1109" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#888" class="Field">IndexedSetoid.Carrier</a> <a id="1131" href="Function.Equality.html#955" class="Bound">To</a> <a id="1134" href="Function.Equality.html#1082" class="Bound">x</a>
<a id="Π.cong"></a><a id="1140" href="Function.Equality.html#1140" class="Field">cong</a> <a id="1146" class="Symbol">:</a> <a id="1148" href="Relation.Binary.Bundles.html#1107" class="Field Operator">Setoid._≈_</a> <a id="1159" href="Function.Equality.html#924" class="Bound">From</a> <a id="1164" href="Relation.Binary.Indexed.Heterogeneous.Core.html#1071" class="Function Operator">=[</a> <a id="1167" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a> <a id="1173" href="Relation.Binary.Indexed.Heterogeneous.Core.html#1071" class="Function Operator">]⇒</a> <a id="1176" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#918" class="Field Operator">IndexedSetoid._≈_</a> <a id="1194" href="Function.Equality.html#955" class="Bound">To</a>
<a id="1198" class="Keyword">open</a> <a id="1203" href="Function.Equality.html#898" class="Module">Π</a> <a id="1205" class="Keyword">public</a>
<a id="1213" class="Keyword">infixr</a> <a id="1220" class="Number">0</a> <a id="1222" href="Function.Equality.html#1227" class="Function Operator">_⟶_</a>
<a id="_⟶_"></a><a id="1227" href="Function.Equality.html#1227" class="Function Operator">_⟶_</a> <a id="1231" class="Symbol">:</a> <a id="1233" class="Symbol"></a> <a id="1235" class="Symbol">{</a><a id="1236" href="Function.Equality.html#1236" class="Bound">f₁</a> <a id="1239" href="Function.Equality.html#1239" class="Bound">f₂</a> <a id="1242" href="Function.Equality.html#1242" class="Bound">t₁</a> <a id="1245" href="Function.Equality.html#1245" class="Bound">t₂</a><a id="1247" class="Symbol">}</a> <a id="1249" class="Symbol"></a> <a id="1251" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1258" href="Function.Equality.html#1236" class="Bound">f₁</a> <a id="1261" href="Function.Equality.html#1239" class="Bound">f₂</a> <a id="1264" class="Symbol"></a> <a id="1266" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1273" href="Function.Equality.html#1242" class="Bound">t₁</a> <a id="1276" href="Function.Equality.html#1245" class="Bound">t₂</a> <a id="1279" class="Symbol"></a> <a id="1281" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1285" class="Symbol">_</a>
<a id="1287" href="Function.Equality.html#1287" class="Bound">From</a> <a id="1292" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1294" href="Function.Equality.html#1294" class="Bound">To</a> <a id="1297" class="Symbol">=</a> <a id="1299" href="Function.Equality.html#898" class="Record">Π</a> <a id="1301" href="Function.Equality.html#1287" class="Bound">From</a> <a id="1306" class="Symbol">(</a><a id="1307" href="Relation.Binary.Indexed.Heterogeneous.Construct.Trivial.html#1379" class="Function">Trivial.indexedSetoid</a> <a id="1329" href="Function.Equality.html#1294" class="Bound">To</a><a id="1331" class="Symbol">)</a>
<a id="1334" class="Comment">------------------------------------------------------------------------</a>
<a id="1407" class="Comment">-- Identity and composition.</a>
<a id="id"></a><a id="1437" href="Function.Equality.html#1437" class="Function">id</a> <a id="1440" class="Symbol">:</a> <a id="1442" class="Symbol"></a> <a id="1444" class="Symbol">{</a><a id="1445" href="Function.Equality.html#1445" class="Bound">a₁</a> <a id="1448" href="Function.Equality.html#1448" class="Bound">a₂</a><a id="1450" class="Symbol">}</a> <a id="1452" class="Symbol">{</a><a id="1453" href="Function.Equality.html#1453" class="Bound">A</a> <a id="1455" class="Symbol">:</a> <a id="1457" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1464" href="Function.Equality.html#1445" class="Bound">a₁</a> <a id="1467" href="Function.Equality.html#1448" class="Bound">a₂</a><a id="1469" class="Symbol">}</a> <a id="1471" class="Symbol"></a> <a id="1473" href="Function.Equality.html#1453" class="Bound">A</a> <a id="1475" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1477" href="Function.Equality.html#1453" class="Bound">A</a>
<a id="1479" href="Function.Equality.html#1437" class="Function">id</a> <a id="1482" class="Symbol">=</a> <a id="1484" class="Keyword">record</a> <a id="1491" class="Symbol">{</a> <a id="1493" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a> <a id="1499" class="Symbol">=</a> <a id="1501" href="Function.Base.html#624" class="Function">Fun.id</a><a id="1507" class="Symbol">;</a> <a id="1509" href="Function.Equality.html#1140" class="Field">cong</a> <a id="1514" class="Symbol">=</a> <a id="1516" href="Function.Base.html#624" class="Function">Fun.id</a> <a id="1523" class="Symbol">}</a>
<a id="1526" class="Keyword">infixr</a> <a id="1533" class="Number">9</a> <a id="1535" href="Function.Equality.html#1540" class="Function Operator">_∘_</a>
<a id="_∘_"></a><a id="1540" href="Function.Equality.html#1540" class="Function Operator">_∘_</a> <a id="1544" class="Symbol">:</a> <a id="1546" class="Symbol"></a> <a id="1548" class="Symbol">{</a><a id="1549" href="Function.Equality.html#1549" class="Bound">a₁</a> <a id="1552" href="Function.Equality.html#1552" class="Bound">a₂</a><a id="1554" class="Symbol">}</a> <a id="1556" class="Symbol">{</a><a id="1557" href="Function.Equality.html#1557" class="Bound">A</a> <a id="1559" class="Symbol">:</a> <a id="1561" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1568" href="Function.Equality.html#1549" class="Bound">a₁</a> <a id="1571" href="Function.Equality.html#1552" class="Bound">a₂</a><a id="1573" class="Symbol">}</a>
<a id="1583" class="Symbol">{</a><a id="1584" href="Function.Equality.html#1584" class="Bound">b₁</a> <a id="1587" href="Function.Equality.html#1587" class="Bound">b₂</a><a id="1589" class="Symbol">}</a> <a id="1591" class="Symbol">{</a><a id="1592" href="Function.Equality.html#1592" class="Bound">B</a> <a id="1594" class="Symbol">:</a> <a id="1596" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1603" href="Function.Equality.html#1584" class="Bound">b₁</a> <a id="1606" href="Function.Equality.html#1587" class="Bound">b₂</a><a id="1608" class="Symbol">}</a>
<a id="1618" class="Symbol">{</a><a id="1619" href="Function.Equality.html#1619" class="Bound">c₁</a> <a id="1622" href="Function.Equality.html#1622" class="Bound">c₂</a><a id="1624" class="Symbol">}</a> <a id="1626" class="Symbol">{</a><a id="1627" href="Function.Equality.html#1627" class="Bound">C</a> <a id="1629" class="Symbol">:</a> <a id="1631" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1638" href="Function.Equality.html#1619" class="Bound">c₁</a> <a id="1641" href="Function.Equality.html#1622" class="Bound">c₂</a><a id="1643" class="Symbol">}</a> <a id="1645" class="Symbol"></a>
<a id="1653" href="Function.Equality.html#1592" class="Bound">B</a> <a id="1655" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1657" href="Function.Equality.html#1627" class="Bound">C</a> <a id="1659" class="Symbol"></a> <a id="1661" href="Function.Equality.html#1557" class="Bound">A</a> <a id="1663" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1665" href="Function.Equality.html#1592" class="Bound">B</a> <a id="1667" class="Symbol"></a> <a id="1669" href="Function.Equality.html#1557" class="Bound">A</a> <a id="1671" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1673" href="Function.Equality.html#1627" class="Bound">C</a>
<a id="1675" href="Function.Equality.html#1675" class="Bound">f</a> <a id="1677" href="Function.Equality.html#1540" class="Function Operator"></a> <a id="1679" href="Function.Equality.html#1679" class="Bound">g</a> <a id="1681" class="Symbol">=</a> <a id="1683" class="Keyword">record</a>
<a id="1692" class="Symbol">{</a> <a id="1694" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a> <a id="1700" class="Symbol">=</a> <a id="1702" href="Function.Base.html#1040" class="Function Operator">Fun._∘_</a> <a id="1710" class="Symbol">(</a><a id="1711" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a> <a id="1717" href="Function.Equality.html#1675" class="Bound">f</a><a id="1718" class="Symbol">)</a> <a id="1720" class="Symbol">(</a><a id="1721" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a> <a id="1727" href="Function.Equality.html#1679" class="Bound">g</a><a id="1728" class="Symbol">)</a>
<a id="1732" class="Symbol">;</a> <a id="1734" href="Function.Equality.html#1140" class="Field">cong</a> <a id="1740" class="Symbol">=</a> <a id="1742" href="Function.Base.html#1040" class="Function Operator">Fun._∘_</a> <a id="1750" class="Symbol">(</a><a id="1751" href="Function.Equality.html#1140" class="Field">cong</a> <a id="1757" href="Function.Equality.html#1675" class="Bound">f</a><a id="1758" class="Symbol">)</a> <a id="1760" class="Symbol">(</a><a id="1761" href="Function.Equality.html#1140" class="Field">cong</a> <a id="1767" href="Function.Equality.html#1679" class="Bound">g</a><a id="1768" class="Symbol">)</a>
<a id="1772" class="Symbol">}</a>
<a id="1775" class="Comment">-- Constant equality-preserving function.</a>
<a id="const"></a><a id="1818" href="Function.Equality.html#1818" class="Function">const</a> <a id="1824" class="Symbol">:</a> <a id="1826" class="Symbol"></a> <a id="1828" class="Symbol">{</a><a id="1829" href="Function.Equality.html#1829" class="Bound">a₁</a> <a id="1832" href="Function.Equality.html#1832" class="Bound">a₂</a><a id="1834" class="Symbol">}</a> <a id="1836" class="Symbol">{</a><a id="1837" href="Function.Equality.html#1837" class="Bound">A</a> <a id="1839" class="Symbol">:</a> <a id="1841" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1848" href="Function.Equality.html#1829" class="Bound">a₁</a> <a id="1851" href="Function.Equality.html#1832" class="Bound">a₂</a><a id="1853" class="Symbol">}</a>
<a id="1865" class="Symbol">{</a><a id="1866" href="Function.Equality.html#1866" class="Bound">b₁</a> <a id="1869" href="Function.Equality.html#1869" class="Bound">b₂</a><a id="1871" class="Symbol">}</a> <a id="1873" class="Symbol">{</a><a id="1874" href="Function.Equality.html#1874" class="Bound">B</a> <a id="1876" class="Symbol">:</a> <a id="1878" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="1885" href="Function.Equality.html#1866" class="Bound">b₁</a> <a id="1888" href="Function.Equality.html#1869" class="Bound">b₂</a><a id="1890" class="Symbol">}</a> <a id="1892" class="Symbol"></a>
<a id="1902" href="Relation.Binary.Bundles.html#1081" class="Field">Setoid.Carrier</a> <a id="1917" href="Function.Equality.html#1874" class="Bound">B</a> <a id="1919" class="Symbol"></a> <a id="1921" href="Function.Equality.html#1837" class="Bound">A</a> <a id="1923" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="1925" href="Function.Equality.html#1874" class="Bound">B</a>
<a id="1927" href="Function.Equality.html#1818" class="Function">const</a> <a id="1933" class="Symbol">{</a><a id="1934" class="Argument">B</a> <a id="1936" class="Symbol">=</a> <a id="1938" href="Function.Equality.html#1938" class="Bound">B</a><a id="1939" class="Symbol">}</a> <a id="1941" href="Function.Equality.html#1941" class="Bound">b</a> <a id="1943" class="Symbol">=</a> <a id="1945" class="Keyword">record</a>
<a id="1954" class="Symbol">{</a> <a id="1956" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a> <a id="1962" class="Symbol">=</a> <a id="1964" href="Function.Base.html#645" class="Function">Fun.const</a> <a id="1974" href="Function.Equality.html#1941" class="Bound">b</a>
<a id="1978" class="Symbol">;</a> <a id="1980" href="Function.Equality.html#1140" class="Field">cong</a> <a id="1986" class="Symbol">=</a> <a id="1988" href="Function.Base.html#645" class="Function">Fun.const</a> <a id="1998" class="Symbol">(</a><a id="1999" href="Relation.Binary.Structures.html#1577" class="Function">Setoid.refl</a> <a id="2011" href="Function.Equality.html#1938" class="Bound">B</a><a id="2012" class="Symbol">)</a>
<a id="2016" class="Symbol">}</a>
<a id="2019" class="Comment">------------------------------------------------------------------------</a>
<a id="2092" class="Comment">-- Function setoids</a>
<a id="2113" class="Comment">-- Dependent.</a>
<a id="setoid"></a><a id="2128" href="Function.Equality.html#2128" class="Function">setoid</a> <a id="2135" class="Symbol">:</a> <a id="2137" class="Symbol"></a> <a id="2139" class="Symbol">{</a><a id="2140" href="Function.Equality.html#2140" class="Bound">f₁</a> <a id="2143" href="Function.Equality.html#2143" class="Bound">f₂</a> <a id="2146" href="Function.Equality.html#2146" class="Bound">t₁</a> <a id="2149" href="Function.Equality.html#2149" class="Bound">t₂</a><a id="2151" class="Symbol">}</a>
<a id="2162" class="Symbol">(</a><a id="2163" href="Function.Equality.html#2163" class="Bound">From</a> <a id="2168" class="Symbol">:</a> <a id="2170" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="2177" href="Function.Equality.html#2140" class="Bound">f₁</a> <a id="2180" href="Function.Equality.html#2143" class="Bound">f₂</a><a id="2182" class="Symbol">)</a> <a id="2184" class="Symbol"></a>
<a id="2195" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#798" class="Record">IndexedSetoid</a> <a id="2209" class="Symbol">(</a><a id="2210" href="Relation.Binary.Bundles.html#1081" class="Field">Setoid.Carrier</a> <a id="2225" href="Function.Equality.html#2163" class="Bound">From</a><a id="2229" class="Symbol">)</a> <a id="2231" href="Function.Equality.html#2146" class="Bound">t₁</a> <a id="2234" href="Function.Equality.html#2149" class="Bound">t₂</a> <a id="2237" class="Symbol"></a>
<a id="2248" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="2255" class="Symbol">_</a> <a id="2257" class="Symbol">_</a>
<a id="2259" href="Function.Equality.html#2128" class="Function">setoid</a> <a id="2266" href="Function.Equality.html#2266" class="Bound">From</a> <a id="2271" href="Function.Equality.html#2271" class="Bound">To</a> <a id="2274" class="Symbol">=</a> <a id="2276" class="Keyword">record</a>
<a id="2285" class="Symbol">{</a> <a id="2287" href="Relation.Binary.Bundles.html#1081" class="Field">Carrier</a> <a id="2301" class="Symbol">=</a> <a id="2303" href="Function.Equality.html#898" class="Record">Π</a> <a id="2305" href="Function.Equality.html#2266" class="Bound">From</a> <a id="2310" href="Function.Equality.html#2271" class="Bound">To</a>
<a id="2315" class="Symbol">;</a> <a id="2317" href="Relation.Binary.Bundles.html#1107" class="Field Operator">_≈_</a> <a id="2331" class="Symbol">=</a> <a id="2333" class="Symbol">λ</a> <a id="2335" href="Function.Equality.html#2335" class="Bound">f</a> <a id="2337" href="Function.Equality.html#2337" class="Bound">g</a> <a id="2339" class="Symbol"></a> <a id="2341" class="Symbol"></a> <a id="2343" class="Symbol">{</a><a id="2344" href="Function.Equality.html#2344" class="Bound">x</a> <a id="2346" href="Function.Equality.html#2346" class="Bound">y</a><a id="2347" class="Symbol">}</a> <a id="2349" class="Symbol"></a> <a id="2351" href="Function.Equality.html#2344" class="Bound">x</a> <a id="2353" href="Function.Equality.html#2631" class="Function Operator">≈₁</a> <a id="2356" href="Function.Equality.html#2346" class="Bound">y</a> <a id="2358" class="Symbol"></a> <a id="2360" href="Function.Equality.html#2335" class="Bound">f</a> <a id="2362" href="Function.Equality.html#1073" class="Field Operator">⟨$⟩</a> <a id="2366" href="Function.Equality.html#2344" class="Bound">x</a> <a id="2368" href="Function.Equality.html#2701" class="Field Operator">≈₂</a> <a id="2371" href="Function.Equality.html#2337" class="Bound">g</a> <a id="2373" href="Function.Equality.html#1073" class="Field Operator">⟨$⟩</a> <a id="2377" href="Function.Equality.html#2346" class="Bound">y</a>
<a id="2381" class="Symbol">;</a> <a id="2383" href="Relation.Binary.Bundles.html#1141" class="Field">isEquivalence</a> <a id="2397" class="Symbol">=</a> <a id="2399" class="Keyword">record</a>
<a id="2410" class="Symbol">{</a> <a id="2412" href="Relation.Binary.Structures.html#1577" class="Field">refl</a> <a id="2418" class="Symbol">=</a> <a id="2420" class="Symbol">λ</a> <a id="2422" class="Symbol">{</a><a id="2423" href="Function.Equality.html#2423" class="Bound">f</a><a id="2424" class="Symbol">}</a> <a id="2426" class="Symbol"></a> <a id="2428" href="Function.Equality.html#1140" class="Field">cong</a> <a id="2433" href="Function.Equality.html#2423" class="Bound">f</a>
<a id="2439" class="Symbol">;</a> <a id="2441" href="Relation.Binary.Structures.html#1603" class="Field">sym</a> <a id="2447" class="Symbol">=</a> <a id="2449" class="Symbol">λ</a> <a id="2451" href="Function.Equality.html#2451" class="Bound">fg</a> <a id="2455" href="Function.Equality.html#2455" class="Bound">xy</a> <a id="2459" class="Symbol"></a> <a id="2461" href="Relation.Binary.Indexed.Heterogeneous.Structures.html#947" class="Function">To.sym</a> <a id="2468" class="Symbol">(</a><a id="2469" href="Function.Equality.html#2451" class="Bound">fg</a> <a id="2473" class="Symbol">(</a><a id="2474" href="Relation.Binary.Structures.html#1603" class="Function">From.sym</a> <a id="2483" href="Function.Equality.html#2455" class="Bound">xy</a><a id="2486" class="Symbol">))</a>
<a id="2493" class="Symbol">;</a> <a id="2495" href="Relation.Binary.Structures.html#1629" class="Field">trans</a> <a id="2501" class="Symbol">=</a> <a id="2503" class="Symbol">λ</a> <a id="2505" href="Function.Equality.html#2505" class="Bound">fg</a> <a id="2509" href="Function.Equality.html#2509" class="Bound">gh</a> <a id="2513" href="Function.Equality.html#2513" class="Bound">xy</a> <a id="2517" class="Symbol"></a> <a id="2519" href="Relation.Binary.Indexed.Heterogeneous.Structures.html#976" class="Function">To.trans</a> <a id="2528" class="Symbol">(</a><a id="2529" href="Function.Equality.html#2505" class="Bound">fg</a> <a id="2533" href="Relation.Binary.Structures.html#1577" class="Function">From.refl</a><a id="2542" class="Symbol">)</a> <a id="2544" class="Symbol">(</a><a id="2545" href="Function.Equality.html#2509" class="Bound">gh</a> <a id="2549" href="Function.Equality.html#2513" class="Bound">xy</a><a id="2552" class="Symbol">)</a>
<a id="2558" class="Symbol">}</a>
<a id="2562" class="Symbol">}</a>
<a id="2566" class="Keyword">where</a>
<a id="2574" class="Keyword">open</a> <a id="2579" class="Keyword">module</a> <a id="2586" href="Function.Equality.html#2586" class="Module">From</a> <a id="2591" class="Symbol">=</a> <a id="2593" href="Relation.Binary.Bundles.html#1018" class="Module">Setoid</a> <a id="2600" href="Function.Equality.html#2266" class="Bound">From</a> <a id="2605" class="Keyword">using</a> <a id="2611" class="Symbol">()</a> <a id="2614" class="Keyword">renaming</a> <a id="2623" class="Symbol">(</a><a id="2624" href="Relation.Binary.Bundles.html#1107" class="Function Operator">_≈_</a> <a id="2628" class="Symbol">to</a> <a id="2631" class="Function Operator">_≈₁_</a><a id="2635" class="Symbol">)</a>
<a id="2639" class="Keyword">open</a> <a id="2644" class="Keyword">module</a> <a id="2651" href="Function.Equality.html#2651" class="Module">To</a> <a id="2654" class="Symbol">=</a> <a id="2656" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#798" class="Module">IndexedSetoid</a> <a id="2670" href="Function.Equality.html#2271" class="Bound">To</a> <a id="2675" class="Keyword">using</a> <a id="2681" class="Symbol">()</a> <a id="2684" class="Keyword">renaming</a> <a id="2693" class="Symbol">(</a><a id="2694" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#918" class="Field Operator">_≈_</a> <a id="2698" class="Symbol">to</a> <a id="2701" class="Field Operator">_≈₂_</a><a id="2705" class="Symbol">)</a>
<a id="2708" class="Comment">-- Non-dependent.</a>
<a id="2727" class="Keyword">infixr</a> <a id="2734" class="Number">0</a> <a id="2736" href="Function.Equality.html#2741" class="Function Operator">_⇨_</a>
<a id="_⇨_"></a><a id="2741" href="Function.Equality.html#2741" class="Function Operator">_⇨_</a> <a id="2745" class="Symbol">:</a> <a id="2747" class="Symbol"></a> <a id="2749" class="Symbol">{</a><a id="2750" href="Function.Equality.html#2750" class="Bound">f₁</a> <a id="2753" href="Function.Equality.html#2753" class="Bound">f₂</a> <a id="2756" href="Function.Equality.html#2756" class="Bound">t₁</a> <a id="2759" href="Function.Equality.html#2759" class="Bound">t₂</a><a id="2761" class="Symbol">}</a> <a id="2763" class="Symbol"></a> <a id="2765" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="2772" href="Function.Equality.html#2750" class="Bound">f₁</a> <a id="2775" href="Function.Equality.html#2753" class="Bound">f₂</a> <a id="2778" class="Symbol"></a> <a id="2780" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="2787" href="Function.Equality.html#2756" class="Bound">t₁</a> <a id="2790" href="Function.Equality.html#2759" class="Bound">t₂</a> <a id="2793" class="Symbol"></a> <a id="2795" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="2802" class="Symbol">_</a> <a id="2804" class="Symbol">_</a>
<a id="2806" href="Function.Equality.html#2806" class="Bound">From</a> <a id="2811" href="Function.Equality.html#2741" class="Function Operator"></a> <a id="2813" href="Function.Equality.html#2813" class="Bound">To</a> <a id="2816" class="Symbol">=</a> <a id="2818" href="Function.Equality.html#2128" class="Function">setoid</a> <a id="2825" href="Function.Equality.html#2806" class="Bound">From</a> <a id="2830" class="Symbol">(</a><a id="2831" href="Relation.Binary.Indexed.Heterogeneous.Construct.Trivial.html#1379" class="Function">Trivial.indexedSetoid</a> <a id="2853" href="Function.Equality.html#2813" class="Bound">To</a><a id="2855" class="Symbol">)</a>
<a id="2858" class="Comment">-- A variant of setoid which uses the propositional equality setoid</a>
<a id="2926" class="Comment">-- for the domain, and a more convenient definition of _≈_.</a>
<a id="≡-setoid"></a><a id="2987" href="Function.Equality.html#2987" class="Function">≡-setoid</a> <a id="2996" class="Symbol">:</a> <a id="2998" class="Symbol"></a> <a id="3000" class="Symbol">{</a><a id="3001" href="Function.Equality.html#3001" class="Bound">f</a> <a id="3003" href="Function.Equality.html#3003" class="Bound">t₁</a> <a id="3006" href="Function.Equality.html#3006" class="Bound">t₂</a><a id="3008" class="Symbol">}</a> <a id="3010" class="Symbol">(</a><a id="3011" href="Function.Equality.html#3011" class="Bound">From</a> <a id="3016" class="Symbol">:</a> <a id="3018" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="3022" href="Function.Equality.html#3001" class="Bound">f</a><a id="3023" class="Symbol">)</a> <a id="3025" class="Symbol"></a> <a id="3027" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#798" class="Record">IndexedSetoid</a> <a id="3041" href="Function.Equality.html#3011" class="Bound">From</a> <a id="3046" href="Function.Equality.html#3003" class="Bound">t₁</a> <a id="3049" href="Function.Equality.html#3006" class="Bound">t₂</a> <a id="3052" class="Symbol"></a> <a id="3054" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3061" class="Symbol">_</a> <a id="3063" class="Symbol">_</a>
<a id="3065" href="Function.Equality.html#2987" class="Function">≡-setoid</a> <a id="3074" href="Function.Equality.html#3074" class="Bound">From</a> <a id="3079" href="Function.Equality.html#3079" class="Bound">To</a> <a id="3082" class="Symbol">=</a> <a id="3084" class="Keyword">record</a>
<a id="3093" class="Symbol">{</a> <a id="3095" href="Relation.Binary.Bundles.html#1081" class="Field">Carrier</a> <a id="3109" class="Symbol">=</a> <a id="3111" class="Symbol">(</a><a id="3112" href="Function.Equality.html#3112" class="Bound">x</a> <a id="3114" class="Symbol">:</a> <a id="3116" href="Function.Equality.html#3074" class="Bound">From</a><a id="3120" class="Symbol">)</a> <a id="3122" class="Symbol"></a> <a id="3124" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#888" class="Field">Carrier</a> <a id="3132" href="Function.Equality.html#3112" class="Bound">x</a>
<a id="3136" class="Symbol">;</a> <a id="3138" href="Relation.Binary.Bundles.html#1107" class="Field Operator">_≈_</a> <a id="3152" class="Symbol">=</a> <a id="3154" class="Symbol">λ</a> <a id="3156" href="Function.Equality.html#3156" class="Bound">f</a> <a id="3158" href="Function.Equality.html#3158" class="Bound">g</a> <a id="3160" class="Symbol"></a> <a id="3162" class="Symbol"></a> <a id="3164" href="Function.Equality.html#3164" class="Bound">x</a> <a id="3166" class="Symbol"></a> <a id="3168" href="Function.Equality.html#3156" class="Bound">f</a> <a id="3170" href="Function.Equality.html#3164" class="Bound">x</a> <a id="3172" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#918" class="Field Operator"></a> <a id="3174" href="Function.Equality.html#3158" class="Bound">g</a> <a id="3176" href="Function.Equality.html#3164" class="Bound">x</a>
<a id="3180" class="Symbol">;</a> <a id="3182" href="Relation.Binary.Bundles.html#1141" class="Field">isEquivalence</a> <a id="3196" class="Symbol">=</a> <a id="3198" class="Keyword">record</a>
<a id="3209" class="Symbol">{</a> <a id="3211" href="Relation.Binary.Structures.html#1577" class="Field">refl</a> <a id="3217" class="Symbol">=</a> <a id="3219" class="Symbol">λ</a> <a id="3221" class="Symbol">{</a><a id="3222" href="Function.Equality.html#3222" class="Bound">f</a><a id="3223" class="Symbol">}</a> <a id="3225" href="Function.Equality.html#3225" class="Bound">x</a> <a id="3227" class="Symbol"></a> <a id="3229" href="Relation.Binary.Indexed.Heterogeneous.Structures.html#918" class="Function">refl</a>
<a id="3238" class="Symbol">;</a> <a id="3240" href="Relation.Binary.Structures.html#1603" class="Field">sym</a> <a id="3246" class="Symbol">=</a> <a id="3248" class="Symbol">λ</a> <a id="3250" href="Function.Equality.html#3250" class="Bound">fg</a> <a id="3254" href="Function.Equality.html#3254" class="Bound">x</a> <a id="3256" class="Symbol"></a> <a id="3258" href="Relation.Binary.Indexed.Heterogeneous.Structures.html#947" class="Function">sym</a> <a id="3262" class="Symbol">(</a><a id="3263" href="Function.Equality.html#3250" class="Bound">fg</a> <a id="3267" href="Function.Equality.html#3254" class="Bound">x</a><a id="3268" class="Symbol">)</a>
<a id="3274" class="Symbol">;</a> <a id="3276" href="Relation.Binary.Structures.html#1629" class="Field">trans</a> <a id="3282" class="Symbol">=</a> <a id="3284" class="Symbol">λ</a> <a id="3286" href="Function.Equality.html#3286" class="Bound">fg</a> <a id="3290" href="Function.Equality.html#3290" class="Bound">gh</a> <a id="3294" href="Function.Equality.html#3294" class="Bound">x</a> <a id="3296" class="Symbol"></a> <a id="3298" href="Relation.Binary.Indexed.Heterogeneous.Structures.html#976" class="Function">trans</a> <a id="3304" class="Symbol">(</a><a id="3305" href="Function.Equality.html#3286" class="Bound">fg</a> <a id="3309" href="Function.Equality.html#3294" class="Bound">x</a><a id="3310" class="Symbol">)</a> <a id="3312" class="Symbol">(</a><a id="3313" href="Function.Equality.html#3290" class="Bound">gh</a> <a id="3317" href="Function.Equality.html#3294" class="Bound">x</a><a id="3318" class="Symbol">)</a>
<a id="3324" class="Symbol">}</a>
<a id="3328" class="Symbol">}</a> <a id="3330" class="Keyword">where</a> <a id="3336" class="Keyword">open</a> <a id="3341" href="Relation.Binary.Indexed.Heterogeneous.Bundles.html#798" class="Module">IndexedSetoid</a> <a id="3355" href="Function.Equality.html#3079" class="Bound">To</a>
<a id="3359" class="Comment">-- Parameter swapping function.</a>
<a id="flip"></a><a id="3392" href="Function.Equality.html#3392" class="Function">flip</a> <a id="3397" class="Symbol">:</a> <a id="3399" class="Symbol"></a> <a id="3401" class="Symbol">{</a><a id="3402" href="Function.Equality.html#3402" class="Bound">a₁</a> <a id="3405" href="Function.Equality.html#3405" class="Bound">a₂</a><a id="3407" class="Symbol">}</a> <a id="3409" class="Symbol">{</a><a id="3410" href="Function.Equality.html#3410" class="Bound">A</a> <a id="3412" class="Symbol">:</a> <a id="3414" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3421" href="Function.Equality.html#3402" class="Bound">a₁</a> <a id="3424" href="Function.Equality.html#3405" class="Bound">a₂</a><a id="3426" class="Symbol">}</a>
<a id="3437" class="Symbol">{</a><a id="3438" href="Function.Equality.html#3438" class="Bound">b₁</a> <a id="3441" href="Function.Equality.html#3441" class="Bound">b₂</a><a id="3443" class="Symbol">}</a> <a id="3445" class="Symbol">{</a><a id="3446" href="Function.Equality.html#3446" class="Bound">B</a> <a id="3448" class="Symbol">:</a> <a id="3450" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3457" href="Function.Equality.html#3438" class="Bound">b₁</a> <a id="3460" href="Function.Equality.html#3441" class="Bound">b₂</a><a id="3462" class="Symbol">}</a>
<a id="3473" class="Symbol">{</a><a id="3474" href="Function.Equality.html#3474" class="Bound">c₁</a> <a id="3477" href="Function.Equality.html#3477" class="Bound">c₂</a><a id="3479" class="Symbol">}</a> <a id="3481" class="Symbol">{</a><a id="3482" href="Function.Equality.html#3482" class="Bound">C</a> <a id="3484" class="Symbol">:</a> <a id="3486" href="Relation.Binary.Bundles.html#1018" class="Record">Setoid</a> <a id="3493" href="Function.Equality.html#3474" class="Bound">c₁</a> <a id="3496" href="Function.Equality.html#3477" class="Bound">c₂</a><a id="3498" class="Symbol">}</a> <a id="3500" class="Symbol"></a>
<a id="3509" href="Function.Equality.html#3410" class="Bound">A</a> <a id="3511" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="3513" href="Function.Equality.html#3446" class="Bound">B</a> <a id="3515" href="Function.Equality.html#2741" class="Function Operator"></a> <a id="3517" href="Function.Equality.html#3482" class="Bound">C</a> <a id="3519" class="Symbol"></a> <a id="3521" href="Function.Equality.html#3446" class="Bound">B</a> <a id="3523" href="Function.Equality.html#1227" class="Function Operator"></a> <a id="3525" href="Function.Equality.html#3410" class="Bound">A</a> <a id="3527" href="Function.Equality.html#2741" class="Function Operator"></a> <a id="3529" href="Function.Equality.html#3482" class="Bound">C</a>
<a id="3531" href="Function.Equality.html#3392" class="Function">flip</a> <a id="3536" class="Symbol">{</a><a id="3537" class="Argument">B</a> <a id="3539" class="Symbol">=</a> <a id="3541" href="Function.Equality.html#3541" class="Bound">B</a><a id="3542" class="Symbol">}</a> <a id="3544" href="Function.Equality.html#3544" class="Bound">f</a> <a id="3546" class="Symbol">=</a> <a id="3548" class="Keyword">record</a>
<a id="3557" class="Symbol">{</a> <a id="3559" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a> <a id="3565" class="Symbol">=</a> <a id="3567" class="Symbol">λ</a> <a id="3569" href="Function.Equality.html#3569" class="Bound">b</a> <a id="3571" class="Symbol"></a> <a id="3573" class="Keyword">record</a>
<a id="3584" class="Symbol">{</a> <a id="3586" href="Function.Equality.html#1073" class="Field Operator">_⟨$⟩_</a> <a id="3592" class="Symbol">=</a> <a id="3594" class="Symbol">λ</a> <a id="3596" href="Function.Equality.html#3596" class="Bound">a</a> <a id="3598" class="Symbol"></a> <a id="3600" href="Function.Equality.html#3544" class="Bound">f</a> <a id="3602" href="Function.Equality.html#1073" class="Field Operator">⟨$⟩</a> <a id="3606" href="Function.Equality.html#3596" class="Bound">a</a> <a id="3608" href="Function.Equality.html#1073" class="Field Operator">⟨$⟩</a> <a id="3612" href="Function.Equality.html#3569" class="Bound">b</a>
<a id="3618" class="Symbol">;</a> <a id="3620" href="Function.Equality.html#1140" class="Field">cong</a> <a id="3626" class="Symbol">=</a> <a id="3628" class="Symbol">λ</a> <a id="3630" href="Function.Equality.html#3630" class="Bound">a₁≈a₂</a> <a id="3636" class="Symbol"></a> <a id="3638" href="Function.Equality.html#1140" class="Field">cong</a> <a id="3643" href="Function.Equality.html#3544" class="Bound">f</a> <a id="3645" href="Function.Equality.html#3630" class="Bound">a₁≈a₂</a> <a id="3651" class="Symbol">(</a><a id="3652" href="Relation.Binary.Structures.html#1577" class="Function">Setoid.refl</a> <a id="3664" href="Function.Equality.html#3541" class="Bound">B</a><a id="3665" class="Symbol">)</a> <a id="3667" class="Symbol">}</a>
<a id="3671" class="Symbol">;</a> <a id="3673" href="Function.Equality.html#1140" class="Field">cong</a> <a id="3679" class="Symbol">=</a> <a id="3681" class="Symbol">λ</a> <a id="3683" href="Function.Equality.html#3683" class="Bound">b₁≈b₂</a> <a id="3689" href="Function.Equality.html#3689" class="Bound">a₁≈a₂</a> <a id="3695" class="Symbol"></a> <a id="3697" href="Function.Equality.html#1140" class="Field">cong</a> <a id="3702" href="Function.Equality.html#3544" class="Bound">f</a> <a id="3704" href="Function.Equality.html#3689" class="Bound">a₁≈a₂</a> <a id="3710" href="Function.Equality.html#3683" class="Bound">b₁≈b₂</a>
<a id="3718" class="Symbol">}</a>
</pre></body></html>