mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
63 lines
No EOL
17 KiB
HTML
63 lines
No EOL
17 KiB
HTML
<!DOCTYPE HTML>
|
|
<html><head><meta charset="utf-8"><title>Algebra.Construct.NaturalChoice.Base</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">-- Basic definition of an operator that computes the min/max value</a>
|
|
<a id="173" class="Comment">-- with respect to a total ordering.</a>
|
|
<a id="210" class="Comment">------------------------------------------------------------------------</a>
|
|
|
|
<a id="284" class="Symbol">{-#</a> <a id="288" class="Keyword">OPTIONS</a> <a id="296" class="Pragma">--cubical-compatible</a> <a id="317" class="Pragma">--safe</a> <a id="324" class="Symbol">#-}</a>
|
|
|
|
<a id="329" class="Keyword">open</a> <a id="334" class="Keyword">import</a> <a id="341" href="Algebra.Core.html" class="Module">Algebra.Core</a>
|
|
<a id="354" class="Keyword">open</a> <a id="359" class="Keyword">import</a> <a id="366" href="Level.html" class="Module">Level</a> <a id="372" class="Symbol">as</a> <a id="375" class="Module">L</a> <a id="377" class="Keyword">hiding</a> <a id="384" class="Symbol">(</a><a id="385" href="Agda.Primitive.html#804" class="Primitive Operator">_⊔_</a><a id="388" class="Symbol">)</a>
|
|
<a id="390" class="Keyword">open</a> <a id="395" class="Keyword">import</a> <a id="402" href="Function.Base.html" class="Module">Function.Base</a> <a id="416" class="Keyword">using</a> <a id="422" class="Symbol">(</a><a id="423" href="Function.Base.html#1563" class="Function">flip</a><a id="427" class="Symbol">)</a>
|
|
<a id="429" class="Keyword">open</a> <a id="434" class="Keyword">import</a> <a id="441" href="Relation.Binary.html" class="Module">Relation.Binary</a>
|
|
<a id="457" class="Keyword">open</a> <a id="462" class="Keyword">import</a> <a id="469" href="Relation.Binary.Construct.Converse.html" class="Module">Relation.Binary.Construct.Converse</a> <a id="504" class="Keyword">using</a> <a id="510" class="Symbol">()</a>
|
|
<a id="515" class="Keyword">renaming</a> <a id="524" class="Symbol">(</a><a id="525" href="Relation.Binary.Construct.Converse.html#5145" class="Function">totalPreorder</a> <a id="539" class="Symbol">to</a> <a id="542" class="Function">flipOrder</a><a id="551" class="Symbol">)</a>
|
|
<a id="553" class="Keyword">import</a> <a id="560" href="Relation.Binary.Properties.TotalOrder.html" class="Module">Relation.Binary.Properties.TotalOrder</a> <a id="598" class="Symbol">as</a> <a id="601" class="Module">TotalOrderProperties</a>
|
|
|
|
<a id="623" class="Keyword">module</a> <a id="630" href="Algebra.Construct.NaturalChoice.Base.html" class="Module">Algebra.Construct.NaturalChoice.Base</a> <a id="667" class="Keyword">where</a>
|
|
|
|
<a id="674" class="Keyword">private</a>
|
|
<a id="684" class="Keyword">variable</a>
|
|
<a id="697" href="Algebra.Construct.NaturalChoice.Base.html#697" class="Generalizable">a</a> <a id="699" href="Algebra.Construct.NaturalChoice.Base.html#699" class="Generalizable">ℓ₁</a> <a id="702" href="Algebra.Construct.NaturalChoice.Base.html#702" class="Generalizable">ℓ₂</a> <a id="705" class="Symbol">:</a> <a id="707" href="Agda.Primitive.html#591" class="Postulate">Level</a>
|
|
<a id="717" href="Algebra.Construct.NaturalChoice.Base.html#717" class="Generalizable">O</a> <a id="719" class="Symbol">:</a> <a id="721" href="Relation.Binary.Bundles.html#2384" class="Record">TotalPreorder</a> <a id="735" href="Algebra.Construct.NaturalChoice.Base.html#697" class="Generalizable">a</a> <a id="737" href="Algebra.Construct.NaturalChoice.Base.html#699" class="Generalizable">ℓ₁</a> <a id="740" href="Algebra.Construct.NaturalChoice.Base.html#702" class="Generalizable">ℓ₂</a>
|
|
|
|
<a id="744" class="Comment">------------------------------------------------------------------------</a>
|
|
<a id="817" class="Comment">-- Definition</a>
|
|
|
|
<a id="832" class="Keyword">module</a> <a id="839" href="Algebra.Construct.NaturalChoice.Base.html#839" class="Module">_</a> <a id="841" class="Symbol">(</a><a id="842" href="Algebra.Construct.NaturalChoice.Base.html#842" class="Bound">O</a> <a id="844" class="Symbol">:</a> <a id="846" href="Relation.Binary.Bundles.html#2384" class="Record">TotalPreorder</a> <a id="860" href="Algebra.Construct.NaturalChoice.Base.html#697" class="Generalizable">a</a> <a id="862" href="Algebra.Construct.NaturalChoice.Base.html#699" class="Generalizable">ℓ₁</a> <a id="865" href="Algebra.Construct.NaturalChoice.Base.html#702" class="Generalizable">ℓ₂</a><a id="867" class="Symbol">)</a> <a id="869" class="Keyword">where</a>
|
|
<a id="877" class="Keyword">open</a> <a id="882" href="Relation.Binary.Bundles.html#2384" class="Module">TotalPreorder</a> <a id="896" href="Algebra.Construct.NaturalChoice.Base.html#842" class="Bound">O</a> <a id="898" class="Keyword">renaming</a> <a id="907" class="Symbol">(</a><a id="908" href="Relation.Binary.Bundles.html#2562" class="Field Operator">_≲_</a> <a id="912" class="Symbol">to</a> <a id="915" class="Field Operator">_≤_</a><a id="918" class="Symbol">)</a>
|
|
<a id="922" class="Keyword">private</a> <a id="930" href="Algebra.Construct.NaturalChoice.Base.html#930" class="Function Operator">_≥_</a> <a id="934" class="Symbol">=</a> <a id="936" href="Function.Base.html#1563" class="Function">flip</a> <a id="941" href="Algebra.Construct.NaturalChoice.Base.html#915" class="Field Operator">_≤_</a>
|
|
|
|
<a id="948" class="Keyword">record</a> <a id="955" href="Algebra.Construct.NaturalChoice.Base.html#955" class="Record">MinOperator</a> <a id="967" class="Symbol">:</a> <a id="969" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="973" class="Symbol">(</a><a id="974" href="Algebra.Construct.NaturalChoice.Base.html#860" class="Bound">a</a> <a id="976" href="Agda.Primitive.html#804" class="Primitive Operator">L.⊔</a> <a id="980" href="Algebra.Construct.NaturalChoice.Base.html#862" class="Bound">ℓ₁</a> <a id="983" href="Agda.Primitive.html#804" class="Primitive Operator">L.⊔</a> <a id="987" href="Algebra.Construct.NaturalChoice.Base.html#865" class="Bound">ℓ₂</a><a id="989" class="Symbol">)</a> <a id="991" class="Keyword">where</a>
|
|
<a id="1001" class="Keyword">infixl</a> <a id="1008" class="Number">7</a> <a id="1010" href="Algebra.Construct.NaturalChoice.Base.html#1030" class="Field Operator">_⊓_</a>
|
|
<a id="1018" class="Keyword">field</a>
|
|
<a id="1030" href="Algebra.Construct.NaturalChoice.Base.html#1030" class="Field Operator">_⊓_</a> <a id="1040" class="Symbol">:</a> <a id="1042" href="Algebra.Core.html#527" class="Function">Op₂</a> <a id="1046" href="Relation.Binary.Bundles.html#2468" class="Field">Carrier</a>
|
|
<a id="1060" href="Algebra.Construct.NaturalChoice.Base.html#1060" class="Field">x≤y⇒x⊓y≈x</a> <a id="1070" class="Symbol">:</a> <a id="1072" class="Symbol">∀</a> <a id="1074" class="Symbol">{</a><a id="1075" href="Algebra.Construct.NaturalChoice.Base.html#1075" class="Bound">x</a> <a id="1077" href="Algebra.Construct.NaturalChoice.Base.html#1077" class="Bound">y</a><a id="1078" class="Symbol">}</a> <a id="1080" class="Symbol">→</a> <a id="1082" href="Algebra.Construct.NaturalChoice.Base.html#1075" class="Bound">x</a> <a id="1084" href="Algebra.Construct.NaturalChoice.Base.html#915" class="Field Operator">≤</a> <a id="1086" href="Algebra.Construct.NaturalChoice.Base.html#1077" class="Bound">y</a> <a id="1088" class="Symbol">→</a> <a id="1090" href="Algebra.Construct.NaturalChoice.Base.html#1075" class="Bound">x</a> <a id="1092" href="Algebra.Construct.NaturalChoice.Base.html#1030" class="Field Operator">⊓</a> <a id="1094" href="Algebra.Construct.NaturalChoice.Base.html#1077" class="Bound">y</a> <a id="1096" href="Relation.Binary.Bundles.html#2496" class="Field Operator">≈</a> <a id="1098" href="Algebra.Construct.NaturalChoice.Base.html#1075" class="Bound">x</a>
|
|
<a id="1106" href="Algebra.Construct.NaturalChoice.Base.html#1106" class="Field">x≥y⇒x⊓y≈y</a> <a id="1116" class="Symbol">:</a> <a id="1118" class="Symbol">∀</a> <a id="1120" class="Symbol">{</a><a id="1121" href="Algebra.Construct.NaturalChoice.Base.html#1121" class="Bound">x</a> <a id="1123" href="Algebra.Construct.NaturalChoice.Base.html#1123" class="Bound">y</a><a id="1124" class="Symbol">}</a> <a id="1126" class="Symbol">→</a> <a id="1128" href="Algebra.Construct.NaturalChoice.Base.html#1121" class="Bound">x</a> <a id="1130" href="Algebra.Construct.NaturalChoice.Base.html#930" class="Function Operator">≥</a> <a id="1132" href="Algebra.Construct.NaturalChoice.Base.html#1123" class="Bound">y</a> <a id="1134" class="Symbol">→</a> <a id="1136" href="Algebra.Construct.NaturalChoice.Base.html#1121" class="Bound">x</a> <a id="1138" href="Algebra.Construct.NaturalChoice.Base.html#1030" class="Field Operator">⊓</a> <a id="1140" href="Algebra.Construct.NaturalChoice.Base.html#1123" class="Bound">y</a> <a id="1142" href="Relation.Binary.Bundles.html#2496" class="Field Operator">≈</a> <a id="1144" href="Algebra.Construct.NaturalChoice.Base.html#1123" class="Bound">y</a>
|
|
|
|
<a id="1149" class="Keyword">record</a> <a id="1156" href="Algebra.Construct.NaturalChoice.Base.html#1156" class="Record">MaxOperator</a> <a id="1168" class="Symbol">:</a> <a id="1170" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1174" class="Symbol">(</a><a id="1175" href="Algebra.Construct.NaturalChoice.Base.html#860" class="Bound">a</a> <a id="1177" href="Agda.Primitive.html#804" class="Primitive Operator">L.⊔</a> <a id="1181" href="Algebra.Construct.NaturalChoice.Base.html#862" class="Bound">ℓ₁</a> <a id="1184" href="Agda.Primitive.html#804" class="Primitive Operator">L.⊔</a> <a id="1188" href="Algebra.Construct.NaturalChoice.Base.html#865" class="Bound">ℓ₂</a><a id="1190" class="Symbol">)</a> <a id="1192" class="Keyword">where</a>
|
|
<a id="1202" class="Keyword">infixl</a> <a id="1209" class="Number">6</a> <a id="1211" href="Algebra.Construct.NaturalChoice.Base.html#1231" class="Field Operator">_⊔_</a>
|
|
<a id="1219" class="Keyword">field</a>
|
|
<a id="1231" href="Algebra.Construct.NaturalChoice.Base.html#1231" class="Field Operator">_⊔_</a> <a id="1241" class="Symbol">:</a> <a id="1243" href="Algebra.Core.html#527" class="Function">Op₂</a> <a id="1247" href="Relation.Binary.Bundles.html#2468" class="Field">Carrier</a>
|
|
<a id="1261" href="Algebra.Construct.NaturalChoice.Base.html#1261" class="Field">x≤y⇒x⊔y≈y</a> <a id="1271" class="Symbol">:</a> <a id="1273" class="Symbol">∀</a> <a id="1275" class="Symbol">{</a><a id="1276" href="Algebra.Construct.NaturalChoice.Base.html#1276" class="Bound">x</a> <a id="1278" href="Algebra.Construct.NaturalChoice.Base.html#1278" class="Bound">y</a><a id="1279" class="Symbol">}</a> <a id="1281" class="Symbol">→</a> <a id="1283" href="Algebra.Construct.NaturalChoice.Base.html#1276" class="Bound">x</a> <a id="1285" href="Algebra.Construct.NaturalChoice.Base.html#915" class="Field Operator">≤</a> <a id="1287" href="Algebra.Construct.NaturalChoice.Base.html#1278" class="Bound">y</a> <a id="1289" class="Symbol">→</a> <a id="1291" href="Algebra.Construct.NaturalChoice.Base.html#1276" class="Bound">x</a> <a id="1293" href="Algebra.Construct.NaturalChoice.Base.html#1231" class="Field Operator">⊔</a> <a id="1295" href="Algebra.Construct.NaturalChoice.Base.html#1278" class="Bound">y</a> <a id="1297" href="Relation.Binary.Bundles.html#2496" class="Field Operator">≈</a> <a id="1299" href="Algebra.Construct.NaturalChoice.Base.html#1278" class="Bound">y</a>
|
|
<a id="1307" href="Algebra.Construct.NaturalChoice.Base.html#1307" class="Field">x≥y⇒x⊔y≈x</a> <a id="1317" class="Symbol">:</a> <a id="1319" class="Symbol">∀</a> <a id="1321" class="Symbol">{</a><a id="1322" href="Algebra.Construct.NaturalChoice.Base.html#1322" class="Bound">x</a> <a id="1324" href="Algebra.Construct.NaturalChoice.Base.html#1324" class="Bound">y</a><a id="1325" class="Symbol">}</a> <a id="1327" class="Symbol">→</a> <a id="1329" href="Algebra.Construct.NaturalChoice.Base.html#1322" class="Bound">x</a> <a id="1331" href="Algebra.Construct.NaturalChoice.Base.html#930" class="Function Operator">≥</a> <a id="1333" href="Algebra.Construct.NaturalChoice.Base.html#1324" class="Bound">y</a> <a id="1335" class="Symbol">→</a> <a id="1337" href="Algebra.Construct.NaturalChoice.Base.html#1322" class="Bound">x</a> <a id="1339" href="Algebra.Construct.NaturalChoice.Base.html#1231" class="Field Operator">⊔</a> <a id="1341" href="Algebra.Construct.NaturalChoice.Base.html#1324" class="Bound">y</a> <a id="1343" href="Relation.Binary.Bundles.html#2496" class="Field Operator">≈</a> <a id="1345" href="Algebra.Construct.NaturalChoice.Base.html#1322" class="Bound">x</a>
|
|
|
|
<a id="1348" class="Comment">------------------------------------------------------------------------</a>
|
|
<a id="1421" class="Comment">-- Properties</a>
|
|
|
|
<a id="MinOp⇒MaxOp"></a><a id="1436" href="Algebra.Construct.NaturalChoice.Base.html#1436" class="Function">MinOp⇒MaxOp</a> <a id="1448" class="Symbol">:</a> <a id="1450" href="Algebra.Construct.NaturalChoice.Base.html#955" class="Record">MinOperator</a> <a id="1462" href="Algebra.Construct.NaturalChoice.Base.html#717" class="Generalizable">O</a> <a id="1464" class="Symbol">→</a> <a id="1466" href="Algebra.Construct.NaturalChoice.Base.html#1156" class="Record">MaxOperator</a> <a id="1478" class="Symbol">(</a><a id="1479" href="Algebra.Construct.NaturalChoice.Base.html#542" class="Function">flipOrder</a> <a id="1489" href="Algebra.Construct.NaturalChoice.Base.html#717" class="Generalizable">O</a><a id="1490" class="Symbol">)</a>
|
|
<a id="1492" href="Algebra.Construct.NaturalChoice.Base.html#1436" class="Function">MinOp⇒MaxOp</a> <a id="1504" href="Algebra.Construct.NaturalChoice.Base.html#1504" class="Bound">minOp</a> <a id="1510" class="Symbol">=</a> <a id="1512" class="Keyword">record</a>
|
|
<a id="1521" class="Symbol">{</a> <a id="1523" href="Algebra.Construct.NaturalChoice.Base.html#1231" class="Field Operator">_⊔_</a> <a id="1533" class="Symbol">=</a> <a id="1535" href="Algebra.Construct.NaturalChoice.Base.html#1030" class="Field Operator">_⊓_</a>
|
|
<a id="1541" class="Symbol">;</a> <a id="1543" href="Algebra.Construct.NaturalChoice.Base.html#1261" class="Field">x≤y⇒x⊔y≈y</a> <a id="1553" class="Symbol">=</a> <a id="1555" href="Algebra.Construct.NaturalChoice.Base.html#1106" class="Field">x≥y⇒x⊓y≈y</a>
|
|
<a id="1567" class="Symbol">;</a> <a id="1569" href="Algebra.Construct.NaturalChoice.Base.html#1307" class="Field">x≥y⇒x⊔y≈x</a> <a id="1579" class="Symbol">=</a> <a id="1581" href="Algebra.Construct.NaturalChoice.Base.html#1060" class="Field">x≤y⇒x⊓y≈x</a>
|
|
<a id="1593" class="Symbol">}</a> <a id="1595" class="Keyword">where</a> <a id="1601" class="Keyword">open</a> <a id="1606" href="Algebra.Construct.NaturalChoice.Base.html#955" class="Module">MinOperator</a> <a id="1618" href="Algebra.Construct.NaturalChoice.Base.html#1504" class="Bound">minOp</a>
|
|
|
|
<a id="MaxOp⇒MinOp"></a><a id="1625" href="Algebra.Construct.NaturalChoice.Base.html#1625" class="Function">MaxOp⇒MinOp</a> <a id="1637" class="Symbol">:</a> <a id="1639" href="Algebra.Construct.NaturalChoice.Base.html#1156" class="Record">MaxOperator</a> <a id="1651" href="Algebra.Construct.NaturalChoice.Base.html#717" class="Generalizable">O</a> <a id="1653" class="Symbol">→</a> <a id="1655" href="Algebra.Construct.NaturalChoice.Base.html#955" class="Record">MinOperator</a> <a id="1667" class="Symbol">(</a><a id="1668" href="Algebra.Construct.NaturalChoice.Base.html#542" class="Function">flipOrder</a> <a id="1678" href="Algebra.Construct.NaturalChoice.Base.html#717" class="Generalizable">O</a><a id="1679" class="Symbol">)</a>
|
|
<a id="1681" href="Algebra.Construct.NaturalChoice.Base.html#1625" class="Function">MaxOp⇒MinOp</a> <a id="1693" href="Algebra.Construct.NaturalChoice.Base.html#1693" class="Bound">maxOp</a> <a id="1699" class="Symbol">=</a> <a id="1701" class="Keyword">record</a>
|
|
<a id="1710" class="Symbol">{</a> <a id="1712" href="Algebra.Construct.NaturalChoice.Base.html#1030" class="Field Operator">_⊓_</a> <a id="1722" class="Symbol">=</a> <a id="1724" href="Algebra.Construct.NaturalChoice.Base.html#1231" class="Field Operator">_⊔_</a>
|
|
<a id="1730" class="Symbol">;</a> <a id="1732" href="Algebra.Construct.NaturalChoice.Base.html#1060" class="Field">x≤y⇒x⊓y≈x</a> <a id="1742" class="Symbol">=</a> <a id="1744" href="Algebra.Construct.NaturalChoice.Base.html#1307" class="Field">x≥y⇒x⊔y≈x</a>
|
|
<a id="1756" class="Symbol">;</a> <a id="1758" href="Algebra.Construct.NaturalChoice.Base.html#1106" class="Field">x≥y⇒x⊓y≈y</a> <a id="1768" class="Symbol">=</a> <a id="1770" href="Algebra.Construct.NaturalChoice.Base.html#1261" class="Field">x≤y⇒x⊔y≈y</a>
|
|
<a id="1782" class="Symbol">}</a> <a id="1784" class="Keyword">where</a> <a id="1790" class="Keyword">open</a> <a id="1795" href="Algebra.Construct.NaturalChoice.Base.html#1156" class="Module">MaxOperator</a> <a id="1807" href="Algebra.Construct.NaturalChoice.Base.html#1693" class="Bound">maxOp</a>
|
|
</pre></body></html> |