diff options
author | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2004-07-28 21:54:47 +0000 |
---|---|---|
committer | Samuel Mimram <samuel.mimram@ens-lyon.org> | 2004-07-28 21:54:47 +0000 |
commit | 6b649aba925b6f7462da07599fe67ebb12a3460e (patch) | |
tree | 43656bcaa51164548f3fa14e5b10de5ef1088574 /theories7/Bool/IfProp.v |
Imported Upstream version 8.0pl1upstream/8.0pl1
Diffstat (limited to 'theories7/Bool/IfProp.v')
-rwxr-xr-x | theories7/Bool/IfProp.v | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/theories7/Bool/IfProp.v b/theories7/Bool/IfProp.v new file mode 100755 index 00000000..bcfa4be3 --- /dev/null +++ b/theories7/Bool/IfProp.v @@ -0,0 +1,49 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +(*i $Id: IfProp.v,v 1.1.2.1 2004/07/16 19:31:25 herbelin Exp $ i*) + +Require Bool. + +Inductive IfProp [A,B:Prop] : bool-> Prop + := Iftrue : A -> (IfProp A B true) + | Iffalse : B -> (IfProp A B false). + +Hints Resolve Iftrue Iffalse : bool v62. + +Lemma Iftrue_inv : (A,B:Prop)(b:bool) (IfProp A B b) -> b=true -> A. +NewDestruct 1; Intros; Auto with bool. +Case diff_true_false; Auto with bool. +Qed. + +Lemma Iffalse_inv : (A,B:Prop)(b:bool) (IfProp A B b) -> b=false -> B. +NewDestruct 1; Intros; Auto with bool. +Case diff_true_false; Trivial with bool. +Qed. + +Lemma IfProp_true : (A,B:Prop)(IfProp A B true) -> A. +Intros. +Inversion H. +Assumption. +Qed. + +Lemma IfProp_false : (A,B:Prop)(IfProp A B false) -> B. +Intros. +Inversion H. +Assumption. +Qed. + +Lemma IfProp_or : (A,B:Prop)(b:bool)(IfProp A B b) -> A\/B. +NewDestruct 1; Auto with bool. +Qed. + +Lemma IfProp_sum : (A,B:Prop)(b:bool)(IfProp A B b) -> {A}+{B}. +NewDestruct b; Intro H. +Left; Inversion H; Auto with bool. +Right; Inversion H; Auto with bool. +Qed. |