equal
deleted
inserted
replaced
117 val chain_facts = if can Proof.assert_chain state then Proof.the_facts state else []; |
117 val chain_facts = if can Proof.assert_chain state then Proof.the_facts state else []; |
118 |
118 |
119 (*obtain vars*) |
119 (*obtain vars*) |
120 val (vars, vars_ctxt) = prep_vars raw_vars ctxt; |
120 val (vars, vars_ctxt) = prep_vars raw_vars ctxt; |
121 val (xs', fix_ctxt) = vars_ctxt |> Proof_Context.add_fixes vars; |
121 val (xs', fix_ctxt) = vars_ctxt |> Proof_Context.add_fixes vars; |
122 val xs = map (Variable.name o #1) vars; |
122 val xs = map (Variable.check_name o #1) vars; |
123 |
123 |
124 (*obtain asms*) |
124 (*obtain asms*) |
125 val (asms_ctxt, proppss) = prep_propp (fix_ctxt, map snd raw_asms); |
125 val (asms_ctxt, proppss) = prep_propp (fix_ctxt, map snd raw_asms); |
126 val asm_props = maps (map fst) proppss; |
126 val asm_props = maps (map fst) proppss; |
127 val asms = map fst (Attrib.map_specs (prep_att thy) raw_asms) ~~ proppss; |
127 val asms = map fst (Attrib.map_specs (prep_att thy) raw_asms) ~~ proppss; |
253 val rule'' = Thm.forall_elim (cert (Logic.varify_global (Free thesis_var))) rule'; |
253 val rule'' = Thm.forall_elim (cert (Logic.varify_global (Free thesis_var))) rule'; |
254 in ((vars', rule''), ctxt') end; |
254 in ((vars', rule''), ctxt') end; |
255 |
255 |
256 fun inferred_type (binding, _, mx) ctxt = |
256 fun inferred_type (binding, _, mx) ctxt = |
257 let |
257 let |
258 val x = Variable.name binding; |
258 val x = Variable.check_name binding; |
259 val (T, ctxt') = Proof_Context.inferred_param x ctxt |
259 val (T, ctxt') = Proof_Context.inferred_param x ctxt |
260 in ((x, T, mx), ctxt') end; |
260 in ((x, T, mx), ctxt') end; |
261 |
261 |
262 fun polymorphic ctxt vars = |
262 fun polymorphic ctxt vars = |
263 let val Ts = map Logic.dest_type (Variable.polymorphic ctxt (map (Logic.mk_type o #2) vars)) |
263 let val Ts = map Logic.dest_type (Variable.polymorphic ctxt (map (Logic.mk_type o #2) vars)) |