Skip to content

Commit

Permalink
add lemma (#2271)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmckinna authored Feb 5, 2024
1 parent 984dd51 commit 8b1b3ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,8 @@ Additions to existing modules

* In `Function.Bundles`, added `_⟶ₛ_` as a synonym for `Func` that can
be used infix.

* Added new proof in `Relation.Nullary.Decidable`:
```agda
⌊⌋-map′ : (a? : Dec A) → ⌊ map′ t f a? ⌋ ≡ ⌊ a? ⌋
```
6 changes: 5 additions & 1 deletion src/Relation/Nullary/Decidable.agda
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ open import Relation.Binary.Bundles using (Setoid; module Setoid)
open import Relation.Binary.Definitions using (Decidable)
open import Relation.Nullary
open import Relation.Nullary.Reflects using (invert)
open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong′)
open import Relation.Binary.PropositionalEquality.Core
using (_≡_; refl; sym; trans; cong′)

private
variable
Expand Down Expand Up @@ -80,3 +81,6 @@ dec-no (no _) _ | refl = refl
dec-yes-irr : (a? : Dec A) Irrelevant A (a : A) a? ≡ yes a
dec-yes-irr a? irr a with dec-yes a? a
... | a′ , eq rewrite irr a a′ = eq

⌊⌋-map′ : t f (a? : Dec A) ⌊ map′ {B = B} t f a? ⌋ ≡ ⌊ a? ⌋
⌊⌋-map′ t f a? = trans (isYes≗does (map′ t f a?)) (sym (isYes≗does a?))

0 comments on commit 8b1b3ab

Please sign in to comment.