Question

I have the following code which I want to prove:

data Pair (A : Set) (B : A → Set) : Set where
  pair : (a : A) → (B a) → Pair A B

pairEq : (A : Set) → (B : A → Set) → (a : A) → (b₁ b₂ : B a) → (pair {A} {B} a b₁ ≡ pair {A} {B} a b₂) → b₁ ≡ b₂
pairEq A B a b₁ b₂ refl = {!!}

How can I prove this is agda? entering refl leads to an error. How can I work this around?

Was it helpful?

Solution

I done it myself:

data Pair (A : Set) (B : A → Set) : Set where
  pair : (a : A) → (B a) → Pair A B

pairEq : (A : Set) → (B : A → Set) → (a : A) → (b₁ b₂ : B a) → (pair {A} {B} a b₁ ≡ pair {A} {B} a b₂) → b₁ ≡ b₂
pairEq A B a .b b refl = refl
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top