Debian Codegraph @

src/Data/Tree/AVL/Map/Membership/Propositional.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Membership relation for AVL Maps identifying values up to
5 -- propositional equality.
6 ------------------------------------------------------------------------
7
8 {-# OPTIONS --cubical-compatible --safe #-}
9
10 open import Relation.Binary.Bundles using (StrictTotalOrder)
11
12 module Data.Tree.AVL.Map.Membership.Propositional
13 {a ℓ₁ ℓ₂} (strictTotalOrder : StrictTotalOrder a ℓ₁ ℓ₂)
14 where
15
16 open import Data.Product.Base using (_×_)
17 open import Data.Product.Relation.Binary.Pointwise.NonDependent
18 using ()
19 renaming (Pointwise to _×ᴿ_)
20 open import Level using (Level)
21 open import Relation.Binary.Core using (Rel)
22 open import Relation.Binary.PropositionalEquality.Core using (_≡_)
23 open import Relation.Nullary.Negation.Core using (¬_)
24
25 open StrictTotalOrder strictTotalOrder using (_≈_) renaming (Carrier to Key)
26 open import Data.Tree.AVL.Map strictTotalOrder using (Map)
27 open import Data.Tree.AVL.Map.Relation.Unary.Any strictTotalOrder using (Any)
28
29
30 private
31 variable
32 v : Level
33 V : Set v
34 m : Map V
35 kx : Key × V
36
37 infix 4 _≈ₖᵥ_
38
39 _≈ₖᵥ_ : Rel (Key × V) _
40 _≈ₖᵥ_ = _≈_ ×ᴿ _≡_
41
42 ------------------------------------------------------------------------
43 -- Membership: ∈ₖᵥ
44
45 infix 4 _∈ₖᵥ_ _∉ₖᵥ_
46
47 _∈ₖᵥ_ : Key × V → Map V → Set _
48 kx ∈ₖᵥ m = Any (_≈ₖᵥ_ kx) m
49
50 _∉ₖᵥ_ : Key × V → Map V → Set _
51 kx ∉ₖᵥ m = ¬ kx ∈ₖᵥ m