Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ Additions to existing modules
contradiction′ : ¬ A → A → Whatever
```

* In `Relation.Unary`
```agda
⟨_⟩⊢_ : (A → B) → Pred A ℓ → Pred B _
[_]⊢_ : (A → B) → Pred A ℓ → Pred B _
```

* In `System.Random`:
```agda
randomIO : IO Bool
Expand Down
16 changes: 15 additions & 1 deletion src/Relation/Unary.agda
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Decidable P = ∀ x → Dec (P x)
-- Operations on sets

infix 10 ⋃ ⋂
infixr 9 _⊢_
infixr 9 _⊢_ ⟨_⟩⊢_ [_]⊢_
infixr 8 _⇒_
infixr 7 _∩_
infixr 6 _∪_
Expand Down Expand Up @@ -266,6 +266,20 @@ P ⊥′ Q = P ∩ Q ⊆′ ∅
_⊢_ : (A → B) → Pred B ℓ → Pred A ℓ
f ⊢ P = λ x → P (f x)

-- Diamond/Box
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
-- Diamond/Box
-- Diamond/Box: for given `f`, these are the left- and right adjoints to `f ⊢_`

to (partially) address @JacquesCarette 's comment?

-- These are specialization of Diamond/Box in
-- Relation.Unary.Closure.Base.

-- Diamond

⟨_⟩⊢_ : (A → B) → Pred A ℓ → Pred B _
⟨ f ⟩⊢ P = λ b → ∃ λ a → f a ≡ b × P a

-- Box

[_]⊢_ : (A → B) → Pred A ℓ → Pred B _
[ f ]⊢ P = λ b → ∀ a → f a ≡ b → P a

------------------------------------------------------------------------
-- Predicate combinators

Expand Down