We present PGT, a Proof Goal Transformer for Isabelle/HOL. Given a proof goal and its background context, PGT attempts to generate conjectures from the original goal by transforming the original proof goal. These conjectures should be weak enough to be provable by automation but sufficiently strong to prove the original goal. By incorporating PGT into the pre-existing PSL framework, we exploit Isabelle's strong automation to identify and prove such conjectures.
IntroductionConsider the following two reverse functions defined in literature [9]: primrec itrev:: "'a list 'a list 'a list" where "itrev [] ys = ys" | "itrev (x#xs) ys = itrev xs (x#ys)" primrec rev :: "'a list 'a list" where "rev [] = []" | "rev (x # xs) = rev xs @ [x]"How would you prove their equivalence "itrev xs [] = rev xs"? Induction comes to mind. However, it turns out that Isabelle's default proof methods, induct and induct_tac, are unable to handle this proof goal effectively. Previously, we developed PSL [8], a programmable, meta-tool framework for Isabelle/HOL. With PSL one can write the following strategy for induction:strategy DInd = Thens [Dynamic (Induct), Auto, IsSolved] PSL's Dynamic keyword creates variations of the induct method by specifying different combinations of promising arguments found in the proof goal and its background proof context. Then, DInd combines these induction methods with the general purpose proof method, auto, and is_solved, which checks if there is any proof goal left after applying auto. As shown in Fig. 1a, PSL keeps applying the combination of a specialization of induct method and auto, until either