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