src/Pure/goal.ML
changeset 74200 17090e27aae9
parent 70494 41108e3e9ca5
child 74232 1091880266e5
equal deleted inserted replaced
74198:f54b061c2c22 74200:17090e27aae9
   118 
   118 
   119     val xs = map Free (fold Term.add_frees (prop :: As) []);
   119     val xs = map Free (fold Term.add_frees (prop :: As) []);
   120     val fixes = map (Thm.cterm_of ctxt) xs;
   120     val fixes = map (Thm.cterm_of ctxt) xs;
   121 
   121 
   122     val tfrees = fold Term.add_tfrees (prop :: As) [];
   122     val tfrees = fold Term.add_tfrees (prop :: As) [];
       
   123     val tfrees_set = fold (Symtab.insert_set o #1) tfrees Symtab.empty;
   123     val instT = map (fn (a, S) => (((a, 0), S), Thm.ctyp_of ctxt (TFree (a, S)))) tfrees;
   124     val instT = map (fn (a, S) => (((a, 0), S), Thm.ctyp_of ctxt (TFree (a, S)))) tfrees;
   124 
   125 
   125     val global_prop =
   126     val global_prop =
   126       Logic.varify_types_global (fold_rev Logic.all xs (Logic.list_implies (As, prop)))
   127       Logic.varify_types_global (fold_rev Logic.all xs (Logic.list_implies (As, prop)))
   127       |> Thm.cterm_of ctxt
   128       |> Thm.cterm_of ctxt
   129     val global_result = result |> Future.map
   130     val global_result = result |> Future.map
   130       (Drule.flexflex_unique (SOME ctxt) #>
   131       (Drule.flexflex_unique (SOME ctxt) #>
   131         Drule.implies_intr_list assms #>
   132         Drule.implies_intr_list assms #>
   132         Drule.forall_intr_list fixes #>
   133         Drule.forall_intr_list fixes #>
   133         Thm.adjust_maxidx_thm ~1 #>
   134         Thm.adjust_maxidx_thm ~1 #>
   134         Thm.generalize (map #1 tfrees, []) 0 #>
   135         Thm.generalize (tfrees_set, Symtab.empty) 0 #>
   135         Thm.strip_shyps #>
   136         Thm.strip_shyps #>
   136         Thm.solve_constraints);
   137         Thm.solve_constraints);
   137     val local_result =
   138     val local_result =
   138       Thm.future global_result global_prop
   139       Thm.future global_result global_prop
   139       |> Thm.close_derivation \<^here>
   140       |> Thm.close_derivation \<^here>