src/FOL/ex/Propositional_Int.thy
author wenzelm
Sun Nov 02 18:21:45 2014 +0100 (2014-11-02)
changeset 58889 5b7a9633cfa8
parent 51798 ad3a241def73
child 60770 240563fbf41d
permissions -rw-r--r--
modernized header uniformly as section;
     1 (*  Title:      FOL/ex/Propositional_Int.thy
     2     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
     3     Copyright   1991  University of Cambridge
     4 *)
     5 
     6 section {* First-Order Logic: propositional examples (intuitionistic version) *}
     7 
     8 theory Propositional_Int
     9 imports IFOL
    10 begin
    11 
    12 text {* commutative laws of @{text "&"} and @{text "|"} *}
    13 
    14 lemma "P & Q  -->  Q & P"
    15   by (tactic "IntPr.fast_tac @{context} 1")
    16 
    17 lemma "P | Q  -->  Q | P"
    18   by (tactic "IntPr.fast_tac @{context} 1")
    19 
    20 
    21 text {* associative laws of @{text "&"} and @{text "|"} *}
    22 lemma "(P & Q) & R  -->  P & (Q & R)"
    23   by (tactic "IntPr.fast_tac @{context} 1")
    24 
    25 lemma "(P | Q) | R  -->  P | (Q | R)"
    26   by (tactic "IntPr.fast_tac @{context} 1")
    27 
    28 
    29 text {* distributive laws of @{text "&"} and @{text "|"} *}
    30 lemma "(P & Q) | R  --> (P | R) & (Q | R)"
    31   by (tactic "IntPr.fast_tac @{context} 1")
    32 
    33 lemma "(P | R) & (Q | R)  --> (P & Q) | R"
    34   by (tactic "IntPr.fast_tac @{context} 1")
    35 
    36 lemma "(P | Q) & R  --> (P & R) | (Q & R)"
    37   by (tactic "IntPr.fast_tac @{context} 1")
    38 
    39 lemma "(P & R) | (Q & R)  --> (P | Q) & R"
    40   by (tactic "IntPr.fast_tac @{context} 1")
    41 
    42 
    43 text {* Laws involving implication *}
    44 
    45 lemma "(P-->R) & (Q-->R) <-> (P|Q --> R)"
    46   by (tactic "IntPr.fast_tac @{context} 1")
    47 
    48 lemma "(P & Q --> R) <-> (P--> (Q-->R))"
    49   by (tactic "IntPr.fast_tac @{context} 1")
    50 
    51 lemma "((P-->R)-->R) --> ((Q-->R)-->R) --> (P&Q-->R) --> R"
    52   by (tactic "IntPr.fast_tac @{context} 1")
    53 
    54 lemma "~(P-->R) --> ~(Q-->R) --> ~(P&Q-->R)"
    55   by (tactic "IntPr.fast_tac @{context} 1")
    56 
    57 lemma "(P --> Q & R) <-> (P-->Q)  &  (P-->R)"
    58   by (tactic "IntPr.fast_tac @{context} 1")
    59 
    60 
    61 text {* Propositions-as-types *}
    62 
    63 -- {* The combinator K *}
    64 lemma "P --> (Q --> P)"
    65   by (tactic "IntPr.fast_tac @{context} 1")
    66 
    67 -- {* The combinator S *}
    68 lemma "(P-->Q-->R)  --> (P-->Q) --> (P-->R)"
    69   by (tactic "IntPr.fast_tac @{context} 1")
    70 
    71 
    72 -- {* Converse is classical *}
    73 lemma "(P-->Q) | (P-->R)  -->  (P --> Q | R)"
    74   by (tactic "IntPr.fast_tac @{context} 1")
    75 
    76 lemma "(P-->Q)  -->  (~Q --> ~P)"
    77   by (tactic "IntPr.fast_tac @{context} 1")
    78 
    79 
    80 text {* Schwichtenberg's examples (via T. Nipkow) *}
    81 
    82 lemma stab_imp: "(((Q-->R)-->R)-->Q) --> (((P-->Q)-->R)-->R)-->P-->Q"
    83   by (tactic "IntPr.fast_tac @{context} 1")
    84 
    85 lemma stab_to_peirce:
    86   "(((P --> R) --> R) --> P) --> (((Q --> R) --> R) --> Q)  
    87                               --> ((P --> Q) --> P) --> P"
    88   by (tactic "IntPr.fast_tac @{context} 1")
    89 
    90 lemma peirce_imp1: "(((Q --> R) --> Q) --> Q)  
    91                 --> (((P --> Q) --> R) --> P --> Q) --> P --> Q"
    92   by (tactic "IntPr.fast_tac @{context} 1")
    93   
    94 lemma peirce_imp2: "(((P --> R) --> P) --> P) --> ((P --> Q --> R) --> P) --> P"
    95   by (tactic "IntPr.fast_tac @{context} 1")
    96 
    97 lemma mints: "((((P --> Q) --> P) --> P) --> Q) --> Q"
    98   by (tactic "IntPr.fast_tac @{context} 1")
    99 
   100 lemma mints_solovev: "(P --> (Q --> R) --> Q) --> ((P --> Q) --> R) --> R"
   101   by (tactic "IntPr.fast_tac @{context} 1")
   102 
   103 lemma tatsuta: "(((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 @{context} 1")
   109 
   110 lemma tatsuta1: "(((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 @{context} 1")
   116 
   117 end