equal
deleted
inserted
replaced
65 let |
65 let |
66 val iTs = OldTerm.term_tvars (prop_of (hd intrs)); |
66 val iTs = OldTerm.term_tvars (prop_of (hd intrs)); |
67 val Tvs = map TVar iTs; |
67 val Tvs = map TVar iTs; |
68 val (Const (s, _), ts) = strip_comb (HOLogic.dest_Trueprop |
68 val (Const (s, _), ts) = strip_comb (HOLogic.dest_Trueprop |
69 (Logic.strip_imp_concl (prop_of (hd intrs)))); |
69 (Logic.strip_imp_concl (prop_of (hd intrs)))); |
70 val params = map dest_Var (Library.take (nparms, ts)); |
70 val params = map dest_Var ((uncurry take) (nparms, ts)); |
71 val tname = Binding.name (space_implode "_" (Long_Name.base_name s ^ "T" :: vs)); |
71 val tname = Binding.name (space_implode "_" (Long_Name.base_name s ^ "T" :: vs)); |
72 fun constr_of_intr intr = (Binding.name (Long_Name.base_name (name_of_thm intr)), |
72 fun constr_of_intr intr = (Binding.name (Long_Name.base_name (name_of_thm intr)), |
73 map (Logic.unvarifyT o snd) (subtract (op =) params (rev (Term.add_vars (prop_of intr) []))) @ |
73 map (Logic.unvarifyT o snd) (subtract (op =) params (rev (Term.add_vars (prop_of intr) []))) @ |
74 filter_out (equal Extraction.nullT) (map |
74 filter_out (equal Extraction.nullT) (map |
75 (Logic.unvarifyT o Extraction.etype_of thy vs []) (prems_of intr)), |
75 (Logic.unvarifyT o Extraction.etype_of thy vs []) (prems_of intr)), |