src/FOL/IFOL.thy
author wenzelm
Wed Aug 25 20:45:19 1999 +0200 (1999-08-25)
changeset 7355 4c43090659ca
parent 6340 7d5cbd5819a0
child 9526 e20323caff47
permissions -rw-r--r--
proper bootstrap of IFOL/FOL theories and packages;
clasohm@1268
     1
(*  Title:      FOL/IFOL.thy
lcp@35
     2
    ID:         $Id$
wenzelm@79
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
lcp@35
     4
    Copyright   1993  University of Cambridge
lcp@35
     5
wenzelm@2205
     6
Intuitionistic first-order logic.
lcp@35
     7
*)
lcp@35
     8
wenzelm@7355
     9
theory IFOL = Pure
wenzelm@7355
    10
files ("IFOL_lemmas.ML") ("fologic.ML") ("hypsubstdata.ML") ("intprover.ML"):
wenzelm@7355
    11
clasohm@0
    12
wenzelm@3906
    13
global
wenzelm@3906
    14
wenzelm@7355
    15
classes "term" < logic
wenzelm@7355
    16
defaultsort "term"
clasohm@0
    17
wenzelm@7355
    18
typedecl o
wenzelm@79
    19
wenzelm@79
    20
consts
clasohm@0
    21
wenzelm@7355
    22
  Trueprop      :: "o => prop"                  ("(_)" 5)
wenzelm@7355
    23
  True          :: o
wenzelm@7355
    24
  False         :: o
wenzelm@79
    25
wenzelm@79
    26
  (* Connectives *)
wenzelm@79
    27
wenzelm@7355
    28
  "="           :: "['a, 'a] => o"              (infixl 50)
lcp@35
    29
wenzelm@7355
    30
  Not           :: "o => o"                     ("~ _" [40] 40)
wenzelm@7355
    31
  &             :: "[o, o] => o"                (infixr 35)
wenzelm@7355
    32
  "|"           :: "[o, o] => o"                (infixr 30)
wenzelm@7355
    33
  -->           :: "[o, o] => o"                (infixr 25)
wenzelm@7355
    34
  <->           :: "[o, o] => o"                (infixr 25)
wenzelm@79
    35
wenzelm@79
    36
  (* Quantifiers *)
wenzelm@79
    37
wenzelm@7355
    38
  All           :: "('a => o) => o"             (binder "ALL " 10)
wenzelm@7355
    39
  Ex            :: "('a => o) => o"             (binder "EX " 10)
wenzelm@7355
    40
  Ex1           :: "('a => o) => o"             (binder "EX! " 10)
wenzelm@79
    41
clasohm@0
    42
wenzelm@2257
    43
lcp@928
    44
syntax
wenzelm@7355
    45
  "~="          :: "['a, 'a] => o"              (infixl 50)
lcp@928
    46
lcp@35
    47
translations
wenzelm@79
    48
  "x ~= y"      == "~ (x = y)"
wenzelm@79
    49
wenzelm@2257
    50
syntax (symbols)
wenzelm@7355
    51
  Not           :: "o => o"                     ("\\<not> _" [40] 40)
wenzelm@7355
    52
  "op &"        :: "[o, o] => o"                (infixr "\\<and>" 35)
wenzelm@7355
    53
  "op |"        :: "[o, o] => o"                (infixr "\\<or>" 30)
wenzelm@7355
    54
  "op -->"      :: "[o, o] => o"                (infixr "\\<midarrow>\\<rightarrow>" 25)
wenzelm@7355
    55
  "op <->"      :: "[o, o] => o"                (infixr "\\<leftarrow>\\<rightarrow>" 25)
wenzelm@7355
    56
  "ALL "        :: "[idts, o] => o"             ("(3\\<forall>_./ _)" [0, 10] 10)
wenzelm@7355
    57
  "EX "         :: "[idts, o] => o"             ("(3\\<exists>_./ _)" [0, 10] 10)
wenzelm@7355
    58
  "EX! "        :: "[idts, o] => o"             ("(3\\<exists>!_./ _)" [0, 10] 10)
