# HG changeset patch # User wenzelm # Date 1703101737 -3600 # Node ID f321ab14dd940bfa128dc81a7bd2c746225b422f # Parent dbfe6d1fdfb6ee8d6a95f1594de8551cb26ae64d tuned names; diff -r dbfe6d1fdfb6 -r f321ab14dd94 src/Pure/thm.ML --- a/src/Pure/thm.ML Wed Dec 20 20:28:55 2023 +0100 +++ b/src/Pure/thm.ML Wed Dec 20 20:48:57 2023 +0100 @@ -1149,17 +1149,17 @@ (*** Oracles ***) -fun add_oracle (b, oracle_fn) thy = +fun add_oracle (b, oracle_fn) thy1 = let - val (name, oracles') = Name_Space.define (Context.Theory thy) true (b, ()) (get_oracles thy); - val thy' = map_oracles (K oracles') thy; + val (name, oracles') = Name_Space.define (Context.Theory thy1) true (b, ()) (get_oracles thy1); + val thy2 = map_oracles (K oracles') thy1; fun invoke_oracle arg = let val ct as Cterm {cert = cert2, t = prop, T, maxidx, sorts} = oracle_fn arg in if T <> propT then raise THM ("Oracle's result must have type prop: " ^ name, 0, []) else let - val cert = Context.join_certificate (Context.Certificate thy', cert2); + val cert = Context.join_certificate (Context.Certificate thy2, cert2); val proofs = Proofterm.get_proofs_level (); val oracle = if Proofterm.oracle_enabled proofs @@ -1172,9 +1172,9 @@ val zproof = if Proofterm.zproof_enabled proofs then let - val thy'' = Context.certificate_theory cert handle ERROR msg => - raise CONTEXT (msg, [], [ct], [], SOME (Context.Theory thy')); - in ZTerm.oracle_proof thy'' name prop end + val thy = Context.certificate_theory cert handle ERROR msg => + raise CONTEXT (msg, [], [ct], [], SOME (Context.Theory thy2)); + in ZTerm.oracle_proof thy name prop end else ZDummy; in Thm (make_deriv [] [oracle] [] [] zproof proof, @@ -1188,7 +1188,7 @@ prop = prop}) end end; - in ((name, invoke_oracle), thy') end; + in ((name, invoke_oracle), thy2) end; val oracle_space = Name_Space.space_of_table o get_oracles;