Hint Resolve bool_Prop_true bool_Prop_false.
Hint Extern 4 =>
match goal with
|[ H: False |- _ ] => destruct H
|[ H: ~ bool2Prop true |- _ ] => destruct H
|[ H: bool2Prop false |- _ ] => destruct H
|[ H: true=false |- _ ] => discriminate H
|[ H: false=true |- _ ] => discriminate H
|[ H: ?b=false, H': bool2Prop(?b) |- _ ] => rewrite H in H'; destruct H'
(* |[ H: ?x el nil |- _ ] => destruct H *)
end.
Definition dec (X: Prop) : Type := {X} + {~ X}.
Coercion dec2bool P (d: dec P) := if d then true else false.
Existing Class dec.
Definition Dec (X: Prop) (d: dec X) : dec X := d.
Arguments Dec X {d}.
Ltac dec := repeat match goal with
| [ |- context [ Dec ?x ] ] => let E := fresh "E" in destruct (Dec x) as [E | ]; [ try (rewrite E in *; clear E)| ]
| [H : context [ Dec ?x ]  |- _ ] => let E := fresh "E" in destruct (Dec x) as [E | ];
[ try (rewrite E in *; clear E)| ]
end; cbn [dec2bool].

(* Specifications: *)
Lemma Dec_reflect (X: Prop) (d: dec X) :
Dec X <-> X.
Lemma Dec_reflect (X: Prop) (d: dec X) :
Dec X <-> X.