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].Coercion dec2bool P (d: dec P) := if d then true else false.Definition Dec (X: Prop) (d: dec X) : dec X := d.

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