equal
deleted
inserted
replaced
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 |