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