| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Indexed unary relations |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Relation.Unary.Indexed where |
| 10 |
|
| 11 |
open import Data.Product.Base using (∃; _×_) |
| 12 |
open import Level using (Level) |
| 13 |
open import Relation.Nullary.Negation.Core using (¬_) |
| 14 |
|
| 15 |
IPred : ∀ {i a} {I : Set i} → (I → Set a) → (ℓ : Level) → Set _ |
| 16 |
IPred A ℓ = ∀ {i} → A i → Set ℓ |
| 17 |
|
| 18 |
module _ {i a} {I : Set i} {A : I → Set a} where |
| 19 |
|
| 20 |
infix 4 _∈_ _∉_ |
| 21 |
|
| 22 |
_∈_ : ∀ {ℓ} → (∀ i → A i) → IPred A ℓ → Set _ |
| 23 |
x ∈ P = ∀ i → P (x i) |
| 24 |
|
| 25 |
_∉_ : ∀ {ℓ} → (∀ i → A i) → IPred A ℓ → Set _ |
| 26 |
t ∉ P = ¬ (t ∈ P) |