src/HOL/Tools/Function/induction_scheme.ML
changeset 33083 1fad3160d873
parent 33063 4d462963a7db
child 33099 b8cdd3d73022
equal deleted inserted replaced
33082:ccefc096abc9 33083:1fad3160d873
   242       val aihyp = assume ihyp
   242       val aihyp = assume ihyp
   243 
   243 
   244      (* Rule for case splitting along the sum types *)
   244      (* Rule for case splitting along the sum types *)
   245       val xss = map (fn (SchemeBranch { xs, ... }) => map Free xs) branches
   245       val xss = map (fn (SchemeBranch { xs, ... }) => map Free xs) branches
   246       val pats = map_index (uncurry inject) xss
   246       val pats = map_index (uncurry inject) xss
   247       val sum_split_rule = FundefDatatype.prove_completeness thy [x] (P_comp $ x) xss (map single pats)
   247       val sum_split_rule = Pat_Completeness.prove_completeness thy [x] (P_comp $ x) xss (map single pats)
   248 
   248 
   249       fun prove_branch (bidx, (SchemeBranch { P, xs, ws, Cs, ... }, (complete_thm, pat))) =
   249       fun prove_branch (bidx, (SchemeBranch { P, xs, ws, Cs, ... }, (complete_thm, pat))) =
   250           let
   250           let
   251             val fxs = map Free xs
   251             val fxs = map Free xs
   252             val branch_hyp = assume (cert (HOLogic.mk_Trueprop (HOLogic.mk_eq (x, pat))))
   252             val branch_hyp = assume (cert (HOLogic.mk_Trueprop (HOLogic.mk_eq (x, pat))))