(* * Copyright 2014, NICTA * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * @TAG(NICTA_BSD) *) theory Methods imports Lib begin ML_file "Schema.ML" method_setup schema = {* Schema.sch_method *} "discards arguments to schematic variables unneeded in current subgoal" lemma "\x. ?P arbitrary arbitrary (arbitrary x) \ False" apply schema apply assumption done method_setup schemac = {* Schema.sch_cons_method *} "expands schematic variables applied to constructor arguments" lemma "\x y. \ ?P (Inl x); ?P (Inr y) \ \ (arbitrary x) \ (arbitrary y)" apply schemac apply (unfold sum.simps) apply safe apply assumption+ done lemma "\ ?P x \ \ case x of Inl y \ arbitrary y | Inr z \ Q" apply (case_tac x) apply clarsimp apply schemac apply clarsimp apply assumption apply clarsimp apply assumption done end