
clasohm@1268: (*  Title:      FOL/IFOL.thy
lcp@35:     ID:         $Id$
wenzelm@79:     Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
lcp@35:     Copyright   1993  University of Cambridge
lcp@35: 
wenzelm@2205: Intuitionistic first-order logic.
lcp@35: *)
lcp@35: 
wenzelm@79: IFOL = Pure +
clasohm@0: 
wenzelm@79: classes
wenzelm@79:   term < logic
wenzelm@79: 
wenzelm@79: default
wenzelm@79:   term
clasohm@0: 
wenzelm@79: types
clasohm@278:   o
clasohm@0: 
wenzelm@79: arities
wenzelm@79:   o :: logic
clasohm@0: 
wenzelm@79: 
wenzelm@79: consts
clasohm@0: 
clasohm@1322:   Trueprop      :: o => prop                    ("(_)" 5)
clasohm@1322:   True, False   :: o
wenzelm@79: 
wenzelm@79:   (* Connectives *)
wenzelm@79: 
clasohm@1322:   "="           :: ['a, 'a] => o                (infixl 50)
lcp@35: 
clasohm@1322:   Not           :: o => o                       ("~ _" [40] 40)
clasohm@1322:   "&"           :: [o, o] => o                  (infixr 35)
clasohm@1322:   "|"           :: [o, o] => o                  (infixr 30)
clasohm@1322:   "-->"         :: [o, o] => o                  (infixr 25)
clasohm@1322:   "<->"         :: [o, o] => o                  (infixr 25)
wenzelm@79: 
wenzelm@79:   (* Quantifiers *)
wenzelm@79: 
clasohm@1322:   All           :: ('a => o) => o               (binder "ALL " 10)
clasohm@1322:   Ex            :: ('a => o) => o               (binder "EX " 10)
clasohm@1322:   Ex1           :: ('a => o) => o               (binder "EX! " 10)
wenzelm@79: 
clasohm@0: 
wenzelm@2257: 
lcp@928: syntax
clasohm@1322:   "~="          :: ['a, 'a] => o                (infixl 50)
lcp@928: 
lcp@35: translations
wenzelm@79:   "x ~= y"      == "~ (x = y)"
wenzelm@79: 
wenzelm@2257: syntax (symbols)
wenzelm@2257:   Not           :: o => o                       ("\\<not> _" [40] 40)
wenzelm@2257:   "op &"        :: [o, o] => o                  (infixr "\\<and>" 35)
wenzelm@2257:   "op |"        :: [o, o] => o                  (infixr "\\<or>" 30)
wenzelm@2257:   "op -->"      :: [o, o] => o                  (infixr "\\<midarrow>\\<rightarrow>" 25)
wenzelm@2257:   "op <->"      :: [o, o] => o                  (infixr "\\<leftarrow>\\<rightarrow>" 25)
wenzelm@2367:   "ALL "        :: [idts, o] => o               ("(3\\<forall>_./ _)" [0, 10] 10)
wenzelm@2367:   "EX "         :: [idts, o] => o               ("(3\\<exists>_./ _)" [0, 10] 10)
wenzelm@2367:   "EX! "        :: [idts, o] => o               ("(3\\<exists>!_./ _)" [0, 10] 10)
wenzelm@2257:   "op ~="       :: ['a, 'a] => o                (infixl "\\<noteq>" 50)
wenzelm@2205: 
lcp@35: 
clasohm@0: rules
clasohm@0: 
wenzelm@79:   (* Equality *)
clasohm@0: 
wenzelm@79:   refl          "a=a"
wenzelm@79:   subst         "[| a=b;  P(a) |] ==> P(b)"
clasohm@0: 
wenzelm@79:   (* Propositional logic *)
clasohm@0: 
wenzelm@79:   conjI         "[| P;  Q |] ==> P&Q"
wenzelm@79:   conjunct1     "P&Q ==> P"
wenzelm@79:   conjunct2     "P&Q ==> Q"
clasohm@0: 
wenzelm@79:   disjI1        "P ==> P|Q"
wenzelm@79:   disjI2        "Q ==> P|Q"
wenzelm@79:   disjE         "[| P|Q;  P ==> R;  Q ==> R |] ==> R"
clasohm@0: 
wenzelm@79:   impI          "(P ==> Q) ==> P-->Q"
wenzelm@79:   mp            "[| P-->Q;  P |] ==> Q"
clasohm@0: 
wenzelm@79:   FalseE        "False ==> P"
clasohm@0: 
wenzelm@79:   (* Definitions *)
clasohm@0: 
wenzelm@79:   True_def      "True  == False-->False"
wenzelm@79:   not_def       "~P    == P-->False"
wenzelm@79:   iff_def       "P<->Q == (P-->Q) & (Q-->P)"
wenzelm@79: 
wenzelm@79:   (* Unique existence *)
clasohm@0: 
wenzelm@79:   ex1_def       "EX! x. P(x) == EX x. P(x) & (ALL y. P(y) --> y=x)"
clasohm@0: 
wenzelm@79:   (* Quantifiers *)
clasohm@0: 
wenzelm@3835:   allI          "(!!x. P(x)) ==> (ALL x. P(x))"
wenzelm@3835:   spec          "(ALL x. P(x)) ==> P(x)"
clasohm@0: 
wenzelm@3835:   exI           "P(x) ==> (EX x. P(x))"
wenzelm@3835:   exE           "[| EX x. P(x);  !!x. P(x) ==> R |] ==> R"
clasohm@0: 
clasohm@0:   (* Reflection *)
clasohm@0: 
wenzelm@79:   eq_reflection   "(x=y)   ==> (x==y)"
wenzelm@79:   iff_reflection  "(P<->Q) ==> (P==Q)"
clasohm@0: 
clasohm@0: end
wenzelm@79: 




