Skip to content

Commit 8b1b3ab

Browse files
authored
add lemma (#2271)
1 parent 984dd51 commit 8b1b3ab

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,8 @@ Additions to existing modules
140140

141141
* In `Function.Bundles`, added `_⟶ₛ_` as a synonym for `Func` that can
142142
be used infix.
143+
144+
* Added new proof in `Relation.Nullary.Decidable`:
145+
```agda
146+
⌊⌋-map′ : (a? : Dec A) → ⌊ map′ t f a? ⌋ ≡ ⌊ a? ⌋
147+
```

src/Relation/Nullary/Decidable.agda

+5-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ open import Relation.Binary.Bundles using (Setoid; module Setoid)
1919
open import Relation.Binary.Definitions using (Decidable)
2020
open import Relation.Nullary
2121
open import Relation.Nullary.Reflects using (invert)
22-
open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong′)
22+
open import Relation.Binary.PropositionalEquality.Core
23+
using (_≡_; refl; sym; trans; cong′)
2324

2425
private
2526
variable
@@ -80,3 +81,6 @@ dec-no (no _) _ | refl = refl
8081
dec-yes-irr : (a? : Dec A) Irrelevant A (a : A) a? ≡ yes a
8182
dec-yes-irr a? irr a with dec-yes a? a
8283
... | a′ , eq rewrite irr a a′ = eq
84+
85+
⌊⌋-map′ : t f (a? : Dec A) ⌊ map′ {B = B} t f a? ⌋ ≡ ⌊ a? ⌋
86+
⌊⌋-map′ t f a? = trans (isYes≗does (map′ t f a?)) (sym (isYes≗does a?))

0 commit comments

Comments
 (0)