src/HOL/HOL.thy
author paulson
Wed, 05 Mar 1997 09:59:24 +0100
changeset 2720 3490ef519a56
parent 2552 470bc495373e
child 2762 2ade3a141934
permissions -rw-r--r--
Renamed constant "not" to "Not"
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
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    28
consts
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    29
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    30
  (* Constants *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    31
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    32
  Trueprop      :: bool => prop                     ("(_)" 5)
2720
3490ef519a56 Renamed constant "not" to "Not"
paulson
parents: 2552
diff changeset
    33
  Not           :: bool => bool                     ("~ _" [40] 40)
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    34
  True, False   :: bool
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    35
  If            :: [bool, 'a, 'a] => 'a   ("(if (_)/ then (_)/ else (_))" 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    36
  Inv           :: ('a => 'b) => ('b => 'a)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    37
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    38
  (* Binders *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    39
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    40
  Eps           :: ('a => bool) => 'a
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    41
  All           :: ('a => bool) => bool             (binder "! " 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    42
  Ex            :: ('a => bool) => bool             (binder "? " 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    43
  Ex1           :: ('a => bool) => bool             (binder "?! " 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    44
  Let           :: ['a, 'a => 'b] => 'b
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    45
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    46
  (* Infixes *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    47
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    48
  o             :: ['b => 'c, 'a => 'b, 'a] => 'c   (infixl 55)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    49
  "="           :: ['a, 'a] => bool                 (infixl 50)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    50
  "&"           :: [bool, bool] => bool             (infixr 35)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    51
  "|"           :: [bool, bool] => bool             (infixr 30)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    52
  "-->"         :: [bool, bool] => bool             (infixr 25)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    53
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    54
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    55
(* Overloaded Constants *)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    56
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    57
axclass
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    58
  plus < term
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    59
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    60
axclass
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    61
  minus < term
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    62
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    63
axclass
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    64
  times < term
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    65
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    66
consts
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    67
  "+"           :: ['a::plus, 'a] => 'a             (infixl 65)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    68
  "-"           :: ['a::minus, 'a] => 'a            (infixl 65)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    69
  "*"           :: ['a::times, 'a] => 'a            (infixl 70)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    70
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    71
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    72
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    73
(** Additional concrete syntax **)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
    74
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    75
types
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    76
  letbinds  letbind
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    77
  case_syn  cases_syn
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    78
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    79
syntax
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    80
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    81
  "~="          :: ['a, 'a] => bool                 (infixl 50)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    82
2368
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
    83
  "@Eps"        :: [pttrn, bool] => 'a              ("(3@ _./ _)" [0, 10] 10)
1068
e0f2dffab506 HOL.thy:
nipkow
parents: 973
diff changeset
    84
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    85
  (* Alternative Quantifiers *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    86
2368
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
    87
  "*All"        :: [idts, bool] => bool             ("(3ALL _./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
    88
  "*Ex"         :: [idts, bool] => bool             ("(3EX _./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
    89
  "*Ex1"        :: [idts, bool] => bool             ("(3EX! _./ _)" [0, 10] 10)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    90
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    91
  (* Let expressions *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    92
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    93
  "_bind"       :: [pttrn, 'a] => letbind           ("(2_ =/ _)" 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    94
  ""            :: letbind => letbinds              ("_")
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    95
  "_binds"      :: [letbind, letbinds] => letbinds  ("_;/ _")
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
    96
  "_Let"        :: [letbinds, 'a] => 'a             ("(let (_)/ in (_))" 10)
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    97
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    98
  (* Case expressions *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
    99
1370
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
   100
  "@case"       :: ['a, cases_syn] => 'b            ("(case _ of/ _)" 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
   101
  "@case1"      :: ['a, 'b] => case_syn             ("(2_ =>/ _)" 10)
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
   102
  ""            :: case_syn => cases_syn            ("_")
7361ac9b024d removed quotes from types in consts and syntax sections
clasohm
parents: 1273
diff changeset
   103
  "@case2"      :: [case_syn, cases_syn] => cases_syn   ("_/ | _")
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   104
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   105
translations
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   106
  "x ~= y"      == "~ (x = y)"
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   107
  "@ x.b"       == "Eps (%x. b)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   108
  "ALL xs. P"   => "! xs. P"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   109
  "EX xs. P"    => "? xs. P"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   110
  "EX! xs. P"   => "?! xs. P"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   111
  "_Let (_binds b bs) e"  == "_Let b (_Let bs e)"
1114
c8dfb56a7e95 Prod is now a parent of Lfp.
nipkow
parents: 1068
diff changeset
   112
  "let x = a in e"        == "Let a (%x. e)"
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   113
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   114
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   115
syntax (symbols)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   116
  not           :: bool => bool                     ("\\<not> _" [40] 40)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   117
  "op &"        :: [bool, bool] => bool             (infixr "\\<and>" 35)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   118
  "op |"        :: [bool, bool] => bool             (infixr "\\<or>" 30)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   119
  "op -->"      :: [bool, bool] => bool             (infixr "\\<midarrow>\\<rightarrow>" 25)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   120
  "op o"        :: ['b => 'c, 'a => 'b, 'a] => 'c   (infixl "\\<circ>" 55)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   121
  "op ~="       :: ['a, 'a] => bool                 (infixl "\\<noteq>" 50)
2368
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   122
  "@Eps"        :: [pttrn, bool] => 'a              ("(3\\<epsilon>_./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   123
  "! "          :: [idts, bool] => bool             ("(3\\<forall>_./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   124
  "? "          :: [idts, bool] => bool             ("(3\\<exists>_./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   125
  "?! "         :: [idts, bool] => bool             ("(3\\<exists>!_./ _)" [0, 10] 10)
2552
470bc495373e changed case symbol to \<Rightarrow>;
wenzelm
parents: 2393
diff changeset
   126
  "@case1"      :: ['a, 'b] => case_syn             ("(2_ \\<Rightarrow>/ _)" 10)
2372
a2999e19703b fixed alternative quantifier symbol syntax;
wenzelm
parents: 2368
diff changeset
   127
a2999e19703b fixed alternative quantifier symbol syntax;
wenzelm
parents: 2368
diff changeset
   128
syntax (symbols output)
2368
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   129
  "*All"        :: [idts, bool] => bool             ("(3\\<forall>_./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   130
  "*Ex"         :: [idts, bool] => bool             ("(3\\<exists>_./ _)" [0, 10] 10)
d394336997cf fixed pris of binder syntax;
wenzelm
parents: 2260
diff changeset
   131
  "*Ex1"        :: [idts, bool] => bool             ("(3\\<exists>!_./ _)" [0, 10] 10)
2372
a2999e19703b fixed alternative quantifier symbol syntax;
wenzelm
parents: 2368
diff changeset
   132
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   133
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   134
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   135
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   136
(** Rules and definitions **)
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   137
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   138
rules
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   139
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   140
  eq_reflection "(x=y) ==> (x==y)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   141
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   142
  (* Basic Rules *)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   143
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   144
  refl          "t = (t::'a)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   145
  subst         "[| s = t; P(s) |] ==> P(t::'a)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   146
  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
   147
  selectI       "P(x::'a) ==> P(@x.P(x))"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   148
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   149
  impI          "(P ==> Q) ==> P-->Q"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   150
  mp            "[| P-->Q;  P |] ==> Q"
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
defs
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   153
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   154
  True_def      "True      == ((%x::bool.x)=(%x.x))"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   155
  All_def       "All(P)    == (P = (%x.True))"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   156
  Ex_def        "Ex(P)     == P(@x.P(x))"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   157
  False_def     "False     == (!P.P)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   158
  not_def       "~ P       == P-->False"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   159
  and_def       "P & Q     == !R. (P-->Q-->R) --> R"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   160
  or_def        "P | Q     == !R. (P-->R) --> (Q-->R) --> R"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   161
  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
   162
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   163
rules
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   164
  (* Axioms *)
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
  iff           "(P-->Q) --> (Q-->P) --> (P=Q)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   167
  True_or_False "(P=True) | (P=False)"
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
defs
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   170
  (* Misc Definitions *)
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
  Let_def       "Let s f == f(s)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   173
  Inv_def       "Inv(f::'a=>'b)  == (% y. @x. f(x)=y)"
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   174
  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
   175
  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
   176
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   177
end
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   178
2260
b59781f2b809 added symbols syntax;
wenzelm
parents: 1674
diff changeset
   179
923
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   180
ML
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   181
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   182
(** Choice between the HOL and Isabelle style of quantifiers **)
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   183
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   184
val HOL_quantifiers = ref true;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   185
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   186
fun alt_ast_tr' (name, alt_name) =
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   187
  let
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   188
    fun ast_tr' (*name*) args =
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   189
      if ! HOL_quantifiers then raise Match
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   190
      else Syntax.mk_appl (Syntax.Constant alt_name) args;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   191
  in
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   192
    (name, ast_tr')
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   193
  end;
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   194
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   195
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   196
val print_ast_translation =
ff1574a81019 new version of HOL with curried function application
clasohm
parents:
diff changeset
   197
  map alt_ast_tr' [("! ", "*All"), ("? ", "*Ex"), ("?! ", "*Ex1")];