src/HOL/Isar_examples/Peirce.thy
author wenzelm
Fri, 08 Oct 1999 15:09:14 +0200
changeset 7800 8ee919e42174
parent 7748 5b9c45b21782
child 7860 7819547df4d8
permissions -rw-r--r--
improved presentation;

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

header {* Examples of classical proof: Peirce's Law *};

theory Peirce = Main:;

theorem "((A --> B) --> A) --> A";
proof;
  assume aba: "(A --> B) --> A";
  show A;
  proof (rule classical);
    assume "~ A";
    have "A --> B";
    proof;
      assume A;
      thus B; by contradiction;
    qed;
    with aba; show A; ..;
  qed;
qed;

theorem "((A --> B) --> A) --> A";
proof;
  assume aba: "(A --> B) --> A";
  show A;
  proof (rule classical);
    presume "A --> B";
    with aba; show A; ..;
  next;
    assume not_a: "~ A";
    show "A --> B";
    proof;
      assume A;
      with not_a; show B; ..;
    qed;
  qed;
qed;

end;