src/HOL/Tools/Metis/metis_tactic.ML
changeset 59586 ddf6deaadfe8
parent 59582 0fbed69ff081
child 59621 291934bac95e
equal deleted inserted replaced
59585:68a770a8a09f 59586:ddf6deaadfe8
    47   let val thy = Proof_Context.theory_of ctxt in
    47   let val thy = Proof_Context.theory_of ctxt in
    48     (case hol_clause_of_metis ctxt type_enc sym_tab concealed mth of
    48     (case hol_clause_of_metis ctxt type_enc sym_tab concealed mth of
    49       Const (@{const_name HOL.eq}, _) $ _ $ t =>
    49       Const (@{const_name HOL.eq}, _) $ _ $ t =>
    50       let
    50       let
    51         val ct = Thm.cterm_of thy t
    51         val ct = Thm.cterm_of thy t
    52         val cT = Thm.ctyp_of_term ct
    52         val cT = Thm.ctyp_of_cterm ct
    53       in refl |> Drule.instantiate' [SOME cT] [SOME ct] end
    53       in refl |> Drule.instantiate' [SOME cT] [SOME ct] end
    54     | Const (@{const_name disj}, _) $ t1 $ t2 =>
    54     | Const (@{const_name disj}, _) $ t1 $ t2 =>
    55       (if can HOLogic.dest_not t1 then t2 else t1)
    55       (if can HOLogic.dest_not t1 then t2 else t1)
    56       |> HOLogic.mk_Trueprop |> Thm.cterm_of thy |> Thm.trivial
    56       |> HOLogic.mk_Trueprop |> Thm.cterm_of thy |> Thm.trivial
    57     | _ => raise Fail "expected reflexive or trivial clause")
    57     | _ => raise Fail "expected reflexive or trivial clause")