bsc-leon-vatthauer/public/Function.Metric.Nat.Structures.html

78 lines
No EOL
18 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>Function.Metric.Nat.Structures</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 definitions for metrics over </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="Function.Metric.Nat.Structures.html" class="Module">Function.Metric.Nat.Structures</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.Nat.Base.html" class="Module">Data.Nat.Base</a> <a id="335" class="Keyword">hiding</a> <a id="342" class="Symbol">(</a><a id="343" href="Agda.Builtin.Nat.html#217" class="InductiveConstructor">suc</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="Function.html" class="Module">Function</a> <a id="369" class="Keyword">using</a> <a id="375" class="Symbol">(</a><a id="376" href="Function.Base.html#645" class="Function">const</a><a id="381" class="Symbol">)</a>
<a id="383" class="Keyword">open</a> <a id="388" class="Keyword">import</a> <a id="395" href="Level.html" class="Module">Level</a> <a id="401" class="Keyword">using</a> <a id="407" class="Symbol">(</a><a id="408" href="Agda.Primitive.html#591" class="Postulate">Level</a><a id="413" class="Symbol">;</a> <a id="415" href="Agda.Primitive.html#774" class="Primitive">suc</a><a id="418" class="Symbol">)</a>
<a id="420" class="Keyword">open</a> <a id="425" class="Keyword">import</a> <a id="432" href="Relation.Binary.html" class="Module">Relation.Binary</a> <a id="448" class="Keyword">hiding</a> <a id="455" class="Symbol">(</a><a id="456" href="Relation.Binary.Definitions.html#1507" class="Function">Symmetric</a><a id="465" class="Symbol">)</a>
<a id="467" class="Keyword">open</a> <a id="472" class="Keyword">import</a> <a id="479" href="Relation.Binary.PropositionalEquality.html" class="Module">Relation.Binary.PropositionalEquality</a> <a id="517" class="Keyword">using</a> <a id="523" class="Symbol">(</a><a id="524" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">_≡_</a><a id="527" class="Symbol">)</a>
<a id="530" class="Keyword">open</a> <a id="535" class="Keyword">import</a> <a id="542" href="Function.Metric.Nat.Core.html" class="Module">Function.Metric.Nat.Core</a>
<a id="567" class="Keyword">open</a> <a id="572" class="Keyword">import</a> <a id="579" href="Function.Metric.Nat.Definitions.html" class="Module">Function.Metric.Nat.Definitions</a>
<a id="611" class="Keyword">import</a> <a id="618" href="Function.Metric.Structures.html" class="Module">Function.Metric.Structures</a> <a id="645" class="Symbol">as</a> <a id="648" class="Module">Base</a>
<a id="654" class="Keyword">private</a>
<a id="664" class="Keyword">variable</a>
<a id="677" href="Function.Metric.Nat.Structures.html#677" class="Generalizable">a</a> <a id="679" href="Function.Metric.Nat.Structures.html#679" class="Generalizable"></a> <a id="681" class="Symbol">:</a> <a id="683" href="Agda.Primitive.html#591" class="Postulate">Level</a>
<a id="693" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="697" class="Symbol">:</a> <a id="699" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="703" href="Function.Metric.Nat.Structures.html#677" class="Generalizable">a</a>
<a id="706" class="Comment">------------------------------------------------------------------------</a>
<a id="779" class="Comment">-- Proto-metrics</a>
<a id="IsProtoMetric"></a><a id="797" href="Function.Metric.Nat.Structures.html#797" class="Function">IsProtoMetric</a> <a id="811" class="Symbol">:</a> <a id="813" href="Relation.Binary.Core.html#891" class="Function">Rel</a> <a id="817" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="819" href="Function.Metric.Nat.Structures.html#679" class="Generalizable"></a> <a id="821" class="Symbol"></a> <a id="823" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="840" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="842" class="Symbol"></a> <a id="844" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="848" class="Symbol">_</a>
<a id="850" href="Function.Metric.Nat.Structures.html#797" class="Function">IsProtoMetric</a> <a id="864" href="Function.Metric.Nat.Structures.html#864" class="Bound Operator">_≈_</a> <a id="868" class="Symbol">=</a> <a id="870" href="Function.Metric.Structures.html#921" class="Record">Base.IsProtoMetric</a> <a id="889" href="Function.Metric.Nat.Structures.html#864" class="Bound Operator">_≈_</a> <a id="893" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">_≡_</a> <a id="897" href="Data.Nat.Base.html#1544" class="Datatype Operator">_≤_</a> <a id="901" class="Number">0</a>
<a id="904" class="Keyword">open</a> <a id="909" href="Function.Metric.Structures.html" class="Module">Base</a> <a id="914" class="Keyword">using</a> <a id="920" class="Symbol">(</a><a id="921" class="Keyword">module</a> <a id="928" href="Function.Metric.Structures.html#921" class="Module">IsProtoMetric</a><a id="941" class="Symbol">)</a> <a id="943" class="Keyword">public</a>
<a id="951" class="Comment">------------------------------------------------------------------------</a>
<a id="1024" class="Comment">-- Pre-metrics</a>
<a id="IsPreMetric"></a><a id="1040" href="Function.Metric.Nat.Structures.html#1040" class="Function">IsPreMetric</a> <a id="1052" class="Symbol">:</a> <a id="1054" href="Relation.Binary.Core.html#891" class="Function">Rel</a> <a id="1058" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="1060" href="Function.Metric.Nat.Structures.html#679" class="Generalizable"></a> <a id="1062" class="Symbol"></a> <a id="1064" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1081" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="1083" class="Symbol"></a> <a id="1085" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1089" class="Symbol">_</a>
<a id="1091" href="Function.Metric.Nat.Structures.html#1040" class="Function">IsPreMetric</a> <a id="1103" href="Function.Metric.Nat.Structures.html#1103" class="Bound Operator">_≈_</a> <a id="1107" class="Symbol">=</a> <a id="1109" href="Function.Metric.Structures.html#1422" class="Record">Base.IsPreMetric</a> <a id="1126" href="Function.Metric.Nat.Structures.html#1103" class="Bound Operator">_≈_</a> <a id="1130" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">_≡_</a> <a id="1134" href="Data.Nat.Base.html#1544" class="Datatype Operator">_≤_</a> <a id="1138" class="Number">0</a>
<a id="1141" class="Keyword">open</a> <a id="1146" href="Function.Metric.Structures.html" class="Module">Base</a> <a id="1151" class="Keyword">using</a> <a id="1157" class="Symbol">(</a><a id="1158" class="Keyword">module</a> <a id="1165" href="Function.Metric.Structures.html#1422" class="Module">IsPreMetric</a><a id="1176" class="Symbol">)</a> <a id="1178" class="Keyword">public</a>
<a id="1186" class="Comment">------------------------------------------------------------------------</a>
<a id="1259" class="Comment">-- Quasi-semi-metrics</a>
<a id="IsQuasiSemiMetric"></a><a id="1282" href="Function.Metric.Nat.Structures.html#1282" class="Function">IsQuasiSemiMetric</a> <a id="1300" class="Symbol">:</a> <a id="1302" href="Relation.Binary.Core.html#891" class="Function">Rel</a> <a id="1306" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="1308" href="Function.Metric.Nat.Structures.html#679" class="Generalizable"></a> <a id="1310" class="Symbol"></a> <a id="1312" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1329" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="1331" class="Symbol"></a> <a id="1333" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1337" class="Symbol">_</a>
<a id="1339" href="Function.Metric.Nat.Structures.html#1282" class="Function">IsQuasiSemiMetric</a> <a id="1357" href="Function.Metric.Nat.Structures.html#1357" class="Bound Operator">_≈_</a> <a id="1361" class="Symbol">=</a> <a id="1363" href="Function.Metric.Structures.html#1748" class="Record">Base.IsQuasiSemiMetric</a> <a id="1386" href="Function.Metric.Nat.Structures.html#1357" class="Bound Operator">_≈_</a> <a id="1390" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">_≡_</a> <a id="1394" href="Data.Nat.Base.html#1544" class="Datatype Operator">_≤_</a> <a id="1398" class="Number">0</a>
<a id="1401" class="Keyword">open</a> <a id="1406" href="Function.Metric.Structures.html" class="Module">Base</a> <a id="1411" class="Keyword">using</a> <a id="1417" class="Symbol">(</a><a id="1418" class="Keyword">module</a> <a id="1425" href="Function.Metric.Structures.html#1748" class="Module">IsQuasiSemiMetric</a><a id="1442" class="Symbol">)</a> <a id="1444" class="Keyword">public</a>
<a id="1452" class="Comment">------------------------------------------------------------------------</a>
<a id="1525" class="Comment">-- Semi-metrics</a>
<a id="IsSemiMetric"></a><a id="1542" href="Function.Metric.Nat.Structures.html#1542" class="Function">IsSemiMetric</a> <a id="1555" class="Symbol">:</a> <a id="1557" href="Relation.Binary.Core.html#891" class="Function">Rel</a> <a id="1561" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="1563" href="Function.Metric.Nat.Structures.html#679" class="Generalizable"></a> <a id="1565" class="Symbol"></a> <a id="1567" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1584" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="1586" class="Symbol"></a> <a id="1588" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1592" class="Symbol">_</a>
<a id="1594" href="Function.Metric.Nat.Structures.html#1542" class="Function">IsSemiMetric</a> <a id="1607" href="Function.Metric.Nat.Structures.html#1607" class="Bound Operator">_≈_</a> <a id="1611" class="Symbol">=</a> <a id="1613" href="Function.Metric.Structures.html#2075" class="Record">Base.IsSemiMetric</a> <a id="1631" href="Function.Metric.Nat.Structures.html#1607" class="Bound Operator">_≈_</a> <a id="1635" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">_≡_</a> <a id="1639" href="Data.Nat.Base.html#1544" class="Datatype Operator">_≤_</a> <a id="1643" class="Number">0</a>
<a id="1646" class="Keyword">open</a> <a id="1651" href="Function.Metric.Structures.html" class="Module">Base</a> <a id="1656" class="Keyword">using</a> <a id="1662" class="Symbol">(</a><a id="1663" class="Keyword">module</a> <a id="1670" href="Function.Metric.Structures.html#2075" class="Module">IsSemiMetric</a><a id="1682" class="Symbol">)</a> <a id="1684" class="Keyword">public</a>
<a id="1692" class="Comment">------------------------------------------------------------------------</a>
<a id="1765" class="Comment">-- Metrics</a>
<a id="IsMetric"></a><a id="1777" href="Function.Metric.Nat.Structures.html#1777" class="Function">IsMetric</a> <a id="1786" class="Symbol">:</a> <a id="1788" href="Relation.Binary.Core.html#891" class="Function">Rel</a> <a id="1792" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="1794" href="Function.Metric.Nat.Structures.html#679" class="Generalizable"></a> <a id="1796" class="Symbol"></a> <a id="1798" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1815" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="1817" class="Symbol"></a> <a id="1819" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="1823" class="Symbol">_</a>
<a id="1825" href="Function.Metric.Nat.Structures.html#1777" class="Function">IsMetric</a> <a id="1834" href="Function.Metric.Nat.Structures.html#1834" class="Bound Operator">_≈_</a> <a id="1838" class="Symbol">=</a> <a id="1840" href="Function.Metric.Structures.html#2930" class="Record">Base.IsGeneralMetric</a> <a id="1861" href="Function.Metric.Nat.Structures.html#1834" class="Bound Operator">_≈_</a> <a id="1865" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">_≡_</a> <a id="1869" href="Data.Nat.Base.html#1544" class="Datatype Operator">_≤_</a> <a id="1873" class="Number">0</a> <a id="1875" href="Agda.Builtin.Nat.html#319" class="Primitive Operator">_+_</a>
<a id="1880" class="Keyword">module</a> <a id="IsMetric"></a><a id="1887" href="Function.Metric.Nat.Structures.html#1887" class="Module">IsMetric</a> <a id="1896" class="Symbol">{</a><a id="1897" href="Function.Metric.Nat.Structures.html#1897" class="Bound Operator">_≈_</a> <a id="1901" class="Symbol">:</a> <a id="1903" href="Relation.Binary.Core.html#891" class="Function">Rel</a> <a id="1907" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="1909" href="Function.Metric.Nat.Structures.html#679" class="Generalizable"></a><a id="1910" class="Symbol">}</a> <a id="1912" class="Symbol">{</a><a id="1913" href="Function.Metric.Nat.Structures.html#1913" class="Bound">d</a> <a id="1915" class="Symbol">:</a> <a id="1917" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1934" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a><a id="1935" class="Symbol">}</a>
<a id="1953" class="Symbol">(</a><a id="1954" href="Function.Metric.Nat.Structures.html#1954" class="Bound">M</a> <a id="1956" class="Symbol">:</a> <a id="1958" href="Function.Metric.Nat.Structures.html#1777" class="Function">IsMetric</a> <a id="1967" href="Function.Metric.Nat.Structures.html#1897" class="Bound Operator">_≈_</a> <a id="1971" href="Function.Metric.Nat.Structures.html#1913" class="Bound">d</a><a id="1972" class="Symbol">)</a> <a id="1974" class="Keyword">where</a>
<a id="1982" class="Keyword">open</a> <a id="1987" href="Function.Metric.Structures.html#2930" class="Module">Base.IsGeneralMetric</a> <a id="2008" href="Function.Metric.Nat.Structures.html#1954" class="Bound">M</a> <a id="2010" class="Keyword">public</a>
<a id="2018" class="Comment">------------------------------------------------------------------------</a>
<a id="2091" class="Comment">-- Ultra-metrics</a>
<a id="IsUltraMetric"></a><a id="2109" href="Function.Metric.Nat.Structures.html#2109" class="Function">IsUltraMetric</a> <a id="2123" class="Symbol">:</a> <a id="2125" href="Relation.Binary.Core.html#891" class="Function">Rel</a> <a id="2129" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="2131" href="Function.Metric.Nat.Structures.html#679" class="Generalizable"></a> <a id="2133" class="Symbol"></a> <a id="2135" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="2152" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="2154" class="Symbol"></a> <a id="2156" href="Agda.Primitive.html#320" class="Primitive">Set</a> <a id="2160" class="Symbol">_</a>
<a id="2162" href="Function.Metric.Nat.Structures.html#2109" class="Function">IsUltraMetric</a> <a id="2176" href="Function.Metric.Nat.Structures.html#2176" class="Bound Operator">_≈_</a> <a id="2180" class="Symbol">=</a> <a id="2182" href="Function.Metric.Structures.html#2930" class="Record">Base.IsGeneralMetric</a> <a id="2203" href="Function.Metric.Nat.Structures.html#2176" class="Bound Operator">_≈_</a> <a id="2207" href="Agda.Builtin.Equality.html#133" class="Datatype Operator">_≡_</a> <a id="2211" href="Data.Nat.Base.html#1544" class="Datatype Operator">_≤_</a> <a id="2215" class="Number">0</a> <a id="2217" href="Data.Nat.Base.html#3072" class="Function Operator">_⊔_</a>
<a id="2222" class="Keyword">module</a> <a id="IsUltraMetric"></a><a id="2229" href="Function.Metric.Nat.Structures.html#2229" class="Module">IsUltraMetric</a> <a id="2243" class="Symbol">{</a><a id="2244" href="Function.Metric.Nat.Structures.html#2244" class="Bound Operator">_≈_</a> <a id="2248" class="Symbol">:</a> <a id="2250" href="Relation.Binary.Core.html#891" class="Function">Rel</a> <a id="2254" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a> <a id="2256" href="Function.Metric.Nat.Structures.html#679" class="Generalizable"></a><a id="2257" class="Symbol">}</a> <a id="2259" class="Symbol">{</a><a id="2260" href="Function.Metric.Nat.Structures.html#2260" class="Bound">d</a> <a id="2262" class="Symbol">:</a> <a id="2264" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="2281" href="Function.Metric.Nat.Structures.html#693" class="Generalizable">A</a><a id="2282" class="Symbol">}</a>
<a id="2305" class="Symbol">(</a><a id="2306" href="Function.Metric.Nat.Structures.html#2306" class="Bound">UM</a> <a id="2309" class="Symbol">:</a> <a id="2311" href="Function.Metric.Nat.Structures.html#2109" class="Function">IsUltraMetric</a> <a id="2325" href="Function.Metric.Nat.Structures.html#2244" class="Bound Operator">_≈_</a> <a id="2329" href="Function.Metric.Nat.Structures.html#2260" class="Bound">d</a><a id="2330" class="Symbol">)</a> <a id="2332" class="Keyword">where</a>
<a id="2340" class="Keyword">open</a> <a id="2345" href="Function.Metric.Structures.html#2930" class="Module">Base.IsGeneralMetric</a> <a id="2366" href="Function.Metric.Nat.Structures.html#2306" class="Bound">UM</a> <a id="2369" class="Keyword">public</a>
</pre></body></html>