src/HOL/Tools/Predicate_Compile/predicate_compile_pred.ML
changeset 51552 c713c9505f68
parent 50056 72efd6b4038d
child 51717 9e7d1c139569
equal deleted inserted replaced
51551:88d1d19fb74f 51552:c713c9505f68
   125         end
   125         end
   126 
   126 
   127 
   127 
   128 fun flatten_intros constname intros thy =
   128 fun flatten_intros constname intros thy =
   129   let
   129   let
   130     val ctxt = Proof_Context.init_global thy
   130     val ctxt = Proof_Context.init_global thy  (* FIXME proper context!? *)
   131     val ((_, intros), ctxt') = Variable.import true intros ctxt
   131     val ((_, intros), ctxt') = Variable.import true intros ctxt
   132     val (intros', (local_defs, thy')) = (fold_map o fold_map_atoms)
   132     val (intros', (local_defs, thy')) = (fold_map o fold_map_atoms)
   133       (flatten constname) (map prop_of intros) ([], thy)
   133       (flatten constname) (map prop_of intros) ([], thy)
   134     val ctxt'' = Proof_Context.transfer thy' ctxt'
   134     val ctxt'' = Proof_Context.transfer thy' ctxt'
   135     val tac = fn _ => Skip_Proof.cheat_tac thy'
   135     val intros'' =
   136     val intros'' = map (fn t => Goal.prove ctxt'' [] [] t tac) intros'
   136       map (fn t => Goal.prove ctxt'' [] [] t (fn _ => ALLGOALS Skip_Proof.cheat_tac)) intros'
   137       |> Variable.export ctxt'' ctxt
   137       |> Variable.export ctxt'' ctxt
   138   in
   138   in
   139     (intros'', (local_defs, thy'))
   139     (intros'', (local_defs, thy'))
   140   end
   140   end
   141 
   141