(* -*- coding: utf-8 -*- *)
(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
(** Diaconescu showed that the Axiom of Choice entails Excluded-Middle in topoi [[Diaconescu75]]. Lacas and Werner adapted the proof to show that the axiom of choice in equivalence classes entails Excluded-Middle in Type Theory [[LacasWerner99]].  Three variants of Diaconescu's result in type theory are shown below.  A. A proof that the relational form of the Axiom of Choice + Extensionality for Predicates entails Excluded-Middle (by Hugo Herbelin)  B. A proof that the relational form of the Axiom of Choice + Proof Irrelevance entails Excluded-Middle for Equality Statements (by Benjamin Werner)  C. A proof that extensional Hilbert epsilon's description operator entails excluded-middle (taken from Bell [[Bell93]])  See also [[Carlström04]] for a discussion of the connection between the Extensional Axiom of Choice and Excluded-Middle  [[Diaconescu75]] Radu Diaconescu, Axiom of Choice and Complementation, in Proceedings of AMS, vol 51, pp 176-178, 1975.  [[LacasWerner99]] Samuel Lacas, Benjamin Werner, Which Choices imply the excluded middle?, preprint, 1999.  [[Bell93]] John L. Bell, Hilbert's epsilon operator and classical logic, Journal of Philosophical Logic, 22: 1-18, 1993  [[Carlström04]] Jesper Carlström, EM + Ext_ + AC_int is equivalent to AC_ext, Mathematical Logic Quaterly, vol 50(3), pp 236-240, 2004. *)
Require ClassicalFacts ChoiceFacts.
(**********************************************************************)
(** * Pred. Ext. + Rel. Axiom of Choice -> Excluded-Middle       *)
Section PredExt_RelChoice_imp_EM.
(** The axiom of extensionality for predicates *)
Definition PredicateExtensionality :=
forall P Q:bool -> Prop, (forall b:bool, P b <-> Q b) -> P = Q.
(** From predicate extensionality we get propositional extensionality hence proof-irrelevance *)
Variable pred_extensionality : PredicateExtensionality.

Lemma proof_irrel : forall (A:Prop) (a1 a2:A), a1 = a2.
Variable rel_choice : RelationalChoice.