I'm trying to use Decidable Equality to compare two Vectors of Nats in Agda. I've tried opening the Vector Equality module, passing the Nat DecSetoid as an argument, as follows:
open import Data.Nat
open import Data.Vec
open import Relation.Binary.PropositionalEquality
import Data.Vec.Equality
myFunction : {n : ℕ} -> Vec ℕ n -> Vec ℕ n -> ℕ
myFunction v1 v2
with v1 Data.Vec.Equality.DecidableEquality.≟ v2
... | _ = {!!}
where
open Data.Vec.Equality.DecidableEquality (Relation.Binary.PropositionalEquality.decSetoid Data.Nat._≟_)
However, I get the following error:
Vec ℕ .n !=< .Relation.Binary.DecSetoid (_d₁_6 v1 v2) (_d₂_7 v1 v2)
of type Set
when checking that the expression v1 has type
.Relation.Binary.DecSetoid (_d₁_6 v1 v2) (_d₂_7 v1 v2)
I'm not sure what I'm doing wrong. Am I using the module system wrong, or do I need to use ≟ differently?