(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* Set) ((b=true)->(P true))->((b=false)->(P false))->(P b). NewDestruct b; Auto. Defined. Definition bool_eq_ind : (b:bool)(P:bool->Prop) ((b=true)->(P true))->((b=false)->(P false))->(P b). NewDestruct b; Auto. Defined. (*i pourquoi ce machin-la est dans BOOL et pas dans LOGIC ? Papageno i*) (** Logic connectives on type [sumbool] *) Section connectives. Variables A,B,C,D : Prop. Hypothesis H1 : {A}+{B}. Hypothesis H2 : {C}+{D}. Definition sumbool_and : {A/\C}+{B\/D}. Proof. Case H1; Case H2; Auto. Defined. Definition sumbool_or : {A\/C}+{B/\D}. Proof. Case H1; Case H2; Auto. Defined. Definition sumbool_not : {B}+{A}. Proof. Case H1; Auto. Defined. End connectives. Hints Resolve sumbool_and sumbool_or sumbool_not : core. (** Any decidability function in type [sumbool] can be turned into a function returning a boolean with the corresponding specification: *) Definition bool_of_sumbool : (A,B:Prop) {A}+{B} -> { b:bool | if b then A else B }. Proof. Intros A B H. Elim H; [ Intro; Exists true; Assumption | Intro; Exists false; Assumption ]. Defined. Implicits bool_of_sumbool.