| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Typeclass instances for products |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Data.Product.Instances where |
| 10 |
|
| 11 |
open import Data.Product.Base using (Σ) |
| 12 |
open import Data.Product.Properties using (≡-dec) |
| 13 |
open import Level using (Level) |
| 14 |
open import Relation.Binary.PropositionalEquality.Properties |
| 15 |
using (isDecEquivalence) |
| 16 |
open import Relation.Binary.PropositionalEquality.Core using (_≡_) |
| 17 |
open import Relation.Binary.Structures using (IsDecEquivalence) |
| 18 |
open import Relation.Binary.TypeClasses |
| 19 |
|
| 20 |
private |
| 21 |
variable |
| 22 |
a b : Level |
| 23 |
A : Set a |
| 24 |
|
| 25 |
instance |
| 26 |
Σ-≡-isDecEquivalence : ∀ {B : A → Set b} {{_ : IsDecEquivalence {A = A} _≡_}} {{_ : ∀ {a} → IsDecEquivalence {A = B a} _≡_}} → IsDecEquivalence {A = Σ A B} _≡_ |
| 27 |
Σ-≡-isDecEquivalence = isDecEquivalence (≡-dec _≟_ _≟_) |