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