Debian Codegraph @

src/Function/Metric/Definitions.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Definitions of properties over distance functions
5 ------------------------------------------------------------------------
6
7 -- The contents of this module should be accessed via `Function.Metric`.
8
9 {-# OPTIONS --cubical-compatible --safe #-}
10
11 module Function.Metric.Definitions where
12
13 open import Algebra.Core using (Op₂)
14 open import Data.Product.Base using (∃)
15 open import Function.Metric.Core using (DistanceFunction)
16 open import Level using (Level)
17 open import Relation.Binary.Core using (Rel; _Preserves₂_⟶_⟶_)
18 open import Relation.Nullary.Negation using (¬_)
19
20 private
21 variable
22 a i ℓ ℓ₁ ℓ₂ : Level
23 A : Set a
24 I : Set i
25
26 ------------------------------------------------------------------------
27 -- Properties
28
29 Congruent : Rel A ℓ₁ → Rel I ℓ₂ → DistanceFunction A I → Set _
30 Congruent _≈ₐ_ _≈ᵢ_ d = d Preserves₂ _≈ₐ_ ⟶ _≈ₐ_ ⟶ _≈ᵢ_
31
32 Indiscernable : Rel A ℓ₁ → Rel I ℓ₂ → DistanceFunction A I → I → Set _
33 Indiscernable _≈ₐ_ _≈ᵢ_ d 0# = ∀ {x y} → d x y ≈ᵢ 0# → x ≈ₐ y
34
35 Definite : Rel A ℓ₁ → Rel I ℓ₂ → DistanceFunction A I → I → Set _
36 Definite _≈ₐ_ _≈ᵢ_ d 0# = ∀ {x y} → x ≈ₐ y → d x y ≈ᵢ 0#
37
38 NonNegative : Rel I ℓ₂ → DistanceFunction A I → I → Set _
39 NonNegative _≤_ d 0# = ∀ {x y} → 0# ≤ d x y
40
41 Symmetric : Rel I ℓ → DistanceFunction A I → Set _
42 Symmetric _≈_ d = ∀ x y → d x y ≈ d y x
43
44 TriangleInequality : Rel I ℓ → Op₂ I → DistanceFunction A I → _
45 TriangleInequality _≤_ _∙_ d = ∀ x y z → d x z ≤ (d x y ∙ d y z)
46
47 Bounded : Rel I ℓ → DistanceFunction A I → Set _
48 Bounded _≤_ d = ∃ λ n → ∀ x y → d x y ≤ n
49
50 TranslationInvariant : Rel I ℓ₂ → Op₂ A → DistanceFunction A I → Set _
51 TranslationInvariant _≈_ _∙_ d = ∀ {x y a} → d (x ∙ a) (y ∙ a) ≈ d x y
52
53 Contracting : Rel I ℓ → (A → A) → DistanceFunction A I → Set _
54 Contracting _≤_ f d = ∀ x y → d (f x) (f y) ≤ d x y
55
56 ContractingOnOrbits : Rel I ℓ → (A → A) → DistanceFunction A I → Set _
57 ContractingOnOrbits _≤_ f d = ∀ x → d (f x) (f (f x)) ≤ d x (f x)
58
59 StrictlyContracting : Rel A ℓ₁ → Rel I ℓ₂ → (A → A) → DistanceFunction A I → Set _
60 StrictlyContracting _≈_ _<_ f d = ∀ {x y} → ¬ (y ≈ x) → d (f x) (f y) < d x y
61
62 StrictlyContractingOnOrbits : Rel A ℓ₁ → Rel I ℓ₂ → (A → A) → DistanceFunction A I → Set _
63 StrictlyContractingOnOrbits _≈_ _<_ f d = ∀ {x} → ¬ (f x ≈ x) → d (f x) (f (f x)) < d x (f x)