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