fix(library/logic/axioms/prop_decidable): fixes #704
This commit is contained in:
parent
1886b71c17
commit
97b3fd45ce
3 changed files with 8 additions and 2 deletions
|
@ -8,13 +8,13 @@ Excluded middle + Hilbert implies every proposition is decidable.
|
|||
import logic.axioms.prop_complete logic.axioms.hilbert data.sum
|
||||
open decidable inhabited nonempty sum
|
||||
|
||||
theorem decidable_inhabited [instance] (a : Prop) : inhabited (decidable a) :=
|
||||
theorem decidable_inhabited [instance] [priority 0] (a : Prop) : inhabited (decidable a) :=
|
||||
inhabited_of_nonempty
|
||||
(or.elim (em a)
|
||||
(assume Ha, nonempty.intro (inl Ha))
|
||||
(assume Hna, nonempty.intro (inr Hna)))
|
||||
|
||||
theorem prop_decidable [instance] (a : Prop) : decidable a :=
|
||||
theorem prop_decidable [instance] [priority 0] (a : Prop) : decidable a :=
|
||||
arbitrary (decidable a)
|
||||
|
||||
theorem type_decidable (A : Type) : A + (A → false) :=
|
||||
|
|
4
tests/lean/704.lean
Normal file
4
tests/lean/704.lean
Normal file
|
@ -0,0 +1,4 @@
|
|||
import classical
|
||||
eval if true then 1 else 0
|
||||
attribute prop_decidable [priority 0]
|
||||
eval if true then 1 else 0
|
2
tests/lean/704.lean.expected.out
Normal file
2
tests/lean/704.lean.expected.out
Normal file
|
@ -0,0 +1,2 @@
|
|||
1
|
||||
1
|
Loading…
Reference in a new issue