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: ClassicalFacts.v,v 1.6.2.1 2004/07/16 19:31:06 herbelin Exp $ i*)
37 (*#* Some facts and definitions about classical logic *)
39 (*#* [prop_degeneracy] (also referred as propositional completeness) *)
41 (* asserts (up to consistency) that there are only two distinct formulas *)
43 inline procedural "cic:/Coq/Logic/ClassicalFacts/prop_degeneracy.con" as definition.
45 (*#* [prop_extensionality] asserts equivalent formulas are equal *)
47 inline procedural "cic:/Coq/Logic/ClassicalFacts/prop_extensionality.con" as definition.
49 (*#* [excluded_middle] asserts we can reason by case on the truth *)
51 (* or falsity of any formula *)
53 inline procedural "cic:/Coq/Logic/ClassicalFacts/excluded_middle.con" as definition.
55 (*#* [proof_irrelevance] asserts equality of all proofs of a given formula *)
57 inline procedural "cic:/Coq/Logic/ClassicalFacts/proof_irrelevance.con" as definition.
59 (*#* We show [prop_degeneracy <-> (prop_extensionality /\ excluded_middle)] *)
61 inline procedural "cic:/Coq/Logic/ClassicalFacts/prop_degen_ext.con" as lemma.
63 inline procedural "cic:/Coq/Logic/ClassicalFacts/prop_degen_em.con" as lemma.
65 inline procedural "cic:/Coq/Logic/ClassicalFacts/prop_ext_em_degen.con" as lemma.
67 (*#* We successively show that:
70 implies equality of [A] and [A->A] for inhabited [A], which
71 implies the existence of a (trivial) retract from [A->A] to [A]
72 (just take the identity), which
73 implies the existence of a fixpoint operator in [A]
74 (e.g. take the Y combinator of lambda-calculus)
77 inline procedural "cic:/Coq/Logic/ClassicalFacts/inhabited.con" as definition.
79 inline procedural "cic:/Coq/Logic/ClassicalFacts/prop_ext_A_eq_A_imp_A.con" as lemma.
81 inline procedural "cic:/Coq/Logic/ClassicalFacts/retract.ind".
83 inline procedural "cic:/Coq/Logic/ClassicalFacts/prop_ext_retract_A_A_imp_A.con" as lemma.
85 inline procedural "cic:/Coq/Logic/ClassicalFacts/has_fixpoint.ind".
87 inline procedural "cic:/Coq/Logic/ClassicalFacts/ext_prop_fixpoint.con" as lemma.
89 (*#* Assume we have booleans with the property that there is at most 2
90 booleans (which is equivalent to dependent case analysis). Consider
91 the fixpoint of the negation function: it is either true or false by
92 dependent case analysis, but also the opposite by fixpoint. Hence
95 We then map bool proof-irrelevance to all propositions.
99 Section Proof_irrelevance_gen
103 cic:/Coq/Logic/ClassicalFacts/Proof_irrelevance_gen/bool.var
107 cic:/Coq/Logic/ClassicalFacts/Proof_irrelevance_gen/true.var
111 cic:/Coq/Logic/ClassicalFacts/Proof_irrelevance_gen/false.var
115 cic:/Coq/Logic/ClassicalFacts/Proof_irrelevance_gen/bool_elim.var
119 cic:/Coq/Logic/ClassicalFacts/Proof_irrelevance_gen/bool_elim_redl.var
123 cic:/Coq/Logic/ClassicalFacts/Proof_irrelevance_gen/bool_elim_redr.var
126 (* UNAVAILABLE OBJECT: cic:/Coq/Logic/ClassicalFacts/Proof_irrelevance_gen/bool_dep_induction.con *)
128 inline procedural "cic:/Coq/Logic/ClassicalFacts/Proof_irrelevance_gen/bool_dep_induction.con" "Proof_irrelevance_gen__" as definition.
130 inline procedural "cic:/Coq/Logic/ClassicalFacts/aux.con" as lemma.
132 inline procedural "cic:/Coq/Logic/ClassicalFacts/ext_prop_dep_proof_irrel_gen.con" as lemma.
135 End Proof_irrelevance_gen
138 (*#* In the pure Calculus of Constructions, we can define the boolean
139 proposition bool = (C:Prop)C->C->C but we cannot prove that it has at
144 Section Proof_irrelevance_CC
147 inline procedural "cic:/Coq/Logic/ClassicalFacts/BoolP.con" as definition.
149 inline procedural "cic:/Coq/Logic/ClassicalFacts/TrueP.con" as definition.
151 inline procedural "cic:/Coq/Logic/ClassicalFacts/FalseP.con" as definition.
153 inline procedural "cic:/Coq/Logic/ClassicalFacts/BoolP_elim.con" as definition.
155 inline procedural "cic:/Coq/Logic/ClassicalFacts/BoolP_elim_redl.con" as definition.
157 inline procedural "cic:/Coq/Logic/ClassicalFacts/BoolP_elim_redr.con" as definition.
159 inline procedural "cic:/Coq/Logic/ClassicalFacts/BoolP_dep_induction.con" as definition.
161 inline procedural "cic:/Coq/Logic/ClassicalFacts/ext_prop_dep_proof_irrel_cc.con" as lemma.
164 End Proof_irrelevance_CC
167 (*#* In the Calculus of Inductive Constructions, inductively defined booleans
168 enjoy dependent case analysis, hence directly proof-irrelevance from
169 propositional extensionality.
173 Section Proof_irrelevance_CIC
176 inline procedural "cic:/Coq/Logic/ClassicalFacts/boolP.ind".
178 inline procedural "cic:/Coq/Logic/ClassicalFacts/boolP_elim_redl.con" as definition.
180 inline procedural "cic:/Coq/Logic/ClassicalFacts/boolP_elim_redr.con" as definition.
182 inline procedural "cic:/Coq/Logic/ClassicalFacts/boolP_indd.con" as theorem.
184 inline procedural "cic:/Coq/Logic/ClassicalFacts/ext_prop_dep_proof_irrel_cic.con" as lemma.
187 End Proof_irrelevance_CIC
190 (*#* Can we state proof irrelevance from propositional degeneracy
191 (i.e. propositional extensionality + excluded middle) without
192 dependent case analysis ?
194 Conjecture: it seems possible to build a model of CC interpreting
195 all non-empty types by the set of all lambda-terms. Such a model would
196 satisfy propositional degeneracy without satisfying proof-irrelevance
197 (nor dependent case analysis). This would imply that the previous
198 results cannot be refined.