Library Coq.Logic.ClassicalEpsilon


This file provides classical logic and indefinite description under the form of Hilbert's epsilon operator
Hilbert's epsilon operator and classical logic implies excluded-middle in Set and leads to a classical world populated with non computable functions. It conflicts with the impredicativity of Set

Require Export Classical.
Require Import ChoiceFacts.

Set Implicit Arguments.

Axiom constructive_indefinite_description :
  forall (A : Type) (P : A->Prop),
    (exists x, P x) -> { x : A | P x }.

Lemma constructive_definite_description :
  forall (A : Type) (P : A->Prop),
    (exists! x, P x) -> { x : A | P x }.

Theorem excluded_middle_informative : forall P:Prop, {P} + {~ P}.

Theorem classical_indefinite_description :
  forall (A : Type) (P : A->Prop), inhabited A ->
    { x : A | (exists x, P x) -> P x }.

Hilbert's epsilon operator

Definition epsilon (A : Type) (i:inhabited A) (P : A->Prop) : A
  := proj1_sig (classical_indefinite_description P i).

Definition epsilon_spec (A : Type) (i:inhabited A) (P : A->Prop) :
  (exists x, P x) -> P (epsilon i P)
  := proj2_sig (classical_indefinite_description P i).

Open question: is classical_indefinite_description constructively provable from relational_choice and constructive_definite_description (at least, using the fact that functional_choice is provable from relational_choice and unique_choice, we know that the double negation of classical_indefinite_description is provable (see relative_non_contradiction_of_indefinite_desc).
A proof that if P is inhabited, epsilon a P does not depend on the actual proof that the domain of P is inhabited (proof idea kindly provided by Pierre Castéran)

Lemma epsilon_inh_irrelevance :
   forall (A:Type) (i j : inhabited A) (P:A->Prop),
   (exists x, P x) -> epsilon i P = epsilon j P.

Opaque epsilon.

Weaker lemmas (compatibility lemmas)


Theorem choice :
  forall (A B : Type) (R : A->B->Prop),
    (forall x : A, exists y : B, R x y) ->
    (exists f : A->B, forall x : A, R x (f x)).