Skip to content

Commit 2f8c012

Browse files
committed
lazier pattern analysis cf. agda#2055
1 parent d90b68b commit 2f8c012

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Relation/Nullary/Decidable/Core.agda

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ proof (map′ A→B B→A (false because [¬a])) = of (invert [¬a] ∘ B→A)
170170
-- Decidable predicates are stable.
171171

172172
decidable-stable : Dec A Stable A
173-
decidable-stable (yes a) ¬¬a = a
174-
decidable-stable (no ¬a) ¬¬a = contradiction ¬a ¬¬a
173+
decidable-stable (true because [a]) ¬¬a = invert [a]
174+
decidable-stable (false because [¬a]) ¬¬a = contradiction (invert [¬a]) ¬¬a
175175

176176
¬-drop-Dec : Dec (¬ ¬ A) Dec (¬ A)
177-
¬-drop-Dec ¬¬a? = map′ negated-stable (λ ¬a ¬¬a contradiction ¬a ¬¬a) (¬? ¬¬a?)
177+
¬-drop-Dec ¬¬a? = map′ negated-stable contradiction (¬? ¬¬a?)
178178

179179
-- A double-negation-translated variant of excluded middle (or: every
180180
-- nullary relation is decidable in the double-negation monad).

0 commit comments

Comments
 (0)