251 in |
251 in |
252 make_nnf_not_not OF [thm1] |
252 make_nnf_not_not OF [thm1] |
253 end |
253 end |
254 | make_nnf_thm thy t = inst_thm thy [t] iff_refl; |
254 | make_nnf_thm thy t = inst_thm thy [t] iff_refl; |
255 |
255 |
256 val meta_eq_to_obj_eq = @{thm meta_eq_to_obj_eq} |
|
257 val eq_reflection = @{thm eq_reflection} |
|
258 |
|
259 fun make_under_quantifiers ctxt make t = |
256 fun make_under_quantifiers ctxt make t = |
260 let |
257 let |
261 fun conv ctxt ct = |
258 fun conv ctxt ct = |
262 (case Thm.term_of ct of |
259 (case Thm.term_of ct of |
263 Const _ $ Abs _ => Conv.comb_conv (conv ctxt) ct |
260 Const _ $ Abs _ => Conv.comb_conv (conv ctxt) ct |
264 | Abs _ => Conv.abs_conv (conv o snd) ctxt ct |
261 | Abs _ => Conv.abs_conv (conv o snd) ctxt ct |
265 | Const _ => Conv.all_conv ct |
262 | Const _ => Conv.all_conv ct |
266 | t => make t RS eq_reflection) |
263 | t => make t RS @{thm eq_reflection}) |
267 in conv ctxt (Thm.cterm_of ctxt t) RS meta_eq_to_obj_eq end |
264 in HOLogic.mk_obj_eq (conv ctxt (Thm.cterm_of ctxt t)) end |
268 |
265 |
269 fun make_nnf_thm_under_quantifiers ctxt = |
266 fun make_nnf_thm_under_quantifiers ctxt = |
270 make_under_quantifiers ctxt (make_nnf_thm (Proof_Context.theory_of ctxt)) |
267 make_under_quantifiers ctxt (make_nnf_thm (Proof_Context.theory_of ctxt)) |
271 |
268 |
272 (* ------------------------------------------------------------------------- *) |
269 (* ------------------------------------------------------------------------- *) |