wenzelm@7355
    59
  "op ~="       :: "['a, 'a] => o"              (infixl "\\<noteq>" 50)
wenzelm@2205
    60
oheimb@6027
    61
syntax (xsymbols)
wenzelm@7355
    62
  "op -->"      :: "[o, o] => o"                (infixr "\\<longrightarrow>" 25)
wenzelm@7355
    63
  "op <->"      :: "[o, o] => o"                (infixr "\\<longleftrightarrow>" 25)
lcp@35
    64
wenzelm@6340
    65
syntax (HTML output)
wenzelm@7355
    66
  Not           :: "o => o"                     ("\\<not> _" [40] 40)
wenzelm@6340
    67
wenzelm@6340
    68
wenzelm@3932
    69
local
wenzelm@3906
    70
wenzelm@7355
    71
axioms
clasohm@0
    72
wenzelm@79
    73
  (* Equality *)
clasohm@0
    74
wenzelm@7355
    75
  refl:         "a=a"
wenzelm@7355
    76
  subst:        "[| a=b;  P(a) |] ==> P(b)"
clasohm@0
    77
wenzelm@79
    78
  (* Propositional logic *)
clasohm@0
    79
wenzelm@7355
    80
  conjI:        "[| P;  Q |] ==> P&Q"
wenzelm@7355
    81
  conjunct1:    "P&Q ==> P"
wenzelm@7355
    82
  conjunct2:    "P&Q ==> Q"
clasohm@0
    83
wenzelm@7355
    84
  disjI1:       "P ==> P|Q"
wenzelm@7355
    85
  disjI2:       "Q ==> P|Q"
wenzelm@7355
    86
  disjE:        "[| P|Q;  P ==> R;  Q ==> R |] ==> R"
clasohm@0
    87
wenzelm@7355
    88
  impI:         "(P ==> Q) ==> P-->Q"
wenzelm@7355
    89
  mp:           "[| P-->Q;  P |] ==> Q"
clasohm@0
    90
wenzelm@7355
    91
  FalseE:       "False ==> P"
wenzelm@7355
    92
clasohm@0
    93
wenzelm@79
    94
  (* Definitions *)
clasohm@0
    95
wenzelm@7355
    96
  True_def:     "True  == False-->False"
wenzelm@7355
    97
  not_def:      "~P    == P-->False"
wenzelm@7355
    98
  iff_def:      "P<->Q == (P-->Q) & (Q-->P)"
wenzelm@79
    99
wenzelm@79
   100
  (* Unique existence *)
clasohm@0
   101
wenzelm@7355
   102
  ex1_def:      "EX! x. P(x) == EX x. P(x) & (ALL y. P(y) --> y=x)"
wenzelm@7355
   103
clasohm@0
   104
wenzelm@79
   105
  (* Quantifiers *)
clasohm@0
   106
wenzelm@7355
   107
  allI:         "(!!x. P(x)) ==> (ALL x. P(x))"
wenzelm@7355
   108
  spec:         "(ALL x. P(x)) ==> P(x)"
clasohm@0
   109
wenzelm@7355
   110
  exI:          "P(x) ==> (EX x. P(x))"
wenzelm@7355
   111
  exE:          "[| EX x. P(x);  !!x. P(x) ==> R |] ==> R"
clasohm@0
   112
clasohm@0
   113
  (* Reflection *)
clasohm@0
   114
wenzelm@7355
   115
  eq_reflection:  "(x=y)   ==> (x==y)"
wenzelm@7355
   116
  iff_reflection: "(P<->Q) ==> (P==Q)"
clasohm@0
   117
wenzelm@4092
   118
wenzelm@7355
   119
			setup Simplifier.setup
wenzelm@7355
   120
use "IFOL_lemmas.ML"	setup attrib_setup
wenzelm@7355
   121
use "fologic.ML"
wenzelm@7355
   122
use "hypsubstdata.ML"
wenzelm@7355
   123
use "intprover.ML"
wenzelm@7355
   124
wenzelm@4092
   125
wenzelm@4854
   126
end