mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
103 lines
32 KiB
HTML
103 lines
32 KiB
HTML
|
<!DOCTYPE HTML>
|
|||
|
<html><head><meta charset="utf-8"><title>Relation.Binary.Reasoning.Base.Double</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">-- The basic code for equational reasoning with two relations:</a>
|
|||
|
<a id="169" class="Comment">-- equality and some other ordering.</a>
|
|||
|
<a id="206" class="Comment">------------------------------------------------------------------------</a>
|
|||
|
<a id="279" class="Comment">--</a>
|
|||
|
<a id="282" class="Comment">-- See `Data.Nat.Properties` or `Relation.Binary.Reasoning.PartialOrder`</a>
|
|||
|
<a id="355" class="Comment">-- for examples of how to instantiate this module.</a>
|
|||
|
|
|||
|
<a id="407" class="Symbol">{-#</a> <a id="411" class="Keyword">OPTIONS</a> <a id="419" class="Pragma">--cubical-compatible</a> <a id="440" class="Pragma">--safe</a> <a id="447" class="Symbol">#-}</a>
|
|||
|
|
|||
|
<a id="452" class="Keyword">open</a> <a id="457" class="Keyword">import</a> <a id="464" href="Level.html" class="Module">Level</a> <a id="470" class="Keyword">using</a> <a id="476" class="Symbol">(</a><a id="477" href="Agda.Primitive.html#961" class="Primitive Operator">_⊔_</a><a id="480" class="Symbol">)</a>
|
|||
|
<a id="482" class="Keyword">open</a> <a id="487" class="Keyword">import</a> <a id="494" href="Function.html" class="Module">Function</a> <a id="503" class="Keyword">using</a> <a id="509" class="Symbol">(</a><a id="510" href="Function.Base.html#4042" class="Function Operator">case_of_</a><a id="518" class="Symbol">)</a>
|
|||
|
<a id="520" class="Keyword">open</a> <a id="525" class="Keyword">import</a> <a id="532" href="Relation.Nullary.Decidable.Core.html" class="Module">Relation.Nullary.Decidable.Core</a> <a id="564" class="Keyword">using</a> <a id="570" class="Symbol">(</a><a id="571" href="Relation.Nullary.Decidable.Core.html#1485" class="Record">Dec</a><a id="574" class="Symbol">;</a> <a id="576" href="Relation.Nullary.Decidable.Core.html#1618" class="InductiveConstructor">yes</a><a id="579" class="Symbol">;</a> <a id="581" href="Relation.Nullary.Decidable.Core.html#1655" class="InductiveConstructor">no</a><a id="583" class="Symbol">)</a>
|
|||
|
<a id="585" class="Keyword">open</a> <a id="590" class="Keyword">import</a> <a id="597" href="Relation.Binary.Core.html" class="Module">Relation.Binary.Core</a> <a id="618" class="Keyword">using</a> <a id="624" class="Symbol">(</a><a id="625" href="Relation.Binary.Core.html#896" class="Function">Rel</a><a id="628" class="Symbol">;</a> <a id="630" href="Relation.Binary.Core.html#1268" class="Function Operator">_⇒_</a><a id="633" class="Symbol">)</a>
|
|||
|
<a id="635" class="Keyword">open</a> <a id="640" class="Keyword">import</a> <a id="647" href="Relation.Binary.Definitions.html" class="Module">Relation.Binary.Definitions</a> <a id="675" class="Keyword">using</a> <a id="681" class="Symbol">(</a><a id="682" href="Relation.Binary.Definitions.html#1428" class="Function">Reflexive</a><a id="691" class="Symbol">;</a> <a id="693" href="Relation.Binary.Definitions.html#1674" class="Function">Trans</a><a id="698" class="Symbol">)</a>
|
|||
|
<a id="700" class="Keyword">open</a> <a id="705" class="Keyword">import</a> <a id="712" href="Relation.Binary.Structures.html" class="Module">Relation.Binary.Structures</a> <a id="739" class="Keyword">using</a> <a id="745" class="Symbol">(</a><a id="746" href="Relation.Binary.Structures.html#2191" class="Record">IsPreorder</a><a id="756" class="Symbol">)</a>
|
|||
|
<a id="758" class="Keyword">open</a> <a id="763" class="Keyword">import</a> <a id="770" href="Relation.Binary.PropositionalEquality.Core.html" class="Module">Relation.Binary.PropositionalEquality.Core</a> <a id="813" class="Symbol">as</a> <a id="816" class="Module">P</a> <a id="818" class="Keyword">using</a> <a id="824" class="Symbol">(</a><a id="825" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a><a id="828" class="Symbol">)</a>
|
|||
|
<a id="830" class="Keyword">open</a> <a id="835" class="Keyword">import</a> <a id="842" href="Relation.Binary.Reasoning.Syntax.html" class="Module">Relation.Binary.Reasoning.Syntax</a>
|
|||
|
|
|||
|
|
|||
|
<a id="877" class="Keyword">module</a> <a id="884" href="Relation.Binary.Reasoning.Base.Double.html" class="Module">Relation.Binary.Reasoning.Base.Double</a> <a id="922" class="Symbol">{</a><a id="923" href="Relation.Binary.Reasoning.Base.Double.html#923" class="Bound">a</a> <a id="925" href="Relation.Binary.Reasoning.Base.Double.html#925" class="Bound">ℓ₁</a> <a id="928" href="Relation.Binary.Reasoning.Base.Double.html#928" class="Bound">ℓ₂</a><a id="930" class="Symbol">}</a> <a id="932" class="Symbol">{</a><a id="933" href="Relation.Binary.Reasoning.Base.Double.html#933" class="Bound">A</a> <a id="935" class="Symbol">:</a> <a id="937" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="941" href="Relation.Binary.Reasoning.Base.Double.html#923" class="Bound">a</a><a id="942" class="Symbol">}</a>
|
|||
|
<a id="946" class="Symbol">{</a><a id="947" href="Relation.Binary.Reasoning.Base.Double.html#947" class="Bound Operator">_≈_</a> <a id="951" class="Symbol">:</a> <a id="953" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="957" href="Relation.Binary.Reasoning.Base.Double.html#933" class="Bound">A</a> <a id="959" href="Relation.Binary.Reasoning.Base.Double.html#925" class="Bound">ℓ₁</a><a id="961" class="Symbol">}</a> <a id="963" class="Symbol">{</a><a id="964" href="Relation.Binary.Reasoning.Base.Double.html#964" class="Bound Operator">_≲_</a> <a id="968" class="Symbol">:</a> <a id="970" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="974" href="Relation.Binary.Reasoning.Base.Double.html#933" class="Bound">A</a> <a id="976" href="Relation.Binary.Reasoning.Base.Double.html#928" class="Bound">ℓ₂</a><a id="978" class="Symbol">}</a> <a id="980" class="Symbol">(</a><a id="981" href="Relation.Binary.Reasoning.Base.Double.html#981" class="Bound">isPreorder</a> <a id="992" class="Symbol">:</a> <a id="994" href="Relation.Binary.Structures.html#2191" class="Record">IsPreorder</a> <a id="1005" href="Relation.Binary.Reasoning.Base.Double.html#947" class="Bound Operator">_≈_</a> <a id="1009" href="Relation.Binary.Reasoning.Base.Double.html#964" class="Bound Operator">_≲_</a><a id="1012" class="Symbol">)</a>
|
|||
|
<a id="1016" class="Keyword">where</a>
|
|||
|
|
|||
|
<a id="1023" class="Keyword">open</a> <a id="1028" href="Relation.Binary.Structures.html#2191" class="Module">IsPreorder</a> <a id="1039" href="Relation.Binary.Reasoning.Base.Double.html#981" class="Bound">isPreorder</a>
|
|||
|
|
|||
|
<a id="1051" class="Comment">------------------------------------------------------------------------</a>
|
|||
|
<a id="1124" class="Comment">-- A datatype to hide the current relation type</a>
|
|||
|
|
|||
|
<a id="1173" class="Keyword">infix</a> <a id="1179" class="Number">4</a> <a id="1181" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a>
|
|||
|
|
|||
|
<a id="1196" class="Keyword">data</a> <a id="_IsRelatedTo_"></a><a id="1201" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="1215" class="Symbol">(</a><a id="1216" href="Relation.Binary.Reasoning.Base.Double.html#1216" class="Bound">x</a> <a id="1218" href="Relation.Binary.Reasoning.Base.Double.html#1218" class="Bound">y</a> <a id="1220" class="Symbol">:</a> <a id="1222" href="Relation.Binary.Reasoning.Base.Double.html#933" class="Bound">A</a><a id="1223" class="Symbol">)</a> <a id="1225" class="Symbol">:</a> <a id="1227" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1231" class="Symbol">(</a><a id="1232" href="Relation.Binary.Reasoning.Base.Double.html#923" class="Bound">a</a> <a id="1234" href="Agda.Primitive.html#961" class="Primitive Operator">⊔</a> <a id="1236" href="Relation.Binary.Reasoning.Base.Double.html#925" class="Bound">ℓ₁</a> <a id="1239" href="Agda.Primitive.html#961" class="Primitive Operator">⊔</a> <a id="1241" href="Relation.Binary.Reasoning.Base.Double.html#928" class="Bound">ℓ₂</a><a id="1243" class="Symbol">)</a> <a id="1245" class="Keyword">where</a>
|
|||
|
<a id="_IsRelatedTo_.nonstrict"></a><a id="1253" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="1263" class="Symbol">:</a> <a id="1265" class="Symbol">(</a><a id="1266" href="Relation.Binary.Reasoning.Base.Double.html#1266" class="Bound">x≲y</a> <a id="1270" class="Symbol">:</a> <a id="1272" href="Relation.Binary.Reasoning.Base.Double.html#1216" class="Bound">x</a> <a id="1274" href="Relation.Binary.Reasoning.Base.Double.html#964" class="Bound Operator">≲</a> <a id="1276" href="Relation.Binary.Reasoning.Base.Double.html#1218" class="Bound">y</a><a id="1277" class="Symbol">)</a> <a id="1279" class="Symbol">→</a> <a id="1281" href="Relation.Binary.Reasoning.Base.Double.html#1216" class="Bound">x</a> <a id="1283" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">IsRelatedTo</a> <a id="1295" href="Relation.Binary.Reasoning.Base.Double.html#1218" class="Bound">y</a>
|
|||
|
<a id="_IsRelatedTo_.equals"></a><a id="1299" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="1309" class="Symbol">:</a> <a id="1311" class="Symbol">(</a><a id="1312" href="Relation.Binary.Reasoning.Base.Double.html#1312" class="Bound">x≈y</a> <a id="1316" class="Symbol">:</a> <a id="1318" href="Relation.Binary.Reasoning.Base.Double.html#1216" class="Bound">x</a> <a id="1320" href="Relation.Binary.Reasoning.Base.Double.html#947" class="Bound Operator">≈</a> <a id="1322" href="Relation.Binary.Reasoning.Base.Double.html#1218" class="Bound">y</a><a id="1323" class="Symbol">)</a> <a id="1325" class="Symbol">→</a> <a id="1327" href="Relation.Binary.Reasoning.Base.Double.html#1216" class="Bound">x</a> <a id="1329" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">IsRelatedTo</a> <a id="1341" href="Relation.Binary.Reasoning.Base.Double.html#1218" class="Bound">y</a>
|
|||
|
|
|||
|
<a id="start"></a><a id="1344" href="Relation.Binary.Reasoning.Base.Double.html#1344" class="Function">start</a> <a id="1350" class="Symbol">:</a> <a id="1352" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="1366" href="Relation.Binary.Core.html#1268" class="Function Operator">⇒</a> <a id="1368" href="Relation.Binary.Reasoning.Base.Double.html#964" class="Bound Operator">_≲_</a>
|
|||
|
<a id="1372" href="Relation.Binary.Reasoning.Base.Double.html#1344" class="Function">start</a> <a id="1378" class="Symbol">(</a><a id="1379" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="1386" href="Relation.Binary.Reasoning.Base.Double.html#1386" class="Bound">x≈y</a><a id="1389" class="Symbol">)</a> <a id="1391" class="Symbol">=</a> <a id="1393" href="Relation.Binary.Structures.html#2359" class="Field">reflexive</a> <a id="1403" href="Relation.Binary.Reasoning.Base.Double.html#1386" class="Bound">x≈y</a>
|
|||
|
<a id="1407" href="Relation.Binary.Reasoning.Base.Double.html#1344" class="Function">start</a> <a id="1413" class="Symbol">(</a><a id="1414" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="1424" href="Relation.Binary.Reasoning.Base.Double.html#1424" class="Bound">x≲y</a><a id="1427" class="Symbol">)</a> <a id="1429" class="Symbol">=</a> <a id="1431" href="Relation.Binary.Reasoning.Base.Double.html#1424" class="Bound">x≲y</a>
|
|||
|
|
|||
|
<a id="≡-go"></a><a id="1436" href="Relation.Binary.Reasoning.Base.Double.html#1436" class="Function">≡-go</a> <a id="1441" class="Symbol">:</a> <a id="1443" href="Relation.Binary.Definitions.html#1674" class="Function">Trans</a> <a id="1449" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a> <a id="1453" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="1467" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a>
|
|||
|
<a id="1481" href="Relation.Binary.Reasoning.Base.Double.html#1436" class="Function">≡-go</a> <a id="1486" href="Relation.Binary.Reasoning.Base.Double.html#1486" class="Bound">x≡y</a> <a id="1490" class="Symbol">(</a><a id="1491" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="1498" href="Relation.Binary.Reasoning.Base.Double.html#1498" class="Bound">y≈z</a><a id="1501" class="Symbol">)</a> <a id="1503" class="Symbol">=</a> <a id="1505" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="1512" class="Symbol">(</a><a id="1513" href="Function.Base.html#4042" class="Function Operator">case</a> <a id="1518" href="Relation.Binary.Reasoning.Base.Double.html#1486" class="Bound">x≡y</a> <a id="1522" href="Function.Base.html#4042" class="Function Operator">of</a> <a id="1525" class="Symbol">λ</a> <a id="1527" class="Keyword">where</a> <a id="1533" href="Agda.Builtin.Equality.html#207" class="InductiveConstructor">P.refl</a> <a id="1540" class="Symbol">→</a> <a id="1542" href="Relation.Binary.Reasoning.Base.Double.html#1498" class="Bound">y≈z</a><a id="1545" class="Symbol">)</a>
|
|||
|
<a id="1547" href="Relation.Binary.Reasoning.Base.Double.html#1436" class="Function">≡-go</a> <a id="1552" href="Relation.Binary.Reasoning.Base.Double.html#1552" class="Bound">x≡y</a> <a id="1556" class="Symbol">(</a><a id="1557" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="1567" href="Relation.Binary.Reasoning.Base.Double.html#1567" class="Bound">y≤z</a><a id="1570" class="Symbol">)</a> <a id="1572" class="Symbol">=</a> <a id="1574" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="1584" class="Symbol">(</a><a id="1585" href="Function.Base.html#4042" class="Function Operator">case</a> <a id="1590" href="Relation.Binary.Reasoning.Base.Double.html#1552" class="Bound">x≡y</a> <a id="1594" href="Function.Base.html#4042" class="Function Operator">of</a> <a id="1597" class="Symbol">λ</a> <a id="1599" class="Keyword">where</a> <a id="1605" href="Agda.Builtin.Equality.html#207" class="InductiveConstructor">P.refl</a> <a id="1612" class="Symbol">→</a> <a id="1614" href="Relation.Binary.Reasoning.Base.Double.html#1567" class="Bound">y≤z</a><a id="1617" class="Symbol">)</a>
|
|||
|
|
|||
|
<a id="≲-go"></a><a id="1620" href="Relation.Binary.Reasoning.Base.Double.html#1620" class="Function">≲-go</a> <a id="1625" class="Symbol">:</a> <a id="1627" href="Relation.Binary.Definitions.html#1674" class="Function">Trans</a> <a id="1633" href="Relation.Binary.Reasoning.Base.Double.html#964" class="Bound Operator">_≲_</a> <a id="1637" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="1651" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a>
|
|||
|
<a id="1665" href="Relation.Binary.Reasoning.Base.Double.html#1620" class="Function">≲-go</a> <a id="1670" href="Relation.Binary.Reasoning.Base.Double.html#1670" class="Bound">x≲y</a> <a id="1674" class="Symbol">(</a><a id="1675" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="1682" href="Relation.Binary.Reasoning.Base.Double.html#1682" class="Bound">y≈z</a><a id="1685" class="Symbol">)</a> <a id="1687" class="Symbol">=</a> <a id="1689" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="1699" class="Symbol">(</a><a id="1700" href="Relation.Binary.Structures.html#2898" class="Function">∼-respʳ-≈</a> <a id="1710" href="Relation.Binary.Reasoning.Base.Double.html#1682" class="Bound">y≈z</a> <a id="1714" href="Relation.Binary.Reasoning.Base.Double.html#1670" class="Bound">x≲y</a><a id="1717" class="Symbol">)</a>
|
|||
|
<a id="1719" href="Relation.Binary.Reasoning.Base.Double.html#1620" class="Function">≲-go</a> <a id="1724" href="Relation.Binary.Reasoning.Base.Double.html#1724" class="Bound">x≲y</a> <a id="1728" class="Symbol">(</a><a id="1729" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="1739" href="Relation.Binary.Reasoning.Base.Double.html#1739" class="Bound">y≲z</a><a id="1742" class="Symbol">)</a> <a id="1744" class="Symbol">=</a> <a id="1746" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="1756" class="Symbol">(</a><a id="1757" href="Relation.Binary.Structures.html#2389" class="Field">trans</a> <a id="1763" href="Relation.Binary.Reasoning.Base.Double.html#1724" class="Bound">x≲y</a> <a id="1767" href="Relation.Binary.Reasoning.Base.Double.html#1739" class="Bound">y≲z</a><a id="1770" class="Symbol">)</a>
|
|||
|
|
|||
|
<a id="≈-go"></a><a id="1773" href="Relation.Binary.Reasoning.Base.Double.html#1773" class="Function">≈-go</a> <a id="1778" class="Symbol">:</a> <a id="1780" href="Relation.Binary.Definitions.html#1674" class="Function">Trans</a> <a id="1786" href="Relation.Binary.Reasoning.Base.Double.html#947" class="Bound Operator">_≈_</a> <a id="1790" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="1804" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a>
|
|||
|
<a id="1818" href="Relation.Binary.Reasoning.Base.Double.html#1773" class="Function">≈-go</a> <a id="1823" href="Relation.Binary.Reasoning.Base.Double.html#1823" class="Bound">x≈y</a> <a id="1827" class="Symbol">(</a><a id="1828" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="1835" href="Relation.Binary.Reasoning.Base.Double.html#1835" class="Bound">y≈z</a><a id="1838" class="Symbol">)</a> <a id="1840" class="Symbol">=</a> <a id="1842" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="1849" class="Symbol">(</a><a id="1850" href="Relation.Binary.Structures.html#1648" class="Function">Eq.trans</a> <a id="1859" href="Relation.Binary.Reasoning.Base.Double.html#1823" class="Bound">x≈y</a> <a id="1863" href="Relation.Binary.Reasoning.Base.Double.html#1835" class="Bound">y≈z</a><a id="1866" class="Symbol">)</a>
|
|||
|
<a id="1868" href="Relation.Binary.Reasoning.Base.Double.html#1773" class="Function">≈-go</a> <a id="1873" href="Relation.Binary.Reasoning.Base.Double.html#1873" class="Bound">x≈y</a> <a id="1877" class="Symbol">(</a><a id="1878" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="1888" href="Relation.Binary.Reasoning.Base.Double.html#1888" class="Bound">y≲z</a><a id="1891" class="Symbol">)</a> <a id="1893" class="Symbol">=</a> <a id="1895" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="1905" class="Symbol">(</a><a id="1906" href="Relation.Binary.Structures.html#2755" class="Function">∼-respˡ-≈</a> <a id="1916" class="Symbol">(</a><a id="1917" href="Relation.Binary.Structures.html#1622" class="Function">Eq.sym</a> <a id="1924" href="Relation.Binary.Reasoning.Base.Double.html#1873" class="Bound">x≈y</a><a id="1927" class="Symbol">)</a> <a id="1929" href="Relation.Binary.Reasoning.Base.Double.html#1888" class="Bound">y≲z</a><a id="1932" class="Symbol">)</a>
|
|||
|
|
|||
|
<a id="stop"></a><a id="1935" href="Relation.Binary.Reasoning.Base.Double.html#1935" class="Function">stop</a> <a id="1940" class="Symbol">:</a> <a id="1942" href="Relation.Binary.Definitions.html#1428" class="Function">Reflexive</a> <a id="1952" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a>
|
|||
|
<a id="1966" href="Relation.Binary.Reasoning.Base.Double.html#1935" class="Function">stop</a> <a id="1971" class="Symbol">=</a> <a id="1973" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="1980" href="Relation.Binary.Structures.html#1596" class="Function">Eq.refl</a>
|
|||
|
|
|||
|
<a id="1989" class="Comment">------------------------------------------------------------------------</a>
|
|||
|
<a id="2062" class="Comment">-- A record that is used to ensure that the final relation proved by the</a>
|
|||
|
<a id="2135" class="Comment">-- chain of reasoning can be converted into the required relation.</a>
|
|||
|
|
|||
|
<a id="2203" class="Keyword">data</a> <a id="IsEquality"></a><a id="2208" href="Relation.Binary.Reasoning.Base.Double.html#2208" class="Datatype">IsEquality</a> <a id="2219" class="Symbol">{</a><a id="2220" href="Relation.Binary.Reasoning.Base.Double.html#2220" class="Bound">x</a> <a id="2222" href="Relation.Binary.Reasoning.Base.Double.html#2222" class="Bound">y</a><a id="2223" class="Symbol">}</a> <a id="2225" class="Symbol">:</a> <a id="2227" href="Relation.Binary.Reasoning.Base.Double.html#2220" class="Bound">x</a> <a id="2229" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">IsRelatedTo</a> <a id="2241" href="Relation.Binary.Reasoning.Base.Double.html#2222" class="Bound">y</a> <a id="2243" class="Symbol">→</a> <a id="2245" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="2249" class="Symbol">(</a><a id="2250" href="Relation.Binary.Reasoning.Base.Double.html#923" class="Bound">a</a> <a id="2252" href="Agda.Primitive.html#961" class="Primitive Operator">⊔</a> <a id="2254" href="Relation.Binary.Reasoning.Base.Double.html#925" class="Bound">ℓ₁</a> <a id="2257" href="Agda.Primitive.html#961" class="Primitive Operator">⊔</a> <a id="2259" href="Relation.Binary.Reasoning.Base.Double.html#928" class="Bound">ℓ₂</a><a id="2261" class="Symbol">)</a> <a id="2263" class="Keyword">where</a>
|
|||
|
<a id="IsEquality.isEquality"></a><a id="2271" href="Relation.Binary.Reasoning.Base.Double.html#2271" class="InductiveConstructor">isEquality</a> <a id="2282" class="Symbol">:</a> <a id="2284" class="Symbol">∀</a> <a id="2286" href="Relation.Binary.Reasoning.Base.Double.html#2286" class="Bound">x≈y</a> <a id="2290" class="Symbol">→</a> <a id="2292" href="Relation.Binary.Reasoning.Base.Double.html#2208" class="Datatype">IsEquality</a> <a id="2303" class="Symbol">(</a><a id="2304" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="2311" href="Relation.Binary.Reasoning.Base.Double.html#2286" class="Bound">x≈y</a><a id="2314" class="Symbol">)</a>
|
|||
|
|
|||
|
<a id="IsEquality?"></a><a id="2317" href="Relation.Binary.Reasoning.Base.Double.html#2317" class="Function">IsEquality?</a> <a id="2329" class="Symbol">:</a> <a id="2331" class="Symbol">∀</a> <a id="2333" class="Symbol">{</a><a id="2334" href="Relation.Binary.Reasoning.Base.Double.html#2334" class="Bound">x</a> <a id="2336" href="Relation.Binary.Reasoning.Base.Double.html#2336" class="Bound">y</a><a id="2337" class="Symbol">}</a> <a id="2339" class="Symbol">(</a><a id="2340" href="Relation.Binary.Reasoning.Base.Double.html#2340" class="Bound">x≲y</a> <a id="2344" class="Symbol">:</a> <a id="2346" href="Relation.Binary.Reasoning.Base.Double.html#2334" class="Bound">x</a> <a id="2348" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">IsRelatedTo</a> <a id="2360" href="Relation.Binary.Reasoning.Base.Double.html#2336" class="Bound">y</a><a id="2361" class="Symbol">)</a> <a id="2363" class="Symbol">→</a> <a id="2365" href="Relation.Nullary.Decidable.Core.html#1485" class="Record">Dec</a> <a id="2369" class="Symbol">(</a><a id="2370" href="Relation.Binary.Reasoning.Base.Double.html#2208" class="Datatype">IsEquality</a> <a id="2381" href="Relation.Binary.Reasoning.Base.Double.html#2340" class="Bound">x≲y</a><a id="2384" class="Symbol">)</a>
|
|||
|
<a id="2386" href="Relation.Binary.Reasoning.Base.Double.html#2317" class="Function">IsEquality?</a> <a id="2398" class="Symbol">(</a><a id="2399" href="Relation.Binary.Reasoning.Base.Double.html#1253" class="InductiveConstructor">nonstrict</a> <a id="2409" class="Symbol">_)</a> <a id="2412" class="Symbol">=</a> <a id="2414" href="Relation.Nullary.Decidable.Core.html#1655" class="InductiveConstructor">no</a> <a id="2417" class="Symbol">λ()</a>
|
|||
|
<a id="2421" href="Relation.Binary.Reasoning.Base.Double.html#2317" class="Function">IsEquality?</a> <a id="2433" class="Symbol">(</a><a id="2434" href="Relation.Binary.Reasoning.Base.Double.html#1299" class="InductiveConstructor">equals</a> <a id="2441" href="Relation.Binary.Reasoning.Base.Double.html#2441" class="Bound">x≈y</a><a id="2444" class="Symbol">)</a> <a id="2447" class="Symbol">=</a> <a id="2449" href="Relation.Nullary.Decidable.Core.html#1618" class="InductiveConstructor">yes</a> <a id="2453" class="Symbol">(</a><a id="2454" href="Relation.Binary.Reasoning.Base.Double.html#2271" class="InductiveConstructor">isEquality</a> <a id="2465" href="Relation.Binary.Reasoning.Base.Double.html#2441" class="Bound">x≈y</a><a id="2468" class="Symbol">)</a>
|
|||
|
|
|||
|
<a id="extractEquality"></a><a id="2471" href="Relation.Binary.Reasoning.Base.Double.html#2471" class="Function">extractEquality</a> <a id="2487" class="Symbol">:</a> <a id="2489" class="Symbol">∀</a> <a id="2491" class="Symbol">{</a><a id="2492" href="Relation.Binary.Reasoning.Base.Double.html#2492" class="Bound">x</a> <a id="2494" href="Relation.Binary.Reasoning.Base.Double.html#2494" class="Bound">y</a><a id="2495" class="Symbol">}</a> <a id="2497" class="Symbol">{</a><a id="2498" href="Relation.Binary.Reasoning.Base.Double.html#2498" class="Bound">x≲y</a> <a id="2502" class="Symbol">:</a> <a id="2504" href="Relation.Binary.Reasoning.Base.Double.html#2492" class="Bound">x</a> <a id="2506" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">IsRelatedTo</a> <a id="2518" href="Relation.Binary.Reasoning.Base.Double.html#2494" class="Bound">y</a><a id="2519" class="Symbol">}</a> <a id="2521" class="Symbol">→</a> <a id="2523" href="Relation.Binary.Reasoning.Base.Double.html#2208" class="Datatype">IsEquality</a> <a id="2534" href="Relation.Binary.Reasoning.Base.Double.html#2498" class="Bound">x≲y</a> <a id="2538" class="Symbol">→</a> <a id="2540" href="Relation.Binary.Reasoning.Base.Double.html#2492" class="Bound">x</a> <a id="2542" href="Relation.Binary.Reasoning.Base.Double.html#947" class="Bound Operator">≈</a> <a id="2544" href="Relation.Binary.Reasoning.Base.Double.html#2494" class="Bound">y</a>
|
|||
|
<a id="2546" href="Relation.Binary.Reasoning.Base.Double.html#2471" class="Function">extractEquality</a> <a id="2562" class="Symbol">(</a><a id="2563" href="Relation.Binary.Reasoning.Base.Double.html#2271" class="InductiveConstructor">isEquality</a> <a id="2574" href="Relation.Binary.Reasoning.Base.Double.html#2574" class="Bound">x≈y</a><a id="2577" class="Symbol">)</a> <a id="2579" class="Symbol">=</a> <a id="2581" href="Relation.Binary.Reasoning.Base.Double.html#2574" class="Bound">x≈y</a>
|
|||
|
|
|||
|
<a id="equalitySubRelation"></a><a id="2586" href="Relation.Binary.Reasoning.Base.Double.html#2586" class="Function">equalitySubRelation</a> <a id="2606" class="Symbol">:</a> <a id="2608" href="Relation.Binary.Reasoning.Syntax.html#1920" class="Record">SubRelation</a> <a id="2621" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="2635" class="Symbol">_</a> <a id="2637" class="Symbol">_</a>
|
|||
|
<a id="2639" href="Relation.Binary.Reasoning.Base.Double.html#2586" class="Function">equalitySubRelation</a> <a id="2659" class="Symbol">=</a> <a id="2661" class="Keyword">record</a>
|
|||
|
<a id="2670" class="Symbol">{</a> <a id="2672" href="Relation.Binary.Reasoning.Syntax.html#2033" class="Field">IsS</a> <a id="2676" class="Symbol">=</a> <a id="2678" href="Relation.Binary.Reasoning.Base.Double.html#2208" class="Datatype">IsEquality</a>
|
|||
|
<a id="2691" class="Symbol">;</a> <a id="2693" href="Relation.Binary.Reasoning.Syntax.html#2058" class="Field">IsS?</a> <a id="2698" class="Symbol">=</a> <a id="2700" href="Relation.Binary.Reasoning.Base.Double.html#2317" class="Function">IsEquality?</a>
|
|||
|
<a id="2714" class="Symbol">;</a> <a id="2716" href="Relation.Binary.Reasoning.Syntax.html#2101" class="Field">extract</a> <a id="2724" class="Symbol">=</a> <a id="2726" href="Relation.Binary.Reasoning.Base.Double.html#2471" class="Function">extractEquality</a>
|
|||
|
<a id="2744" class="Symbol">}</a>
|
|||
|
|
|||
|
<a id="2747" class="Comment">------------------------------------------------------------------------</a>
|
|||
|
<a id="2820" class="Comment">-- Reasoning combinators</a>
|
|||
|
|
|||
|
<a id="2846" class="Keyword">open</a> <a id="2851" href="Relation.Binary.Reasoning.Syntax.html#1408" class="Module">begin-syntax</a> <a id="2865" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="2879" href="Relation.Binary.Reasoning.Base.Double.html#1344" class="Function">start</a> <a id="2885" class="Keyword">public</a>
|
|||
|
<a id="2892" class="Keyword">open</a> <a id="2897" href="Relation.Binary.Reasoning.Syntax.html#2412" class="Module">begin-equality-syntax</a> <a id="2920" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="2934" href="Relation.Binary.Reasoning.Base.Double.html#2586" class="Function">equalitySubRelation</a> <a id="2954" class="Keyword">public</a>
|
|||
|
<a id="2961" class="Keyword">open</a> <a id="2966" href="Relation.Binary.Reasoning.Syntax.html#10883" class="Module">≡-syntax</a> <a id="2975" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="2989" href="Relation.Binary.Reasoning.Base.Double.html#1436" class="Function">≡-go</a> <a id="2994" class="Keyword">public</a>
|
|||
|
<a id="3001" class="Keyword">open</a> <a id="3006" href="Relation.Binary.Reasoning.Syntax.html#6995" class="Module">≈-syntax</a> <a id="3015" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="3029" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="3043" href="Relation.Binary.Reasoning.Base.Double.html#1773" class="Function">≈-go</a> <a id="3048" href="Relation.Binary.Structures.html#1622" class="Function">Eq.sym</a> <a id="3055" class="Keyword">public</a>
|
|||
|
<a id="3062" class="Keyword">open</a> <a id="3067" href="Relation.Binary.Reasoning.Syntax.html#5305" class="Module">≲-syntax</a> <a id="3076" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="3090" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="3104" href="Relation.Binary.Reasoning.Base.Double.html#1620" class="Function">≲-go</a> <a id="3109" class="Keyword">public</a>
|
|||
|
<a id="3116" class="Keyword">open</a> <a id="3121" href="Relation.Binary.Reasoning.Syntax.html#12202" class="Module">end-syntax</a> <a id="3132" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="3146" href="Relation.Binary.Reasoning.Base.Double.html#1935" class="Function">stop</a> <a id="3151" class="Keyword">public</a>
|
|||
|
|
|||
|
|
|||
|
<a id="3160" class="Comment">------------------------------------------------------------------------</a>
|
|||
|
<a id="3233" class="Comment">-- DEPRECATED NAMES</a>
|
|||
|
<a id="3253" class="Comment">------------------------------------------------------------------------</a>
|
|||
|
<a id="3326" class="Comment">-- Please use the new names as continuing support for the old names is</a>
|
|||
|
<a id="3397" class="Comment">-- not guaranteed.</a>
|
|||
|
|
|||
|
<a id="3417" class="Comment">-- Version 2.0</a>
|
|||
|
|
|||
|
<a id="3433" class="Keyword">open</a> <a id="3438" href="Relation.Binary.Reasoning.Syntax.html#5172" class="Module">∼-syntax</a> <a id="3447" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="3461" href="Relation.Binary.Reasoning.Base.Double.html#1201" class="Datatype Operator">_IsRelatedTo_</a> <a id="3475" href="Relation.Binary.Reasoning.Base.Double.html#1620" class="Function">≲-go</a> <a id="3480" class="Keyword">public</a>
|
|||
|
<a id="3487" class="Symbol">{-#</a> <a id="3491" class="Keyword">WARNING_ON_USAGE</a> <a id="3508" class="Pragma">step-∼</a>
|
|||
|
<a id="3515" class="String">"Warning: step-∼ and _∼⟨_⟩_ syntax was deprecated in v2.0.
|
|||
|
Please use step-≲ and _≲⟨_⟩_ instead. "</a>
|
|||
|
<a id="3614" class="Symbol">#-}</a>
|
|||
|
</pre></body></html>
|