src/FOL/ifol.thy
author wenzelm
Wed, 05 Dec 2001 03:00:39 +0100
changeset 12368 2af9ad81ea56
parent 278 523518f44286
permissions -rw-r--r--
sym declarations; tuned declarations;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
     1
(*  Title:      FOL/ifol.thy
35
d71f96f1780e ifol.thy: added ~= for "not equals"
lcp
parents: 0
diff changeset
     2
    ID:         $Id$
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
     3
    Author:     Lawrence C Paulson, Cambridge University Computer Laboratory
35
d71f96f1780e ifol.thy: added ~= for "not equals"
lcp
parents: 0
diff changeset
     4
    Copyright   1993  University of Cambridge
d71f96f1780e ifol.thy: added ~= for "not equals"
lcp
parents: 0
diff changeset
     5
d71f96f1780e ifol.thy: added ~= for "not equals"
lcp
parents: 0
diff changeset
     6
Intuitionistic first-order logic
d71f96f1780e ifol.thy: added ~= for "not equals"
lcp
parents: 0
diff changeset
     7
*)
d71f96f1780e ifol.thy: added ~= for "not equals"
lcp
parents: 0
diff changeset
     8
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
     9
IFOL = Pure +
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    10
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    11
classes
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    12
  term < logic
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    13
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    14
default
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    15
  term
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    16
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    17
types
278
523518f44286 adapted type definition to new syntax
clasohm
parents: 79
diff changeset
    18
  o
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    19
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    20
arities
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    21
  o :: logic
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    22
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    23
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    24
consts
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    25
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    26
  Trueprop      :: "o => prop"                  ("(_)" 5)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    27
  True, False   :: "o"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    28
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    29
  (* Connectives *)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    30
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    31
  "="           :: "['a, 'a] => o"              (infixl 50)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    32
  "~="          :: "['a, 'a] => o"              ("(_ ~=/ _)" [50, 51] 50)
35
d71f96f1780e ifol.thy: added ~= for "not equals"
lcp
parents: 0
diff changeset
    33
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    34
  Not           :: "o => o"                     ("~ _" [40] 40)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    35
  "&"           :: "[o, o] => o"                (infixr 35)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    36
  "|"           :: "[o, o] => o"                (infixr 30)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    37
  "-->"         :: "[o, o] => o"                (infixr 25)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    38
  "<->"         :: "[o, o] => o"                (infixr 25)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    39
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    40
  (* Quantifiers *)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    41
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    42
  All           :: "('a => o) => o"             (binder "ALL " 10)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    43
  Ex            :: "('a => o) => o"             (binder "EX " 10)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    44
  Ex1           :: "('a => o) => o"             (binder "EX! " 10)
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    45
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    46
35
d71f96f1780e ifol.thy: added ~= for "not equals"
lcp
parents: 0
diff changeset
    47
translations
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    48
  "x ~= y"      == "~ (x = y)"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    49
35
d71f96f1780e ifol.thy: added ~= for "not equals"
lcp
parents: 0
diff changeset
    50
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    51
rules
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    52
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    53
  (* Equality *)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    54
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    55
  refl          "a=a"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    56
  subst         "[| a=b;  P(a) |] ==> P(b)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    57
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    58
  (* Propositional logic *)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    59
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    60
  conjI         "[| P;  Q |] ==> P&Q"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    61
  conjunct1     "P&Q ==> P"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    62
  conjunct2     "P&Q ==> Q"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    63
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    64
  disjI1        "P ==> P|Q"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    65
  disjI2        "Q ==> P|Q"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    66
  disjE         "[| P|Q;  P ==> R;  Q ==> R |] ==> R"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    67
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    68
  impI          "(P ==> Q) ==> P-->Q"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    69
  mp            "[| P-->Q;  P |] ==> Q"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    70
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    71
  FalseE        "False ==> P"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    72
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    73
  (* Definitions *)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    74
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    75
  True_def      "True  == False-->False"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    76
  not_def       "~P    == P-->False"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    77
  iff_def       "P<->Q == (P-->Q) & (Q-->P)"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    78
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    79
  (* Unique existence *)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    80
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    81
  ex1_def       "EX! x. P(x) == EX x. P(x) & (ALL y. P(y) --> y=x)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    82
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    83
  (* Quantifiers *)
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    84
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    85
  allI          "(!!x. P(x)) ==> (ALL x.P(x))"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    86
  spec          "(ALL x.P(x)) ==> P(x)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    87
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    88
  exI           "P(x) ==> (EX x.P(x))"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    89
  exE           "[| EX x.P(x);  !!x. P(x) ==> R |] ==> R"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    90
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    91
  (* Reflection *)
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    92
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    93
  eq_reflection   "(x=y)   ==> (x==y)"
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    94
  iff_reflection  "(P<->Q) ==> (P==Q)"
0
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    95
a5a9c433f639 Initial revision
clasohm
parents:
diff changeset
    96
end
79
74e68ed3b4fd added white-space;
wenzelm
parents: 35
diff changeset
    97