src/HOL/Tools/Qelim/cooper.ML
changeset 59848 18c21d5c9138
parent 59657 2441a80fb6c1
child 60352 d46de31a50c4
equal deleted inserted replaced
59847:c5c4a936357a 59848:18c21d5c9138
   529    val inS =
   529    val inS =
   530      let
   530      let
   531       val tab = fold Termtab.update
   531       val tab = fold Termtab.update
   532         (map (fn eq =>
   532         (map (fn eq =>
   533                 let val (s,t) = Thm.cprop_of eq |> Thm.dest_arg |> Thm.dest_binop
   533                 let val (s,t) = Thm.cprop_of eq |> Thm.dest_arg |> Thm.dest_binop
   534                     val th = if Thm.term_of s = Thm.term_of t  (* FIXME equality? *)
   534                     val th =
   535                              then the (Termtab.lookup inStab (Thm.term_of s))
   535                       if s aconvc t
   536                              else FWD (instantiate' [] [SOME s, SOME t] eqelem_th)
   536                       then the (Termtab.lookup inStab (Thm.term_of s))
   537                                 [eq, the (Termtab.lookup inStab (Thm.term_of s))]
   537                       else FWD (instantiate' [] [SOME s, SOME t] eqelem_th)
   538                  in (Thm.term_of t, th) end)
   538                         [eq, the (Termtab.lookup inStab (Thm.term_of s))]
   539                   sths) Termtab.empty
   539                  in (Thm.term_of t, th) end) sths) Termtab.empty
   540         in
   540         in
   541           fn ct => the (Termtab.lookup tab (Thm.term_of ct))
   541           fn ct => the (Termtab.lookup tab (Thm.term_of ct))
   542             handle Option.Option =>
   542             handle Option.Option =>
   543               (writeln ("inS: No theorem for " ^ Syntax.string_of_term ctxt (Thm.term_of ct));
   543               (writeln ("inS: No theorem for " ^ Syntax.string_of_term ctxt (Thm.term_of ct));
   544                 raise Option.Option)
   544                 raise Option.Option)