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) *)
(************************************************************************)
(* File created for Coq V5.10.14b, Oct 1995 *)
(* Classical tactics for proving disjunctions by Julien Narboux, Jul 2005 *)
(* Inferred proof-irrelevance and eq_rect_eq added by Hugo Herbelin, Mar 2006 *)
Classical Propositional Logic
Require Import ClassicalFacts. Hint Unfold not: core. Axiom classic : forall P:Prop, P \/ ~ P.forall p : Prop, ~ ~ p -> pforall p : Prop, ~ ~ p -> pintro NP; elim (H NP). Qed.p:PropH:(p -> False) -> False~ p -> p
Peirce's law states ∀ P Q:Prop, ((P → Q) → P) → P.
Thanks to ∀ P, False → P, it is equivalent to the
following form
forall P : Prop, ((P -> False) -> P) -> Pintros P H; destruct (classic P); auto. Qed.forall P : Prop, ((P -> False) -> P) -> Pforall P Q : Prop, ~ (P -> Q) -> Pforall P Q : Prop, ~ (P -> Q) -> Pintro; apply H; intro; absurd P; trivial. Qed.P, Q:PropH:~ (P -> Q)~ P -> Falseforall P Q : Prop, ~ (P -> Q) -> ~ Qtauto. Qed.forall P Q : Prop, ~ (P -> Q) -> ~ Qforall P Q : Prop, (P -> Q) -> ~ P \/ Qintros; elim (classic P); auto. Qed.forall P Q : Prop, (P -> Q) -> ~ P \/ Qforall P Q : Prop, ~ (P -> Q) -> P /\ ~ Qforall P Q : Prop, ~ (P -> Q) -> P /\ ~ QP, Q:PropH:~ (P -> Q)PP, Q:PropH:~ (P -> Q)~ Qapply not_imply_elim2 with P; trivial. Qed.P, Q:PropH:~ (P -> Q)~ Qforall P Q : Prop, ~ P \/ Q -> P -> Qtauto. Qed.forall P Q : Prop, ~ P \/ Q -> P -> Qforall P Q : Prop, ~ (P /\ Q) -> ~ P \/ ~ Qintros; elim (classic P); auto. Qed.forall P Q : Prop, ~ (P /\ Q) -> ~ P \/ ~ Qforall P Q : Prop, ~ P \/ ~ Q -> ~ (P /\ Q)simple induction 1; red; simple induction 2; auto. Qed.forall P Q : Prop, ~ P \/ ~ Q -> ~ (P /\ Q)forall P Q : Prop, ~ (P \/ Q) -> ~ P /\ ~ Qtauto. Qed.forall P Q : Prop, ~ (P \/ Q) -> ~ P /\ ~ Qforall P Q : Prop, ~ P /\ ~ Q -> ~ (P \/ Q)tauto. Qed.forall P Q : Prop, ~ P /\ ~ Q -> ~ (P \/ Q)forall P Q : Prop, (P -> Q) -> P \/ Q -> Qtauto. Qed.forall P Q : Prop, (P -> Q) -> P \/ Q -> Qforall P Q R : Prop, (P -> Q) -> P \/ R -> Q \/ Rtauto. Qed.forall P Q R : Prop, (P -> Q) -> P \/ R -> Q \/ RProof proof_irrelevance_cci classic. (* classical_left transforms |- A \/ B into ~B |- A *) (* classical_right transforms |- A \/ B into ~A |- B *) Ltac classical_right := match goal with |- ?X \/ _ => (elim (classic X);intro;[left;trivial|right]) end. Ltac classical_left := match goal with |- _ \/ ?X => (elim (classic X);intro;[right;trivial|left]) end. Require Export EqdepFacts. Module Eq_rect_eq.forall (P : Prop) (p1 p2 : P), p1 = p2forall (U : Type) (p : U) (Q : U -> Type) (x : Q p) (h : p = p), x = eq_rect p Q x p hintros; rewrite proof_irrelevance with (p1:=h) (p2:=eq_refl p); reflexivity. Qed. End Eq_rect_eq. Module EqdepTheory := EqdepTheory(Eq_rect_eq). Export EqdepTheory.forall (U : Type) (p : U) (Q : U -> Type) (x : Q p) (h : p = p), x = eq_rect p Q x p h