1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* This file was automatically generated: do not edit *********************)
19 (*#**********************************************************************)
21 (* v * The Coq Proof Assistant / The Coq Development Team *)
23 (* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *)
25 (* \VV/ *************************************************************)
27 (* // * This file is distributed under the terms of the *)
29 (* * GNU Lesser General Public License Version 2.1 *)
31 (*#**********************************************************************)
33 (*i $Id: Logic.v,v 1.29 2004/03/29 09:40:49 herbelin Exp $ i*)
36 Set Implicit Arguments.
39 include "Init/Notations.ma".
41 (*#* * Propositional connectives *)
43 (*#* [True] is the always true proposition *)
45 inline procedural "cic:/Coq/Init/Logic/True.ind".
47 (*#* [False] is the always false proposition *)
49 inline procedural "cic:/Coq/Init/Logic/False.ind".
51 (*#* [not A], written [~A], is the negation of [A] *)
53 inline procedural "cic:/Coq/Init/Logic/not.con" as definition.
56 Notation "~ x" := (not x) : type_scope.
60 Hint Unfold not: core.
63 inline procedural "cic:/Coq/Init/Logic/and.ind".
69 (*#* [and A B], written [A /\ B], is the conjunction of [A] and [B]
71 [conj p q] is a proof of [A /\ B] as soon as
72 [p] is a proof of [A] and [q] a proof of [B]
74 [proj1] and [proj2] are first and second projections of a conjunction *)
77 cic:/Coq/Init/Logic/Conjunction/A.var
81 cic:/Coq/Init/Logic/Conjunction/B.var
84 inline procedural "cic:/Coq/Init/Logic/proj1.con" as theorem.
86 inline procedural "cic:/Coq/Init/Logic/proj2.con" as theorem.
92 (*#* [or A B], written [A \/ B], is the disjunction of [A] and [B] *)
94 inline procedural "cic:/Coq/Init/Logic/or.ind".
96 (*#* [iff A B], written [A <-> B], expresses the equivalence of [A] and [B] *)
98 inline procedural "cic:/Coq/Init/Logic/iff.con" as definition.
101 Notation "A <-> B" := (iff A B) : type_scope.
108 inline procedural "cic:/Coq/Init/Logic/iff_refl.con" as theorem.
110 inline procedural "cic:/Coq/Init/Logic/iff_trans.con" as theorem.
112 inline procedural "cic:/Coq/Init/Logic/iff_sym.con" as theorem.
118 (*#* [(IF_then_else P Q R)], written [IF P then Q else R] denotes
119 either [P] and [Q], or [~P] and [Q] *)
121 inline procedural "cic:/Coq/Init/Logic/IF_then_else.con" as definition.
124 Notation "'IF' c1 'then' c2 'else' c3" := (IF_then_else c1 c2 c3)
125 (at level 200) : type_scope.
128 (*#* * First-order quantifiers
129 - [ex A P], or simply [exists x, P x], expresses the existence of an
130 [x] of type [A] which satisfies the predicate [P] ([A] is of type
131 [Set]). This is existential quantification.
132 - [ex2 A P Q], or simply [exists2 x, P x & Q x], expresses the
133 existence of an [x] of type [A] which satisfies both the predicates
135 - Universal quantification (especially first-order one) is normally
136 written [forall x:A, P x]. For duality with existential quantification,
137 the construction [all P] is provided too.
140 inline procedural "cic:/Coq/Init/Logic/ex.ind".
142 inline procedural "cic:/Coq/Init/Logic/ex2.ind".
144 inline procedural "cic:/Coq/Init/Logic/all.con" as definition.
146 (* Rule order is important to give printing priority to fully typed exists *)
149 Notation "'exists' x , p" := (ex (fun x => p))
150 (at level 200, x ident) : type_scope.
154 Notation "'exists' x : t , p" := (ex (fun x:t => p))
155 (at level 200, x ident, format "'exists' '/ ' x : t , '/ ' p")
160 Notation "'exists2' x , p & q" := (ex2 (fun x => p) (fun x => q))
161 (at level 200, x ident, p at level 200) : type_scope.
165 Notation "'exists2' x : t , p & q" := (ex2 (fun x:t => p) (fun x:t => q))
166 (at level 200, x ident, t at level 200, p at level 200,
167 format "'exists2' '/ ' x : t , '/ ' '[' p & '/' q ']'")
171 (*#* Derived rules for universal quantification *)
174 Section universal_quantification
178 cic:/Coq/Init/Logic/universal_quantification/A.var
182 cic:/Coq/Init/Logic/universal_quantification/P.var
185 inline procedural "cic:/Coq/Init/Logic/inst.con" as theorem.
187 inline procedural "cic:/Coq/Init/Logic/gen.con" as theorem.
190 End universal_quantification
195 (*#* [eq x y], or simply [x=y], expresses the (Leibniz') equality
196 of [x] and [y]. Both [x] and [y] must belong to the same type [A].
197 The definition is inductive and states the reflexivity of the equality.
198 The others properties (symmetry, transitivity, replacement of
199 equals) are proved below. The type of [x] and [y] can be made explicit
200 using the notation [x = y :> A] *)
202 inline procedural "cic:/Coq/Init/Logic/eq.ind".
205 Notation "x = y" := (x = y :>_) : type_scope.
209 Notation "x <> y :> T" := (~ x = y :>T) : type_scope.
213 Notation "x <> y" := (x <> y :>_) : type_scope.
217 Implicit Arguments eq_ind [A].
221 Implicit Arguments eq_rec [A].
225 Implicit Arguments eq_rect [A].
229 Hint Resolve I conj or_introl or_intror refl_equal: core v62.
233 Hint Resolve ex_intro ex_intro2: core v62.
240 inline procedural "cic:/Coq/Init/Logic/absurd.con" as theorem.
247 cic:/Coq/Init/Logic/Logic_lemmas/equality/A.var
251 cic:/Coq/Init/Logic/Logic_lemmas/equality/B.var
255 cic:/Coq/Init/Logic/Logic_lemmas/equality/f.var
259 cic:/Coq/Init/Logic/Logic_lemmas/equality/x.var
263 cic:/Coq/Init/Logic/Logic_lemmas/equality/y.var
267 cic:/Coq/Init/Logic/Logic_lemmas/equality/z.var
270 inline procedural "cic:/Coq/Init/Logic/sym_eq.con" as theorem.
276 inline procedural "cic:/Coq/Init/Logic/trans_eq.con" as theorem.
282 inline procedural "cic:/Coq/Init/Logic/f_equal.con" as theorem.
288 inline procedural "cic:/Coq/Init/Logic/sym_not_eq.con" as theorem.
290 inline procedural "cic:/Coq/Init/Logic/sym_equal.con" as definition.
292 inline procedural "cic:/Coq/Init/Logic/sym_not_equal.con" as definition.
294 inline procedural "cic:/Coq/Init/Logic/trans_equal.con" as definition.
300 (* Is now a primitive principle
301 Theorem eq_rect: (A:Type)(x:A)(P:A->Type)(P x)->(y:A)(eq ? x y)->(P y).
304 Cut (identity A x y).
310 inline procedural "cic:/Coq/Init/Logic/eq_ind_r.con" as definition.
312 inline procedural "cic:/Coq/Init/Logic/eq_rec_r.con" as definition.
314 inline procedural "cic:/Coq/Init/Logic/eq_rect_r.con" as definition.
320 inline procedural "cic:/Coq/Init/Logic/f_equal2.con" as theorem.
322 inline procedural "cic:/Coq/Init/Logic/f_equal3.con" as theorem.
324 inline procedural "cic:/Coq/Init/Logic/f_equal4.con" as theorem.
326 inline procedural "cic:/Coq/Init/Logic/f_equal5.con" as theorem.
329 Hint Immediate sym_eq sym_not_eq: core v62.