# HG changeset patch # User wenzelm # Date 1635190295 -7200 # Node ID 882de99c7c833787d04a8d113fa578b04bf27f08 # Parent e5b38bb5a147e660913e5c6978fd699d770dd73d more antiquotations; diff -r e5b38bb5a147 -r 882de99c7c83 src/Doc/Codegen/Computations.thy --- a/src/Doc/Codegen/Computations.thy Mon Oct 25 20:38:58 2021 +0200 +++ b/src/Doc/Codegen/Computations.thy Mon Oct 25 21:31:35 2021 +0200 @@ -272,8 +272,9 @@ ML %quote \ local - fun raw_dvd (b, ct) = Thm.mk_binop \<^cterm>\Pure.eq :: bool \ bool \ prop\ - ct (if b then \<^cterm>\True\ else \<^cterm>\False\); + fun raw_dvd (b, ct) = + \<^instantiate>\x = ct and y = \if b then \<^cterm>\True\ else \<^cterm>\False\\ + in cterm "x \ y" for x y :: bool\; val (_, dvd_oracle) = Context.>>> (Context.map_theory_result (Thm.add_oracle (\<^binding>\dvd\, raw_dvd))); diff -r e5b38bb5a147 -r 882de99c7c83 src/HOL/ex/Sorting_Algorithms_Examples.thy --- a/src/HOL/ex/Sorting_Algorithms_Examples.thy Mon Oct 25 20:38:58 2021 +0200 +++ b/src/HOL/ex/Sorting_Algorithms_Examples.thy Mon Oct 25 21:31:35 2021 +0200 @@ -23,8 +23,9 @@ val term_of_int_list = HOLogic.mk_list \<^typ>\int\ o map (HOLogic.mk_number \<^typ>\int\ o @{code integer_of_int}); - fun raw_sort (ctxt, ct, ks) = Thm.mk_binop \<^cterm>\Pure.eq :: int list \ int list \ prop\ - ct (Thm.cterm_of ctxt (term_of_int_list ks)); + fun raw_sort (ctxt, ct, ks) = + \<^instantiate>\x = ct and y = \Thm.cterm_of ctxt (term_of_int_list ks)\ + in cterm "x \ y" for x y :: "int list"\; val (_, sort_oracle) = Context.>>> (Context.map_theory_result (Thm.add_oracle (\<^binding>\sort\, raw_sort)));