mirror of
https://git8.cs.fau.de/theses/bsc-leon-vatthauer.git
synced 2024-05-31 07:28:34 +02:00
78 lines
No EOL
18 KiB
HTML
78 lines
No EOL
18 KiB
HTML
<!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#234" 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.Base.html" class="Module">Function.Base</a> <a id="374" class="Keyword">using</a> <a id="380" class="Symbol">(</a><a id="381" href="Function.Base.html#725" class="Function">const</a><a id="386" class="Symbol">)</a>
|
||
<a id="388" class="Keyword">open</a> <a id="393" class="Keyword">import</a> <a id="400" href="Level.html" class="Module">Level</a> <a id="406" class="Keyword">using</a> <a id="412" class="Symbol">(</a><a id="413" href="Agda.Primitive.html#742" class="Postulate">Level</a><a id="418" class="Symbol">;</a> <a id="420" href="Agda.Primitive.html#931" class="Primitive">suc</a><a id="423" class="Symbol">)</a>
|
||
<a id="425" class="Keyword">open</a> <a id="430" class="Keyword">import</a> <a id="437" href="Relation.Binary.Core.html" class="Module">Relation.Binary.Core</a> <a id="458" class="Keyword">using</a> <a id="464" class="Symbol">(</a><a id="465" href="Relation.Binary.Core.html#896" class="Function">Rel</a><a id="468" class="Symbol">)</a>
|
||
<a id="470" class="Keyword">open</a> <a id="475" class="Keyword">import</a> <a id="482" href="Relation.Binary.PropositionalEquality.Core.html" class="Module">Relation.Binary.PropositionalEquality.Core</a> <a id="525" class="Keyword">using</a> <a id="531" class="Symbol">(</a><a id="532" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a><a id="535" class="Symbol">)</a>
|
||
|
||
<a id="538" class="Keyword">open</a> <a id="543" class="Keyword">import</a> <a id="550" href="Function.Metric.Nat.Core.html" class="Module">Function.Metric.Nat.Core</a>
|
||
<a id="575" class="Keyword">open</a> <a id="580" class="Keyword">import</a> <a id="587" href="Function.Metric.Nat.Definitions.html" class="Module">Function.Metric.Nat.Definitions</a>
|
||
<a id="619" class="Keyword">import</a> <a id="626" href="Function.Metric.Structures.html" class="Module">Function.Metric.Structures</a> <a id="653" class="Symbol">as</a> <a id="656" class="Module">Base</a>
|
||
|
||
<a id="662" class="Keyword">private</a>
|
||
<a id="672" class="Keyword">variable</a>
|
||
<a id="685" href="Function.Metric.Nat.Structures.html#685" class="Generalizable">a</a> <a id="687" href="Function.Metric.Nat.Structures.html#687" class="Generalizable">ℓ</a> <a id="689" class="Symbol">:</a> <a id="691" href="Agda.Primitive.html#742" class="Postulate">Level</a>
|
||
<a id="701" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="705" class="Symbol">:</a> <a id="707" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="711" href="Function.Metric.Nat.Structures.html#685" class="Generalizable">a</a>
|
||
|
||
<a id="714" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="787" class="Comment">-- Proto-metrics</a>
|
||
|
||
<a id="IsProtoMetric"></a><a id="805" href="Function.Metric.Nat.Structures.html#805" class="Function">IsProtoMetric</a> <a id="819" class="Symbol">:</a> <a id="821" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="825" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="827" href="Function.Metric.Nat.Structures.html#687" class="Generalizable">ℓ</a> <a id="829" class="Symbol">→</a> <a id="831" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="848" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="850" class="Symbol">→</a> <a id="852" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="856" class="Symbol">_</a>
|
||
<a id="858" href="Function.Metric.Nat.Structures.html#805" class="Function">IsProtoMetric</a> <a id="872" href="Function.Metric.Nat.Structures.html#872" class="Bound Operator">_≈_</a> <a id="876" class="Symbol">=</a> <a id="878" href="Function.Metric.Structures.html#996" class="Record">Base.IsProtoMetric</a> <a id="897" href="Function.Metric.Nat.Structures.html#872" class="Bound Operator">_≈_</a> <a id="901" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a> <a id="905" href="Data.Nat.Base.html#1691" class="Datatype Operator">_≤_</a> <a id="909" class="Number">0</a>
|
||
|
||
<a id="912" class="Keyword">open</a> <a id="917" href="Function.Metric.Structures.html" class="Module">Base</a> <a id="922" class="Keyword">using</a> <a id="928" class="Symbol">(</a><a id="929" class="Keyword">module</a> <a id="936" href="Function.Metric.Structures.html#996" class="Module">IsProtoMetric</a><a id="949" class="Symbol">)</a> <a id="951" class="Keyword">public</a>
|
||
|
||
<a id="959" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="1032" class="Comment">-- Pre-metrics</a>
|
||
|
||
<a id="IsPreMetric"></a><a id="1048" href="Function.Metric.Nat.Structures.html#1048" class="Function">IsPreMetric</a> <a id="1060" class="Symbol">:</a> <a id="1062" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1066" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="1068" href="Function.Metric.Nat.Structures.html#687" class="Generalizable">ℓ</a> <a id="1070" class="Symbol">→</a> <a id="1072" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1089" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="1091" class="Symbol">→</a> <a id="1093" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1097" class="Symbol">_</a>
|
||
<a id="1099" href="Function.Metric.Nat.Structures.html#1048" class="Function">IsPreMetric</a> <a id="1111" href="Function.Metric.Nat.Structures.html#1111" class="Bound Operator">_≈_</a> <a id="1115" class="Symbol">=</a> <a id="1117" href="Function.Metric.Structures.html#1497" class="Record">Base.IsPreMetric</a> <a id="1134" href="Function.Metric.Nat.Structures.html#1111" class="Bound Operator">_≈_</a> <a id="1138" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a> <a id="1142" href="Data.Nat.Base.html#1691" class="Datatype Operator">_≤_</a> <a id="1146" class="Number">0</a>
|
||
|
||
<a id="1149" class="Keyword">open</a> <a id="1154" href="Function.Metric.Structures.html" class="Module">Base</a> <a id="1159" class="Keyword">using</a> <a id="1165" class="Symbol">(</a><a id="1166" class="Keyword">module</a> <a id="1173" href="Function.Metric.Structures.html#1497" class="Module">IsPreMetric</a><a id="1184" class="Symbol">)</a> <a id="1186" class="Keyword">public</a>
|
||
|
||
<a id="1194" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="1267" class="Comment">-- Quasi-semi-metrics</a>
|
||
|
||
<a id="IsQuasiSemiMetric"></a><a id="1290" href="Function.Metric.Nat.Structures.html#1290" class="Function">IsQuasiSemiMetric</a> <a id="1308" class="Symbol">:</a> <a id="1310" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1314" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="1316" href="Function.Metric.Nat.Structures.html#687" class="Generalizable">ℓ</a> <a id="1318" class="Symbol">→</a> <a id="1320" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1337" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="1339" class="Symbol">→</a> <a id="1341" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1345" class="Symbol">_</a>
|
||
<a id="1347" href="Function.Metric.Nat.Structures.html#1290" class="Function">IsQuasiSemiMetric</a> <a id="1365" href="Function.Metric.Nat.Structures.html#1365" class="Bound Operator">_≈_</a> <a id="1369" class="Symbol">=</a> <a id="1371" href="Function.Metric.Structures.html#1823" class="Record">Base.IsQuasiSemiMetric</a> <a id="1394" href="Function.Metric.Nat.Structures.html#1365" class="Bound Operator">_≈_</a> <a id="1398" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a> <a id="1402" href="Data.Nat.Base.html#1691" class="Datatype Operator">_≤_</a> <a id="1406" class="Number">0</a>
|
||
|
||
<a id="1409" class="Keyword">open</a> <a id="1414" href="Function.Metric.Structures.html" class="Module">Base</a> <a id="1419" class="Keyword">using</a> <a id="1425" class="Symbol">(</a><a id="1426" class="Keyword">module</a> <a id="1433" href="Function.Metric.Structures.html#1823" class="Module">IsQuasiSemiMetric</a><a id="1450" class="Symbol">)</a> <a id="1452" class="Keyword">public</a>
|
||
|
||
<a id="1460" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="1533" class="Comment">-- Semi-metrics</a>
|
||
|
||
<a id="IsSemiMetric"></a><a id="1550" href="Function.Metric.Nat.Structures.html#1550" class="Function">IsSemiMetric</a> <a id="1563" class="Symbol">:</a> <a id="1565" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1569" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="1571" href="Function.Metric.Nat.Structures.html#687" class="Generalizable">ℓ</a> <a id="1573" class="Symbol">→</a> <a id="1575" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1592" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="1594" class="Symbol">→</a> <a id="1596" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1600" class="Symbol">_</a>
|
||
<a id="1602" href="Function.Metric.Nat.Structures.html#1550" class="Function">IsSemiMetric</a> <a id="1615" href="Function.Metric.Nat.Structures.html#1615" class="Bound Operator">_≈_</a> <a id="1619" class="Symbol">=</a> <a id="1621" href="Function.Metric.Structures.html#2150" class="Record">Base.IsSemiMetric</a> <a id="1639" href="Function.Metric.Nat.Structures.html#1615" class="Bound Operator">_≈_</a> <a id="1643" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a> <a id="1647" href="Data.Nat.Base.html#1691" class="Datatype Operator">_≤_</a> <a id="1651" class="Number">0</a>
|
||
|
||
<a id="1654" class="Keyword">open</a> <a id="1659" href="Function.Metric.Structures.html" class="Module">Base</a> <a id="1664" class="Keyword">using</a> <a id="1670" class="Symbol">(</a><a id="1671" class="Keyword">module</a> <a id="1678" href="Function.Metric.Structures.html#2150" class="Module">IsSemiMetric</a><a id="1690" class="Symbol">)</a> <a id="1692" class="Keyword">public</a>
|
||
|
||
<a id="1700" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="1773" class="Comment">-- Metrics</a>
|
||
|
||
<a id="IsMetric"></a><a id="1785" href="Function.Metric.Nat.Structures.html#1785" class="Function">IsMetric</a> <a id="1794" class="Symbol">:</a> <a id="1796" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1800" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="1802" href="Function.Metric.Nat.Structures.html#687" class="Generalizable">ℓ</a> <a id="1804" class="Symbol">→</a> <a id="1806" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1823" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="1825" class="Symbol">→</a> <a id="1827" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="1831" class="Symbol">_</a>
|
||
<a id="1833" href="Function.Metric.Nat.Structures.html#1785" class="Function">IsMetric</a> <a id="1842" href="Function.Metric.Nat.Structures.html#1842" class="Bound Operator">_≈_</a> <a id="1846" class="Symbol">=</a> <a id="1848" href="Function.Metric.Structures.html#3005" class="Record">Base.IsGeneralMetric</a> <a id="1869" href="Function.Metric.Nat.Structures.html#1842" class="Bound Operator">_≈_</a> <a id="1873" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a> <a id="1877" href="Data.Nat.Base.html#1691" class="Datatype Operator">_≤_</a> <a id="1881" class="Number">0</a> <a id="1883" href="Agda.Builtin.Nat.html#336" class="Primitive Operator">_+_</a>
|
||
|
||
<a id="1888" class="Keyword">module</a> <a id="IsMetric"></a><a id="1895" href="Function.Metric.Nat.Structures.html#1895" class="Module">IsMetric</a> <a id="1904" class="Symbol">{</a><a id="1905" href="Function.Metric.Nat.Structures.html#1905" class="Bound Operator">_≈_</a> <a id="1909" class="Symbol">:</a> <a id="1911" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="1915" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="1917" href="Function.Metric.Nat.Structures.html#687" class="Generalizable">ℓ</a><a id="1918" class="Symbol">}</a> <a id="1920" class="Symbol">{</a><a id="1921" href="Function.Metric.Nat.Structures.html#1921" class="Bound">d</a> <a id="1923" class="Symbol">:</a> <a id="1925" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="1942" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a><a id="1943" class="Symbol">}</a>
|
||
<a id="1961" class="Symbol">(</a><a id="1962" href="Function.Metric.Nat.Structures.html#1962" class="Bound">M</a> <a id="1964" class="Symbol">:</a> <a id="1966" href="Function.Metric.Nat.Structures.html#1785" class="Function">IsMetric</a> <a id="1975" href="Function.Metric.Nat.Structures.html#1905" class="Bound Operator">_≈_</a> <a id="1979" href="Function.Metric.Nat.Structures.html#1921" class="Bound">d</a><a id="1980" class="Symbol">)</a> <a id="1982" class="Keyword">where</a>
|
||
<a id="1990" class="Keyword">open</a> <a id="1995" href="Function.Metric.Structures.html#3005" class="Module">Base.IsGeneralMetric</a> <a id="2016" href="Function.Metric.Nat.Structures.html#1962" class="Bound">M</a> <a id="2018" class="Keyword">public</a>
|
||
|
||
<a id="2026" class="Comment">------------------------------------------------------------------------</a>
|
||
<a id="2099" class="Comment">-- Ultra-metrics</a>
|
||
|
||
<a id="IsUltraMetric"></a><a id="2117" href="Function.Metric.Nat.Structures.html#2117" class="Function">IsUltraMetric</a> <a id="2131" class="Symbol">:</a> <a id="2133" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="2137" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="2139" href="Function.Metric.Nat.Structures.html#687" class="Generalizable">ℓ</a> <a id="2141" class="Symbol">→</a> <a id="2143" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="2160" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="2162" class="Symbol">→</a> <a id="2164" href="Agda.Primitive.html#388" class="Primitive">Set</a> <a id="2168" class="Symbol">_</a>
|
||
<a id="2170" href="Function.Metric.Nat.Structures.html#2117" class="Function">IsUltraMetric</a> <a id="2184" href="Function.Metric.Nat.Structures.html#2184" class="Bound Operator">_≈_</a> <a id="2188" class="Symbol">=</a> <a id="2190" href="Function.Metric.Structures.html#3005" class="Record">Base.IsGeneralMetric</a> <a id="2211" href="Function.Metric.Nat.Structures.html#2184" class="Bound Operator">_≈_</a> <a id="2215" href="Agda.Builtin.Equality.html#150" class="Datatype Operator">_≡_</a> <a id="2219" href="Data.Nat.Base.html#1691" class="Datatype Operator">_≤_</a> <a id="2223" class="Number">0</a> <a id="2225" href="Data.Nat.Base.html#5479" class="Function Operator">_⊔_</a>
|
||
|
||
<a id="2230" class="Keyword">module</a> <a id="IsUltraMetric"></a><a id="2237" href="Function.Metric.Nat.Structures.html#2237" class="Module">IsUltraMetric</a> <a id="2251" class="Symbol">{</a><a id="2252" href="Function.Metric.Nat.Structures.html#2252" class="Bound Operator">_≈_</a> <a id="2256" class="Symbol">:</a> <a id="2258" href="Relation.Binary.Core.html#896" class="Function">Rel</a> <a id="2262" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a> <a id="2264" href="Function.Metric.Nat.Structures.html#687" class="Generalizable">ℓ</a><a id="2265" class="Symbol">}</a> <a id="2267" class="Symbol">{</a><a id="2268" href="Function.Metric.Nat.Structures.html#2268" class="Bound">d</a> <a id="2270" class="Symbol">:</a> <a id="2272" href="Function.Metric.Nat.Core.html#464" class="Function">DistanceFunction</a> <a id="2289" href="Function.Metric.Nat.Structures.html#701" class="Generalizable">A</a><a id="2290" class="Symbol">}</a>
|
||
<a id="2313" class="Symbol">(</a><a id="2314" href="Function.Metric.Nat.Structures.html#2314" class="Bound">UM</a> <a id="2317" class="Symbol">:</a> <a id="2319" href="Function.Metric.Nat.Structures.html#2117" class="Function">IsUltraMetric</a> <a id="2333" href="Function.Metric.Nat.Structures.html#2252" class="Bound Operator">_≈_</a> <a id="2337" href="Function.Metric.Nat.Structures.html#2268" class="Bound">d</a><a id="2338" class="Symbol">)</a> <a id="2340" class="Keyword">where</a>
|
||
<a id="2348" class="Keyword">open</a> <a id="2353" href="Function.Metric.Structures.html#3005" class="Module">Base.IsGeneralMetric</a> <a id="2374" href="Function.Metric.Nat.Structures.html#2314" class="Bound">UM</a> <a id="2377" class="Keyword">public</a>
|
||
</pre></body></html> |