src/HOL/Isar_examples/Peirce.thy
author wenzelm
Sat, 03 Jul 1999 00:26:00 +0200
changeset 6892 4a905b4a39c8
parent 6854 60a5ee0ca81d
child 7153 820c8c8573d9
permissions -rw-r--r--
tuned;

(*  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 not_a: "~ A";

    have ab: "A --> B";
    proof;
      assume a: A;
      from not_a 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);
    presume ab: "A --> B";
    from aba ab; show A; ..;
  next;
    assume not_a: "~ A";
    show "A --> B";
    proof;
      assume a: A;
      from not_a a; show B; ..;
    qed;
  qed;
qed;


end;