src/FOLP/ex/Propositional_Cla.thy
author wenzelm
Sat Jul 25 10:31:27 2009 +0200 (2009-07-25)
changeset 32187 cca43ca13f4f
parent 26408 6964c4799f47
child 35762 af3ff2ba4c54
permissions -rw-r--r--
renamed structure Display_Goal to Goal_Display;
wenzelm@26408
     1
(*  Title:      FOLP/ex/Propositional_Cla.thy
wenzelm@26408
     2
    ID:         $Id$
wenzelm@26408
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
wenzelm@26408
     4
    Copyright   1991  University of Cambridge
wenzelm@26408
     5
*)
wenzelm@26408
     6
wenzelm@26408
     7
header {* First-Order Logic: propositional examples *}
wenzelm@26408
     8
wenzelm@26408
     9
theory Propositional_Cla
wenzelm@26408
    10
imports FOLP
wenzelm@26408
    11
begin
wenzelm@26408
    12
wenzelm@26408
    13
wenzelm@26408
    14
text "commutative laws of & and | "
wenzelm@26408
    15
lemma "?p : P & Q  -->  Q & P"
wenzelm@26408
    16
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    17
wenzelm@26408
    18
lemma "?p : P | Q  -->  Q | P"
wenzelm@26408
    19
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    20
wenzelm@26408
    21
wenzelm@26408
    22
text "associative laws of & and | "
wenzelm@26408
    23
lemma "?p : (P & Q) & R  -->  P & (Q & R)"
wenzelm@26408
    24
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    25
wenzelm@26408
    26
lemma "?p : (P | Q) | R  -->  P | (Q | R)"
wenzelm@26408
    27
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    28
wenzelm@26408
    29
wenzelm@26408
    30
text "distributive laws of & and | "
wenzelm@26408
    31
lemma "?p : (P & Q) | R  --> (P | R) & (Q | R)"
wenzelm@26408
    32
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    33
wenzelm@26408
    34
lemma "?p : (P | R) & (Q | R)  --> (P & Q) | R"
wenzelm@26408
    35
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    36
wenzelm@26408
    37
lemma "?p : (P | Q) & R  --> (P & R) | (Q & R)"
wenzelm@26408
    38
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    39
wenzelm@26408
    40
wenzelm@26408
    41
lemma "?p : (P & R) | (Q & R)  --> (P | Q) & R"
wenzelm@26408
    42
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    43
wenzelm@26408
    44
wenzelm@26408
    45
text "Laws involving implication"
wenzelm@26408
    46
wenzelm@26408
    47
lemma "?p : (P-->R) & (Q-->R) <-> (P|Q --> R)"
wenzelm@26408
    48
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    49
wenzelm@26408
    50
lemma "?p : (P & Q --> R) <-> (P--> (Q-->R))"
wenzelm@26408
    51
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    52
wenzelm@26408
    53
lemma "?p : ((P-->R)-->R) --> ((Q-->R)-->R) --> (P&Q-->R) --> R"
wenzelm@26408
    54
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    55
wenzelm@26408
    56
lemma "?p : ~(P-->R) --> ~(Q-->R) --> ~(P&Q-->R)"
wenzelm@26408
    57
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    58
wenzelm@26408
    59
lemma "?p : (P --> Q & R) <-> (P-->Q)  &  (P-->R)"
wenzelm@26408
    60
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    61
wenzelm@26408
    62
wenzelm@26408
    63
text "Propositions-as-types"
wenzelm@26408
    64
wenzelm@26408
    65
(*The combinator K*)
wenzelm@26408
    66
lemma "?p : P --> (Q --> P)"
wenzelm@26408
    67
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    68
wenzelm@26408
    69
(*The combinator S*)
wenzelm@26408
    70
lemma "?p : (P-->Q-->R)  --> (P-->Q) --> (P-->R)"
wenzelm@26408
    71
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    72
wenzelm@26408
    73
wenzelm@26408
    74
(*Converse is classical*)
wenzelm@26408
    75
lemma "?p : (P-->Q) | (P-->R)  -->  (P --> Q | R)"
wenzelm@26408
    76
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    77
wenzelm@26408
    78
lemma "?p : (P-->Q)  -->  (~Q --> ~P)"
wenzelm@26408
    79
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    80
wenzelm@26408
    81
wenzelm@26408
    82
text "Schwichtenberg's examples (via T. Nipkow)"
wenzelm@26408
    83
wenzelm@26408
    84
lemma stab_imp: "?p : (((Q-->R)-->R)-->Q) --> (((P-->Q)-->R)-->R)-->P-->Q"
wenzelm@26408
    85
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    86
wenzelm@26408
    87
lemma stab_to_peirce: "?p : (((P --> R) --> R) --> P) --> (((Q --> R) --> R) --> Q)  
wenzelm@26408
    88
              --> ((P --> Q) --> P) --> P"
wenzelm@26408
    89
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    90
wenzelm@26408
    91
lemma peirce_imp1: "?p : (((Q --> R) --> Q) --> Q)  
wenzelm@26408
    92
               --> (((P --> Q) --> R) --> P --> Q) --> P --> Q"
wenzelm@26408
    93
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    94
  
wenzelm@26408
    95
lemma peirce_imp2: "?p : (((P --> R) --> P) --> P) --> ((P --> Q --> R) --> P) --> P"
wenzelm@26408
    96
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
    97
wenzelm@26408
    98
lemma mints: "?p : ((((P --> Q) --> P) --> P) --> Q) --> Q"
wenzelm@26408
    99
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
   100
wenzelm@26408
   101
lemma mints_solovev: "?p : (P --> (Q --> R) --> Q) --> ((P --> Q) --> R) --> R"
wenzelm@26408
   102
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
   103
wenzelm@26408
   104
lemma tatsuta: "?p : (((P7 --> P1) --> P10) --> P4 --> P5)  
wenzelm@26408
   105
          --> (((P8 --> P2) --> P9) --> P3 --> P10)  
wenzelm@26408
   106
          --> (P1 --> P8) --> P6 --> P7  
wenzelm@26408
   107
          --> (((P3 --> P2) --> P9) --> P4)  
wenzelm@26408
   108
          --> (P1 --> P3) --> (((P6 --> P1) --> P2) --> P9) --> P5"
wenzelm@26408
   109
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
   110
wenzelm@26408
   111
lemma tatsuta1: "?p : (((P8 --> P2) --> P9) --> P3 --> P10)  
wenzelm@26408
   112
     --> (((P3 --> P2) --> P9) --> P4)  
wenzelm@26408
   113
     --> (((P6 --> P1) --> P2) --> P9)  
wenzelm@26408
   114
     --> (((P7 --> P1) --> P10) --> P4 --> P5)  
wenzelm@26408
   115
     --> (P1 --> P3) --> (P1 --> P8) --> P6 --> P7 --> P5"
wenzelm@26408
   116
  by (tactic {* Cla.fast_tac FOLP_cs 1 *})
wenzelm@26408
   117
wenzelm@26408
   118
end