src/HOL/Tools/res_axioms.ML
changeset 33522 737589bb9bb8
parent 33339 d41f77196338
child 33832 cff42395c246
equal deleted inserted replaced
33521:a4c54218be62 33522:737589bb9bb8
   347     in  cnfs |> map combinators |> Variable.export ctxt2 ctxt0 |> Meson.finish_cnf  end
   347     in  cnfs |> map combinators |> Variable.export ctxt2 ctxt0 |> Meson.finish_cnf  end
   348     handle THM _ => [];
   348     handle THM _ => [];
   349 
   349 
   350 (*The cache prevents repeated clausification of a theorem, and also repeated declaration of
   350 (*The cache prevents repeated clausification of a theorem, and also repeated declaration of
   351   Skolem functions.*)
   351   Skolem functions.*)
   352 structure ThmCache = TheoryDataFun
   352 structure ThmCache = Theory_Data
   353 (
   353 (
   354   type T = thm list Thmtab.table * unit Symtab.table;
   354   type T = thm list Thmtab.table * unit Symtab.table;
   355   val empty = (Thmtab.empty, Symtab.empty);
   355   val empty = (Thmtab.empty, Symtab.empty);
   356   val copy = I;
       
   357   val extend = I;
   356   val extend = I;
   358   fun merge _ ((cache1, seen1), (cache2, seen2)) : T =
   357   fun merge ((cache1, seen1), (cache2, seen2)) : T =
   359     (Thmtab.merge (K true) (cache1, cache2), Symtab.merge (K true) (seen1, seen2));
   358     (Thmtab.merge (K true) (cache1, cache2), Symtab.merge (K true) (seen1, seen2));
   360 );
   359 );
   361 
   360 
   362 val lookup_cache = Thmtab.lookup o #1 o ThmCache.get;
   361 val lookup_cache = Thmtab.lookup o #1 o ThmCache.get;
   363 val already_seen = Symtab.defined o #2 o ThmCache.get;
   362 val already_seen = Symtab.defined o #2 o ThmCache.get;