src/Tools/induct.ML
changeset 32188 005f9abae1e3
parent 32171 220abde9962b
child 32432 64f30bdd3ba1
equal deleted inserted replaced
32187:cca43ca13f4f 32188:005f9abae1e3
   566           induct x       - type induction
   566           induct x       - type induction
   567     ...   induct ... r   - explicit rule
   567     ...   induct ... r   - explicit rule
   568 *)
   568 *)
   569 
   569 
   570 fun get_inductT ctxt insts =
   570 fun get_inductT ctxt insts =
   571   fold_rev multiply (insts |> map
   571   fold_rev (map_product cons) (insts |> map
   572       ((fn [] => NONE | ts => List.last ts) #>
   572       ((fn [] => NONE | ts => List.last ts) #>
   573         (fn NONE => TVar (("'a", 0), []) | SOME t => Term.fastype_of t) #>
   573         (fn NONE => TVar (("'a", 0), []) | SOME t => Term.fastype_of t) #>
   574         find_inductT ctxt)) [[]]
   574         find_inductT ctxt)) [[]]
   575   |> filter_out (forall Thm.is_internal);
   575   |> filter_out (forall Thm.is_internal);
   576 
   576