Skip to content

Commit 38f22ec

Browse files
bsauljamesmckinna
andauthored
Adds "pushforward" to Relation.Unary (#2840)
* add predicate pushforward * update changelog * update notation based on discussion * Additional description Co-authored-by: jamesmckinna <[email protected]> --------- Co-authored-by: jamesmckinna <[email protected]>
1 parent 3628383 commit 38f22ec

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,12 @@ Additions to existing modules
238238
contradiction′ : ¬ A → A → Whatever
239239
```
240240

241+
* In `Relation.Unary`
242+
```agda
243+
⟨_⟩⊢_ : (A → B) → Pred A ℓ → Pred B _
244+
[_]⊢_ : (A → B) → Pred A ℓ → Pred B _
245+
```
246+
241247
* In `System.Random`:
242248
```agda
243249
randomIO : IO Bool

src/Relation/Unary.agda

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ Decidable P = ∀ x → Dec (P x)
202202
-- Operations on sets
203203

204204
infix 10 ⋃ ⋂
205-
infixr 9 _⊢_
205+
infixr 9 _⊢_ ⟨_⟩⊢_ [_]⊢_
206206
infixr 8 _⇒_
207207
infixr 7 _∩_
208208
infixr 6 _∪_
@@ -266,6 +266,20 @@ P ⊥′ Q = P ∩ Q ⊆′ ∅
266266
_⊢_ : (A B) Pred B ℓ Pred A ℓ
267267
f ⊢ P = λ x P (f x)
268268

269+
-- Diamond/Box: for given `f`, these are the left- and right adjoints to `f ⊢_`
270+
-- These are specialization of Diamond/Box in
271+
-- Relation.Unary.Closure.Base.
272+
273+
-- Diamond
274+
275+
⟨_⟩⊢_ : (A B) Pred A ℓ Pred B _
276+
⟨ f ⟩⊢ P = λ b λ a f a ≡ b × P a
277+
278+
-- Box
279+
280+
[_]⊢_ : (A B) Pred A ℓ Pred B _
281+
[ f ]⊢ P = λ b a f a ≡ b P a
282+
269283
------------------------------------------------------------------------
270284
-- Predicate combinators
271285

0 commit comments

Comments
 (0)