equal
deleted
inserted
replaced
186 end |
186 end |
187 |
187 |
188 |
188 |
189 fun mk_ind_goal ctxt branches = |
189 fun mk_ind_goal ctxt branches = |
190 let |
190 let |
191 val thy = Proof_Context.theory_of ctxt |
|
192 |
|
193 fun brnch (SchemeBranch { P, xs, ws, Cs, ... }) = |
191 fun brnch (SchemeBranch { P, xs, ws, Cs, ... }) = |
194 HOLogic.mk_Trueprop (list_comb (P, map Free xs)) |
192 HOLogic.mk_Trueprop (list_comb (P, map Free xs)) |
195 |> fold_rev (curry Logic.mk_implies) Cs |
193 |> fold_rev (curry Logic.mk_implies) Cs |
196 |> fold_rev (Logic.all o Free) ws |
194 |> fold_rev (Logic.all o Free) ws |
197 |> term_conv ctxt (ind_atomize ctxt) |
195 |> term_conv ctxt (ind_atomize ctxt) |
198 |> Object_Logic.drop_judgment thy |
196 |> Object_Logic.drop_judgment ctxt |
199 |> HOLogic.tupled_lambda (foldr1 HOLogic.mk_prod (map Free xs)) |
197 |> HOLogic.tupled_lambda (foldr1 HOLogic.mk_prod (map Free xs)) |
200 in |
198 in |
201 Sum_Tree.mk_sumcases HOLogic.boolT (map brnch branches) |
199 Sum_Tree.mk_sumcases HOLogic.boolT (map brnch branches) |
202 end |
200 end |
203 |
201 |