src/FOL/IFOL.thy
author wenzelm
Wed Mar 10 10:55:12 1999 +0100 (1999-03-10)
changeset 6340 7d5cbd5819a0
parent 6027 9dd06eeda95c
child 7355 4c43090659ca
permissions -rw-r--r--
HTML output;
     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 IFOL = Pure +
    10 
    11 global
    12 
    13 classes
    14   term < logic
    15 
    16 default
    17   term
    18 
    19 types
    20   o
    21 
    22 arities
    23   o :: logic
    24 
    25 
    26 consts
    27 
    28   Trueprop      :: o => prop                    ("(_)" 5)
    29   True, False   :: o
    30 
    31   (* Connectives *)
    32 
    33   "="           :: ['a, 'a] => o                (infixl 50)
    34 
    35   Not           :: o => o                       ("~ _" [40] 40)
    36   "&"           :: [o, o] => o                  (infixr 35)
    37   "|"           :: [o, o] => o                  (infixr 30)
    38   "-->"         :: [o, o] => o                  (infixr 25)
    39   "<->"         :: [o, o] => o                  (infixr 25)
    40 
    41   (* Quantifiers *)
    42 
    43   All           :: ('a => o) => o               (binder "ALL " 10)
    44   Ex            :: ('a => o) => o               (binder "EX " 10)
    45   Ex1           :: ('a => o) => o               (binder "EX! " 10)
    46 
    47 
    48 
    49 syntax
    50   "~="          :: ['a, 'a] => o                (infixl 50)
    51 
    52 translations
    53   "x ~= y"      == "~ (x = y)"
    54 
    55 syntax (symbols)
    56   Not           :: o => o                       ("\\<not> _" [40] 40)
    57   "op &"        :: [o, o] => o                  (infixr "\\<and>" 35)
    58   "op |"        :: [o, o] => o                  (infixr "\\<or>" 30)
    59   "op -->"      :: [o, o] => o                  (infixr "\\<midarrow>\\<rightarrow>" 25)
    60   "op <->"      :: [o, o] => o                  (infixr "\\<leftarrow>\\<rightarrow>" 25)
    61   "ALL "        :: [idts, o] => o               ("(3\\<forall>_./ _)" [0, 10] 10)
    62   "EX "         :: [idts, o] => o               ("(3\\<exists>_./ _)" [0, 10] 10)
    63   "EX! "        :: [idts, o] => o               ("(3\\<exists>!_./ _)" [0, 10] 10)
    64   "op ~="       :: ['a, 'a] => o                (infixl "\\<noteq>" 50)
    65 
    66 syntax (xsymbols)
    67   "op -->"      :: [o, o] => o                  (infixr "\\<longrightarrow>" 25)
    68   "op <->"      :: [o, o] => o                  (infixr "\\<longleftrightarrow>" 25)
    69 
    70 syntax (HTML output)
    71   Not           :: o => o                       ("\\<not> _" [40] 40)
    72 
    73 
    74 local
    75 
    76 rules
    77 
    78   (* Equality *)
    79 
    80   refl          "a=a"
    81   subst         "[| a=b;  P(a) |] ==> P(b)"
    82 
    83   (* Propositional logic *)
    84 
    85   conjI         "[| P;  Q |] ==> P&Q"
    86   conjunct1     "P&Q ==> P"
    87   conjunct2     "P&Q ==> Q"
    88 
    89   disjI1        "P ==> P|Q"
    90   disjI2        "Q ==> P|Q"
    91   disjE         "[| P|Q;  P ==> R;  Q ==> R |] ==> R"
    92 
    93   impI          "(P ==> Q) ==> P-->Q"
    94   mp            "[| P-->Q;  P |] ==> Q"
    95 
    96   FalseE        "False ==> P"
    97 
    98   (* Definitions *)
    99 
   100   True_def      "True  == False-->False"
   101   not_def       "~P    == P-->False"
   102   iff_def       "P<->Q == (P-->Q) & (Q-->P)"
   103 
   104   (* Unique existence *)
   105 
   106   ex1_def       "EX! x. P(x) == EX x. P(x) & (ALL y. P(y) --> y=x)"
   107 
   108   (* Quantifiers *)
   109 
   110   allI          "(!!x. P(x)) ==> (ALL x. P(x))"
   111   spec          "(ALL x. P(x)) ==> P(x)"
   112 
   113   exI           "P(x) ==> (EX x. P(x))"
   114   exE           "[| EX x. P(x);  !!x. P(x) ==> R |] ==> R"
   115 
   116   (* Reflection *)
   117 
   118   eq_reflection   "(x=y)   ==> (x==y)"
   119   iff_reflection  "(P<->Q) ==> (P==Q)"
   120 
   121 
   122 setup
   123   Simplifier.setup
   124 
   125 end