src/Pure/more_thm.ML
changeset 74566 8e0f0317e266
parent 74561 8e6c973003c8
child 76082 1202e29798a4
equal deleted inserted replaced
74565:11b8f026d6ce 74566:8e0f0317e266
    23   val aconvc: cterm * cterm -> bool
    23   val aconvc: cterm * cterm -> bool
    24   val add_tvars: thm -> ctyp TVars.table -> ctyp TVars.table
    24   val add_tvars: thm -> ctyp TVars.table -> ctyp TVars.table
    25   val add_vars: thm -> cterm Vars.table -> cterm Vars.table
    25   val add_vars: thm -> cterm Vars.table -> cterm Vars.table
    26   val dest_funT: ctyp -> ctyp * ctyp
    26   val dest_funT: ctyp -> ctyp * ctyp
    27   val strip_type: ctyp -> ctyp list * ctyp
    27   val strip_type: ctyp -> ctyp list * ctyp
       
    28   val instantiate_ctyp: ctyp TVars.table -> ctyp -> ctyp
    28   val all_name: Proof.context -> string * cterm -> cterm -> cterm
    29   val all_name: Proof.context -> string * cterm -> cterm -> cterm
    29   val all: Proof.context -> cterm -> cterm -> cterm
    30   val all: Proof.context -> cterm -> cterm -> cterm
    30   val mk_binop: cterm -> cterm -> cterm -> cterm
    31   val mk_binop: cterm -> cterm -> cterm -> cterm
    31   val dest_binop: cterm -> cterm * cterm
    32   val dest_binop: cterm -> cterm * cterm
    32   val dest_implies: cterm -> cterm * cterm
    33   val dest_implies: cterm -> cterm * cterm
   154         val (cT1, cT2) = dest_funT cT;
   155         val (cT1, cT2) = dest_funT cT;
   155         val (cTs, cT') = strip_type cT2
   156         val (cTs, cT') = strip_type cT2
   156       in (cT1 :: cTs, cT') end
   157       in (cT1 :: cTs, cT') end
   157   | _ => ([], cT));
   158   | _ => ([], cT));
   158 
   159 
       
   160 fun instantiate_ctyp instT cT =
       
   161   Thm.instantiate_cterm (instT, Vars.empty) (Thm.var (("x", 0), cT))
       
   162   |> Thm.ctyp_of_cterm;
       
   163 
   159 
   164 
   160 (* cterm operations *)
   165 (* cterm operations *)
   161 
   166 
   162 fun all_name ctxt (x, t) A =
   167 fun all_name ctxt (x, t) A =
   163   let
   168   let