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

98 lines
29 KiB
HTML
Raw Normal View History

2023-08-19 16:11:22 +02:00
<!DOCTYPE HTML>
<html><head><meta charset="utf-8"><title>Relation.Nullary.Negation.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">-- Core properties related to negation</a>
<a id="145" class="Comment">------------------------------------------------------------------------</a>
<a id="219" class="Symbol">{-#</a> <a id="223" class="Keyword">OPTIONS</a> <a id="231" class="Pragma">--cubical-compatible</a> <a id="252" class="Pragma">--safe</a> <a id="259" class="Symbol">#-}</a>
<a id="264" class="Keyword">module</a> <a id="271" href="Relation.Nullary.Negation.Core.html" class="Module">Relation.Nullary.Negation.Core</a> <a id="302" class="Keyword">where</a>
<a id="309" class="Keyword">open</a> <a id="314" class="Keyword">import</a> <a id="321" href="Data.Bool.Base.html" class="Module">Data.Bool.Base</a> <a id="336" class="Keyword">using</a> <a id="342" class="Symbol">(</a><a id="343" href="Data.Bool.Base.html#941" class="Function">not</a><a id="346" class="Symbol">)</a>
<a id="348" class="Keyword">open</a> <a id="353" class="Keyword">import</a> <a id="360" href="Data.Empty.html" class="Module">Data.Empty</a>
<a id="371" class="Keyword">open</a> <a id="376" class="Keyword">import</a> <a id="383" href="Data.Product.html" class="Module">Data.Product</a>
<a id="396" class="Keyword">open</a> <a id="401" class="Keyword">import</a> <a id="408" href="Data.Sum.Base.html" class="Module">Data.Sum.Base</a> <a id="422" class="Keyword">using</a> <a id="428" class="Symbol">(</a><a id="429" href="Data.Sum.Base.html#743" class="Datatype Operator">_⊎_</a><a id="432" class="Symbol">;</a> <a id="434" href="Data.Sum.Base.html#793" class="InductiveConstructor">inj₁</a><a id="438" class="Symbol">;</a> <a id="440" href="Data.Sum.Base.html#818" class="InductiveConstructor">inj₂</a><a id="444" class="Symbol">)</a>
<a id="446" class="Keyword">open</a> <a id="451" class="Keyword">import</a> <a id="458" href="Function.Base.html" class="Module">Function.Base</a> <a id="472" class="Keyword">using</a> <a id="478" class="Symbol">(</a><a id="479" href="Function.Base.html#1563" class="Function">flip</a><a id="483" class="Symbol">;</a> <a id="485" href="Function.Base.html#1928" class="Function Operator">_$_</a><a id="488" class="Symbol">;</a> <a id="490" href="Function.Base.html#1040" class="Function Operator">_∘_</a><a id="493" class="Symbol">;</a> <a id="495" href="Function.Base.html#645" class="Function">const</a><a id="500" class="Symbol">)</a>
<a id="502" class="Keyword">open</a> <a id="507" class="Keyword">import</a> <a id="514" href="Level.html" class="Module">Level</a>
<a id="520" class="Keyword">open</a> <a id="525" class="Keyword">import</a> <a id="532" href="Relation.Nullary.html" class="Module">Relation.Nullary</a>
<a id="549" class="Keyword">open</a> <a id="554" class="Keyword">import</a> <a id="561" href="Relation.Unary.html" class="Module">Relation.Unary</a> <a id="576" class="Keyword">using</a> <a id="582" class="Symbol">(</a><a id="583" href="Relation.Unary.html#1110" class="Function">Pred</a><a id="587" class="Symbol">)</a>
<a id="590" class="Keyword">private</a>
<a id="600" class="Keyword">variable</a>
<a id="613" href="Relation.Nullary.Negation.Core.html#613" class="Generalizable">a</a> <a id="615" href="Relation.Nullary.Negation.Core.html#615" class="Generalizable">p</a> <a id="617" href="Relation.Nullary.Negation.Core.html#617" class="Generalizable">q</a> <a id="619" href="Relation.Nullary.Negation.Core.html#619" class="Generalizable">w</a> <a id="621" class="Symbol">:</a> <a id="623" href="Agda.Primitive.html#591" class="Postulate">Level</a>
<a id="633" href="Relation.Nullary.Negation.Core.html#633" class="Generalizable">A</a> <a id="635" class="Symbol">:</a> <a id="637" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="641" href="Relation.Nullary.Negation.Core.html#613" class="Generalizable">a</a>
<a id="647" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="649" class="Symbol">:</a> <a id="651" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="655" href="Relation.Nullary.Negation.Core.html#615" class="Generalizable">p</a>
<a id="661" href="Relation.Nullary.Negation.Core.html#661" class="Generalizable">Q</a> <a id="663" class="Symbol">:</a> <a id="665" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="669" href="Relation.Nullary.Negation.Core.html#617" class="Generalizable">q</a>
<a id="675" href="Relation.Nullary.Negation.Core.html#675" class="Generalizable">Whatever</a> <a id="684" class="Symbol">:</a> <a id="686" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="690" href="Relation.Nullary.Negation.Core.html#619" class="Generalizable">w</a>
<a id="693" class="Comment">------------------------------------------------------------------------</a>
<a id="766" class="Comment">-- Uses of negation</a>
<a id="contradiction"></a><a id="787" href="Relation.Nullary.Negation.Core.html#787" class="Function">contradiction</a> <a id="801" class="Symbol">:</a> <a id="803" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="805" class="Symbol"></a> <a id="807" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="809" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="811" class="Symbol"></a> <a id="813" href="Relation.Nullary.Negation.Core.html#675" class="Generalizable">Whatever</a>
<a id="822" href="Relation.Nullary.Negation.Core.html#787" class="Function">contradiction</a> <a id="836" href="Relation.Nullary.Negation.Core.html#836" class="Bound">p</a> <a id="838" href="Relation.Nullary.Negation.Core.html#838" class="Bound">¬p</a> <a id="841" class="Symbol">=</a> <a id="843" href="Data.Empty.html#637" class="Function">⊥-elim</a> <a id="850" class="Symbol">(</a><a id="851" href="Relation.Nullary.Negation.Core.html#838" class="Bound">¬p</a> <a id="854" href="Relation.Nullary.Negation.Core.html#836" class="Bound">p</a><a id="855" class="Symbol">)</a>
<a id="contradiction₂"></a><a id="858" href="Relation.Nullary.Negation.Core.html#858" class="Function">contradiction₂</a> <a id="873" class="Symbol">:</a> <a id="875" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="877" href="Data.Sum.Base.html#743" class="Datatype Operator"></a> <a id="879" href="Relation.Nullary.Negation.Core.html#661" class="Generalizable">Q</a> <a id="881" class="Symbol"></a> <a id="883" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="885" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="887" class="Symbol"></a> <a id="889" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="891" href="Relation.Nullary.Negation.Core.html#661" class="Generalizable">Q</a> <a id="893" class="Symbol"></a> <a id="895" href="Relation.Nullary.Negation.Core.html#675" class="Generalizable">Whatever</a>
<a id="904" href="Relation.Nullary.Negation.Core.html#858" class="Function">contradiction₂</a> <a id="919" class="Symbol">(</a><a id="920" href="Data.Sum.Base.html#793" class="InductiveConstructor">inj₁</a> <a id="925" href="Relation.Nullary.Negation.Core.html#925" class="Bound">p</a><a id="926" class="Symbol">)</a> <a id="928" href="Relation.Nullary.Negation.Core.html#928" class="Bound">¬p</a> <a id="931" href="Relation.Nullary.Negation.Core.html#931" class="Bound">¬q</a> <a id="934" class="Symbol">=</a> <a id="936" href="Relation.Nullary.Negation.Core.html#787" class="Function">contradiction</a> <a id="950" href="Relation.Nullary.Negation.Core.html#925" class="Bound">p</a> <a id="952" href="Relation.Nullary.Negation.Core.html#928" class="Bound">¬p</a>
<a id="955" href="Relation.Nullary.Negation.Core.html#858" class="Function">contradiction₂</a> <a id="970" class="Symbol">(</a><a id="971" href="Data.Sum.Base.html#818" class="InductiveConstructor">inj₂</a> <a id="976" href="Relation.Nullary.Negation.Core.html#976" class="Bound">q</a><a id="977" class="Symbol">)</a> <a id="979" href="Relation.Nullary.Negation.Core.html#979" class="Bound">¬p</a> <a id="982" href="Relation.Nullary.Negation.Core.html#982" class="Bound">¬q</a> <a id="985" class="Symbol">=</a> <a id="987" href="Relation.Nullary.Negation.Core.html#787" class="Function">contradiction</a> <a id="1001" href="Relation.Nullary.Negation.Core.html#976" class="Bound">q</a> <a id="1003" href="Relation.Nullary.Negation.Core.html#982" class="Bound">¬q</a>
<a id="contraposition"></a><a id="1007" href="Relation.Nullary.Negation.Core.html#1007" class="Function">contraposition</a> <a id="1022" class="Symbol">:</a> <a id="1024" class="Symbol">(</a><a id="1025" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="1027" class="Symbol"></a> <a id="1029" href="Relation.Nullary.Negation.Core.html#661" class="Generalizable">Q</a><a id="1030" class="Symbol">)</a> <a id="1032" class="Symbol"></a> <a id="1034" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1036" href="Relation.Nullary.Negation.Core.html#661" class="Generalizable">Q</a> <a id="1038" class="Symbol"></a> <a id="1040" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1042" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a>
<a id="1044" href="Relation.Nullary.Negation.Core.html#1007" class="Function">contraposition</a> <a id="1059" href="Relation.Nullary.Negation.Core.html#1059" class="Bound">f</a> <a id="1061" href="Relation.Nullary.Negation.Core.html#1061" class="Bound">¬q</a> <a id="1064" href="Relation.Nullary.Negation.Core.html#1064" class="Bound">p</a> <a id="1066" class="Symbol">=</a> <a id="1068" href="Relation.Nullary.Negation.Core.html#787" class="Function">contradiction</a> <a id="1082" class="Symbol">(</a><a id="1083" href="Relation.Nullary.Negation.Core.html#1059" class="Bound">f</a> <a id="1085" href="Relation.Nullary.Negation.Core.html#1064" class="Bound">p</a><a id="1086" class="Symbol">)</a> <a id="1088" href="Relation.Nullary.Negation.Core.html#1061" class="Bound">¬q</a>
<a id="1092" class="Comment">-- Note also the following use of flip:</a>
<a id="1133" class="Keyword">private</a>
<a id="note"></a><a id="1143" href="Relation.Nullary.Negation.Core.html#1143" class="Function">note</a> <a id="1148" class="Symbol">:</a> <a id="1150" class="Symbol">(</a><a id="1151" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="1153" class="Symbol"></a> <a id="1155" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1157" href="Relation.Nullary.Negation.Core.html#661" class="Generalizable">Q</a><a id="1158" class="Symbol">)</a> <a id="1160" class="Symbol"></a> <a id="1162" href="Relation.Nullary.Negation.Core.html#661" class="Generalizable">Q</a> <a id="1164" class="Symbol"></a> <a id="1166" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1168" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a>
<a id="1172" href="Relation.Nullary.Negation.Core.html#1143" class="Function">note</a> <a id="1177" class="Symbol">=</a> <a id="1179" href="Function.Base.html#1563" class="Function">flip</a>
<a id="1185" class="Comment">-- If we can decide P, then we can decide its negation.</a>
<a id="¬-reflects"></a><a id="1242" href="Relation.Nullary.Negation.Core.html#1242" class="Function">¬-reflects</a> <a id="1253" class="Symbol">:</a> <a id="1255" class="Symbol"></a> <a id="1257" class="Symbol">{</a><a id="1258" href="Relation.Nullary.Negation.Core.html#1258" class="Bound">b</a><a id="1259" class="Symbol">}</a> <a id="1261" class="Symbol"></a> <a id="1263" href="Relation.Nullary.html#863" class="Datatype">Reflects</a> <a id="1272" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="1274" href="Relation.Nullary.Negation.Core.html#1258" class="Bound">b</a> <a id="1276" class="Symbol"></a> <a id="1278" href="Relation.Nullary.html#863" class="Datatype">Reflects</a> <a id="1287" class="Symbol">(</a><a id="1288" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1290" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a><a id="1291" class="Symbol">)</a> <a id="1293" class="Symbol">(</a><a id="1294" href="Data.Bool.Base.html#941" class="Function">not</a> <a id="1298" href="Relation.Nullary.Negation.Core.html#1258" class="Bound">b</a><a id="1299" class="Symbol">)</a>
<a id="1301" href="Relation.Nullary.Negation.Core.html#1242" class="Function">¬-reflects</a> <a id="1312" class="Symbol">(</a><a id="1313" href="Relation.Nullary.html#911" class="InductiveConstructor">ofʸ</a> <a id="1318" href="Relation.Nullary.Negation.Core.html#1318" class="Bound">p</a><a id="1319" class="Symbol">)</a> <a id="1321" class="Symbol">=</a> <a id="1323" href="Relation.Nullary.html#948" class="InductiveConstructor">ofⁿ</a> <a id="1327" class="Symbol">(</a><a id="1328" href="Function.Base.html#1928" class="Function Operator">_$</a> <a id="1331" href="Relation.Nullary.Negation.Core.html#1318" class="Bound">p</a><a id="1332" class="Symbol">)</a>
<a id="1334" href="Relation.Nullary.Negation.Core.html#1242" class="Function">¬-reflects</a> <a id="1345" class="Symbol">(</a><a id="1346" href="Relation.Nullary.html#948" class="InductiveConstructor">ofⁿ</a> <a id="1350" href="Relation.Nullary.Negation.Core.html#1350" class="Bound">¬p</a><a id="1352" class="Symbol">)</a> <a id="1354" class="Symbol">=</a> <a id="1356" href="Relation.Nullary.html#911" class="InductiveConstructor">ofʸ</a> <a id="1360" href="Relation.Nullary.Negation.Core.html#1350" class="Bound">¬p</a>
<a id="¬?"></a><a id="1364" href="Relation.Nullary.Negation.Core.html#1364" class="Function">¬?</a> <a id="1367" class="Symbol">:</a> <a id="1369" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1373" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="1375" class="Symbol"></a> <a id="1377" href="Relation.Nullary.html#1520" class="Record">Dec</a> <a id="1381" class="Symbol">(</a><a id="1382" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1384" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a><a id="1385" class="Symbol">)</a>
<a id="1387" href="Relation.Nullary.html#1590" class="Field">does</a> <a id="1393" class="Symbol">(</a><a id="1394" href="Relation.Nullary.Negation.Core.html#1364" class="Function">¬?</a> <a id="1397" href="Relation.Nullary.Negation.Core.html#1397" class="Bound">p?</a><a id="1399" class="Symbol">)</a> <a id="1401" class="Symbol">=</a> <a id="1403" href="Data.Bool.Base.html#941" class="Function">not</a> <a id="1407" class="Symbol">(</a><a id="1408" href="Relation.Nullary.html#1590" class="Field">does</a> <a id="1413" href="Relation.Nullary.Negation.Core.html#1397" class="Bound">p?</a><a id="1415" class="Symbol">)</a>
<a id="1417" href="Relation.Nullary.html#1607" class="Field">proof</a> <a id="1423" class="Symbol">(</a><a id="1424" href="Relation.Nullary.Negation.Core.html#1364" class="Function">¬?</a> <a id="1427" href="Relation.Nullary.Negation.Core.html#1427" class="Bound">p?</a><a id="1429" class="Symbol">)</a> <a id="1431" class="Symbol">=</a> <a id="1433" href="Relation.Nullary.Negation.Core.html#1242" class="Function">¬-reflects</a> <a id="1444" class="Symbol">(</a><a id="1445" href="Relation.Nullary.html#1607" class="Field">proof</a> <a id="1451" href="Relation.Nullary.Negation.Core.html#1427" class="Bound">p?</a><a id="1453" class="Symbol">)</a>
<a id="1456" class="Comment">------------------------------------------------------------------------</a>
<a id="1529" class="Comment">-- Quantifier juggling</a>
<a id="1553" class="Keyword">module</a> <a id="1560" href="Relation.Nullary.Negation.Core.html#1560" class="Module">_</a> <a id="1562" class="Symbol">{</a><a id="1563" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1565" class="Symbol">:</a> <a id="1567" href="Relation.Unary.html#1110" class="Function">Pred</a> <a id="1572" href="Relation.Nullary.Negation.Core.html#633" class="Generalizable">A</a> <a id="1574" href="Relation.Nullary.Negation.Core.html#615" class="Generalizable">p</a><a id="1575" class="Symbol">}</a> <a id="1577" class="Keyword">where</a>
<a id="1586" href="Relation.Nullary.Negation.Core.html#1586" class="Function">∃⟶¬∀¬</a> <a id="1592" class="Symbol">:</a> <a id="1594" href="Data.Product.html#1378" class="Function"></a> <a id="1596" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1598" class="Symbol"></a> <a id="1600" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1602" class="Symbol">(∀</a> <a id="1605" href="Relation.Nullary.Negation.Core.html#1605" class="Bound">x</a> <a id="1607" class="Symbol"></a> <a id="1609" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1611" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1613" href="Relation.Nullary.Negation.Core.html#1605" class="Bound">x</a><a id="1614" class="Symbol">)</a>
<a id="1618" href="Relation.Nullary.Negation.Core.html#1586" class="Function">∃⟶¬∀¬</a> <a id="1624" class="Symbol">=</a> <a id="1626" href="Function.Base.html#1563" class="Function">flip</a> <a id="1631" href="Data.Product.html#3431" class="Function">uncurry</a>
<a id="1642" href="Relation.Nullary.Negation.Core.html#1642" class="Function">∀⟶¬∃¬</a> <a id="1648" class="Symbol">:</a> <a id="1650" class="Symbol">(∀</a> <a id="1653" href="Relation.Nullary.Negation.Core.html#1653" class="Bound">x</a> <a id="1655" class="Symbol"></a> <a id="1657" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1659" href="Relation.Nullary.Negation.Core.html#1653" class="Bound">x</a><a id="1660" class="Symbol">)</a> <a id="1662" class="Symbol"></a> <a id="1664" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1666" href="Data.Product.html#1378" class="Function"></a> <a id="1668" class="Symbol">λ</a> <a id="1670" href="Relation.Nullary.Negation.Core.html#1670" class="Bound">x</a> <a id="1672" class="Symbol"></a> <a id="1674" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1676" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1678" href="Relation.Nullary.Negation.Core.html#1670" class="Bound">x</a>
<a id="1682" href="Relation.Nullary.Negation.Core.html#1642" class="Function">∀⟶¬∃¬</a> <a id="1688" href="Relation.Nullary.Negation.Core.html#1688" class="Bound">∀xPx</a> <a id="1693" class="Symbol">(</a><a id="1694" href="Relation.Nullary.Negation.Core.html#1694" class="Bound">x</a> <a id="1696" href="Agda.Builtin.Sigma.html#218" class="InductiveConstructor Operator">,</a> <a id="1698" href="Relation.Nullary.Negation.Core.html#1698" class="Bound">¬Px</a><a id="1701" class="Symbol">)</a> <a id="1703" class="Symbol">=</a> <a id="1705" href="Relation.Nullary.Negation.Core.html#1698" class="Bound">¬Px</a> <a id="1709" class="Symbol">(</a><a id="1710" href="Relation.Nullary.Negation.Core.html#1688" class="Bound">∀xPx</a> <a id="1715" href="Relation.Nullary.Negation.Core.html#1694" class="Bound">x</a><a id="1716" class="Symbol">)</a>
<a id="1721" href="Relation.Nullary.Negation.Core.html#1721" class="Function">¬∃⟶∀¬</a> <a id="1727" class="Symbol">:</a> <a id="1729" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1731" href="Data.Product.html#1378" class="Function"></a> <a id="1733" class="Symbol"></a> <a id="1736" href="Relation.Nullary.Negation.Core.html#1736" class="Bound">x</a> <a id="1738" class="Symbol"></a> <a id="1740" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1742" href="Relation.Nullary.Negation.Core.html#1736" class="Bound">x</a><a id="1743" class="Symbol">)</a> <a id="1745" class="Symbol"></a> <a id="1747" class="Symbol"></a> <a id="1749" href="Relation.Nullary.Negation.Core.html#1749" class="Bound">x</a> <a id="1751" class="Symbol"></a> <a id="1753" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1755" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1757" href="Relation.Nullary.Negation.Core.html#1749" class="Bound">x</a>
<a id="1761" href="Relation.Nullary.Negation.Core.html#1721" class="Function">¬∃⟶∀¬</a> <a id="1767" class="Symbol">=</a> <a id="1769" href="Data.Product.html#3274" class="Function">curry</a>
<a id="1778" href="Relation.Nullary.Negation.Core.html#1778" class="Function">∀¬⟶¬∃</a> <a id="1784" class="Symbol">:</a> <a id="1786" class="Symbol">(∀</a> <a id="1789" href="Relation.Nullary.Negation.Core.html#1789" class="Bound">x</a> <a id="1791" class="Symbol"></a> <a id="1793" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1795" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1797" href="Relation.Nullary.Negation.Core.html#1789" class="Bound">x</a><a id="1798" class="Symbol">)</a> <a id="1800" class="Symbol"></a> <a id="1802" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1804" href="Data.Product.html#1378" class="Function"></a> <a id="1806" class="Symbol"></a> <a id="1809" href="Relation.Nullary.Negation.Core.html#1809" class="Bound">x</a> <a id="1811" class="Symbol"></a> <a id="1813" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1815" href="Relation.Nullary.Negation.Core.html#1809" class="Bound">x</a><a id="1816" class="Symbol">)</a>
<a id="1820" href="Relation.Nullary.Negation.Core.html#1778" class="Function">∀¬⟶¬∃</a> <a id="1826" class="Symbol">=</a> <a id="1828" href="Data.Product.html#3431" class="Function">uncurry</a>
<a id="1839" href="Relation.Nullary.Negation.Core.html#1839" class="Function">∃¬⟶¬∀</a> <a id="1845" class="Symbol">:</a> <a id="1847" href="Data.Product.html#1378" class="Function"></a> <a id="1849" class="Symbol"></a> <a id="1852" href="Relation.Nullary.Negation.Core.html#1852" class="Bound">x</a> <a id="1854" class="Symbol"></a> <a id="1856" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1858" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1860" href="Relation.Nullary.Negation.Core.html#1852" class="Bound">x</a><a id="1861" class="Symbol">)</a> <a id="1863" class="Symbol"></a> <a id="1865" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="1867" class="Symbol">(∀</a> <a id="1870" href="Relation.Nullary.Negation.Core.html#1870" class="Bound">x</a> <a id="1872" class="Symbol"></a> <a id="1874" href="Relation.Nullary.Negation.Core.html#1563" class="Bound">P</a> <a id="1876" href="Relation.Nullary.Negation.Core.html#1870" class="Bound">x</a><a id="1877" class="Symbol">)</a>
<a id="1881" href="Relation.Nullary.Negation.Core.html#1839" class="Function">∃¬⟶¬∀</a> <a id="1887" class="Symbol">=</a> <a id="1889" href="Function.Base.html#1563" class="Function">flip</a> <a id="1894" href="Relation.Nullary.Negation.Core.html#1642" class="Function">∀⟶¬∃¬</a>
<a id="1901" class="Comment">------------------------------------------------------------------------</a>
<a id="1974" class="Comment">-- Double-negation</a>
<a id="¬¬-map"></a><a id="1994" href="Relation.Nullary.Negation.Core.html#1994" class="Function">¬¬-map</a> <a id="2001" class="Symbol">:</a> <a id="2003" class="Symbol">(</a><a id="2004" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="2006" class="Symbol"></a> <a id="2008" href="Relation.Nullary.Negation.Core.html#661" class="Generalizable">Q</a><a id="2009" class="Symbol">)</a> <a id="2011" class="Symbol"></a> <a id="2013" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2015" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2017" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a> <a id="2019" class="Symbol"></a> <a id="2021" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2023" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2025" href="Relation.Nullary.Negation.Core.html#661" class="Generalizable">Q</a>
<a id="2027" href="Relation.Nullary.Negation.Core.html#1994" class="Function">¬¬-map</a> <a id="2034" href="Relation.Nullary.Negation.Core.html#2034" class="Bound">f</a> <a id="2036" class="Symbol">=</a> <a id="2038" href="Relation.Nullary.Negation.Core.html#1007" class="Function">contraposition</a> <a id="2053" class="Symbol">(</a><a id="2054" href="Relation.Nullary.Negation.Core.html#1007" class="Function">contraposition</a> <a id="2069" href="Relation.Nullary.Negation.Core.html#2034" class="Bound">f</a><a id="2070" class="Symbol">)</a>
<a id="2073" class="Comment">-- Stability under double-negation.</a>
<a id="Stable"></a><a id="2110" href="Relation.Nullary.Negation.Core.html#2110" class="Function">Stable</a> <a id="2117" class="Symbol">:</a> <a id="2119" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2123" href="Relation.Nullary.Negation.Core.html#615" class="Generalizable">p</a> <a id="2125" class="Symbol"></a> <a id="2127" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2131" href="Relation.Nullary.Negation.Core.html#615" class="Generalizable">p</a>
<a id="2133" href="Relation.Nullary.Negation.Core.html#2110" class="Function">Stable</a> <a id="2140" href="Relation.Nullary.Negation.Core.html#2140" class="Bound">P</a> <a id="2142" class="Symbol">=</a> <a id="2144" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2146" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2148" href="Relation.Nullary.Negation.Core.html#2140" class="Bound">P</a> <a id="2150" class="Symbol"></a> <a id="2152" href="Relation.Nullary.Negation.Core.html#2140" class="Bound">P</a>
<a id="2155" class="Comment">-- Everything is stable in the double-negation monad.</a>
<a id="stable"></a><a id="2210" href="Relation.Nullary.Negation.Core.html#2210" class="Function">stable</a> <a id="2217" class="Symbol">:</a> <a id="2219" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2221" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2223" href="Relation.Nullary.Negation.Core.html#2110" class="Function">Stable</a> <a id="2230" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a>
<a id="2232" href="Relation.Nullary.Negation.Core.html#2210" class="Function">stable</a> <a id="2239" href="Relation.Nullary.Negation.Core.html#2239" class="Bound">¬[¬¬p→p]</a> <a id="2248" class="Symbol">=</a> <a id="2250" href="Relation.Nullary.Negation.Core.html#2239" class="Bound">¬[¬¬p→p]</a> <a id="2259" class="Symbol"></a> <a id="2262" href="Relation.Nullary.Negation.Core.html#2262" class="Bound">¬¬p</a> <a id="2266" class="Symbol"></a> <a id="2268" href="Data.Empty.html#637" class="Function">⊥-elim</a> <a id="2275" class="Symbol">(</a><a id="2276" href="Relation.Nullary.Negation.Core.html#2262" class="Bound">¬¬p</a> <a id="2280" class="Symbol">(</a><a id="2281" href="Relation.Nullary.Negation.Core.html#2239" class="Bound">¬[¬¬p→p]</a> <a id="2290" href="Function.Base.html#1040" class="Function Operator"></a> <a id="2292" href="Function.Base.html#645" class="Function">const</a><a id="2297" class="Symbol">)))</a>
<a id="2302" class="Comment">-- Negated predicates are stable.</a>
<a id="negated-stable"></a><a id="2337" href="Relation.Nullary.Negation.Core.html#2337" class="Function">negated-stable</a> <a id="2352" class="Symbol">:</a> <a id="2354" href="Relation.Nullary.Negation.Core.html#2110" class="Function">Stable</a> <a id="2361" class="Symbol">(</a><a id="2362" href="Relation.Nullary.html#665" class="Function Operator">¬</a> <a id="2364" href="Relation.Nullary.Negation.Core.html#647" class="Generalizable">P</a><a id="2365" class="Symbol">)</a>
<a id="2367" href="Relation.Nullary.Negation.Core.html#2337" class="Function">negated-stable</a> <a id="2382" href="Relation.Nullary.Negation.Core.html#2382" class="Bound">¬¬¬P</a> <a id="2387" href="Relation.Nullary.Negation.Core.html#2387" class="Bound">P</a> <a id="2389" class="Symbol">=</a> <a id="2391" href="Relation.Nullary.Negation.Core.html#2382" class="Bound">¬¬¬P</a> <a id="2396" class="Symbol"></a> <a id="2399" href="Relation.Nullary.Negation.Core.html#2399" class="Bound">¬P</a> <a id="2402" class="Symbol"></a> <a id="2404" href="Relation.Nullary.Negation.Core.html#2399" class="Bound">¬P</a> <a id="2407" href="Relation.Nullary.Negation.Core.html#2387" class="Bound">P</a><a id="2408" class="Symbol">)</a>
</pre></body></html>