src/FOL/IFOL.thy
author wenzelm
Fri Oct 10 15:52:12 1997 +0200 (1997-10-10)
changeset 3835 9a5a4e123859
parent 2367 eba760ebe315
child 3906 5ae0e1324c56
permissions -rw-r--r--
fixed dots;
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@79
     9
IFOL = Pure +
clasohm@0
    10
wenzelm@79
    11
classes
wenzelm@79
    12
  term < logic
wenzelm@79
    13
wenzelm@79
    14
default
wenzelm@79
    15
  term
clasohm@0
    16
wenzelm@79
    17
types
clasohm@278
    18
  o
clasohm@0
    19
wenzelm@79
    20
arities
wenzelm@79
    21
  o :: logic
clasohm@0
    22
wenzelm@79
    23
wenzelm@79
    24
consts
clasohm@0
    25
clasohm@1322
    26
  Trueprop      :: o => prop                    ("(_)" 5)
clasohm@1322
    27
  True, False   :: o
wenzelm@79
    28
wenzelm@79
    29
  (* Connectives *)
wenzelm@79
    30
clasohm@1322
    31
  "="           :: ['a, 'a] => o                (infixl 50)
lcp@35
    32
clasohm@1322
    33
  Not           :: o => o                       ("~ _" [40] 40)
clasohm@1322
    34
  "&"           :: [o, o] => o                  (infixr 35)
clasohm@1322
    35
  "|"           :: [o, o] => o                  (infixr 30)
clasohm@1322
    36
  "-->"         :: [o, o] => o                  (infixr 25)
clasohm@1322
    37
  "<->"         :: [o, o] => o                  (infixr 25)
wenzelm@79
    38
wenzelm@79
    39
  (* Quantifiers *)
wenzelm@79
    40
clasohm@1322
    41
  All           :: ('a => o) => o               (binder "ALL " 10)
clasohm@1322
    42
  Ex            :: ('a => o) => o               (binder "EX " 10)
clasohm@1322
    43
  Ex1           :: ('a => o) => o               (binder "EX! " 10)
wenzelm@79
    44
clasohm@0
    45
wenzelm@2257
    46
lcp@928
    47
syntax
clasohm@1322
    48
  "~="          :: ['a, 'a] => o                (infixl 50)
lcp@928
    49
lcp@35
    50
translations
wenzelm@79
    51
  "x ~= y"      == "~ (x = y)"
wenzelm@79
    52
wenzelm@2257
    53
syntax (symbols)
wenzelm@2257
    54
  Not           :: o => o                       ("\\<not> _" [40] 40)
wenzelm@2257
    55
  "op &"        :: [o, o] => o                  (infixr "\\<and>" 35)
wenzelm@2257
    56
  "op |"        :: [o, o] => o                  (infixr "\\<or>" 30)
wenzelm@2257
    57
  "op -->"      :: [o, o] => o                  (infixr "\\<midarrow>\\<rightarrow>" 25)
wenzelm@2257
    58
  "op <->"      :: [o, o] => o                  (infixr "\\<leftarrow>\\<rightarrow>" 25)
wenzelm@2367
    59
  "ALL "        :: [idts, o] => o               ("(3\\<forall>_./ _)" [0, 10] 10)
wenzelm@2367
    60
  "EX "         :: [idts, o] => o               ("(3\\<exists>_./ _)" [0, 10] 10)
wenzelm@2367
    61
  "EX! "        :: [idts, o] => o               ("(3\\<exists>!_./ _)" [0, 10] 10)
wenzelm@2257
    62
  "op ~="       :: ['a, 'a] => o                (infixl "\\<noteq>" 50)
wenzelm@2205
    63
lcp@35
    64
clasohm@0
    65
rules
clasohm@0
    66
wenzelm@79
    67
  (* Equality *)
clasohm@0
    68
wenzelm@79
    69
  refl          "a=a"
wenzelm@79
    70
  subst         "[| a=b;  P(a) |] ==> P(b)"
clasohm@0
    71
wenzelm@79
    72
  (* Propositional logic *)
clasohm@0
    73
wenzelm@79
    74
  conjI         "[| P;  Q |] ==> P&Q"
wenzelm@79
    75
  conjunct1     "P&Q ==> P"
wenzelm@79
    76
  conjunct2     "P&Q ==> Q"
clasohm@0
    77
wenzelm@79
    78
  disjI1        "P ==> P|Q"
wenzelm@79
    79
  disjI2        "Q ==> P|Q"
wenzelm@79
    80
  disjE         "[| P|Q;  P ==> R;  Q ==> R |] ==> R"
clasohm@0
    81
wenzelm@79
    82
  impI          "(P ==> Q) ==> P-->Q"
wenzelm@79
    83
  mp            "[| P-->Q;  P |] ==> Q"
clasohm@0
    84
wenzelm@79
    85
  FalseE        "False ==> P"
clasohm@0
    86
wenzelm@79
    87
  (* Definitions *)
clasohm@0
    88
wenzelm@79
    89
  True_def      "True  == False-->False"
wenzelm@79
    90
  not_def       "~P    == P-->False"
wenzelm@79
    91
  iff_def       "P<->Q == (P-->Q) & (Q-->P)"
wenzelm@79
    92
wenzelm@79
    93
  (* Unique existence *)
clasohm@0
    94
wenzelm@79
    95
  ex1_def       "EX! x. P(x) == EX x. P(x) & (ALL y. P(y) --> y=x)"
clasohm@0
    96
wenzelm@79
    97
  (* Quantifiers *)
clasohm@0
    98
wenzelm@3835
    99
  allI          "(!!x. P(x)) ==> (ALL x. P(x))"
wenzelm@3835
   100
  spec          "(ALL x. P(x)) ==> P(x)"
clasohm@0
   101
wenzelm@3835
   102
  exI           "P(x) ==> (EX x. P(x))"
wenzelm@3835
   103
  exE           "[| EX x. P(x);  !!x. P(x) ==> R |] ==> R"
clasohm@0
   104
clasohm@0
   105
  (* Reflection *)
clasohm@0
   106
wenzelm@79
   107
  eq_reflection   "(x=y)   ==> (x==y)"
wenzelm@79
   108
  iff_reflection  "(P<->Q) ==> (P==Q)"
clasohm@0
   109
clasohm@0
   110
end
wenzelm@79
   111