Built with Alectryon, running Coq+SerAPI v8.10.0+0.7.0. Coq sources are in this panel; goals and messages will appear in the other. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑ Ctrl+↓ to navigate, Ctrl+🖱️ to focus.
(************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
(* v * INRIA, CNRS and contributors - Copyright 1999-2018 *)
(* <O___,, * (see CREDITS file for the list of authors) *)
(* \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) *)
(************************************************************************)
(************************************************************************)
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 }.forall (A : Type) (P : A -> Prop), (exists ! x : A, P x) -> {x : A | P x}intros; apply constructive_indefinite_description; firstorder. Qed.forall (A : Type) (P : A -> Prop), (exists ! x : A, P x) -> {x : A | P x}forall P : Prop, {P} + {~ P}apply (constructive_definite_descr_excluded_middle constructive_definite_description classic). Qed.forall P : Prop, {P} + {~ P}forall (A : Type) (P : A -> Prop), inhabited A -> {x : A | (exists x0 : A, P x0) -> P x}forall (A : Type) (P : A -> Prop), inhabited A -> {x : A | (exists x0 : A, P x0) -> P x}A:TypeP:A -> Propi:inhabited A{x : A | (exists x0 : A, P x0) -> P x}A:TypeP:A -> Propi:inhabited AHex:exists x : A, P x{x : A | (exists x0 : A, P x0) -> P x}A:TypeP:A -> Propi:inhabited AHnonP:~ (exists x : A, P x){x : A | (exists x0 : A, P x0) -> P x}A:TypeP:A -> Propi:inhabited AHex:exists x : A, P xexists x : A, (exists x0 : A, P x0) -> P xA:TypeP:A -> Propi:inhabited AHnonP:~ (exists x : A, P x){x : A | (exists x0 : A, P x0) -> P x}A:TypeP:A -> Propi:inhabited Ax:AHx:P xexists x0 : A, (exists x1 : A, P x1) -> P x0A:TypeP:A -> Propi:inhabited AHnonP:~ (exists x : A, P x){x : A | (exists x0 : A, P x0) -> P x}A:TypeP:A -> Propi:inhabited AHnonP:~ (exists x : A, P x){x : A | (exists x0 : A, P x0) -> P x}A:TypeP:A -> Propi:inhabited AHnonP:~ (exists x : A, P x){_ : A | True}A:TypeP:A -> Propi:inhabited AHnonP:~ (exists x : A, P x)a:A{x : A | (exists x0 : A, P x0) -> P x}A:TypeP:A -> Propi:inhabited AHnonP:~ (exists x : A, P x)exists _ : A, TrueA:TypeP:A -> Propi:inhabited AHnonP:~ (exists x : A, P x)a:A{x : A | (exists x0 : A, P x0) -> P x}firstorder. Defined.A:TypeP:A -> Propi:inhabited AHnonP:~ (exists x : A, P x)a:A{x : A | (exists x0 : A, P x0) -> 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)
forall (A : Type) (i j : inhabited A) (P : A -> Prop), (exists x : A, P x) -> epsilon i P = epsilon j Pforall (A : Type) (i j : inhabited A) (P : A -> Prop), (exists x : A, P x) -> epsilon i P = epsilon j PA:Typei, j:inhabited AP:A -> PropH:exists x : A, P xepsilon i P = epsilon j Pdestruct (excluded_middle_informative (exists x : A, P x)) as [|[]]; trivial. Qed. Opaque epsilon.A:Typei, j:inhabited AP:A -> PropH:exists x : A, P xproj1_sig match excluded_middle_informative (exists x : A, P x) with | left Hex => constructive_indefinite_description (fun x : A => (exists x0 : A, P x0) -> P x) match Hex with | ex_intro _ x Hx => ex_intro (fun x0 : A => (exists x1 : A, P x1) -> P x0) x (fun _ : exists x0 : A, P x0 => Hx) end | right HnonP => let (a, _) := constructive_indefinite_description (fun _ : A => True) match i with | inhabits a => ex_intro (fun _ : A => True) a I end in exist (fun x : A => (exists x0 : A, P x0) -> P x) a (fun H0 : exists x : A, P x => inhabited_ind (fun _ : A => ex_ind (fun (x : A) (H1 : P x) => False_ind (P a) (HnonP (ex_intro (fun x0 : A => P x0) x H1))) H0) i) end = proj1_sig match excluded_middle_informative (exists x : A, P x) with | left Hex => constructive_indefinite_description (fun x : A => (exists x0 : A, P x0) -> P x) match Hex with | ex_intro _ x Hx => ex_intro (fun x0 : A => (exists x1 : A, P x1) -> P x0) x (fun _ : exists x0 : A, P x0 => Hx) end | right HnonP => let (a, _) := constructive_indefinite_description (fun _ : A => True) match j with | inhabits a => ex_intro (fun _ : A => True) a I end in exist (fun x : A => (exists x0 : A, P x0) -> P x) a (fun H0 : exists x : A, P x => inhabited_ind (fun _ : A => ex_ind (fun (x : A) (H1 : P x) => False_ind (P a) (HnonP (ex_intro (fun x0 : A => P x0) x H1))) H0) j) end
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)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)A, B:TypeR:A -> B -> PropH:forall x : A, exists y : B, R x yexists f : A -> B, forall x : A, R x (f x)A, B:TypeR:A -> B -> PropH:forall x : A, exists y : B, R x yforall x : A, R x (proj1_sig (constructive_indefinite_description (R x) (H x)))apply (proj2_sig (constructive_indefinite_description _ (H x))). Qed.A, B:TypeR:A -> B -> PropH:forall x0 : A, exists y : B, R x0 yx:AR x (proj1_sig (constructive_indefinite_description (R x) (H x)))