src/HOL/HOL.thy
author paulson
Mon, 26 May 1997 12:38:29 +0200
changeset 3342 ec3b55fcb165
parent 3320 3a5e4930fb77
child 3370 5c5fdce3a4e4
permissions -rw-r--r--
New operator "lists" for formalizing sets of lists
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     1
(*  Title:      HOL/HOL.thy
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     2
    ID:         $Id$
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     3
    Author:     Tobias Nipkow
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     4
    Copyright   1993  University of Cambridge
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     5
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
     6
Higher-Order Logic.
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     7
*)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     8
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
     9
HOL = CPure +
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    10
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    11
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    12
(** Core syntax **)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    13
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    14
classes
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    15
  term < logic
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    16
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    17
default
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    18
  term
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    19
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    20
types
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    21
  bool
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    22
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    23
arities
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    24
  fun :: (term, term) term
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    25
  bool :: term
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    26
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    27
3230
3772723c5e41 improved output syntax of op =, op ~= (more parentheses);
wenzelm
parents: 3068
diff changeset
    28
syntax ("" output)
3772723c5e41 improved output syntax of op =, op ~= (more parentheses);
wenzelm
parents: 3068
diff changeset
    29
  "op ="        :: ['a, 'a] => bool                 ("(_ =/ _)" [51, 51] 50)
3772723c5e41 improved output syntax of op =, op ~= (more parentheses);
wenzelm
parents: 3068
diff changeset
    30
  "op ~="       :: ['a, 'a] => bool                 ("(_ ~=/ _)" [51, 51] 50)
