| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Functors on indexed sets (predicates) |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
-- Note that currently the functor laws are not included here. |
| 8 |
|
| 9 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 10 |
|
| 11 |
module Effect.Functor.Predicate where |
| 12 |
|
| 13 |
open import Function.Base using (const) |
| 14 |
open import Level using (Level; suc; _⊔_) |
| 15 |
open import Relation.Unary using (_⊆_) |
| 16 |
open import Relation.Unary.PredicateTransformer using (PT) |
| 17 |
|
| 18 |
private |
| 19 |
variable |
| 20 |
i j ℓ₁ ℓ₂ : Level |
| 21 |
|
| 22 |
record RawPFunctor {I : Set i} {J : Set j} |
| 23 |
(F : PT I J ℓ₁ ℓ₂) : Set (i ⊔ j ⊔ suc ℓ₁ ⊔ suc ℓ₂) |
| 24 |
where |
| 25 |
infixl 4 _<$>_ _<$_ |
| 26 |
|
| 27 |
field |
| 28 |
_<$>_ : ∀ {P Q} → P ⊆ Q → F P ⊆ F Q |
| 29 |
|
| 30 |
_<$_ : ∀ {P Q} → (∀ {i} → P i) → F Q ⊆ F P |
| 31 |
x <$ y = const x <$> y |