src/HOL/Isar_examples/Peirce.thy
author wenzelm
Fri, 28 May 1999 13:30:59 +0200
changeset 6746 cf6ad8d22793
parent 6493 3489490c948d
child 6854 60a5ee0ca81d
permissions -rw-r--r--
tuned formal comments;

(*  Title:      HOL/Isar_examples/Peirce.thy
    ID:         $Id$
    Author:     Markus Wenzel, TU Muenchen
*)

theory Peirce = Main:;

text {* Peirce's law: examples of classical proof. *};

theorem "((A --> B) --> A) --> A";
proof;
  assume ABA: "(A --> B) --> A";
  show A;
  proof (rule classical);
    assume notA: "~ A";

    have AB: "A --> B";
    proof;
      assume A: A;
      from notA A; show B; ..;
    qed;

    from ABA AB; show A; ..;
  qed;
qed;


theorem "((A --> B) --> A) --> A";
proof;
  assume ABA: "(A --> B) --> A";
  show A;
  proof (rule classical);

    assume AB: "A --> B";
    from ABA AB; show A; ..;

    next;
    assume notA: "~ A";
    show "A --> B";
    proof;
      assume A: A;
      from notA A; show B; ..;
    qed;
  qed;
qed;


end;