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 definite description, which is
equivalent to providing classical logic and Church's iota operator
Classical logic and definite descriptions implies excluded-middle
in Set and leads to a classical world populated with non
computable functions. It conflicts with the impredicativity of
Set
Set Implicit Arguments. Require Export Classical. (* Axiomatize classical reasoning *) Require Export Description. (* Axiomatize constructive form of Church's iota *) Require Import ChoiceFacts. Notation inhabited A := A (only parsing).
The idea for the following proof comes from ChicliPottierSimpson02
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), A -> {x : A | (exists ! x0 : A, P x0) -> P x}forall (A : Type) (P : A -> Prop), A -> {x : A | (exists ! x0 : A, P x0) -> P x}A:TypeP:A -> Propi:A{x : A | (exists ! x0 : A, P x0) -> P x}A:TypeP:A -> Propi:AHex:exists ! x : A, P x{x : A | (exists ! x0 : A, P x0) -> P x}A:TypeP:A -> Propi:AHnonP:~ (exists ! x : A, P x){x : A | (exists ! x0 : A, P x0) -> P x}A:TypeP:A -> Propi:AHex:exists ! x : A, P xexists ! x : A, (exists ! x0 : A, P x0) -> P xA:TypeP:A -> Propi:AHnonP:~ (exists ! x : A, P x){x : A | (exists ! x0 : A, P x0) -> P x}A:TypeP:A -> Propi, x:AHx:P xHuni:forall x' : A, P x' -> x = x'exists ! x0 : A, (exists ! x1 : A, P x1) -> P x0A:TypeP:A -> Propi:AHnonP:~ (exists ! x : A, P x){x : A | (exists ! x0 : A, P x0) -> P x}A:TypeP:A -> Propi, x:AHx:P xHuni:forall x' : A, P x' -> x = x'(exists ! x0 : A, P x0) -> P xA:TypeP:A -> Propi, x:AHx:P xHuni:forall x' : A, P x' -> x = x'forall x' : A, ((exists ! x0 : A, P x0) -> P x') -> x = x'A:TypeP:A -> Propi:AHnonP:~ (exists ! x : A, P x){x : A | (exists ! x0 : A, P x0) -> P x}A:TypeP:A -> Propi, x:AHx:P xHuni:forall x' : A, P x' -> x = x'forall x' : A, ((exists ! x0 : A, P x0) -> P x') -> x = x'A:TypeP:A -> Propi:AHnonP:~ (exists ! x : A, P x){x : A | (exists ! x0 : A, P x0) -> P x}exists i; tauto. Qed.A:TypeP:A -> Propi:AHnonP:~ (exists ! x : A, P x){x : A | (exists ! x0 : A, P x0) -> P x}
Church's iota operator
Definition iota (A : Type) (i:inhabited A) (P : A->Prop) : A := proj1_sig (classical_definite_description P i). Definition iota_spec (A : Type) (i:inhabited A) (P : A->Prop) : (exists! x:A, P x) -> P (iota i P) := proj2_sig (classical_definite_description P i).
Axiom of unique "choice" (functional reification of functional relations)
forall (A : Type) (B : A -> Type) (R : forall x : A, B x -> Prop), (forall x : A, exists ! y : B x, R x y) -> exists f : forall x : A, B x, forall x : A, R x (f x)forall (A : Type) (B : A -> Type) (R : forall x : A, B x -> Prop), (forall x : A, exists ! y : B x, R x y) -> exists f : forall x : A, B x, forall x : A, R x (f x)A:TypeB:A -> TypeR:forall x : A, B x -> PropH:forall x : A, exists ! y : B x, R x yexists f : forall x : A, B x, forall x : A, R x (f x)A:TypeB:A -> TypeR:forall x : A, B x -> PropH:forall x : A, exists ! y : B x, R x yforall x : A, exists ! y : B x, R x yA:TypeB:A -> TypeR:forall x : A, B x -> PropH, Hexuni:forall x : A, exists ! y : B x, R x yexists f : forall x : A, B x, forall x : A, R x (f x)A:TypeB:A -> TypeR:forall x0 : A, B x0 -> PropH:forall x0 : A, exists ! y : B x0, R x0 yx:Aexists ! y : B x, R x yA:TypeB:A -> TypeR:forall x : A, B x -> PropH, Hexuni:forall x : A, exists ! y : B x, R x yexists f : forall x : A, B x, forall x : A, R x (f x)A:TypeB:A -> TypeR:forall x : A, B x -> PropH, Hexuni:forall x : A, exists ! y : B x, R x yexists f : forall x : A, B x, forall x : A, R x (f x)A:TypeB:A -> TypeR:forall x : A, B x -> PropH, Hexuni:forall x : A, exists ! y : B x, R x yforall x : A, R x (proj1_sig (constructive_definite_description (R x) (Hexuni x)))apply (proj2_sig (constructive_definite_description (R x) (Hexuni x))). Qed.A:TypeB:A -> TypeR:forall x0 : A, B x0 -> PropH, Hexuni:forall x0 : A, exists ! y : B x0, R x0 yx:AR x (proj1_sig (constructive_definite_description (R x) (Hexuni 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)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)apply dependent_unique_choice with (B:=fun _:A => B). Qed.A, B:Typeforall R : A -> B -> Prop, (forall x : A, exists ! y : B, R x y) -> exists f : A -> B, forall x : A, R x (f x)
Compatibility lemmas
Unset Implicit Arguments. Definition dependent_description := dependent_unique_choice. Definition description := unique_choice.