src/HOL/Tools/Meson/meson.ML
changeset 59617 b60e65ad13df
parent 59586 ddf6deaadfe8
child 59621 291934bac95e
equal deleted inserted replaced
59616:eb59c6968219 59617:b60e65ad13df
   350   val spec_varT = Thm.typ_of_cterm spec_var;
   350   val spec_varT = Thm.typ_of_cterm spec_var;
   351   fun name_of (Const (@{const_name All}, _) $ Abs(x,_,_)) = x | name_of _ = Name.uu;
   351   fun name_of (Const (@{const_name All}, _) $ Abs(x,_,_)) = x | name_of _ = Name.uu;
   352 in  
   352 in  
   353   fun freeze_spec th ctxt =
   353   fun freeze_spec th ctxt =
   354     let
   354     let
   355       val cert = Proof_Context.cterm_of ctxt;
       
   356       val ([x], ctxt') =
   355       val ([x], ctxt') =
   357         Variable.variant_fixes [name_of (HOLogic.dest_Trueprop (Thm.concl_of th))] ctxt;
   356         Variable.variant_fixes [name_of (HOLogic.dest_Trueprop (Thm.concl_of th))] ctxt;
   358       val spec' = Thm.instantiate ([], [(spec_var, cert (Free (x, spec_varT)))]) spec;
   357       val spec' = spec
       
   358         |> Thm.instantiate ([], [(spec_var, Proof_Context.cterm_of ctxt' (Free (x, spec_varT)))]);
   359     in (th RS spec', ctxt') end
   359     in (th RS spec', ctxt') end
   360 end;
   360 end;
   361 
   361 
   362 fun apply_skolem_theorem (th, rls) =
   362 fun apply_skolem_theorem (th, rls) =
   363   let
   363   let