src/HOL/Isar_examples/Peirce.thy
author paulson
Thu, 26 Aug 1999 11:34:17 +0200
changeset 7360 7d3136b9af08
parent 7153 820c8c8573d9
child 7448 3ee96dccdd39
permissions -rw-r--r--
more Join rules including AC-rules

(*  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;
      show B; by contradiction;
    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;