Skip to content

Commit 50a89f4

Browse files
committed
irrelevance of recompute
1 parent 77a4e32 commit 50a89f4

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

CHANGELOG.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ Additions to existing modules
407407
WeaklyDecidable : Set _
408408
```
409409

410+
* Added new proof in `Relation.Nullary.Decidable.Core`:
411+
```agda
412+
recompute-irr : (a? : Dec A) (p q : A) → recompute a? p ≡ recompute a? q
413+
```
414+
410415
* Added new proof in `Relation.Nullary.Decidable`:
411416
```agda
412417
⌊⌋-map′ : (a? : Dec A) → ⌊ map′ t f a? ⌋ ≡ ⌊ a? ⌋
@@ -419,13 +424,8 @@ Additions to existing modules
419424

420425
* Added new definitions in `Relation.Nullary.Reflects`:
421426
```agda
422-
recompute : Reflects A b → Recomputable A
423-
```
424-
425-
* Added new definitions in `Relation.Unary`
426-
```
427-
Stable : Pred A ℓ → Set _
428-
WeaklyDecidable : Pred A ℓ → Set _
427+
recompute : Reflects A b → Recomputable A
428+
recompute-irr : (r : Reflects A b) (p q : A) → recompute r p ≡ recompute r q
429429
```
430430

431431
* Added new definitions in `Relation.Unary`

src/Relation/Nullary/Decidable/Core.agda

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ open import Data.Product.Base using (_×_)
1818
open import Data.Sum.Base using (_⊎_)
1919
open import Function.Base using (_∘_; const; _$_; flip)
2020
open import Relation.Nullary.Recomputable
21-
open import Relation.Nullary.Reflects as Reflects hiding (recompute)
21+
open import Relation.Nullary.Reflects as Reflects hiding (recompute; recompute-irr)
2222
open import Relation.Nullary.Negation.Core
2323
using (¬_; Stable; negated-stable; contradiction; DoubleNegation)
24+
open import Agda.Builtin.Equality using (_≡_)
2425

2526
private
2627
variable
@@ -73,6 +74,9 @@ module _ {A : Set a} where
7374
recompute : Dec A Recomputable A
7475
recompute = Reflects.recompute ∘ proof
7576

77+
recompute-irr : (a? : Dec A) (p q : A) recompute a? p ≡ recompute a? q
78+
recompute-irr = Reflects.recompute-irr ∘ proof
79+
7680
------------------------------------------------------------------------
7781
-- Interaction with negation, sum, product etc.
7882

src/Relation/Nullary/Reflects.agda

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ recompute : ∀ {b} → Reflects A b → Recomputable A
6161
recompute (ofʸ a) _ = a
6262
recompute (ofⁿ ¬a) a = contradiction-irr a ¬a
6363

64+
recompute-irr : {b} (r : Reflects A b) (p q : A) recompute r p ≡ recompute r q
65+
recompute-irr r p q = refl
66+
6467
------------------------------------------------------------------------
6568
-- Interaction with negation, product, sums etc.
6669

0 commit comments

Comments
 (0)