mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
68 lines
No EOL
19 KiB
HTML
68 lines
No EOL
19 KiB
HTML
<!DOCTYPE HTML>
|
||
<html><head><meta charset="utf-8"><title>Relation.Binary.Core</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">-- Properties of binary relations</a>
|
||
<a id="140" class="Comment">------------------------------------------------------------------------</a>
|
||
|
||
<a id="214" class="Comment">-- The contents of this module should be accessed via `Relation.Binary`.</a>
|
||
|
||
<a id="288" class="Symbol">{-#</a> <a id="292" class="Keyword">OPTIONS</a> <a id="300" class="Pragma">--cubical-compatible</a> <a id="321" class="Pragma">--safe</a> <a id="328" class="Symbol">#-}</a>
|
||
|
||
<a id="333" class="Keyword">module</a> <a id="340" href="Relation.Binary.Core.html" class="Module">Relation.Binary.Core</a> <a id="361" class="Keyword">where</a>
|
||
|
||
<a id="368" class="Keyword">open</a> <a id="373" class="Keyword">import</a> <a id="380" href="Data.Product.Base.html" class="Module">Data.Product.Base</a> <a id="398" class="Keyword">using</a> <a id="404" class="Symbol">(</a><a id="405" href="Data.Product.Base.html#1618" class="Function Operator">_×_</a><a id="408" class="Symbol">)</a>
|
||
<a id="410" class="Keyword">open</a> <a id="415" class="Keyword">import</a> <a id="422" href="Function.Base.html" class="Module">Function.Base</a> <a id="436" class="Keyword">using</a> <a id="442" class="Symbol">(</a><a id="443" href="Function.Base.html#6209" class="Function Operator">_on_</a><a id="447" class="Symbol">)</a>
|
||
<a id="449" class="Keyword">open</a> <a id="454" class="Keyword">import</a> <a id="461" href="Level.html" class="Module">Level</a> <a id="467" class="Keyword">using</a> <a id="473" class="Symbol">(</a><a id="474" href="Agda.Primitive.html#742" class="Postulate">Level</a><a id="479" class="Symbol">;</a> <a id="481" href="Agda.Primitive.html#961" class="Primitive Operator">_⊔_</a><a id="484" class="Symbol">;</a> <a id="486" href="Agda.Primitive.html#931" class="Primitive">suc</a><a id="489" class="Symbol">)</a>
|
||
|
||
<a id="492" class="Keyword">private</a>
|
||
<a id="502" class="Keyword">variable</a>
|
||
<a id="515" href="Relation.Binary.Core.html#515" class="Generalizable">a</a> <a id="517" href="Relation.Binary.Core.html#517" class="Generalizable">b</a> <a id="519" href="Relation.Binary.Core.html#519" class="Generalizable">c</a> <a id="521" href="Relation.Binary.Core.html#521" class="Generalizable">ℓ</a> <a id="523" href="Relation.Binary.Core.html#523" class="Generalizable">ℓ₁</a> <a id="526" href="Relation.Binary.Core.html#526" class="Generalizable">ℓ₂</a> <a id="529" href="Relation.Binary.Core.html#529" class="Generalizable">ℓ₃</a> <a id="532" class="Symbol">:</a> <a id="534" href="Agda.Primitive.html#742" class="Postulate">Level</a>
|
||
<a id="544" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="546" class="Symbol">:</a> <a id="548" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="552" href="Relation.Binary.Core.html#515" class="Generalizable">a</a>
|
||
<a id="558" href="Relation.Binary.Core.html#558" class="Generalizable">B</a> <a id="560" class="Symbol">:</a> <a id="562" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="566" href="Relation.Binary.Core.html#517" class="Generalizable">b</a>
|
||
<a id="572" href="Relation.Binary.Core.html#572" class="Generalizable">C</a> <a id="574" class="Symbol">:</a> <a id="576" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="580" href="Relation.Binary.Core.html#519" class="Generalizable">c</a>
|
||
|
||
<a id="583" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="656" class="Comment">-- Definitions</a>
|
||
<a id="671" class="Comment">------------------------------------------------------------------------</a>
|
||
|
||
<a id="745" class="Comment">-- Heterogeneous binary relations</a>
|
||
|
||
<a id="REL"></a><a id="780" href="Relation.Binary.Core.html#780" class="Function">REL</a> <a id="784" class="Symbol">:</a> <a id="786" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="790" href="Relation.Binary.Core.html#515" class="Generalizable">a</a> <a id="792" class="Symbol">→</a> <a id="794" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="798" href="Relation.Binary.Core.html#517" class="Generalizable">b</a> <a id="800" class="Symbol">→</a> <a id="802" class="Symbol">(</a><a id="803" href="Relation.Binary.Core.html#803" class="Bound">ℓ</a> <a id="805" class="Symbol">:</a> <a id="807" href="Agda.Primitive.html#742" class="Postulate">Level</a><a id="812" class="Symbol">)</a> <a id="814" class="Symbol">→</a> <a id="816" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="820" class="Symbol">(</a><a id="821" href="Relation.Binary.Core.html#515" class="Generalizable">a</a> <a id="823" href="Agda.Primitive.html#961" class="Primitive Operator">⊔</a> <a id="825" href="Relation.Binary.Core.html#517" class="Generalizable">b</a> <a id="827" href="Agda.Primitive.html#961" class="Primitive Operator">⊔</a> <a id="829" href="Agda.Primitive.html#931" class="Primitive">suc</a> <a id="833" href="Relation.Binary.Core.html#803" class="Bound">ℓ</a><a id="834" class="Symbol">)</a>
|
||
<a id="836" href="Relation.Binary.Core.html#780" class="Function">REL</a> <a id="840" href="Relation.Binary.Core.html#840" class="Bound">A</a> <a id="842" href="Relation.Binary.Core.html#842" class="Bound">B</a> <a id="844" href="Relation.Binary.Core.html#844" class="Bound">ℓ</a> <a id="846" class="Symbol">=</a> <a id="848" href="Relation.Binary.Core.html#840" class="Bound">A</a> <a id="850" class="Symbol">→</a> <a id="852" href="Relation.Binary.Core.html#842" class="Bound">B</a> <a id="854" class="Symbol">→</a> <a id="856" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="860" href="Relation.Binary.Core.html#844" class="Bound">ℓ</a>
|
||
|
||
<a id="863" class="Comment">-- Homogeneous binary relations</a>
|
||
|
||
<a id="Rel"></a><a id="896" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="900" class="Symbol">:</a> <a id="902" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="906" href="Relation.Binary.Core.html#515" class="Generalizable">a</a> <a id="908" class="Symbol">→</a> <a id="910" class="Symbol">(</a><a id="911" href="Relation.Binary.Core.html#911" class="Bound">ℓ</a> <a id="913" class="Symbol">:</a> <a id="915" href="Agda.Primitive.html#742" class="Postulate">Level</a><a id="920" class="Symbol">)</a> <a id="922" class="Symbol">→</a> <a id="924" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="928" class="Symbol">(</a><a id="929" href="Relation.Binary.Core.html#515" class="Generalizable">a</a> <a id="931" href="Agda.Primitive.html#961" class="Primitive Operator">⊔</a> <a id="933" href="Agda.Primitive.html#931" class="Primitive">suc</a> <a id="937" href="Relation.Binary.Core.html#911" class="Bound">ℓ</a><a id="938" class="Symbol">)</a>
|
||
<a id="940" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="944" href="Relation.Binary.Core.html#944" class="Bound">A</a> <a id="946" href="Relation.Binary.Core.html#946" class="Bound">ℓ</a> <a id="948" class="Symbol">=</a> <a id="950" href="Relation.Binary.Core.html#780" class="Function">REL</a> <a id="954" href="Relation.Binary.Core.html#944" class="Bound">A</a> <a id="956" href="Relation.Binary.Core.html#944" class="Bound">A</a> <a id="958" href="Relation.Binary.Core.html#946" class="Bound">ℓ</a>
|
||
|
||
<a id="961" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="1034" class="Comment">-- Relationships between relations</a>
|
||
<a id="1069" class="Comment">------------------------------------------------------------------------</a>
|
||
|
||
<a id="1143" class="Keyword">infix</a> <a id="1149" class="Number">4</a> <a id="1151" href="Relation.Binary.Core.html#1268" class="Function Operator">_⇒_</a> <a id="1155" href="Relation.Binary.Core.html#1339" class="Function Operator">_⇔_</a> <a id="1159" href="Relation.Binary.Core.html#1474" class="Function Operator">_=[_]⇒_</a>
|
||
|
||
<a id="1168" class="Comment">-- Implication/containment - could also be written _⊆_.</a>
|
||
<a id="1224" class="Comment">-- and corresponding notion of equivalence</a>
|
||
|
||
<a id="_⇒_"></a><a id="1268" href="Relation.Binary.Core.html#1268" class="Function Operator">_⇒_</a> <a id="1272" class="Symbol">:</a> <a id="1274" href="Relation.Binary.Core.html#780" class="Function">REL</a> <a id="1278" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1280" href="Relation.Binary.Core.html#558" class="Generalizable">B</a> <a id="1282" href="Relation.Binary.Core.html#523" class="Generalizable">ℓ₁</a> <a id="1285" class="Symbol">→</a> <a id="1287" href="Relation.Binary.Core.html#780" class="Function">REL</a> <a id="1291" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1293" href="Relation.Binary.Core.html#558" class="Generalizable">B</a> <a id="1295" href="Relation.Binary.Core.html#526" class="Generalizable">ℓ₂</a> <a id="1298" class="Symbol">→</a> <a id="1300" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1304" class="Symbol">_</a>
|
||
<a id="1306" href="Relation.Binary.Core.html#1306" class="Bound">P</a> <a id="1308" href="Relation.Binary.Core.html#1268" class="Function Operator">⇒</a> <a id="1310" href="Relation.Binary.Core.html#1310" class="Bound">Q</a> <a id="1312" class="Symbol">=</a> <a id="1314" class="Symbol">∀</a> <a id="1316" class="Symbol">{</a><a id="1317" href="Relation.Binary.Core.html#1317" class="Bound">x</a> <a id="1319" href="Relation.Binary.Core.html#1319" class="Bound">y</a><a id="1320" class="Symbol">}</a> <a id="1322" class="Symbol">→</a> <a id="1324" href="Relation.Binary.Core.html#1306" class="Bound">P</a> <a id="1326" href="Relation.Binary.Core.html#1317" class="Bound">x</a> <a id="1328" href="Relation.Binary.Core.html#1319" class="Bound">y</a> <a id="1330" class="Symbol">→</a> <a id="1332" href="Relation.Binary.Core.html#1310" class="Bound">Q</a> <a id="1334" href="Relation.Binary.Core.html#1317" class="Bound">x</a> <a id="1336" href="Relation.Binary.Core.html#1319" class="Bound">y</a>
|
||
|
||
<a id="_⇔_"></a><a id="1339" href="Relation.Binary.Core.html#1339" class="Function Operator">_⇔_</a> <a id="1343" class="Symbol">:</a> <a id="1345" href="Relation.Binary.Core.html#780" class="Function">REL</a> <a id="1349" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1351" href="Relation.Binary.Core.html#558" class="Generalizable">B</a> <a id="1353" href="Relation.Binary.Core.html#523" class="Generalizable">ℓ₁</a> <a id="1356" class="Symbol">→</a> <a id="1358" href="Relation.Binary.Core.html#780" class="Function">REL</a> <a id="1362" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1364" href="Relation.Binary.Core.html#558" class="Generalizable">B</a> <a id="1366" href="Relation.Binary.Core.html#526" class="Generalizable">ℓ₂</a> <a id="1369" class="Symbol">→</a> <a id="1371" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1375" class="Symbol">_</a>
|
||
<a id="1377" href="Relation.Binary.Core.html#1377" class="Bound">P</a> <a id="1379" href="Relation.Binary.Core.html#1339" class="Function Operator">⇔</a> <a id="1381" href="Relation.Binary.Core.html#1381" class="Bound">Q</a> <a id="1383" class="Symbol">=</a> <a id="1385" href="Relation.Binary.Core.html#1377" class="Bound">P</a> <a id="1387" href="Relation.Binary.Core.html#1268" class="Function Operator">⇒</a> <a id="1389" href="Relation.Binary.Core.html#1381" class="Bound">Q</a> <a id="1391" href="Data.Product.Base.html#1618" class="Function Operator">×</a> <a id="1393" href="Relation.Binary.Core.html#1381" class="Bound">Q</a> <a id="1395" href="Relation.Binary.Core.html#1268" class="Function Operator">⇒</a> <a id="1397" href="Relation.Binary.Core.html#1377" class="Bound">P</a>
|
||
|
||
<a id="1400" class="Comment">-- Generalised implication - if P ≡ Q it can be read as "f preserves P".</a>
|
||
|
||
<a id="_=[_]⇒_"></a><a id="1474" href="Relation.Binary.Core.html#1474" class="Function Operator">_=[_]⇒_</a> <a id="1482" class="Symbol">:</a> <a id="1484" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1488" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1490" href="Relation.Binary.Core.html#523" class="Generalizable">ℓ₁</a> <a id="1493" class="Symbol">→</a> <a id="1495" class="Symbol">(</a><a id="1496" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1498" class="Symbol">→</a> <a id="1500" href="Relation.Binary.Core.html#558" class="Generalizable">B</a><a id="1501" class="Symbol">)</a> <a id="1503" class="Symbol">→</a> <a id="1505" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1509" href="Relation.Binary.Core.html#558" class="Generalizable">B</a> <a id="1511" href="Relation.Binary.Core.html#526" class="Generalizable">ℓ₂</a> <a id="1514" class="Symbol">→</a> <a id="1516" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1520" class="Symbol">_</a>
|
||
<a id="1522" href="Relation.Binary.Core.html#1522" class="Bound">P</a> <a id="1524" href="Relation.Binary.Core.html#1474" class="Function Operator">=[</a> <a id="1527" href="Relation.Binary.Core.html#1527" class="Bound">f</a> <a id="1529" href="Relation.Binary.Core.html#1474" class="Function Operator">]⇒</a> <a id="1532" href="Relation.Binary.Core.html#1532" class="Bound">Q</a> <a id="1534" class="Symbol">=</a> <a id="1536" href="Relation.Binary.Core.html#1522" class="Bound">P</a> <a id="1538" href="Relation.Binary.Core.html#1268" class="Function Operator">⇒</a> <a id="1540" class="Symbol">(</a><a id="1541" href="Relation.Binary.Core.html#1532" class="Bound">Q</a> <a id="1543" href="Function.Base.html#6209" class="Function Operator">on</a> <a id="1546" href="Relation.Binary.Core.html#1527" class="Bound">f</a><a id="1547" class="Symbol">)</a>
|
||
|
||
<a id="1550" class="Comment">-- A synonym for _=[_]⇒_.</a>
|
||
|
||
<a id="_Preserves_⟶_"></a><a id="1577" href="Relation.Binary.Core.html#1577" class="Function Operator">_Preserves_⟶_</a> <a id="1591" class="Symbol">:</a> <a id="1593" class="Symbol">(</a><a id="1594" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1596" class="Symbol">→</a> <a id="1598" href="Relation.Binary.Core.html#558" class="Generalizable">B</a><a id="1599" class="Symbol">)</a> <a id="1601" class="Symbol">→</a> <a id="1603" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1607" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1609" href="Relation.Binary.Core.html#523" class="Generalizable">ℓ₁</a> <a id="1612" class="Symbol">→</a> <a id="1614" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1618" href="Relation.Binary.Core.html#558" class="Generalizable">B</a> <a id="1620" href="Relation.Binary.Core.html#526" class="Generalizable">ℓ₂</a> <a id="1623" class="Symbol">→</a> <a id="1625" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1629" class="Symbol">_</a>
|
||
<a id="1631" href="Relation.Binary.Core.html#1631" class="Bound">f</a> <a id="1633" href="Relation.Binary.Core.html#1577" class="Function Operator">Preserves</a> <a id="1643" href="Relation.Binary.Core.html#1643" class="Bound">P</a> <a id="1645" href="Relation.Binary.Core.html#1577" class="Function Operator">⟶</a> <a id="1647" href="Relation.Binary.Core.html#1647" class="Bound">Q</a> <a id="1649" class="Symbol">=</a> <a id="1651" href="Relation.Binary.Core.html#1643" class="Bound">P</a> <a id="1653" href="Relation.Binary.Core.html#1474" class="Function Operator">=[</a> <a id="1656" href="Relation.Binary.Core.html#1631" class="Bound">f</a> <a id="1658" href="Relation.Binary.Core.html#1474" class="Function Operator">]⇒</a> <a id="1661" href="Relation.Binary.Core.html#1647" class="Bound">Q</a>
|
||
|
||
<a id="1664" class="Comment">-- A binary variant of _Preserves_⟶_.</a>
|
||
|
||
<a id="_Preserves₂_⟶_⟶_"></a><a id="1703" href="Relation.Binary.Core.html#1703" class="Function Operator">_Preserves₂_⟶_⟶_</a> <a id="1720" class="Symbol">:</a> <a id="1722" class="Symbol">(</a><a id="1723" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1725" class="Symbol">→</a> <a id="1727" href="Relation.Binary.Core.html#558" class="Generalizable">B</a> <a id="1729" class="Symbol">→</a> <a id="1731" href="Relation.Binary.Core.html#572" class="Generalizable">C</a><a id="1732" class="Symbol">)</a> <a id="1734" class="Symbol">→</a> <a id="1736" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1740" href="Relation.Binary.Core.html#544" class="Generalizable">A</a> <a id="1742" href="Relation.Binary.Core.html#523" class="Generalizable">ℓ₁</a> <a id="1745" class="Symbol">→</a> <a id="1747" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1751" href="Relation.Binary.Core.html#558" class="Generalizable">B</a> <a id="1753" href="Relation.Binary.Core.html#526" class="Generalizable">ℓ₂</a> <a id="1756" class="Symbol">→</a> <a id="1758" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1762" href="Relation.Binary.Core.html#572" class="Generalizable">C</a> <a id="1764" href="Relation.Binary.Core.html#529" class="Generalizable">ℓ₃</a> <a id="1767" class="Symbol">→</a> <a id="1769" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1773" class="Symbol">_</a>
|
||
<a id="1775" href="Relation.Binary.Core.html#1775" class="Bound Operator">_∙_</a> <a id="1779" href="Relation.Binary.Core.html#1703" class="Function Operator">Preserves₂</a> <a id="1790" href="Relation.Binary.Core.html#1790" class="Bound">P</a> <a id="1792" href="Relation.Binary.Core.html#1703" class="Function Operator">⟶</a> <a id="1794" href="Relation.Binary.Core.html#1794" class="Bound">Q</a> <a id="1796" href="Relation.Binary.Core.html#1703" class="Function Operator">⟶</a> <a id="1798" href="Relation.Binary.Core.html#1798" class="Bound">R</a> <a id="1800" class="Symbol">=</a> <a id="1802" class="Symbol">∀</a> <a id="1804" class="Symbol">{</a><a id="1805" href="Relation.Binary.Core.html#1805" class="Bound">x</a> <a id="1807" href="Relation.Binary.Core.html#1807" class="Bound">y</a> <a id="1809" href="Relation.Binary.Core.html#1809" class="Bound">u</a> <a id="1811" href="Relation.Binary.Core.html#1811" class="Bound">v</a><a id="1812" class="Symbol">}</a> <a id="1814" class="Symbol">→</a> <a id="1816" href="Relation.Binary.Core.html#1790" class="Bound">P</a> <a id="1818" href="Relation.Binary.Core.html#1805" class="Bound">x</a> <a id="1820" href="Relation.Binary.Core.html#1807" class="Bound">y</a> <a id="1822" class="Symbol">→</a> <a id="1824" href="Relation.Binary.Core.html#1794" class="Bound">Q</a> <a id="1826" href="Relation.Binary.Core.html#1809" class="Bound">u</a> <a id="1828" href="Relation.Binary.Core.html#1811" class="Bound">v</a> <a id="1830" class="Symbol">→</a> <a id="1832" href="Relation.Binary.Core.html#1798" class="Bound">R</a> <a id="1834" class="Symbol">(</a><a id="1835" href="Relation.Binary.Core.html#1805" class="Bound">x</a> <a id="1837" href="Relation.Binary.Core.html#1775" class="Bound Operator">∙</a> <a id="1839" href="Relation.Binary.Core.html#1809" class="Bound">u</a><a id="1840" class="Symbol">)</a> <a id="1842" class="Symbol">(</a><a id="1843" href="Relation.Binary.Core.html#1807" class="Bound">y</a> <a id="1845" href="Relation.Binary.Core.html#1775" class="Bound Operator">∙</a> <a id="1847" href="Relation.Binary.Core.html#1811" class="Bound">v</a><a id="1848" class="Symbol">)</a>
|
||
</pre></body></html> |