Skip to content

Commit 60a93de

Browse files
MatthewDaggittandreasabel
authored andcommitted
Add _<$>_ operator for Function bundle (#2144)
1 parent 3f6f36a commit 60a93de

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -3154,6 +3154,12 @@ Additions to existing modules
31543154
execState : State s a → s → s
31553155
```
31563156

3157+
* Added new application operator synonym to `Function.Bundles`:
3158+
```agda
3159+
_⟨$⟩_ : Func From To → Carrier From → Carrier To
3160+
_⟨$⟩_ = Func.to
3161+
```
3162+
31573163
* Added new proofs in `Function.Construct.Symmetry`:
31583164
```
31593165
bijective : Bijective ≈₁ ≈₂ f → Symmetric ≈₂ → Transitive ≈₂ → Congruent ≈₁ ≈₂ f → Bijective ≈₂ ≈₁ f⁻¹

src/Function/Bundles.agda

+13
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)