equal
deleted
inserted
replaced
369 fun add_shyps shyps tab = fold (fn h => fn tab => Sorttab.update (h, ()) tab) shyps tab |
369 fun add_shyps shyps tab = fold (fn h => fn tab => Sorttab.update (h, ()) tab) shyps tab |
370 |
370 |
371 fun merge_shyps shyps1 shyps2 = Sorttab.keys (add_shyps shyps2 (add_shyps shyps1 Sorttab.empty)) |
371 fun merge_shyps shyps1 shyps2 = Sorttab.keys (add_shyps shyps2 (add_shyps shyps1 Sorttab.empty)) |
372 |
372 |
373 val (_, export_oracle) = Context.>>> (Context.map_theory_result |
373 val (_, export_oracle) = Context.>>> (Context.map_theory_result |
374 (Thm.add_oracle (Binding.name "compute", fn (thy, hyps, shyps, prop) => |
374 (Thm.add_oracle (@{binding compute}, fn (thy, hyps, shyps, prop) => |
375 let |
375 let |
376 val shyptab = add_shyps shyps Sorttab.empty |
376 val shyptab = add_shyps shyps Sorttab.empty |
377 fun delete s shyptab = Sorttab.delete s shyptab handle Sorttab.UNDEF _ => shyptab |
377 fun delete s shyptab = Sorttab.delete s shyptab handle Sorttab.UNDEF _ => shyptab |
378 fun delete_term t shyptab = fold delete (Sorts.insert_term t []) shyptab |
378 fun delete_term t shyptab = fold delete (Sorts.insert_term t []) shyptab |
379 fun has_witness s = not (null (Sign.witness_sorts thy [] [s])) |
379 fun has_witness s = not (null (Sign.witness_sorts thy [] [s])) |