src/FOL/IFOL.thy
author oheimb
Fri Dec 11 18:56:30 1998 +0100 (1998-12-11)
changeset 6027 9dd06eeda95c
parent 4854 d1850e0964f2
child 6340 7d5cbd5819a0
permissions -rw-r--r--
added new print_mode "xsymbols" for extended symbol support
(e.g. genuiely long arrows)
     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 local
    71 
    72 rules
    73 
    74   (* Equality *)
    75 
    76   refl          "a=a"
    77   subst         "[| a=b;  P(a) |] ==> P(b)"
    78 
    79   (* Propositional logic *)
    80 
    81   conjI         "[| P;  Q |] ==> P&Q"
    82   conjunct1     "P&Q ==> P"
    83   conjunct2     "P&Q ==> Q"
    84 
    85   disjI1        "P ==> P|Q"
    86   disjI2        "Q ==> P|Q"
    87   disjE         "[| P|Q;  P ==> R;  Q ==> R |] ==> R"
    88 
    89   impI          "(P ==> Q) ==> P-->Q"
    90   mp            "[| P-->Q;  P |] ==> Q"
    91 
    92   FalseE        "False ==> P"
    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   (* Quantifiers *)
   105 
   106   allI          "(!!x. P(x)) ==> (ALL x. P(x))"
   107   spec          "(ALL x. P(x)) ==> P(x)"
   108 
   109   exI           "P(x) ==> (EX x. P(x))"
   110   exE           "[| EX x. P(x);  !!x. P(x) ==> R |] ==> R"
   111 
   112   (* Reflection *)
   113 
   114   eq_reflection   "(x=y)   ==> (x==y)"
   115   iff_reflection  "(P<->Q) ==> (P==Q)"
   116 
   117 
   118 setup
   119   Simplifier.setup
   120 
   121 end