3772723c5e41 improved output syntax of op =, op ~= (more parentheses);
wenzelm
parents: 3068
diff changeset
    31
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    32
consts
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    33
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    34
  (* Constants *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    35
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    36
  Trueprop      :: bool => prop                     ("(_)" 5)
2720
3490ef519a56 Renamed constant "not" to "Not"
paulson
parents: 2552
diff changeset
    37
  Not           :: bool => bool                     ("~ _" [40] 40)
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    38
  True, False   :: bool
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    39
  If            :: [bool, 'a, 'a] => 'a   ("(if (_)/ then (_)/ else (_))" 10)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    40
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    41
  (* Binders *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    42
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    43
  Eps           :: ('a => bool) => 'a
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    44
  All           :: ('a => bool) => bool             (binder "! " 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    45
  Ex            :: ('a => bool) => bool             (binder "? " 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    46
  Ex1           :: ('a => bool) => bool             (binder "?! " 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    47
  Let           :: ['a, 'a => 'b] => 'b
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    48
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    49
  (* Infixes *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    50
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    51
  o             :: ['b => 'c, 'a => 'b, 'a] => 'c   (infixl 55)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    52
  "="           :: ['a, 'a] => bool                 (infixl 50)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    53
  "&"           :: [bool, bool] => bool             (infixr 35)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    54
  "|"           :: [bool, bool] => bool             (infixr 30)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    55
  "-->"         :: [bool, bool] => bool             (infixr 25)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    56
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    57
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    58
(* Overloaded Constants *)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    59
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    60
axclass
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    61
  plus < term
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    62
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    63
axclass
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    64
  minus < term
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    65
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    66
axclass
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    67
  times < term
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    68
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    69
consts
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    70
  "+"           :: ['a::plus, 'a] => 'a             (infixl 65)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    71
  "-"           :: ['a::minus, 'a] => 'a            (infixl 65)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    72
  "*"           :: ['a::times, 'a] => 'a            (infixl 70)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    73
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    74
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    75
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    76
(** Additional concrete syntax **)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    77
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    78
types
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    79
  letbinds  letbind
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    80
  case_syn  cases_syn
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    81
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    82
syntax
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    83
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    84
  "~="          :: ['a, 'a] => bool                 (infixl 50)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    85
2368
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
    86
  "@Eps"        :: [pttrn, bool] => 'a              ("(3@ _./ _)" [0, 10] 10)
1068
e0f2dffab506 HOL.thy:
nipkow
parents: 973
diff changeset
    87
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    88
  (* Alternative Quantifiers *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    89
2368
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
    90
  "*All"        :: [idts, bool] => bool             ("(3ALL _./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
    91
  "*Ex"         :: [idts, bool] => bool             ("(3EX _./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
    92
  "*Ex1"        :: [idts, bool] => bool             ("(3EX! _./ _)" [0, 10] 10)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    93
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    94
  (* Let expressions *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    95
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    96
  "_bind"       :: [pttrn, 'a] => letbind           ("(2_ =/ _)" 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    97
  ""            :: letbind => letbinds              ("_")
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    98
  "_binds"      :: [letbind, letbinds] => letbinds  ("_;/ _")
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    99
  "_Let"        :: [letbinds, 'a] => 'a             ("(let (_)/ in (_))" 10)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   100
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   101
  (* Case expressions *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   102
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
   103
  "@case"       :: ['a, cases_syn] => 'b            ("(case _ of/ _)" 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
   104
  "@case1"      :: ['a, 'b] => case_syn             ("(2_ =>/ _)" 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
   105
  ""            :: case_syn => cases_syn            ("_")
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
   106
  "@case2"      :: [case_syn, cases_syn] => cases_syn   ("_/ | _")
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   107
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   108
translations
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   109
  "x ~= y"      == "~ (x = y)"
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   110
  "@ x.b"       == "Eps (%x. b)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   111
  "ALL xs. P"   => "! xs. P"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   112
  "EX xs. P"    => "? xs. P"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   113
  "EX! xs. P"   => "?! xs. P"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   114
  "_Let (_binds b bs) e"  == "_Let b (_Let bs e)"
1114
c8dfb56a7e95 Prod is now a parent of Lfp.
nipkow
parents: 1068
diff changeset
   115
  "let x = a in e"        == "Let a (%x. e)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   116
3230
3772723c5e41 improved output syntax of op =, op ~= (more parentheses);
wenzelm
parents: 3068
diff changeset
   117
syntax (symbols output)
3772723c5e41 improved output syntax of op =, op ~= (more parentheses);
wenzelm
parents: 3068
diff changeset
   118
  "op ~="       :: ['a, 'a] => bool                 ("(_ \\<noteq>/ _)" [51, 51] 50)
3248
wenzelm
parents: 3230
diff changeset
   119
  "*All"        :: [idts, bool] => bool             ("(3\\<forall>_./ _)" [0, 10] 10)
wenzelm
parents: 3230
diff changeset
   120
  "*Ex"         :: [idts, bool] => bool             ("(3\\<exists>_./ _)" [0, 10] 10)
wenzelm
parents: 3230
diff changeset
   121
  "*Ex1"        :: [idts, bool] => bool             ("(3\\<exists>!_./ _)" [0, 10] 10)
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   122
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   123
syntax (symbols)
2762
2ade3a141934 fixed Not syntax;
wenzelm
parents: 2720
diff changeset
   124
  Not           :: bool => bool                     ("\\<not> _" [40] 40)
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   125
  "op &"        :: [bool, bool] => bool             (infixr "\\<and>" 35)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   126
  "op |"        :: [bool, bool] => bool             (infixr "\\<or>" 30)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   127
  "op -->"      :: [bool, bool] => bool             (infixr "\\<midarrow>\\<rightarrow>" 25)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   128
  "op o"        :: ['b => 'c, 'a => 'b, 'a] => 'c   (infixl "\\<circ>" 55)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   129
  "op ~="       :: ['a, 'a] => bool                 (infixl "\\<noteq>" 50)
2368
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   130
  "@Eps"        :: [pttrn, bool] => 'a              ("(3\\<epsilon>_./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   131
  "! "          :: [idts, bool] => bool             ("(3\\<forall>_./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   132
  "? "          :: [idts, bool] => bool             ("(3\\<exists>_./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   133
  "?! "         :: [idts, bool] => bool             ("(3\\<exists>!_./ _)" [0, 10] 10)
2552
470bc495373e changed case symbol to \<Rightarrow>;
wenzelm
parents: 2393
diff changeset
   134
  "@case1"      :: ['a, 'b] => case_syn             ("(2_ \\<Rightarrow>/ _)" 10)
3068
b7562e452816 deactivated new symbols (not yet printable on xterm, emacs);
wenzelm
parents: 3066
diff changeset
   135
(*"@case2"      :: [case_syn, cases_syn] => cases_syn   ("_/ \\<orelse> _")*)
2372
a2999e19703b fixed alternative quantifier symbol syntax;
wenzelm
parents: 2368
diff changeset
   136
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   137
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   138
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   139
(** Rules and definitions **)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   140
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   141
rules
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   142
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   143
  eq_reflection "(x=y) ==> (x==y)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   144
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   145
  (* Basic Rules *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   146
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   147
  refl          "t = (t::'a)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   148
  subst         "[| s = t; P(s) |] ==> P(t::'a)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   149
  ext           "(!!x::'a. (f(x)::'b) = g(x)) ==> (%x.f(x)) = (%x.g(x))"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   150
  selectI       "P(x::'a) ==> P(@x.P(x))"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   151
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   152
  impI          "(P ==> Q) ==> P-->Q"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   153
  mp            "[| P-->Q;  P |] ==> Q"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   154
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   155
defs
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   156
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   157
  True_def      "True      == ((%x::bool.x)=(%x.x))"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   158
  All_def       "All(P)    == (P = (%x.True))"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   159
  Ex_def        "Ex(P)     == P(@x.P(x))"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   160
  False_def     "False     == (!P.P)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   161
  not_def       "~ P       == P-->False"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   162
  and_def       "P & Q     == !R. (P-->Q-->R) --> R"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   163
  or_def        "P | Q     == !R. (P-->R) --> (Q-->R) --> R"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   164
  Ex1_def       "Ex1(P)    == ? x. P(x) & (! y. P(y) --> y=x)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   165
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   166
rules
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   167
  (* Axioms *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   168
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   169
  iff           "(P-->Q) --> (Q-->P) --> (P=Q)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   170
  True_or_False "(P=True) | (P=False)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   171
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   172
defs
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   173
  (* Misc Definitions *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   174
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   175
  Let_def       "Let s f == f(s)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   176
  o_def         "(f::'b=>'c) o g == (%(x::'a). f(g(x)))"
973
f57fb576520f Modified If_def to avoid ambiguity.
nipkow
parents: 965
diff changeset
   177
  if_def        "If P x y == @z::'a. (P=True --> z=x) & (P=False --> z=y)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   178
3320
3a5e4930fb77 Added `arbitrary'
nipkow
parents: 3248
diff changeset
   179
constdefs arbitrary :: 'a
3a5e4930fb77 Added `arbitrary'
nipkow
parents: 3248
diff changeset
   180
         "arbitrary == @x.False"
3a5e4930fb77 Added `arbitrary'
nipkow
parents: 3248
diff changeset
   181
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   182
end
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   183
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   184
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   185
ML
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   186
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   187
(** Choice between the HOL and Isabelle style of quantifiers **)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   188
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   189
val HOL_quantifiers = ref true;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   190
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   191
fun alt_ast_tr' (name, alt_name) =
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   192
  let
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   193
    fun ast_tr' (*name*) args =
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   194
      if ! HOL_quantifiers then raise Match
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   195
      else Syntax.mk_appl (Syntax.Constant alt_name) args;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   196
  in
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   197
    (name, ast_tr')
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   198
  end;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   199
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   200
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   201
val print_ast_translation =
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   202
  map alt_ast_tr' [("! ", "*All"), ("? ", "*Ex"), ("?! ", "*Ex1")];