1
(************************************************************************)
2
(* v * The Coq Proof Assistant / The Coq Development Team *)
3
(* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
4
(* \VV/ **************************************************************)
5
(* // * This file is distributed under the terms of the *)
6
(* * GNU Lesser General Public License Version 2.1 *)
7
(************************************************************************)
9
(* Micromega: A reflexive tactic using the Positivstellensatz *)
11
(* Fr�d�ric Besson (Irisa/Inria) 2006-2008 *)
13
(************************************************************************)
18
Set Implicit Arguments.
20
(* Refl of '->' '/\': basic properties *)
22
Fixpoint make_impl (A : Type) (eval : A -> Prop) (l : list A) (goal : Prop) {struct l} : Prop :=
25
| cons e l => (eval e) -> (make_impl eval l goal)
28
Theorem make_impl_true :
29
forall (A : Type) (eval : A -> Prop) (l : list A), make_impl eval l True.
31
induction l as [| a l IH]; simpl.
36
Fixpoint make_conj (A : Type) (eval : A -> Prop) (l : list A) {struct l} : Prop :=
39
| cons e nil => (eval e)
40
| cons e l2 => ((eval e) /\ (make_conj eval l2))
43
Theorem make_conj_cons : forall (A : Type) (eval : A -> Prop) (a : A) (l : list A),
44
make_conj eval (a :: l) <-> eval a /\ make_conj eval l.
46
intros; destruct l; simpl; tauto.
50
Lemma make_conj_impl : forall (A : Type) (eval : A -> Prop) (l : list A) (g : Prop),
51
(make_conj eval l -> g) <-> make_impl eval l g.
65
Lemma make_conj_in : forall (A : Type) (eval : A -> Prop) (l : list A),
66
make_conj eval l -> (forall p, In p l -> eval p).
86
Lemma make_conj_app : forall A eval l1 l2, @make_conj A eval (l1 ++ l2) <-> @make_conj A eval l1 /\ @make_conj A eval l2.
92
change ((a::l1) ++ l2) with (a :: (l1 ++ l2)).
93
rewrite make_conj_cons.
95
rewrite make_conj_cons.
99
Lemma not_make_conj_cons : forall (A:Type) (t:A) a eval (no_middle_eval : (eval t) \/ ~ (eval t)),
100
~ make_conj eval (t ::a) -> ~ (eval t) \/ (~ make_conj eval a).
109
Lemma not_make_conj_app : forall (A:Type) (t:list A) a eval
110
(no_middle_eval : forall d, eval d \/ ~ eval d) ,
111
~ make_conj eval (t ++ a) -> (~ make_conj eval t) \/ (~ make_conj eval a).
117
simpl ((a::t)++a0)in H.
118
destruct (@not_make_conj_cons _ _ _ _ (no_middle_eval a) H).
121
rewrite make_conj_cons in H1.
123
destruct (IHt _ _ no_middle_eval H0).
126
rewrite make_conj_cons in H2.