Skip to content

Commit 6faaad3

Browse files
WhatisRTJacquesCarettejamesmckinna
authored
Add a property relating maybe to composition (#2414)
* Add a property relating `maybe` to composition * Add CHANGELOG and slightly simpler definition * Update CHANGELOG.md Co-authored-by: jamesmckinna <[email protected]> --------- Co-authored-by: Jacques Carette <[email protected]> Co-authored-by: jamesmckinna <[email protected]>
1 parent cc69ea0 commit 6faaad3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ Additions to existing modules
7171
++⁺ˡ : Reflexive R → ∀ zs → (_++ zs) Preserves (Pointwise R) ⟶ (Pointwise R)
7272
```
7373

74+
* In `Data.Maybe.Properties`:
75+
```agda
76+
maybe′-∘ : ∀ f g → f ∘ (maybe′ g b) ≗ maybe′ (f ∘ g) (f b)
77+
```
78+
7479
* New lemmas in `Data.Nat.Properties`:
7580
```agda
7681
m≤n⇒m≤n*o : ∀ o .{{_ : NonZero o}} → m ≤ n → m ≤ n * o

src/Data/Maybe/Properties.agda

+3
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ maybe′-map : ∀ j (n : C) (f : A → B) ma →
9797
maybe′ j n (map f ma) ≡ maybe′ (j ∘′ f) n ma
9898
maybe′-map = maybe-map
9999

100+
maybe′-∘ : {b} (f : B C) (g : A B) f ∘ (maybe′ g b) ≗ maybe′ (f ∘ g) (f b)
101+
maybe′-∘ _ _ = maybe (λ _ refl) refl
102+
100103
------------------------------------------------------------------------
101104
-- _<∣>_
102105

0 commit comments

Comments
 (0)