src/Pure/thm.ML
changeset 17221 6cd180204582
parent 17203 29b2563f5c11
child 17345 9ea1e2179786
equal deleted inserted replaced
17220:b41d8e290bf8 17221:6cd180204582
   522 
   522 
   523 (*look up the named axiom in the theory or its ancestors*)
   523 (*look up the named axiom in the theory or its ancestors*)
   524 fun get_axiom_i theory name =
   524 fun get_axiom_i theory name =
   525   let
   525   let
   526     fun get_ax thy =
   526     fun get_ax thy =
   527       Symtab.lookup (#2 (#axioms (Theory.rep_theory thy)), name)
   527       Symtab.curried_lookup (#2 (#axioms (Theory.rep_theory thy))) name
   528       |> Option.map (fn prop =>
   528       |> Option.map (fn prop =>
   529           Thm {thy_ref = Theory.self_ref thy,
   529           Thm {thy_ref = Theory.self_ref thy,
   530             der = Pt.infer_derivs' I (false, Pt.axm_proof name prop),
   530             der = Pt.infer_derivs' I (false, Pt.axm_proof name prop),
   531             maxidx = maxidx_of_term prop,
   531             maxidx = maxidx_of_term prop,
   532             shyps = may_insert_term_sorts thy prop [],
   532             shyps = may_insert_term_sorts thy prop [],
  1480 (*** Oracles ***)
  1480 (*** Oracles ***)
  1481 
  1481 
  1482 fun invoke_oracle_i thy1 name =
  1482 fun invoke_oracle_i thy1 name =
  1483   let
  1483   let
  1484     val oracle =
  1484     val oracle =
  1485       (case Symtab.lookup (#2 (#oracles (Theory.rep_theory thy1)), name) of
  1485       (case Symtab.curried_lookup (#2 (#oracles (Theory.rep_theory thy1))) name of
  1486         NONE => raise THM ("Unknown oracle: " ^ name, 0, [])
  1486         NONE => raise THM ("Unknown oracle: " ^ name, 0, [])
  1487       | SOME (f, _) => f);
  1487       | SOME (f, _) => f);
  1488     val thy_ref1 = Theory.self_ref thy1;
  1488     val thy_ref1 = Theory.self_ref thy1;
  1489   in
  1489   in
  1490     fn (thy2, data) =>
  1490     fn (thy2, data) =>