equal
deleted
inserted
replaced
222 fun pretty_statement ctxt kind raw_th = |
222 fun pretty_statement ctxt kind raw_th = |
223 let |
223 let |
224 val thy = ProofContext.theory_of ctxt; |
224 val thy = ProofContext.theory_of ctxt; |
225 val cert = Thm.cterm_of thy; |
225 val cert = Thm.cterm_of thy; |
226 |
226 |
227 val th = MetaSimplifier.norm_hhf raw_th; |
227 val th = Raw_Simplifier.norm_hhf raw_th; |
228 val is_elim = Object_Logic.is_elim th; |
228 val is_elim = Object_Logic.is_elim th; |
229 |
229 |
230 val ((_, [th']), ctxt') = Variable.import true [th] (Variable.set_body false ctxt); |
230 val ((_, [th']), ctxt') = Variable.import true [th] (Variable.set_body false ctxt); |
231 val prop = Thm.prop_of th'; |
231 val prop = Thm.prop_of th'; |
232 val (prems, concl) = Logic.strip_horn prop; |
232 val (prems, concl) = Logic.strip_horn prop; |
316 (Conv.fconv_rule Drule.beta_eta_conversion |
316 (Conv.fconv_rule Drule.beta_eta_conversion |
317 (Thm.instantiate (Thm.match (Thm.cprop_of th', A)) th')) |
317 (Thm.instantiate (Thm.match (Thm.cprop_of th', A)) th')) |
318 end; |
318 end; |
319 |
319 |
320 fun conclude_witness (Witness (_, th)) = |
320 fun conclude_witness (Witness (_, th)) = |
321 Thm.close_derivation (MetaSimplifier.norm_hhf_protect (Goal.conclude th)); |
321 Thm.close_derivation (Raw_Simplifier.norm_hhf_protect (Goal.conclude th)); |
322 |
322 |
323 fun pretty_witness ctxt witn = |
323 fun pretty_witness ctxt witn = |
324 let val prt_term = Pretty.quote o Syntax.pretty_term ctxt in |
324 let val prt_term = Pretty.quote o Syntax.pretty_term ctxt in |
325 Pretty.block (prt_term (witness_prop witn) :: |
325 Pretty.block (prt_term (witness_prop witn) :: |
326 (if Config.get ctxt show_hyps then [Pretty.brk 2, Pretty.list "[" "]" |
326 (if Config.get ctxt show_hyps then [Pretty.brk 2, Pretty.list "[" "]" |
457 (* rewriting with equalities *) |
457 (* rewriting with equalities *) |
458 |
458 |
459 fun eq_morphism thy thms = if null thms then NONE else SOME (Morphism.morphism |
459 fun eq_morphism thy thms = if null thms then NONE else SOME (Morphism.morphism |
460 {binding = I, |
460 {binding = I, |
461 typ = I, |
461 typ = I, |
462 term = MetaSimplifier.rewrite_term thy thms [], |
462 term = Raw_Simplifier.rewrite_term thy thms [], |
463 fact = map (MetaSimplifier.rewrite_rule thms)}); |
463 fact = map (Raw_Simplifier.rewrite_rule thms)}); |
464 |
464 |
465 |
465 |
466 (* transfer to theory using closure *) |
466 (* transfer to theory using closure *) |
467 |
467 |
468 fun transfer_morphism thy = |
468 fun transfer_morphism thy = |