src/HOL/Real_Asymp/inst_existentials.ML
author desharna
Thu, 24 Nov 2022 10:02:26 +0100
changeset 76574 7bc934b99faf
parent 68630 c55f6f0b3854
permissions -rw-r--r--
added lemmas asym_if_irrefl_and_trans and asymp_if_irreflp_and_transp

signature INST_EXISTENTIALS =
sig
  val tac : Proof.context -> term list -> int -> tactic
end

structure Inst_Existentials : INST_EXISTENTIALS =
struct

fun tac ctxt [] = TRY o REPEAT_ALL_NEW (resolve_tac ctxt @{thms HOL.conjI})
  | tac ctxt (t :: ts) =
      (TRY o REPEAT_ALL_NEW (resolve_tac ctxt @{thms HOL.conjI}))
      THEN_ALL_NEW (TRY o (
        let
          val thm = Drule.infer_instantiate' ctxt [NONE, SOME (Thm.cterm_of ctxt t)] @{thm HOL.exI}
        in
          resolve_tac ctxt [thm] THEN' tac ctxt ts
        end))

end