src/HOL/HOL.thy
changeset 3820 46b255e140dc
parent 3370 5c5fdce3a4e4
child 3842 b55686a7b22c
equal deleted inserted replaced
3819:5a6a6f18b109 3820:46b255e140dc
    22 
    22 
    23 arities
    23 arities
    24   fun :: (term, term) term
    24   fun :: (term, term) term
    25   bool :: term
    25   bool :: term
    26 
    26 
    27 
       
    28 syntax ("" output)
       
    29   "op ="        :: ['a, 'a] => bool                 ("(_ =/ _)" [51, 51] 50)
       
    30   "op ~="       :: ['a, 'a] => bool                 ("(_ ~=/ _)" [51, 51] 50)
       
    31 
    27 
    32 consts
    28 consts
    33 
    29 
    34   (* Constants *)
    30   (* Constants *)
    35 
    31 
    72 consts
    68 consts
    73   "+"           :: ['a::plus, 'a]  => 'a            (infixl 65)
    69   "+"           :: ['a::plus, 'a]  => 'a            (infixl 65)
    74   "-"           :: ['a::minus, 'a] => 'a            (infixl 65)
    70   "-"           :: ['a::minus, 'a] => 'a            (infixl 65)
    75   "*"           :: ['a::times, 'a] => 'a            (infixl 70)
    71   "*"           :: ['a::times, 'a] => 'a            (infixl 70)
    76   (*See Nat.thy for "^"*)
    72   (*See Nat.thy for "^"*)
       
    73 
    77 
    74 
    78 (** Additional concrete syntax **)
    75 (** Additional concrete syntax **)
    79 
    76 
    80 types
    77 types
    81   letbinds  letbind
    78   letbinds  letbind
   114   "EX xs. P"    => "? xs. P"
   111   "EX xs. P"    => "? xs. P"
   115   "EX! xs. P"   => "?! xs. P"
   112   "EX! xs. P"   => "?! xs. P"
   116   "_Let (_binds b bs) e"  == "_Let b (_Let bs e)"
   113   "_Let (_binds b bs) e"  == "_Let b (_Let bs e)"
   117   "let x = a in e"        == "Let a (%x. e)"
   114   "let x = a in e"        == "Let a (%x. e)"
   118 
   115 
   119 syntax (symbols output)
   116 syntax ("" output)
   120   "op ~="       :: ['a, 'a] => bool                 ("(_ \\<noteq>/ _)" [51, 51] 50)
   117   "op ="        :: ['a, 'a] => bool                 ("(_ =/ _)" [51, 51] 50)
   121   "*All"        :: [idts, bool] => bool             ("(3\\<forall>_./ _)" [0, 10] 10)
   118   "op ~="       :: ['a, 'a] => bool                 ("(_ ~=/ _)" [51, 51] 50)
   122   "*Ex"         :: [idts, bool] => bool             ("(3\\<exists>_./ _)" [0, 10] 10)
       
   123   "*Ex1"        :: [idts, bool] => bool             ("(3\\<exists>!_./ _)" [0, 10] 10)
       
   124 
   119 
   125 syntax (symbols)
   120 syntax (symbols)
   126   Not           :: bool => bool                     ("\\<not> _" [40] 40)
   121   Not           :: bool => bool                     ("\\<not> _" [40] 40)
   127   "op &"        :: [bool, bool] => bool             (infixr "\\<and>" 35)
   122   "op &"        :: [bool, bool] => bool             (infixr "\\<and>" 35)
   128   "op |"        :: [bool, bool] => bool             (infixr "\\<or>" 30)
   123   "op |"        :: [bool, bool] => bool             (infixr "\\<or>" 30)
   134   "? "          :: [idts, bool] => bool             ("(3\\<exists>_./ _)" [0, 10] 10)
   129   "? "          :: [idts, bool] => bool             ("(3\\<exists>_./ _)" [0, 10] 10)
   135   "?! "         :: [idts, bool] => bool             ("(3\\<exists>!_./ _)" [0, 10] 10)
   130   "?! "         :: [idts, bool] => bool             ("(3\\<exists>!_./ _)" [0, 10] 10)
   136   "@case1"      :: ['a, 'b] => case_syn             ("(2_ \\<Rightarrow>/ _)" 10)
   131   "@case1"      :: ['a, 'b] => case_syn             ("(2_ \\<Rightarrow>/ _)" 10)
   137 (*"@case2"      :: [case_syn, cases_syn] => cases_syn   ("_/ \\<orelse> _")*)
   132 (*"@case2"      :: [case_syn, cases_syn] => cases_syn   ("_/ \\<orelse> _")*)
   138 
   133 
       
   134 syntax (symbols output)
       
   135   "op ~="       :: ['a, 'a] => bool                 ("(_ \\<noteq>/ _)" [51, 51] 50)
       
   136   "*All"        :: [idts, bool] => bool             ("(3\\<forall>_./ _)" [0, 10] 10)
       
   137   "*Ex"         :: [idts, bool] => bool             ("(3\\<exists>_./ _)" [0, 10] 10)
       
   138   "*Ex1"        :: [idts, bool] => bool             ("(3\\<exists>!_./ _)" [0, 10] 10)
       
   139 
   139 
   140 
   140 
   141 
   141 (** Rules and definitions **)
   142 (** Rules and definitions **)
   142 
   143 
   143 rules
   144 rules
   176 
   177 
   177   Let_def       "Let s f == f(s)"
   178   Let_def       "Let s f == f(s)"
   178   o_def         "(f::'b=>'c) o g == (%(x::'a). f(g(x)))"
   179   o_def         "(f::'b=>'c) o g == (%(x::'a). f(g(x)))"
   179   if_def        "If P x y == @z::'a. (P=True --> z=x) & (P=False --> z=y)"
   180   if_def        "If P x y == @z::'a. (P=True --> z=x) & (P=False --> z=y)"
   180 
   181 
   181 constdefs arbitrary :: 'a
   182 consts
   182          "arbitrary == @x.False"
   183   arbitrary :: 'a
       
   184 
   183 
   185 
   184 end
   186 end
   185 
   187 
   186 
   188 
   187 ML
   189 ML