| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Permutation relations over Vector |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Data.Vec.Functional.Relation.Binary.Permutation where |
| 10 |
|
| 11 |
open import Level using (Level) |
| 12 |
open import Data.Product.Base using (Σ-syntax) |
| 13 |
open import Data.Fin.Permutation using (Permutation; _⟨$⟩ʳ_) |
| 14 |
open import Data.Vec.Functional using (Vector) |
| 15 |
open import Relation.Binary.Indexed.Heterogeneous.Core using (IRel) |
| 16 |
open import Relation.Binary.PropositionalEquality.Core using (_≡_) |
| 17 |
|
| 18 |
private |
| 19 |
variable |
| 20 |
a : Level |
| 21 |
A : Set a |
| 22 |
|
| 23 |
infix 3 _↭_ |
| 24 |
|
| 25 |
_↭_ : IRel (Vector A) _ |
| 26 |
xs ↭ ys = Σ[ ρ ∈ Permutation _ _ ] (∀ i → xs (ρ ⟨$⟩ʳ i) ≡ ys i) |