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