src/HOL/Tools/function_package/fundef_common.ML
changeset 19583 c5fa77b03442
parent 19564 d3e2f532459a
child 19612 1e133047809a
equal deleted inserted replaced
19582:a669c98b9c24 19583:c5fa77b03442
    27 
    27 
    28 
    28 
    29 
    29 
    30 (* A record containing all the relevant symbols and types needed during the proof.
    30 (* A record containing all the relevant symbols and types needed during the proof.
    31    This is set up at the beginning and does not change. *)
    31    This is set up at the beginning and does not change. *)
    32 type naming_context =
    32 datatype naming_context =
    33      { f: term, fvarname: string, fvar: term, domT: typ, ranT: typ,
    33    Names of { f: term, fvarname: string, fvar: term, domT: typ, ranT: typ,
    34        G: term, R: term, acc_R: term, h: term, y: term, x: term, z: term, a:term, P: term, 
    34        G: term, R: term, acc_R: term, h: term, y: term, x: term, z: term, a:term, P: term, 
    35        D: term, Pbool:term,
    35        D: term, Pbool:term,
    36        glrs: (term list * term list * term * term) list,
    36        glrs: (term list * term list * term * term) list,
    37        glrs': (term list * term list * term * term) list,
    37        glrs': (term list * term list * term * term) list,
    38        f_def: thm,
    38        f_def: thm,
    39        used: string list,
    39        used: string list,
    40        trees: ctx_tree list
    40        trees: ctx_tree list
    41      }
    41      }
    42 
    42 
    43 
    43 
    44 type rec_call_info = 
    44 datatype rec_call_info = 
    45      {RI: thm, RIvs: (string * typ) list, lRI: thm, lRIq: thm, Gh: thm, Gh': thm} 
    45   RCInfo of {RI: thm, RIvs: (string * typ) list, lRI: thm, lRIq: thm, Gh: thm, Gh': thm} 
    46 
    46 
    47 type clause_info =
    47 datatype clause_info =
       
    48   ClauseInfo of 
    48      {
    49      {
    49       no: int,
    50       no: int,
    50 
    51 
    51       qs: term list, 
    52       qs: term list, 
    52       gs: term list,
    53       gs: term list,
    70       tree: ctx_tree,
    71       tree: ctx_tree,
    71       case_hyp: thm
    72       case_hyp: thm
    72      }
    73      }
    73 
    74 
    74 
    75 
    75 type curry_info =
    76 datatype curry_info =
    76      { argTs: typ list, curry_ss: simpset }
    77   Curry of { argTs: typ list, curry_ss: simpset }
    77 
    78 
    78 
    79 
    79 type prep_result =
    80 datatype prep_result =
       
    81   Prep of
    80      {
    82      {
    81       names: naming_context, 
    83       names: naming_context, 
    82       complete : term,
    84       complete : term,
    83       compat : term list,
    85       compat : term list,
    84       clauses: clause_info list
    86       clauses: clause_info list
    85      }
    87      }
    86 
    88 
    87 type fundef_result =
    89 datatype fundef_result =
       
    90   FundefResult of
    88      {
    91      {
    89       f: term,
    92       f: term,
    90       G : term,
    93       G : term,
    91       R : term,
    94       R : term,
    92       completeness : thm,
    95       completeness : thm,