mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
89 lines
No EOL
19 KiB
HTML
89 lines
No EOL
19 KiB
HTML
<!DOCTYPE HTML>
|
||
<html><head><meta charset="utf-8"><title>Relation.Binary.Properties.Setoid</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">-- Additional properties for setoids</a>
|
||
<a id="143" class="Comment">------------------------------------------------------------------------</a>
|
||
|
||
<a id="217" class="Symbol">{-#</a> <a id="221" class="Keyword">OPTIONS</a> <a id="229" class="Pragma">--cubical-compatible</a> <a id="250" class="Pragma">--safe</a> <a id="257" class="Symbol">#-}</a>
|
||
|
||
<a id="262" class="Keyword">open</a> <a id="267" class="Keyword">import</a> <a id="274" href="Data.Product.Base.html" class="Module">Data.Product.Base</a> <a id="292" class="Keyword">using</a> <a id="298" class="Symbol">(</a><a id="299" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">_,_</a><a id="302" class="Symbol">)</a>
|
||
<a id="304" class="Keyword">open</a> <a id="309" class="Keyword">import</a> <a id="316" href="Function.Base.html" class="Module">Function.Base</a> <a id="330" class="Keyword">using</a> <a id="336" class="Symbol">(</a><a id="337" href="Function.Base.html#1115" class="Function Operator">_∘_</a><a id="340" class="Symbol">;</a> <a id="342" href="Function.Base.html#704" class="Function">id</a><a id="344" class="Symbol">;</a> <a id="346" href="Function.Base.html#1974" class="Function Operator">_$_</a><a id="349" class="Symbol">;</a> <a id="351" href="Function.Base.html#1638" class="Function">flip</a><a id="355" class="Symbol">)</a>
|
||
<a id="357" class="Keyword">open</a> <a id="362" class="Keyword">import</a> <a id="369" href="Relation.Nullary.Negation.Core.html" class="Module">Relation.Nullary.Negation.Core</a> <a id="400" class="Keyword">using</a> <a id="406" class="Symbol">(</a><a id="407" href="Relation.Nullary.Negation.Core.html#698" class="Function Operator">¬_</a><a id="409" class="Symbol">)</a>
|
||
<a id="411" class="Keyword">open</a> <a id="416" class="Keyword">import</a> <a id="423" href="Relation.Binary.PropositionalEquality.Core.html" class="Module">Relation.Binary.PropositionalEquality.Core</a> <a id="466" class="Symbol">as</a> <a id="469" class="Module">P</a> <a id="471" class="Keyword">using</a> <a id="477" class="Symbol">(</a><a id="478" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a><a id="481" class="Symbol">)</a>
|
||
<a id="483" class="Keyword">open</a> <a id="488" class="Keyword">import</a> <a id="495" href="Relation.Binary.Bundles.html" class="Module">Relation.Binary.Bundles</a> <a id="519" class="Keyword">using</a> <a id="525" class="Symbol">(</a><a id="526" href="Relation.Binary.Bundles.html#1080" class="Record">Setoid</a><a id="532" class="Symbol">;</a> <a id="534" href="Relation.Binary.Bundles.html#2121" class="Record">Preorder</a><a id="542" class="Symbol">;</a> <a id="544" href="Relation.Binary.Bundles.html#3530" class="Record">Poset</a><a id="549" class="Symbol">)</a>
|
||
<a id="551" class="Keyword">open</a> <a id="556" class="Keyword">import</a> <a id="563" href="Relation.Binary.Definitions.html" class="Module">Relation.Binary.Definitions</a>
|
||
<a id="593" class="Keyword">using</a> <a id="599" class="Symbol">(</a><a id="600" href="Relation.Binary.Definitions.html#1587" class="Function">Symmetric</a><a id="609" class="Symbol">;</a> <a id="611" href="Relation.Binary.Definitions.html#5500" class="Function Operator">_Respectsˡ_</a><a id="622" class="Symbol">;</a> <a id="624" href="Relation.Binary.Definitions.html#5335" class="Function Operator">_Respectsʳ_</a><a id="635" class="Symbol">;</a> <a id="637" href="Relation.Binary.Definitions.html#5663" class="Function Operator">_Respects₂_</a><a id="648" class="Symbol">)</a>
|
||
<a id="650" class="Keyword">open</a> <a id="655" class="Keyword">import</a> <a id="662" href="Relation.Binary.Structures.html" class="Module">Relation.Binary.Structures</a> <a id="689" class="Keyword">using</a> <a id="695" class="Symbol">(</a><a id="696" href="Relation.Binary.Structures.html#2191" class="Record">IsPreorder</a><a id="706" class="Symbol">;</a> <a id="708" href="Relation.Binary.Structures.html#3522" class="Record">IsPartialOrder</a><a id="722" class="Symbol">)</a>
|
||
|
||
<a id="725" class="Keyword">module</a> <a id="732" href="Relation.Binary.Properties.Setoid.html" class="Module">Relation.Binary.Properties.Setoid</a> <a id="766" class="Symbol">{</a><a id="767" href="Relation.Binary.Properties.Setoid.html#767" class="Bound">a</a> <a id="769" href="Relation.Binary.Properties.Setoid.html#769" class="Bound">ℓ</a><a id="770" class="Symbol">}</a> <a id="772" class="Symbol">(</a><a id="773" href="Relation.Binary.Properties.Setoid.html#773" class="Bound">S</a> <a id="775" class="Symbol">:</a> <a id="777" href="Relation.Binary.Bundles.html#1080" class="Record">Setoid</a> <a id="784" href="Relation.Binary.Properties.Setoid.html#767" class="Bound">a</a> <a id="786" href="Relation.Binary.Properties.Setoid.html#769" class="Bound">ℓ</a><a id="787" class="Symbol">)</a> <a id="789" class="Keyword">where</a>
|
||
|
||
<a id="796" class="Keyword">open</a> <a id="801" href="Relation.Binary.Bundles.html#1080" class="Module">Setoid</a> <a id="808" href="Relation.Binary.Properties.Setoid.html#773" class="Bound">S</a>
|
||
|
||
<a id="811" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="884" class="Comment">-- Every setoid is a preorder and partial order with respect to</a>
|
||
<a id="948" class="Comment">-- propositional equality</a>
|
||
|
||
<a id="isPreorder"></a><a id="975" href="Relation.Binary.Properties.Setoid.html#975" class="Function">isPreorder</a> <a id="986" class="Symbol">:</a> <a id="988" href="Relation.Binary.Structures.html#2191" class="Record">IsPreorder</a> <a id="999" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a> <a id="1003" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a>
|
||
<a id="1007" href="Relation.Binary.Properties.Setoid.html#975" class="Function">isPreorder</a> <a id="1018" class="Symbol">=</a> <a id="1020" class="Keyword">record</a>
|
||
<a id="1029" class="Symbol">{</a> <a id="1031" href="Relation.Binary.Structures.html#2256" class="Field">isEquivalence</a> <a id="1045" class="Symbol">=</a> <a id="1047" class="Keyword">record</a>
|
||
<a id="1058" class="Symbol">{</a> <a id="1060" href="Relation.Binary.Structures.html#1596" class="Field">refl</a> <a id="1066" class="Symbol">=</a> <a id="1068" href="Agda.Builtin.Equality.html#207" class="InductiveConstructor">P.refl</a>
|
||
<a id="1079" class="Symbol">;</a> <a id="1081" href="Relation.Binary.Structures.html#1622" class="Field">sym</a> <a id="1087" class="Symbol">=</a> <a id="1089" href="Relation.Binary.PropositionalEquality.Core.html#1712" class="Function">P.sym</a>
|
||
<a id="1099" class="Symbol">;</a> <a id="1101" href="Relation.Binary.Structures.html#1648" class="Field">trans</a> <a id="1107" class="Symbol">=</a> <a id="1109" href="Relation.Binary.PropositionalEquality.Core.html#1757" class="Function">P.trans</a>
|
||
<a id="1121" class="Symbol">}</a>
|
||
<a id="1125" class="Symbol">;</a> <a id="1127" href="Relation.Binary.Structures.html#2359" class="Field">reflexive</a> <a id="1141" class="Symbol">=</a> <a id="1143" href="Relation.Binary.Structures.html#1674" class="Function">reflexive</a>
|
||
<a id="1155" class="Symbol">;</a> <a id="1157" href="Relation.Binary.Structures.html#2389" class="Field">trans</a> <a id="1171" class="Symbol">=</a> <a id="1173" href="Relation.Binary.Structures.html#1226" class="Function">trans</a>
|
||
<a id="1181" class="Symbol">}</a>
|
||
|
||
<a id="≈-isPreorder"></a><a id="1184" href="Relation.Binary.Properties.Setoid.html#1184" class="Function">≈-isPreorder</a> <a id="1197" class="Symbol">:</a> <a id="1199" href="Relation.Binary.Structures.html#2191" class="Record">IsPreorder</a> <a id="1210" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a> <a id="1214" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a>
|
||
<a id="1218" href="Relation.Binary.Properties.Setoid.html#1184" class="Function">≈-isPreorder</a> <a id="1231" class="Symbol">=</a> <a id="1233" class="Keyword">record</a>
|
||
<a id="1242" class="Symbol">{</a> <a id="1244" href="Relation.Binary.Structures.html#2256" class="Field">isEquivalence</a> <a id="1258" class="Symbol">=</a> <a id="1260" href="Relation.Binary.Bundles.html#1203" class="Field">isEquivalence</a>
|
||
<a id="1276" class="Symbol">;</a> <a id="1278" href="Relation.Binary.Structures.html#2359" class="Field">reflexive</a> <a id="1292" class="Symbol">=</a> <a id="1294" href="Function.Base.html#704" class="Function">id</a>
|
||
<a id="1299" class="Symbol">;</a> <a id="1301" href="Relation.Binary.Structures.html#2389" class="Field">trans</a> <a id="1315" class="Symbol">=</a> <a id="1317" href="Relation.Binary.Structures.html#1226" class="Function">trans</a>
|
||
<a id="1325" class="Symbol">}</a>
|
||
|
||
<a id="≈-isPartialOrder"></a><a id="1328" href="Relation.Binary.Properties.Setoid.html#1328" class="Function">≈-isPartialOrder</a> <a id="1345" class="Symbol">:</a> <a id="1347" href="Relation.Binary.Structures.html#3522" class="Record">IsPartialOrder</a> <a id="1362" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a> <a id="1366" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a>
|
||
<a id="1370" href="Relation.Binary.Properties.Setoid.html#1328" class="Function">≈-isPartialOrder</a> <a id="1387" class="Symbol">=</a> <a id="1389" class="Keyword">record</a>
|
||
<a id="1398" class="Symbol">{</a> <a id="1400" href="Relation.Binary.Structures.html#3591" class="Field">isPreorder</a> <a id="1411" class="Symbol">=</a> <a id="1413" href="Relation.Binary.Properties.Setoid.html#1184" class="Function">≈-isPreorder</a>
|
||
<a id="1428" class="Symbol">;</a> <a id="1430" href="Relation.Binary.Structures.html#3623" class="Field">antisym</a> <a id="1441" class="Symbol">=</a> <a id="1443" class="Symbol">λ</a> <a id="1445" href="Relation.Binary.Properties.Setoid.html#1445" class="Bound">i≈j</a> <a id="1449" href="Relation.Binary.Properties.Setoid.html#1449" class="Bound">_</a> <a id="1451" class="Symbol">→</a> <a id="1453" href="Relation.Binary.Properties.Setoid.html#1445" class="Bound">i≈j</a>
|
||
<a id="1459" class="Symbol">}</a>
|
||
|
||
<a id="preorder"></a><a id="1462" href="Relation.Binary.Properties.Setoid.html#1462" class="Function">preorder</a> <a id="1471" class="Symbol">:</a> <a id="1473" href="Relation.Binary.Bundles.html#2121" class="Record">Preorder</a> <a id="1482" href="Relation.Binary.Properties.Setoid.html#767" class="Bound">a</a> <a id="1484" href="Relation.Binary.Properties.Setoid.html#767" class="Bound">a</a> <a id="1486" href="Relation.Binary.Properties.Setoid.html#769" class="Bound">ℓ</a>
|
||
<a id="1488" href="Relation.Binary.Properties.Setoid.html#1462" class="Function">preorder</a> <a id="1497" class="Symbol">=</a> <a id="1499" class="Keyword">record</a>
|
||
<a id="1508" class="Symbol">{</a> <a id="1510" href="Relation.Binary.Bundles.html#2334" class="Field">isPreorder</a> <a id="1521" class="Symbol">=</a> <a id="1523" href="Relation.Binary.Properties.Setoid.html#975" class="Function">isPreorder</a>
|
||
<a id="1536" class="Symbol">}</a>
|
||
|
||
<a id="≈-preorder"></a><a id="1539" href="Relation.Binary.Properties.Setoid.html#1539" class="Function">≈-preorder</a> <a id="1550" class="Symbol">:</a> <a id="1552" href="Relation.Binary.Bundles.html#2121" class="Record">Preorder</a> <a id="1561" href="Relation.Binary.Properties.Setoid.html#767" class="Bound">a</a> <a id="1563" href="Relation.Binary.Properties.Setoid.html#769" class="Bound">ℓ</a> <a id="1565" href="Relation.Binary.Properties.Setoid.html#769" class="Bound">ℓ</a>
|
||
<a id="1567" href="Relation.Binary.Properties.Setoid.html#1539" class="Function">≈-preorder</a> <a id="1578" class="Symbol">=</a> <a id="1580" class="Keyword">record</a>
|
||
<a id="1589" class="Symbol">{</a> <a id="1591" href="Relation.Binary.Bundles.html#2334" class="Field">isPreorder</a> <a id="1602" class="Symbol">=</a> <a id="1604" href="Relation.Binary.Properties.Setoid.html#1184" class="Function">≈-isPreorder</a>
|
||
<a id="1619" class="Symbol">}</a>
|
||
|
||
<a id="≈-poset"></a><a id="1622" href="Relation.Binary.Properties.Setoid.html#1622" class="Function">≈-poset</a> <a id="1630" class="Symbol">:</a> <a id="1632" href="Relation.Binary.Bundles.html#3530" class="Record">Poset</a> <a id="1638" href="Relation.Binary.Properties.Setoid.html#767" class="Bound">a</a> <a id="1640" href="Relation.Binary.Properties.Setoid.html#769" class="Bound">ℓ</a> <a id="1642" href="Relation.Binary.Properties.Setoid.html#769" class="Bound">ℓ</a>
|
||
<a id="1644" href="Relation.Binary.Properties.Setoid.html#1622" class="Function">≈-poset</a> <a id="1652" class="Symbol">=</a> <a id="1654" class="Keyword">record</a>
|
||
<a id="1663" class="Symbol">{</a> <a id="1665" href="Relation.Binary.Bundles.html#3705" class="Field">isPartialOrder</a> <a id="1680" class="Symbol">=</a> <a id="1682" href="Relation.Binary.Properties.Setoid.html#1328" class="Function">≈-isPartialOrder</a>
|
||
<a id="1701" class="Symbol">}</a>
|
||
|
||
<a id="1704" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="1777" class="Comment">-- Properties of _≉_</a>
|
||
|
||
<a id="≉-sym"></a><a id="1799" href="Relation.Binary.Properties.Setoid.html#1799" class="Function">≉-sym</a> <a id="1805" class="Symbol">:</a> <a id="1808" href="Relation.Binary.Definitions.html#1587" class="Function">Symmetric</a> <a id="1818" href="Relation.Binary.Bundles.html#1031" class="Function Operator">_≉_</a>
|
||
<a id="1822" href="Relation.Binary.Properties.Setoid.html#1799" class="Function">≉-sym</a> <a id="1828" href="Relation.Binary.Properties.Setoid.html#1828" class="Bound">x≉y</a> <a id="1832" class="Symbol">=</a> <a id="1835" href="Relation.Binary.Properties.Setoid.html#1828" class="Bound">x≉y</a> <a id="1839" href="Function.Base.html#1115" class="Function Operator">∘</a> <a id="1841" href="Relation.Binary.Structures.html#1200" class="Function">sym</a>
|
||
|
||
<a id="≉-respˡ"></a><a id="1846" href="Relation.Binary.Properties.Setoid.html#1846" class="Function">≉-respˡ</a> <a id="1854" class="Symbol">:</a> <a id="1856" href="Relation.Binary.Bundles.html#1031" class="Function Operator">_≉_</a> <a id="1860" href="Relation.Binary.Definitions.html#5500" class="Function Operator">Respectsˡ</a> <a id="1870" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a>
|
||
<a id="1874" href="Relation.Binary.Properties.Setoid.html#1846" class="Function">≉-respˡ</a> <a id="1882" href="Relation.Binary.Properties.Setoid.html#1882" class="Bound">x≈x′</a> <a id="1887" href="Relation.Binary.Properties.Setoid.html#1887" class="Bound">x≉y</a> <a id="1891" class="Symbol">=</a> <a id="1893" href="Relation.Binary.Properties.Setoid.html#1887" class="Bound">x≉y</a> <a id="1897" href="Function.Base.html#1115" class="Function Operator">∘</a> <a id="1899" href="Relation.Binary.Structures.html#1226" class="Function">trans</a> <a id="1905" href="Relation.Binary.Properties.Setoid.html#1882" class="Bound">x≈x′</a>
|
||
|
||
<a id="≉-respʳ"></a><a id="1911" href="Relation.Binary.Properties.Setoid.html#1911" class="Function">≉-respʳ</a> <a id="1919" class="Symbol">:</a> <a id="1921" href="Relation.Binary.Bundles.html#1031" class="Function Operator">_≉_</a> <a id="1925" href="Relation.Binary.Definitions.html#5335" class="Function Operator">Respectsʳ</a> <a id="1935" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a>
|
||
<a id="1939" href="Relation.Binary.Properties.Setoid.html#1911" class="Function">≉-respʳ</a> <a id="1947" href="Relation.Binary.Properties.Setoid.html#1947" class="Bound">y≈y′</a> <a id="1952" href="Relation.Binary.Properties.Setoid.html#1952" class="Bound">x≉y</a> <a id="1956" href="Relation.Binary.Properties.Setoid.html#1956" class="Bound">x≈y′</a> <a id="1961" class="Symbol">=</a> <a id="1963" href="Relation.Binary.Properties.Setoid.html#1952" class="Bound">x≉y</a> <a id="1967" href="Function.Base.html#1974" class="Function Operator">$</a> <a id="1969" href="Relation.Binary.Structures.html#1226" class="Function">trans</a> <a id="1975" href="Relation.Binary.Properties.Setoid.html#1956" class="Bound">x≈y′</a> <a id="1980" class="Symbol">(</a><a id="1981" href="Relation.Binary.Structures.html#1200" class="Function">sym</a> <a id="1985" href="Relation.Binary.Properties.Setoid.html#1947" class="Bound">y≈y′</a><a id="1989" class="Symbol">)</a>
|
||
|
||
<a id="≉-resp₂"></a><a id="1992" href="Relation.Binary.Properties.Setoid.html#1992" class="Function">≉-resp₂</a> <a id="2000" class="Symbol">:</a> <a id="2002" href="Relation.Binary.Bundles.html#1031" class="Function Operator">_≉_</a> <a id="2006" href="Relation.Binary.Definitions.html#5663" class="Function Operator">Respects₂</a> <a id="2016" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a>
|
||
<a id="2020" href="Relation.Binary.Properties.Setoid.html#1992" class="Function">≉-resp₂</a> <a id="2028" class="Symbol">=</a> <a id="2030" href="Relation.Binary.Properties.Setoid.html#1911" class="Function">≉-respʳ</a> <a id="2038" href="Agda.Builtin.Sigma.html#235" class="InductiveConstructor Operator">,</a> <a id="2040" href="Relation.Binary.Properties.Setoid.html#1846" class="Function">≉-respˡ</a>
|
||
|
||
<a id="2049" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="2122" class="Comment">-- Other properties</a>
|
||
|
||
<a id="respʳ-flip"></a><a id="2143" href="Relation.Binary.Properties.Setoid.html#2143" class="Function">respʳ-flip</a> <a id="2154" class="Symbol">:</a> <a id="2156" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a> <a id="2160" href="Relation.Binary.Definitions.html#5335" class="Function Operator">Respectsʳ</a> <a id="2170" class="Symbol">(</a><a id="2171" href="Function.Base.html#1638" class="Function">flip</a> <a id="2176" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a><a id="2179" class="Symbol">)</a>
|
||
<a id="2181" href="Relation.Binary.Properties.Setoid.html#2143" class="Function">respʳ-flip</a> <a id="2192" href="Relation.Binary.Properties.Setoid.html#2192" class="Bound">y≈z</a> <a id="2196" href="Relation.Binary.Properties.Setoid.html#2196" class="Bound">x≈z</a> <a id="2200" class="Symbol">=</a> <a id="2202" href="Relation.Binary.Structures.html#1226" class="Function">trans</a> <a id="2208" href="Relation.Binary.Properties.Setoid.html#2196" class="Bound">x≈z</a> <a id="2212" class="Symbol">(</a><a id="2213" href="Relation.Binary.Structures.html#1200" class="Function">sym</a> <a id="2217" href="Relation.Binary.Properties.Setoid.html#2192" class="Bound">y≈z</a><a id="2220" class="Symbol">)</a>
|
||
|
||
<a id="respˡ-flip"></a><a id="2223" href="Relation.Binary.Properties.Setoid.html#2223" class="Function">respˡ-flip</a> <a id="2234" class="Symbol">:</a> <a id="2236" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a> <a id="2240" href="Relation.Binary.Definitions.html#5500" class="Function Operator">Respectsˡ</a> <a id="2250" class="Symbol">(</a><a id="2251" href="Function.Base.html#1638" class="Function">flip</a> <a id="2256" href="Relation.Binary.Bundles.html#1169" class="Field Operator">_≈_</a><a id="2259" class="Symbol">)</a>
|
||
<a id="2261" href="Relation.Binary.Properties.Setoid.html#2223" class="Function">respˡ-flip</a> <a id="2272" class="Symbol">=</a> <a id="2274" href="Relation.Binary.Structures.html#1226" class="Function">trans</a>
|
||
</pre></body></html> |