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 include "Init/Prelude.ma".
21 (*#***********************************************************************)
23 (* v * The Coq Proof Assistant / The Coq Development Team *)
25 (* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
27 (* \VV/ **************************************************************)
29 (* // * This file is distributed under the terms of the *)
31 (* * GNU Lesser General Public License Version 2.1 *)
33 (*#***********************************************************************)
35 (*i $Id: Berardi.v,v 1.5.2.2 2004/08/03 17:42:43 herbelin Exp $ i*)
37 (*#* This file formalizes Berardi's paradox which says that in
38 the calculus of constructions, excluded middle (EM) and axiom of
39 choice (AC) imply proof irrelevance (PI).
40 Here, the axiom of choice is not necessary because of the use
43 @article{Barbanera-Berardi:JFP96,
44 author = {F. Barbanera and S. Berardi},
45 title = {Proof-irrelevance out of Excluded-middle and Choice
46 in the Calculus of Constructions},
47 journal = {Journal of Functional Programming},
56 Set Implicit Arguments.
60 Section Berardis_paradox
63 (*#* Excluded middle *)
66 cic:/Coq/Logic/Berardi/Berardis_paradox/EM.var
69 (*#* Conditional on any proposition. *)
71 inline procedural "cic:/Coq/Logic/Berardi/IFProp.con" as definition.
73 (*#* Axiom of choice applied to disjunction.
74 Provable in Coq because of dependent elimination. *)
76 inline procedural "cic:/Coq/Logic/Berardi/AC_IF.con" as lemma.
78 (*#* We assume a type with two elements. They play the role of booleans.
79 The main theorem under the current assumptions is that [T=F] *)
82 cic:/Coq/Logic/Berardi/Berardis_paradox/Bool.var
86 cic:/Coq/Logic/Berardi/Berardis_paradox/T.var
90 cic:/Coq/Logic/Berardi/Berardis_paradox/F.var
93 (*#* The powerset operator *)
95 inline procedural "cic:/Coq/Logic/Berardi/pow.con" as definition.
97 (*#* A piece of theory about retracts *)
104 cic:/Coq/Logic/Berardi/Berardis_paradox/Retracts/A.var
108 cic:/Coq/Logic/Berardi/Berardis_paradox/Retracts/B.var
111 inline procedural "cic:/Coq/Logic/Berardi/retract.ind".
113 inline procedural "cic:/Coq/Logic/Berardi/retract_cond.ind".
115 (*#* The dependent elimination above implies the axiom of choice: *)
117 inline procedural "cic:/Coq/Logic/Berardi/AC.con" as lemma.
123 (*#* This lemma is basically a commutation of implication and existential
124 quantification: (EX x | A -> P(x)) <=> (A -> EX x | P(x))
125 which is provable in classical logic ( => is already provable in
126 intuitionnistic logic). *)
128 inline procedural "cic:/Coq/Logic/Berardi/L1.con" as lemma.
130 (*#* The paradoxical set *)
132 inline procedural "cic:/Coq/Logic/Berardi/U.con" as definition.
134 (*#* Bijection between [U] and [(pow U)] *)
136 inline procedural "cic:/Coq/Logic/Berardi/f.con" as definition.
138 inline procedural "cic:/Coq/Logic/Berardi/g.con" as definition.
140 (*#* We deduce that the powerset of [U] is a retract of [U].
141 This lemma is stated in Berardi's article, but is not used
144 inline procedural "cic:/Coq/Logic/Berardi/retract_pow_U_U.con" as lemma.
146 (*#* Encoding of Russel's paradox *)
148 (*#* The boolean negation. *)
150 inline procedural "cic:/Coq/Logic/Berardi/Not_b.con" as definition.
152 (*#* the set of elements not belonging to itself *)
154 inline procedural "cic:/Coq/Logic/Berardi/R.con" as definition.
156 inline procedural "cic:/Coq/Logic/Berardi/not_has_fixpoint.con" as lemma.
158 inline procedural "cic:/Coq/Logic/Berardi/classical_proof_irrelevence.con" as theorem.