(** Propagation rules for decisions *)

Fact dec_transfer P Q :
  P <-> Q -> dec P -> dec Q.Instance bool_dec (b: bool) :
  dec b.Instance True_dec :
  dec True.Instance False_dec :
  dec False.Instance impl_dec (X Y : Prop) :  
  dec X -> dec Y -> dec (X -> Y).Instance and_dec (X Y : Prop) :  
  dec X -> dec Y -> dec (X /\ Y).Instance or_dec (X Y : Prop) : 
  dec X -> dec Y -> dec (X \/ Y).(* Coq standard modules make "not" and "iff" opaque for type class inference, 
   can be seen with Print HintDb typeclass_instances. *)

Instance not_dec (X : Prop) : 
  dec X -> dec (~ X).Instance iff_dec (X Y : Prop) : 
  dec X -> dec Y -> dec (X <-> Y).Structure eqType := EqType {
  eqType_X :> Type;
  eqType_dec : eq_dec eqType_X }.Structure eqType := EqType {
  eqType_X :> Type;
  eqType_dec : eq_dec eqType_X }.Structure eqType := EqType {
  eqType_X :> Type;
  eqType_dec : eq_dec eqType_X }.Structure eqType := EqType {
  eqType_X :> Type;
  eqType_dec : eq_dec eqType_X }.Canonical Structure eqType_CS X (A: eq_dec X) := EqType X.Instance unit_eq_dec :
  eq_dec unit.Instance bool_eq_dec : 
  eq_dec bool.Instance nat_eq_dec : 
  eq_dec nat.Instance prod_eq_dec X Y :  
  eq_dec X -> eq_dec Y -> eq_dec (X * Y).Instance list_eq_dec X :  
  eq_dec X -> eq_dec (list X).Instance sum_eq_dec X Y :  
  eq_dec X -> eq_dec Y -> eq_dec (X + Y).Instance option_eq_dec X :
  eq_dec X -> eq_dec (option X).Instance Empty_set_eq_dec:
  eq_dec Empty_set.Instance True_eq_dec:
  eq_dec True.Instance False_eq_dec:
  eq_dec False.Definition equi X (A B : list X) : Prop := incl A B /\ incl B A.

Lemma list_cycle (X : Type) (A : list X) x : x::A <> A.