src/Pure/Isar/auto_bind.ML
changeset 8227 d67db92897df
parent 7675 c859160e78b0
child 8612 e8ef58d6d6eb
     1.1 --- a/src/Pure/Isar/auto_bind.ML	Thu Feb 10 11:08:42 2000 +0100
     1.2 +++ b/src/Pure/Isar/auto_bind.ML	Thu Feb 10 13:34:38 2000 +0100
     1.3 @@ -4,8 +4,8 @@
     1.4  
     1.5  Automatic term bindings -- logic specific patterns.
     1.6  
     1.7 -The implementation below works fine with the more common
     1.8 -object-logics, such as HOL, ZF.
     1.9 +Note: the current implementation is not quite 'generic', but works
    1.10 +fine with the more common object-logics (HOL, FOL, ZF etc.).
    1.11  *)
    1.12  
    1.13  signature AUTO_BIND =
    1.14 @@ -13,6 +13,8 @@
    1.15    val goal: term -> (indexname * term option) list
    1.16    val facts: string -> term list -> (indexname * term option) list
    1.17    val atomic_thesis: term -> (string * term) * term
    1.18 +  val add_judgment: bstring * string * mixfix -> theory -> theory
    1.19 +  val add_judgment_i: bstring * typ * mixfix -> theory -> theory
    1.20  end;
    1.21  
    1.22  structure AutoBind: AUTO_BIND =
    1.23 @@ -22,6 +24,8 @@
    1.24  val thisN = "this";
    1.25  
    1.26  
    1.27 +(** bindings **)
    1.28 +
    1.29  (* goal *)
    1.30  
    1.31  fun statement_binds (name, prop) =
    1.32 @@ -55,6 +59,14 @@
    1.33  
    1.34  fun atomic_thesis ((c as Const ("Trueprop", _)) $ t) = ((thesisN, t), c $ mk_free t)
    1.35    | atomic_thesis t = ((thesisN, t), mk_free t);
    1.36 -      
    1.37 +
    1.38 +
    1.39 +(** judgment **)
    1.40 +
    1.41 +fun gen_add_judgment add args = PureThy.local_path o add [args] o PureThy.global_path;
    1.42 +
    1.43 +val add_judgment = gen_add_judgment Theory.add_consts;
    1.44 +val add_judgment_i = gen_add_judgment Theory.add_consts_i;
    1.45 +
    1.46  
    1.47  end;