bsc-leon-vatthauer/public/Relation.Nullary.Decidable.Core.html

132 lines
No EOL
44 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>Relation.Nullary.Decidable.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">-- Operations on and properties of decidable relations</a>
<a id="161" class="Comment">--</a>
<a id="164" class="Comment">-- This file contains some core definitions which are re-exported by</a>
<a id="233" class="Comment">-- Relation.Nullary.Decidable</a>
<a id="263" class="Comment">------------------------------------------------------------------------</a>
<a id="337" class="Symbol">{-#</a> <a id="341" class="Keyword">OPTIONS</a> <a id="349" class="Pragma">--cubical-compatible</a> <a id="370" class="Pragma">--safe</a> <a id="377" class="Symbol">#-}</a>
<a id="382" class="Keyword">module</a> <a id="389" href="Relation.Nullary.Decidable.Core.html" class="Module">Relation.Nullary.Decidable.Core</a> <a id="421" class="Keyword">where</a>
<a id="428" class="Keyword">open</a> <a id="433" class="Keyword">import</a> <a id="440" href="Level.html" class="Module">Level</a> <a id="446" class="Keyword">using</a> <a id="452" class="Symbol">(</a><a id="453" href="Agda.Primitive.html#591" class="Postulate">Level</a><a id="458" class="Symbol">;</a> <a id="460" href="Level.html#409" class="Record">Lift</a><a id="464" class="Symbol">)</a>
<a id="466" class="Keyword">open</a> <a id="471" class="Keyword">import</a> <a id="478" href="Data.Bool.Base.html" class="Module">Data.Bool.Base</a> <a id="493" class="Keyword">using</a> <a id="499" class="Symbol">(</a><a id="500" href="Agda.Builtin.Bool.html#156" class="Datatype">Bool</a><a id="504" class="Symbol">;</a> <a id="506" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a><a id="511" class="Symbol">;</a> <a id="513" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a><a id="517" class="Symbol">;</a> <a id="519" href="Data.Bool.Base.html#941" class="Function">not</a><a id="522" class="Symbol">;</a> <a id="524" href="Data.Bool.Base.html#1460" class="Function">T</a><a id="525" class="Symbol">)</a>
<a id="527" class="Keyword">open</a> <a id="532" class="Keyword">import</a> <a id="539" href="Data.Unit.Base.html" class="Module">Data.Unit.Base</a> <a id="554" class="Keyword">using</a> <a id="560" class="Symbol">(</a><a id="561" href="Agda.Builtin.Unit.html#158" class="Record"></a><a id="562" class="Symbol">)</a>
<a id="564" class="Keyword">open</a> <a id="569" class="Keyword">import</a> <a id="576" href="Data.Empty.html" class="Module">Data.Empty</a>
<a id="587" class="Keyword">open</a> <a id="592" class="Keyword">import</a> <a id="599" href="Data.Product.html" class="Module">Data.Product</a>
<a id="612" class="Keyword">open</a> <a id="617" class="Keyword">import</a> <a id="624" href="Function.Base.html" class="Module">Function.Base</a>
<a id="639" class="Keyword">open</a> <a id="644" class="Keyword">import</a> <a id="651" href="Agda.Builtin.Equality.html" class="Module">Agda.Builtin.Equality</a>
<a id="673" class="Keyword">open</a> <a id="678" class="Keyword">import</a> <a id="685" href="Relation.Nullary.Reflects.html" class="Module">Relation.Nullary.Reflects</a>
<a id="711" class="Keyword">open</a> <a id="716" class="Keyword">import</a> <a id="723" href="Relation.Nullary.html" class="Module">Relation.Nullary</a>
<a id="741" class="Keyword">private</a>
<a id="751" class="Keyword">variable</a>
<a id="764" href="Relation.Nullary.Decidable.Core.html#764" class="Generalizable">p</a> <a id="766" href="Relation.Nullary.Decidable.Core.html#766" class="Generalizable">q</a> <a id="768" class="Symbol">:</a> <a id="770" href="Agda.Primitive.html#591" class="Postulate">Level</a>
<a id="780" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="782" class="Symbol">:</a> <a id="784" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="788" href="Relation.Nullary.Decidable.Core.html#764" class="Generalizable">p</a>
<a id="794" href="Relation.Nullary.Decidable.Core.html#794" class="Generalizable">Q</a> <a id="796" class="Symbol">:</a> <a id="798" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="802" href="Relation.Nullary.Decidable.Core.html#766" class="Generalizable">q</a>
<a id="805" class="Comment">-- `isYes` is a stricter version of `does`. The lack of computation means that</a>
<a id="884" class="Comment">-- we can recover the proposition `P` from `isYes P?` by unification. This is</a>
<a id="962" class="Comment">-- useful when we are using the decision procedure for proof automation.</a>
<a id="isYes"></a><a id="1036" href="Relation.Nullary.Decidable.Core.html#1036" class="Function">isYes</a> <a id="1042" class="Symbol">:</a> <a id="1044" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1048" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="1050" class="Symbol"></a> <a id="1052" href="Agda.Builtin.Bool.html#156" class="Datatype">Bool</a>
<a id="1057" href="Relation.Nullary.Decidable.Core.html#1036" class="Function">isYes</a> <a id="1063" class="Symbol">(</a> <a id="1065" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="1070" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1078" class="Symbol">_)</a> <a id="1081" class="Symbol">=</a> <a id="1083" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a>
<a id="1088" href="Relation.Nullary.Decidable.Core.html#1036" class="Function">isYes</a> <a id="1094" class="Symbol">(</a><a id="1095" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="1101" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1109" class="Symbol">_)</a> <a id="1112" class="Symbol">=</a> <a id="1114" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a>
<a id="isYes≗does"></a><a id="1121" href="Relation.Nullary.Decidable.Core.html#1121" class="Function">isYes≗does</a> <a id="1132" class="Symbol">:</a> <a id="1134" class="Symbol">(</a><a id="1135" href="Relation.Nullary.Decidable.Core.html#1135" class="Bound">P?</a> <a id="1138" class="Symbol">:</a> <a id="1140" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1144" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="1145" class="Symbol">)</a> <a id="1147" class="Symbol"></a> <a id="1149" href="Relation.Nullary.Decidable.Core.html#1036" class="Function">isYes</a> <a id="1155" href="Relation.Nullary.Decidable.Core.html#1135" class="Bound">P?</a> <a id="1158" href="Agda.Builtin.Equality.html#133" class="Datatype Operator"></a> <a id="1160" href="Relation.Nullary.html#1590" class="Field">does</a> <a id="1165" href="Relation.Nullary.Decidable.Core.html#1135" class="Bound">P?</a>
<a id="1168" href="Relation.Nullary.Decidable.Core.html#1121" class="Function">isYes≗does</a> <a id="1179" class="Symbol">(</a> <a id="1181" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="1186" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1194" class="Symbol">_)</a> <a id="1197" class="Symbol">=</a> <a id="1199" href="Agda.Builtin.Equality.html#190" class="InductiveConstructor">refl</a>
<a id="1204" href="Relation.Nullary.Decidable.Core.html#1121" class="Function">isYes≗does</a> <a id="1215" class="Symbol">(</a><a id="1216" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="1222" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1230" class="Symbol">_)</a> <a id="1233" class="Symbol">=</a> <a id="1235" href="Agda.Builtin.Equality.html#190" class="InductiveConstructor">refl</a>
<a id="1241" class="Comment">-- The traditional name for isYes is ⌊_⌋, indicating the stripping of evidence.</a>
<a id="⌊_⌋"></a><a id="1321" href="Relation.Nullary.Decidable.Core.html#1321" class="Function Operator">⌊_⌋</a> <a id="1325" class="Symbol">=</a> <a id="1327" href="Relation.Nullary.Decidable.Core.html#1036" class="Function">isYes</a>
<a id="isNo"></a><a id="1334" href="Relation.Nullary.Decidable.Core.html#1334" class="Function">isNo</a> <a id="1339" class="Symbol">:</a> <a id="1341" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1345" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="1347" class="Symbol"></a> <a id="1349" href="Agda.Builtin.Bool.html#156" class="Datatype">Bool</a>
<a id="1354" href="Relation.Nullary.Decidable.Core.html#1334" class="Function">isNo</a> <a id="1359" class="Symbol">=</a> <a id="1361" href="Data.Bool.Base.html#941" class="Function">not</a> <a id="1365" href="Function.Base.html#1040" class="Function Operator"></a> <a id="1367" href="Relation.Nullary.Decidable.Core.html#1036" class="Function">isYes</a>
<a id="True"></a><a id="1374" href="Relation.Nullary.Decidable.Core.html#1374" class="Function">True</a> <a id="1379" class="Symbol">:</a> <a id="1381" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1385" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="1387" class="Symbol"></a> <a id="1389" href="Agda.Primitive.html#320" class="Primitive">Set</a>
<a id="1393" href="Relation.Nullary.Decidable.Core.html#1374" class="Function">True</a> <a id="1398" href="Relation.Nullary.Decidable.Core.html#1398" class="Bound">Q</a> <a id="1400" class="Symbol">=</a> <a id="1402" href="Data.Bool.Base.html#1460" class="Function">T</a> <a id="1404" class="Symbol">(</a><a id="1405" href="Relation.Nullary.Decidable.Core.html#1036" class="Function">isYes</a> <a id="1411" href="Relation.Nullary.Decidable.Core.html#1398" class="Bound">Q</a><a id="1412" class="Symbol">)</a>
<a id="False"></a><a id="1415" href="Relation.Nullary.Decidable.Core.html#1415" class="Function">False</a> <a id="1421" class="Symbol">:</a> <a id="1423" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1427" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="1429" class="Symbol"></a> <a id="1431" href="Agda.Primitive.html#320" class="Primitive">Set</a>
<a id="1435" href="Relation.Nullary.Decidable.Core.html#1415" class="Function">False</a> <a id="1441" href="Relation.Nullary.Decidable.Core.html#1441" class="Bound">Q</a> <a id="1443" class="Symbol">=</a> <a id="1445" href="Data.Bool.Base.html#1460" class="Function">T</a> <a id="1447" class="Symbol">(</a><a id="1448" href="Relation.Nullary.Decidable.Core.html#1334" class="Function">isNo</a> <a id="1453" href="Relation.Nullary.Decidable.Core.html#1441" class="Bound">Q</a><a id="1454" class="Symbol">)</a>
<a id="1457" class="Comment">-- Gives a witness to the &quot;truth&quot;.</a>
<a id="toWitness"></a><a id="1493" href="Relation.Nullary.Decidable.Core.html#1493" class="Function">toWitness</a> <a id="1503" class="Symbol">:</a> <a id="1505" class="Symbol">{</a><a id="1506" href="Relation.Nullary.Decidable.Core.html#1506" class="Bound">Q</a> <a id="1508" class="Symbol">:</a> <a id="1510" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1514" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="1515" class="Symbol">}</a> <a id="1517" class="Symbol"></a> <a id="1519" href="Relation.Nullary.Decidable.Core.html#1374" class="Function">True</a> <a id="1524" href="Relation.Nullary.Decidable.Core.html#1506" class="Bound">Q</a> <a id="1526" class="Symbol"></a> <a id="1528" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a>
<a id="1530" href="Relation.Nullary.Decidable.Core.html#1493" class="Function">toWitness</a> <a id="1540" class="Symbol">{</a><a id="1541" class="Argument">Q</a> <a id="1543" class="Symbol">=</a> <a id="1545" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="1551" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1559" href="Relation.Nullary.Decidable.Core.html#1559" class="Bound">[p]</a><a id="1562" class="Symbol">}</a> <a id="1564" class="Symbol">_</a> <a id="1567" class="Symbol">=</a> <a id="1569" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="1576" href="Relation.Nullary.Decidable.Core.html#1559" class="Bound">[p]</a>
<a id="1580" href="Relation.Nullary.Decidable.Core.html#1493" class="Function">toWitness</a> <a id="1590" class="Symbol">{</a><a id="1591" class="Argument">Q</a> <a id="1593" class="Symbol">=</a> <a id="1595" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="1601" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1610" class="Symbol">_</a> <a id="1612" class="Symbol">}</a> <a id="1614" class="Symbol">()</a>
<a id="1618" class="Comment">-- Establishes a &quot;truth&quot;, given a witness.</a>
<a id="fromWitness"></a><a id="1662" href="Relation.Nullary.Decidable.Core.html#1662" class="Function">fromWitness</a> <a id="1674" class="Symbol">:</a> <a id="1676" class="Symbol">{</a><a id="1677" href="Relation.Nullary.Decidable.Core.html#1677" class="Bound">Q</a> <a id="1679" class="Symbol">:</a> <a id="1681" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1685" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="1686" class="Symbol">}</a> <a id="1688" class="Symbol"></a> <a id="1690" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="1692" class="Symbol"></a> <a id="1694" href="Relation.Nullary.Decidable.Core.html#1374" class="Function">True</a> <a id="1699" href="Relation.Nullary.Decidable.Core.html#1677" class="Bound">Q</a>
<a id="1701" href="Relation.Nullary.Decidable.Core.html#1662" class="Function">fromWitness</a> <a id="1713" class="Symbol">{</a><a id="1714" class="Argument">Q</a> <a id="1716" class="Symbol">=</a> <a id="1718" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="1724" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1734" class="Symbol">_</a> <a id="1736" class="Symbol">}</a> <a id="1738" class="Symbol">=</a> <a id="1740" href="Function.Base.html#645" class="Function">const</a> <a id="1746" class="Symbol">_</a>
<a id="1748" href="Relation.Nullary.Decidable.Core.html#1662" class="Function">fromWitness</a> <a id="1760" class="Symbol">{</a><a id="1761" class="Argument">Q</a> <a id="1763" class="Symbol">=</a> <a id="1765" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="1771" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1779" href="Relation.Nullary.Decidable.Core.html#1779" class="Bound">[¬p]</a><a id="1783" class="Symbol">}</a> <a id="1785" class="Symbol">=</a> <a id="1787" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="1794" href="Relation.Nullary.Decidable.Core.html#1779" class="Bound">[¬p]</a>
<a id="1800" class="Comment">-- Variants for False.</a>
<a id="toWitnessFalse"></a><a id="1824" href="Relation.Nullary.Decidable.Core.html#1824" class="Function">toWitnessFalse</a> <a id="1839" class="Symbol">:</a> <a id="1841" class="Symbol">{</a><a id="1842" href="Relation.Nullary.Decidable.Core.html#1842" class="Bound">Q</a> <a id="1844" class="Symbol">:</a> <a id="1846" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1850" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="1851" class="Symbol">}</a> <a id="1853" class="Symbol"></a> <a id="1855" href="Relation.Nullary.Decidable.Core.html#1415" class="Function">False</a> <a id="1861" href="Relation.Nullary.Decidable.Core.html#1842" class="Bound">Q</a> <a id="1863" class="Symbol"></a> <a id="1865" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1867" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a>
<a id="1869" href="Relation.Nullary.Decidable.Core.html#1824" class="Function">toWitnessFalse</a> <a id="1884" class="Symbol">{</a><a id="1885" class="Argument">Q</a> <a id="1887" class="Symbol">=</a> <a id="1889" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="1895" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1905" class="Symbol">_</a> <a id="1907" class="Symbol">}</a> <a id="1909" class="Symbol">()</a>
<a id="1912" href="Relation.Nullary.Decidable.Core.html#1824" class="Function">toWitnessFalse</a> <a id="1927" class="Symbol">{</a><a id="1928" class="Argument">Q</a> <a id="1930" class="Symbol">=</a> <a id="1932" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="1938" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="1946" href="Relation.Nullary.Decidable.Core.html#1946" class="Bound">[¬p]</a><a id="1950" class="Symbol">}</a> <a id="1952" class="Symbol">_</a> <a id="1955" class="Symbol">=</a> <a id="1957" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="1964" href="Relation.Nullary.Decidable.Core.html#1946" class="Bound">[¬p]</a>
<a id="fromWitnessFalse"></a><a id="1970" href="Relation.Nullary.Decidable.Core.html#1970" class="Function">fromWitnessFalse</a> <a id="1987" class="Symbol">:</a> <a id="1989" class="Symbol">{</a><a id="1990" href="Relation.Nullary.Decidable.Core.html#1990" class="Bound">Q</a> <a id="1992" class="Symbol">:</a> <a id="1994" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1998" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="1999" class="Symbol">}</a> <a id="2001" class="Symbol"></a> <a id="2003" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2005" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="2007" class="Symbol"></a> <a id="2009" href="Relation.Nullary.Decidable.Core.html#1415" class="Function">False</a> <a id="2015" href="Relation.Nullary.Decidable.Core.html#1990" class="Bound">Q</a>
<a id="2017" href="Relation.Nullary.Decidable.Core.html#1970" class="Function">fromWitnessFalse</a> <a id="2034" class="Symbol">{</a><a id="2035" class="Argument">Q</a> <a id="2037" class="Symbol">=</a> <a id="2039" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="2045" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2053" href="Relation.Nullary.Decidable.Core.html#2053" class="Bound">[p]</a><a id="2056" class="Symbol">}</a> <a id="2058" class="Symbol">=</a> <a id="2060" href="Function.Base.html#1563" class="Function">flip</a> <a id="2065" href="Function.Base.html#1928" class="Function Operator">_$_</a> <a id="2069" class="Symbol">(</a><a id="2070" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="2077" href="Relation.Nullary.Decidable.Core.html#2053" class="Bound">[p]</a><a id="2080" class="Symbol">)</a>
<a id="2082" href="Relation.Nullary.Decidable.Core.html#1970" class="Function">fromWitnessFalse</a> <a id="2099" class="Symbol">{</a><a id="2100" class="Argument">Q</a> <a id="2102" class="Symbol">=</a> <a id="2104" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="2110" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2119" class="Symbol">_</a> <a id="2121" class="Symbol">}</a> <a id="2123" class="Symbol">=</a> <a id="2125" href="Function.Base.html#645" class="Function">const</a> <a id="2131" class="Symbol">_</a>
<a id="2134" class="Comment">-- If a decision procedure returns &quot;yes&quot;, then we can extract the</a>
<a id="2200" class="Comment">-- proof using from-yes.</a>
<a id="2226" class="Keyword">module</a> <a id="2233" href="Relation.Nullary.Decidable.Core.html#2233" class="Module">_</a> <a id="2235" class="Symbol">{</a><a id="2236" href="Relation.Nullary.Decidable.Core.html#2236" class="Bound">p</a><a id="2237" class="Symbol">}</a> <a id="2239" class="Symbol">{</a><a id="2240" href="Relation.Nullary.Decidable.Core.html#2240" class="Bound">P</a> <a id="2242" class="Symbol">:</a> <a id="2244" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2248" href="Relation.Nullary.Decidable.Core.html#2236" class="Bound">p</a><a id="2249" class="Symbol">}</a> <a id="2251" class="Keyword">where</a>
<a id="2260" href="Relation.Nullary.Decidable.Core.html#2260" class="Function">From-yes</a> <a id="2269" class="Symbol">:</a> <a id="2271" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="2275" href="Relation.Nullary.Decidable.Core.html#2240" class="Bound">P</a> <a id="2277" class="Symbol"></a> <a id="2279" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2283" href="Relation.Nullary.Decidable.Core.html#2236" class="Bound">p</a>
<a id="2287" href="Relation.Nullary.Decidable.Core.html#2260" class="Function">From-yes</a> <a id="2296" class="Symbol">(</a><a id="2297" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="2303" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2311" class="Symbol">_)</a> <a id="2314" class="Symbol">=</a> <a id="2316" href="Relation.Nullary.Decidable.Core.html#2240" class="Bound">P</a>
<a id="2320" href="Relation.Nullary.Decidable.Core.html#2260" class="Function">From-yes</a> <a id="2329" class="Symbol">(</a><a id="2330" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="2336" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2344" class="Symbol">_)</a> <a id="2347" class="Symbol">=</a> <a id="2349" href="Level.html#409" class="Record">Lift</a> <a id="2354" href="Relation.Nullary.Decidable.Core.html#2236" class="Bound">p</a> <a id="2356" href="Agda.Builtin.Unit.html#158" class="Record"></a>
<a id="2361" href="Relation.Nullary.Decidable.Core.html#2361" class="Function">from-yes</a> <a id="2370" class="Symbol">:</a> <a id="2372" class="Symbol">(</a><a id="2373" href="Relation.Nullary.Decidable.Core.html#2373" class="Bound">p</a> <a id="2375" class="Symbol">:</a> <a id="2377" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="2381" href="Relation.Nullary.Decidable.Core.html#2240" class="Bound">P</a><a id="2382" class="Symbol">)</a> <a id="2384" class="Symbol"></a> <a id="2386" href="Relation.Nullary.Decidable.Core.html#2260" class="Function">From-yes</a> <a id="2395" href="Relation.Nullary.Decidable.Core.html#2373" class="Bound">p</a>
<a id="2399" href="Relation.Nullary.Decidable.Core.html#2361" class="Function">from-yes</a> <a id="2408" class="Symbol">(</a><a id="2409" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="2415" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2423" href="Relation.Nullary.Decidable.Core.html#2423" class="Bound">[p]</a><a id="2426" class="Symbol">)</a> <a id="2428" class="Symbol">=</a> <a id="2430" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="2437" href="Relation.Nullary.Decidable.Core.html#2423" class="Bound">[p]</a>
<a id="2443" href="Relation.Nullary.Decidable.Core.html#2361" class="Function">from-yes</a> <a id="2452" class="Symbol">(</a><a id="2453" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="2459" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2467" class="Symbol">_</a> <a id="2469" class="Symbol">)</a> <a id="2471" class="Symbol">=</a> <a id="2473" class="Symbol">_</a>
<a id="2476" class="Comment">-- If a decision procedure returns &quot;no&quot;, then we can extract the proof</a>
<a id="2547" class="Comment">-- using from-no.</a>
<a id="2568" href="Relation.Nullary.Decidable.Core.html#2568" class="Function">From-no</a> <a id="2576" class="Symbol">:</a> <a id="2578" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="2582" href="Relation.Nullary.Decidable.Core.html#2240" class="Bound">P</a> <a id="2584" class="Symbol"></a> <a id="2586" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2590" href="Relation.Nullary.Decidable.Core.html#2236" class="Bound">p</a>
<a id="2594" href="Relation.Nullary.Decidable.Core.html#2568" class="Function">From-no</a> <a id="2602" class="Symbol">(</a><a id="2603" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="2609" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2617" class="Symbol">_)</a> <a id="2620" class="Symbol">=</a> <a id="2622" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2624" href="Relation.Nullary.Decidable.Core.html#2240" class="Bound">P</a>
<a id="2628" href="Relation.Nullary.Decidable.Core.html#2568" class="Function">From-no</a> <a id="2636" class="Symbol">(</a><a id="2637" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="2643" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2651" class="Symbol">_)</a> <a id="2654" class="Symbol">=</a> <a id="2656" href="Level.html#409" class="Record">Lift</a> <a id="2661" href="Relation.Nullary.Decidable.Core.html#2236" class="Bound">p</a> <a id="2663" href="Agda.Builtin.Unit.html#158" class="Record"></a>
<a id="2668" href="Relation.Nullary.Decidable.Core.html#2668" class="Function">from-no</a> <a id="2676" class="Symbol">:</a> <a id="2678" class="Symbol">(</a><a id="2679" href="Relation.Nullary.Decidable.Core.html#2679" class="Bound">p</a> <a id="2681" class="Symbol">:</a> <a id="2683" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="2687" href="Relation.Nullary.Decidable.Core.html#2240" class="Bound">P</a><a id="2688" class="Symbol">)</a> <a id="2690" class="Symbol"></a> <a id="2692" href="Relation.Nullary.Decidable.Core.html#2568" class="Function">From-no</a> <a id="2700" href="Relation.Nullary.Decidable.Core.html#2679" class="Bound">p</a>
<a id="2704" href="Relation.Nullary.Decidable.Core.html#2668" class="Function">from-no</a> <a id="2712" class="Symbol">(</a><a id="2713" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="2719" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2727" href="Relation.Nullary.Decidable.Core.html#2727" class="Bound">[¬p]</a><a id="2731" class="Symbol">)</a> <a id="2733" class="Symbol">=</a> <a id="2735" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="2742" href="Relation.Nullary.Decidable.Core.html#2727" class="Bound">[¬p]</a>
<a id="2749" href="Relation.Nullary.Decidable.Core.html#2668" class="Function">from-no</a> <a id="2757" class="Symbol">(</a><a id="2758" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="2764" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2774" class="Symbol">_</a> <a id="2776" class="Symbol">)</a> <a id="2778" class="Symbol">=</a> <a id="2780" class="Symbol">_</a>
<a id="2783" class="Comment">------------------------------------------------------------------------</a>
<a id="2856" class="Comment">-- Result of decidability</a>
<a id="dec-true"></a><a id="2883" href="Relation.Nullary.Decidable.Core.html#2883" class="Function">dec-true</a> <a id="2892" class="Symbol">:</a> <a id="2894" class="Symbol">(</a><a id="2895" href="Relation.Nullary.Decidable.Core.html#2895" class="Bound">p?</a> <a id="2898" class="Symbol">:</a> <a id="2900" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="2904" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="2905" class="Symbol">)</a> <a id="2907" class="Symbol"></a> <a id="2909" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="2911" class="Symbol"></a> <a id="2913" href="Relation.Nullary.html#1590" class="Field">does</a> <a id="2918" href="Relation.Nullary.Decidable.Core.html#2895" class="Bound">p?</a> <a id="2921" href="Agda.Builtin.Equality.html#133" class="Datatype Operator"></a> <a id="2923" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a>
<a id="2928" href="Relation.Nullary.Decidable.Core.html#2883" class="Function">dec-true</a> <a id="2937" class="Symbol">(</a><a id="2938" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="2944" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2954" class="Symbol">_</a> <a id="2956" class="Symbol">)</a> <a id="2958" href="Relation.Nullary.Decidable.Core.html#2958" class="Bound">p</a> <a id="2960" class="Symbol">=</a> <a id="2962" href="Agda.Builtin.Equality.html#190" class="InductiveConstructor">refl</a>
<a id="2967" href="Relation.Nullary.Decidable.Core.html#2883" class="Function">dec-true</a> <a id="2976" class="Symbol">(</a><a id="2977" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="2983" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="2991" href="Relation.Nullary.Decidable.Core.html#2991" class="Bound">[¬p]</a><a id="2995" class="Symbol">)</a> <a id="2997" href="Relation.Nullary.Decidable.Core.html#2997" class="Bound">p</a> <a id="2999" class="Symbol">=</a> <a id="3001" href="Data.Empty.html#637" class="Function">⊥-elim</a> <a id="3008" class="Symbol">(</a><a id="3009" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="3016" href="Relation.Nullary.Decidable.Core.html#2991" class="Bound">[¬p]</a> <a id="3021" href="Relation.Nullary.Decidable.Core.html#2997" class="Bound">p</a><a id="3022" class="Symbol">)</a>
<a id="dec-false"></a><a id="3025" href="Relation.Nullary.Decidable.Core.html#3025" class="Function">dec-false</a> <a id="3035" class="Symbol">:</a> <a id="3037" class="Symbol">(</a><a id="3038" href="Relation.Nullary.Decidable.Core.html#3038" class="Bound">p?</a> <a id="3041" class="Symbol">:</a> <a id="3043" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="3047" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="3048" class="Symbol">)</a> <a id="3050" class="Symbol"></a> <a id="3052" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="3054" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="3056" class="Symbol"></a> <a id="3058" href="Relation.Nullary.html#1590" class="Field">does</a> <a id="3063" href="Relation.Nullary.Decidable.Core.html#3038" class="Bound">p?</a> <a id="3066" href="Agda.Builtin.Equality.html#133" class="Datatype Operator"></a> <a id="3068" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a>
<a id="3074" href="Relation.Nullary.Decidable.Core.html#3025" class="Function">dec-false</a> <a id="3084" class="Symbol">(</a><a id="3085" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="3091" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="3100" class="Symbol">_</a> <a id="3102" class="Symbol">)</a> <a id="3104" href="Relation.Nullary.Decidable.Core.html#3104" class="Bound">¬p</a> <a id="3107" class="Symbol">=</a> <a id="3109" href="Agda.Builtin.Equality.html#190" class="InductiveConstructor">refl</a>
<a id="3114" href="Relation.Nullary.Decidable.Core.html#3025" class="Function">dec-false</a> <a id="3124" class="Symbol">(</a><a id="3125" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="3131" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="3139" href="Relation.Nullary.Decidable.Core.html#3139" class="Bound">[p]</a><a id="3142" class="Symbol">)</a> <a id="3144" href="Relation.Nullary.Decidable.Core.html#3144" class="Bound">¬p</a> <a id="3147" class="Symbol">=</a> <a id="3149" href="Data.Empty.html#637" class="Function">⊥-elim</a> <a id="3156" class="Symbol">(</a><a id="3157" href="Relation.Nullary.Decidable.Core.html#3144" class="Bound">¬p</a> <a id="3160" class="Symbol">(</a><a id="3161" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="3168" href="Relation.Nullary.Decidable.Core.html#3139" class="Bound">[p]</a><a id="3171" class="Symbol">))</a>
<a id="dec-yes"></a><a id="3175" href="Relation.Nullary.Decidable.Core.html#3175" class="Function">dec-yes</a> <a id="3183" class="Symbol">:</a> <a id="3185" class="Symbol">(</a><a id="3186" href="Relation.Nullary.Decidable.Core.html#3186" class="Bound">p?</a> <a id="3189" class="Symbol">:</a> <a id="3191" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="3195" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="3196" class="Symbol">)</a> <a id="3198" class="Symbol"></a> <a id="3200" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="3202" class="Symbol"></a> <a id="3204" href="Data.Product.html#1378" class="Function"></a> <a id="3206" class="Symbol">λ</a> <a id="3208" href="Relation.Nullary.Decidable.Core.html#3208" class="Bound">p</a> <a id="3211" class="Symbol"></a> <a id="3213" href="Relation.Nullary.Decidable.Core.html#3186" class="Bound">p?</a> <a id="3216" href="Agda.Builtin.Equality.html#133" class="Datatype Operator"></a> <a id="3218" href="Relation.Nullary.html#1657" class="InductiveConstructor">yes</a> <a id="3222" href="Relation.Nullary.Decidable.Core.html#3208" class="Bound">p</a>
<a id="3225" href="Relation.Nullary.Decidable.Core.html#3175" class="Function">dec-yes</a> <a id="3233" href="Relation.Nullary.Decidable.Core.html#3233" class="Bound">p?</a> <a id="3236" href="Relation.Nullary.Decidable.Core.html#3236" class="Bound">p</a> <a id="3238" class="Keyword">with</a> <a id="3243" href="Relation.Nullary.Decidable.Core.html#2883" class="Function">dec-true</a> <a id="3252" href="Relation.Nullary.Decidable.Core.html#3233" class="Bound">p?</a> <a id="3255" href="Relation.Nullary.Decidable.Core.html#3236" class="Bound">p</a>
<a id="3257" href="Relation.Nullary.Decidable.Core.html#3175" class="Function">dec-yes</a> <a id="3265" class="Symbol">(</a><a id="3266" href="Relation.Nullary.html#1657" class="InductiveConstructor">yes</a> <a id="3270" href="Relation.Nullary.Decidable.Core.html#3270" class="Bound">p</a><a id="3272" class="Symbol">)</a> <a id="3274" href="Relation.Nullary.Decidable.Core.html#3274" class="Bound">p</a> <a id="3276" class="Symbol">|</a> <a id="3278" href="Agda.Builtin.Equality.html#190" class="InductiveConstructor">refl</a> <a id="3283" class="Symbol">=</a> <a id="3285" href="Relation.Nullary.Decidable.Core.html#3270" class="Bound">p</a> <a id="3288" href="Agda.Builtin.Sigma.html#218" class="InductiveConstructor Operator">,</a> <a id="3290" href="Agda.Builtin.Equality.html#190" class="InductiveConstructor">refl</a>
<a id="dec-no"></a><a id="3296" href="Relation.Nullary.Decidable.Core.html#3296" class="Function">dec-no</a> <a id="3303" class="Symbol">:</a> <a id="3305" class="Symbol">(</a><a id="3306" href="Relation.Nullary.Decidable.Core.html#3306" class="Bound">p?</a> <a id="3309" class="Symbol">:</a> <a id="3311" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="3315" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="3316" class="Symbol">)</a> <a id="3318" class="Symbol"></a> <a id="3320" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="3322" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="3324" class="Symbol"></a> <a id="3326" href="Data.Product.html#1378" class="Function"></a> <a id="3328" class="Symbol">λ</a> <a id="3330" href="Relation.Nullary.Decidable.Core.html#3330" class="Bound">¬p</a> <a id="3334" class="Symbol"></a> <a id="3336" href="Relation.Nullary.Decidable.Core.html#3306" class="Bound">p?</a> <a id="3339" href="Agda.Builtin.Equality.html#133" class="Datatype Operator"></a> <a id="3341" href="Relation.Nullary.html#1694" class="InductiveConstructor">no</a> <a id="3344" href="Relation.Nullary.Decidable.Core.html#3330" class="Bound">¬p</a>
<a id="3348" href="Relation.Nullary.Decidable.Core.html#3296" class="Function">dec-no</a> <a id="3355" href="Relation.Nullary.Decidable.Core.html#3355" class="Bound">p?</a> <a id="3358" href="Relation.Nullary.Decidable.Core.html#3358" class="Bound">¬p</a> <a id="3361" class="Keyword">with</a> <a id="3366" href="Relation.Nullary.Decidable.Core.html#3025" class="Function">dec-false</a> <a id="3376" href="Relation.Nullary.Decidable.Core.html#3355" class="Bound">p?</a> <a id="3379" href="Relation.Nullary.Decidable.Core.html#3358" class="Bound">¬p</a>
<a id="3382" href="Relation.Nullary.Decidable.Core.html#3296" class="Function">dec-no</a> <a id="3389" class="Symbol">(</a><a id="3390" href="Relation.Nullary.html#1694" class="InductiveConstructor">no</a> <a id="3393" href="Relation.Nullary.Decidable.Core.html#3393" class="Bound">¬p</a><a id="3396" class="Symbol">)</a> <a id="3398" href="Relation.Nullary.Decidable.Core.html#3398" class="Bound">¬p</a> <a id="3401" class="Symbol">|</a> <a id="3403" href="Agda.Builtin.Equality.html#190" class="InductiveConstructor">refl</a> <a id="3408" class="Symbol">=</a> <a id="3410" href="Relation.Nullary.Decidable.Core.html#3393" class="Bound">¬p</a> <a id="3414" href="Agda.Builtin.Sigma.html#218" class="InductiveConstructor Operator">,</a> <a id="3416" href="Agda.Builtin.Equality.html#190" class="InductiveConstructor">refl</a>
<a id="dec-yes-irr"></a><a id="3422" href="Relation.Nullary.Decidable.Core.html#3422" class="Function">dec-yes-irr</a> <a id="3434" class="Symbol">:</a> <a id="3436" class="Symbol">(</a><a id="3437" href="Relation.Nullary.Decidable.Core.html#3437" class="Bound">p?</a> <a id="3440" class="Symbol">:</a> <a id="3442" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="3446" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="3447" class="Symbol">)</a> <a id="3449" class="Symbol"></a> <a id="3451" href="Relation.Nullary.html#2049" class="Function">Irrelevant</a> <a id="3462" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="3464" class="Symbol"></a> <a id="3466" class="Symbol">(</a><a id="3467" href="Relation.Nullary.Decidable.Core.html#3467" class="Bound">p</a> <a id="3469" class="Symbol">:</a> <a id="3471" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="3472" class="Symbol">)</a> <a id="3474" class="Symbol"></a> <a id="3476" href="Relation.Nullary.Decidable.Core.html#3437" class="Bound">p?</a> <a id="3479" href="Agda.Builtin.Equality.html#133" class="Datatype Operator"></a> <a id="3481" href="Relation.Nullary.html#1657" class="InductiveConstructor">yes</a> <a id="3485" href="Relation.Nullary.Decidable.Core.html#3467" class="Bound">p</a>
<a id="3487" href="Relation.Nullary.Decidable.Core.html#3422" class="Function">dec-yes-irr</a> <a id="3499" href="Relation.Nullary.Decidable.Core.html#3499" class="Bound">p?</a> <a id="3502" href="Relation.Nullary.Decidable.Core.html#3502" class="Bound">irr</a> <a id="3506" href="Relation.Nullary.Decidable.Core.html#3506" class="Bound">p</a> <a id="3508" class="Keyword">with</a> <a id="3513" href="Relation.Nullary.Decidable.Core.html#3175" class="Function">dec-yes</a> <a id="3521" href="Relation.Nullary.Decidable.Core.html#3499" class="Bound">p?</a> <a id="3524" href="Relation.Nullary.Decidable.Core.html#3506" class="Bound">p</a>
<a id="3526" class="Symbol">...</a> <a id="3530" class="Symbol">|</a> <a id="3532" href="Relation.Nullary.Decidable.Core.html#3532" class="Bound">p</a> <a id="3535" href="Agda.Builtin.Sigma.html#218" class="InductiveConstructor Operator">,</a> <a id="3537" href="Relation.Nullary.Decidable.Core.html#3537" class="Bound">eq</a> <a id="3540" class="Keyword">rewrite</a> <a id="3548" class="Bound">irr</a> <a id="3552" class="Bound">p</a> <a id="3554" href="Relation.Nullary.Decidable.Core.html#3532" class="Bound">p</a> <a id="3557" class="Symbol">=</a> <a id="3559" href="Relation.Nullary.Decidable.Core.html#3537" class="Bound">eq</a>
<a id="3563" class="Comment">------------------------------------------------------------------------</a>
<a id="3636" class="Comment">-- Maps</a>
<a id="map"></a><a id="3645" href="Relation.Nullary.Decidable.Core.html#3645" class="Function">map</a> <a id="3650" class="Symbol">:</a> <a id="3652" class="Symbol">(</a><a id="3653" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="3655" class="Symbol"></a> <a id="3657" href="Relation.Nullary.Decidable.Core.html#794" class="Generalizable">Q</a><a id="3658" class="Symbol">)</a> <a id="3660" class="Symbol"></a> <a id="3662" class="Symbol">(</a><a id="3663" href="Relation.Nullary.Decidable.Core.html#794" class="Generalizable">Q</a> <a id="3665" class="Symbol"></a> <a id="3667" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a><a id="3668" class="Symbol">)</a> <a id="3670" class="Symbol"></a> <a id="3672" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="3676" href="Relation.Nullary.Decidable.Core.html#780" class="Generalizable">P</a> <a id="3678" class="Symbol"></a> <a id="3680" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="3684" href="Relation.Nullary.Decidable.Core.html#794" class="Generalizable">Q</a>
<a id="3686" href="Relation.Nullary.html#1590" class="Field">does</a> <a id="3692" class="Symbol">(</a><a id="3693" href="Relation.Nullary.Decidable.Core.html#3645" class="Function">map</a> <a id="3698" href="Relation.Nullary.Decidable.Core.html#3698" class="Bound">P→Q</a> <a id="3702" href="Relation.Nullary.Decidable.Core.html#3702" class="Bound">Q→P</a> <a id="3706" href="Relation.Nullary.Decidable.Core.html#3706" class="Bound">p?</a><a id="3708" class="Symbol">)</a> <a id="3728" class="Symbol">=</a> <a id="3730" href="Relation.Nullary.html#1590" class="Field">does</a> <a id="3735" href="Relation.Nullary.Decidable.Core.html#3706" class="Bound">p?</a>
<a id="3738" href="Relation.Nullary.html#1607" class="Field">proof</a> <a id="3744" class="Symbol">(</a><a id="3745" href="Relation.Nullary.Decidable.Core.html#3645" class="Function">map</a> <a id="3750" href="Relation.Nullary.Decidable.Core.html#3750" class="Bound">P→Q</a> <a id="3754" href="Relation.Nullary.Decidable.Core.html#3754" class="Bound">Q→P</a> <a id="3758" class="Symbol">(</a><a id="3759" href="Agda.Builtin.Bool.html#181" class="InductiveConstructor">true</a> <a id="3765" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="3774" href="Relation.Nullary.Decidable.Core.html#3774" class="Bound">[p]</a><a id="3777" class="Symbol">))</a> <a id="3780" class="Symbol">=</a> <a id="3782" href="Relation.Nullary.html#911" class="InductiveConstructor">ofʸ</a> <a id="3786" class="Symbol">(</a><a id="3787" href="Relation.Nullary.Decidable.Core.html#3750" class="Bound">P→Q</a> <a id="3791" class="Symbol">(</a><a id="3792" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="3799" href="Relation.Nullary.Decidable.Core.html#3774" class="Bound">[p]</a><a id="3802" class="Symbol">))</a>
<a id="3805" href="Relation.Nullary.html#1607" class="Field">proof</a> <a id="3811" class="Symbol">(</a><a id="3812" href="Relation.Nullary.Decidable.Core.html#3645" class="Function">map</a> <a id="3817" href="Relation.Nullary.Decidable.Core.html#3817" class="Bound">P→Q</a> <a id="3821" href="Relation.Nullary.Decidable.Core.html#3821" class="Bound">Q→P</a> <a id="3825" class="Symbol">(</a><a id="3826" href="Agda.Builtin.Bool.html#175" class="InductiveConstructor">false</a> <a id="3832" href="Relation.Nullary.html#1568" class="InductiveConstructor Operator">because</a> <a id="3840" href="Relation.Nullary.Decidable.Core.html#3840" class="Bound">[¬p]</a><a id="3844" class="Symbol">))</a> <a id="3847" class="Symbol">=</a> <a id="3849" href="Relation.Nullary.html#948" class="InductiveConstructor">ofⁿ</a> <a id="3853" class="Symbol">(</a><a id="3854" href="Relation.Nullary.Reflects.html#1040" class="Function">invert</a> <a id="3861" href="Relation.Nullary.Decidable.Core.html#3840" class="Bound">[¬p]</a> <a id="3866" href="Function.Base.html#1040" class="Function Operator"></a> <a id="3868" href="Relation.Nullary.Decidable.Core.html#3821" class="Bound">Q→P</a><a id="3871" class="Symbol">)</a>
</pre></body></html>