Skip to content

Commit 6e375c2

Browse files
MatthewDaggittjamesmckinna
authored andcommitted
Add _<$>_ operator for Function bundle (agda#2144)
1 parent aa6ef23 commit 6e375c2

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3159,6 +3159,12 @@ Additions to existing modules
31593159
execState : State s a → s → s
31603160
```
31613161

3162+
* Added new application operator synonym to `Function.Bundles`:
3163+
```agda
3164+
_⟨$⟩_ : Func From To → Carrier From → Carrier To
3165+
_⟨$⟩_ = Func.to
3166+
```
3167+
31623168
* Added new proofs in `Function.Construct.Symmetry`:
31633169
```
31643170
bijective : Bijective ≈₁ ≈₂ f → Symmetric ≈₂ → Transitive ≈₂ → Congruent ≈₁ ≈₂ f → Bijective ≈₂ ≈₁ f⁻¹

src/Function/Bundles.agda

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ module _ (From : Setoid a ℓ₁) (To : Setoid b ℓ₂) where
6666
open IsCongruent isCongruent public
6767
using (module Eq₁; module Eq₂)
6868

69+
6970
record Injection : Set (a ⊔ b ⊔ ℓ₁ ⊔ ℓ₂) where
7071
field
7172
to : A B
@@ -472,3 +473,15 @@ module _ {A : Set a} {B : Set b} where
472473
, strictlyInverseʳ⇒inverseʳ to invʳ
473474
)
474475

476+
------------------------------------------------------------------------
477+
-- Other
478+
------------------------------------------------------------------------
479+
480+
-- Alternative syntax for the application of functions
481+
482+
module _ {From : Setoid a ℓ₁} {To : Setoid b ℓ₂} where
483+
open Setoid
484+
485+
infixl 5 _⟨$⟩_
486+
_⟨$⟩_ : Func From To Carrier From Carrier To
487+
_⟨$⟩_ = Func.to

0 commit comments

Comments
 (0)