145 (Var ((s, 0), T')) (AbsP ("H", SOME p, prf))) |
145 (Var ((s, 0), T')) (AbsP ("H", SOME p, prf))) |
146 end |
146 end |
147 | _ => AbsP ("H", SOME p, prf))) |
147 | _ => AbsP ("H", SOME p, prf))) |
148 (rec_fns ~~ Thm.prems_of thm) |
148 (rec_fns ~~ Thm.prems_of thm) |
149 (Proofterm.proof_combP |
149 (Proofterm.proof_combP |
150 (Reconstruct.proof_of thm', map PBound (length prems - 1 downto 0)))); |
150 (Reconstruct.proof_of thy' thm', map PBound (length prems - 1 downto 0)))); |
151 |
151 |
152 val r' = |
152 val r' = |
153 if null is then r |
153 if null is then r |
154 else |
154 else |
155 Logic.varify_global (fold_rev lambda |
155 Logic.varify_global (fold_rev lambda |
210 (fold_rev (fn (p, r) => fn prf => |
210 (fold_rev (fn (p, r) => fn prf => |
211 Proofterm.forall_intr_proof' (Logic.varify_global r) |
211 Proofterm.forall_intr_proof' (Logic.varify_global r) |
212 (AbsP ("H", SOME (Logic.varify_global p), prf))) |
212 (AbsP ("H", SOME (Logic.varify_global p), prf))) |
213 (prems ~~ rs) |
213 (prems ~~ rs) |
214 (Proofterm.proof_combP |
214 (Proofterm.proof_combP |
215 (Reconstruct.proof_of thm', map PBound (length prems - 1 downto 0)))); |
215 (Reconstruct.proof_of thy' thm', map PBound (length prems - 1 downto 0)))); |
216 val prf' = |
216 val prf' = |
217 Extraction.abs_corr_shyps thy' exhaust [] |
217 Extraction.abs_corr_shyps thy' exhaust [] |
218 (map Var (Term.add_vars (Thm.prop_of exhaust) [])) (Reconstruct.proof_of exhaust); |
218 (map Var (Term.add_vars (Thm.prop_of exhaust) [])) (Reconstruct.proof_of thy' exhaust); |
219 val r' = |
219 val r' = |
220 Logic.varify_global (Abs ("y", T, |
220 Logic.varify_global (Abs ("y", T, |
221 (fold_rev (Term.abs o dest_Free) rs |
221 (fold_rev (Term.abs o dest_Free) rs |
222 (list_comb (r, map Bound ((length rs - 1 downto 0) @ [length rs])))))); |
222 (list_comb (r, map Bound ((length rs - 1 downto 0) @ [length rs])))))); |
223 in |
223 in |