Theory Inst_Ex_Assn

section ‹Tactic for instantiating existentials›
theory Inst_Ex_Assn
  imports Separation_Logic_Imperative_HOL.Assertions
begin

thm ent_ex_postI

text ‹
  Coinduction proofs in Isabelle often lead to proof obligations with nested conjunctions and
  existential quantifiers, e.g. propx y. P x y  (z. Q x y z) .

  The following tactic allows instantiating these existentials with a given list of witnesses.

  This tactic was adjusted to work with the assertion specific propA

ML_file ‹inst_ex_assn.ML›

method_setup inst_ex_assn = Scan.lift (Scan.repeat Parse.term) >> 
    (fn ts => fn ctxt => SIMPLE_METHOD' (Inst_Ex_Assn.tac ctxt 
       (map (Syntax.read_term ctxt)  ts)))

end