Debian Codegraph @

src/Data/Vec/Functional/Relation/Binary/Pointwise.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Pointwise lifting of relations over Vector
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 module Data.Vec.Functional.Relation.Binary.Pointwise where
10
11 open import Data.Vec.Functional as VF hiding (map)
12 open import Level using (Level)
13 open import Relation.Binary.Core using (REL; _⇒_)
14
15 private
16 variable
17 a b r s ℓ : Level
18 A : Set a
19 B : Set b
20
21 ------------------------------------------------------------------------
22 -- Definition
23
24 Pointwise : REL A B ℓ → ∀ {n} → Vector A n → Vector B n → Set ℓ
25 Pointwise R xs ys = ∀ i → R (xs i) (ys i)
26
27 ------------------------------------------------------------------------
28 -- Operations
29
30 module _ {R : REL A B r} {S : REL A B s} where
31
32 map : R ⇒ S → ∀ {n} → Pointwise R ⇒ Pointwise S {n = n}
33 map f rs i = f (rs i)