~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to theories/Logic/Classical_Pred_Type.v

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu, Stéphane Glondu, Samuel Mimram
  • Date: 2010-01-07 22:50:39 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100107225039-n3cq82589u0qt0s2
Tags: 8.2pl1-1
[ Stéphane Glondu ]
* New upstream release (Closes: #563669)
  - remove patches
* Packaging overhaul:
  - use git, advertise it in Vcs-* fields of debian/control
  - use debhelper 7 and dh with override
  - use source format 3.0 (quilt)
* debian/control:
  - set Maintainer to d-o-m, set Uploaders to Sam and myself
  - add Homepage field
  - bump Standards-Version to 3.8.3
* Register PDF documentation into doc-base
* Add debian/watch
* Update debian/copyright

[ Samuel Mimram ]
* Change coq-doc's description to mention that it provides documentation in
  pdf format, not postscript, closes: #543545.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
(************************************************************************)
 
8
 
 
9
(*i $Id: Classical_Pred_Type.v 8642 2006-03-17 10:09:02Z notin $ i*)
 
10
 
 
11
(** Classical Predicate Logic on Type *)
 
12
 
 
13
Require Import Classical_Prop.
 
14
 
 
15
Section Generic.
 
16
Variable U : Type.
 
17
 
 
18
(** de Morgan laws for quantifiers *)
 
19
 
 
20
Lemma not_all_not_ex :
 
21
 forall P:U -> Prop, ~ (forall n:U, ~ P n) ->  exists n : U, P n.
 
22
Proof.
 
23
intros P notall.
 
24
apply NNPP.
 
25
intro abs.
 
26
apply notall.
 
27
intros n H.
 
28
apply abs; exists n; exact H.
 
29
Qed.
 
30
 
 
31
Lemma not_all_ex_not :
 
32
 forall P:U -> Prop, ~ (forall n:U, P n) ->  exists n : U, ~ P n.
 
33
Proof.
 
34
intros P notall.
 
35
apply not_all_not_ex with (P:=fun x => ~ P x).
 
36
intro all; apply notall.
 
37
intro n; apply NNPP.
 
38
apply all.
 
39
Qed.
 
40
 
 
41
Lemma not_ex_all_not :
 
42
 forall P:U -> Prop, ~ (exists n : U, P n) -> forall n:U, ~ P n.
 
43
Proof. (* Intuitionistic *)
 
44
unfold not in |- *; intros P notex n abs.
 
45
apply notex.
 
46
exists n; trivial.
 
47
Qed. 
 
48
 
 
49
Lemma not_ex_not_all :
 
50
 forall P:U -> Prop, ~ (exists n : U, ~ P n) -> forall n:U, P n.
 
51
Proof.
 
52
intros P H n.
 
53
apply NNPP.
 
54
red in |- *; intro K; apply H; exists n; trivial.
 
55
Qed.
 
56
 
 
57
Lemma ex_not_not_all :
 
58
 forall P:U -> Prop, (exists n : U, ~ P n) -> ~ (forall n:U, P n).
 
59
Proof. (* Intuitionistic *)
 
60
unfold not in |- *; intros P exnot allP.
 
61
elim exnot; auto.
 
62
Qed.
 
63
 
 
64
Lemma all_not_not_ex :
 
65
 forall P:U -> Prop, (forall n:U, ~ P n) -> ~ (exists n : U, P n).
 
66
Proof. (* Intuitionistic *)
 
67
unfold not in |- *; intros P allnot exP; elim exP; intros n p.
 
68
apply allnot with n; auto.
 
69
Qed.
 
70
 
 
71
End Generic.