{"instruct": "Given a lemma, please prove it.", "input": "lemma fconverseE[elim!]: \n assumes \"x \\\\<^sub>\\ r\\\\<^sub>\\\" \n obtains a b where \"x = [b, a]\\<^sub>\\\" and \"[a, b]\\<^sub>\\ \\\\<^sub>\\ r\"", "output": "using assms unfolding fconverse_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fpairsD[dest]:\n assumes \"x \\\\<^sub>\\ fpairs r\" \n shows \"x \\\\<^sub>\\ r\" and \"\\a b. x = [a, b]\\<^sub>\\\"", "output": "using assms unfolding fpairs_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fun_dual5: \"(f = \\ \\ g \\ \\) = (\\ \\ f \\ \\ = g)\"", "output": "by (metis comp_assoc fun_dual1 fun_dual2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Ord_vsubset_Vset_succ[V_cs_intros]:\n assumes \"Ord \\\" and \"B \\\\<^sub>\\ Vset \\\"\n shows \"B \\\\<^sub>\\ Vset (succ \\)\"", "output": "by (intro vsubsetI) (auto simp: assms Vset_trans Ord_vsubset_in_Vset_succI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vsv_vimageI1: \n assumes \"a \\\\<^sub>\\ \\\\<^sub>\\ r\" and \"a \\\\<^sub>\\ A\" \n shows \"r\\a\\ \\\\<^sub>\\ r `\\<^sub>\\ A\"", "output": "using assms\nby (simp add: vsv_vimage_eqI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vsv_vlrestriction_vinsert:\n assumes \"a \\\\<^sub>\\ \\\\<^sub>\\ r\"\n shows \"r \\\\<^sup>l\\<^sub>\\ vinsert a A = vinsert \\a, r\\a\\\\ (r \\\\<^sup>l\\<^sub>\\ A)\"", "output": "using assms\nby (auto intro!: vsubset_antisym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dg_prod_vdiff_vunion_Obj_in_Obj:\n assumes \"J \\\\<^sub>\\ I\"\n and \"b \\\\<^sub>\\ (\\\\<^sub>D\\<^sub>Gk\\\\<^sub>\\I -\\<^sub>\\ J. \\ k)\\Obj\\\" \n and \"c \\\\<^sub>\\ (\\\\<^sub>D\\<^sub>Gj\\\\<^sub>\\J. \\ j)\\Obj\\\"\n shows \"b \\\\<^sub>\\ c \\\\<^sub>\\ (\\\\<^sub>D\\<^sub>Gi\\\\<^sub>\\I. \\ i)\\Obj\\\"", "output": "by ( vdiff_of_vunion rule: dg_prod_vunion_Obj_in_Obj assms: assms(2,3) subset: assms(1) )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vimage_eq_imp_vcomp: \n assumes \"r `\\<^sub>\\ A = s `\\<^sub>\\ B\"\n shows \"(t \\\\<^sub>\\ r) `\\<^sub>\\ A = (t \\\\<^sub>\\ s) `\\<^sub>\\ B\"", "output": "using assms\nby (metis vcomp_vimage)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vifintersectionE2[elim]:\n assumes \"a \\\\<^sub>\\ (\\\\<^sub>\\i\\\\<^sub>\\I. f i)\"\n obtains i where \"i \\\\<^sub>\\ I\" and \"a \\\\<^sub>\\ f i\"", "output": "using assms\nby (elim vifintersectionE3) (meson assms VInterE2 app_vimageE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fconst_onE[elim!]: \n assumes \"x \\\\<^sub>\\ fconst_on A c\"\n obtains a where \"a \\\\<^sub>\\ A\" and \"x = [a, c]\\<^sub>\\\"", "output": "using assms unfolding fconst_on_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma frestrictionI[intro!]: \n assumes \"a \\\\<^sub>\\ A\" and \"b \\\\<^sub>\\ A\" and \"[a, b]\\<^sub>\\ \\\\<^sub>\\ r\" \n shows \"[a, b]\\<^sub>\\ \\\\<^sub>\\ r \\\\<^sub>\\ A\"", "output": "using assms unfolding frestriction_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vsv_vimage_eqI[intro]:\n assumes \"a \\\\<^sub>\\ \\\\<^sub>\\ r\" and \"r\\a\\ = b\" and \"a \\\\<^sub>\\ A\"\n shows \"b \\\\<^sub>\\ r `\\<^sub>\\ A\"", "output": "using assms(2)[unfolded vsv_ex1_app2[OF assms(1)]] assms(3)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fimageI1: \n assumes \"x \\\\<^sub>\\ \\\\<^sub>\\ (r \\\\<^sup>l\\<^sub>\\ A)\"\n shows \"x \\\\<^sub>\\ r `\\<^sub>\\ A\"", "output": "using assms unfolding fimage_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vrat_mult_closed:\n assumes \"x \\\\<^sub>\\ \\\\<^sub>\\\" and \"y \\\\<^sub>\\ \\\\<^sub>\\\" \n shows \"x *\\<^sub>\\ y \\\\<^sub>\\ \\\\<^sub>\\\"", "output": "proof- have \"(x'::rat) * y' \\ UNIV\" for x' y'\nby simp from this[untransferred, OF assms] show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vrange_VLambda: \"\\\\<^sub>\\ (\\a\\\\<^sub>\\A. f a) = set (f ` elts A)\"", "output": "by (intro vsubset_antisym vsubsetI) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vrat_assoc_law_multiplication: \n assumes \"x \\\\<^sub>\\ \\\\<^sub>\\\" and \"y \\\\<^sub>\\ \\\\<^sub>\\\" and \"z \\\\<^sub>\\ \\\\<^sub>\\\" \n shows \"(x *\\<^sub>\\ y) *\\<^sub>\\ z = x *\\<^sub>\\ (y *\\<^sub>\\ z)\"", "output": "proof- have \"(x' * y') * z' = x' * (y' * z')\" for x' y' z' :: rat\nby simp from this[untransferred, OF assms] show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vimage_VLambda_vrange: \"(\\a\\\\<^sub>\\A. f a) `\\<^sub>\\ B = \\\\<^sub>\\ (\\a\\\\<^sub>\\A \\\\<^sub>\\ B. f a)\"", "output": "unfolding vimage_def\nby (simp add: vlrestriction_VLambda)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vrestriction_atE2[elim]:\n assumes \"x \\\\<^sub>\\ r \\\\<^sub>\\ A\"\n obtains a b where \"x = \\a, b\\\" and \"a \\\\<^sub>\\ A\" and \"b \\\\<^sub>\\ A\" and \"r\\a\\ = b\"", "output": "using assms unfolding vrestriction_def\nby clarsimp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vint_mult_closed:\n assumes \"x \\\\<^sub>\\ \\\\<^sub>\\\" and \"y \\\\<^sub>\\ \\\\<^sub>\\\" \n shows \"x *\\<^sub>\\ y \\\\<^sub>\\ \\\\<^sub>\\\"", "output": "proof- have \"(x'::int) * y' \\ UNIV\" for x' y'\nby simp from this[untransferred, OF assms] show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma app_vimageE[elim]:\n assumes \"b \\\\<^sub>\\ r `\\<^sub>\\ A\"\n obtains a where \"\\a, b\\ \\\\<^sub>\\ r\" and \"a \\\\<^sub>\\ A\"", "output": "using assms unfolding vimage_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma v11_vconverse_app_in_vdomain:\n assumes \"y \\\\<^sub>\\ \\\\<^sub>\\ r\"\n shows \"r\\\\<^sub>\\\\y\\ \\\\<^sub>\\ \\\\<^sub>\\ r\"", "output": "using assms v11_vconverse unfolding vrange_vconverse[symmetric]\nby (auto simp: v11_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma drop_suffix_hd_css_step'':\n assumes step: \"\\\\ (p#ps@cs,css,s) \\ (cs',(pnorm@cs,pabr@cs)#css,t)\"\n shows \"\\\\ (p#ps,css,s) \\ (cs',(pnorm,pabr)#css,t)\"", "output": "using drop_suffix_hd_css_step' [OF step]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_subst_cls_list_subst_cls_mset: \"mset (Cs \\cl \\) = (mset Cs) \\cm \\\"", "output": "unfolding subst_cls_mset_def subst_cls_list_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cs_length_g_one: assumes \\length (cs\\<^bsup>\\\\<^esup> i) \\ 1\\ obtains k where \\cs\\<^bsup>\\\\<^esup> i = (cs\\<^bsup>\\\\<^esup> k)@[\\ i]\\ and \\i icd\\<^bsup>\\\\<^esup>\\ k\\", "output": "apply (cases \\i\\ \\\\\\ rule: cs_cases)\nusing assms cs_not_nil\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma preprocess'_Tableau_Poly_Mapping_Some': \"(Poly_Mapping (preprocess' cs start)) p = Some v\n \\ \\ h. poly h = p \\ \\ is_monom (poly h) \\ qdelta_constraint_to_atom h v \\ flat (set (Atoms (preprocess' cs start)))\"", "output": "by (induct cs start rule: preprocess'.induct, auto simp: Let_def split: option.splits if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_locss:\n \"i < length cs\n \\ length (locss P cs loc ! (length cs - Suc i)) =\n locLength P (fst(cs ! (length cs - Suc i)))\n (fst(snd(cs ! (length cs - Suc i))))\n (snd(snd(cs ! (length cs - Suc i))))\"", "output": "apply (induct cs, auto)\napply (case_tac \"i = length cs\")\nby (auto simp: nth_Cons')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma size_jump2: \"size (jump l cs) < size cs \\ jump l cs = cs\"", "output": "apply(induct cs)\napply simp\napply(case_tac a)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fps_XDp_foldr_nth [simp]: \"foldr (\\c r. fps_XDp c \\ r) cs (\\c. fps_XDp c a) c0 $ n =\n foldr (\\c r. (c + of_nat n) * r) cs (c0 + of_nat n) * a$n\"", "output": "by (induct cs arbitrary: c0) (simp_all add: algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weakBisimCasePushRes:\n fixes x :: name\n and \\ :: 'b\n and Cs :: \"('c \\ ('a, 'b, 'c) psi) list\"\n\n assumes \"x \\ \\\"\n and \"x \\ (map fst Cs)\"\n\n shows \"\\ \\ \\\\x\\(Cases Cs) \\ Cases(map (\\(\\, P). (\\, \\\\x\\P)) Cs)\"", "output": "using assms\nby(metis bisimCasePushRes strongBisimWeakBisim)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma non_strict_constr_no_LTPP: \n assumes \"nonstrict_constrs cs\"\n shows \"\\x \\ set cs. \\(\\a b. LTPP a b = x)\"", "output": "using assms nonstrict_constr.simps(9)\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SubobjsR_subclassRep: \n \"Subobjs\\<^sub>R P C Cs \\ (C,last Cs) \\ (subclsR P)\\<^sup>*\"", "output": "apply(erule Subobjs\\<^sub>R.induct)\napply simp\napply(simp add: SubobjsR_nonempty) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma same_level_path_aux_Append:\n \"\\same_level_path_aux cs as; same_level_path_aux (upd_cs cs as) as'\\\n \\ same_level_path_aux cs (as@as')\"", "output": "by(induct rule:slpa_induct,auto simp:intra_kind_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma class_leq_refl[iff]: \"class_ex cs c \\ class_leq cs c c\"", "output": "using wf\nby (simp add: class_leq_def class_ex_def refl_on_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma min_gallery_least_length:\n assumes \"chamber C\" \"chamber D\" \"C\\D\"\n defines \"Cs \\ ARG_MIN length Cs. gallery (C#Cs@[D])\"\n shows \"min_gallery (C#Cs@[D])\"", "output": "unfolding Cs_def\nusing assms gallery_least_length\nby (blast intro: min_galleryI_betw arg_min_nat_le)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma remdups_clss_Nil_iff: \"remdups_clss Cs = [] \\ Cs = []\"", "output": "by (cases Cs, simp, hypsubst, subst remdups_clss.simps(2), simp add: Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sort_eqv_trans: \"sort_eqv cs x y \\ sort_eqv cs y z \\ sort_eqv cs x z\"", "output": "using sort_eqv_def sort_leq_trans\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valid_path_aux_intra_path:\n \"\\a \\ set as. intra_kind(kind a) \\ valid_path_aux cs as\"", "output": "by(induct as,auto simp:intra_kind_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma presSwap_fromIMor[simp]:\n\"ipresCons h hA (fromMOD MOD) \\ ipresSwap h (fromMOD MOD) \n \\ presSwap (fromIMor h) MOD\"", "output": "unfolding ipresSwap_def presSwap_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ipresIGFreshAll_termMOD[simp]:\n\"ipresIGFreshAll h hA termMOD MOD = ipresFreshAll h hA MOD\"", "output": "unfolding ipresIGFreshAll_def ipresFreshAll_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fromIMor_termFSwSbMorph[simp]:\nassumes \"termFSwSbImorph h hA (fromMOD MOD)\"\nshows \"termFSwSbMorph (fromIMor h) (fromIMorAbs hA) MOD\"", "output": "using assms unfolding termFSwSbImorph_defs1\nusing assms unfolding termFSwSbImorph_def termFSwSbMorph_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma errMOD_igWlsAbsDisj:\nassumes \"igWlsAbsDisj MOD\"\nshows \"igWlsAbsDisj (errMOD MOD)\"", "output": "using assms unfolding errMOD_def igWlsAbsDisj_def\napply clarify subgoal for _ _ _ _ A\nby(cases A) fastforce+ ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma imp_igSubstInpIPresIGWlsInpSTR:\n\"igSubstIPresIGWlsSTR MOD \\ igSubstInpIPresIGWlsInpSTR MOD\"", "output": "by(simp add: igSubstInpIPresIGWlsInpSTR_def igSubstIPresIGWlsSTR_def igSubstInp_def igWlsInp_def liftAll2_def lift_def sameDom_def split: option.splits) (smt option.distinct(1) option.exhaust)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comp_ipresIGWlsAll:\nassumes \"ipresIGWlsAll h hA MOD MOD'\" and \"ipresIGWlsAll h' hA' MOD' MOD''\"\nshows \"ipresIGWlsAll (h' o h) (hA' o hA) MOD MOD''\"", "output": "using assms unfolding ipresIGWlsAll_def\nusing comp_ipresIGWls comp_ipresIGWlsAbs\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma igFreshIGVar_fromMOD[simp]:\n\"gFreshGVar MOD \\ igFreshIGVar (fromMOD MOD)\"", "output": "unfolding igFreshIGVar_def gFreshGVar_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ipresCons_imp_ipresSubstAll:\nassumes *: \"ipresCons h hA MOD\" and **: \"igSubstCls MOD\"\nand \"igConsIPresIGWls MOD\" and \"igFreshCls MOD\"\nshows \"ipresSubstAll h hA MOD\"", "output": "unfolding ipresSubstAll_def\nusing assms ipresCons_imp_ipresSubst ipresCons_imp_ipresSubstAbs\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma igSubstAllIPresIGWlsAllSTR_imp_igSubstAllIPresIGWlsAll:\n\"igSubstAllIPresIGWlsAllSTR MOD \\ igSubstAllIPresIGWlsAll MOD\"", "output": "unfolding igSubstAllIPresIGWlsAllSTR_def igSubstAllIPresIGWlsAll_def\nusing igSubstIPresIGWlsSTR_imp_igSubstIPresIGWls igSubstAbsIPresIGWlsAbsSTR_imp_igSubstAbsIPresIGWlsAbs\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wlsFSwSb_recAll_unique_presCons:\nassumes \"wlsFSwSb MOD\" and \"presCons h hA MOD\"\nshows \"(wls s X \\ h X = rec MOD X) \\\n (wlsAbs (us,s') A \\ hA A = recAbs MOD A)\"", "output": "using assms wlsFSw_recAll_unique_presCons unfolding wlsFSwSb_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n \"(0::nat) mod 0 = 0\"\n \"(x::nat) mod 0 = x\"\n \"(0::nat) mod 1 = 0\"\n \"(1::nat) mod 1 = 0\"\n \"(3::nat) mod 1 = 0\"\n \"(x::nat) mod 1 = 0\"\n \"(0::nat) mod 3 = 0\"\n \"(1::nat) mod 3 = 1\"\n \"(3::nat) mod 3 = 0\"\n \"x mod 3 < 3\"\n \"(x mod 3 = x) = (x < 3)\"", "output": "using [[z3_extensions]]\nby smt+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma errMOD_igWlsAllDisj:\nassumes \"igWlsAllDisj MOD\"\nshows \"igWlsAllDisj (errMOD MOD)\"", "output": "using assms unfolding igWlsAllDisj_def\nusing errMOD_igWlsDisj errMOD_igWlsAbsDisj\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iwlsFSbSw_fromMOD[simp]:\n\"wlsFSbSw MOD \\ iwlsFSbSw (fromMOD MOD)\"", "output": "unfolding iwlsFSbSw_def wlsFSbSw_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sub_diff_mod_eq': \"\n r \\ t \\ (k * m + t - (t - r) mod m) mod (m::nat) = r mod m\"", "output": "apply (simp only: diff_mod_le[of t r m, THEN add_diff_assoc, symmetric])\napply (simp add: sub_diff_mod_eq) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_SN_onI[intro]: \"f 0 \\ X \\ chain R f \\ \\ SN_on R X\"", "output": "by (unfold SN_on_def not_not, intro exI conjI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma non_empty_cycle_root_loop_converse:\n assumes \"non_empty_cycle_root r x\"\n shows \"r \\ x\\<^sup>+;r\"", "output": "using assms less_eq_def non_empty_cycle_root_rtc_tc\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"(0::real) < 1 + x\\<^sup>2\"", "output": "by (sos \"((R<1 + ((R<1 * (R<1 * [x]^2)) + ((A<=0 * R<1) * (R<1 * [1]^2)))))\")"} {"instruct": "Given a lemma, please prove it.", "input": "lemma oprod_Well_order:\nassumes WELL: \"Well_order r\" and WELL': \"Well_order r'\"\nshows \"Well_order (r *o r')\"", "output": "proof- have \"Total r \\ Total r'\"\nusing WELL WELL'\nby (auto simp add: order_on_defs) thus ?thesis\nusing assms unfolding well_order_on_def\nusing oprod_Linear_order oprod_wf_Id\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subset_AboveS_UnderS: \"B \\ Field r \\ B \\ AboveS r (UnderS r B)\"", "output": "by(auto simp add: AboveS_def UnderS_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma per_add_exp: assumes \"u \\p r\\<^sup>\\\" and \"m \\ 0\" shows \"u \\p (r\\<^sup>@m)\\<^sup>\\\"", "output": "using per_exp_pref[OF per_rootD, OF \\u \\p r\\<^sup>\\\\, of m] per_rootD'[OF \\u \\p r\\<^sup>\\\\, folded nonzero_pow_emp[OF \\m \\ 0\\, of r]] unfolding period_root_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma coprimeI:\n assumes \"\\r. r dvd p \\ r dvd q \\ r dvd 1\"\n shows \"coprime p q\"", "output": "using assms\nby (auto simp: coprime_def')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma li_minus:\n assumes \"locally_irrefl R A\"\n shows \"locally_irrefl R (A - B)\"", "output": "using assms unfolding locally_irrefl_def\nby (meson in_diffD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SN_on_Image_rtrancl_conv:\n \"SN_on r A \\ SN_on r (r\\<^sup>* `` A)\" (is \"?L \\ ?R\")", "output": "proof assume ?L then show ?R\nby (auto simp: SN_on_Image_rtrancl) next assume ?R then show ?L\nby (auto simp: SN_on_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma oprod_Preorder: \"\\Preorder r; Preorder r'; antisym r; antisym r'\\ \\ Preorder (r *o r')\"", "output": "unfolding preorder_on_def\nusing oprod_Refl oprod_trans\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pj_invim_mono1:\"\\Ring R; ideal R I; ideal (qring R I) J1;\n ideal (qring R I) J2; J1 \\ J2 \\ \\\n (rInvim R (qring R I) (pj R I) J1) \\ (rInvim R (qring R I) (pj R I) J2)\"", "output": "apply (rule subsetI)\napply (simp add:rInvim_def)\napply (simp add:subsetD) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rrsmult_supp : \"supp (r \\ f) \\ R\"", "output": "using rightreg_scalar_multD2 suppD_contra\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma False_step_conc[iff]:\n \"\\L R. (False#p,q) : step (conc L R) a = \n (\\r. q = False#r \\ (p,r) : step R a)\"", "output": "apply (simp add:conc_def step_def)\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma r2f_ad_rel_hom: \"\\ (ad_rel R) = kad (\\ R)\"", "output": "by (force simp add: kad_def ad_rel_def r2f_def fun_eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abs_trans[trans]:\n assumes A: \"\\R C \\ B\" and B: \"\\R' B \\ A\" \n shows \"\\R' (\\R C) \\ A\"", "output": "using assms\nby (fastforce simp: pw_le_iff refine_pw_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in ring) carrier_is_subalgebra:\n assumes \"K \\ carrier R\" shows \"subalgebra K (carrier R) R\"", "output": "using assms subalgebra.intro[OF add.group_incl_imp_subgroup[of \"carrier R\"], of K] add.group_axioms unfolding subalgebra_axioms_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in domain) Units_mult_eq_Units [simp]: \"Units (mult_of R) = Units R\"", "output": "unfolding Units_def\nusing insert_Diff integral_iff\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma toCard_pred_toCard:\n \"\\|A| \\o r; Card_order r\\ \\ toCard_pred A r (toCard A r)\"", "output": "unfolding toCard_def\nusing someI_ex[OF ex_toCard_pred] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma order_asym: \"trans R \\ asym R = irrefl R\"", "output": "unfolding asym.simps irrefl_def trans_def\nby meson"} {"instruct": "Given a lemma, please prove it.", "input": "lemma runiq_wrt_ex1:\n \"runiq R \\ (\\ a \\ Domain R . \\! b . (a, b) \\ R)\"", "output": "using runiq_basic\nby (metis Domain.DomainI Domain.cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma per_eq: \"x \\p r\\<^sup>\\ \\ (\\ k z. r\\<^sup>@k\\z = x \\ z \\p r) \\ r \\ \\\"", "output": "using per_pref[unfolded pref_pow_conv] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma rawpsubstT_atrm[simp,intro]:\nassumes \"r \\ atrm\" and \"snd ` (set txs) \\ var\" and \"fst ` (set txs) \\ atrm\"\nshows \"rawpsubstT r txs \\ atrm\"", "output": "using assms\nby (induct txs arbitrary: r) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma one_add_square_eq_0: \"1 + (x)\\<^sup>2 \\ (0::real)\"", "output": "by (sos \"((R<1 + (([~1] * A=0) + (R<1 * (R<1 * [x]^2)))))\")"} {"instruct": "Given a lemma, please prove it.", "input": "lemma good_ruleset_alt: \"good_ruleset rs = (\\r\\set rs. get_action r = Accept \\ get_action r = Drop \\\n get_action r = Reject \\ get_action r = Log \\ get_action r = Empty)\"", "output": "unfolding good_ruleset_def\napply(rule Set.ball_cong)\napply(simp_all)\napply(rename_tac r)\nby(case_tac \"get_action r\")(simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma divideR_right:\n fixes x y :: \"'a::real_normed_vector\"\n shows \"r \\ 0 \\ y = x /\\<^sub>R r \\ r *\\<^sub>R y = x\"", "output": "using scaleR_cancel_left[of r y \"x /\\<^sub>R r\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sup_refine[refine]:\n assumes \"ai \\\\R a\"\n assumes \"bi \\\\R b\"\n shows \"sup ai bi \\\\R (sup a b)\"", "output": "using assms\nby (auto simp: pw_le_iff refine_pw_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma order_less_trans: \"\\ order r; x \\\\<^sub>r y; y \\\\<^sub>r z \\ \\ x \\\\<^sub>r z\"", "output": "by (unfold order_def lesssub_def) blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma characteriseAx:\nshows \"r \\ Ax \\ r = ([],\\ ff \\ \\* \\) \\ (\\ i. r = ([], \\ At i \\ \\* \\ At i \\))\"", "output": "apply (cases r)\nby (rule Ax.cases) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_top_sorted_antimono:\n assumes \"R\\R'\"\n assumes \"is_top_sorted R' l\"\n shows \"is_top_sorted R l\"", "output": "using assms unfolding is_top_sorted_alt\nby (auto dest: rtrancl_mono_mp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma D_inv: assumes \"trans r\" and \"irrefl r\" and \"(r|\\'| -s dl r \\,r|\\| ) \\ mul_eq r\"\n and \"(r|\\'| -s dl r \\,r|\\| ) \\ mul_eq r\"\n shows \"D r \\ \\ \\' \\'\"", "output": "using assms unfolding D_def lemma3_2_2\nusing lemma2_6_6_a[OF assms(1)] union_commute\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma connected_root_iff4:\n assumes \"point r\"\n shows \"connected_root r x \\ 1;x = r\\<^sup>T;x\\<^sup>+\"", "output": "by (metis assms conv_contrav conv_invol conv_one star_conv star_slide_var connected_root_iff3)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem per_pref: \"x \\p r\\<^sup>\\ \\ (\\ k. x \\p r\\<^sup>@k) \\ r \\ \\\"", "output": "using per_pref_ex period_root_def pref_pow_ext' pref_prod_pref\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alpha_d_more_eqI:\n assumes \"tr r = tr r'\" \"wait r = wait r'\" \"ref r = ref r'\" \"more r = more r'\"\n shows \"alpha_d.more r = alpha_d.more r'\"", "output": "using assms\nby (cases r, cases r') auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pred_resumption_antimono:\n assumes r: \"pred_resumption A C r'\"\n and le: \"resumption_ord r r'\"\n shows \"pred_resumption A C r\"", "output": "using r monotoneD[OF monotone_results le] monotoneD[OF monotone_outputs le]\nby(auto simp add: pred_resumption_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isLimOrd_succ:\nassumes isLimOrd and \"i \\ Field r\"\nshows \"succ i \\ Field r\"", "output": "using assms unfolding isLimOrd_def isSuccOrd_def\nby (metis REFL in_notinI refl_on_domain succ_smallest)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eps_match: \"eps test i r \\ match test r i i\"", "output": "by (induction r) (auto dest: antisym[OF match_le match_le])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ltlr_expand_Release:\n \"\\ \\\\<^sub>r \\ R\\<^sub>r \\ \\ (\\ \\\\<^sub>r \\ and\\<^sub>r (\\ or\\<^sub>r (X\\<^sub>r (\\ R\\<^sub>r \\))))\"", "output": "by (metis ltln_expand_Release ltlr_to_ltln.simps(5-7,9) ltlr_to_ltln_semantics)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trans_llexord:\n \"transp r \\ transp (llexord r)\"", "output": "by(auto intro!: transpI elim: llexord_trans dest: transpD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pure_hn_refineI_no_asm:\n assumes \"(c,a)\\R\"\n shows \"hn_refine emp (return c) emp (pure R) (RETURN a)\"", "output": "unfolding hn_refine_def\nusing assms\nby (sep_auto simp: pure_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inverse_pow_pow:\n assumes \"a \\ carrier G\"\n shows \"inv (a [^] (r::nat)) = (inv a) [^] r\"", "output": "proof - have \"a [^] r \\ carrier G\"\nusing assms\nby blast then show ?thesis\nby (simp add: assms nat_pow_inv)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "theorem ACI_norm_final[simp]:\n \"final \\r\\ = final r\"", "output": "proof (induct r) case (Plus r1 r2) thus ?case\nusing toplevel_summands_final\nby (auto simp: final_PLUS)\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lang_rexp_subst: \"lang (rexp_subst f r) = subst_word f ` lang r\"", "output": "by (induction r) (simp_all add: image_Un)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hom_init: \"hom_ab (init_a r) = init_b r\"", "output": "unfolding init_a_def init_b_def hom_ab.simps\nby (simp add: nonfinal_empty_mrexp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extended_Ax_prems_empty:\nassumes \"r \\ Ax\"\nshows \"fst (extendRule S r) = []\"", "output": "using assms\napply (cases r)\nby (rule Ax.cases) (auto simp add:extendRule_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"(r 0 0 \\ r 0 1 \\ r 0 2 \\ r 0 3) \\\n (r 1 0 \\ r 1 1 \\ r 1 2 \\ r 1 3) \\\n (r 2 0 \\ r 2 1 \\ r 2 2 \\ r 2 3) \\\n (r 3 0 \\ r 3 1 \\ r 3 2 \\ r 3 3)\"", "output": "by (metis (full_types) rax)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma non_empty_cycle_root_msc_plus:\n assumes \"non_empty_cycle_root r x\"\n shows \"x\\<^sup>+;r = x\\<^sup>T\\<^sup>+;r\"", "output": "using assms many_strongly_connected_iff_7 non_empty_cycle_root_msc\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma d_delta_lnexp_cf2_nonpos: \"diff_delta_lnexp_cf2 x \\ 0\"", "output": "unfolding diff_delta_lnexp_cf2_def\nby (sos \"(((R<1 + ((R<1 * ((R<5/4 * [~3/40*x^2 + 1]^2) + (R<11/1280 * [x^2]^2))) + ((A<1 * R<1) * (R<1/64 * [1]^2))))) & ((R<1 + ((R<1 * ((R<5/4 * [~3/40*x^2 + 1]^2) + (R<11/1280 * [x^2]^2))) + ((A<1 * R<1) * (R<1/64 * [1]^2))))))\")"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lang_final: \"final r = ([] \\ lang n r)\"", "output": "using concI[of \"[]\" _ \"[]\"]\nby (induct r arbitrary: n) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_rtrancl_insert: \"x\\R\\<^sup>* \\ x\\(insert r R)\\<^sup>*\"", "output": "by (metis in_mono rtrancl_mono subset_insertI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma RPDs_Star: \"RPDs (MStar r) \\ {MStar r} \\ MTimesL (MStar r) (RPDs r)\"", "output": "unfolding RPDs_def\nusing RPDi_Star[OF order_refl, of _ r]\nby (force simp: MTimesL_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simple_fw_alt: \"simple_fw r p = simple_fw_alt r p\"", "output": "by(induction rule: simple_fw.induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma runit_commutes_with_R:\n assumes \"ide f\"\n shows \"\\[R f] = R \\[f]\"", "output": "unfolding runit_def\nusing assms PB.runit_commutes_with_R\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pos_least: \"shd (sdrop n rs) = r \\ pos rs r \\ n\"", "output": "unfolding pos_def\nby (metis (full_types) Least_le)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma msgs_mru_vote: \n assumes\n \"\\ p \\ get_msgs (send0 r) cfg (HOs r) (HOs r) p\"\n shows \"((msgs_to_lvs (\\ p)) |` HOs r p) = (mru_vote o cfg) |` HOs r p\"", "output": "using assms\nby(auto simp add: get_msgs_benign send0_def restrict_map_def msgs_to_lvs_def map_comp_def intro!: ext split: option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strip_follow[simp]: \"strip(follow m r) = strip r\"", "output": "by (induction r arbitrary: m) (auto split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma converse_Image: \n assumes runiq: \"runiq R\"\n and runiq_conv: \"runiq (R^-1)\"\n shows \"(R^-1) `` R `` X \\ X\"", "output": "using assms\nby (metis converse_converse rightUniqueFunctionAfterInverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma repL_geq:\"repL w r \\ r' \\ r \\ repL w r'\"", "output": "unfolding repL_def\nusing order_trans\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Card_order_Un1:\nshows \"Card_order r \\ |Field r| \\o |(Field r) \\ B| \"", "output": "using card_of_Un1 card_of_Field_ordIso ordIso_symmetric ordIso_ordLeq_trans\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Star_Star[simp]: \"Star (Star r) = Star r\"", "output": "by (subst Star_unfoldL, coinduction arbitrary: r rule: language_coinduct_upto_regular) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma(in UP_cring) UP_car_memE:\n assumes \"g \\ carrier (UP R)\"\n shows \"\\x. g x \\ carrier R\"\n \"\\x. x > (deg R g) \\ g x = \\\"", "output": "using P_def assms UP_def[of R]\napply (simp add: mem_upD)\nusing assms UP_def[of R] up_def[of R]\nby (smt R.ring_axioms UP_ring.deg_aboveD UP_ring.intro partial_object.select_convs(1) restrict_apply up_ring.simps(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pnorm_alt[symmetric]: \"pnorm_alt r = pnorm r\"", "output": "by (induct r) (simp_all only: pnorm_alt.simps pnPlus_pnorm pnTimes_pnorm, auto simp: pnorm_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mk_linear_orders_Linear_order:\n assumes \"r \\ mk_linear_orders C A\"\n shows \"Linear_order (linord_of_list r)\"", "output": "using %invisible mk_linear_orders_distinct[OF assms(1)] linord_of_list_Linear_order\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma P2R_R2P[simp]: \"P2R (R2P r) = r\"", "output": "using Collect_mem_eq P2R_def R2P_P2R case_prod_curry\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trans_letter_less:\n assumes \"trans r\"\n shows \"trans (letter_less r)\"", "output": "using assms unfolding trans_def letter_less_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CR_onE:\n \"CR_on r A \\ a \\ A \\ ((b, c) \\ join r \\ P) \\ ((a, b) \\ r\\<^sup>* \\ P) \\ ((a, c) \\ r\\<^sup>* \\ P) \\ P\"", "output": "unfolding CR_defs\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma run_stake:\n assumes \"run r p\"\n shows \"path (stake k r) p\"", "output": "using assms\nby (metis run_shift_elim stake_sdrop)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma order_refl [simp, intro]: \"order r \\ x \\\\<^sub>r x\"", "output": "by (unfold order_def) (simp (no_asm_simp))"} {"instruct": "Given a lemma, please prove it.", "input": "theorem (in domain) eval_cring_hom:\n assumes \"subring K R\" and \"a \\ carrier R\"\n shows \"ring_hom_cring (K[X]) R (\\p. (eval p) a)\"", "output": "unfolding ring_hom_cring_def ring_hom_cring_axioms_def\nusing domain.axioms(1)[OF univ_poly_is_domain[OF assms(1)]] eval_is_hom[OF assms] cring_axioms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\\\<^sub>1_weak_bisim:\n \"weak_bisim (\\\\<^sub>1 \\') (\\ \\')\"", "output": "unfolding weak_bisim_def\nusing \\\\<^sub>1_elim \\_typed_step\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rtrancl_Image_eq:\n assumes \"r = set r'\" and \"x = set x'\"\n shows \"r\\<^sup>* `` x = set (rtrancl_list_impl r' x')\"", "output": "using assms\nby (auto simp: rtrancl_list_impl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"(x::real) \\ 1 \\ y \\ 1 \\ x * y \\ x + y - 1\"", "output": "by (sos \"(((A<0 * R<1) + ((A<=0 * (A<=1 * R<1)) * (R<1 * [1]^2))))\")"} {"instruct": "Given a lemma, please prove it.", "input": "lemma antisym_order_consistent_self:\n \"antisym r \\ order_consistent r r\"", "output": "by(auto simp add: order_consistent_def dest: antisymD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_rbt_rec [forward]: \"is_rbt (Node l c k v r) \\ is_rbt l \\ is_rbt r\"", "output": "@proof @case \"c = R\" @qed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma greatest_r_mono:\n assumes \"Above r X \\ Above r' X\"\n shows \"greatest r X \\ greatest r' X\"", "output": "using assms unfolding greatest_def Above_def\nby (fast intro: FieldI1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Length_Extend[simp]:\n \"Length (Extend k i \\ P) = max (Length \\) (if P = {||} then 0 else Suc (fMax P))\"", "output": "unfolding max_def\nby (split if_splits, transfer) (force split: order.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abs_fresh_set_star:\n fixes X :: \"name set\"\n and a :: name\n and P :: \"'a::fs_name\"\n\n shows \"(X \\* [a].P) = (X - {a}) \\* P\"", "output": "by(auto simp add: fresh_star_def abs_fresh)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cond_spmf_cong: \"cond_spmf p A = cond_spmf p B\" if \"A \\ set_spmf p = B \\ set_spmf p\"", "output": "apply(rule spmf_eqI)\nusing that\nby(auto simp add: measure_spmf_zero_iff spmf_eq_0_set_spmf measure_spmf_cong[OF that])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma resOutputTauTrans[dest]:\n fixes x :: name\n and a :: name\n and b :: name\n and P :: pi\n and P' :: pi\n\n assumes \"<\\x>a{b}.P \\\\ \\ P'\"\n\n shows False", "output": "using assms\nby - (ind_cases \"<\\x>a{b}.P \\\\ \\ P'\", auto simp add: residualInject pi.inject alpha')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Seq_decomp_Throw[rule_format, OF _ refl, OF _ refl] :\n\"\\ \\ (p, s) \\ (p', s') \\ \n \\p\\<^sub>2 z. s = Normal z \\ p = Seq Throw p\\<^sub>2 \\ s' = s \\ p' = Throw\"", "output": "apply(erule step_induct, simp_all)\napply clarsimp\napply(erule step.cases, simp_all) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_inv_Branching_Left: \"path (Left#p) (Branching l r) \\ path p l\"", "output": "using Left_def Right_def path.cases\nby (induction p) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weakBisimSubstParNil:\n fixes \\ :: 'b\n and P :: \"('a, 'b, 'c) psi\"\n\n shows \"\\ \\ P \\ \\ \\\\<^sub>s P\"", "output": "by(metis strongBisimSubstWeakBisimSubst bisimSubstParNil)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prime_factorization_unique_nat:\n fixes f :: \"nat \\ _\"\n assumes S_eq: \"S = {p. 0 < f p}\"\n and \"finite S\"\n and S: \"\\p\\S. prime p\" \"n = (\\p\\S. p ^ f p)\"\n shows \"S = prime_factors n \\ (\\p. prime p \\ f p = multiplicity p n)\"", "output": "using assms\nby (intro prime_factorization_unique'') auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma action_loc_aux_compP [simp]: \"action_loc_aux (compP f P) = action_loc_aux P\"", "output": "by(auto 4 4 elim!: action_loc_aux_cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma infinity_evalUni_EqUni : \"(\\x. \\y p dvd x ^ n \\ p dvd x\"", "output": "by (induction n) (auto dest: prime_elem_dvd_multD intro: dvd_trans[of _ 1])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_subst: \"eval_poly \\ (poly_subst \\ p) = eval_poly (\\ v. eval_poly \\ (\\ v)) p\"", "output": "by (induct p, simp add: zero_poly_def, auto simp: field_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inclosed_closed [intro]:\n assumes cinv: \"opnet np p \\ (otherwith ((=)) (net_tree_ips p) inoclosed, U \\) P\"\n shows \"oclosed (opnet np p) \\ (\\_ _ _. True, U \\) P\"", "output": "using assms unfolding oinvariant_def\nby (clarsimp dest!: oclosed_oreachable_inclosed)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma partition_on_mset_sum_size_eq: \"partition_on_mset A P \\ (\\x \\# P. size x) = size A\"", "output": "by (metis partition_on_msetD1 size_big_union_sum)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_numbound0: assumes lp: \"iszlfm p bs\"\n shows \"\\ b\\ set (\\ p). numbound0 b\"", "output": "using lp\nby (induct p rule: \\.induct,auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simpfm[simp]: \"Ifm vs bs (simpfm p) = Ifm vs bs p\"", "output": "by (induct p arbitrary: bs rule: simpfm.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma match_vars:\n assumes \"\\ p \\ t \\ \\\" and \"x \\ supp p\"\n shows \"x \\ set (map fst \\)\"", "output": "using assms\nby induct (auto simp add: supp_atm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l10_5:\n assumes \"P' P Reflect A B\" and\n \"P'' P' Reflect A B\"\n shows \"P = P''\"", "output": "by (meson assms(1) assms(2) l10_2_uniqueness l10_4)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma UP_one_not_zero:\n \"\\\\<^bsub>P\\<^esub> \\ \\\\<^bsub>P\\<^esub>\"", "output": "proof assume \"\\\\<^bsub>P\\<^esub> = \\\\<^bsub>P\\<^esub>\" hence \"coeff P \\\\<^bsub>P\\<^esub> 0 = (coeff P \\\\<^bsub>P\\<^esub> 0)\"\nby simp hence \"\\ = \\\"\nby simp with R.one_not_zero show \"False\"\nby contradiction\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Some_OptionOverride [simp]:\n \"(fst P) \\ None \\ OptionOverride P = the (fst P)\"", "output": "apply (unfold OptionOverride_def)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_poly_of_real_Re: assumes \"set (coeffs p) \\ \\\"\n shows \"map_poly of_real (map_poly Re p) = p\"", "output": "by (subst map_poly_map_poly, force+, rule map_poly_idI, insert assms, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af_trans_imp_wf:\n assumes \"almost_full_on P A\"\n and \"transp_on P A\"\n shows \"wfp_on (strict P) A\"", "output": "using assms\nby (intro af_trans_extension_imp_wf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vwalk_join_hd':\n assumes \"p \\ []\"\n shows \"hd (p \\ q) = hd p\"", "output": "using assms\nby (auto simp add: vwalk_join_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in comm_ring_hom) synthetic_div_hom:\n \"synthetic_div (map_poly hom p) (hom x) = map_poly hom (synthetic_div p x)\"", "output": "by (induction p) (auto simp: map_poly_pCons_hom)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma preserves_import_circ:\n \"preserves x (-p) \\ -p * x\\<^sup>\\ = -p * (-p * x)\\<^sup>\\\"", "output": "using import_test preserves_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pickT_shift[simp]:\nassumes \"II \\ UNpart cl P\"\nshows \"II \\ shift cl (pickT cl P II) ` (P (pickT cl P II))\"", "output": "using assms pickT_pred_pickT unfolding pickT_pred_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma spmf_of_pmf_bind: \"spmf_of_pmf (bind_pmf p f) = bind_pmf p (\\x. spmf_of_pmf (f x))\"", "output": "by(simp add: spmf_of_pmf_def map_bind_pmf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matchIdLeft:\n fixes a :: name\n and P :: pi\n and Rel :: \"(pi \\ pi) set\"\n\n assumes \"Id \\ Rel\"\n\n shows \"[a\\a]P \\[Rel] P\"", "output": "using assms\nby(force simp add: simulation_def dest: Match derivativeReflexive)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma induct_list012:\n \"\\P []; \\x. P [x]; \\x y zs. \\ P zs; P (y # zs) \\ \\ P (x # y # zs)\\ \\ P xs\"", "output": "by induction_schema (pat_completeness, lexicographic_order)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma univariate_mpoly_roots_finite:\nfixes p::\"'a::idom mpoly\"\nassumes \"vars p \\ {v}\" \"p \\ 0\"\nshows \"finite {x. insertion (\\v. x) p = 0}\"", "output": "using poly_roots_finite[of \"mpoly_to_poly v p\", unfolded poly_eq_insertion[OF \\vars p \\ {v}\\]]\nusing assms(1) assms(2) mpoly_to_poly_inverse poly_to_mpoly0\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subsetClosed'[simp]:\n fixes p :: \"name prm\"\n and xvec :: \"name list\"\n and P :: \"'a::fs_name\"\n\n shows \"(set (p \\ xvec) \\ supp (p \\ P)) = (set xvec \\ supp P)\"", "output": "by(simp add: eqvts[THEN sym])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma scount_finite: \"ev (alw (not P)) \\ \\ scount P \\ < \\\"", "output": "using scount_eq_card[of P \\]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SCrd[rule_format,simp]:\"singleCombinators p\\ singleCombinators(remdups p)\"", "output": "apply (induct p, simp_all) subgoal for a p\napply (case_tac a, simp_all) done done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma perm_exits_Vs: \"i \\ Vs \\ (p \\ i) \\ Vs\"", "output": "by (metis Vs fresh_finite_set_at_base imageI fresh_star_def mem_permute_iff p)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reflexive:\n fixes P :: pi\n\n shows \"P \\ P\"", "output": "proof - have \"(P, P) \\ Id\"\nby simp thus ?thesis\nby(coinduct rule: weakBisimCoinduct) (auto intro: Weak_Early_Sim.reflexive)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sees_field_is_type:\n \"\\ P \\ C sees F:T (fm) in D; wf_prog wf_md P \\ \\ is_type P T\"", "output": "by(fastforce simp: sees_field_def elim: has_fields_types map_of_SomeD[OF map_of_remap_SomeD])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma S_satisfies_eqvt: assumes \"P \\\\<^sub>S \\\" shows \"(p \\ P) \\\\<^sub>S (p \\ \\)\"", "output": "using assms\nby (simp add: S_satisfies_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma match_list_None_conv:\n \"match_list d P = None \\ matchers (set P) = {}\"", "output": "using match_list_sound [of d P] and match_list_complete [of d P]\nby (metis empty_iff not_None_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmdrop_eqvt: \"p \\ fmdrop x F = fmdrop (p \\ x) (p \\ F)\"", "output": "by transfer (auto simp: map_drop_def map_filter_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fglr_aux1:\n assumes V: \"(v',v)\\Id\" and S: \"(s',s)\\gstate_rel\" \n and P: \"\\a' p' D' pE' p D pE. ((a',p',D',pE'),(p,D,pE))\\gstate_rel \n \\ f' a' p' D' pE' \\\\R (f p D pE)\"\n shows \"(let (a',p',D',pE') = gcollapse v' s' in f' a' p' D' pE') \n \\ \\R (let (p,D,pE) = collapse v s in f p D pE)\"", "output": "apply (auto split: prod.splits)\napply (rule P)\nusing gcollapse_refine[OF V S]\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n \"\\ Q2 (val h p); (K ** T ** blub ** P ** points_to p v ** P ** J) h \\\n \\ Q (val h p) (val h p)\"", "output": "apply (sep_frule points_to)\napply simp oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma powr_ln_powr_lower_bound:\n \"a > 1 \\ a \\ x \\ x \\ b \\\n min (a powr p) (b powr p) * min (ln a powr p') (ln b powr p') \\ x powr p * ln x powr p'\"", "output": "by (intro mult_mono powr_lower_bound) (auto intro: min.coboundedI1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma external_actions_committed_compP [simp]:\n \"external_actions_committed (compP f P) = external_actions_committed P\"", "output": "by(simp add: fun_eq_iff external_actions_committed_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_equation_main_step:\n fixes p:: \"real poly\"\n fixes qs:: \"real poly list\"\n fixes I:: \"nat list\" \n fixes signs:: \"rat list list\"\n assumes nonzero: \"p\\0\"\n assumes distinct_signs: \"distinct signs\"\n assumes all_info: \"set (characterize_consistent_signs_at_roots_copr p qs) \\ set(signs)\"\n assumes welldefined: \"list_constr I (length qs)\"\n assumes pairwise_rel_prime_1: \"\\q. ((List.member qs q) \\ (coprime p q))\"\n shows \"(vec_of_list (mtx_row signs I) \\ (construct_lhs_vector p qs signs)) = \n construct_NofI p (retrieve_polys qs I)\"", "output": "unfolding construct_NofI_prop[OF nonzero]\nusing matrix_equation_helper_step[OF assms]\nby linarith"} {"instruct": "Given a lemma, please prove it.", "input": "lemma check_prime_factors_subset_Cons [simp]:\n \"check_prime_factors_subset (Suc 0) (p # ps) \\ check_prime_factors_subset (Suc 0) ps\"\n \"check_prime_factors_subset 1 (p # ps) \\ check_prime_factors_subset 1 ps\"\n \"p > 1 \\ p dvd numeral n \\ check_prime_factors_subset (numeral n) (p # ps) \\\n check_prime_factors_subset (numeral n div p) (p # ps)\"\n \"p \\ 1 \\ \\p dvd numeral n \\ check_prime_factors_subset (numeral n) (p # ps) \\\n check_prime_factors_subset (numeral n) ps\"", "output": "by (subst check_prime_factors_subset.simps; force)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simActFreeCases[consumes 0, case_names Free]:\n fixes P :: pi\n and \\ :: freeRes\n and C :: \"'a::fs_name\"\n and Rel :: \"(pi \\ pi) set\"\n\n assumes Der: \"\\P'. (P \\\\<^sub>l\\ \\ P') \\ (P', Q') \\ Rel\"\n\n shows \"weakStepSimAct P (\\ \\ Q') P Rel\"", "output": "using assms\nby(simp add: weakStepSimAct_def residual.inject)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reflexive:\n fixes P :: pi\n \n shows \"P \\\\<^sup>s P\"", "output": "by(force simp add: substClosed_def intro: Strong_Late_Bisim.reflexive)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_conforms_with_strategy_irrelevant:\n assumes \"path_conforms_with_strategy p P \\\" \"v \\ lset P\"\n shows \"path_conforms_with_strategy p P (\\(v := w))\"", "output": "using assms\napply (coinduction arbitrary: P)\nby (drule path_conforms_with_strategy.cases) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rewrite_sum_of_powers:\n assumes p: \"(p::nat)>1\"\n shows \"\\ ((^) p ` {0..n}) = (\\ i = 0 .. n . p^i)\" (is \"?l = ?r\")", "output": "by (metis inj_on_def p power_inject_exp sum.reindex_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma head_head[simp]: \"isnpolyh p n0 \\ head (head p) = head p\"", "output": "by (induct p rule: head.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma match_list_append: \"match_list \\ (m1@m2) a p \\ (\\ match_list \\ m1 a p \\ match_list \\ m2 a p)\"", "output": "by(induction m1) simp+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma RBT_Impl_rbt_all_simps [simp, code]:\n \"RBT_Impl_rbt_all P rbt.Empty \\ True\"\n \"RBT_Impl_rbt_all P (Branch c l k v r) \\ P k v \\ RBT_Impl_rbt_all P l \\ RBT_Impl_rbt_all P r\"", "output": "by(auto simp add: RBT_Impl_rbt_all_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pac_idealI1[intro]:\n \\p \\ A \\ p \\ pac_ideal A\\", "output": "unfolding pac_ideal_def\nby (auto intro: ideal.span_base)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weight_sample_uniform_units:\n assumes \"(p::nat) > 1\" \n shows \"weight_spmf (sample_uniform_units p) = 1\"", "output": "using assms lossless_sample_uniform_units\nby (simp add: lossless_weight_spmfD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sign_changes_cong':\n assumes \"\\p \\ set ps. sgn (poly p x) = sgn (poly p y)\"\n shows \"sign_changes ps x = sign_changes ps y\"", "output": "using assms\nby (intro sign_changes_cong, simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma auto_weaken_pre_init_hf: \n assumes \"\\x. PROTECT P x \\ P' x\" \n assumes \"(f,h) \\ hfref P' R S\"\n shows \"(f,h) \\ hfref P R S\"", "output": "using assms\nby (auto simp: hfref_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma child_other: \"d \\ d' \\ child p dir d ! d' = p ! d'\"", "output": "unfolding child_def lv_def ix_def\nby (cases \"d' < length p\", auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_omit_branch:\n assumes \\new p a branch\\\n shows \\new p a (omit_branch xs branch)\\", "output": "using assms omit_branch_mem_dual unfolding new_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_y_x_poly_lift:\n fixes p :: \"'a :: comm_monoid_add poly\"\n shows \"poly_y_x (poly_lift p) = [:p:]\"", "output": "apply(subst poly_y_x_fix_y_deg[of _ 0],force)\napply(subst(10) poly_as_sum_of_monoms[symmetric])\nby (auto simp add: monom_sum monom_0 hom_distribs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inputBoundOutputTrans[dest]:\n fixes a :: name\n and x :: name\n and P :: pi\n and b :: name\n and y :: name\n and P' :: pi\n\n assumes \"a.P \\b<\\y> \\ P'\"\n\n shows False", "output": "using assms\nby - (ind_cases \"a.P \\b<\\y> \\ P'\", auto simp add: residualInject)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma merge_simps [simp]:\n \"merge qs [] = qs\"\n \"merge qs (p#ps) = update (fst p) (snd p) (merge qs ps)\"", "output": "by (simp_all add: merge_def split_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filter_eq_Cons_iff:\n \"(filter P ys = x#xs) =\n (\\us vs. ys = us @ x # vs \\ (\\u\\set us. \\ P u) \\ P x \\ xs = filter P vs)\"", "output": "by(auto dest:filter_eq_ConsD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma last_smods_nzero:\n assumes \"p\\0\"\n shows \"last (smods p q) \\0\"", "output": "by (metis assms last_in_set no_0_in_smods smods_nil_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma WT1_not_contains_insync: \"P,E \\1 e :: T \\ \\ contains_insync e\"\n and WTs1_not_contains_insyncs: \"P,E \\1 es [::] Ts \\ \\ contains_insyncs es\"", "output": "by(induct rule: WT1_WTs1.inducts) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inputChainFresh: \n fixes x :: name\n and xvec :: \"name list\"\n and N :: \"'a::fs_name\"\n and P :: \"('a, 'b::fs_name, 'c::fs_name) psi\"\n\n shows \"x \\ (inputChain xvec N P) = (x \\ set xvec \\ (x \\ N \\ x \\ P))\"", "output": "by (induct xvec) (simp_all add: abs_fresh)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma WhileInt [intro?]:\n \"\\,\\\\\\<^bsub>/F\\<^esub> (P \\ b) c P,A\n \\\n \\,\\\\\\<^bsub>/F\\<^esub> P (whileAnno b {s. undefined} V c) (P \\ -b),A\"", "output": "by (unfold whileAnno_def) (rule HoarePartialDef.While [THEN conseqPrePost],auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Process_spec: \"Abs_process((F P , D P)) = P\"", "output": "by(simp add: F_def FAILURES_def D_def DIVERGENCES_def Rep_process_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma singular_relboundary_alt:\n \"singular_relboundary p X S c \\\n (\\d e. singular_chain (Suc p) X d \\ singular_chain p (subtopology X S) e \\\n chain_boundary (Suc p) d = c + e)\"", "output": "unfolding singular_relboundary_def mod_subset_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma deg_leE:\n assumes \"p \\ carrier P\"\n assumes \"degree p < k\"\n shows \"p k = \\\"", "output": "using assms coeff_of_sum_diff_degree0 P_def coeff_simp deg_aboveD\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \n\"generalized_sfw [] p = None\" \n\"generalized_sfw (a # as) p = (if (case a of (m,_) \\ simple_matches m p) then Some a else generalized_sfw as p)\"", "output": "by(fact generalized_sfw_simps)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonterminating_implies_div_free: \"non_terminating P \\ D P = {}\"", "output": "unfolding non_terminating_is_right\nby (metis NT_ND equals0I front_tickFree_charn process_charn tickFree_Cons tickFree_append)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hyp2_S_z_non_zero:\n assumes \"p \\ hyp2 \\ S\"\n shows \"z_non_zero p\"", "output": "proof - from \\p \\ hyp2 \\ S\\ have \"conic_sgn p \\ 0\"\nby (unfold K2_def S_def) auto hence \"conic_sgn p \\ 1\"\nby simp thus \"z_non_zero p\"\nby (rule conic_sgn_not_1_z_non_zero)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_bs_I: \"wf_bs bs p \\ Ipoly (bs @ bs') p = Ipoly bs p\"", "output": "by (induct p) (auto simp add: nth_append wf_bs_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cs_rep_apply[simp]:\n assumes \"p \\ dom f\"\n shows \"fst (the (cs_rep (f, P) p)) = the (f p)\"", "output": "using assms unfolding cs_rep_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma croots: assumes \"p \\ 0\" \"degree p \\ 2\"\n shows \"set (croots p) = {x. poly p x = 0}\"", "output": "using assms unfolding croots_def\nusing roots0[of p] roots1[of p] croots2[of p]\nby (auto split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bpE:\n assumes \"bp P\"\n shows \"pairwise disjnt P\" \"{} \\ P\" \"\\P = U\" \"\\B \\ P. W(B) \\ c\"", "output": "using assms unfolding bp_def partition_on_def\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tauTransitionChain:\n fixes P :: pi\n and P' :: pi\n\n assumes \"P \\\\<^sub>l\\<^sup>^\\ \\ P'\"\n\n shows \"P \\\\<^sub>\\ P'\"", "output": "using assms\nby(auto intro: Weak_Late_Step_Semantics.tauTransitionChain simp add: weakTransition_def residual.inject transition_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_process3_S_pref: \"\\is_process P; (t, {}) \\ FAILURES P; s \\ t\\ \\ (s, {}) \\ FAILURES P\"", "output": "by(auto simp: le_list_def intro: is_process3 [rule_format])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma least_power_of_permutation:\n assumes \"permutation p\" shows \"(p ^^ (least_power p a)) a = a\" and \"least_power p a > 0\"", "output": "using permutation_is_nilpotent[OF assms] least_powerI\nby (metis id_apply)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iso_point_subset_block_iff: \"p \\ \\ \\ bl \\# \\ \\ p \\ bl \\ (\\ ` p) \\ (\\ ` bl)\"", "output": "apply auto\nusing image_subset_iff iso_point_in_block_img_iff subset_iff\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LocalSecretsComposition_neg_loc_k:\nassumes \"kKS key \\ LocalSecrets P\"\n and \"exprChannel ch (kE key)\"\n and \"kKS key \\ specKeysSecrets P\"\nshows \"ch \\ loc P\"", "output": "using assms\nby (simp only: LocalSecretsDef, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in PolynRg) pol_SOME_1:\"p \\ carrier R \\ \n cf_sol R S X p (SOME f. cf_sol R S X p f)\"", "output": "apply (frule ex_cf_sol[of p])\napply (rule_tac P = \"cf_sol R S X p\" in someI_ex, assumption) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gen_lossless_gpv_lift_spmf [iff]: \"gen_lossless_gpv (lift_spmf p) \\ lossless_spmf p\"", "output": "by(auto dest: gen_lossless_gpvD intro: gen_lossless_gpvI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bounded_bdd_above[intro]:\n assumes bP: \"bounded P\"\n shows \"bdd_above (range P)\"", "output": "proof fix x assume \"x \\ range P\" with bP show \"x \\ Inf {b. bounded_by b P}\" unfolding bounded_def\nby(auto intro:cInf_greatest)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invoke_empty_reads [simp]: \"\\P \\ S. reflp P \\ transp P \\ reads S (invoke [] ptr args) h h'\"", "output": "apply(simp add: invoke_def reads_def preserved_def)\nby (meson bind_returns_result_E error_returns_result)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ex1_iff_Collect_singleton: \"P x \\ (\\!x. P x) \\ Collect P = {x}\"", "output": "by (subst ex1_imp_Collect_singleton[symmetric], auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma insert_eqvt:\n shows \"p \\ (insert x A) = insert (p \\ x) (p \\ A)\"", "output": "unfolding permute_set_eq_image image_insert .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmf_prob_compl: \"pmf_prob p (-A) = 1 - pmf_prob p A\"", "output": "using measure_pmf.prob_compl[of A p]\nby (simp add: pmf_prob_def Compl_eq_Diff_UNIV)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma index_one_alt_bl_not_exist:\n assumes \"\\ = 1\" and \" blv \\# \\\" and \"p \\ blv\" and \"card p = 2\" \n shows\" \\ bl. bl \\# remove1_mset blv \\ \\ \\ (p \\ bl) \"", "output": "using index_one_empty_rm_blv\nby (metis assms(1) assms(2) assms(3) assms(4) filter_mset_empty_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma no_end_point_char_converse:\n assumes \"point p\"\n shows \"x;p \\ 0 \\ p \\ x\\<^sup>T;1\"", "output": "using assms no_end_point_char\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nodes_states:\n assumes \"p \\ nodes\" \"path r p\"\n shows \"set (states r p) \\ nodes\"", "output": "using reachable_states assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_process5_S:\n\"\\is_process P; (sa, X) \\ FAILURES P; \\c. c \\ Y \\ (sa @ [c], {}) \\ FAILURES P\\ \\ (sa, X \\ Y) \\ FAILURES P\"", "output": "by(drule is_process5, metis)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma shift1_isnpolyh: \"isnpolyh p n0 \\ p \\ 0\\<^sub>p \\ isnpolyh (shift1 p) 0\"", "output": "using isnpolyh_mono[where n=\"n0\" and n'=\"0\" and p=\"p\"]\nby (simp add: shift1_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proj_undefined[simp, intro]: \"i \\ domain P \\ P i = undefined\"", "output": "using extensional_proj[of P] unfolding extensional_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ine_nonempty_exprChannelSet:\nassumes \"ine_exprChannelSet P ChSet E\"\n and \"ChSet \\ {}\"\nshows \"ine P E \"", "output": "using assms\nby (simp add: ine_def ine_exprChannelSet_def, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l7_17_bis:\n assumes \"A Midpoint P P'\" and\n \"B Midpoint P' P\"\n shows \"A = B\"", "output": "by (meson Tarski_neutral_dimensionless.l7_17 Tarski_neutral_dimensionless.l7_2 Tarski_neutral_dimensionless_axioms assms(1) assms(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_knows_conc_knows_elem_not_knows_tail:\nassumes \"\\ knows P (a # e)\"\n and \"knows P [a]\"\nshows \"\\ knows P e\"", "output": "using assms\nby (metis knows_concat_3)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma singleActionChain:\n fixes P :: pi\n and \\ :: freeRes\n and P' :: pi\n \n assumes \"P \\\\ \\ P'\"\n \n shows \"P \\\\<^sub>l\\<^sup>^(\\ \\ P')\"", "output": "using assms\nby(auto intro: Weak_Late_Step_Semantics.singleActionChain simp add: weakTransition_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_llast_V [simp]: \"lfinite P \\ llast P \\ V\"", "output": "using P_not_None lfinite_lset lset_P_V\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_nabla_aux: \"(P \\ (converse R) `` P \\ P = {}) \\ (s2r P \\ relfdia R (s2r P) \\ s2r P = {})\"", "output": "apply (standard, metis Domain_Id_on Domain_mono Id_on_empty fdia_rel_im1)\nusing fdia_rel_im1\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Bernstein_coeffs_01_smult: \n assumes \"degree P \\ p\"\n shows \"nth_default 0 (Bernstein_coeffs_01 p (smult a P)) i =\n a * nth_default 0 (Bernstein_coeffs_01 p P) i\"", "output": "using assms\nby (auto simp: nth_default_Bernstein_coeffs_01 reciprocal_smult pcompose_smult)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem\nfixes\n p :: \"(32, 'a) simple_packet_ext_scheme\"\nassumes\n \"p_iiface p \\ set ifs\" and \"p_l2type p = 0x800\"\n \"lr_of_tran rt fw ifs = Inr oft\"\nshows\n \"OF_priority_match OF_match_fields_safe oft p = Action [Forward oif] \\ simple_linux_router_nol12 rt fw p = (Some (p\\p_oiface := oif\\))\"\n \"OF_priority_match OF_match_fields_safe oft p = Action [] \\ simple_linux_router_nol12 rt fw p = None\"\n \"OF_priority_match OF_match_fields_safe oft p \\ NoAction\" \"OF_priority_match OF_match_fields_safe oft p \\ Undefined\"\n \"OF_priority_match OF_match_fields_safe oft p = Action ls \\ length ls \\ 1\"\n \"\\ls. length ls \\ 1 \\ OF_priority_match OF_match_fields_safe oft p = Action ls\"", "output": "using assms lr_of_tran_correct\nby simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wqo_on_option_UNIV [intro]:\n \"wqo_on P UNIV \\ wqo_on (option_le P) UNIV\"", "output": "using wqo_on_with_bot [of P UNIV]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma red_\\_eq_mexecd_\\:\n \"\\ wf_J_prog P; wf_start_state P C M vs \\\n \\ J_\\ P C M vs Running = JVMd_\\ (J2JVM P) C M vs Running\"", "output": "by(simp only: red_Runs_eq_mexecd_Runs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma example_how_to_use_properties_in_proofs:\n shows \"\\ p . Policy.ifp p p\"", "output": "using Policy_properties.ifp_reflexive\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lspace_bounded_measurable:\n fixes p::real\n assumes f: \"f \\ borel_measurable (lebesgue_on S)\" and g: \"g \\ lspace (lebesgue_on S) p\" and \"p > 0\"\n and le: \" AE x in lebesgue_on S. norm (\\f x\\ powr p) \\ norm (\\g x\\ powr p)\"\n shows \"f \\ lspace (lebesgue_on S) p\"", "output": "using assms\nby (auto simp: lspace_ennreal_iff intro: Bochner_Integration.integrable_bound)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Bernstein_coeffs_01_sum: assumes \"degree P \\ p\"\n shows \"P = (\\j = 0..p. smult (nth_default 0 (Bernstein_coeffs_01 p P) j) \n (Bernstein_Poly_01 j p))\"", "output": "apply (subst nth_default_Bernstein_coeffs_01[OF assms])\napply (subst Bernstein_sum_01[OF assms])\nby argo"} {"instruct": "Given a lemma, please prove it.", "input": "lemma polyneg_norm:\nfixes p::\"'a::ring_1 poly\"\nshows \"isnpoly p \\ isnpoly (polyneg p)\"", "output": "using polyneg_normh\nby (simp add: isnpoly_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma restrict_path[simp]: \"path (restrict A) = path A\"", "output": "proof (intro ext iffI) show \"path A wr p\" if \"path (restrict A) wr p\" for wr p\nusing that\nby induct auto show \"path (restrict A) wr p\" if \"path A wr p\" for wr p\nusing that\nby induct auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_volatile_compP [simp]: \"is_volatile (compP f P) = is_volatile P\"", "output": "proof(rule ext) fix hT show \"is_volatile (compP f P) hT = is_volatile P hT\"\nby(cases hT) simp_all\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Proj_range_closed:\n assumes \"is_Proj P\"\n shows \"closed (range (cblinfun_apply P))\"", "output": "using assms\napply transfer\nusing closed_csubspace.closed is_projection_on_image\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma symmetric_mpoly_uminus_iff [simp]: \"symmetric_mpoly A (-p) \\ symmetric_mpoly A p\"", "output": "unfolding symmetric_mpoly_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "theorem sturm_R:\n shows \"card {x. poly p x=0} = changes_R_smods p (pderiv p)\"", "output": "using sturm_tarski_R[of _ 1,unfolded taq_def]\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ipurge_tr_rev_trace:\n \"secure P I D \\ xs \\ traces P \\ ipurge_tr_rev I D u xs \\ traces P\"", "output": "by (subst ipurge_tr_rev_t_equiv [symmetric], rule ipurge_tr_rev_t_trace)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ltakeWhile_simps [simp, code, nitpick_simp]:\n shows ltakeWhile_LNil: \"ltakeWhile P LNil = LNil\"\n and ltakeWhile_LCons: \"ltakeWhile P (LCons x xs) = (if P x then LCons x (ltakeWhile P xs) else LNil)\"", "output": "by(auto simp add: ltakeWhile_def intro: llist.expand)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma polyneg0: \"isnpolyh p n \\ (~\\<^sub>p p) = 0\\<^sub>p \\ p = 0\\<^sub>p\"", "output": "by (induct p arbitrary: n rule: polyneg.induct) (auto simp add: Nneg_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nbhd_def2: \"Der_1 \\ \\ Der_4e \\ \\ \\A p. (nbhd A p) = (\\ A p)\"", "output": "unfolding nbhd_def\nby (smt Int_Open MONO_def PC1 monI pI2 conn)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pred_spmf_try [simp]:\n \"pred_spmf P (try_spmf p q) = (pred_spmf P p \\ (\\ lossless_spmf p \\ pred_spmf P q))\"", "output": "by(auto simp add: pred_spmf_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mono2mono_emeasure_spmf [THEN lfp.mono2mono]:\n shows monotone_emeasure_spmf:\n \"monotone (ord_spmf (=)) (\\) (\\p. emeasure (measure_spmf p))\"", "output": "by(rule monotoneI le_funI ord_spmf_eqD_emeasure)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hfref_weaken_pre': \n assumes \"\\x. \\P x; rdomp (fst R) x\\ \\ P' x\" \n assumes \"(f,h) \\ hfref P' R S\"\n shows \"(f,h) \\ hfref P R S\"", "output": "apply (rule hfrefI)\napply (rule hn_refine_preI)\nusing assms\nby (auto simp: hfref_def rdomp_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma disjCases4[consumes 1, case_names 1 2 3 4]:\n assumes AB: \"A \\ B \\ C \\ D\"\n and AP: \"A \\ P\"\n and BP: \"B \\ P\"\n and CP: \"C \\ P\"\n and DP: \"D \\ P\"\n shows \"P\"", "output": "proof - from AB AP BP CP DP show ?thesis\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mcont2mcont_nn_integral_spmf [THEN lfp.mcont2mcont, cont_intro]:\n shows mcont_nn_integral_spmf:\n \"mcont lub_spmf (ord_spmf (=)) Sup (\\) (\\p :: 'a spmf. nn_integral (measure_spmf p) f)\"", "output": "by(rule mcontI)(simp_all add: cont_nn_integral_spmf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma padic_add_comm0:\nassumes \"prime p\"\nshows \"(padic_add p x y)= (padic_add p y x)\"", "output": "using assms unfolding padic_add_def\nusing padic_integers.residue_add_comm[of p]\nby (simp add: padic_integers_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma irreducible\\<^sub>d_as_irreducible:\n fixes p :: \"int poly\"\n shows \"irreducible\\<^sub>d p \\ irreducible (primitive_part p)\"", "output": "using irreducible_primitive_connect[of \"primitive_part p\"]\nby (cases \"p = 0\", auto simp: irreducible\\<^sub>d_primitive_part)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma square_free_factorization_root: \n assumes sff: \"square_free_factorization p (c,bs)\"\n and p: \"p \\ (0 :: 'a poly)\"\n shows \"{x. poly p x = 0} = {x. \\ a i. (a,i) \\ set bs \\ poly a x = 0}\"", "output": "using square_free_factorization_order_root[OF sff p] p unfolding order_root\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in PolynRg) s_cf_deg:\"\\p \\ carrier R; p \\ \\\\ \\\n deg_n R S X p = fst (s_cf R S X p)\"", "output": "apply (frule s_cf_expr[of p], assumption, (erule conjE)+)\napply (simp add:pol_deg_n[of p \"s_cf R S X p\" \"fst (s_cf R S X p)\"]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strong_del_point_finite:\"finite_incidence_system (del_point p) (str_del_point_blocks p)\"", "output": "using strong_del_point_incidence_wf del_point_def\nby (intro_locales) (simp_all add: finite_incidence_system_axioms_def finite_sets)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weak_transition_stepI [simp]:\n assumes \"P \\{\\} P'\"\n shows \"P \\\\\\\\ P'\"", "output": "using assms\nby (cases \"\\ = \\\", simp_all add: observable_tau_transition)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma polynate_norm[simp]:\n fixes p :: \"'a::field poly\"\n shows \"isnpoly (polynate p)\"", "output": "by (induct p rule: polynate.induct) (simp_all add: polyadd_norm polymul_norm polysub_norm polyneg_norm polypow_norm, simp_all add: isnpoly_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isconstant_polybound0: \"isnpolyh p n0 \\ isconstant p \\ polybound0 p\"", "output": "by (induct p arbitrary: n0 rule: isconstant.induct) (auto simp add: isnpolyh_polybound0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma construct_NofI_R_relation:\n fixes p:: \"real poly\"\n fixes I1:: \"real poly list\"\n fixes I2:: \"real poly list\"\n shows \"construct_NofI_R p I1 I2 =\n construct_NofI (sum_list (map power2 (p # I1))) I2\"", "output": "unfolding construct_NofI_R_def construct_NofI_def\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wt_J2JVM: \"wf_J_prog P \\ wf_jvm_prog (J2JVM P)\"", "output": "unfolding J2JVM_def o_def\nby(rule wt_compP2)(rule compP1_pres_wf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prefix_conforms [simp]: \"path_conforms_with_strategy p (ltake n P) \\\"", "output": "using P_conforms path_conforms_with_strategy_prefix\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma find_consistent_signs_at_roots_R:\n fixes p:: \"real poly\"\n fixes qs :: \"real poly list\"\n assumes \"p \\ 0\"\n shows \"set(find_consistent_signs_at_roots_R p qs) = set(characterize_consistent_signs_at_roots p qs)\"", "output": "by (metis assms find_consistent_signs_at_roots_0_R find_consistent_signs_at_roots_1_R length_greater_0_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_nth_conv: \"path E u p v \\ (let p'=p@[v] in\n u=p'!0 \\\n (\\iE))\"", "output": "apply (induct p arbitrary: v rule: rev_induct)\napply (auto simp: path_conc_conv path_cons_conv nth_append) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_cond_degree_0_imp_no_root:\n fixes x :: \"'b :: {comm_ring_1,ring_char_0}\"\n assumes pc: \"poly_cond p\" and deg: \"degree p = 0\" shows \"ipoly p x \\ 0\"", "output": "proof from pc have \"p \\ 0\"\nby auto moreover assume \"ipoly p x = 0\" note poly_zero[OF this] ultimately show False\nusing deg\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assert_disch3 :\" \\ P \\ \\ \\ (\\ \\ (assert\\<^sub>S\\<^sub>E P))\"", "output": "by(auto simp: bind_SE_def assert_SE_def valid_SE_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma absolute_liveness_eventually:\n shows \"absolute_liveness P \\ (\\\\. P \\) \\ P = \\P\"", "output": "unfolding absolute_liveness_def defs\nby (metis cancel_comm_monoid_add_class.diff_cancel drop_eq_Nil order_refl shift.simps(1) stake_suffix_id suffix_shift suffix_zero)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma headn_0[simp]: \"isnpolyh p n \\ m < n \\ headn p m = p\"", "output": "by (induct p arbitrary: n rule: degreen.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma okjectEqvt[eqvt]:\n fixes p :: \"name prm\"\n and \\ :: \"('a::fs_name) action\"\n\n shows \"(p \\ object \\) = object(p \\ \\)\"", "output": "by(nominal_induct \\ rule: action.strong_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lm008: \"injections X Y = totalRels X Y \\ injectionsUniverse\"", "output": "using injections_def\nby (simp add: Collect_conj_eq Int_assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma limited_and_eq_id:\n \"\\ limited_and x z; y AND z = z \\ \\ x AND y = x\"", "output": "unfolding limited_and_def\nby (erule subst, fastforce simp: word_bw_lcs word_bw_assocs word_bw_comms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tuple5_mono [partial_function_mono]:\n assumes \"\\y. mono_sum_bot (p1 y)\"\n and \"\\y. mono_sum_bot (p2 y)\"\n and \"\\y. mono_sum_bot (p3 y)\"\n and \"\\y. mono_sum_bot (p4 y)\"\n and \"\\y. mono_sum_bot (p5 y)\"\n shows \"mono_sum_bot (\\g. Xmlt.tuple5 t (\\y. p1 y g) (\\ y. p2 y g) (\\ y. p3 y g) (\\ y. p4 y g) (\\ y. p5 y g) f x)\"", "output": "using assms\nby (cases x, cases \"list5elements (Xml.children x)\") (auto intro!: partial_function_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_gpv_def':\n \"rel_gpv A B gpv gpv' \\\n (\\gpv''. (\\(x, y) \\ results'_gpv gpv''. A x y) \\ (\\(x, y) \\ outs'_gpv gpv''. B x y) \\\n map_gpv fst fst gpv'' = gpv \\ map_gpv snd snd gpv'' = gpv')\"", "output": "unfolding rel_gpv_def\nby(auto simp add: BNF_Def.Grp_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma aadd_two_pos:\"\\0 \\ (x::ant); 0 \\ y\\ \\ 0 \\ x + y\"", "output": "apply (cut_tac Zero_in_aug_inf, cut_tac pos_in_aug_inf[of \"x\"], cut_tac pos_in_aug_inf[of \"y\"])\napply (cut_tac aadd_le_mono[of \"0\" \"x\" \"y\"], simp add:aadd_0_l, assumption+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lsl_rpc_galois: \"(x \\ \\ z \\ y) = (z \\ rpc x (y::'a::bool_unital_quantale))\"", "output": "unfolding rpc_def\nby (metis adj_def inf_commute ls_galois shunt1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma omega_dom [simp]: \"d (\\ x y) = \\ x y\"", "output": "using Omega_def local.a_d_closed local.ads_d_def local.apd_d_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ereal_inverse_antimono_strict:\n fixes x y :: ereal\n shows \"0 \\ x \\ x < y \\ inverse y < inverse x\"", "output": "by (cases rule: ereal2_cases[of x y]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closed_diagonal:\n \"closed {y. \\ x::('a::t2_space). y = (x,x)}\"", "output": "proof - have \"{y. \\ x::'a. y = (x,x)} = UNIV - {(x,y) | x y. x \\ y}\"\nby auto then show ?thesis\nusing open_diagonal_complement closed_Diff\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dp_total2: \"is_direct_product x y \\ is_total y\"", "output": "by (metis is_direct_product_def inf_le2 is_total_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unique_choice: \"\\x. \\!y. Q x y \\ \\!f. \\x. Q x (f x)\"", "output": "apply (auto intro!: choice ext)\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wls_fresh_psubst_I:\nassumes \"wls s X\" and \"wlsEnv rho\"\nand \"rho zs z = None \\ fresh zs z X\" and\n \"\\ ys y Y. rho ys y = Some Y \\ fresh ys y X \\ fresh zs z Y\"\nshows \"fresh zs z (X #[rho])\"", "output": "using assms\nby(simp add: fresh_psubst_I)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rconjby_uminus: \"rconjby x (-y) = - rconjby x y\"", "output": "using minus_unique[of \"rconjby x y\"] add_assoc4[of \"rconjby x y\" \"-x\" \"-y\" x]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dotprod_is_0 [simp]:\n assumes \"length x = length y\"\n shows \"x \\ y = 0 \\ (\\i y ! i = 0)\"", "output": "using assms\nby (metis dotprod_gt0_iff neq0_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordinal_exp_assoc:\n\"(x ** y) ** z = x ** (y * z)\"", "output": "apply (case_tac \"x = 0\", simp_all)\napply (rule_tac a=z in oLimit_induct, simp_all add: ordinal_exp_distrib) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma code_fset_eq [code]:\n \"HOL.equal X (fset_of_list Y) \\ size X = length (remdups Y) \\ (\\x |\\| X. List.member Y x)\"", "output": "apply (simp only: HOL.equal_class.equal_eq fset_eq_alt)\napply (simp only: size)\nusing fmember\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma antisym_conv: \n assumes \"y \\\\<^sub>a x\"\n shows \"x \\\\<^sub>a y \\ x = y\"", "output": "using assms\nby (blast intro: antisym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma middle:\n \"dist x (middle x y) = (dist x y)/2\"\n \"dist (middle x y) y = (dist x y)/2\"", "output": "unfolding middle_def\nusing middles[of x y]\nby (metis (mono_tags, lifting) someI_ex)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pr_id3_3': \"pr_conv_3_to_1 (\\ x y z. z) \\ PrimRec1'\"", "output": "proof - have \"pr_conv_3_to_1 (\\ x y z. z) = (\\x. c_snd x)\"\nby (simp add: pr_conv_3_to_1_def) thus ?thesis\nby (simp add: PrimRec1'.snd)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Polygamma_real_mono:\n assumes \"x > 0\" \"x \\ (y::real)\" \"even n\"\n shows \"Polygamma n x \\ Polygamma n y\"", "output": "using Polygamma_real_strict_mono[OF assms(1) _ assms(3), of y] assms(2)\nby (cases \"x = y\") simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma int_xor_ge0 [simp]:\n \\x XOR y \\ 0 \\ (x \\ 0 \\ y \\ 0)\\ for x y :: int", "output": "by (fact xor_nonnegative_int_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma accum1_lemma [simp]:\n shows \"rec_eval (rec_accum1 f) [x, y] = (\\ z \\ x. rec_eval f [z, y])\"", "output": "by (induct x) (simp_all add: rec_accum1_def)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wls_vsubstEnv_compose2:\nassumes \"wlsEnv rho\"\nand \"ys \\ zs \\ y \\ {z,z1}\"\nshows \"((rho &[y1 // y]_ys) &[z1 // z]_zs) =\n ((rho &[z1 // z]_zs) &[(y1 @ys[z1 / z]_zs) // y]_ys)\"", "output": "using assms\nby(simp add: vsubstEnv_compose2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sup_inf_distrib2_1:\n \"((y :: 'a :: lattice) \\ z) \\ x = (y \\ x) \\ (z \\ x)\"", "output": "quickcheck[expect = counterexample] oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gen_upper_bound_increasing:\n fixes a :: real\n assumes \"a \\ x\"\n and \"\\y. a \\ y \\ y \\ x \\ ((\\x. fu x - f x) has_real_derivative g y) (at y)\"\n and \"\\y. a \\ y \\ y \\ x \\ g y \\ 0\"\n and \"fu a = f a\"\n shows \"f x \\ fu x\"", "output": "apply (rule gen_lower_bound_increasing [of a x f fu \"\\u. - g u\"])\nusing assms DERIV_minus [where f = \"\\x. fu x - f x\"]\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sup_eq_bot_iff [simp]:\n \"(x :: 'a :: bounded_lattice_bot) \\ y = \\ \\ x = \\ \\ y = \\\"", "output": "quickcheck[expect = no_counterexample]\nby (simp add: eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma circ_simulate_absorb:\n \"y * x \\ x \\ y\\<^sup>\\ * x \\ x \\ y\\<^sup>\\ * bot\"", "output": "by (metis circ_simulate_left_plus_1 circ_zero mult_1_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma max_tstp_idem: \"max_tstp (max_tstp x y) y = max_tstp x y\"", "output": "by (cases x; cases y) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma esqrt_mono2 [mono_intros]:\n assumes \"x \\ y\"\n shows \"esqrt x \\ esqrt y\"", "output": "using esqrt_mono assms unfolding mono_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma kat_2_equiv:\n \"y * a(z) \\ a(x) * y \\ d(x) * y * a(z) = bot\"", "output": "apply (rule iffI)\napply (simp add: kat_2)\nby (smt (verit, best) a_Z a_below_one a_complement_one case_split_left d_def mult_assoc mult_right_isotone mult_1_right bot_least)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma The_select_first[simp]: \"select_first x p y \\ The (select_first x p) = y\"", "output": "by (intro the_equality select_first_unique)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma funpow_dist_0:\n assumes \"x = y\" shows \"funpow_dist f x y = 0\"", "output": "using assms unfolding funpow_dist_def\nby (intro Least_eq_0) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_pure_alt_def: \"is_pure R \\ (\\Ri. \\x y. R x y = \\((y,x)\\Ri))\"", "output": "unfolding is_pure_def\napply auto\napply (rename_tac P')\napply (rule_tac x=\"{(x,y). P' y x}\" in exI)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mk_mop_rl3:\n assumes \"\\x y z. mf x y z \\ ASSERT (P x y z) \\ RETURN (f x y z)\"\n shows \"(RETURN ooo f, mf) \\ Id \\ Id \\ Id \\ \\Id\\nres_rel\"", "output": "unfolding assms[abs_def]\nby (auto intro!: nres_relI simp: pw_le_iff refine_pw_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma facetrel_complement_vertex: \"y\\x \\ x = insert v y \\ v\\y\"", "output": "using facetrel_def[of y x]\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hcomplex_approx_iff:\n \"(x \\ y) = (hRe x \\ hRe y \\ hIm x \\ hIm y)\"", "output": "unfolding approx_def\nby (simp add: hcomplex_Infinitesimal_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult_L_sup_omega:\n \"(x * L \\ y)\\<^sup>\\ = y\\<^sup>\\ \\ y\\<^sup>\\ * x * L\"", "output": "by (metis L_left_zero mult_bot_add_omega sup_commute mult_assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma omega_sum_unfold_1:\n \"(x \\ y)\\<^sup>\\ = x\\<^sup>\\ \\ x\\<^sup>\\ * y * (x \\ y)\\<^sup>\\\"", "output": "by (metis mult_right_dist_sup omega_unfold mult_assoc wagner)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma complement_antitone:\n \"x \\ y \\ -y \\ -x\"", "output": "by (metis le_iff_sup maddux_3_3 sba2_export sup_monoid.add_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma real_sqrt_less_iff [simp]: \"sqrt x < sqrt y \\ x < y\"", "output": "unfolding sqrt_def\nby (rule real_root_less_iff [OF pos2])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma real_sqrt_sum_squares_eq_cancel2: \"sqrt (x\\<^sup>2 + y\\<^sup>2) = y \\ x = 0\"", "output": "by (drule arg_cong [where f = \"\\x. x\\<^sup>2\"]) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sigma_msetE[elim!]: \"\\c \\# Sigma_mset A B; \\x y. \\x \\# A; y \\# B x; c = (x, y)\\ \\ P\\ \\ P\"", "output": "by (unfold Sigma_mset_def) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma funpow_dist_0_eq:\n assumes \"y \\ orbit f x\" shows \"funpow_dist f x y = 0 \\ x = y\"", "output": "using assms\nby (auto simp: funpow_dist_0 dest: funpow_dist_prop)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comp_one_vector:\n \"one_vector x \\ one_vector y \\ one_vector (x * y)\"", "output": "using mult_isotone mult_semi_associative order_lesseq_imp one_vector_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma while_while_mult_sub:\n \"x \\ (1 \\ y) \\ (x \\ 1) \\ y\"", "output": "by (metis sup_commute while_sub_dist_3 while_while_sup)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma circ_mult_1:\n \"(x * y)\\<^sup>\\ = 1 \\ x * (y * x)\\<^sup>\\ * y\"", "output": "by (metis circ_left_unfold circ_slide_1 mult_assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hadd: \"x @+ y = x \\ RepFun y (\\z. x @+ z)\"", "output": "by (metis def_hmemrec RepFun_ecut hadd_def order_refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lres_mult_lres_lres:\n \"x / (z * y) = (x / y) / z\"", "output": "by (metis conv_dist_comp double_compl lres_def mult_assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_lemma: \"\\ x y. rec_exec rec_add [x, y] = x + y\"", "output": "by(induct_tac y, auto simp: rec_add_def rec_exec.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lub_belowI[intro, simp]:\n fixes x :: \"'a :: Join_cpo\"\n shows \"(\\ y. y \\ S \\ y \\ x) \\ lub S \\ x\"", "output": "by (metis exists_lub is_lub_thelub_ex is_ub_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_simp_var2:\n assumes \"x \\ y\"\n shows \"(Var x)[y ::= M] = Var x\"", "output": "unfolding subst_def\nby( rule, metis substitutes.var2 assms, metis substitutes_function substitutes.var2 assms )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma center_on_geodesic [simp]:\n \"center x y z \\ {x--y}\"\n \"center x y z \\ {x--z}\"\n \"center x y z \\ {y--z}\"\n \"center x y z \\ {y--x}\"\n \"center x y z \\ {z--x}\"\n \"center x y z \\ {z--y}\"", "output": "using center_as_intersection\nby (auto simp add: some_geodesic_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma translexLess: \n shows \"trans lexLess\"", "output": "proof- { fix x :: \"'a Trail\" and y :: \"'a Trail\" and z :: \"'a Trail\" assume \"(x, y) \\ lexLess\" and \"(y, z) \\ lexLess\" hence \"(x, z) \\ lexLess\"\nusing lexord_trans transDecisionLess unfolding lexLess_def\nby simp } thus ?thesis unfolding trans_def\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma star_right_induct_mult_iff:\n \"y * x \\ y \\ y * x\\<^sup>\\ \\ y\"", "output": "using mult_right_isotone order_trans star.circ_increasing star_right_induct_mult\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma merge_blindable_alt_def:\n \"merge_blindable h m x y = (case (x, y) of\n (Unblinded x, Unblinded y) \\ map_option Unblinded (m x y)\n | (Blinded x, Unblinded y) \\ (if Content (h y) = x then Some (Unblinded y) else None)\n | (Unblinded y, Blinded x) \\ (if Content (h y) = x then Some (Unblinded y) else None)\n | (Blinded t, Blinded u) \\ (if t = u then Some (Blinded u) else None))\"", "output": "by(simp split: blindable\\<^sub>m.split blindable\\<^sub>h.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uint16_mod_code [code abstract]:\n \"Rep_uint16 (uint16_mod x y) =\n (if y = 0 then Rep_uint16 (undefined ((mod) :: uint16 \\ _) x (0 :: uint16)) else Rep_uint16 x mod Rep_uint16 y)\"", "output": "unfolding uint16_mod_def\nby transfer simp"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wls_freshAbs_psubstAbs_I:\nassumes \"wlsAbs (us,s) A\" and \"wlsEnv rho\"\nand \"rho zs z = None \\ freshAbs zs z A\" and\n \"\\ ys y Y. rho ys y = Some Y \\ freshAbs ys y A \\ fresh zs z Y\"\nshows \"freshAbs zs z (A $[rho])\"", "output": "using assms\nby(simp add: freshAbs_psubstAbs_I)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wls_vsubst_trans:\nassumes \"wls s X\" and \"fresh ys y1 X\"\nshows \"((X #[y1 // y]_ys) #[y2 // y1]_ys) = (X #[y2 // y]_ys)\"", "output": "using assms\nby (simp add: vsubst_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_Res_not_congruent:\n assumes res_g: \"Complete_set_residues g\" \n and x: \"x \\ g b\" and y: \"y \\ g b\" and x_not_y: \"x\\y\" \n shows \"\\ cong x y b\"", "output": "using assms unfolding Complete_set_residues_def unfolding pairwise_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vector_2: \"is_vector y \\ (x \\ y\\<^sup>\\) ; z = x ; (y \\ z)\"", "output": "by (metis inf.commute ra_2 is_vector_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma implies_inf_isotone:\n \"x \\ y \\ (x \\ z) \\ (y \\ z)\"", "output": "by (metis implies_curry implies_galois_increasing implies_isotone)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma expl_cond_expect_const:\n assumes \"Y w = Y y\"\n shows \"expl_cond_expect M Y X w = expl_cond_expect M Y X y\"", "output": "unfolding expl_cond_expect_def img_dce_def\nby (simp add: assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma econc_x_trans[trans]: \n \"x \\ \\\\<^sub>E E R y \\ y \\ z \\ x \\ \\\\<^sub>E E R z\"", "output": "by (force simp: pw_ele_iff refine_pw_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma p_linear: \"(x::('e, 'a::linorder) Prio) \\ y \\ y \\ x\"", "output": "by (unfold plesseq_def) (simp only: p_linear2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma semilat_Def:\n\"semilat(A,r,f) \\ order r \\ closed A f \\ \n (\\x\\A. \\y\\A. x \\\\<^sub>r x \\\\<^sub>f y) \\ \n (\\x\\A. \\y\\A. y \\\\<^sub>r x \\\\<^sub>f y) \\ \n (\\x\\A. \\y\\A. \\z\\A. x \\\\<^sub>r z \\ y \\\\<^sub>r z \\ x \\\\<^sub>f y \\\\<^sub>r z)\"", "output": "by (unfold semilat_def) clarsimp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sin_monotone_2pi:\n assumes \"- (pi/2) \\ y\" and \"y < x\" and \"x \\ pi/2\"\n shows \"sin y < sin x\"", "output": "unfolding sin_cos_eq\nusing assms\nby (auto intro: cos_monotone_0_pi)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ND0aux2[rule_format]: \"DenyAllFromTo x y \\ set b \\ \n y \\ set (net_list_aux b)\"", "output": "by (metis aux5a net_list.simps set_remdups)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma power_inductr_var: \"y \\ x \\ y \\ y \\ x\\<^bsup>n\\<^esup> \\ y\"", "output": "by (induct n, metis eq_refl mult_oner power.simps(1), metis mult.assoc mult_isor order_refl order_trans power.simps(2) power_commutes)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_white_path_toE[elim!]:\n \"\\ (x points_to y) s; white y s \\ \\ (x has_white_path_to y) s\"", "output": "unfolding has_white_path_to_def\nby (auto elim: rtranclp.intros(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma forest_down_closed:\n \"x \\ y \\ forest y \\ forest x\"", "output": "using conv_isotone mult_isotone star_isotone\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lprod_3_6: assumes y': \"(y', y) \\ R\" shows \"([x, z, y'], [x, y, z]) \\ lprod R\"", "output": "apply (rule lprod_list[where a=\"z\" and b=\"z\" and ah=\"[x]\" and at=\"[y']\" and bh=\"[x,y]\" and bt=\"[]\", simplified])\napply (simp add: y' lprod_2_4) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes x: \"x \\ A\" and y: \"y \\ A\"\n shows not_iff_asym: \"\\x \\ y \\ y \\ x\"\n and not_asym_iff[simp]: \"\\x \\ y \\ y \\ x\"", "output": "using comparable[OF x y]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nodes_connected_ind_sym: \"F\\E \\ sym {(x, y) |x y. nodes_connected (ind F) x y}\"", "output": "apply(frule ind_valid_graph) unfolding sym_def\nusing valid_graph.nodes_connected_sym\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_not_prime: \n assumes \"prime (x::nat)\" \n and \"prime y\" \n and \"x > 2\" \n and \"y > 2\" \n shows \"\\ prime ((x-1)*(y-1))\"", "output": "by (metis assms One_nat_def Suc_diff_1 nat_neq_iff numeral_2_eq_2 prime_gt_0_nat prime_product)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vector_to_cblinfun_add: \\vector_to_cblinfun (x + y) = vector_to_cblinfun x + vector_to_cblinfun y\\", "output": "apply transfer\nby (simp add: scaleC_add_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reflect_rtranclp:\n \"(\\x y. S (f x) (f y) \\ R x y) \\\n bij_on_trancl S f \\\n S\\<^sup>*\\<^sup>* (f x) (f y) \\ R\\<^sup>*\\<^sup>* x y\"", "output": "unfolding Nitpick.rtranclp_unfold\nby (metis (full_types) injD reflect_tranclp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_F_left_commute: \"subst x (F x) (subst y (F y) t) = subst y (F y) (subst x (F x) t)\"", "output": "by (metis subst_tm_commute2 F_unfold subst_tm_id F_unfold atom_fresh_perm tm.fresh(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ni_star_induct_iff:\n \"ni(x * y) \\ ni(y) \\ ni(x\\<^sup>\\ * y) \\ ni(y)\"", "output": "using ni_n_order n_star_induct_iff\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma xml2to3elements_mono [partial_function_mono]:\n assumes p1: \"\\y. mono_sum_bot (p1 y)\"\n \"\\y. mono_sum_bot (p2 y)\"\n \"\\y. mono_sum_bot (p3 y)\"\n shows \"mono_sum_bot (\\g. xml2to3elements t (\\y. p1 y g) (\\y. p2 y g) (\\y. p3 y g) f x)\"", "output": "by (cases x, auto intro!: partial_function_mono p1)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem comm: \"x \\ y = y \\ x \\ (\\ t m k. x = t\\<^sup>@k \\ y = t\\<^sup>@m)\"", "output": "using comm_append_are_replicate[of x y, folded pow_is_concat_replicate] pow_comm\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma preal_add_assoc: \"((x::preal) + y) + z = x + (y + z)\"", "output": "apply (simp add: preal_add_def mem_add_set)\napply (force simp: add_set_def ac_simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hypreal_setle_less_trans: \"S *<= x \\ x < y \\ S *<= y\"\n for x y :: hypreal", "output": "by (meson le_less_trans less_imp_le setle_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma orbit_perm_rem_eq:\n assumes \"bij f\" shows \"orbit (perm_rem y f) x = (if x = y then {y} else orbit f x - {y})\"", "output": "using assms\nby (simp add: orbit_eq_singleton_iff orbit_perm_rem perm_rem_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hyperb_ineq_4_points' [mono_intros]:\n \"Min {Gromov_product_at (e::'a) x y, Gromov_product_at e y z, Gromov_product_at e z t} \\ Gromov_product_at e x t + 2 * deltaG(TYPE('a))\"", "output": "using hyperb_ineq_4_points[of e x y z t]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma essentialI [intro?]:\n \"\\B. \\ path G x p y; y \\ B; \\z. \\ x \\ y; z \\ set p \\ \\ z = x \\ z \\ S \\ \\ essential G B S x\"", "output": "by(auto simp add: essential_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_F_left_commute: \"subst x (F x) (subst y (F y) t) = subst y (F y) (subst x (F x) t)\"", "output": "by (metis subst_tm_commute2 F_unfold subst_tm_id F_unfold atom_fresh_perm tm.fresh(2))"} {"instruct": "Given a lemma, please prove it.", "input": "theorem freshEnv_updEnv_E4:\nassumes \"freshEnv ys y (rho [x \\ X]_xs)\"\nand \"zs \\ xs \\ z \\ x\" and \"rho zs z = Some Z\"\nshows \"fresh ys y Z\"", "output": "using assms unfolding freshEnv_def liftAll_def\nby (metis getEnv_updEnv1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bigo_sum1: \"\\x y. 0 \\ h x y \\\n \\c. \\x y. \\f x y\\ \\ c * h x y \\\n (\\x. \\y \\ A x. f x y) =o O(\\x. \\y \\ A x. h x y)\"", "output": "apply (rule bigo_sum_main)\napply force\napply clarsimp\napply (rule_tac x = c in exI)\napply force done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma circ_sup_sub_sup_one_2:\n \"x\\<^sup>\\ * (x \\ y) \\ x\\<^sup>\\ * (1 \\ y)\"", "output": "by (metis circ_sup_sub_sup_one_1 circ_transitive_equal mult_assoc mult_right_isotone)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma imperative_append: \"VARS x y\n {x=X & y=Y}\n x := rev(x);\n WHILE x~=[]\n INV {rev(x)@y = X@Y}\n DO y := (hd x # y);\n x := tl x\n OD\n {y = X@Y}\"", "output": "apply vcg_simp\napply(simp add: neq_Nil_conv)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fcompare_double_Eq2: \"fcompare_double y z = ccode.Eq \\ fcompare_double x y = c \\ fcompare_double x z = c\"", "output": "by transfer (auto simp: fcompare_def split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmran'E[elim]:\n assumes \"y \\ fmran' m\"\n obtains x where \"fmlookup m x = Some y\"", "output": "using assms\nby (auto simp: fmlookup_ran'_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in LCD) foldD_insert_aux:\n \"\\x \\ A; x \\ B; e \\ D; A \\ B\\\n \\ ((insert x A, v) \\ foldSetD D f e) \\ (\\y. (A, y) \\ foldSetD D f e \\ v = f x y)\"", "output": "apply auto\nby (metis Diff_insert_absorb f_closed finite_Diff foldSetD.insertI foldSetD_determ foldSetD_imp_finite insert_subset local.finite_imp_foldSetD local.foldSetD_closed)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_inf_binary: \"is_inf x y (\\{x, y})\"", "output": "proof - have \"is_Inf {x, y} (\\{x, y})\" .. then show ?thesis\nby (simp only: is_Inf_binary)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma while_sup_below:\n \"x \\ y \\ x \\ (y \\ 1)\"", "output": "by (metis le_supI le_supI1 while_left_dist_sup while_left_unfold while_one_increasing)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma left_diff_distrib: \"(x - y) \\\\<^sub>7 z = x \\\\<^sub>7 z - y \\\\<^sub>7 z\"\n and right_diff_distrib: \"x \\\\<^sub>7 (y - z) = x \\\\<^sub>7 y - x \\\\<^sub>7 z\"", "output": "by (simp_all add: cross7_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma min_maxsimpchain_adj:\n \"\\ maxsimp x; maxsimp y; x\\y; x\\y \\ \\ min_maxsimpchain [x,y]\"", "output": "using maxsimpchain_def min_maxsimpchainI_betw[of x y \"[]\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vdp_c0: \"t \\ point_ivl 7 \\ (x, y) \\ point_ivl (1.4, 2.4) \\\n t \\ vdp.existence_ivl0 (x, y) \\ vdp.flow0 (x, y) t \\ {(1.870, 0.9887) .. (1.875, 1.001)}\"", "output": "by (tactic \\ode_bnds_tac @{thms vdp_fas_def} 30 35 9 14 [(0, 1, \"0x000000\")] (* \"out_vdp_c0.out\" *) \"\" @{context} 1\\)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cdl_heap_add_assoc:\n \"\\sep_state_disj x y; sep_state_disj y z; sep_state_disj x z\\\n \\ cdl_heap_add (SepState (cdl_heap_add x y) (cdl_ghost_state_add x y)) z =\n cdl_heap_add x (SepState (cdl_heap_add y z) (cdl_ghost_state_add y z))\"", "output": "apply (clarsimp simp: sep_state_disj_def)\napply (cut_tac cdl_heap_add_assoc')\napply fast\napply fastforce done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma t_fusion_assoc [simp]:\n \"\\ last x = first y; last y = first z \\ \\ t_fusion x (t_fusion y z) = t_fusion (t_fusion x y) z\"", "output": "by (cases x, cases y, cases z, simp add: t_fusion_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_fresh: \"x \\ lookup e n y \\ y \\ set e \\ x \\ atom y\"", "output": "by (induct arbitrary: n rule: lookup.induct) (auto simp: pure_fresh fresh_at_base)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diamond_star_unfold_an:\n \"|x\\<^sup>\\>an(y) = an(y) \\ |n(y) * x>|x\\<^sup>\\>an(y)\"", "output": "by (metis an_n_def diamond_star_unfold_n n_an_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Omega_mult:\n \"(x * y)\\<^sup>\\ = 1 \\ x * (y * x)\\<^sup>\\ * y\"", "output": "by (metis Omega_def comb1.circ_mult_1 omega_left_zero_equal omega_translate)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wls_swapEnv_compose:\nassumes \"wlsEnv rho\"\nshows \"((rho &[x \\ y]_zs) &[x' \\ y']_zs') =\n ((rho &[x' \\ y']_zs') &[(x @zs[x' \\ y']_zs') \\ (y @zs[x' \\ y']_zs')]_zs)\"", "output": "using assms\nby (intro swapEnv_compose) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma edom_mono: \"x \\ y \\ edom x \\ edom y\"", "output": "unfolding edom_def\nby auto (metis below_bottom_iff fun_belowD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rtrancl_len_E [elim]:\n assumes \"(x, y) \\ r\\<^sup>*\" obtains n where \"(x, y) \\ r^^n\"", "output": "using rtrancl_imp_UN_relpow [OF assms]\nby best"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in weak_partial_order) weak_total_orderI:\n assumes total: \"!!x y. \\x \\ carrier L; y \\ carrier L\\ \\ x \\ y \\ y \\ x\"\n shows \"weak_total_order L\"", "output": "by unfold_locales (rule total)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comp_commute_below_diversity:\n \"x * y \\ -1 \\ y * x \\ -1\"", "output": "by (metis comp_right_one conv_dist_comp conv_one schroeder_3_p schroeder_4_p)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma while_sup_2:\n \"(x \\ y) \\ z \\ (x \\ (y \\ 1)) \\ z\"", "output": "using while_left_isotone while_sup_below\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_vector_derivative_transform_within_open:\n assumes \"(f has_vector_derivative f') (at x)\"\n and \"open S\"\n and \"x \\ S\"\n and \"\\y. y\\S \\ f y = g y\"\n shows \"(g has_vector_derivative f') (at x)\"", "output": "using assms unfolding has_vector_derivative_def\nby (rule has_derivative_transform_within_open)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma min_absorb2: \n assumes \"y \\\\<^sub>a x\"\n shows \"min x y = y\"", "output": "using assms unfolding min_def\nby (simp add: eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subset_dual: \"(\\ ` X = Y) \\ (X = \\\\<^sup>- ` Y)\"", "output": "by (metis dual_inj image_comp image_inv_f_f inv_o_cancel dual_inv2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma showsp_real_alg_append [show_law_simps]:\n \"showsp_real_alg p r (x @ y) = showsp_real_alg p r x @ y\"", "output": "by (intro show_lawD show_law_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Semilat) ub2 [simp, intro?]: \"\\ x \\ A; y \\ A \\ \\ y \\\\<^sub>r x \\\\<^sub>f y\"", "output": "using semilat\nby (simp add: semilat_Def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sqrt_nat[simp]: \"set (sqrt_nat x) = { y. y * y = x}\"", "output": "unfolding sqrt_nat_def\nusing root_nat[of 2 x]\nby (simp add: power2_eq_square)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_symmetric:\n assumes \"y = y\\<^sup>T\"\n shows \"sum (x\\<^sup>T \\ y) = sum (x \\ y)\"", "output": "by (metis assms sum_conv conv_dist_inf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma c_drop_at_Suc1: \"c_drop (Suc y) x = c_drop y (c_tl x)\"", "output": "apply(simp add: c_drop_at_Suc c_tl_c_drop) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matroid_ax_3_alt:\n assumes \"I \\ X \\ Y\"\n shows \"rk (X \\ Y) + rk I \\ rk X + rk Y\"", "output": "by (metis add.commute add_le_cancel_right assms matroid_ax_2 matroid_ax_3 order_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem (in pair_sigma_finite) Fubini:\n assumes f: \"f \\ borel_measurable (M1 \\\\<^sub>M M2)\"\n shows \"(\\\\<^sup>+ y. (\\\\<^sup>+ x. f (x, y) \\M1) \\M2) = (\\\\<^sup>+ x. (\\\\<^sup>+ y. f (x, y) \\M2) \\M1)\"", "output": "unfolding nn_integral_snd[OF assms] M2.nn_integral_fst[OF assms] .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma vinsert_compr: \"vinsert y A = set {x. x = y \\ x \\\\<^sub>\\ A}\"", "output": "unfolding vunion_def vinsert_def\nby simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vle2: \"x \\ y \\ x \\ y\"", "output": "by (metis (full_types) TC_add' add.right_neutral le_TC_def vle_def nonzero_less_TC)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma itrm_brackets_Cons_SomeE:\n assumes \"itrm_brackets (v#vs) x = Some x'\"\n obtains y' where \"itrm_brackets vs x = Some y'\" and \"itrm_bracket v y' = Some x'\"", "output": "using assms unfolding itrm_brackets_def\nby (elim foldr_option_Cons_SomeE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma n_mult_omega_L_below:\n \"n(y * x\\<^sup>\\) * L \\ y * x\\<^sup>\\ \\ y * n(x\\<^sup>\\) * L\"", "output": "using sup_right_divisibility n_mult_omega_L_star\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sublens_pres_indep:\n \"\\ X \\\\<^sub>L Y; Y \\ Z \\ \\ X \\ Z\"", "output": "apply (auto intro!:lens_indepI simp add: sublens_def lens_comp_def lens_indep_comm)\napply (simp add: lens_indep_sym) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n fixes x y::real\n assumes \"abs (x - y) \\ e\"\n obtains err where \"x = y + err\" \"abs err \\ e\"", "output": "using assms\napply atomize_elim\napply (rule exI[where x=\"x - y\"])\nby (auto simp: abs_real_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult_right_dist_inf:\n \"(x \\ y) * z = x * z \\ y * z\"", "output": "by (metis dual_dist_sup dual_dist_comp dual_involutive mult_right_dist_sup)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma BVG_assign_other: \"x\\y \\ y\\BVG(Assign x \\)\"", "output": "using repv_selectlike_other_converse[where x=x and y=y]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conjugate_conjr2[simp]: \"conjugate (\\x. x \\ y) = (\\x. y \\ x)\"", "output": "proof - have \"conjugate (conjugate (\\x. y \\ x)) = conjugate (\\x. x \\ y)\"\nby simp thus ?thesis\nby (metis conj_involution[OF residuated_conjl2])\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmrel_on_fset_refl_strong:\n assumes \"\\x y. x |\\| S \\ fmlookup m x = Some y \\ P y y\"\n shows \"fmrel_on_fset S P m m\"", "output": "unfolding fmrel_on_fset_fmrel_restrict fmrel_iff\nusing assms\nby (simp add: option.rel_sel)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem Theorem_11:\n shows \"\\y\\match (TruePref.gfp_F ds). (x, y) \\ Pd' (Xd x)\"", "output": "using Theorem_11_fp_cop_F TruePref.Theorem_15_match\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n \"\\cx = x, cy = y\\ = \\cx = x', cy = y'\\ \\ x = x' \\ y = y'\"", "output": "using [[smt_oracle, z3_extensions]]\nby smt+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ShiftP_Zero: \"{} \\ ShiftP Zero k d Zero\"", "output": "proof - obtain x::name and x'::name and y::name and z::name where \"atom x \\ (x',y,z,k,d)\" \"atom x' \\ (y,z,k,d)\" \"atom y \\ (z,k,d)\" \"atom z \\ (k,d)\"\nby (metis obtain_fresh) thus ?thesis\nby (auto simp: ShiftP.simps [of x x' y z])\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma csquare_continuous:\n fixes e :: real\n shows \"e > 0 \\ \\d. 0 < d \\ (\\y. cmod (y - x) < d \\ cmod (y * y - x * x) < e)\"", "output": "using isCont_power[OF continuous_ident, of x, unfolded isCont_def LIM_eq, rule_format, of e 2]\nby (force simp add: power2_eq_square)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma degree_max_aform:\n assumes \"degree_aform_err x \\ d\"\n assumes \"degree_aform_err y \\ d\"\n shows \"degree_aform_err (max_aform_err p x y) \\ d\"", "output": "using assms\nby (auto simp: max_aform_err_def Let_def Basis_list_real_def split: prod.splits intro!: order_trans[OF degree_aform_independent_from] order_trans[OF degree_aform_of_ivl])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma s_mul_ext_IdI:\n assumes \"X \\ {#}\" and \"M = X + Z\" and \"N = Y + Z\"\n and \"\\y \\ set_mset Y. \\x \\ set_mset X. (x, y) \\ R\"\n shows \"(M, N) \\ s_mul_ext Id R\"", "output": "using assms mult2_alt_sI[of N Z Y M Z X Id \"R\\\"]\nby (auto simp: s_mul_ext_def ac_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma general_product_idempotence: \"(\\ z. z = x) = x\"", "output": "proof - have \"\\y. O y x \\ (\\z. (\\y. y = x \\ P z y) \\ O y z)\"\nby (meson overlap_eq part_reflexivity part_transitivity) thus \"(\\ z. z = x) = x\"\nby (rule general_product_intro)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma as_good_as_sameIff[iff]:\n \"z \\ as_good_as y carrier relation \\ z \\ y \\ y \\ z\"", "output": "by (metis (no_types, lifting) as_good_as_def mem_Collect_eq not_outside)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_af:\n \"\\ af A P \\ (\\x y. x \\ A \\ y \\ A \\ \\ P x y) \\ (\\x\\A. \\ af A (\\y z. P y z \\ P x y))\"", "output": "unfolding af.simps [of A P]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diamond_L_left_isotone:\n \"x \\ y \\ \\x\\z \\ \\y\\z\"", "output": "using mult_left_isotone ni_def ni_isotone ndiamond_L_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pell_valuation_neg_pos:\n assumes \"x < 0\" \"y > 0\" \"solution (x, y)\"\n shows \"pell_valuation (x, y) \\ {-1<..<0}\"", "output": "using pell_valuation_pos_neg[of \"-x\" \"-y\"] assms\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pure_tree_inject[simp]: \"pure_tree x = pure_tree y \\ x = y\"", "output": "proof assume \"pure_tree x = pure_tree y\" hence \"root (pure_tree x) = root (pure_tree y)\"\nby simp thus \"x = y\"\nby simp\nqed simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alg_dvd_trans [trans]:\n fixes x y z :: \"'a :: field_char_0\"\n shows \"x alg_dvd y \\ y alg_dvd z \\ x alg_dvd z\"", "output": "using algebraic_int_times[of \"y / x\" \"z / y\"]\nby (auto simp: alg_dvd_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weakPsiCongResComm:\n fixes x :: name\n and \\ :: 'b\n and y :: name\n and P :: \"('a, 'b, 'c) psi\"\n\n assumes \"x \\ \\\"\n and \"y \\ \\\"\n\n shows \"\\ \\ \\\\x\\(\\\\y\\P) \\ \\\\y\\(\\\\x\\P)\"", "output": "using assms\nby(metis bisimResComm strongBisimWeakPsiCong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pt_set_infinite_ineq: \n fixes X :: \"'x set\"\n and pi :: \"'y prm\"\n assumes pt: \"pt TYPE('x) TYPE('y)\"\n and at: \"at TYPE('y)\"\n shows \"infinite (pi\\X) = infinite X\"", "output": "using pt at\nby (simp add: pt_set_finite_ineq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"Suc (Suc 1) * (x + Suc 1 * y) = 3 * x + 6 * y\"", "output": "apply (reflection Inum_eqs' only: \"Suc (Suc 1) * (x + Suc 1 * y)\") oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fractrel_iff_normalize_quot_eq:\n \"fractrel x y \\ normalize_quot x = normalize_quot y \\ snd x \\ 0 \\ snd y \\ 0\"", "output": "by (cases x, cases y) (auto simp: fractrel_def normalize_quot_eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma maxR_commute:\n shows \"{x,y} \\ Field r \\ maxR x y = maxR y x\"", "output": "using r_Linear_order unfolding maxR_def\nby (fastforce simp: order_on_defs antisym_def total_on_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eexp_inj[simp]: \"eexp x = eexp y \\ x = y\"", "output": "by (cases x; cases y; simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in aGroup) ag_plus_zero:\"\\x \\ carrier A; y \\ carrier A\\ \\\n (x = -\\<^sub>a y) = (x \\ y = \\)\"", "output": "apply (rule iffI)\napply (simp add:ag_l_inv1)\napply (simp add:ag_pOp_commute[of \"x\" \"y\"])\napply (rule ag_inv_unique[of \"y\" \"x\"], assumption+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_le_single_iff[iff]: \"{#x#} \\ {#y#} \\ x \\ y\" for x y :: \"'a::order\"", "output": "unfolding less_eq_multiset\\<^sub>H\\<^sub>O\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma domainCharacteristicFunction: \n \"Domain (X <|| Y) = X \\ Y\"", "output": "using domainConstant paste_Domain sup_commute\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rfb_set: \"fb\\<^sub>\\ R Y = {x. \\y. (x,y) \\ R \\ y \\ Y}\"", "output": "unfolding rfb_def ffb_prop_var comp_def klift_def f2r_def r2f_def kop_def\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iteration_subdenest: \"x\\<^sup>\\ \\ y\\<^sup>\\ \\ (x + y)\\<^sup>\\\"", "output": "by (metis add_commute iteration_idem iteration_subdist local.mult_isol_var)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma G_eq_real_suminf:\n \"convergence_G x y (1::real) \\ G x y = ennreal (\\i. p x y i)\"", "output": "unfolding G_eq_suminf\nby (intro suminf_ennreal ennreal_suminf_neq_top p_nonneg) (auto simp: convergence_G_def p_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lprod_3_1: assumes \"(x', x) \\ R\" shows \"([y, z, x'], [x, y, z]) \\ lprod R\"", "output": "apply (rule lprod_list[where a=\"y\" and b=\"y\" and ah=\"[]\" and at=\"[z,x']\" and bh=\"[x]\" and bt=\"[z]\", simplified])\napply (auto simp add: lprod_2_1 assms) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cont_case_prodI:\n assumes \"monotone (rel_prod orda ordb) (\\) (case_prod f)\"\n and \"\\x. cont lubb ordb Sup (\\) (\\y. f x y)\"\n and \"\\y. cont luba orda Sup (\\) (\\x. f x y)\"\n and \"class.preorder orda (mk_less orda)\"\n and \"class.preorder ordb (mk_less ordb)\"\n shows \"cont (prod_lub luba lubb) (rel_prod orda ordb) Sup (\\) (case_prod f)\"", "output": "by(rule cont_prodI)(simp_all add: assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma if_pres_disj: \"x \\ disjunctive \\ y \\ disjunctive \\ (If p then x else y) \\ disjunctive\"", "output": "apply (unfold if_assertion)\nby (simp add: sup_pres_disj comp_pres_disj assertion_disjunctive)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nested_bind [simp]:\n \"do x <- do y <- f; return (g y) od; h x od =\n do y <- f; h (g y) od\"", "output": "apply (clarsimp simp add: bind_def)\napply (rule ext)\napply (clarsimp simp add: Let_def split_def return_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma loop_semantics:\n \"\\ (\\x . y * x \\ z) = \\ (\\x . y * x \\ z) \\ n(\\ (\\x . y * x \\ z)) * L\"", "output": "using apx.least_fixpoint_char loop_apx_least_fixpoint\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes \"\\x\\{0::int..}. \\y\\{0..}. \\z\\{0..}. x + 3 * y = 5 * z\"\n shows \"\\x::nat. \\y z. x + 3 * y = 5 * z\"", "output": "apply transfer\napply fact done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordinal_le_div: \"\\0 < y; y * z \\ x\\ \\ (z::ordinal) \\ x div y\"", "output": "apply (auto simp add: div_ordinal_def)\napply (simp add: normal.le_oInv[OF normal_times]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma real_sqrt_eq_iff [simp]: \"sqrt x = sqrt y \\ x = y\"", "output": "unfolding sqrt_def\nby (rule real_root_eq_iff [OF pos2])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_orthogonal_complement_imp_orthogonal:\n assumes x: \"y \\ S\"\n and \"x \\ orthogonal_complement S\"\n shows \"orthogonal x y\"", "output": "using assms orthogonal_commute unfolding orthogonal_complement_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma arg_eqD: assumes \"arg (cis x) = arg (cis y)\" \"-pi < x\" \"x \\ pi\" \"-pi < y\" \"y \\ pi\"\n shows \"x = y\"", "output": "using assms(1) unfolding arg_unique[OF sgn_cis assms(2-3)] arg_unique[OF sgn_cis assms(4-5)] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmf_embed_pmf: \"pmf embed_pmf x = f x\"", "output": "proof transfer have *[simp]: \"\\x y. ennreal (f y) * indicator {x} y = ennreal (f x) * indicator {x} y\"\nby (simp split: split_indicator) fix x show \"measure (density (count_space UNIV) (ennreal \\ f)) {x} = f x\"\nby transfer (simp add: measure_def emeasure_density nonneg max_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma X_Y_AX: \"X = Choice AX Y\" \"Y = Action ''b'' X\" \"AX = Action ''a'' X\"", "output": "unfolding X_def Y_def AX_def\nby (subst F.code, simp)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordinal_dvd_times_div:\n\"y dvd x \\ y * (x div y) = (x::ordinal)\"", "output": "apply (cut_tac x=x and y=y in ordinal_div_plus_mod)\napply (simp add: ordinal_dvd_mod) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ODNmap_mem:\"\\Worder D; x = ordinal_number D; y \\ ODnums; ODord y x\\ \\ \n ODNmap D y \\ carrier D \\ \n (\\Y\\y. ord_equiv Y (Iod D (segment D (ODNmap D y))))\"", "output": "apply (frule ODnum_segmentTr [of \"D\" \"x\" \"y\"], assumption+)\napply (simp add:ODNmap_def)\napply (rule someI2_ex, assumption+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma d_galois:\n \"d(x) \\ d(y) \\ x \\ d(y) * top\"", "output": "by (metis d_export d_isotone d_mult_left_absorb_sup d_plus_one d_restrict_equals d_top mult_isotone top.extremum)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma d_restrict_iff: \"(x \\ y) \\ (x \\ d x \\ y)\"", "output": "by (metis dom_subid_aux2 dsg1 less_eq_def order_trans subdistl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in comm_group) set_mult_commute:\n assumes \"N \\ carrier G\" \"x \\ rcosets N\" \"y \\ rcosets N\"\n shows \"x <#> y = y <#> x\"", "output": "using assms unfolding set_mult_def RCOSETS_def\nby auto (metis m_comm r_coset_subset_G subsetCE)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma infty_assn_pure_conv: \"infty_assn (pure A) = pure (\\A\\infty_rel)\"", "output": "apply (intro ext) subgoal for x y\nby (cases x; cases y; simp add: pure_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma div_right_ineq:\n assumes \"(x::nat) < y*z\" \n shows \" (x div y) < z\"", "output": "using assms div_left_ineq mult.commute\nby (metis)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_left:\n \"(\\x y. le x y \\ f x \\ f y) \\ vnm_utility carrier le (\\x. f x + u x)\"", "output": "by (subst add.commute) (rule add_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma circ_sup_sub_sup_one:\n \"x * x\\<^sup>\\ * (x \\ y) \\ x * x\\<^sup>\\ * (1 \\ y)\"", "output": "by (metis circ_sup_sub_sup_one_2 mult_assoc mult_right_isotone)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zero_vector_2:\n \"zero_vector x \\ (\\y . x * y \\ x * bot)\"", "output": "by (metis eq_refl order_trans top_right_mult_increasing zero_vector_def zero_vector_left_zero)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inf_eq_top_iff [simp]:\n \"(x :: 'a :: bounded_lattice_top) \\ y = \\ \\ x = \\ \\ y = \\\"", "output": "quickcheck[expect = no_counterexample]\nby (simp add: eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_gpv''_mono' [mono]:\n assumes \"\\x y. A x y \\ A' x y\"\n and \"\\x y. C x y \\ C' x y\"\n and \"\\x y. R' x y \\ R x y\"\n shows \"rel_gpv'' A C R gpv gpv' \\ rel_gpv'' A' C' R' gpv gpv'\"", "output": "using rel_gpv''_mono[of A A' C C' R' R] assms\nby(blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphic_map_swap:\n \"homeomorphic_map (prod_topology X Y) (prod_topology Y X) (\\(x,y). (y,x))\"", "output": "using homeomorphic_map_maps homeomorphic_maps_swap\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bounded_linear_mult_right: \"bounded_linear (\\y::'a::real_normed_algebra. x * y)\"", "output": "using bounded_bilinear_mult\nby (rule bounded_bilinear.bounded_linear_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma retract_bc: \"R\\<^sup>*\\<^sup>* (\\_Fbcb x) y \\ \\z. Ebc x z \\ y = \\_Fbcb z\"", "output": "by(induction rule: rtranclp_induct)(blast dest: retract1_bc intro: equivp_transp[OF equivp_bc] equivp_reflp[OF equivp_bc])+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_int_mono_lt0: \"[| x \\ y ; y \\ 0 |] ==> length_int y \\ length_int x\"", "output": "by (cases \"y = 0\") (simp_all add: length_int_lt0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma swapEnv_involutive2[simp]:\nassumes good: \"goodEnv rho\"\nshows \"((rho &[x \\ y]_zs) &[y \\ x]_zs) = rho\"", "output": "using assms\nby(simp add: swapEnv_sym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_mset_Zero_iff[simp]:\n shows \"rel_mset rel {#} Y \\ Y = {#}\" and \"rel_mset rel X {#} \\ X = {#}\"", "output": "using rel_mset_Zero rel_mset_size\nby (fastforce, fastforce)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma from_bool_eqI:\n \"from_bool x = from_bool y \\ x = y\"", "output": "unfolding from_bool_def\nby (auto split: bool.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wfp_on_induct [consumes 2, case_names less, induct pred: wfp_on]:\n assumes \"wfp_on P A\" and \"x \\ A\"\n and \"\\y. \\ y \\ A; \\x. \\ x \\ A; P x y \\ \\ Q x \\ \\ Q y\"\n shows \"Q x\"", "output": "using assms and inductive_on_induct [of P A x] unfolding wfp_on_iff_inductive_on\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma join_le_iff[simp]: \"x \\ y \\ z \\ x \\ z \\ y \\ z\"", "output": "by (metis join_ge1 join_ge2 join_least le_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma swap_delete_add_edge:\n assumes \"(a, b, c) \\ (x, y, z)\"\n shows \"delete_edge a b c (add_edge x y z H) = add_edge x y z (delete_edge a b c H)\"", "output": "using assms unfolding delete_edge_def add_edge_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minus_octo_of_real_eq_octo_of_real_iff [simp]: \"-octo_of_real x = octo_of_real y \\ -x = y\"", "output": "using octo_of_real_eq_iff[of \"-x\" y]\nby (simp only: octo_of_real_minus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_to_nat_def: \"x + y = from_nat (to_nat x + to_nat y)\"", "output": "unfolding from_nat_def to_nat_def o_def\nusing Rep_ge_0[of x]\nusing Rep_ge_0[of y]\nusing Rep_less_n[of x] Rep_less_n[of y] unfolding Abs'_def unfolding add_def[of x y]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_BIT_simps [simp]:\n \"x BIT False + y BIT False = (x + y) BIT False\"\n \"x BIT False + y BIT True = (x + y) BIT True\"\n \"x BIT True + y BIT False = (x + y) BIT True\"\n \"x BIT True + y BIT True = (x + y + 1) BIT False\"", "output": "by (simp_all add: Bit_B0_2t Bit_B1_2t)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma narrow2_acom: \"y \\ x \\ x \\\\<^sub>c y \\ x\"", "output": "by(induct y x rule: le_acom.induct) (simp_all add: narrow2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mklr_leq [iff]: \"\\ x \\ admS; y \\ admS \\ \\ (mklr x \\ mklr y) \\ (x \\ y)\"", "output": "unfolding less_eq_admS_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma r_nf_t_1:\n assumes \"eval r_result [pdec1 y, pdec12 y, pdec22 y] \\= 0 \\ pdec2 y \\ prod_encode (i, x)\"\n shows \"eval r_nf_t [y, i, x] \\= 1\"", "output": "unfolding r_nf_t_def\nusing assms r_result_total\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma resr_subdist: \"(x \\ y) \\ (x \\ z) \\ x \\ (y \\ z)\"", "output": "by (metis sup_commute sup_least resr_subdist_var)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem omega_comp_fix: \"x ^ \\ * y = (x * (x ^ \\) * y) \\ y\"", "output": "apply (subst omega_fix)\nby (simp add: inf_comp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eucl_truncate_down_le:\n \"x \\ y \\ eucl_truncate_down w x \\ (y::'a::executable_euclidean_space)\"", "output": "using eucl_truncate_down\nby (rule order.trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma d_isotone:\n \"x \\ y \\ d(x) \\ d(y)\"", "output": "using d_dist_sup sup_right_divisibility\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma positively_responsiveI[intro]:\n assumes I: \"\\P P' x y.\n \\ profile A Is P; profile A Is P'; x \\ A; y \\ A;\n \\i. \\ i \\ Is; x \\<^bsub>(P i)\\<^esub>\\ y \\ \\ x \\<^bsub>(P' i)\\<^esub>\\ y;\n \\i. \\ i \\ Is; x \\<^bsub>(P i)\\<^esub>\\ y \\ \\ x \\<^bsub>(P' i)\\<^esub>\\ y;\n \\k \\ Is. (x \\<^bsub>(P k)\\<^esub>\\ y \\ x \\<^bsub>(P' k)\\<^esub>\\ y) \\ (y \\<^bsub>(P k)\\<^esub>\\ x \\ x \\<^bsub>(P' k)\\<^esub>\\ y);\n x \\<^bsub>(scf P)\\<^esub>\\ y \\\n \\ x \\<^bsub>(scf P')\\<^esub>\\ y\"\n shows \"positively_responsive scf A Is\"", "output": "unfolding positively_responsive_def\nby (blast intro: I)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Lambert_W'_less_iff [simp]:\n \"x \\ {-exp(-1)..<0} \\ y \\ {-exp(-1)..<0} \\ Lambert_W' x < Lambert_W' y \\ x > y\"", "output": "using Lambert_W'_strict_antimono[of x y] Lambert_W'_strict_antimono[of y x]\nby (cases x y rule: linorder_cases) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cont2cont_foldl [simp, cont2cont]:\n fixes f :: \"'a::cpo \\ 'b::cpo \\ 'c::cpo \\ 'b\"\n fixes xs :: \"'c list\"\n fixes z :: \"'a \\ 'b\"\n assumes \"cont (\\(x, y, z). f x y z)\"\n assumes \"cont z\"\n shows \"cont (\\x. foldl (f x) (z x) xs)\"", "output": "using assms\nby (induct xs rule: rev_induct) (auto simp: prod_cont_iff intro: cont_apply)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_lr_inverse_zero:\n fixes x :: \"'a::{ab_group_add,mult_zero}\"\n and y :: \"'b::{comm_monoid_add,mult_zero,uminus}\"\n shows \"fls_left_inverse 0 x = fls_const x\"\n and \"fls_right_inverse 0 y = fls_const y\"", "output": "using fls_lr_inverse_const[of 0]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_pow2[simp]: \"x \\ y \\ x \\ 2 ^ y\"", "output": "by (induct x arbitrary: y) (force simp add: Suc_le_eq order.strict_iff_order)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ennreal_le_iff2: \"ennreal x \\ ennreal y \\ ((0 \\ y \\ x \\ y) \\ (x \\ 0 \\ y \\ 0))\"", "output": "by (cases \"0 \\ y\") (auto simp: ennreal_eq_0_iff ennreal_neg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closed_superdiagonal:\n \"closed {(x,y) | x y. x \\ (y::('a::{linorder_topology}))}\"", "output": "proof - have \"{(x,y) | x y. x \\ (y::'a)} = UNIV - {(x,y) | x y. x < y}\"\nby auto then show ?thesis\nusing open_subdiagonal closed_Diff\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vector_restrict_comp_conv:\n \"vector x \\ x \\ y \\ x\\<^sup>T * y\"", "output": "by (metis covector_inf_comp_3 eq_refl inf.sup_monoid.add_commute inf_top_right le_supE sup.orderE top_left_mult_increasing)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma omega_slide:\n \"x * (y * x)\\<^sup>\\ = (x * y)\\<^sup>\\\"", "output": "by (metis order.antisym mult_assoc mult_right_isotone omega_simulation omega_unfold order_refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Omega_sup_3:\n \"(x \\ y)\\<^sup>\\ = (x\\<^sup>\\ * y)\\<^sup>\\ * x\\<^sup>\\\"", "output": "apply (rule order.antisym)\napply (metis Omega_sum_unfold_1 Omega_induct eq_refl sup_commute)\nby (simp add: Omega.circ_isotone Omega_sup mult_left_isotone star_below_Omega)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma st_le: \"x \\ HFinite \\ y \\ HFinite \\ x \\ y \\ st x \\ st y\"", "output": "by (metis approx_le_bound approx_sym linear st_SReal st_approx_self st_part_Ex1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma into_WW_imp_ge: \"y \\ List.set (into_WW x ns) \\ x \\ y\"", "output": "by (induction ns arbitrary: x) fastforce+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rank_mono: \"x \\ y \\ rank x \\ rank y\"", "output": "by (metis HPow_iff Ord_rank Vset_succ Vset_succ_rank_le dual_order.trans le_Vset_rank)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vdisjnt_vinsert_left: \"vdisjnt (vinsert a X) Y \\ a \\\\<^sub>\\ Y \\ vdisjnt X Y\"", "output": "by (metis vdisjnt_iff vdisjnt_sym vinsertE1 vinsertI2 vinsert_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adjacent_card: \"x \\ y \\ card x = card y\"", "output": "unfolding adjacent_def facetrel_def\nby (cases \"finite x\" \"x=y\" rule: two_cases) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subterm_size_lt: \"x \\ y \\ size x < size y\"", "output": "using not_less_eq size_list_estimation\nby (induct y, simp, fastforce)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma schroeder_1:\n \"x * y \\ z = bot \\ x\\<^sup>T * z \\ y = bot\"", "output": "using abel_semigroup.commute comp_left_conjugate conjugate_def inf.abel_semigroup_axioms\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pell_square_solution_nat_iff:\n fixes x y :: nat\n shows \"x ^ 2 = 1 + D * y ^ 2 \\ x = 1 \\ (D = 0 \\ y = 0)\"", "output": "using pell_square_solution_nat_aux[of x y]\nby (cases \"D = 0\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma atan2_bounded: \n shows \"-pi \\ atan2 y x \\ atan2 y x < pi\"", "output": "using arctan_bounded[of \"y/x\"] zero_le_arctan_iff[of \"y/x\"] arctan_le_zero_iff[of \"y/x\"] zero_less_arctan_iff[of \"y/x\"] arctan_less_zero_iff[of \"y/x\"]\nusing divide_neg_neg[of y x] divide_neg_pos[of y x] divide_pos_pos[of y x] divide_pos_neg[of y x] unfolding atan2_def\nby (simp (no_asm_simp)) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult_DirProd': \"x \\\\<^bsub>(G \\\\ H)\\<^esub> y = (fst x \\\\<^bsub>G\\<^esub> fst y, snd x \\\\<^bsub>H\\<^esub> snd y)\"", "output": "by (subst mult_DirProd [symmetric]) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma at_lst_asgd_not_ge:\n assumes \"carrier \\ {}\"\n assumes \"x \\ carrier\" and \"y \\ carrier\"\n assumes \"x \\ at_least_as_good y carrier relation\"\n shows \"\\ x \\ y\"", "output": "by (metis (no_types, lifting) CollectI assms(2) assms(4) at_least_as_good_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma d_commutative:\n \"d(x) * d(y) = d(y) * d(x)\"", "output": "by (metis ils.il_inf_associative order.antisym d_export d_mult_d d_mult_sub d_one d_restrict_equals mult_isotone mult_left_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vector_meet:\n \"x * top \\ y \\ d(x) * y\"", "output": "by (metis d_galois d_mult_sub inf.sup_monoid.add_commute inf.sup_right_isotone meet_domain_top)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_set_insert[param]:\n assumes \"y \\ Y\"\n assumes \"(x, y) \\ A\" \"(xs, Y) \\ \\A\\ list_set_rel\"\n shows \"(x # xs, insert y Y) \\ \\A\\ list_set_rel\"", "output": "using assms unfolding list_set_rel_def relcomp_unfold in_br_conv\nby (auto) (metis refine_list(2)[param_fo] distinct.simps(2) list.simps(15))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphic_path_connected_space:\n \"X homeomorphic_space Y \\ path_connected_space X \\ path_connected_space Y\"", "output": "by (meson homeomorphic_path_connected_space_imp homeomorphic_space_sym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pth_c:\n fixes x :: \"'a::real_normed_vector\"\n shows \"scaleR c x + scaleR d y \\ scaleR d y + scaleR c x\"\n and \"(scaleR c x + z) + scaleR d y \\ scaleR d y + (scaleR c x + z)\"\n and \"scaleR c x + (scaleR d y + z) \\ scaleR d y + (scaleR c x + z)\"\n and \"(scaleR c x + w) + (scaleR d y + z) \\ scaleR d y + ((scaleR c x + w) + z)\"", "output": "by (simp_all add: algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma norm_diff_triangle_less: \"norm (x - z) < e1 + e2\"\n if \"norm (x - y) < e1\" \"norm (y - z) < e2\"", "output": "proof - have \"norm (x - z) \\ norm (x - y) + norm (y - z)\"\nby (metis norm_diff_triangle_ineq add_diff_cancel_left' diff_diff_eq2) with that show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordinal_le_timesR [simp]: \"0 < y \\ x \\ x * (y::ordinal)\"", "output": "by (drule ordinal_times_monoR[OF oSuc_leI], simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cont_compose2:\n assumes \"\\ y. cont (\\ x. c x y)\"\n assumes \"\\ x. cont (\\ y. c x y)\"\n assumes \"cont f\"\n assumes \"cont g\"\n shows \"cont (\\x. c (f x) (g x))\"", "output": "by (intro cont_apply[OF assms(4) assms(2)] cont2cont_fun[OF cont_compose[OF _ assms(3)]] cont2cont_lambda[OF assms(1)])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_star_closure: \"x \\ z\\<^sup>\\ \\ y \\ z\\<^sup>\\ \\ x \\ y \\ z\\<^sup>\\\"", "output": "by (metis mult_isol_var star_trans_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma b_rel_subtyping_merge[sepref_frame_merge_rules]:\n assumes \"hn_ctxt A x y \\\\<^sub>A hn_ctxt A' x y \\\\<^sub>t hn_ctxt Am x y\"\n shows \"hn_ctxt (b_assn A P) x y \\\\<^sub>A hn_ctxt (b_assn A' P') x y \\\\<^sub>t hn_ctxt (b_assn Am (\\x. P x \\ P' x)) x y\"", "output": "using assms unfolding hn_ctxt_def b_assn_def entailst_def entails_def\nby (fastforce simp: vassn_tag_def) \\ \\Simplified forms\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma enumdom_nonempty_domain:\n assumes \"\\ i x\\<^sub>0 \\\"\n shows \"\\y. enumdom i y \\\"\n and \"\\x. \\ i x \\ \\ (\\y. enumdom i y \\= x)\"", "output": "using assms r_enumdom_nonempty_domain phi_def\nby metis+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sublens'_prop2:\n assumes \"vwb_lens X\" \"X \\\\<^sub>L' Y\"\n shows \"get\\<^bsub>X\\<^esub> (put\\<^bsub>Y\\<^esub> s\\<^sub>1 (get\\<^bsub>Y\\<^esub> s\\<^sub>2)) = get\\<^bsub>X\\<^esub> s\\<^sub>2\"", "output": "using assms unfolding sublens'_def\nby (metis lens_override_def vwb_lens_wb wb_lens_axioms_def wb_lens_def weak_lens.put_get)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gen_cong_symp[intro]: \"gen_cong R x y \\ gen_cong R y x\"", "output": "unfolding gen_cong_def\nby (auto dest: cong_equivp equivp_symp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_field_derivative_Beta2 [derivative_intros]:\n assumes \"y \\ \\\\<^sub>\\\\<^sub>0\" \"x + y \\ \\\\<^sub>\\\\<^sub>0\"\n shows \"((\\y. Beta x y) has_field_derivative (Beta x y * (Digamma y - Digamma (x + y))))\n (at y within A)\"", "output": "using has_field_derivative_Beta1[of y x A] assms\nby (simp add: Beta_commute add_ac)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transT_MtransT[simp]:\nassumes \"cf \\t s'\"\nshows \"cf \\*t s'\"", "output": "by (metis PL.MtransC_Refl PL.MtransT.intros assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_s : \"t \\ 0 \\ s t = s0\"", "output": "using decel nonneg_vel\nby (simp add: divide_simps s_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eta_preserves_typ_of: \"t \\\\<^sub>\\ t' \\ typ_of t = Some \\ \\ typ_of t' = Some \\\"", "output": "using eta_preserves_typ_of1 typ_of_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "theorem avl_insert_auto: \"avl t \\\n avl(insert x t) \\ height (insert x t) \\ {height t, height t + 1}\"", "output": "apply (induction t rule: tree2_induct)\napply (auto simp: balL_def balR_def node_def max_absorb2 split!: if_split tree.split) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fresh_trans_tm_iff [simp]: \"i \\ trans_tm e t \\ i \\ t \\ i \\ atom ` set e\"", "output": "by (induct t rule: tm.induct, auto simp: lookup_fresh fresh_at_base)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma type_subst_idle[simp]: \"atom y \\ t \\ subst_type t s y = t\"", "output": "by (nominal_induct t avoiding: s y rule: ty.strong_induct) (auto simp: fresh_Pair fresh_at_base)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vpairwise_vsubset: \n assumes \"vpairwise P S\" and \"T \\\\<^sub>\\ S\" \n shows \"vpairwise P T\"", "output": "using assms\nby (metis less_eq_V_def subset_eq vpairwiseD(2) vpairwiseI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in dp_consistency) comp\\<^sub>T_transfer[transfer_rule]:\n \"crel_vs ((R1 ===>\\<^sub>T R2) ===>\\<^sub>T (R0 ===>\\<^sub>T R1) ===>\\<^sub>T (R0 ===>\\<^sub>T R2)) comp comp\\<^sub>T\"", "output": "apply memoize_combinator_init subgoal premises IH [transfer_rule]\nby memoize_unfold_defs transfer_prover done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_trm_eqvt'[eqvt]:\n fixes pi::\"vrs prm\" \n and t::\"trm\"\n shows \"pi\\(t[x \\ u]) = (pi\\t)[(pi\\x) \\ (pi\\u)]\"", "output": "by (nominal_induct t avoiding: x u rule: trm.strong_induct) (perm_simp add: fresh_left)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unifiers_occur_left_not_Var:\n \"x \\ vars_term t \\ t \\ Var x \\ unifiers (insert (Var x, t) E) = {}\"", "output": "using unifiers_occur_left_is_Fun [of x t]\nby (cases t) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_type_ground_type:\n \"is_type P T \\ is_type P (ground_type T)\"", "output": "by(induct T)(auto, metis is_type_ArrayD is_type_array)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_interior_eq_between:\n fixes S T :: \"('m::euclidean_space) set\"\n assumes \"convex S\" \"convex T\"\n shows \"(rel_interior S = rel_interior T) \\ (rel_interior S \\ T \\ T \\ closure S)\"", "output": "by (metis assms closure_eq_between convex_closure_rel_interior convex_rel_interior_closure)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma guard_continuous:\n assumes \"u \\ g\" \"u \\ t \\ g\" \"0 \\ (t'::'t::time)\" \"t' \\ t\"\n shows \"u \\ t' \\ g\"", "output": "using assms\nby (induction g; auto 4 3 simp: cval_add_def order_le_less_subst2 order_subst2 add_increasing2 intro: less_le_trans )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma loose_bvar1_eta_norm: \"loose_bvar1 t lev \\ loose_bvar1 (eta_norm t) lev\"", "output": "by (induction t arbitrary: lev rule: eta_norm.induct) (use loose_bvar1_decr''' in \\(fastforce split: term.splits nat.splits)+\\)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma id_apply: \n shows \"(id \\) = t\"", "output": "by (nominal_induct t avoiding: \\ rule: trm.strong_induct) (auto simp add: id_maps id_fresh)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma heron_step_real: \"\\t > 0; n \\ 0\\ \\ (t + n/t) / 2 \\ sqrt n\"", "output": "using arith_geo_mean_sqrt[of t \"n/t\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "theorem Par_BisT[simp]:\nassumes \"c1 \\T d1\" and \"c2 \\T d2\"\nshows \"Par c1 c2 \\T Par d1 d2\"", "output": "using assms thetaParTT_BisT unfolding thetaParTT_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ins_tree_rank_bound:\n assumes \"t' \\ set (ins_tree t ts)\"\n assumes \"\\t'\\set ts. rank t\\<^sub>0 < rank t'\"\n assumes \"rank t\\<^sub>0 < rank t\"\n shows \"rank t\\<^sub>0 < rank t'\"", "output": "using assms\nby (induction t ts rule: ins_tree.induct) (auto split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma term_ok_mk_eq_same_typ:\n assumes \"wf_theory \\\"\n assumes \"term_ok \\ (mk_eq s t)\"\n shows \"typ_of s = typ_of t\"", "output": "using assms\nby (cases \\ rule: theory_full_exhaust) (fastforce simp add: wt_term_def typ_of_def bind_eq_Some_conv tinstT_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphic_AR_iff_AR:\n fixes S :: \"'a::euclidean_space set\" and T :: \"'b::euclidean_space set\"\n shows \"S homeomorphic T \\ AR S \\ AR T\"", "output": "by (metis AR_homeomorphic_AR homeomorphic_sym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lc_Abs_iff_body: \"lc (\\\\T\\ t) \\ body T t\"", "output": "unfolding body_def\nby (subst lc.simps) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sem_no_zero_height_derivsAux: \"\\ s t. ((s, c \\\\<^sub>0 t) \\ False)\"", "output": "by (induct_tac c, auto elim: Sem_eval_cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ZObis_transT2[consumes 3, case_names Match MatchO MatchS]: \nassumes 0: \"c \\01 d\" and \"s \\ t\" and \"(d,t) \\t t'\"\nand \"\\ s'. \\(c,s) \\t s'; s' \\ t'\\ \\ thesis\"\nand \"\\ c' s'. \\(c,s) \\c (c',s'); s' \\ t'; discr c'\\ \\ thesis\"\nand \"\\s \\ t'; discr c\\ \\ thesis\"\nshows thesis", "output": "using assms ZObis_matchT_ZO_rev[OF 0] ZObis_Sym unfolding matchT_ZO_def2\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "theorem progress:\n assumes a: \"[] \\ t : T\"\n shows \"(\\t'. t \\cbv t') \\ (val t)\"", "output": "using a\nby (induct \\\\\"[]::tctx\" t T) (auto dest!: canonical_tINT intro!: cbv.intros gr0I)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma term_variants_pred_inv':\n assumes \"term_variants_pred P (Fun f T) t\"\n shows \"is_Fun t\"\n and \"length T = length (args t)\"\n and \"\\i. i < length T \\ term_variants_pred P (T ! i) (args t ! i)\"\n and \"f \\ the_Fun t \\ the_Fun t \\ set (P f)\"\n and \"P \\ (\\_. [])(g := [h]) \\ f \\ the_Fun t \\ f = g \\ the_Fun t = h\"", "output": "using assms\nby (auto elim: term_variants_pred.cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma range_varsE [elim]:\n assumes \"x \\ range_vars \\\"\n and \"\\t. x \\ vars_term t \\ t \\ subst_range \\ \\ P\"\n shows \"P\"", "output": "using assms\nby (auto simp: range_vars_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stopping_time_eq_const: \"stopping_time F T \\ Measurable.pred (F t) (\\\\. T \\ = t)\"", "output": "unfolding eq_iff\nusing stopping_time_less_const[of T t]\nby (intro pred_intros_logic stopping_time_le_const) (auto simp: not_less[symmetric] )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closure_of_minimal:\n \"\\S \\ T; closedin X T\\ \\ (X closure_of S) \\ T\"", "output": "by (metis closure_of_eq closure_of_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_lemma [simp]: \\\\E\\0:x\\, F\\ (\\<^bold>\\t) = \\E, F\\ t\\", "output": "by (induct t) (auto cong: map_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isin_bst:\n assumes \"bst t\"\n shows \"isin t x \\ x \\ set_tree t\"", "output": "using assms\nby (subst isin_set) (auto simp: bst_iff_sorted_wrt_less)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma solution_preflect:\n assumes \"t0 \\ T\"\n assumes sol: \"(x solves_ode f) T X\"\n shows \"((\\t. x (preflect t0 t)) solves_ode (\\t x. - f (preflect t0 t) x)) (preflect t0 ` T) X\"", "output": "using sol \\t0 \\ T\\\nby (simp_all add: preflect_def image_image preflect_solution[of t0])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_transform_Cons:\n \"map_transform t ae ((x,e)# \\) = (x, lift_transform t (ae x) e) # (map_transform t ae \\)\"", "output": "unfolding map_transform_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma no_loose_bvar_subst_bvs1'_unchanged: \"\\ loose_bvar t lev \\ subst_bvs1' t lev args = t\"", "output": "by (induction t lev args rule: subst_bvs1'.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_on_cases_1:\n fixes s :: \"real set\"\n assumes \"continuous_on {t \\ s. t \\ a} f\"\n and \"continuous_on {t \\ s. a \\ t} g\"\n and \"a \\ s \\ f a = g a\"\n shows \"continuous_on s (\\t. if t \\ a then f(t) else g(t))\"", "output": "using assms\nby (auto intro: continuous_on_cases_le [where h = id, simplified])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transaction_bvars_no_Value_type:\n assumes \"admissible_transaction T\"\n and \"x \\ bvars_transaction T\"\n shows \"\\TAtom Value \\ \\\\<^sub>v x\"", "output": "using assms transaction_no_bvars(2)\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Int_filters:\n fixes F and T (structure) assumes \"filter F T\"\n fixes E assumes \"filter E T\"\n shows \"F \\ E \\ Filters\"", "output": "proof - interpret filter F T\nby fact interpret filter E T\nby fact show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_component: \"path_component S x y \\ (\\t. path_connected t \\ t \\ S \\ x \\ t \\ y \\ t)\"", "output": "apply (intro iffI)\napply (metis path_connected_path_image path_defs(5) pathfinish_in_path_image pathstart_in_path_image)\nusing path_component_of_subset path_connected_component\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_wellformed:\n assumes \"wellformed' n t\" \"fmpred (\\_. wellformed) env\"\n shows \"wellformed' n (subst t env)\"", "output": "using assms\nby (induction t arbitrary: n) (auto split: option.splits intro: wellformed_inc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma narrow_PrimT2: \"G\\S\\PrimT pt \\ \n \\t. S=PrimT t \\ G\\PrimT t\\PrimT pt\"", "output": "by (ind_cases \"G\\S\\PrimT pt\")"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proves_eq_transitive:\n assumes \"wf_theory \\\"\n assumes \"term_ok \\ s\"\n assumes \"term_ok \\ t\"\n assumes \"term_ok \\ u\"\n assumes \"typ_of s = typ_of t\" \"typ_of t = typ_of u\"\n assumes ctxt: \"finite \\\" \"\\A\\\\. term_ok \\ A\" \"\\A\\\\. typ_of A = Some propT\"\n shows \"\\, \\ \\ mk_eq s t \\ mk_eq t u \\ mk_eq s u\"", "output": "by (subst unsimp_context) (use assms proves_eq_transitive_pre weaken_proves_set in blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma paths_many_calls_subset:\n \"t \\ many_calls x \\\\ without x t\"", "output": "by (metis (full_types) below_set_def paths_many_calls_subset paths_mono_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reduction_deterministic:\n assumes \"t \\\\<^sub>v t'\"\n assumes \"t \\\\<^sub>v t''\"\n shows \"t'' = t'\"", "output": "using assms\nby (induct arbitrary: t'') (blast dest: reduction_val elim: reduction_inv)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SMP_empty[simp]: \"SMP {} = {}\"", "output": "proof (rule ccontr) assume \"SMP {} \\ {}\" then obtain t where \"t \\ SMP {}\"\nby auto thus False\nby (induct t rule: SMP.induct) auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_typ'_no_tvs_unchanged:\n \"\\(f, s) \\ set insts . f \\ tvs t \\ subst_typ' insts t = t\"", "output": "by (induction t) (use subst_typ_no_tvsT_unchanged in \\fastforce+\\)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma insert3_insert2_d:\n \"bal_i (n+dl) (height t) \\ insert3_d x (t,n,dl) = insert2_d x (t,n,dl)\"", "output": "by(simp add: ins3_ins2 split: up2.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma term_fresh_subst[simp]: \"atom x \\ t \\ atom x \\ s \\ (atom (x::var)) \\ t[s / y]\"", "output": "by (nominal_induct t avoiding: s y rule: term.strong_induct) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma var_dist_cong: \"s \\ t \\ var_dist vs s \\ var_dist vs t\"", "output": "by (induction vs arbitrary: s t) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma widen_Array_Array: \"G\\T.[]\\T'.[] \\ G\\T\\T'\"", "output": "apply (drule widen_Array)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma splay_Leaf_iff[simp]: \"(splay a t = Leaf) = (t = Leaf)\"", "output": "by(induction a t rule: splay.induct) (auto split: tree.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Wbis_transT[consumes 3, case_names Match MatchO]: \nassumes 0: \"c \\w d\" and \"s \\ t\" and \"(c,s) \\t s'\"\nand \"\\ t'. \\(d,t) \\*t t'; s' \\ t'\\ \\ thesis\"\nand \"\\ d' t'. \\(d,t) \\*c (d',t'); s' \\ t'; discr d'\\ \\ thesis\"\nshows thesis", "output": "using assms Wbis_matchT_M[OF 0] unfolding matchT_M_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma even_mirror_traverse_tree [simp]: \n \"root (traverse_tree path (even_mirror t)) = root (traverse_tree (even_mirror_path path) t)\"\n and odd_mirror_traverse_tree [simp]:\n \"root (traverse_tree path (odd_mirror t)) = root (traverse_tree (odd_mirror_path path) t)\"", "output": "by (induct path arbitrary: t) (simp_all split: dir.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subtype_refl: \\ \\A.1\\\n \"\\ \\\\<^sub>w\\<^sub>f \\ \\ \\\\<^sub>w\\<^sub>f T \\ \\ \\ T <: T\"", "output": "by (induct T arbitrary: \\) (blast intro: subtyping.intros wf_Nil wf_TVarB elim: well_formed_cases)+"} {"instruct": "Given a lemma, please prove it.", "input": "theorem hinv_insrt: \"hinv t \\ hinv (insrt x t)\"", "output": "by (induct t) (simp_all add: Let_def height_hinv hinv_l_bal hinv_r_bal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alternating_list_split:\n \"alternating_list (m+n) s t = alternating_list m s t @\n (if even m then alternating_list n s t else alternating_list n t s)\"", "output": "using alternating_list_SucSuc_ConsCons[of _ s]\nby (induct n rule: nat_induct_step2) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_bvs1_step: \n assumes \"\\ loose_bvar t lev\"\n shows \"subst_bvs1 t lev (args@[u]) = subst_bv1 (subst_bvs1 t lev args) lev u\"", "output": "using assms\nby (induction t arbitrary: lev args u) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_dimensional_vector_space_pair_with_imp_finite_dimensional_vector_space_with[explicit_ab_group_add]:\n \"vector_space_on_with S (+) (-) uminus 0 s\"\n \"finite_dimensional_vector_space_on_with T (+) (-) uminus 0 t c\"\n \"vector_space_on_with T (+) (-) uminus 0 t\"\n \"finite_dimensional_vector_space_on_with T (+) (-) uminus 0 t c\"\n if \"finite_dimensional_vector_space_pair_on_with S T (+) (-) uminus 0 s b (+) (-) uminus 0 t c\"", "output": "using that unfolding finite_dimensional_vector_space_pair_on_with_def\nby (simp_all add: finite_dimensional_vector_space_on_with_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma addr_loc_type_fun:\n \"\\ P,h \\ a@al : T; P,h \\ a@al : T' \\ \\ T = T'\"", "output": "by(auto elim!: addr_loc_type.cases dest: has_field_fun)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma setops\\<^sub>s\\<^sub>s\\<^sub>t\\<^sub>p_member_iff:\n \"(t,s) \\ setops\\<^sub>s\\<^sub>s\\<^sub>t\\<^sub>p x \\\n (x = Insert t s \\ x = Delete t s \\ (\\ac. x = InSet ac t s) \\\n (\\X F F'. x = NegChecks X F F' \\ (t,s) \\ set F'))\"", "output": "by (cases x) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\nZObis_matchC_ZO_rev: \"\\ s t. s \\01 t \\ matchC_ZO ZObis t s\"\nand \nZObis_matchT_ZO_rev: \"\\ s t. s \\01 t \\ matchT_ZO t s\"", "output": "using ZObis_step ZObis_sym unfolding sym_def\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tObsC_abs_conv:\n \"(u, v) \\ tObsC_abs t\n \\ (\\t'. t' \\ SPR.jkbpC \\ tObsC t' = tObsC t \\ u = tFirst t' \\ v = tLast t')\"", "output": "unfolding tObsC_abs_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_le:\n fixes x :: \"'a::ordered_ab_group_add\"\n shows \"x + t \\ 0 \\ x \\ - t\"", "output": "using le_diff_eq[where a= x and b=t and c=0]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_del_min: \"mset_tree (del_min t) = mset_tree t - {# get_min t #}\"", "output": "by (cases t) (auto simp: mset_merge)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convex[intro, simp]: \"convex T\"\n and connected[intro, simp]: \"connected T\"", "output": "by (simp_all add: interval is_interval_connected is_interval_convex )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_order_add_eq1: \"add_order (s+t) = 1 \\ t = -s\"", "output": "using add_order[of \"s+t\"]\nby (simp add: minus_unique)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma design_iso_points_indices_eq: \"source.point_indices t = target.point_indices t\"", "output": "using inverse_design_isomorphism design_isomorphism.design_iso_points_indices_imp design_iso_points_indices_imp\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma member_remove [simp]:\n \"member (remove (x :: 'a) t) = (member t)(x := False)\"", "output": "by transfer (simp add: linorder.rbt_lookup_rbt_delete[OF set_linorder] ID_ccompare_neq_None fun_eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma logical_symmetry:\n assumes a: \"\\ \\ s is t : T\"\n shows \"\\ \\ t is s : T\"", "output": "using a\nby (nominal_induct arbitrary: \\ s t rule: ty.strong_induct) (auto simp add: algorithmic_symmetry)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma openin_Times:\n \"openin (top_of_set S) S' \\ openin (top_of_set T) T' \\\n openin (top_of_set (S \\ T)) (S' \\ T')\"", "output": "unfolding openin_open\nusing open_Times\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cong_red_in_ctx:\n assumes a: \"t \\o t'\"\n shows \"E\\t\\ \\o E\\t'\\\"", "output": "using a\nby (induct E rule: ctx.induct) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reduction_fresh: \n fixes x::\"name\"\n assumes r: \"t \\ t'\"\n shows \"x \\ t \\ x \\ t'\"", "output": "using r\nby(nominal_induct t t' avoiding: x rule: reduction.strong_induct) (auto simp add: abs_fresh fresh_fact fresh_atm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filtrationI:\n assumes \"\\t. subalgebra M (F t)\"\n and \"\\s t. s \\ t \\ subalgebra (F t) (F s)\"\nshows \"filtration M F\"", "output": "unfolding filtration_def\nusing assms\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_def: \"lift t n = incr_bv 1 n t\"", "output": "by (induction t n rule: lift.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma OrdP_sf [iff]: \"Sigma_fm (OrdP t)\"", "output": "proof - obtain z::name and y::name where \"atom z \\ t\" \"atom y \\ (t, z)\"\nby (metis obtain_fresh) thus ?thesis\nby (auto simp: OrdP.simps)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma THE_addr_loc_type:\n \"P,h \\ a@al : T \\ (THE T. P,h \\ a@al : T) = T\"", "output": "by(rule the_equality)(auto dest: addr_loc_type_fun)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matches_iff:\n \"matches t p \\ (\\\\. p \\ \\ = t)\"", "output": "using match_list_sound [of _ \"[(p,t)]\"] and match_list_complete [of _ \"[(p,t)]\"] unfolding matches_def matchers_def\nby (force simp: split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conf_widen: \"P,h \\ v :\\ T \\ P \\ T \\ T' \\ P,h \\ v :\\ T'\"", "output": "apply (unfold conf_def)\napply (induct v)\napply (auto intro: widen_trans) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma split_invar: \"invar t \\ split t = t\"", "output": "by(cases t rule: split.cases) clarsimp+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simptm_nb[simp]: \"tmbound n t \\ tmbound n (simptm t)\"", "output": "by (induct t rule: simptm.induct) (auto simp add: Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fv_subst_subset: \"x \\ fv t \\ fv (\\ x) \\ fv (t \\ \\)\"", "output": "by (metis fv_subset image_eqI subst_apply_fv_unfold)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prv_pls_suc_zer:\n\"t \\ atrm \\ prv (eql (pls t (suc zer)) (suc t))\"", "output": "by (metis (no_types, hide_lams) atrm.atrm_pls atrm_imp_trm pls prv_eql_trans prv_pls_suc prv_pls_zer prv_suc_cong suc zer_atrm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma setdist_eq_0_closed_compact:\n assumes S: \"closed S\" and T: \"compact T\"\n shows \"setdist S T = 0 \\ S = {} \\ T = {} \\ S \\ T \\ {}\"", "output": "using setdist_eq_0_compact_closed [OF T S]\nby (metis Int_commute setdist_sym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_union_diff_comm: \"t \\# S \\ T + (S - {#t#}) = (T + S) - {#t#}\"", "output": "proof - assume \"t \\# S\" then obtain S' where S: \"S = add_mset t S'\"\nby (metis insert_DiffM) then show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subtype_entailment:\n \"t \\:\\<^sub>P t' \\ P' \\ P \\ t \\:\\<^sub>P' t'\"", "output": "apply(auto simp: subtype_def intro: un_pred_entailment_mono) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma type_universe_nonempty[simp]: \"type_universe t \\ {}\"", "output": "by (induction t) (auto intro: val_type.simps simp: type_universe_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma perm_ty[simp]: \n fixes T::\"ty\"\n and pi::\"name prm\"\n shows \"pi\\T = T\"", "output": "by (induct T rule: ty.induct) (simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dist_P_le:\n assumes y: \"y \\ T \\\\<^sub>C X\" and z: \"z \\ T \\\\<^sub>C X\"\n assumes le: \"\\t. tmin \\ t \\ t \\ tmax \\ dist (P_inner y t) (P_inner z t) \\ R\"\n assumes \"0 \\ R\"\n shows \"dist (P y t) (P z t) \\ R\"", "output": "by (cases \"t \\ tmin\"; cases \"t \\ tmax\") (auto simp: P_eqs y z not_le intro!: le)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem RPO_S_subst: \"(s,t) \\ RPO_S \\ (s \\ \\, t \\ \\) \\ RPO_S\" for \\ :: \"('f,'a)subst\"", "output": "using WPO_S_subst unfolding rpo_eq_wpo ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma tSplice_envAction:\n assumes tLen: \"tLength t = tLength t'\"\n shows \"envAction (tLast (t \\<^bsub>\\<^esub>\\\\<^bsub>a\\<^esub> t')) = envAction (tLast t)\"", "output": "unfolding envAction_def\nusing tSplice_es[OF tLen] tSplice_pubActs[OF tLen]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ts_lose_ack_st1ts:\n assumes \"ts lose\" \n and \"lose t = [True] \\ ack t = [x] \\ st_out t = x\"\n and \"lose t = [False] \\ ack t = [y] \\ st_out t = y\"\n shows \"ack t = [st_out t]\"", "output": "using assms\nby (metis ts_bool_False)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ex_cm_imp_conds:\n assumes \"\\c'. next_change_multiplicity' c c' loc t n\"\n shows \"\\t'. t' \\\\<^sub>A frontier (c_imp c loc) \\ t' \\ t\" \"n \\ 0\"", "output": "using assms\nby (auto simp: next_change_multiplicity'_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma leg0_prj_in_hom:\n shows \"\\T.leg0 \\ \\

\\<^sub>0[S.leg0, T.leg1] : S.leg0 \\\\ T.leg1 \\ C.cod (Leg0 T)\\\"", "output": "using S.is_span T.is_span C.prj0_in_hom [of \"Leg0 S\" \"Leg1 T\"] composable\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n sup_existence_maximal:\n assumes \"\\t. t0 \\ t \\ t \\ existence_ivl t0 x0 \\ flow t0 x0 t \\ K\"\n assumes \"compact K\" \"K \\ X\"\n assumes \"bdd_above (existence_ivl t0 x0)\"\n shows \"Sup (existence_ivl t0 x0) \\ T\"", "output": "using flow_leaves_compact_ivl_right[of K] assms\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma delete2_def2:\n \"delete2 x (t,n,dl) =\n (let t' = del x t in\n case t' of\n None \\ (t,n,dl) |\n Some t' \\ (let n' = n-1; dl' = dl + 1\n in if bal_d n' dl' then (t',n',dl')\n else let t'' = bal_tree n' t' in (t'', n', 0)))\"", "output": "using val_cong[OF delete2_tm.simps(1)]\nby(simp only: delete2_def ins3_def del_def bal_tree_def val_simps option.case_distrib[of val])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fresh_ssubst':\n assumes \"finite V\" \"atom i \\ t\" \"atom (p \\ i) \\ t\"\n shows \"atom i \\ ssubst t V F\"", "output": "using assms\nby (induct t rule: tm.induct) (auto simp: F_unfold fresh_permute_left pinv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_leaves: \"finite (leaves i t)\"", "output": "by(induction i t rule: leaves.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma a_insert: \"T_insert a t + \\(skew_heap.insert a t) - \\ t \\ 3 * log 2 (size1 t + 2) + 2\"", "output": "using a_merge[of \"Node Leaf a Leaf\" \"t\"]\nby (simp add: numeral_eq_Suc T_insert_def rh_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_split_bst1: \"bst t \\ set_tree (fst (split_bst x t)) = {y \\ set_tree t. y < x}\"", "output": "by (induction t) (auto split: prod.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_final_thread_deadlocked_final_thread [iff]: \n \"thr s t = \\xln\\ \\ not_final_thread s t \\ t \\ deadlocked s \\ final_thread s t\"", "output": "by(auto simp add: not_final_thread_final_thread_conv[symmetric])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fsize_finsert_in[simp]:\n assumes v12_t: \"(v1,v2) |\\| t\" shows \"fsize (finsert (v1,v2) t) = fsize t\"", "output": "proof - from v12_t have \"finsert (v1,v2) t = t\"\nby auto from this show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sH_g_ode_ivl: \"t \\ 0 \\ t \\ T \\ \\<^bold>{P\\<^bold>} (x\\= (\\t. f) & G on (\\s. {0..t}) S @ 0) \\<^bold>{Q\\<^bold>} = \n (\\s\\S. P s \\ (\\t\\{0..t}. (\\\\\\{0..t}. G (\\ \\ s)) \\ Q (\\ t s)))\"", "output": "apply(subst sH_g_ode_subset; clarsimp, (force)?)\nusing init_time interval_time mem_is_interval_1_I\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bdt_Some_Zero_iff [simp]: \n \"(bdt t var = Some Zero) = (\\ p. t = Node Tip p Tip \\ var p = 0)\"", "output": "apply (induct t rule: bdt_fn.induct)\napply (auto split: option.splits) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extr_fake [simp]: \n assumes \"T' \\ T\" shows \"extr T (fake T' U H) = extr T H\"", "output": "proof (intro equalityI subsetI) fix At assume \"At \\ extr T (fake T' U H)\" with assms have \"At \\ extr T (fake T U H)\"\nby auto thus \"At \\ extr T H\"\nby induct auto\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tSplice_tLast[simp]:\n assumes tLen: \"tLength t = tLength t'\"\n assumes last: \"envObs a (tLast t) = envObs a (tLast t')\"\n shows \"tLast (t \\<^bsub>\\<^esub>\\\\<^bsub>a\\<^esub> t') = tLast t\"", "output": "using tLen last unfolding envObs_def\napply (induct rule: trace_induct2)\napply (auto iff: sSplice_def fun_upd_idem_iff) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma appCheckcast[simp]: \n \"app\\<^sub>i (Checkcast C,P,pc,mxs,T\\<^sub>r,s) = \n (\\T ST LT. s = (T#ST,LT) \\ is_class P C \\ is_refT T)\"", "output": "by (cases s, cases \"fst s\", simp add: app_def) (cases \"hd (fst s)\", auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma KRP_subst [simp]: \"(KRP v x x')(i::=t) = KRP (subst i t v) (subst i t x) (subst i t x')\"", "output": "proof - obtain y::name where \"atom y \\ (v,x,x',t,i)\"\nby (metis obtain_fresh) thus ?thesis\nby (auto simp: KRP.simps [of y])\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ir_valid_Seq1:\n \"ir_valid P (c1;; c2) c' Q \\ ir_valid P c1 c' (\\t t'. \\s s'. P s s' \\ (c1,s) \\ t \\ (c',s') \\ t' \\ (\\u. (c2,t) \\ u \\ Q u t'))\"", "output": "by(auto simp: ir_valid_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma root_hash_T_simps [simp]:\n \"root_hash_T rha (T\\<^sub>m x) = T\\<^sub>h (root_hash_F rha (root_hash_T rha) x)\"", "output": "by(simp add: root_hash_T_def F\\<^sub>m.map_comp root_hash_F_def T\\<^sub>h.map_id0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_binqueue_add_Some:\n assumes \"is_binqueue l xs\"\n and \"is_bintree l t\"\n and \"is_heap t\"\n shows \"is_binqueue l (add (Some t) xs)\"", "output": "using assms\nby (induct xs arbitrary: t) (simp_all add: is_bintree_list_merge is_heap_merge)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma it_path_SnocI:\n assumes \"is \\ it_paths t\" \n assumes \"i < length (children (tree_at t is))\"\n shows \"is @ [i] \\ it_paths t\"", "output": "using assms\nby (induction t arbitrary: \"is\" i) (auto 4 4 elim!: it_paths_RNodeE intro: it_paths_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_eqvt'[eqvt]:\n fixes pi::\"vrs prm\" \n and T::\"ty\"\n shows \"pi\\(T[X \\ T']\\<^sub>\\) = (pi\\T)[(pi\\X) \\ (pi\\T')]\\<^sub>\\\"", "output": "by (nominal_induct T avoiding: X T' rule: ty.strong_induct) (perm_simp add: fresh_left)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma avl_insert: \"avl t \\\n avl(insert x t) \\\n height(insert x t) = height t + (if incr t (insert x t) then 1 else 0)\"", "output": "apply(induction x t rule: insert.induct)\napply(auto split!: splits) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rgraph_and_network_impl_imp_rgraph_impl:\n assumes \"RGraph c s t cf\"\n assumes \"Network_Impl c s t N\"\n shows \"RGraph_Impl c s t N cf\"", "output": "using assms\nby (rule Network_Impl.RGraph_Impl.intro)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma appInstanceof[simp]: \n \"app\\<^sub>i (Instanceof Ty,P,pc,mxs,T\\<^sub>r,s) = \n (\\T ST LT. s = (T#ST,LT) \\ is_type P Ty \\ is_refT T)\"", "output": "by (cases s, cases \"fst s\", simp add: app_def) (cases \"hd (fst s)\", auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_on_s[continuous_intros]: \"continuous_on T s\"", "output": "unfolding s_def[abs_def]\nusing t_stop_nonneg\nby (intro continuous_on_subset[where t=T and s = \"{.. 0}\\({0 .. t_stop} \\ {t_stop ..})\"] continuous_on_If) (auto simp: p_continuous p_max_def antisym_conv[where x=0])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AbstTerm_abst_dbtm:\n \"AbstTerm (q_Var i) (ord_of n) \\quot_dbtm t\\e\n \\quot_dbtm (abst_dbtm i n t)\\e\"", "output": "by (induct t rule: dbtm.induct) (auto simp: AbstTerm_def SeqStTerm_def q_defs intro: BuildSeq2_exI BuildSeq2_combine)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma step_thread_eq_Some_activeD:\n \"step_thread update_state s t = \\(t', taxm\\')\\ \n \\ t' = t \\ t \\ active_threads s\"", "output": "unfolding step_thread_def\nby(fastforce split: if_split_asm simp add: split_beta intro: active_threads.intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Order) Iod_not_le_less:\"\\T \\ carrier D; a \\ T; b \\ T; \n Torder (Iod D T)\\ \\ (\\ a \\\\<^bsub>(Iod D T)\\<^esub> b) = b \\\\<^bsub>(Iod D T)\\<^esub> a\"", "output": "apply (subst Torder.not_le_less)\napply assumption+\napply (simp add:Iod_carrier)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ft_foldl_cunfold[code_unfold]:\n \"List.foldl f \\ (ft_\\ t) = ft_foldl f \\ t\"", "output": "apply (auto simp add: ft_defs FingerTree.foldl_correct) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strip_comb_empty: \"snd (strip_comb t) = [] \\ fst (strip_comb t) = t\"", "output": "by (induction t rule: strip_comb_induct) (auto split: prod.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vertex_subtreeI [intro]: \"\\ t \\ V\\<^bsub>T\\<^esub>; v \\ bag t \\ \\ t \\ vertex_subtree v\"", "output": "unfolding vertex_subtree_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ZObisT_transT2[consumes 3, case_names Match]: \nassumes 0: \"c \\01T d\" and \"s \\ t\" and \"(d,t) \\t t'\"\nobtains s' where \"(c,s) \\t s'\" and \"s' \\ t'\"", "output": "using assms ZObisT_matchT_T_rev[OF 0] ZObisT_Sym unfolding matchT_T_def2\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finpref_mono2: \"s \\ t \\ finpref A s \\ finpref A t\"", "output": "by (unfold finpref_def) (auto dest: llist_le_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vector_derivative_part_circlepath01:\n \"\\0 \\ x; x \\ 1\\\n \\ vector_derivative (part_circlepath z r s t) (at x within {0..1}) =\n \\ * r * (of_real t - of_real s) * exp(\\ * linepath s t x)\"", "output": "using has_vector_derivative_part_circlepath\nby (auto simp: vector_derivative_at_within_ivl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Upd_beta: \"Upd t l u \\\\<^sub>\\ z \\\n (\\t'. t \\\\<^sub>\\ t' \\ z = Upd t' l u) \n \\(\\u' L. finite L \n \\ (\\s p. s \\ L \\ p \\ L \\ s \\ p \n \\ (\\t''. (u\\<^bsup>[Fvar s, Fvar p]\\<^esup>) \\\\<^sub>\\ t'' \\ u' = \\[s,p]t'')) \n \\ z = Upd t l u')\n \\(\\f T. l \\ dom f \\ Obj f T = t \\ z = Obj (f(l \\ u)) T)\"", "output": "by (erule beta_cases, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma agent_abs_inv[dest]:\n \"(u, v) \\ agent_abs a t\n \\ \\t'. t' \\ SPR.jkbpC \\ spr_jview a t' = spr_jview a t\n \\ u = tFirst t' \\ v = tLast t'\"", "output": "unfolding agent_abs_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_lock_upd_locks_implies_has_lock:\n \"\\ has_lock (upd_locks l t Ls) t'; t \\ t' \\ \\ has_lock l t'\"", "output": "by(induct l t Ls rule: upd_locks.induct)(auto intro: has_lock_upd_lock_implies_has_lock)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphic_connectedness:\n assumes \"s homeomorphic t\"\n shows \"connected s \\ connected t\"", "output": "using assms unfolding homeomorphic_def homeomorphism_def\nby (metis connected_continuous_image)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Order) Iod_less:\n \"\\T \\ carrier D; a \\ T; b \\ T\\ \\ (a \\\\<^bsub>Iod D T\\<^esub> b) = (a \\ b)\"", "output": "apply (simp add:oless_def)\napply (simp add:Iod_le) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma append_T_imp_tickFree: \"\\t @ s \\ T P; s \\ []\\ \\ tickFree t\"", "output": "by(frule is_processT2_TR[rule_format], simp add: front_tickFree_def tickFree_rev)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ord_term_strict_canc_left:\n assumes \"t \\ v \\\\<^sub>t s \\ v\"\n shows \"t \\ s\"", "output": "proof (rule ccontr) assume \"\\ t \\ s\" hence \"s \\ t\"\nby simp hence \"s \\ v \\\\<^sub>t t \\ v\"\nby (rule splus_mono_left) with assms show False\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assumes v: \"valid_tmap t\"\n shows mremove_valid: \"valid_tmap (mremove i t)\"", "output": "proof (simp add: mremove_def) from v remove_sort show \"sortedTree fst (remove fst (i, undefined) t)\"\nby fastforce\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_Fvars_trm[simp]:\n fixes t :: trm\n shows \"finite (Fvars t)\"", "output": "by (induct t rule: trm.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma span_scale: \"x \\ span S \\ c *s x \\ span S\"", "output": "unfolding span_explicit\nproof safe fix t r assume *: \"finite t\" \"t \\ S\" show \"\\t' r'. c *s (\\a\\t. r a *s a) = (\\a\\t'. r' a *s a) \\ finite t' \\ t' \\ S\"\nby (intro exI[of _ t] exI[of _ \"\\a. c * r a\"]) (auto simp: * scale_sum_right)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weight_le_stable:\n assumes \"weight_le s t\"\n shows \"weight_le (s \\ \\) (t \\ \\)\"", "output": "using assms weight_stable_le SCF_stable\nby (auto simp: weight_le_def)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem gt_or_eq_compat_App: \"s' \\\\<^sub>t s \\ t' \\\\<^sub>t t \\ App s' t' \\\\<^sub>t App s t\"", "output": "using gt_compat_fun gt_compat_arg\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cut_and_updateI[intro?]:\n \"(\\ttas s' t x ta x' m'. \n \\ s -\\ttas\\* s'; ta_seq_consist P vs (llist_of (concat (map (\\(t, ta). \\ta\\\\<^bsub>o\\<^esub>) ttas)));\n thr s' t = \\(x, no_wait_locks)\\; t \\ (x, shr s') -ta\\ (x', m'); actions_ok s' t ta \\\n \\ \\ta' x'' m''. t \\ (x, shr s') -ta'\\ (x'', m'') \\ actions_ok s' t ta' \\ \n ta_seq_consist P (mrw_values P vs (concat (map (\\(t, ta). \\ta\\\\<^bsub>o\\<^esub>) ttas))) (llist_of \\ta'\\\\<^bsub>o\\<^esub>) \\\n eq_upto_seq_inconsist P \\ta\\\\<^bsub>o\\<^esub> \\ta'\\\\<^bsub>o\\<^esub> (mrw_values P vs (concat (map (\\(t, ta). \\ta\\\\<^bsub>o\\<^esub>) ttas))))\n \\ cut_and_update s vs\"", "output": "unfolding cut_and_update_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma depth_max_heightE_right[elim!]:\n\"\\depth t\\<^sub>2 a = max (height t\\<^sub>1) (height t\\<^sub>2);\n \\depth t\\<^sub>2 a = height t\\<^sub>2; height t\\<^sub>2 \\ height t\\<^sub>1\\ \\ P\\ \\\n P\"", "output": "by (cut_tac t = t\\<^sub>2 and a = a in depth_le_height) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closure_subtopology_minimal:\n \"S \\ T \\ closedin (top_of_set X) T \\ closure S \\ X \\ T\"", "output": "apply (auto simp: closedin_closed)\nusing closure_minimal\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma of_ocircline_opposite_ocircline [simp]:\n shows \"of_ocircline (opposite_ocircline H) = of_ocircline H\"", "output": "by (transfer, transfer) (simp, erule exE, rule_tac x=\"-1\" in exI, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_of'_refs_of'_HOL:\n assumes \"list_of' h r xs\"\n shows \"\\rs. refs_of' h r rs\"", "output": "proof - from assms obtain rs' where \"refs_of h (Ref.get h r) rs'\" unfolding list_of'_def\nby (rule list_of_refs_of) thus ?thesis unfolding refs_of'_def'\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adj_with_w: \"u \\\\<^bsub>H\\<^esub> w\" \"w \\\\<^bsub>H\\<^esub> u\" \"v \\\\<^bsub>H\\<^esub> w\" \"w \\\\<^bsub>H\\<^esub> v\"", "output": "using in_arcs_H subdiv_ate\nby (auto intro: H.dominatesI[rotated])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma remove_writes: \n \"writes (remove_child_locs (the |h \\ get_parent child|\\<^sub>r) |h \\ get_owner_document (cast child)|\\<^sub>r)\n(remove child) h h'\"", "output": "by(auto simp add: remove_def intro!: writes_bind_pure split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parts_insert_Hash [simp]:\n \"parts (insert (Hash X) H) = insert (Hash X) (parts H)\"", "output": "apply (rule parts_insert_eq_I)\napply (erule parts.induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sep_implI:\n assumes a: \"\\h' h''. \\ h \\ h' = Some h''; P h' \\ \\ Q h''\"\n shows \"(P \\\\<^sup>* Q) h\"", "output": "unfolding sep_impl_def\nby (auto elim: a)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma imp_neg_I: \"H \\ A IMP B \\ H \\ A IMP (neg B) \\ H \\ neg A\"", "output": "by (metis dsjcnj [of B \"neg A\" \"neg A\"] dsjCont Bool dsj_commute MP_same)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma All_D: \"H \\ All i A \\ H \\ A(i::=x)\"", "output": "by (metis Assume Ex_I NegNeg_D Neg_mono SyntaxN.Neg cut_same)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Disj_Neg_1: \"H \\ A OR B \\ H \\ Neg B \\ H \\ A\"", "output": "by (metis Disj_I1 Disj_Semicong_1 Disj_commute Peirce)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ord_rec_non [simp]: \"\\ Ord x \\ ord_rec T G H x = H x\"", "output": "by (metis Ord_0 ord_rec_def ord_recp_def the_equality)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma writes_pure [simp]:\n assumes \"pure f h\"\n shows \"writes S f h h'\"", "output": "using assms\napply(auto simp add: writes_def)[1]\nby (metis bot.extremum iterate_M.simps(1) list.set(1) pure_returns_heap_eq return_returns_heap)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Fake_parts_sing:\n \"X \\ synth (analz H) \\ parts {X} \\ synth (analz H) \\ parts H\"", "output": "apply (rule subset_trans)\napply (erule_tac [2] Fake_parts_insert)\napply (rule parts_mono, blast) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HSem_restr_cong_below:\n assumes \"\\ f|` (- domA h) \\ \\' f|` (- domA h)\"\n shows \"\\h\\\\ \\ \\h\\\\'\"", "output": "by (subst (1 2) HSem_restr[symmetric]) (rule monofun_cfun_arg[OF assms])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LstSeqP_SUCC: \"H \\ LstSeqP r (SUCC d) y \\ H \\ HPair d z IN r \\ H \\ LstSeqP r d z\"", "output": "by (metis LstSeqP_Mem Mem_SUCC_I2 Refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in comm_group) IDirProd_eq_subgroup_mult:\n assumes \"subgroup H G\" \"subgroup J G\"\n shows \"IDirProd G H J = H <#> J\"", "output": "unfolding IDirProd_def\nby (rule set_mult_eq_generate_subgroup[OF assms])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sc_hext_upd_arr: \"\\ rm_lookup a h = Some (Arr T si f e) \\ \\ h \\sc rm_update a (Arr T si f' e') h\"", "output": "by(rule sc.hextI)(auto simp:fun_upd_apply sc_typeof_addr_def rm.lookup_correct rm.update_correct)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Fake_parts_sing:\n \"X \\ synth (analz H) ==> parts{X} \\ synth (analz H) \\ parts H\"", "output": "apply (rule subset_trans)\napply (erule_tac [2] Fake_parts_insert)\napply (rule parts_mono, blast) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integral_linear:\n \"f integrable_on S \\ bounded_linear h \\ integral S (h \\ f) = h (integral S f)\"", "output": "by (meson has_integral_iff has_integral_linear)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma heap_is_wellformed_one_disc_parent:\n \"heap_is_wellformed h \\ h \\ get_disconnected_nodes document_ptr \\\\<^sub>r disc_nodes \\\n h \\ get_disconnected_nodes document_ptr' \\\\<^sub>r disc_nodes' \\ set disc_nodes \\ set disc_nodes' \\ {}\n \\ document_ptr = document_ptr'\"", "output": "using CD.heap_is_wellformed_one_disc_parent local.heap_is_wellformed_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subdivision_compatible:\n assumes \"subdivision (G, rev_G) (H, rev_H)\" shows \"compatible G H\"", "output": "using assms\nby induct (auto simp: compatible_def subdivision_step_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind_returns_heap_E3 [elim]:\n assumes \"h \\ f \\ g \\\\<^sub>h h'\" and \"h \\ f \\\\<^sub>r x\" and \"pure f h\" \n shows \"h \\ g x \\\\<^sub>h h'\"", "output": "using assms pure_returns_heap_eq returns_result_eq\nby (fastforce elim: bind_returns_heap_E)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in ring_hom_ring) inj_iff_trivial_ker:\n shows \"inj_on h (carrier R) \\ a_kernel R S h = { \\ }\"", "output": "using group_hom.inj_iff_trivial_ker[OF a_group_hom] a_kernel_def[of R S h]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coprime_gcd:\n fixes h::\"'a mod_ring poly\"\n assumes \"Rings.coprime (h-[:c1:]) (h-[:c2:])\"\n shows \"Rings.coprime (gcd f(h-[:c1:])) (gcd f (h-[:c2:]))\"", "output": "using assms coprime_divisors\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma append_child_heap_is_wellformed_preserved:\n assumes wellformed: \"heap_is_wellformed h\"\n and append_child: \"h \\ append_child ptr node \\\\<^sub>h h'\"\n and known_ptrs: \"known_ptrs h\"\n and type_wf: \"type_wf h\"\n shows \"heap_is_wellformed h'\" and \"type_wf h'\" and \"known_ptrs h'\"", "output": "using assms\nby(auto simp add: append_child_def intro: insert_before_child_preserves)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma relH_array:\n assumes \"relH as h h'\"\n assumes \"addr_of_array r \\ as\"\n shows \"Array.get h r = Array.get h' r\"", "output": "using assms unfolding relH_def Array.get_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma confs_hext: \"P,h \\ vs [:\\] Ts \\ h \\ h' \\ P,h' \\ vs [:\\] Ts\"", "output": "by (erule list_all2_mono, erule conf_hext, assumption)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma obtain_ideal_points:\n assumes \"is_poincare_line H\"\n obtains i1 i2 where \"i1 \\ i2\" \"ideal_points H = {i1, i2}\"", "output": "using two_ideal_points[OF assms] card_eq_2_iff_doubleton[of \"ideal_points H\"]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ptr_kinds_M_ptr_kinds [simp]: \n \"h \\ a_ptr_kinds_M \\\\<^sub>r xa \\ xa = sorted_list_of_set (fset (ptr_kinds h))\"", "output": "by(auto simp add: a_ptr_kinds_M_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma remove_heap_is_wellformed_preserved:\n assumes \"heap_is_wellformed h\" and \"type_wf h\" and \"known_ptrs h\"\n assumes \"h \\ remove child \\\\<^sub>h h'\"\n shows \"heap_is_wellformed h'\"", "output": "using assms\nby(auto simp add: remove_def elim!: bind_returns_heap_E2 intro: remove_child_heap_is_wellformed_preserved split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma known_ptrs_preserved:\n \"object_ptr_kinds h = object_ptr_kinds h' \\ a_known_ptrs h = a_known_ptrs h'\"", "output": "by(auto simp add: a_known_ptrs_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lconf_hext: \"\\ P,h \\ l (:\\) E; h \\ h' \\ \\ P,h' \\ l (:\\) E\"", "output": "unfolding lconf_def\nby(fast elim: conf_hext)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in finite_group) bigger_subgroup_is_group:\n assumes \"subgroup H G\" \"card H \\ order G\"\n shows \"H = carrier G\"", "output": "using subgroup.subset fin assms\nby (metis card_seteq order_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mod_star_TrueE': assumes \"h\\P*True\" obtains h' where \n \"fst h' = fst h\" and \"snd h' \\ snd h\" and \"h'\\P\"", "output": "using assms unfolding times_assn_def top_assn_def\napply (cases h)\napply (fastforce simp add: Abs_assn_inverse) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma known_ptrs_new_ptr:\n \"object_ptr_kinds h' = object_ptr_kinds h |\\| {|new_ptr|} \\ known_ptr new_ptr \\\na_known_ptrs h \\ a_known_ptrs h'\"", "output": "by(simp add: a_known_ptrs_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parent_child_rel_parent:\n assumes \"heap_is_wellformed h\"\n and \"h \\ get_parent child_node \\\\<^sub>r Some parent\"\n shows \"(parent, cast child_node) \\ parent_child_rel h\"", "output": "using assms parent_child_rel_child get_parent_child_dual\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invT_into : \"h \\ H \\ invT h \\ G\"", "output": "using bijective bij_betw_imp_inj_on ImG the_inv_into_into[of T]\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parts_subset_iff [simp]: \"(parts G \\ parts H) = (G \\ parts H)\"", "output": "by (metis parts_idem parts_increasing parts_mono subset_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sep_conj_impl:\n \"\\ (P ** Q) h; \\h. P h \\ P' h; \\h. Q h \\ Q' h \\ \\ (P' ** Q') h\"", "output": "by (erule sep_conjE, auto intro!: sep_conjI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sc_oconf_fupd_arr [intro?]:\n \"\\ P,h \\sc v :\\ T; P,h \\sc (Arr T si f el) \\ \\\n \\ P,h \\sc (Arr T si f (rm_update i v el)) \\\"", "output": "unfolding sc_oconf_def\nby(auto simp add: rm.update_correct)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_heap_returns_heap [simp]: \"(h \\ get_heap \\ (\\h'. f h') \\\\<^sub>h h'') = (h \\ f h \\\\<^sub>h h'')\"", "output": "by(simp add: get_heap_def returns_heap_def bind_def return_def execute_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_disconnected_nodes_get_tag_name:\n \"\\w \\ set_disconnected_nodes_locs ptr. (h \\ w \\\\<^sub>h h' \\ (\\r \\ get_tag_name_locs ptr'. r h h'))\"", "output": "by(auto simp add: CD.set_disconnected_nodes_locs_def CD.get_tag_name_locs_def all_args_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inf_on_circline: \"on_circline H \\\\<^sub>h \\ circline_A0 H\"", "output": "by (transfer, transfer, auto simp add: vec_cnj_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma analz_insert_Nonce [simp]:\n \"analz (insert (Nonce N) H) = insert (Nonce N) (analz H)\"", "output": "apply (rule analz_insert_eq_I)\napply (erule analz.induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma disc_opposite_ocircline [simp]:\n shows \"disc (opposite_ocircline H) = disc_compl H\"", "output": "using disc_compl_opposite_ocircline[of \"opposite_ocircline H\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma project_Stable_D: \n \"F\\project h (reachable (extend h F\\G)) G \\ Stable A \n ==> extend h F\\G \\ Stable (extend_set h A)\"", "output": "apply (unfold Stable_def)\napply (simp (no_asm_simp) add: project_Constrains_D) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma below_nice: \"below[l,h] = (if [l,h] = \\ then \\ else [-\\,h])\"", "output": "unfolding bot_ivl_def\nby transfer (simp add: below_rep_def eq_ivl_empty)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lemma1: \"Key (invKey K) \\ analz H \\ \n analz (insert (Crypt K X) H) \\ \n insert (Crypt K X) (analz (insert X H))\"", "output": "apply (rule subsetI)\napply (erule_tac x = x in analz.induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind_cong_2:\n assumes \"pure f h\" and \"pure f h'\"\n and \"\\x. h \\ f \\\\<^sub>r x = h' \\ f \\\\<^sub>r x\"\n and \"\\x. h \\ f \\\\<^sub>r x \\ h \\ g x \\\\<^sub>r y = h' \\ g x \\\\<^sub>r y'\"\n shows \"h \\ f \\ g \\\\<^sub>r y = h' \\ f \\ g \\\\<^sub>r y'\"", "output": "using assms\nby(auto intro!: bind_pure_returns_result_I elim!: bind_returns_result_E2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma known_ptrs_subset: \n \"object_ptr_kinds h' |\\| object_ptr_kinds h \\ a_known_ptrs h \\ a_known_ptrs h'\"", "output": "by(simp add: a_known_ptrs_def less_eq_fset.rep_eq subsetD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_disconnected_nodes_ptr_in_heap: \n \"h \\ ok (get_disconnected_nodes document_ptr) \\ document_ptr |\\| document_ptr_kinds h\"", "output": "unfolding get_disconnected_nodes_impl[unfolded a_get_disconnected_nodes_def]\nby (simp add: DocumentMonad.get_M_ptr_in_heap)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind_case_cong [fundef_cong]:\n assumes \"x = x'\" and \"\\a. x = Some a \\ f a h = f' a h\"\n shows \"(case x of Some a \\ f a | None \\ g) h = (case x' of Some a \\ f' a | None \\ g) h\"", "output": "by (insert assms, simp add: option.case_eq_if)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_empty_op_correct[refine_vcg]: \n \"heap_invar h \\ is_empty_op h \\ SPEC (\\r. r\\\\ h = {#})\"", "output": "unfolding is_empty_op_def\napply refine_vcg\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma snth_sconst: \"(\\i. s !! i = h) = (s = sconst h)\"", "output": "by (metis funpow_code_def id_funpow sdrop_simps(1) sdrop_siterate siterate.simps(1) smap_alt smap_sconst snth.simps(1) stream.map_id)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adopt_node_child_in_heap:\n assumes \"h \\ ok (adopt_node document_ptr child)\"\n shows \"child |\\| node_ptr_kinds h\"", "output": "using assms\napply(auto simp add: adopt_node_def elim!: bind_is_OK_E)[1]\nusing get_owner_document_pure get_parent_ptr_in_heap pure_returns_heap_eq\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assigned_nodes_slot_is_slot:\n assumes \"h \\ ok (assigned_nodes slot)\"\n shows \"h \\ get_tag_name slot \\\\<^sub>r ''slot''\"", "output": "using assms\nby(auto simp add: assigned_nodes_def elim!: bind_is_OK_E split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma spanning_tree_imp_tree[dest]:\n assumes \"spanning_tree H G\"\n shows \"tree H\"", "output": "using assms\nby (simp add: spanning_tree_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_child_nodes_get_disconnected_nodes: \n \"\\w \\ a_set_child_nodes_locs ptr. (h \\ w \\\\<^sub>h h' \\ (\\r \\ a_get_disconnected_nodes_locs ptr'. r h h'))\"", "output": "by(auto simp add: a_set_child_nodes_locs_def a_get_disconnected_nodes_locs_def all_args_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hm_decrease_key_op_refine: \n \"\\(hm,h)\\hmr_rel; (hm,m)\\heapmap_rel; m k = Some v'\\ \n \\ hm_decrease_key_op k v hm \\\\hmr_rel (h.decrease_key_op (hm_index hm k) v h)\"", "output": "unfolding hm_decrease_key_op_def h.decrease_key_op_def\napply (refine_rcg index_op_inline_refine) unfolding hmr_rel_def heapmap_rel_def in_br_conv\napply (clarsimp_all) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind_is_OK_E [elim]:\n assumes \"h \\ ok (f \\ g)\"\n obtains x h' where \"h \\ f \\\\<^sub>r x\" and \"h \\ f \\\\<^sub>h h'\" and \"h' \\ ok (g x)\"", "output": "using assms\nby(auto simp add: bind_def returns_result_def returns_heap_def is_OK_def execute_def split: sum.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in cring) subcringI':\n assumes \"subring H R\"\n shows \"subcring H R\"", "output": "using subcringI[OF assms] subringE(1)[OF assms] m_comm\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma shadow_root_host_dual:\n assumes \"h \\ get_host shadow_root_ptr \\\\<^sub>r host\"\n shows \"h \\ get_shadow_root host \\\\<^sub>r Some shadow_root_ptr\"", "output": "using assms\nby(auto simp add: get_host_def dest: filter_M_holds_for_result elim!: bind_returns_result_E2 intro!: bind_pure_I split: list.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma element_ptr_kinds_M_eq:\n assumes \"|h \\ node_ptr_kinds_M|\\<^sub>r = |h' \\ node_ptr_kinds_M|\\<^sub>r\"\n shows \"|h \\ element_ptr_kinds_M|\\<^sub>r = |h' \\ element_ptr_kinds_M|\\<^sub>r\"", "output": "using assms\nby(auto simp add: element_ptr_kinds_M_defs node_ptr_kinds_M_defs element_ptr_kinds_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma heap_clone_typeof_addrD:\n assumes \"heap_clone P h a h' \\(obs, a')\\\"\n and \"hconf h\"\n shows \"NewHeapElem a'' x \\ set obs \\ a'' = a' \\ typeof_addr h' a' = Some x\"", "output": "using assms\nby(fastforce elim!: heap_clone.cases dest: allocate_SomeD hext_heap_copies heap_copies_not_New typeof_addr_is_type elim: hext_objD hext_arrD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Contrapos2: \"H \\ (Neg B) IMP (Neg A) \\ H \\ A IMP B\"", "output": "by (metis Bool MP_same boolean_axioms.DisjConj boolean_axioms.Ident)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parts_UN_subset2: \"parts(\\x\\A. H x) \\ (\\x\\A. parts(H x))\"", "output": "apply (rule subsetI)\napply (erule parts.induct, blast+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma delete_type: \"t \\ B h \\ delete x t \\ B h \\ B(h-1)\"", "output": "unfolding delete_def\nby (cases h) (simp, metis del_type(1) tree_type Suc_eq_plus1 diff_Suc_1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma moebius_circline_comp_inv_left [simp]:\n shows \"moebius_circline (moebius_inv M) (moebius_circline M H) = H\"", "output": "by (subst moebius_circline_comp[symmetric], simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Disjoint_commute_D: \"insert (Disjoint t u) H \\ A \\ insert (Disjoint u t) H \\ A\"", "output": "by (metis Assume Disjoint_commute_I cut_same insert_commute thin1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parts_insert_Number [simp]:\n \"parts (insert (Number N) H) = insert (Number N) (parts H)\"", "output": "apply (rule parts_insert_eq_I)\napply (erule parts.induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bij_project_act: \"bij h ==> bij (project_act (%(x,u::'c). h x))\"", "output": "apply (frule bij_imp_bij_inv [THEN bij_extend_act])\napply (simp add: bij_extend_act_eq_project_act bij_imp_bij_inv inv_inv_eq) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Group) rcsTr2:\"\\G \\ H; a \\ carrier G; b \\ H \\ (\\ a)\\ \\ \n b \\ a \\ H\"", "output": "apply (frule i_closed[of \"a\"], frule_tac rcs_subset_elem[of \"H\" \"\\ a\" \"b\"], assumption+, frule rcs_eqTr1[of \"H\" \"b\" \"\\ a\"], assumption+)\napply (simp add:iop_i_i) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma deterministic_heap_ops_writeD:\n \"\\ deterministic_heap_ops; heap_write h ad al v h'; heap_write h ad al v h'' \\ \\ h' = h''\"", "output": "unfolding deterministic_heap_ops_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma all_E: \"insert (A(i::=x)) H \\ B \\ insert (all i A) H \\ B\"", "output": "by (metis exi_I negneg_D neg_mono neg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in AbGroup) abSubgroup_inner_dirsum_el_decomp_set :\n \"\\ \\H \\ set Hs. Subgroup H; add_independentS Hs; x \\ (\\H\\Hs. H) \\\n \\ set (\\Hs\\x) \\ G\"", "output": "using AbGroup.intro AbGroup_inner_dirsum_el_decompI[of Hs x] set_listset_el_subset[of \"(\\Hs\\x)\" Hs G]\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma projecting_Always: \n \"projecting (%G. reachable (extend h F\\G)) h F \n (Always (extend_set h A)) (Always A)\"", "output": "apply (unfold projecting_def)\napply (blast intro: project_Always_I) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dvdmE:\n assumes fg: \"f dvdm g\"\n and main: \"\\h. g =m f * h \\ Mp h = h \\ thesis\"\n shows \"thesis\"", "output": "proof- from fg obtain h where \"g =m f * h\"\nby (auto simp: dvdm_def) then have \"g =m f * Mp h\"\nby auto from main[OF this] show thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Group) homom4_2:\"\\G \\ N; G \\ H\\ \\ Group ((Gp G H) / (H \\ N))\"", "output": "by (frule Group_Gp[of \"H\"], frule inter_Gp_nsg[of \"N\" \"H\"], assumption, rule Group.Group_Qg, assumption+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma synth_analz_mono: \"G\\H \\ synth (analz(G)) \\ synth (analz(H))\"", "output": "by (iprover intro: synth_mono analz_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_heap_returns_result [simp]: \"(h \\ get_heap \\ (\\h'. f h') \\\\<^sub>r x) = (h \\ f h \\\\<^sub>r x)\"", "output": "by(simp add: get_heap_def returns_result_def bind_def return_def execute_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_mode_get_shadow_root:\n \"\\w \\ set_mode_locs ptr. (h \\ w \\\\<^sub>h h' \\ (\\r \\ get_shadow_root_locs ptr'. r h h'))\"", "output": "by(auto simp add: set_mode_locs_def get_shadow_root_locs_def all_args_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma empty_collapse_empty: \n assumes H: \"emptyseq s\" shows \"emptyseq (\\ s)\"", "output": "using H\nby (simp add: emptyseq_collapse_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Mem_SUCC_E:\n assumes \"insert (u IN t) H \\ C\" \"insert (u EQ t) H \\ C\" shows \"insert (u IN SUCC t) H \\ C\"", "output": "by (metis assms Mem_Eats_E SUCC_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parts_analz [simp]: \"parts (analz H) = parts H\"", "output": "apply (rule equalityI)\napply (metis analz_subset_parts parts_subset_iff)\napply (metis analz_increasing parts_mono) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma confT_hext [intro?, trans]:\n \"\\ P,h \\ x :\\\\<^sub>\\ T; h \\ h' \\ \\ P,h' \\ x :\\\\<^sub>\\ T\"", "output": "by (cases T) (blast intro: conf_hext)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma writes_union_left_I:\n assumes \"writes S f h h'\"\n shows \"writes (S \\ S') f h h'\"", "output": "using assms\nby(auto simp add: writes_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subgroup_transitive [trans]:\n assumes \"subgroup K H composition unit\"\n and \"subgroup H G composition unit\"\n shows \"subgroup K G composition unit\"", "output": "proof - interpret K: subgroup K H composition unit\nby fact interpret H: subgroup H G composition unit\nby fact show ?thesis\nby unfold_locales auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in group) generate_minimal:\n assumes \"H \\ carrier G\" shows \"generate G H = \\ { H'. subgroup H' G \\ H \\ H' }\"", "output": "using generate_subgroup_incl generate_is_subgroup[OF assms] incl[of _ H]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma heap_is_wellformed_one_disc_parent: \"heap_is_wellformed h \\\nh \\ get_disconnected_nodes document_ptr \\\\<^sub>r disc_nodes \\\nh \\ get_disconnected_nodes document_ptr' \\\\<^sub>r disc_nodes' \\ set disc_nodes \\ set disc_nodes' \\ {} \\\ndocument_ptr = document_ptr'\"", "output": "using CD.heap_is_wellformed_one_disc_parent local.heap_is_wellformed_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind_returns_result_E:\n assumes \"h \\ f \\ g \\\\<^sub>r y\"\n obtains x h' where \"h \\ f \\\\<^sub>r x\" and \"h \\ f \\\\<^sub>h h'\" and \"h' \\ g x \\\\<^sub>r y\"", "output": "using assms\nby(auto simp add: bind_def returns_result_def returns_heap_def execute_def split: sum.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interchange:\n assumes \"seq h g\" and \"seq h' g'\"\n shows \"(h \\ h') \\ (g \\ g') = h \\ g \\ h' \\ g'\"", "output": "using assms T.preserves_comp [of \"(h, h')\" \"(g, g')\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma induced_subgraphI[intro]:\n assumes \"subgraph H G\"\n assumes \"arcs H = {e \\ arcs G. tail G e \\ verts H \\ head G e \\ verts H}\"\n shows \"induced_subgraph H G\"", "output": "using assms unfolding induced_subgraph_def\nby safe"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in aGroup) asubg_pOp_closed:\"\\asubGroup A H; x \\ H; y \\ H\\\n \\ pop A x y \\ H\"", "output": "apply (simp add:asubGroup_def)\napply (cut_tac b_ag_group)\napply (frule Group.sg_mult_closed [of \"b_ag A\" \"H\" \"x\" \"y\"], assumption+)\napply (simp only:agop_gop) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parts_insert_Hash [simp]:\n \"parts (insert (Hash X) H) = insert (Hash X) (parts H)\"", "output": "apply (rule parts_insert_eq_I)\napply (erule parts.induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma effect_refE [effect_elims]:\n assumes \"effect (ref v) h h' r\"\n obtains \"get h' r = v\" and \"present h' r\" and \"\\ present h r\"", "output": "using assms\nby (rule effectE) (simp add: execute_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zero_reducibility_implies_lt_divisibility:\n assumes \"(red F)\\<^sup>*\\<^sup>* f 0\" and \"f \\ 0\"\n obtains h where \"h \\ F\" and \"h \\ 0\" and \"lt h adds\\<^sub>t lt f\"", "output": "using zero_reducibility_implies_lt_divisibility'[OF assms]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma analz_insert_Crypt:\n \"Key (invKey K) \\ analz H\n ==> analz (insert (Crypt K X) H) = insert (Crypt K X) (analz H)\"", "output": "apply (rule analz_insert_eq_I)\napply (erule analz.induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma heap_copies_allocated_same:\n assumes \"heap_copies a a' al h obs h'\"\n shows \"allocated h' = allocated h\"", "output": "using assms\nby(induct)(auto simp add: heap_copy_loc_allocated_same)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma intersects_x_axis_intersects_y_axis [simp]:\n shows \"intersects_x_axis (moebius_circline (moebius_rotation (pi/2)) H) \\ intersects_y_axis H\"", "output": "unfolding moebius_rotation_def moebius_similarity_def\nby simp (transfer, transfer, auto simp add: mat_adj_def mat_cnj_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parts_insert_Agent [simp]:\n \"parts (insert (Agent agt) H) = insert (Agent agt) (parts H)\"", "output": "apply (rule parts_insert_eq_I)\napply (erule parts.induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in group) rcos_assoc_lcos:\n \"\\H \\ carrier G; K \\ carrier G; x \\ carrier G\\ \\\n (H #> x) <#> K = H <#> (x <# K)\"", "output": "using set_mult_assoc[of H \"{x}\" K]\nby (simp add: l_coset_eq_set_mult r_coset_eq_set_mult)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pure_eq_iff: \n \"(\\h' x. h \\ f \\\\<^sub>r x \\ h \\ f \\\\<^sub>h h' \\ h = h') \\ pure f h\"", "output": "by(auto simp add: pure_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma addr_loc_type_hext_mono:\n \"\\ P,h \\ a@al : T; h \\ h' \\ \\ P,h' \\ a@al : T\"", "output": "by(force elim!: addr_loc_type.cases intro: addr_loc_type.intros elim: typeof_addr_hext_mono dest: hext_arrD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma projecting_Stable: \n \"projecting (%G. reachable (extend h F\\G)) h F \n (Stable (extend_set h A)) (Stable A)\"", "output": "apply (unfold Stable_def)\napply (rule projecting_Constrains) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in heap_base) start_heap_data_code:\n \"start_heap_data = \n (let \n (h, ads, b) = foldl \n (\\(h, ads, b) C. \n if b then\n let HA = allocate h (Class_type C)\n in if HA = {} then (h, ads, False)\n else let (h', a'') = pick_addr HA in (h', a'' # ads, True)\n else (h, ads, False)) \n (empty_heap, [], True) \n initialization_list \n in (h, rev ads, b))\"", "output": "unfolding start_heap_data_def create_initial_object_def pick_addr_def\nby(rule rev_induct)(simp_all add: split_beta)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma well_base\\<^sub>h_mono_base:\n assumes\n well\\<^sub>h: \"well_base\\<^sub>h base M\" and\n two: \"2 \\ base\" and\n bases: \"base \\ base'\"\n shows \"well_base\\<^sub>h base' M\"", "output": "using two well\\<^sub>h\nby (induct rule: well_base\\<^sub>h.induct) (meson two bases less_le_trans order_trans well_base\\<^sub>h.intros well_base.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma upred_lattice_Monotonic [simp]: \"Mono\\<^bsub>\\

\\<^esub> H = Monotonic H\"", "output": "using upred_lattice.weak_partial_order_axioms\nby (auto simp add: isotone_def mono_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma merkle_interfaceI [locale_witness]:\n assumes \"merge_on UNIV h bo m\"\n shows \"merkle_interface h bo m\"", "output": "using assms unfolding merkle_interface_aux\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sc_oconf_new: \"\\ P,h \\sc obj \\; h a = None \\ \\ P,h(a \\ arrobj) \\sc obj \\\"", "output": "by(erule sc_oconf_hext)(rule sc_hext_new)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Mem_Eats_I1: \"H \\ u IN t \\ H \\ u IN Eats t z\"", "output": "by (metis Disj_I1 Iff_MP2_same Mem_Eats_Iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat_assoc_test:\n fixes A B C D :: \"complex mat\"\n assumes \"A \\ carrier_mat n n\" \"B \\ carrier_mat n n\" \"C \\ carrier_mat n n\" \"D \\ carrier_mat n n\"\n shows\n \"(A * B) * (C * D) = A * B * C * D\"\n \"adjoint (A * adjoint B) * C = B * (adjoint A * C)\"\n \"A * 1\\<^sub>m n * 1\\<^sub>m n * B * 1\\<^sub>m n = A * B\"\n \"(A - B) + (B - C) = A + (-B) + B + (-C)\"\n \"A + (B - C) = A + B - C\"\n \"A - (B + C + D) = A - B - C - D\"\n \"(A + B) * (B + C) = A * B + B * B + A * C + B * C\"\n \"A - B = A + (-1) \\\\<^sub>m B\"\n \"A * (B - C) * D = A * B * D - A * C * D\"\n \"trace (A * B * C) = trace (B * C * A)\"\n \"trace (A * B * C * D) = trace (C * D * A * B)\"\n \"trace (A + B * C) = trace A + trace (C * B)\"\n \"A + B = B + A\"\n \"A + B + C = C + B + A\"\n \"A + B + (C + D) = A + C + (B + D)\"", "output": "using assms\nby (mat_assoc n)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in abelian_group) four_elem_comm:\n assumes \"a \\ carrier G\" and \"b \\ carrier G\" and \"c \\ carrier G\" and \"d \\ carrier G\"\n shows \"a \\ c \\ b \\ d = a \\ b \\ c \\ d\"", "output": "using assms a_assoc a_comm\nby (simp add: a_minus_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_eqpoll_cong: \"\\A \\ C; B \\ D\\ \\ A <+> B \\ C <+> D\"", "output": "by (meson eqpoll_imp_lepoll eqpoll_sym lepoll_antisym sum_lepoll_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ang_not_lg_None:\n assumes \"QCong la\" and\n \"QCong lc\" and\n \"QCongA a\" and\n \"la A B\" and\n \"lc C B\" and\n \"a A B C\"\n shows \"\\ QCongNull la \\ \\ QCongNull lc\"", "output": "by (metis ang_not_None_lg ang_sym assms(1) assms(2) assms(3) assms(4) assms(5) assms(6))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Lt_cases:\n assumes \"A B Lt C D \\ B A Lt C D \\ A B Lt D C \\ B A Lt D C\"\n shows \"A B Lt C D\"", "output": "using assms lt_comm lt_left_comm\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ereal_mult_less_right:\n fixes a b c :: ereal\n assumes \"b * a < c * a\"\n and \"0 < a\"\n and \"a < \\\"\n shows \"b < c\"", "output": "using assms\nby (cases rule: ereal3_cases[of a b c]) (auto split: if_split_asm simp: zero_less_mult_iff zero_le_mult_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_cases:\n shows \"A B Le C D \\ C D Le A B\"", "output": "by (metis (full_types) cong_reflexivity l5_5_2 l5_6 not_bet_distincts segment_construction_2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_cong_is_ang1:\n assumes \"\\ A B C CongA A' B' C'\" and\n \"A B C Ang a\"\n shows \"\\ A' B' C' Ang a\"", "output": "using assms(1) assms(2) is_ang_conga\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eint_add_left_cancel_le: \"a + b \\ a + c \\ a = (\\::eint) \\ b \\ c\"", "output": "unfolding plus_eint_def\nby (simp split: eint.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_anga_distinct:\n assumes \"A B C AngAcute a\"\n shows \"A \\ B \\ C \\ B\"", "output": "using assms is_ang_distinct is_anga_to_is_ang\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_extend_mult: \"\\0 < c; a \\ b\\ \\ a \\ b * c\"\n for c :: nat", "output": "by (metis divisors_zero dvd_triv_left leI less_le_trans nat_dvd_not_less zero_less_iff_neq_zero)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_hrp_comp: \n \"hrp_comp (A *\\<^sub>a B) (C \\\\<^sub>r D) = hrp_comp A C *\\<^sub>a hrp_comp B D\"", "output": "unfolding hrp_comp_def hfprod_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma A7':\n assumes \"B a p c\" and \"B b q c\"\n shows \"\\x. B p x b \\ B q x a\"", "output": "proof - from A7 and \\B a p c\\ and \\B b q c\\ show ?thesis\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma the_apartment_iso_chamber_map:\n \"\\ A\\\\; B\\\\; chamber C; C\\A\\B; chamber D; D\\A \\ \\\n chamber (the_apartment_iso A B ` D)\"", "output": "using chamber_in_apartment[of A] apartment_chamber the_apartment_iso_apartment_chamber_map\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma widen_trans [trans] : \n assumes a_b: \"a \\ b\"\n shows \"\\ c. b \\ c \\ a \\ c\"", "output": "by (insert a_b, rule rtrancl_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lea__nlta:\n assumes \"A B C LeA D E F\"\n shows \"\\ D E F LtA A B C\"", "output": "by (meson Tarski_neutral_dimensionless.lea_asym Tarski_neutral_dimensionless.not_lta_and_conga Tarski_neutral_dimensionless_axioms assms lta__lea)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diff_add_eq_ereal: fixes a b c :: ereal shows \"a - b + c = a + c - b\"", "output": "by(cases a b c rule: ereal3_cases) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma project_constrains_mono:\n \"[| D \\ C; project h C F \\ A co B |] ==> project h D F \\ A co B\"", "output": "apply (auto simp add: constrains_def)\napply (drule project_act_mono, blast) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma degree2_coeffs: \"degree p = 2 \\\n \\ a b c. p = [: c, b, a :] \\ a \\ 0\"", "output": "by (metis Suc_1 Suc_neq_Zero degree1_coeffs degree_pCons_eq_if nat.inject pCons_cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coplanar_perm_5:\n assumes \"Coplanar A B C D\"\n shows \"Coplanar A D C B\"", "output": "proof - obtain X where P1: \"(Col A B X \\ Col C D X) \\ (Col A C X \\ Col B D X) \\ (Col A D X \\ Col B C X)\"\nusing Coplanar_def assms\nby blast then show ?thesis\nusing Coplanar_def col_permutation_4\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ns_s_mul_ext_union_multiset_l:\n assumes \"(A, B) \\ ns_mul_ext ns s\"\n and \"C \\ {#}\"\n and \"\\d. d \\# D \\ (\\c. c \\# C \\ (c,d) \\ s)\"\n shows \"(A + C, B + D) \\ s_mul_ext ns s\"", "output": "using assms unfolding ns_mul_ext_def s_mul_ext_def\nby (auto intro!: converseI mult2_alt_ns_s_add mult2_alt_sI[of _ \"{#}\" _ _ \"{#}\"])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mapping_single_eq_iff [simp]:\n \"Poly_Mapping.single a b = Poly_Mapping.single c d \\ b = 0 \\ d = 0 \\ a = c \\ b = d\"", "output": "by transfer (unfold fun_eq_iff when_def, metis)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simple_distinct_map': \"r \\ simple_rotations \\ distinct[a,b,c,d] \\ (\\ e \\ {a,b,c}. r f \\ e) \\ r f = d\"", "output": "using complex_rotations.simp distinct_map'\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma out_None_ang:\n assumes \"QCongA a\" and\n \"a A B C\" and\n \"B Out A C\"\n shows \"QCongANull a\"", "output": "by (metis QCongANull_def QCongAnNull_def assms(1) assms(2) assms(3) not_None_ang_def_equiv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flowsto_congI: \"flowsto A B C D = c1_on_open_euclidean.flowsto g f' Y A B C D\"", "output": "using flowsto_congI1[of A B C D] flowsto_congI2[of A B C D]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma neg_minus_divideC_le_eq [field_simps]:\n \"- (b /\\<^sub>C c) \\ a \\ c *\\<^sub>C a \\ - b\" if \"c < 0\"\nfor a b :: \"'a :: ordered_complex_vector\"", "output": "using that pos_minus_divideC_le_eq [of \"- c\" \"- b\" a]\nby (metis Complex_Vector_Spaces0.neg_divideC_le_eq complex_vector.scale_minus_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat_leqb_eqc_split_simplex_correct1:\n assumes \"dim_vec b = dim_row A\"\n assumes \"simplex (mat_leqb_eqc A b c) = Sat X\"\n assumes \"(x,y) = split_i_j_x (dim_col A) l X\" \n shows \"[A *\\<^sub>v x]\\b\"", "output": "using mat_leqb_eqc_split_correct1[of b A c X x y] assms(1) assms(2) assms(3) simplex(3)\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inter_mset_empty_distrib_right: \"A \\# (B + C) = {#} \\ A \\# B = {#} \\ A \\# C = {#}\"", "output": "by (meson disjunct_not_in union_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma per_cong_mid:\n assumes \"B \\ C\" and\n \"Bet A B C\" and\n \"Cong A H C H\" and\n \"Per H B C\"\n shows \"B Midpoint A C\"", "output": "using assms(1) assms(2) assms(3) assms(4) per_cong_mid_R1 per_cong_mid_R2\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma anga_not_lg_None:\n assumes (*\"QCong la\" and\n \"QCong lc\" and*)\n \"QCongAAcute a\" and\n \"la A B\" and\n \"lc C B\" and\n \"a A B C\"\n shows \"\\ QCongNull la \\ \\ QCongNull lc\"", "output": "by (metis QCongNull_def anga_not_None_lg anga_sym assms(1) assms(2) assms(3) assms(4))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coplanar_perm_3:\n assumes \"Coplanar A B C D\"\n shows \"Coplanar A C D B\"", "output": "proof - obtain X where P1: \"(Col A B X \\ Col C D X) \\ (Col A C X \\ Col B D X) \\ (Col A D X \\ Col B C X)\"\nusing Coplanar_def assms\nby blast then show ?thesis\nusing Coplanar_def col_permutation_4\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n fixes a b c d x y z :: \"'a::linordered_field\"\n shows \"a*(b*c)/(y*z) = d*(b)*(x*a)/z\"", "output": "oops \\ \\FIXME: need simproc to cover this case\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma perp_in_left_comm:\n assumes \"X PerpAt A B C D\"\n shows \"X PerpAt B A C D\"", "output": "by (metis Col_cases PerpAt_def assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma neg_divideR_le_eq [field_simps]:\n \"b /\\<^sub>R c \\ a \\ c *\\<^sub>R a \\ b\" if \"c < 0\"\n for a b :: \"'a :: ordered_real_vector\"", "output": "using that pos_divideR_le_eq [of \"- c\" \"- b\" a]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comp_assoc_assoc' [simp]:\n assumes \"ide a\" and \"ide b\" and \"ide c\"\n shows \"\\[a, b, c] \\ \\\\<^sup>-\\<^sup>1[a, b, c] = a \\ (b \\ c)\"\n and \"\\\\<^sup>-\\<^sup>1[a, b, c] \\ \\[a, b, c] = (a \\ b) \\ c\"", "output": "using assms assoc_inv comp_arr_inv comp_inv_arr\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma shiftr_shiftl2:\n fixes a::\"'a::len word\"\n shows \"b < c \\ a >> b << c = (a << (c - b)) AND (NOT (mask c))\"", "output": "apply(rule word_eqI)\napply(auto simp:nth_shiftr nth_shiftl word_size word_ops_nth_size) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bet_per_suma__per123:\n assumes \"Per D E F\" and\n \"Bet G H I\" and\n \"A B C D E F SumA G H I\"\n shows \"Per A B C\"", "output": "using bet_per_suma__per456\nby (meson assms(1) assms(2) assms(3) suma_sym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unit_mult_left_cancel: \"a dvd 1 \\ a * b = a * c \\ b = c\"", "output": "using mult_cancel_left [of a b c]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_union_disjoint':\n assumes \"finite A\"\n and \"finite B\"\n and \"A \\ B = {}\"\n and \"A \\ B = C\"\n shows \"sum g C = sum g A + sum g B\"", "output": "using sum.union_disjoint[OF assms(1-3)] and assms(4)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_ang_conga:\n assumes \"A B C Ang a\" and\n \"A' B' C' Ang a\"\n shows \"A B C CongA A' B' C'\"", "output": "using Ang_def ang_conga assms(1) assms(2)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma suppa_right_comm:\n assumes \"A B C SuppA D E F\"\n shows \"A B C SuppA F E D\"", "output": "using SuppA_def assms conga_left_comm\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma per_not_col:\n assumes \"A \\ B\" and\n \"B \\ C\" and\n \"Per A B C\"\n shows \"\\ Col A B C\"", "output": "using assms(1) assms(2) assms(3) l8_9\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma MutuallyDistinct_Union:\n \"\\ MutuallyDistinct A; MutuallyDistinct B;\n (\\ C \\ A. States C) \\ (\\ C \\ B. States C) = {} \\\n \\ MutuallyDistinct (A \\ B)\"", "output": "by (unfold MutuallyDistinct_def, safe, blast+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l2_11_b:\n assumes \"Bet A B C\" and\n \"Bet A' B' C'\" and\n \"Cong A B A' B'\" and\n \"Cong B C B' C'\"\n shows \"Cong A C A' C'\"", "output": "using assms(1) assms(2) assms(3) assms(4) l2_11\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tndFalse: \"(\\a b c d. (a,b)\\A \\ (c,d)\\B \\ twoNetsDistinct a b c d) \\\n \\(a, b)\\A. a \\ subnetsOfAdr (D::('a::adr)) \\ b \\ subnetsOfAdr (F::'a) \\ \n \\(a, b)\\B. a \\ subnetsOfAdr D\\ b\\ subnetsOfAdr F \n \\ False\"", "output": "apply (simp add: twoNetsDistinct_def)\napply (auto simp: ndFalse1 ndFalse2)\napply (metis soadisj) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma overlap_ordering_alt2:\n assumes abc: \"ord a b c\"\n and bcd: \"ord b c d\"\n and abd: \"ord a b d\"\n and acd: \"ord a c d\"\n and ord_distinct: \"\\a b c. (ord a b c \\ a \\ b \\ a \\ c \\ b \\ c)\"\n shows \"\\f. ordering f ord {a,b,c,d}\"", "output": "by (metis assms overlap_ordering)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma betw_a_in_path:\n assumes abc: \"[[a b c]]\"\n and path_ab: \"path bc b c\"\n shows \"a \\ bc\"", "output": "using assms abc_ex_path_unique path_unique\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma out_one_side_1:\n assumes \"\\ Col A B C\" and\n \"Col A B X\" and\n \"X Out C D\"\n shows \"A B OS C D\"", "output": "using assms(1) assms(2) assms(3) not_col_permutation_2 one_side_reflexivity one_side_symmetry os_out_os\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma midpoint_distinct:\n assumes \"\\ Col A B C\" and\n \"Col A B X\" and\n \"X Midpoint C C'\"\n shows \"C \\ C'\"", "output": "using assms(1) assms(2) assms(3) l7_3\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pos_less_divide_eq [field_simps]:\n assumes \"0 < c\"\n shows \"a < b / c \\ a * c < b\"", "output": "using assms local.dual_order.strict_iff_order local.nonzero_divide_eq_eq local.pos_le_divide_eq\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strict_weak_trans: \"a \\[le] b \\ b \\[le] c \\ a \\[le] c\"", "output": "unfolding strongly_preferred_def\nby (blast intro: trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coplanar_perm_4:\n assumes \"Coplanar A B C D\"\n shows \"Coplanar A D B C\"", "output": "proof - obtain X where P1: \"(Col A B X \\ Col C D X) \\ (Col A C X \\ Col B D X) \\ (Col A D X \\ Col B C X)\"\nusing Coplanar_def assms\nby blast then show ?thesis\nusing Coplanar_def col_permutation_4\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poincare_mapsto_cong: \"closed A \\\n poincare_mapsto A B C D E = c1_on_open_euclidean.poincare_mapsto g Y A B C D E\"", "output": "using poincare_mapsto_congI1[of A B C] poincare_mapsto_congI2[of A B C]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sorted_mult_spvec_spmat[rule_format]: \n \"sorted_spvec (c::('a::lattice_ring) spvec) \\ sorted_spmat B \\ sorted_spvec (mult_spvec_spmat c a B)\"", "output": "apply (induct c a B rule: mult_spvec_spmat.induct)\napply (simp_all add: sorted_addmult_spvec) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Int_interval_mixed_eq_empty:\n fixes a :: \"'a::euclidean_space\"\n assumes \"box c d \\ {}\"\n shows \"box a b \\ cbox c d = {} \\ box a b \\ box c d = {}\"", "output": "unfolding closure_box[OF assms, symmetric] unfolding open_Int_closure_eq_empty[OF open_box] .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma dvd_gcdD1: \"a dvd gcd b c \\ a dvd b\"", "output": "using gcd_dvd1 [of b c]\nby (blast intro: dvd_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lea_out4__lea:\n assumes \"A B C LeA D E F\" and\n \"B Out A A'\" and\n \"B Out C C'\" and\n \"E Out D D'\" and\n \"E Out F F'\"\n shows \"A' B C' LeA D' E F'\"", "output": "using assms(1) assms(2) assms(3) assms(4) assms(5) l11_30 l6_6 out2__conga\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bound_on_path:\n assumes \"Q\\\\

\" \"[f[(f 0)..]X]\" \"X\\Q\" \"is_bound_f b X f\"\n shows \"b\\Q\"", "output": "proof - obtain a c where \"a\\X\" \"c\\X\" \"[[a c b]]\"\nusing assms(4)\nby (metis ordering_def inf_chain_is_long is_bound_f_def long_ch_by_ord_def zero_less_one) thus ?thesis\nusing abc_abc_neq assms(1) assms(3) betw_c_in_path\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Disj_E:\n assumes A: \"insert A H \\ C\" and B: \"insert B H \\ C\" shows \"insert (A OR B) H \\ C\"", "output": "by (metis A B Disj_mono NegNeg_I Peirce)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inangle__lta:\n assumes \"\\ Col P B C\" and\n \"P InAngle A B C\"\n shows \"A B P LtA A B C\"", "output": "by (metis LtA_def TS_def Tarski_neutral_dimensionless.conga_cop__or_out_ts Tarski_neutral_dimensionless.conga_os__out Tarski_neutral_dimensionless.inangle__lea Tarski_neutral_dimensionless.ncol_conga_ncol Tarski_neutral_dimensionless_axioms assms(1) assms(2) col_one_side_out col_trivial_3 in_angle_one_side inangle__coplanar invert_two_sides l11_21_b ncoplanar_perm_12 not_col_permutation_3 one_side_reflexivity)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma out213_suma__conga:\n assumes \"A B C D E F SumA G H I\" and\n \"B Out A C\"\n shows \"D E F CongA G H I\"", "output": "using assms(1) assms(2) out546_suma__conga suma_sym\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma card_mono_strict_subset:\n \"finite A \\ finite B \\ finite C \\ A \\ B \\ {} \\ C = A - B \\ card C < card A\"", "output": "by (metis Diff_disjoint Diff_subset inf_commute less_le psubset_card_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem th2_4: \"a b \\ c d \\ b a \\ c d\"", "output": "proof - assume \"a b \\ c d\" with th2_3 [of b a a b c d] and A1' [of b a] show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in aGroup) ag_add4_rel:\"\\a \\ carrier A; b \\ carrier A; c \\ carrier A;\n d \\ carrier A \\ \\ a \\ b \\ (c \\ d) = a \\ c \\ (b \\ d)\"", "output": "apply (simp add:pOp_assocTr43[of \"a\" \"b\" \"c\" \"d\"], simp add:ag_pOp_commute[of \"b\" \"c\"], simp add:pOp_assocTr43[THEN sym, of \"a\" \"c\" \"b\" \"d\"]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \n assumes \"FI_RESULT [(A, A)] (B * C * D) emp F\"\n shows \"FI_QUERY (B*C*D*A) (A) F\"", "output": "apply (tactic \\Seplogic_Auto.match_frame_tac (resolve_tac @{context} @{thms ent_refl}) @{context} 1\\)\nby (rule assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma neg_le_divideR_eq [field_simps]:\n \"a \\ b /\\<^sub>R c \\ b \\ c *\\<^sub>R a\" (is \"?P \\ ?Q\") if \"c < 0\"\n for a b :: \"'a :: ordered_real_vector\"", "output": "using that pos_le_divideR_eq [of \"- c\" a \"- b\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma between_equality_2:\n assumes \"Bet A B C\" and\n \"Bet A C B\"\n shows \"B = C\"", "output": "using assms(1) assms(2) between_equality between_symmetry\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma meta_all3_eq_conv: \"(\\a b c. a = d \\ PROP P a b c) \\ (\\b c. PROP P d b c)\"", "output": "apply(rule equal_intr_rule)\napply(erule meta_allE)+\napply(erule meta_mp)\napply(rule refl)\napply(erule meta_allE)+\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uprod_eq_simps [simp, code]:\n \"uprod_eq eq (Upair a b) (Upair c d) \\ \n Rep_equal eq a c \\ Rep_equal eq b d \\ Rep_equal eq b c \\ Rep_equal eq a d\"", "output": "supply Upair.transfer[transfer_rule]\nby transfer simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n add3: \"ccw 0 a b \\ ccw 0 a c \\ ccw 0 a (b + c)\"", "output": "using add1[of \"-b\" a \"-c\"] uminus1[of \"b + c\" a]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lea_left_comm:\n assumes \"A B C LeA D E F\"\n shows \"C B A LeA D E F\"", "output": "by (metis assms conga_pseudo_refl conga_refl l11_30 lea_distincts)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wfC_refl:\n assumes \"wfG \\ \\ ((x, b', c') #\\<^sub>\\\\)\" \n shows \"wfC \\ \\ ((x, b', c') #\\<^sub>\\\\) c'\"", "output": "using wfG_wfC assms wfC_replace_cons\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma divide_lt:\n \"\\c *R (a::'a) < b; (c::rat) > 0 \\ \\ a < (1/c) *R b\"", "output": "using scaleRat_less1[of \"c *R a\" b \"1/c\"]\nby (simp add: scaleRat_one scaleRat_scaleRat)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gcd_unique_nat: \"d dvd a \\ d dvd b \\ (\\e. e dvd a \\ e dvd b \\ e dvd d) \\ d = gcd a b\"\n for d a :: nat", "output": "using gcd_unique\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma osp_distincts:\n assumes \"A B C OSP P Q\"\n shows \"A \\ B \\ A \\ C \\ B \\ C \\ A \\ P \\ B \\ P \\ C \\ P \\ A \\ Q \\ B \\ Q \\ C \\ Q\"", "output": "using OSP_def assms tsp_distincts\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma split_gallery_fg:\n \"\\ C\\f\\\\; D\\g\\\\; gallery (C#Cs@[D]) \\ \\\n \\As A B Bs. A\\f\\\\ \\ B\\g\\\\ \\ C#Cs@[D] = As@A#B#Bs\"", "output": "using folding_f.split_gallery flopped_half_chamber_systems_fg\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ereal_mult_strict_left_mono:\n \"a < b \\ 0 < c \\ c < (\\::ereal) \\ c * a < c * b\"", "output": "using ereal_mult_strict_right_mono\nby (simp add: mult.commute[of c])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma delete_bal: \"\\k > 0; bal t; root_order k t\\ \\ bal (delete k x t)\"", "output": "using del_bal\nby (simp add: reduce_root_bal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_delete [simp]:\n \"lookup (delete k t) = (lookup t)(k := None)\"", "output": "by transfer (simp add: rbt_lookup_rbt_delete restrict_complement_singleton_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invKey_eq [simp]: \"(invKey K = invKey K') = (K=K')\"", "output": "apply (safe)\napply (drule_tac f=invKey in arg_cong, simp) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma testN_post1:\n \"f k \\ adjoint (testN k) * post * testN k = testN k\"", "output": "apply (subst assoc_mult_mat[of _ N N _ N _ N])\napply (auto simp add: adjoint_dim testN_dim post_dim)\napply (subst post_mult_testNk, simp) unfolding hermitian_testN[unfolded hermitian_def]\nusing testN_mult_testN\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LLL_d_Suc: assumes k: \"k < m\" \nshows \"of_int (d fs (Suc k)) = sq_norm (gso fs k) * of_int (d fs k)\"", "output": "using assms fs.fs_int_d_Suc LLL_inv_wD[OF Linv] unfolding fs.d_def d_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma newton_seq_fact2:\n\"\\k. val_Zp (f\\(ns k)) \\ 2*(val_Zp (f'\\a)) + (2^k)*t\"", "output": "by (meson le_iff_add newton_seq_props_induct)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma typ_arity_lookup_code: \"type_arity (translate_signature \\) n = lookup (\\k. k = n) (exetyp_arity_of \\)\"", "output": "by (cases \\) (simp add: lookup_eq_map_of_ap)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ahm_e_is_be: \"\\\n ahm_\\ m k = Some v; \n !!bm. \\m (hashcode k) = Some bm; bm k = Some v \\ \\ P\n \\ \\ P\"", "output": "by (unfold ahm_\\_def) (auto split: option.split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Prod_any_power_lookup_eq:\n \"(\\k::'a. f k ^ lookup (x::'a\\\\<^sub>0nat) k) = (\\k\\keys x. f k ^ lookup x k)\"", "output": "by (subst Prod_any.conditionalize) (auto simp: in_keys_iff intro!: Prod_any.cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma std_normal_distribution_even_moments_abs:\n fixes k :: nat\n shows \"(LINT x|std_normal_distribution. \\x\\^(2 * k)) = fact (2 * k) / (2^k * fact k)\"", "output": "using integral_std_normal_moment_even[of k]\nby (subst integral_density) (auto simp: normal_density_nonneg power_even_abs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma xor_negative_int_iff [simp]:\n \\k XOR l < 0 \\ (k < 0) \\ (l < 0)\\ for k l :: int", "output": "by (subst Not_eq_iff [symmetric]) (auto simp add: not_less)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in domain) var_pow_closed:\n assumes \"subring K R\" shows \"X [^]\\<^bsub>K[X]\\<^esub> (n :: nat) \\ carrier (K[X])\"", "output": "using monoid.nat_pow_closed[OF univ_poly_is_monoid[OF assms] var_closed(1)[OF assms]] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma mod_eq_Suc_0_conv: \"Suc 0 < k \\ ((x + k - Suc 0) mod k = 0) = (x mod k = Suc 0)\"", "output": "apply (simp only: mod_pred)\napply (case_tac \"x mod k = Suc 0\")\napply simp_all done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hermitian_proj_psi_l:\n \"k < K \\ hermitian (proj_psi_l k)\"", "output": "using positive_psi_l positive_is_hermitian\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma shiftr_integer_transfer [transfer_rule]:\n \\(pcr_integer ===> (=) ===> pcr_integer) (\\k n. drop_bit n k) (>>)\\", "output": "unfolding shiftr_eq_drop_bit\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma selection_completion: \"K = Cn(A) \\ \\ K \\ \\ * \\ K \\\"", "output": "using completion_def is_selection tautology_selection\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hm_index_op_correct:\n assumes \"hmr_invar hm\"\n assumes \"heapmap_\\ hm k \\ None\"\n shows \"hm_index_op hm k \\ SPEC (\\r. r= hm_index hm k)\"", "output": "using assms unfolding hm_index_op_def\napply refine_vcg\napply (auto simp: heapmap_\\_def hmr_invar_def hm_index_def index_nth_id) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sb_inc_lem: \"a + 2^k < 0 \\ a + 2^k + 2^(Suc k) \\ (a + 2^k) mod 2^(Suc k)\"\n for a :: int", "output": "using int_mod_ge' [where n = \"2 ^ (Suc k)\" and b = \"a + 2 ^ k\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma idx_bubble_up_rule [hoare_triple]:\n \"index_of_pqueue x \\\n \n idx_bubble_up a k\n <\\_. idx_pqueue (idx_bubble_up_fun x k) a>\"", "output": "@proof @fun_induct \"idx_bubble_up_fun x k\" @with @subgoal \"(x = (xs, m), k = k)\" @unfold \"idx_bubble_up_fun (xs, m) k\" @end @qed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma enat_mult_cancel1 [simp]:\n \"k * m = k * n \\ m = n \\ k = 0 \\ k = (\\ :: enat) \\ n \\ 0 \\ m \\ 0\"", "output": "by(cases k m n rule: enat.exhaust[case_product enat.exhaust[case_product enat.exhaust]])(simp_all add: zero_enat_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma update_idx_pqueue_rule [hoare_triple]:\n \"k < length m \\ index_of_pqueue (xs, m) \\\n \n update_idx_pqueue k v p\n \\<^sub>t\"", "output": "@proof @unfold \"update_idx_pqueue_fun k v (xs, m)\" @qed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eval_fds_at_numeral: \"eval_fds f (numeral k) = (\\n. fds_nth f n / of_nat n ^ numeral k)\"", "output": "using eval_fds_at_nat[of f \"numeral k\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fps_cutoff_right_mult_nth:\n assumes \"k < n\"\n shows \"(f * fps_cutoff n g) $ k = (f * g) $ k\"", "output": "proof- from assms have \"\\i\\{0..k}. fps_cutoff n g $ (k - i) = g $ (k - i)\"\nby auto thus ?thesis\nby (simp add: fps_mult_nth)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Corps) mI_gen_in_I1:\"\\0 < n; distinct_pds K n P; ideal (O\\<^bsub>K P n\\<^esub>) I; \n I \\ {\\\\<^bsub>(O\\<^bsub>K P n\\<^esub>)\\<^esub>}; I \\ carrier (O\\<^bsub>K P n\\<^esub>)\\ \\ (mIg\\<^bsub>K n P I\\<^esub>) \\ I\"", "output": "apply (simp add:mIg_def mI_gen_in_I) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iFROM_iT_Div_Int: \"\n \\ 0 < k; n \\ iMin A \\ \\ (A \\ [n\\]) \\ k = (A \\ k) \\ ([n\\] \\ k)\"", "output": "apply (rule subset_iT_Div_Int)\napply (blast intro: order_trans iMin_le) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma UN_atLeast_UNIV: \"(\\n. atLeast (k - int n)) = UNIV\"", "output": "apply auto\napply (rule_tac x = \"nat (k - x)\" in exI, simp) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prj_simps [simp]:\n assumes \"ide h\" and \"is_left_adjoint k\" and \"trg h = trg k\"\n shows \"trg (prj\\<^sub>0 h k) = src h\"\n and \"src (prj\\<^sub>1 h k) = src (prj\\<^sub>0 h k)\" and \"trg (prj\\<^sub>1 h k) = src k\"\n and \"dom (prj\\<^sub>0 h k) = prj\\<^sub>0 h k\" and \"cod (prj\\<^sub>0 h k) = prj\\<^sub>0 h k\"\n and \"dom (prj\\<^sub>1 h k) = prj\\<^sub>1 h k\" and \"cod (prj\\<^sub>1 h k) = prj\\<^sub>1 h k\"\n and \"is_left_adjoint (prj\\<^sub>0 h k)\" and \"is_left_adjoint (prj\\<^sub>1 h k)\"", "output": "using assms prj_in_hom\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma binomial_code[code]:\n \"n choose k = (if k \\ n then fact n div (fact k * fact (n - k)) else 0)\"", "output": "using binomial_eq_0[of n k] binomial_altdef_nat[of k n]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma summable_Ln_complex:\n fixes z :: \"nat \\ complex\"\n assumes \"convergent_prod z\" \"\\k. z k \\ 0\"\n shows \"summable (\\k. Ln (z k))\"", "output": "using convergent_prod_def assms convergent_prod_iff_summable_complex\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_ci: \n \"\\k < length ap; length (ci ly y (ap ! k)) = 2 * qa\\\n \\ layout_of ap ! k = qa\"", "output": "apply(cases \"ap ! k\")\napply(auto simp: layout_of.simps ci.simps length_of.simps tinc_b_def tdec_b_def length_findnth adjust.simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma liftn_var_dist_lt:\n \"\\i\\set vs. i < k \\ liftn n (var_dist vs t) k = var_dist vs (liftn n t k)\"", "output": "by (induction vs arbitrary: t) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma degree_ge_iff: \"k > 0 \\ MPoly_Type.degree p x \\ k \\ (\\m\\monomials p. lookup m x \\ k)\"", "output": "using Max_ge_iff\nby (meson degree_less_iff not_less)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Predict_subset_Gen:\n assumes \"I \\ Gen P\"\n assumes \"k \\ length Doc\"\n shows \"Predict k I \\ Gen P\"", "output": "using Predict_elem_in_Gen assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R_nondet_assign: \"(x ::= ?) \\ Ref \\\\s. \\k. P (\\ j. ((($) s)(x := k)) j)\\ \\P\\\"", "output": "unfolding spec_def\nby (rule H_nondet_assign)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma State_works:\n\"valid_state_var (State t k) \\\n dimacs_to_var (var_to_dimacs (State t k)) = \n (State t k)\"", "output": "by (induction k) (auto simp add: dimacs_to_var_def add.left_commute Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma deltas_below:\n \"\\i. bounded d k \\ i < k \\ deltas d w i < k\"", "output": "apply (unfold bounded_def)\napply (induct \"w\")\napply simp_all done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in ring) simple_extension_incl:\n assumes \"K \\ carrier R\" and \"x \\ carrier R\" shows \"K \\ simple_extension K x\"", "output": "proof fix k assume \"k \\ K\" thus \"k \\ simple_extension K x\"\nusing simple_extension.lin[OF simple_extension.zero, of k K x] assms\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma degree_greater_iff: \"MPoly_Type.degree p x > k \\ (\\m\\monomials p. lookup m x > k)\"", "output": "by transfer' (auto simp: Max_gr_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_delete [simp]: \"lookup (delete k al) = (lookup al)(k := None)\"", "output": "by(simp add: lookup_def delete_def Assoc_List_inverse distinct_delete map_of_delete_aux')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_bochner_integral_I0i_power_exp_m':\n \"has_bochner_integral lborel (\\x. x^k * exp (-x) * indicator {0 ..} x::real) (fact k)\"", "output": "using nn_intergal_power_times_exp_Ici[of k]\nby (intro has_bochner_integral_nn_integral) (auto simp: nn_integral_set_ennreal split: split_indicator)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GuardK_analz [intro]: \"[| GuardK n Ks G; \\K. K \\ Ks \\ Key K \\ analz G |]\n==> GuardK n Ks (analz G)\"", "output": "apply (auto simp: GuardK_def)\napply (erule analz.induct, auto)\nby (ind_cases \"Crypt K Xa \\ guardK n Ks\" for K Xa, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integrable_stretch:\n fixes f :: \"'a::euclidean_space \\ 'b::real_normed_vector\"\n assumes \"f integrable_on cbox a b\"\n and \"\\k\\Basis. m k \\ 0\"\n shows \"(\\x::'a. f (\\k\\Basis. (m k * (x\\k))*\\<^sub>R k)) integrable_on\n ((\\x. \\k\\Basis. (1 / m k * (x\\k))*\\<^sub>R k) ` cbox a b)\"", "output": "using assms unfolding integrable_on_def\nby (force dest: has_integral_stretch)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iTILL_add_neg: \"[\\n] \\- k = (if k \\ n then [\\n - k] else {})\"", "output": "by (force simp add: set_eq_iff iT_Plus_neg_mem_iff iT_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma or_int_rec:\n \\k OR l = of_bool (odd k \\ odd l) + 2 * ((k div 2) OR (l div 2))\\\n for k l :: int", "output": "using and_int_rec [of \\NOT k\\ \\NOT l\\]\nby (simp add: or_int_def even_not_iff_int not_int_div_2) (simp add: not_int_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fineI:\n assumes \"\\x k. (x, k) \\ s \\ k \\ d x\"\n shows \"d fine s\"", "output": "using assms unfolding fine_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fst_snd_snd_echelon_form_of_column_k_det:\n assumes \"k < ncols A\"\n and \"i \\ nrows A\"\n shows \"snd (snd ((echelon_form_of_column_k_det bezout) (n,A,i) k)) \n = fst (snd (snd (echelon_form_of_column_k_det_iarrays (n,matrix_to_iarray A, i, bezout) k)))\"", "output": "unfolding snd_echelon_form_of_column_k_det_eq unfolding snd_echelon_form_of_column_k_det\nby (rule fst_snd_matrix_to_iarray_echelon_form_of_column_k[OF assms])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma execl_last:\n \"\\P \\ cfs; k < length cfs; fst (cfs ! k) \\ {0.. \\\n length cfs - 1 = k\"", "output": "by (induction cfs arbitrary: k rule: execl.induct, auto simp: nth_Cons exec1_def split: nat.split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tree\\<^sub>i_order: \"\\k > 0; root_order_up\\<^sub>i k u\\ \\ root_order k (tree\\<^sub>i u)\"", "output": "apply(cases u)\napply(auto simp add: order_impl_root_order) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma f_expand_drop_mod: \"\n n mod k = 0 \\ xs \\\\<^sub>f k \\ n = xs \\ (n div k) \\\\<^sub>f k\"", "output": "by (clarsimp simp: mult.commute[of k] f_expand_drop_mult elim!: dvdE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ex_conv_ex_lookup:\n \"ex P t \\ (\\(k :: 'a) v. lookup t k = Some v \\ P k v)\"", "output": "by transfer(auto simp add: ID_ccompare_neq_None linorder.rbt_lookup_keys[OF mapping_linorder] ord.is_rbt_rbt_sorted RBT_Impl.keys_def RBT_Impl_rbt_ex_def linorder.map_of_entries[OF mapping_linorder, symmetric] linorder.distinct_entries[OF mapping_linorder] intro: map_of_is_SomeI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma primrootE: assumes \"x \\\\<^sub>p r*\"\n obtains k where \"k \\ 0\" and \"r\\<^sup>@k = x\"", "output": "using assms unfolding primitive_rootP_def root_def\nusing nemp_pow[of r]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma res_seq_res:\n assumes \"s \\ closed_seqs Zp\"\n shows \"(res_seq s k) \\ closed_seqs Zp\"", "output": "apply(induction k)\napply (simp add: assms)\nby (simp add: const_res_subseq is_subseq_closed)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmap_of_list_SomeD: \"fmlookup (fmap_of_list xs) k = Some v \\ (k, v) \\ set xs\"", "output": "by transfer' (auto dest: map_of_SomeD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_subdegree_ge0I: \"(\\k. k < 0 \\ f $$ k = 0) \\ 0 \\ fls_subdegree f\"", "output": "using fls_subdegree_geI[of f 0]\nby (cases \"f=0\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Corps) vp_gen_nonzero:\"\\valuation K v; vp K v = (Vr K v) \\\\<^sub>p t\\ \\\n t \\ \\\\<^bsub>Vr K v\\<^esub>\"", "output": "apply (rule contrapos_pp, simp+, cut_tac Ring.Rxa_zero[of \"Vr K v\"], drule sym, simp, simp add:vp_nonzero)\napply (simp add:Vr_ring) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iT_Plus_cut_le: \"\n (I \\ k) \\\\ t = (if t < k then {} else I \\\\ (t - k) \\ k)\"", "output": "apply (case_tac \"t < k\")\napply (simp add: cut_le_empty_iff iT_Plus_mem_iff)\napply (insert iT_Plus_cut_le2[of I k \"t - k\"], simp) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma surj_upOne: \"surj upOne\"", "output": "proof (unfold Fun.surj_def, rule) fix k::int show \"\\m. k = upOne m\"\nby (rule exI[of \"\\l. k = upOne l\" \"k - 1\"], simp)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proj_sum_list: \"proj_poly k (sum_list xs) = sum_list (map (proj_poly k) xs)\"", "output": "using proj_zero proj_plus\nby (rule fun_sum_list_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma EpriK_synth [elim]: \"epriK K \\ synth H \\\n epriK K \\ H \\ (\\ N. epriK K = epriKA N)\"", "output": "by (cases K, auto elim: EpriKF_synth)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_make_fmap1:\n \"lookup [ {|k|} |=> v ] k = v\"", "output": "by (metis finsert.rep_eq insert_iff lookup_make_fmap)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_of_mapk_inj_on_SomeI:\n \"inj_on f (fst ` (set t)) \\ map_of t k = Some x \\\n map_of (map (case_prod (\\k. Pair (f k))) t) (f k) = Some x\"", "output": "by (induct t) (auto simp add: inj_on_def dest!: map_of_SomeD split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proj_mult_vec [term_simps]: \"proj_poly k (p ** q) = (proj_poly k p) * (proj_poly k q)\"", "output": "unfolding mult_vec_def\nby (rule proj_lift_poly_fun_2_homogenous, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma by_length_paths_le[symmetric]: \"by_length k P = by_length k (paths_le k P)\"", "output": "using\nby_length.simps paths_le_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_lookup_nat [simp]:\n fixes f :: \"'a \\\\<^sub>0 nat\"\n shows \"finite {k. 0 < lookup f k}\"", "output": "using poly_mapping.lookup [of f]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ls_update_map_of_neq:\n \"x \\ k \\ map_of (fst (ls_update k v ls)) x = map_of ls x\"", "output": "apply (induct ls rule: ls_update.induct)\nby (auto simp add: Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minus_plus:\n assumes \"s adds t\"\n shows \"(t - s) + u = (t + u) - s\"", "output": "proof - from assms obtain k where k: \"t = s + k\" unfolding adds_def .. hence \"t - s = k\"\nby simp also from k have \"(t + u) - s = k + u\"\nby (simp add: add_assoc) finally show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fact_numeral: \"fact (numeral k) = numeral k * fact (pred_numeral k)\"\n \\ \\Evaluation for specific numerals\\", "output": "by (metis fact_Suc numeral_eq_Suc of_nat_numeral)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma division_ofI:\n assumes \"finite s\"\n and \"\\K. K \\ s \\ K \\ i\"\n and \"\\K. K \\ s \\ K \\ {}\"\n and \"\\K. K \\ s \\ \\a b. K = cbox a b\"\n and \"\\K1 K2. K1 \\ s \\ K2 \\ s \\ K1 \\ K2 \\ interior K1 \\ interior K2 = {}\"\n and \"\\s = i\"\n shows \"s division_of i\"", "output": "using assms unfolding division_of_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_suc: \\path \\ (Suc k) = fst (step (path \\ k, \\\\<^bsup>k\\<^esup>))\\", "output": "by (induction \\k\\, auto simp: path_def kth_state_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma key1_issued[simp]: \"hotel s \\ (k,k') : cards s g \\ k \\ issued s\"", "output": "by (induct s) (auto split:event.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pres_eq_iff_svb: \"((=),(=))\\K\\K\\bool_rel \\ (single_valued K \\ single_valued (K\\))\"", "output": "apply (safe intro!: single_valuedI)\napply (metis (full_types) IdD fun_relD1)\napply (metis (full_types) IdD fun_relD1)\nby (auto dest: single_valuedD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cp_eq_cs: assumes \\((\\,k),(\\',k'))\\cp\\ shows \\cs\\<^bsup>path \\\\<^esup> k = cs\\<^bsup>path \\'\\<^esup> k'\\", "output": "using assms\napply(induction rule: cp.induct)\napply blast+\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cycle_free_cycle_free_up_to:\n \"cycle_free m n \\ k \\ n \\ cycle_free_up_to m k n\"", "output": "unfolding cycle_free_def cycle_free_up_to_def\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iT_Minus_cut_greater: \"(k \\ I) \\> t = k \\ (I \\< (k - t))\"", "output": "apply (case_tac \"t \\ k\")\napply (cut_tac iT_Minus_cut_greater2[of \"k - t\" k I], simp+)\napply (fastforce simp: i_cut_mem_iff iT_Minus_mem_iff) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma snd_echelon_form_of_column_k_det:\n shows \"(snd (echelon_form_of_column_k_det_iarrays (det_P, A, i, bezout) k))\n = echelon_form_of_column_k_iarrays (A,i,bezout) k\"", "output": "unfolding echelon_form_of_column_k_det_iarrays_def Let_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gen_enumerate_it_to_list[refine_transfer_post_simp]:\n \"gen_enumerate (it_to_list it) =\n (\\ upd emp S. snd (foldli (it_to_list it S) (\\ _. True)\n (\\ x s. case s of (k, m) \\ (Suc k, upd x k m)) (0, emp)))\"", "output": "unfolding gen_enumerate_def unfolding foldl_conv_fold[symmetric] unfolding foldli_foldl[symmetric]\nby rule"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in GroupHom) isoI:\n assumes \"\\k. k\\G \\ T k = 0 \\ k=0\"\n shows \"GroupIso G T\"", "output": "proof (unfold_locales, rule inj_onI) fix x y from assms show \"\\ x\\G; y\\G; T x = T y \\ \\ x = y\"\nusing im_diff diff_closed\nby force\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "theorem fast_select_correct: \"k < length xs \\ fast_select k xs = select k xs\"", "output": "using fast_select_termination\nby (intro fast_select_correct_aux) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pow_mat_ring_pow: assumes A: \"(A :: ('a :: semiring_1)mat) \\ carrier_mat n n\"\n shows \"A ^\\<^sub>m k = A [^]\\<^bsub>ring_mat TYPE('a) n b\\<^esub> k\"\n (is \"_ = A [^]\\<^bsub>?C\\<^esub> k\")", "output": "proof - interpret semiring ?C\nby (rule semiring_mat) show ?thesis\nby (induct k, insert A, auto simp: ring_mat_def nat_pow_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma connected_ivt_component_cart:\n fixes x :: \"real^'n\"\n shows \"connected s \\ x \\ s \\ y \\ s \\ x$k \\ a \\ a \\ y$k \\ (\\z\\s. z$k = a)\"", "output": "using connected_ivt_hyperplane[of s x y \"axis k 1\" a]\nby (auto simp add: inner_axis inner_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma offs_append:\n \"offs (ms @ ns) k = offs ms k @ offs ns (foldl (+) k ms)\"", "output": "by (induction ms arbitrary: k, simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_eq_valueI: \"(k, v) \\ set (fst (list_of_oalist xs)) \\ lookup xs k = v\"", "output": "unfolding lookup_def\nusing oalist_inv_list_of_oalist\nby (rule lookup_raw_eq_valueI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma of_nat_fract: \"of_nat k = Fract (of_nat k) 1\"", "output": "by (induct k) (simp_all add: Zero_fract_def One_fract_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma table_append_Some_iff: \"table_of (xs@ys) k = Some z = \n (table_of xs k = Some z \\ (table_of xs k = None \\ table_of ys k = Some z))\"", "output": "apply (simp)\napply (rule map_add_Some_iff) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CharacterData_simp4 [simp]: \n \"h \\ put_M\\<^sub>C\\<^sub>h\\<^sub>a\\<^sub>r\\<^sub>a\\<^sub>c\\<^sub>t\\<^sub>e\\<^sub>r\\<^sub>D\\<^sub>a\\<^sub>t\\<^sub>a character_data_ptr setter v \\\\<^sub>h h' \n \\ preserved (get_M\\<^sub>E\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t element_ptr getter) h h'\"", "output": "by(auto simp add: put_M_defs ElementMonad.get_M_defs preserved_def split: option.splits dest: get_heap_E)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_elment_ptr_simp2 [simp]:\n \"element_ptr \\ element_ptr'\n \\ get\\<^sub>E\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t element_ptr (put\\<^sub>E\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t element_ptr' element h) = get\\<^sub>E\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t element_ptr h\"", "output": "by(auto simp add: get\\<^sub>E\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t_def put\\<^sub>E\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_fininfI[intro 0]:\n assumes \"v\\<^sub>2 \\\\<^sub>F\\<^sub>I w\\<^sub>2\" \"w\\<^sub>1 \\\\<^sub>F v\\<^sub>2\"\n shows \"w\\<^sub>1 \\\\<^sub>F\\<^sub>I w\\<^sub>2\"", "output": "using assms unfolding le_fininf_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in lift_state_space) lift_hoaret:\n assumes deriv: \"\\,{}\\\\<^sub>t\\<^bsub>/F\\<^esub> P c Q,A\"\n shows\n \"(lift\\<^sub>e \\),{}\\\\<^sub>t\\<^bsub>/F\\<^esub> (lift\\<^sub>s P) (lift\\<^sub>c c) (lift\\<^sub>s Q),(lift\\<^sub>s A)\"", "output": "apply (rule hoaret_complete)\napply (insert hoaret_sound [OF deriv])\napply (rule lift_validt)\napply (simp add: cvalidt_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma shadow_root_put_get [simp]: \"h \\ put_M\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t shadow_root_ptr setter v \\\\<^sub>h h'\n \\ (\\x. getter (setter (\\_. v) x) = v)\n \\ h' \\ get_M\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t shadow_root_ptr getter \\\\<^sub>r v\"", "output": "by(auto simp add: put_M_defs get_M_defs split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_element_ptr_kind_not_character_data_ptr [simp]: \n \"\\ is_element_ptr_kind (cast\\<^sub>c\\<^sub>h\\<^sub>a\\<^sub>r\\<^sub>a\\<^sub>c\\<^sub>t\\<^sub>e\\<^sub>r\\<^sub>_\\<^sub>d\\<^sub>a\\<^sub>t\\<^sub>a\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r\\<^sub>2\\<^sub>n\\<^sub>o\\<^sub>d\\<^sub>e\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r character_data_ptr)\"", "output": "using is_element_ptr_kind_obtains\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wf_typeE1:\n \"\\ \\ t : T \\ \\ \\\\<^sub>w\\<^sub>f\"\n \"\\ \\ fs [:] fTs \\ \\ \\\\<^sub>w\\<^sub>f\"", "output": "by (induct set: typing typings) (blast elim: well_formedE_cases)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma shadow_root_get_put_6 [simp]:\n \"get\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t document_ptr (put\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t shadow_root_ptr f h) = get\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t document_ptr h\"", "output": "by(auto simp add: get\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t_def get\\<^sub>N\\<^sub>o\\<^sub>d\\<^sub>e_def put\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_document_ptr_simp [simp]: \n \"get\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t document_ptr (put\\<^sub>O\\<^sub>b\\<^sub>j\\<^sub>e\\<^sub>c\\<^sub>t ptr obj h) \n = (if ptr = cast document_ptr then cast obj else get document_ptr h)\"", "output": "by(auto simp add: get\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t_def split: option.splits Option.bind_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cast\\<^sub>n\\<^sub>o\\<^sub>d\\<^sub>e\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r\\<^sub>2\\<^sub>e\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r_ext_none [simp]: \n \"cast\\<^sub>n\\<^sub>o\\<^sub>d\\<^sub>e\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r\\<^sub>2\\<^sub>e\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r (node_ptr.Ext (Inr (Inr node_ext_ptr))) = None\"", "output": "by(simp add: cast\\<^sub>n\\<^sub>o\\<^sub>d\\<^sub>e\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r\\<^sub>2\\<^sub>e\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tr_par_deduct_iff:\n assumes \"B \\ set (tr\\<^sub>p\\<^sub>c A D)\"\n shows \"ik\\<^sub>s\\<^sub>t (unlabel B) \\\\<^sub>s\\<^sub>e\\<^sub>t I \\ t \\ ik\\<^sub>s\\<^sub>s\\<^sub>t (unlabel A) \\\\<^sub>s\\<^sub>e\\<^sub>t I \\ t\"", "output": "using tr_par_ik_eq[OF assms]\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_cat_cocone) is_cat_coconeD'[cat_lim_cs_intros]:\n assumes \"c' = cf_const \\ \\ c\"\n shows \"\\ : \\ \\\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>t\\<^sub>m c' : \\ \\\\\\<^sub>C\\<^sub>.\\<^sub>t\\<^sub>m\\<^bsub>\\\\<^esub> \\\"", "output": "unfolding assms\nby (cs_concl cs_intro: cat_small_cs_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rreqs_increase:\n \"paodv i \\\\<^sub>A onll \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V (\\((\\, _), _, (\\', _)). rreqs \\ \\ rreqs \\')\"", "output": "by (inv_cterms simp add: subset_insertI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flush_append_Prog\\<^sub>s\\<^sub>b:\n\"\\m. (flush (takeWhile (Not \\ is_volatile_Write\\<^sub>s\\<^sub>b) (sb @ [Prog\\<^sub>s\\<^sub>b p\\<^sub>1 p\\<^sub>2 mis])) m) = \n (flush (takeWhile (Not \\ is_volatile_Write\\<^sub>s\\<^sub>b) sb) m) \"", "output": "by (induct sb) (auto split: memref.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma height_gt_0_notin_alphabet_imp_sibling_left[simp]:\n\"\\height t\\<^sub>1 > 0; a \\ alphabet t\\<^sub>1\\ \\\n sibling (Node w t\\<^sub>1 t\\<^sub>2) a = sibling t\\<^sub>2 a\"", "output": "by (case_tac t\\<^sub>1) simp+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cross7_mult_left: \"(c *\\<^sub>R x) \\\\<^sub>7 y = c *\\<^sub>R (x \\\\<^sub>7 y)\" \n and cross7_mult_right: \"x \\\\<^sub>7 (c *\\<^sub>R y) = c *\\<^sub>R (x \\\\<^sub>7 y)\"", "output": "by (simp_all add: cross7_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma semicategory_smc_prod_2[smc_cs_intros]: \"semicategory \\ (\\ \\\\<^sub>S\\<^sub>M\\<^sub>C \\)\"", "output": "unfolding smc_prod_2_def\nby (rule psmc_semicategory_smc_prod)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma completeness:\n assumes \"\\.lang\\<^sub>W\\<^sub>S\\<^sub>1\\<^sub>S n \\ = \\.lang\\<^sub>W\\<^sub>S\\<^sub>1\\<^sub>S n \\\" \"wf_formula n (FOr \\ \\)\"\n shows \"slow.check_eqv n \\ \\\"", "output": "using assms(2) unfolding slow.check_eqv_def\nby (intro conjI[OF assms(2) slow.D.check_eqv_complete, OF box_equals[OF assms(1) lang\\<^sub>W\\<^sub>S\\<^sub>1\\<^sub>S_rexp_of''_norm lang\\<^sub>W\\<^sub>S\\<^sub>1\\<^sub>S_rexp_of''_norm]]) (auto intro!: \\.wf_rexp_of'')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma product_simps[simp]:\n \"alphabet\\<^sub>2 (product AA) = \\ (alphabet\\<^sub>1 ` set AA)\"\n \"initial\\<^sub>2 (product AA) = map initial\\<^sub>1 AA\"\n \"transition\\<^sub>2 (product AA) a ps = map2 (\\ A p. transition\\<^sub>1 A a p) AA ps\"\n \"condition\\<^sub>2 (product AA) = condition (map condition\\<^sub>1 AA)\"", "output": "unfolding product_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inv\\<^sub>2E:\n assumes \"inv\\<^sub>2 P\\<^sub>1 P\\<^sub>2 B\\<^sub>1 B\\<^sub>2 V\"\n shows \"inv\\<^sub>1 P\\<^sub>1 P\\<^sub>2 B\\<^sub>1 B\\<^sub>2 V\"\n and \"V \\ L \\ {} \\ \\B \\ P\\<^sub>1 \\ wrap B\\<^sub>1. B \\ L \\ {}\"\n and \"bij_exists P\\<^sub>1 (\\(P\\<^sub>2 \\ wrap B\\<^sub>2))\"\n and \"2 * card P\\<^sub>2 \\ card (\\P\\<^sub>2)\"", "output": "using assms unfolding inv\\<^sub>2_def\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_element_ptr_ref [simp]: \"is_element_ptr (element_ptr.Ref n)\"", "output": "by(simp add: is_element_ptr\\<^sub>e\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interpretation_subst_idem:\n \"interpretation\\<^sub>s\\<^sub>u\\<^sub>b\\<^sub>s\\<^sub>t \\ \\ subst_idem \\\"", "output": "unfolding subst_idem_def\nusing interpretation_grounds_all[of \\] trm_subst_ident subst_eq_if_eq_vars\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pivot_vars:\n \"\\\\ (\\ s); x\\<^sub>i \\ lvars (\\ s); x\\<^sub>j \\ rvars_of_lvar (\\ s) x\\<^sub>i\\ \\ tvars (\\ (pivot x\\<^sub>i x\\<^sub>j s)) = tvars (\\ s) \"", "output": "using pivot_lvars[of s x\\<^sub>i x\\<^sub>j] pivot_rvars[of s x\\<^sub>i x\\<^sub>j]\nusing rvars_of_lvar_rvars[of x\\<^sub>i \"\\ s\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma aodv_init_sip_not_i [simp]:\n assumes \"(\\, p) \\ \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V i\"\n shows \"sip \\ \\ i\"", "output": "using assms unfolding \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af\\<^sub>G_False_implies_af_False:\n \"af\\<^sub>G \\ \\ w \\ False\\<^sub>n \\ af \\ w \\ False\\<^sub>n\"", "output": "by (metis af_append_False af_not_False_implies_af_equals_af\\<^sub>G)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LI_compose_measure_lt: \"((S@(map Send T)@S',\\\\<^sub>1), (S@Send (Fun f T)#S',\\\\<^sub>2)) \\ measure\\<^sub>s\\<^sub>t\"", "output": "using strand_fv_card_map_fun_eq[of S f T S'] strand_size_map_fun_lt(2)[of T f]\nby (simp add: measure\\<^sub>s\\<^sub>t_def size\\<^sub>s\\<^sub>t_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tr_par_declassified_eq:\n \"B \\ set (tr\\<^sub>p\\<^sub>c A D) \\ declassified\\<^sub>l\\<^sub>s\\<^sub>t B I = declassified\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A I\"", "output": "using tr_par_labeled_rcv_iff unfolding declassified\\<^sub>l\\<^sub>s\\<^sub>t_def declassified\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dot\\<^sub>O\\<^sub>c\\<^sub>l\\<^sub>A\\<^sub>n\\<^sub>y\\\\\\_at_pre_strict [simp] : \"(invalid).any@pre = invalid\"", "output": "by(rule ext, simp add: dot_accessor None_fun_def None_option_def bot_option_def None_def invalid_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma WTBinOp1: \"\\ P,E \\ e\\<^sub>1 :: T; P,E \\ e\\<^sub>2 :: T\\\n \\ P,E \\ e\\<^sub>1 \\Eq\\ e\\<^sub>2 :: Boolean\"", "output": "apply (rule WTBinOp)\napply assumption+\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma oaodv_control_within [simp]: \"control_within \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V (init (opaodv i))\"", "output": "unfolding \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V'_def\nby (rule control_withinI) (auto simp del: \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_cat_colimit) cat_colim_unique:\n assumes \"u' : \\ >\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>c\\<^sub>o\\<^sub>l\\<^sub>i\\<^sub>m r' : \\ \\\\\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n shows \"\\!f'. f' : r \\\\<^bsub>\\\\<^esub> r' \\ u' = ntcf_const \\ \\ f' \\\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F u\"", "output": "by (intro cat_colim_unique_cocone[OF is_cat_colimitD(1)[OF assms]])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma String_defined : \"\\ String = True\"", "output": "apply(rule ext, auto simp: String_def defined_def False_def True_def bot_fun_def None_fun_def None_option_def)\nby(simp_all add: Abs_Bag\\<^sub>b\\<^sub>a\\<^sub>s\\<^sub>e_inject bot_option_def bot_Bag\\<^sub>b\\<^sub>a\\<^sub>s\\<^sub>e_def None_Bag\\<^sub>b\\<^sub>a\\<^sub>s\\<^sub>e_def None_option_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_character_data_get_M\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t:\n \"h \\ new_character_data \\\\<^sub>h h' \\ preserved (get_M\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t ptr getter) h h'\"", "output": "by(auto simp add: new_character_data_def get_M_defs preserved_def split: prod.splits option.splits elim!: bind_returns_result_E bind_returns_heap_E)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in fbrelation_pair) fbrelation_fcomp: \"fbrelation (r\\<^sub>1 \\\\<^sub>\\ r\\<^sub>2)\"", "output": "using r\\<^sub>1.fbrelation_axioms r\\<^sub>2.fbrelation_axioms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma aodv_init_sip_not_ip' [simp]:\n assumes \"(\\, p) \\ \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V i\"\n shows \"sip \\ \\ ip \\\"", "output": "using assms unfolding \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ntcf_ntsmcf_ntcf_vcomp[slicing_commute]: \n \"ntcf_ntsmcf \\ \\\\<^sub>N\\<^sub>T\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>F ntcf_ntsmcf \\ = ntcf_ntsmcf (\\ \\\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F \\)\"", "output": "unfolding ntsmcf_vcomp_def ntcf_ntsmcf_def cat_smc_def nt_field_simps dg_field_simps\nby (simp add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t_M_ok [simp]:\n \"h \\ ok new\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t_M\"", "output": "by(auto simp add: new\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t_M_def split: prod.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma OclIsKindOf\\<^sub>P\\<^sub>e\\<^sub>r\\<^sub>s\\<^sub>o\\<^sub>n_OclAny_strict2[simp]: \"(None::OclAny) .oclIsKindOf(Person) = True\"", "output": "by(rule ext, simp add: None_fun_def None_option_def bot_option_def None_def invalid_def OclIsKindOf\\<^sub>P\\<^sub>e\\<^sub>r\\<^sub>s\\<^sub>o\\<^sub>n_OclAny)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tr_vars_disj:\n assumes \"A' \\ set (tr A D)\" \"\\(t,t') \\ set D. (fv t \\ fv t') \\ bvars\\<^sub>s\\<^sub>s\\<^sub>t A = {}\"\n and \"fv\\<^sub>s\\<^sub>s\\<^sub>t A \\ bvars\\<^sub>s\\<^sub>s\\<^sub>t A = {}\"\n shows \"fv\\<^sub>s\\<^sub>t A' \\ bvars\\<^sub>s\\<^sub>t A' = {}\"", "output": "using assms tr_vars_subset\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma delete\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t_pointer_removed:\n assumes \"delete\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t ptr h = Some h'\"\n shows \"ptr |\\| shadow_root_ptr_kinds h'\"", "output": "using assms\nby(auto simp add: delete\\<^sub>O\\<^sub>b\\<^sub>j\\<^sub>e\\<^sub>c\\<^sub>t_pointer_removed delete\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t_def shadow_root_ptr_kinds_def split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ntsmcf_smcf_comp_is_semifunctor'[smc_cs_intros]:\n assumes \"\\ : \\ \\\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>F \\ : \\ \\\\\\<^sub>S\\<^sub>M\\<^sub>C\\<^bsub>\\\\<^esub> \\\" \n and \"\\ : \\ \\\\\\<^sub>S\\<^sub>M\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n and \"\\' = \\ \\\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>F \\\"\n and \"\\' = \\ \\\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>F \\\"\n shows \"\\ \\\\<^sub>N\\<^sub>T\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>F\\<^sub>-\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>F \\ : \\' \\\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>F \\' : \\ \\\\\\<^sub>S\\<^sub>M\\<^sub>C\\<^bsub>\\\\<^esub> \\\"", "output": "using assms(1,2) unfolding assms(3,4) .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma par_step_no_change_on_send_or_receive:\n fixes \\ s a \\' s'\n assumes \"((\\, s), a, (\\', s')) \\ oparp_sos i (oseqp_sos \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V i) (seqp_sos \\\\<^sub>Q\\<^sub>M\\<^sub>S\\<^sub>G)\"\n and \"a \\ \\\"\n shows \"\\' i = \\ i\"", "output": "using assms\nby (rule qmsg_no_change_on_send_or_receive)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mtx3_to_mtx: \"mtx \n ([a\\<^sub>1\\<^sub>1, a\\<^sub>1\\<^sub>2, a\\<^sub>1\\<^sub>3] # \n [a\\<^sub>2\\<^sub>1, a\\<^sub>2\\<^sub>2, a\\<^sub>2\\<^sub>3] # \n [a\\<^sub>3\\<^sub>1, a\\<^sub>3\\<^sub>2, a\\<^sub>3\\<^sub>3] # []) = \n to_mtx (\\ i j::3. if i=1 \\ j=1 then a\\<^sub>1\\<^sub>1\n else (if i=1 \\ j=2 then a\\<^sub>1\\<^sub>2 \n else (if i=1 \\ j=3 then a\\<^sub>1\\<^sub>3 \n else (if i=2 \\ j=1 then a\\<^sub>2\\<^sub>1\n else (if i=2 \\ j=2 then a\\<^sub>2\\<^sub>2 \n else (if i=2 \\ j=3 then a\\<^sub>2\\<^sub>3 \n else (if i=3 \\ j=1 then a\\<^sub>3\\<^sub>1 \n else (if i=3 \\ j=2 then a\\<^sub>3\\<^sub>2 \n else a\\<^sub>3\\<^sub>3))))))))\"", "output": "apply(simp add: sq_mtx_eq_iff)\nusing exhaust_3\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in typed_model) has_all_wt_instances_ofD':\n assumes N_wf_trms: \"wf\\<^sub>t\\<^sub>r\\<^sub>m\\<^sub>s N\"\n and M_wf_trms: \"wf\\<^sub>t\\<^sub>r\\<^sub>m\\<^sub>s M\"\n and N_instance_M: \"has_all_wt_instances_of \\ N M\"\n and t_in_N: \"t \\ N\"\n shows \"\\\\. wt\\<^sub>s\\<^sub>u\\<^sub>b\\<^sub>s\\<^sub>t \\ \\ wf\\<^sub>t\\<^sub>r\\<^sub>m\\<^sub>s (subst_range \\) \\ t \\ M \\\\<^sub>s\\<^sub>e\\<^sub>t \\\"", "output": "using assms is_wt_instance_of_condD' unfolding has_all_wt_instances_of_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_shadow_root_ptr_simp1 [simp]:\n \"get\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t shadow_root_ptr (put\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t shadow_root_ptr shadow_root h) = Some shadow_root\"", "output": "by(auto simp add: get\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t_def put\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cast\\<^sub>o\\<^sub>b\\<^sub>j\\<^sub>e\\<^sub>c\\<^sub>t\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r\\<^sub>2\\<^sub>n\\<^sub>o\\<^sub>d\\<^sub>e\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r_ext_none [simp]: \n \"cast\\<^sub>o\\<^sub>b\\<^sub>j\\<^sub>e\\<^sub>c\\<^sub>t\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r\\<^sub>2\\<^sub>n\\<^sub>o\\<^sub>d\\<^sub>e\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r (object_ptr.Ext (Inr (Inr (Inr object_ext_ptr)))) = None\"", "output": "by(simp add: cast\\<^sub>o\\<^sub>b\\<^sub>j\\<^sub>e\\<^sub>c\\<^sub>t\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r\\<^sub>2\\<^sub>n\\<^sub>o\\<^sub>d\\<^sub>e\\<^sub>_\\<^sub>p\\<^sub>t\\<^sub>r_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dot\\<^sub>O\\<^sub>c\\<^sub>l\\<^sub>A\\<^sub>n\\<^sub>y\\\\\\_at_pre_Nonestrict [simp] : \"(None).any@pre = invalid\"", "output": "by(rule ext, simp add: dot_accessor None_fun_def None_option_def bot_option_def None_def invalid_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma known_ptr_new_shadow_root_ptr: \"a_known_ptr ptr \\ \\known_ptr ptr \\ is_shadow_root_ptr ptr\"", "output": "using l_known_ptr\\<^sub>S\\<^sub>h\\<^sub>a\\<^sub>d\\<^sub>o\\<^sub>w\\<^sub>R\\<^sub>o\\<^sub>o\\<^sub>t.known_ptr_not_shadow_root_ptr\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma meval_sched_snocD:\n \"(cms\\<^sub>1, mem\\<^sub>1) \\\\<^bsub>ns@[n]\\<^esub> (cms\\<^sub>1', mem\\<^sub>1') \\\n \\cms\\<^sub>1'' mem\\<^sub>1''. (cms\\<^sub>1, mem\\<^sub>1) \\\\<^bsub>ns\\<^esub> (cms\\<^sub>1'', mem\\<^sub>1'') \\ (cms\\<^sub>1'', mem\\<^sub>1'') \\\\<^bsub>n\\<^esub> (cms\\<^sub>1', mem\\<^sub>1')\"", "output": "apply(fastforce dest: meval_sched_appD) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transaction_fresh_subst_proj:\n assumes \"transaction_fresh_subst \\ T A\"\n shows \"transaction_fresh_subst \\ (transaction_proj n T) (proj n A)\"", "output": "using assms transaction_proj_fresh_eq[of n T] contra_subsetD[OF subterms\\<^sub>s\\<^sub>e\\<^sub>t_mono[OF transaction_proj_trms_subset[of n T]]] contra_subsetD[OF subterms\\<^sub>s\\<^sub>e\\<^sub>t_mono[OF trms\\<^sub>s\\<^sub>s\\<^sub>t_proj_subset(1)[of n A]]] unfolding transaction_fresh_subst_def\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma aodv_init_kD_empty [simp]:\n \"(\\, p) \\ \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V i \\ kD (rt \\) = {}\"", "output": "unfolding \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V_def kD_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_disconnected_nodes_ok:\n \"type_wf h \\ document_ptr |\\| document_ptr_kinds h \\\n h \\ ok (get_disconnected_nodes document_ptr)\"", "output": "apply(unfold type_wf_impl get_disconnected_nodes_impl[unfolded a_get_disconnected_nodes_def])\nusing CD.get_disconnected_nodes_ok CD.type_wf_impl ShadowRootClass.type_wf\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma size_defined:\n assumes X_finite: \"\\\\. finite \\\\Rep_Set\\<^sub>b\\<^sub>a\\<^sub>s\\<^sub>e (X \\)\\\\\"\n shows \"\\ (X->size\\<^sub>S\\<^sub>e\\<^sub>t()) = \\ X\"", "output": "apply(rule ext, simp add: cp_defined[of \"X->size\\<^sub>S\\<^sub>e\\<^sub>t()\"] OclSize_def)\napply(simp add: defined_def bot_option_def bot_fun_def None_option_def None_fun_def X_finite) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cp_OclIncludes1:\n\"(X->includes\\<^sub>S\\<^sub>e\\<^sub>t(x)) \\ = (X->includes\\<^sub>S\\<^sub>e\\<^sub>t(\\ _. x \\)) \\\"", "output": "by(auto simp: OclIncludes_def StrongEq_def invalid_def cp_defined[symmetric] cp_valid[symmetric])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_ft_semifunctor) ft_smcf_is_ft_dghm'[slicing_intros]:\n assumes \"\\' = smc_dg \\\" and \"\\' = smc_dg \\\"\n shows \"smcf_dghm \\ : \\' \\\\\\<^sub>D\\<^sub>G\\<^sub>.\\<^sub>f\\<^sub>a\\<^sub>i\\<^sub>t\\<^sub>h\\<^sub>f\\<^sub>u\\<^sub>l\\<^bsub>\\\\<^esub> \\'\"", "output": "unfolding assms\nby (rule ft_smcf_is_ft_dghm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma complements_do_not_falsify:\n assumes l1C1': \"l\\<^sub>1 \\ C\\<^sub>1'\"\n assumes l\\<^sub>2C1': \"l\\<^sub>2 \\ C\\<^sub>1'\"\n assumes fals: \"falsifies\\<^sub>g G C\\<^sub>1'\"\n shows \"l\\<^sub>1 \\ l\\<^sub>2\\<^sup>c\"", "output": "using assms complements_do_not_falsify'\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cp_OclNotEmpty: \"X->notEmpty\\<^sub>S\\<^sub>e\\<^sub>t() \\ = ((\\_. X \\)->notEmpty\\<^sub>S\\<^sub>e\\<^sub>t()) \\\"", "output": "apply(simp only: OclNotEmpty_def)\napply(subst (2) cp_OclNot)\nby(simp add: cp_OclNot[symmetric] cp_OclIsEmpty[symmetric])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes\n \"optim 0 [IPush d\\<^sub>1, IPush d\\<^sub>2, IStore y] [] = Ok (xs, ys)\"\n \"unbox_ubx1 d\\<^sub>1 = Some x\"\n \"unbox_ubx1 d\\<^sub>2 = None\" \"unbox_ubx2 d\\<^sub>2 = None\"\n shows \"xs = [IPushUbx1 x, IPush d\\<^sub>2, IStoreUbx Ubx1 y] \\ ys = []\"", "output": "using assms(1)\nby (simp add: assms optim_def try_unbox_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trms\\<^sub>s\\<^sub>s\\<^sub>t_unlabel_subst_cons:\n \"trms\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t ((l,b)#A \\\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t \\) = trms\\<^sub>s\\<^sub>s\\<^sub>t\\<^sub>p (b \\\\<^sub>s\\<^sub>s\\<^sub>t\\<^sub>p \\) \\ trms\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t (A \\\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t \\)\"", "output": "by (metis subst_lsst_unlabel trms\\<^sub>s\\<^sub>s\\<^sub>t_subst_cons unlabel_Cons(1))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma setops\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t_proj_subset:\n \"setops\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t (proj n A) \\ setops\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A\"\n \"setops\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t (proj m (proj n A)) \\ setops\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t (proj n A)\"", "output": "unfolding proj_def setops\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma type_wf_put_ptr_not_in_heap_E:\n assumes \"type_wf (put\\<^sub>O\\<^sub>b\\<^sub>j\\<^sub>e\\<^sub>c\\<^sub>t ptr obj h)\"\n assumes \"ptr |\\| object_ptr_kinds h\"\n shows \"type_wf h\"", "output": "using assms\nby(auto simp add: type_wf_defs elim!: DocumentMonad.type_wf_put_ptr_not_in_heap_E split: option.splits if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Act\\<^sub>\\_eqvt [eqvt, simp]: \"p \\ Act\\<^sub>\\ \\ t\\<^sub>\\ = Act\\<^sub>\\ (p \\ \\) (p \\ t\\<^sub>\\)\"", "output": "by (induct t\\<^sub>\\) (simp add: Act\\<^sub>\\.abs_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interpretation_grounds_all':\n \"interpretation\\<^sub>s\\<^sub>u\\<^sub>b\\<^sub>s\\<^sub>t \\ \\ ground (M \\\\<^sub>s\\<^sub>e\\<^sub>t \\)\"", "output": "using subst_fv_dom_ground_if_ground_img[of _ \\]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Person_allInstances_at_post_oclIsTypeOf\\<^sub>P\\<^sub>e\\<^sub>r\\<^sub>s\\<^sub>o\\<^sub>n:\n\"\\ \\ (Person .allInstances()->forAll\\<^sub>S\\<^sub>e\\<^sub>t(X|X .oclIsTypeOf(Person)))\"", "output": "unfolding OclAllInstances_at_post_def\nby(rule Person_allInstances_generic_oclIsTypeOf\\<^sub>P\\<^sub>e\\<^sub>r\\<^sub>s\\<^sub>o\\<^sub>n)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma basic_\\_wff: \"WFF(\\\\<^sub>1,\\\\<^sub>1')\"", "output": "by(auto simp: WFF_def \\\\<^sub>1_def \\\\<^sub>1'_def oid0_def oid1_def oid2_def oid3_def oid4_def oid5_def oid6_def oid7_def oid8_def oid_of_\\_def oid_of_type\\<^sub>P\\<^sub>e\\<^sub>r\\<^sub>s\\<^sub>o\\<^sub>n_def oid_of_type\\<^sub>O\\<^sub>c\\<^sub>l\\<^sub>A\\<^sub>n\\<^sub>y_def person1_def person2_def person3_def person4_def person5_def person6_def person7_def person8_def person9_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma OclAdd\\<^sub>R\\<^sub>e\\<^sub>a\\<^sub>l_commute: \"(X +\\<^sub>r\\<^sub>e\\<^sub>a\\<^sub>l Y) = (Y +\\<^sub>r\\<^sub>e\\<^sub>a\\<^sub>l X)\"", "output": "by(rule ext,auto simp:True_def False_def OclAdd\\<^sub>R\\<^sub>e\\<^sub>a\\<^sub>l_def invalid_def split: option.split option.split_asm bool.split bool.split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma if_SE_split_asm : \" (\\ \\ if\\<^sub>S\\<^sub>E P B\\<^sub>1 B\\<^sub>2) = ((P \\ \\ (\\ \\ B\\<^sub>1)) \\ (\\ P \\ \\ (\\ \\ B\\<^sub>2)))\"", "output": "by(cases \"P \\\",auto simp: if_SE_D1 if_SE_D2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma OclExcluding_excludes:\n assumes \"\\ \\ X->excludes\\<^sub>S\\<^sub>e\\<^sub>t(x)\"\n shows \"\\ \\ X->excluding\\<^sub>S\\<^sub>e\\<^sub>t(x) \\ X\"", "output": "by(simp add: StrongEq_def OclValid_def True_def OclExcluding_excludes0[OF assms])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_tiny_semifunctor) is_tiny_semifunctor_op: \n \"op_smcf \\ : op_smc \\ \\\\\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>.\\<^sub>t\\<^sub>i\\<^sub>n\\<^sub>y\\<^bsub>\\\\<^esub> op_smc \\\"", "output": "by (intro is_tiny_semifunctorI') (cs_concl cs_intro: smc_small_cs_intros smc_op_intros)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma op_ntcf_cf_ntcf_comp[cat_op_simps]:\n \"op_ntcf (\\ \\\\<^sub>C\\<^sub>F\\<^sub>-\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F \\) = op_cf \\ \\\\<^sub>C\\<^sub>F\\<^sub>-\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F op_ntcf \\\"", "output": "unfolding dghm_tdghm_comp_def dghm_comp_def op_ntcf_def op_cf_def op_cat_def dg_field_simps dghm_field_simps nt_field_simps\nby (simp add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t_Cons[simp]:\n \"dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t ((l,send\\t\\)#A) = (l,receive\\t\\)#(dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A)\"\n \"dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t ((l,receive\\t\\)#A) = (l,send\\t\\)#(dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A)\"\n \"dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t ((l,\\a: t \\ s\\)#A) = (l,\\a: t \\ s\\)#(dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A)\"\n \"dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t ((l,insert\\t,s\\)#A) = (l,insert\\t,s\\)#(dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A)\"\n \"dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t ((l,delete\\t,s\\)#A) = (l,delete\\t,s\\)#(dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A)\"\n \"dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t ((l,\\a: t \\ s\\)#A) = (l,\\a: t \\ s\\)#(dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A)\"\n \"dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t ((l,\\X\\\\\\: F \\\\: G\\)#A) = (l,\\X\\\\\\: F \\\\: G\\)#(dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A)\"", "output": "by (simp_all add: dual\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma emb_cases_reverse [consumes 1, case_names refl step]: \n \"t \\\\<^sub>e\\<^sub>m\\<^sub>b s \\ (\\t'. t = t' \\ s = t' \\ P) \\ (\\t' u s'. t = t' \\ s = s' \\ t' \\\\<^sub>e\\<^sub>m\\<^sub>b u \\ u \\\\<^sub>e\\<^sub>m\\<^sub>b s' \\ P) \\ P\"", "output": "by (induct rule:emb_induct_reverse; blast+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flatten_sigma_2_monotone: \n \"w \\\\<^sub>n \\[M]\\<^sub>\\\\<^sub>2 \\ M \\ M' \\ w \\\\<^sub>n \\[M']\\<^sub>\\\\<^sub>2\"", "output": "by (induction \\ arbitrary: w) (simp; blast dest: GF_advice_monotone)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_document_ptr_simp2 [simp]: \n \"document_ptr \\ document_ptr' \n \\ get\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t document_ptr (put\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t document_ptr' document h) = get\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t document_ptr h\"", "output": "by(auto simp add: get\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t_def put\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parallel_HSem_ind:\n assumes \"adm (\\\\'. P (fst \\') (snd \\'))\"\n assumes \"P \\ \\\"\n assumes step: \"\\y z. P y z \\\n P (\\\\<^sub>1 ++\\<^bsub>domA \\\\<^sub>1\\<^esub> \\<^bold>\\\\\\<^sub>1\\<^bold>\\\\<^bsub>y\\<^esub>) (\\\\<^sub>2 ++\\<^bsub>domA \\\\<^sub>2\\<^esub> \\<^bold>\\\\\\<^sub>2\\<^bold>\\\\<^bsub>z\\<^esub>)\"\n shows \"P (\\\\\\<^sub>1\\\\\\<^sub>1) (\\\\\\<^sub>2\\\\\\<^sub>2)\"", "output": "unfolding HSem_def'\napply (rule parallel_fix_ind[OF assms(1), OF assms(2)])\nusing step\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "theorem lang\\<^sub>M\\<^sub>2\\<^sub>L_rexp_of'': \"wf_formula n \\ \\ lang\\<^sub>M\\<^sub>2\\<^sub>L n \\ = lang n (rexp_of'' n \\) - {[]}\"", "output": "unfolding lang\\<^sub>M\\<^sub>2\\<^sub>L_rexp_of'_rexp_of''[symmetric]\nby (rule lang\\<^sub>M\\<^sub>2\\<^sub>L_rexp_of')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma preserves_local_guarantee_compliance_def2:\n \"preserves_local_guarantee_compliance \\ \\\n \\c\\<^sub>A mds\\<^sub>A mem\\<^sub>A c\\<^sub>C mds\\<^sub>C mem\\<^sub>C.\n abs.respects_own_guarantees (c\\<^sub>A, mds\\<^sub>A) \\\n (\\c\\<^sub>A, mds\\<^sub>A, mem\\<^sub>A\\\\<^sub>A, \\c\\<^sub>C, mds\\<^sub>C, mem\\<^sub>C\\\\<^sub>C) \\ \\ \\\n conc.respects_own_guarantees (c\\<^sub>C, mds\\<^sub>C)\"", "output": "unfolding preserves_local_guarantee_compliance_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\\\<^sub>1_simps [simp]:\n assumes \"C.ide f\"\n shows \"D.arr (\\\\<^sub>1 f)\"\n and \"src\\<^sub>D (\\\\<^sub>1 f) = map\\<^sub>0 (C\\<^sub>U.P\\<^sub>0 (src\\<^sub>C f))\" and \"trg\\<^sub>D (\\\\<^sub>1 f) = map\\<^sub>0 (trg\\<^sub>C f)\"\n and \"D.dom (\\\\<^sub>1 f) = F f \\\\<^sub>D \\\\<^sub>0 (src\\<^sub>C f)\" and \"D.cod (\\\\<^sub>1 f) = \\\\<^sub>0 (trg\\<^sub>C f) \\\\<^sub>D F (C\\<^sub>U.P f)\"", "output": "using assms \\\\<^sub>1_in_hom\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma update_simps[simp]:\n \"\\\\<^sub>i\\<^sub>u (\\\\<^sub>i\\<^sub>u_update up s) = up (\\\\<^sub>i\\<^sub>u s)\"\n \"\\\\<^sub>i\\<^sub>l (\\\\<^sub>i\\<^sub>u_update up s) = \\\\<^sub>i\\<^sub>l s\"\n \"\\ (\\\\<^sub>i\\<^sub>u_update up s) = \\ s\"\n \"\\ (\\\\<^sub>i\\<^sub>u_update up s) = \\ s\"\n \"\\ (\\\\<^sub>i\\<^sub>u_update up s) = \\ s\"\n \"\\\\<^sub>c (\\\\<^sub>i\\<^sub>u_update up s) = \\\\<^sub>c s\"\n \"\\\\<^sub>i\\<^sub>l (\\\\<^sub>i\\<^sub>l_update up s) = up (\\\\<^sub>i\\<^sub>l s)\"\n \"\\\\<^sub>i\\<^sub>u (\\\\<^sub>i\\<^sub>l_update up s) = \\\\<^sub>i\\<^sub>u s\"\n \"\\ (\\\\<^sub>i\\<^sub>l_update up s) = \\ s\"\n \"\\ (\\\\<^sub>i\\<^sub>l_update up s) = \\ s\"\n \"\\ (\\\\<^sub>i\\<^sub>l_update up s) = \\ s\"\n \"\\\\<^sub>c (\\\\<^sub>i\\<^sub>l_update up s) = \\\\<^sub>c s\"\n \"\\ (\\_update V s) = V\"\n \"\\\\<^sub>i\\<^sub>l (\\_update V s) = \\\\<^sub>i\\<^sub>l s\"\n \"\\\\<^sub>i\\<^sub>u (\\_update V s) = \\\\<^sub>i\\<^sub>u s\"\n \"\\ (\\_update V s) = \\ s\"\n \"\\ (\\_update V s) = \\ s\"\n \"\\\\<^sub>c (\\_update V s) = \\\\<^sub>c s\"\n \"\\ (\\_update T s) = T\"\n \"\\\\<^sub>i\\<^sub>l (\\_update T s) = \\\\<^sub>i\\<^sub>l s\"\n \"\\\\<^sub>i\\<^sub>u (\\_update T s) = \\\\<^sub>i\\<^sub>u s\"\n \"\\ (\\_update T s) = \\ s\"\n \"\\ (\\_update T s) = \\ s\"\n \"\\\\<^sub>c (\\_update T s) = \\\\<^sub>c s\"", "output": "by (atomize(full), cases s, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pivot_valuation_id: \"\\\\ (\\ s); x\\<^sub>i \\ lvars (\\ s); x\\<^sub>j \\ rvars_of_lvar (\\ s) x\\<^sub>i\\ \\ \\ (pivot x\\<^sub>i x\\<^sub>j s) = \\ s\"", "output": "using pivot_id\nby (simp add: Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_M_Mdocument_preserved7 [simp]: \n \"h \\ put_M\\<^sub>E\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t element_ptr setter v \\\\<^sub>h h' \\ preserved (get_M\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t document_ptr getter) h h'\"", "output": "by(auto simp add: ElementMonad.put_M_defs get_M_defs preserved_def split: option.splits dest: get_heap_E)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_o_shift: \"lift k \\ (V\\<^sub>M\\<^sub>L 0 ## \\) = (V\\<^sub>M\\<^sub>L 0 ## (lift k \\ \\))\"", "output": "by(rule ext)(simp add: lift_lift_ML_comm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_element_tag_name:\n assumes \"h \\ new_element \\\\<^sub>h h'\"\n assumes \"h \\ new_element \\\\<^sub>r new_element_ptr\"\n shows \"h' \\ get_M new_element_ptr tag_name \\\\<^sub>r ''''\"", "output": "using assms\nby(auto simp add: get_M_defs new_element_def new\\<^sub>E\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t_def Let_def split: option.splits prod.splits elim!: bind_returns_result_E bind_returns_heap_E)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lens_member_override: \"x \\\\<^sub>S A \\ s\\<^sub>1 \\\\<^sub>S s\\<^sub>2 on A \\\\<^sub>L s\\<^sub>3 on x = s\\<^sub>1 \\\\<^sub>S (s\\<^sub>2 \\\\<^sub>L s\\<^sub>3 on x) on A\"", "output": "using lens_member_def\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonneg_Reals_add_I [simp]: \"\\a \\ \\\\<^sub>\\\\<^sub>0; b \\ \\\\<^sub>\\\\<^sub>0\\ \\ a + b \\ \\\\<^sub>\\\\<^sub>0\"", "output": "apply (simp add: nonneg_Reals_def)\napply clarify\napply (rename_tac r s)\napply (rule_tac x=\"r+s\" in exI, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rreqs_increase:\n \"paodv i \\\\<^sub>A onll \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V (\\((\\, _), _, (\\', _)). rreqs \\ \\ rreqs \\')\"", "output": "by (inv_cterms simp add: subset_insertI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cat_smc_is_epic_arr[slicing_simps]: \n \"f : a \\\\<^sub>e\\<^sub>p\\<^sub>i\\<^bsub>cat_smc \\\\<^esub> b \\ f : a \\\\<^sub>e\\<^sub>p\\<^sub>i\\<^bsub>\\\\<^esub> b\"", "output": "unfolding is_epic_arr_def slicing_simps op_smc_def\nby (simp add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_M_Mdocument_preserved7 [simp]: \n \"h \\ put_M\\<^sub>E\\<^sub>l\\<^sub>e\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t element_ptr setter v \\\\<^sub>h h' \\ preserved (get_M\\<^sub>D\\<^sub>o\\<^sub>c\\<^sub>u\\<^sub>m\\<^sub>e\\<^sub>n\\<^sub>t document_ptr getter) h h'\"", "output": "by(auto simp add: ElementMonad.put_M_defs get_M_defs preserved_def split: option.splits dest: get_heap_E)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma decomps\\<^sub>e\\<^sub>s\\<^sub>t_decomp_rm\\<^sub>e\\<^sub>s\\<^sub>t_empty: \"D \\ decomps\\<^sub>e\\<^sub>s\\<^sub>t M N \\ \\ decomp_rm\\<^sub>e\\<^sub>s\\<^sub>t D = []\"", "output": "by (induct D rule: decomps\\<^sub>e\\<^sub>s\\<^sub>t.induct) (auto simp add: decomp_rm\\<^sub>e\\<^sub>s\\<^sub>t_append)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_in_hom [intro]:\n assumes \"C.ide f\"\n shows \"\\\\ f : G f \\\\<^sub>D \\\\<^sub>0 (trg\\<^sub>C f) \\\\<^sub>D F f \\\\<^sub>D \\\\<^sub>0 (src\\<^sub>C f)\\\"", "output": "unfolding \\_def\nusing assms\nby (intro D.comp_in_homI' D.hseqI') auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonpos_Ints_subset_nonpos_Reals: \"\\\\<^sub>\\\\<^sub>0 \\ \\\\<^sub>\\\\<^sub>0\"", "output": "by (metis nonpos_Ints_cases nonpos_Ints_nonpos nonpos_Ints_of_int nonpos_Reals_of_real_iff of_real_of_int_eq subsetI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma composition_conseq2ts: \"(ts \\\\<^sub>t\\<^sub>s \\\\<^sub>1) \\\\<^sub>t\\<^sub>s \\\\<^sub>2 = ts \\\\<^sub>t\\<^sub>s (\\\\<^sub>1 \\ \\\\<^sub>2)\"", "output": "using composition_conseq2t\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \" (\\\\<^sub>1,\\\\<^sub>1') \\ (X\\<^sub>P\\<^sub>e\\<^sub>r\\<^sub>s\\<^sub>o\\<^sub>n2 .oclIsMaintained())\"", "output": "by(simp add: OclValid_def OclIsMaintained_def \\\\<^sub>1_def \\\\<^sub>1'_def X\\<^sub>P\\<^sub>e\\<^sub>r\\<^sub>s\\<^sub>o\\<^sub>n2_def person2_def oid0_def oid1_def oid2_def oid3_def oid4_def oid5_def oid6_def oid_of_option_def oid_of_type\\<^sub>P\\<^sub>e\\<^sub>r\\<^sub>s\\<^sub>o\\<^sub>n_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cf_smcf_cf_proj_snd[slicing_commute]: \n \"\\\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>.\\<^sub>2 (cat_smc \\) (cat_smc \\) = cf_smcf (\\\\<^sub>C\\<^sub>.\\<^sub>2 \\ \\)\"", "output": "unfolding cf_proj_snd_def smcf_proj_snd_def slicing_commute[symmetric] if_distrib .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma hoareQ_Seq_assoc: \"\\\\<^sub>2\\<^sub>' {P} A;; B;; C {Q} = (\\\\<^sub>2\\<^sub>' {P} A;; (B;; C) {Q})\"", "output": "by(auto simp: hoare2o_valid_def hoareQ_sound_complete Seq_t_assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rt_fresher_def':\n \"(rt\\<^sub>1 \\\\<^bsub>i\\<^esub> rt\\<^sub>2) = (nsqn\\<^sub>r (the (rt\\<^sub>1 i)) < nsqn\\<^sub>r (the (rt\\<^sub>2 i)) \\\n nsqn\\<^sub>r (the (rt\\<^sub>1 i)) = nsqn\\<^sub>r (the (rt\\<^sub>2 i)) \\ \\\\<^sub>5 (the (rt\\<^sub>2 i)) \\ \\\\<^sub>5 (the (rt\\<^sub>1 i)))\"", "output": "unfolding rt_fresher_def fresher_def\nby (rule refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lang\\<^sub>M\\<^sub>2\\<^sub>L_norm[simp]: \"lang\\<^sub>M\\<^sub>2\\<^sub>L n (norm \\) = lang\\<^sub>M\\<^sub>2\\<^sub>L n \\\"", "output": "unfolding lang\\<^sub>M\\<^sub>2\\<^sub>L_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_trm_subst_inv: \"wf\\<^sub>t\\<^sub>r\\<^sub>m (t \\ \\) \\ wf\\<^sub>t\\<^sub>r\\<^sub>m t\"", "output": "unfolding wf\\<^sub>t\\<^sub>r\\<^sub>m_def\nby (induct t) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cf_ntcf_comp_is_tm_ntcf'[cat_small_cs_intros]:\n assumes \"\\ : \\ \\\\\\<^sub>C\\<^sub>.\\<^sub>t\\<^sub>m\\<^bsub>\\\\<^esub> \\\" \n and \"\\ : \\ \\\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>t\\<^sub>m \\ : \\ \\\\\\<^sub>C\\<^sub>.\\<^sub>t\\<^sub>m\\<^bsub>\\\\<^esub> \\\"\n and \"\\' = \\ \\\\<^sub>C\\<^sub>F \\\"\n and \"\\' = \\ \\\\<^sub>C\\<^sub>F \\\"\n shows \"\\ \\\\<^sub>C\\<^sub>F\\<^sub>-\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F \\ : \\' \\\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>t\\<^sub>m \\' : \\ \\\\\\<^sub>C\\<^sub>.\\<^sub>t\\<^sub>m\\<^bsub>\\\\<^esub> \\\"", "output": "using assms(1,2) unfolding assms(3,4)\nby (rule cf_ntcf_comp_is_tm_ntcf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma indom_mI: \\fmlookup m x = Some y \\ x \\# dom_m m\\", "output": "by (drule fmdomI) (auto simp: dom_m_def fmember.rep_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma normalized_n_primitive_imp_not_disc_negated:\n \"wf_disc_sel (disc,sel) C \\ normalized_n_primitive (disc,sel) f m \\ \\ has_disc_negated disc False m\"", "output": "apply(induction \"(disc,sel)\" f m rule: normalized_n_primitive.induct)\nby(simp add: wf_disc_sel.simps split: if_split_asm)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma root_hash_G_unfold:\n \"root_hash_G rha rhb = G\\<^sub>h \\ root_hash_F (root_hash_T rha) rhb \\ the_G\\<^sub>m\"", "output": "apply(rule ext) subgoal for x\nby(cases x)(simp add: root_hash_G_def fun_eq_iff root_hash_F_def root_hash_T_def F\\<^sub>m.map_comp T\\<^sub>m.map_comp o_def T\\<^sub>h.map_id id_def[symmetric]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma know2knows_s: \nassumes \"know A (sKS m)\"\nshows \"knows A [sE m]\"", "output": "using assms\nby (metis KS2Expression.simps(2) know1s)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma op_hnr[sepref_fr_rules]: \n assumes PURE: \"CONSTRAINT (IS_PURE PRES_ZERO_UNIQUE) A\"\n shows \"(amtx_pointwise_unnop_fold_impl1 N M fi, RETURN \\ PR_CONST (mtx_pointwise_unop f)) \\ (amtx_assn N M A)\\<^sup>d \\\\<^sub>a amtx_assn N M A\"", "output": "unfolding PR_CONST_def\napply (rule hfref_weaken_pre'[OF _ amtx_pointwise_unnop_fold_impl1.refine[OF this_loc PURE,FCOMP opr_fold_impl_refine]])\nby (simp add: amtx_assn_bounded[OF PURE])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma det_row_minus: \"det (upd_row M i (a - b)) = det (upd_row M i a) - det (upd_row M i b)\"", "output": "unfolding diff_conv_add_uminus det_row_add det_row_uminus .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in gram_schmidt_fs_Rn) det_M_1: \"det (M m) = 1\"", "output": "proof - have \"det (M m) = prod_list (diag_mat (M m))\"\nby (rule det_lower_triangular[of m], auto simp: \\.simps) also have \"\\ = 1\"\nby (rule prod_list_neutral, auto simp: diag_mat_def \\.simps) finally show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma enat_diff_cancel_left: \"\\ m \\ x; m \\ y \\ \\ x - m = y - m \\ x = (y :: enat)\"", "output": "by(cases x y m rule: enat.exhaust[case_product enat.exhaust[case_product enat.exhaust]])(simp_all, arith)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minus_mult_distrib_mat[algebra_simps]: fixes A :: \"'a :: ring mat\"\n assumes m: \"A \\ carrier_mat nr n\" \"B \\ carrier_mat nr n\" \"C \\ carrier_mat n nc\"\n shows \"(A - B) * C = A * C - B * C\"", "output": "unfolding minus_add_uminus_mat[OF m(1,2)] add_mult_distrib_mat[OF m(1) uminus_carrier_mat[OF m(2)] m(3)]\nby (subst uminus_mult_left_mat, insert m, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assert_D : \"(\\ \\ (x \\ assert\\<^sub>S\\<^sub>E P; M x)) \\ P \\ \\ (\\ \\ (M True))\"", "output": "by(auto simp: bind_SE_def assert_SE_def valid_SE_def split: HOL.if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma slp_of_fa_code[code]:\n \"slp_of_fa fa M slp = (let (M, slp', _) = slp_of_fa_rev fa M (rev slp) (length slp) in (M, rev slp'))\"", "output": "using slp_of_fa_rev[of fa M \"rev slp\"]\nby (auto split: prod.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cfm:\"f O m \\ m\"", "output": "proof fix x::\"'a\\'a\" assume \"x \\ f O m\" then obtain p q z where x:\"x = (p,q)\" and 1:\"(p,z) \\ f\" and 2:\"(z,q) \\ m\"\nby auto from 1 obtain u where pu:\"p\\u\" and zu:\"z\\u\"\nusing f\nby auto with 2 have \"(p,q) \\ m\"\nusing M1 m\nby blast thus \"x\\ m\"\nusing x\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma static_mthd_simp[simp]: \"static (mthd m) = is_static m\"", "output": "by (cases m) (simp add: mthd_def member_is_static_simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat_det_12_mm_r [simp]:\n shows \"mat_det_12 (A *\\<^sub>m\\<^sub>m M) (B *\\<^sub>m\\<^sub>m M) = mat_det M * mat_det_12 A B\"", "output": "by (cases M, cases A, cases B) (simp add: field_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lubmap_const_bottom[simp]:\n \"(\\ k\\v\\m. \\) = (\\::'a::Join_cpo)\"", "output": "by (cases \"m = Map.empty\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"\\\\ {\\}\n \\I :== \\M;;\n ANNO \\. \\\\. \\I = \\<^bsup>\\\\<^esup>M\\\n \\M :== \\N;; \\N :== \\I\n \\\\M = \\<^bsup>\\\\<^esup>N \\ \\N = \\<^bsup>\\\\<^esup>I\\\n \\\\M = \\<^bsup>\\\\<^esup>N \\ \\N = \\<^bsup>\\\\<^esup>M\\\"", "output": "apply vcg\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_inv_invertible:\n assumes \"invertible M\"\n shows \"invertible (matrix_inv M)\"", "output": "using \\invertible M\\ and matrix_inv unfolding invertible_def [of \"matrix_inv M\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma space_restrict_space: \"space (restrict_space M \\) = \\ \\ space M\"", "output": "using sets.sets_into_space unfolding restrict_space_def\nby (subst space_measure_of) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_nondetT_unfold: \n \"\\m m'. rel_nondetT M (NondetT m) m' \\ (\\m''. m' = NondetT m'' \\ M m m'')\"\n \"\\m m'. rel_nondetT M m (NondetT m') \\ (\\m''. m = NondetT m'' \\ M m'' m')\"", "output": "subgoal for m m'\nby(cases m'; simp) subgoal for m m'\nby(cases m; simp) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hypnat_le_add_diff_inverse [simp]: \"\\m n::hypnat. n \\ m \\ n + (m - n) = m\"", "output": "by transfer (rule le_add_diff_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma STA_add: \\A, n \\ branch \\ A, m + n \\ branch\\", "output": "using STA_Suc\nby (induct m) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in sigma_finite_measure) density_RN_deriv:\n \"absolutely_continuous M N \\ sets N = sets M \\ density M (RN_deriv M N) = N\"", "output": "by (metis RN_derivI Radon_Nikodym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nn_integral_embed_measure':\n \"inj_on f (space M) \\ g \\ borel_measurable (embed_measure M f) \\\n nn_integral (embed_measure M f) g = nn_integral M (\\x. g (f x))\"", "output": "apply (subst embed_measure_eq_distr', simp)\napply (subst nn_integral_distr)\napply (simp_all add: measurable_embed_measure2') done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma density_cong: \"f \\ borel_measurable M \\ f' \\ borel_measurable M \\\n (AE x in M. f x = f' x) \\ density M f = density M f'\"", "output": "unfolding density_def\nby (auto intro!: measure_of_eq nn_integral_cong_AE sets.space_closed)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fail_state_parametric [transfer_rule]: \"(M ===> rel_stateT S M) fail_state fail_state\"", "output": "unfolding fail_state_def\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma monad_writer_readerT' [locale_witness]:\n \"monad_writer return (bind :: ('a, 'm) bind) (tell :: ('w, 'm) tell)\n \\ monad_writer return (bind :: ('a, ('r, 'm) envT) bind) (tell :: ('w, ('r, 'm) envT) tell)\"", "output": "unfolding return_envT_def bind_envT_def tell_envT_def\nby(rule monad_writer_envT)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fact_mono: \"m \\ n \\ fact m \\ (fact n :: 'a)\"", "output": "by (metis of_nat_fact of_nat_le_iff fact_mono_nat)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mtx_dflt_rl[sep_heap_rules]: \" amtx_dflt N M k \"", "output": "by (sep_auto simp: amtx_dflt_def is_amtx_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matcheq_matchNone_not_matches: \"matcheq_matchNone m \\ \\ matches \\ m p\"", "output": "by(induction m rule: matcheq_matchNone.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma None_measure_in_space_subprob_algebra [simp]:\n \"None_measure M \\ space (subprob_algebra M) \\ space M \\ {}\"", "output": "by(simp add: space_subprob_algebra subprob_space_None_measure_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma monad_prob_writerT' [locale_witness]:\n \"monad_prob return (bind :: ('a \\ 'w list, 'm) bind) (sample :: ('p, 'm) sample)\n \\ monad_prob return (bind :: ('a, ('w, 'a, 'm) writerT) bind) (sample :: ('p, ('w, 'a, 'm) writerT) sample)\"", "output": "unfolding return_writerT_def bind_writerT_def sample_writerT_def\nby(rule monad_prob_writerT)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unif_mono:\n assumes \"(E, E') \\ unif\"\n shows \"\\\\. (E + M, E' + subst_mset \\ M) \\ unif\"", "output": "using assms\nby (auto simp: unif_UNIF1_conv intro: UNIF1_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma less_power_add_imp_div_less [simp]:\n fixes i m n:: nat\n assumes \"i < 2^(m+n)\"\n shows \"i div 2^n < 2^m\"", "output": "using assms\nby (simp add: less_mult_imp_div_less power_add)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bool_lists_card: \"card {bl::bool list. length bl = m} = b^m\"", "output": "using card_lists_length_eq[of \"UNIV::bool set\"]\nby (simp add: b_val)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma RSpan_contains_spanset_single : \"m \\ M \\ m \\ RSpan [m]\"", "output": "using one_closed RSpan_single\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma phi_equiv_mapping_refl [simp]: \"uninst_code.phi_equiv_mapping ph g m m\"", "output": "unfolding uninst_code.phi_equiv_mapping_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmatch_list_typerr:\n \"length vs = length ps \\ fold2(\\p v m. case m of\n Match env \\ pmatch_single cenv s p v env \n | m \\ m) Match_type_error ps vs Match_type_error = Match_type_error\"", "output": "by (induction ps vs rule:List.list_induct2') auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ltake_ltake [simp]: \"ltake n (ltake m xs) = ltake (min n m) xs\"", "output": "by(coinduction arbitrary: n m xs)(auto 4 4 simp add: enat_min_eq_0_iff ltl_ltake)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma put_env_parametric [transfer_rule]:\n \"((S ===> M ===> M) ===> S ===> rel_envT R M ===> rel_envT R M) put_env put_env\"", "output": "unfolding put_env_def\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma compress_normalize_input_interfaces_hasdisc_negated:\n \"\\ has_disc_negated disc neg m \\ (\\a. \\ disc (IIface a)) \\ normalized_nnf_match m \\ compress_normalize_input_interfaces m = Some m' \\\n normalized_nnf_match m' \\ \\ has_disc_negated disc neg m'\"", "output": "unfolding compress_normalize_input_interfaces_def\nusing compress_normalize_primitive_hasdisc_negated[OF _ wf_disc_sel_common_primitive(5)]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "theorem inverse_monoid_isomorphism:\n \"monoid_isomorphism (restrict (inv_into M \\) M') M' (\\') \\' M (\\) \\\"", "output": "using commutes_with_composition commutes_with_unit surjective\nby unfold_locales auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma orbit_contains_rep:\n assumes m:\"m \\ M\"\n shows \"m \\ orbit m\"", "output": "unfolding orbit_def\nusing assms\nby (metis equiv_class_self same_orbit_is_equiv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat_inv_cnj:\n shows \"mat_cnj (mat_inv M) = mat_inv (mat_cnj M)\"", "output": "unfolding mat_cnj_def\nby (cases M) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma a_star_redu_AndL1_elim:\n assumes a: \"AndL1 (x).M y \\\\<^sub>a* R\"\n shows \"\\M'. R = AndL1 (x).M' y \\ M \\\\<^sub>a* M'\"", "output": "using a\napply(induct set: rtranclp)\napply(auto)\napply(drule a_redu_AndL1_elim)\napply(auto simp add: alpha trm.inject) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma replicate_pmf_distrib:\n \"replicate_pmf (m + n) p =\n do {xs \\ replicate_pmf m p; ys \\ replicate_pmf n p; return_pmf (xs @ ys)}\"", "output": "by (induction m) (simp_all add: bind_return_pmf bind_return_pmf' bind_assoc_pmf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma degree_aform_approx_bin:\n assumes \"approx_bin p ivl X Y = Some Z\"\n assumes \"degree_aform (fst X) \\ m\"\n assumes \"degree_aform (fst Y) \\ m\"\n shows \"degree_aform (fst Z) \\ m\"", "output": "using assms\nby (auto simp: approx_bin_def bind_eq_Some_conv Basis_list_real_def intro!: order_trans[OF degree_aform_independent_from] order_trans[OF degree_aform_of_ivl])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_add_right_dom_eq:\n \"\\ m\\<^sub>0 ++ m\\<^sub>1 = m\\<^sub>0' ++ m\\<^sub>1'; dom m\\<^sub>1 = dom m\\<^sub>1' \\ \\ m\\<^sub>1 = m\\<^sub>1'\"", "output": "unfolding map_add_def\nby (rule ext, rule ccontr, drule_tac x=x in fun_cong, clarsimp split: option.splits, drule sym, drule sym, force+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sip_not_ip':\n \"paodv i \\ (recvmsg (\\m. not_Pkt m \\ msg_sender m \\ i) \\) onl \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V (\\(\\, _). sip \\ \\ ip \\)\"", "output": "by (inv_cterms inv add: onl_invariant_sterms [OF aodv_wf received_msg_inv] onl_invariant_sterms [OF aodv_wf ip_constant [THEN invariant_restrict_inD]] simp add: clear_locals_sip_not_ip') clarsimp+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sets_K[measurable_cong]: \"x \\ space M \\ sets (K x) = sets M\"", "output": "using K unfolding prob_algebra_def unfolding measurable_restrict_space2_iff\nby (auto dest: subprob_measurableD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma normalize_src_ips_normalized_n_primitive: \"normalized_nnf_match m \\ \n \\m' \\ set (normalize_src_ips m). normalized_src_ips m'\"", "output": "unfolding normalize_src_ips_def unfolding normalized_src_ips_def2\napply(rule normalize_primitive_extract_normalizes_n_primitive[OF _ wf_disc_sel_common_primitive(3)])\nby(simp_all add: ipt_iprange_compress_normalized_IpAddrNetmask)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in carrier) compl_open_closed:\n assumes mopen: \"m open\"\n shows \"(carrier - m) closed\"", "output": "proof (rule closedI) from mopen have \"m \\ carrier\"\nby auto hence \"carrier - (carrier - m) = m\"\nby (simp add: double_diff) thus \"carrier - (carrier - m) open\"\nusing mopen\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma M_self_inverse: \"M ** M = mat 1\"", "output": "unfolding M_def and matrix_matrix_mult_def and mat_def and vector_def\nby (simp add: sum_3 vec_eq_iff forall_3)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cr_envT_stateT_return [cr_envT_stateT_transfer]:\n notes [transfer_rule] = cr_envT_stateT_transfer shows\n \"((cr_prod1 s A ===> M) ===> A ===> cr_envT_stateT s M) return_env return_state\"", "output": "unfolding return_env_def return_state_def\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in state_space) shows \"\\\\ \\True\\\n \\N \\ n. \\N :== \\N + 1 \\\n \\M \\ m. \\M :== \\M + 1 \\\n \\R :== n + m\n \\\\R = \\N + \\M - 2\\\"", "output": "apply vcg\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma None_set_Int2:\n assumes \"B \\ None_sets M\" \"A \\ sets M\" shows \"B \\ A \\ None_sets M\"", "output": "using assms\nby (subst Int_commute) (rule None_set_Int1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma order_finite_set_obtain_foundation:\n fixes t :: \"_ :: order\"\n assumes \"finite M\"\n and \"t \\ M\"\n obtains s where \"s \\ M\" \"s \\ t\" \"\\u\\M. \\ u < s\"", "output": "using assms order_finite_set_exists_foundation\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma replicate_mset_lt_iff_lt[simp]: \"replicate_mset m x < replicate_mset n x \\ m < n\"", "output": "by (induct n m rule: diff_induct) (auto intro: subset_mset.gr_zeroI gr_zeroI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmeasurable_Int_fmeasurable:\n \"\\S \\ fmeasurable M; T \\ sets M\\ \\ (S \\ T) \\ fmeasurable M\"", "output": "by (meson fmeasurableD fmeasurableI2 inf_le1 sets.Int)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmrestrict_set_add_distrib[simp]:\n \"fmrestrict_set A (m ++\\<^sub>f n) = fmrestrict_set A m ++\\<^sub>f fmrestrict_set A n\"", "output": "unfolding fmfilter_alt_defs\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mod_0_div_mult_cancel: \"(n mod (m::nat) = 0) = (n div m * m = n)\"", "output": "apply (insert eq_diff_left_iff[OF mod_le_dividend le0, of n m])\napply (simp add: mult.commute minus_mod_eq_mult_div [symmetric]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma word_of_nat_less_iff:\n \\word_of_nat m < (word_of_nat n :: 'a::len word) \\ take_bit LENGTH('a) m < take_bit LENGTH('a) n\\", "output": "by transfer (simp add: take_bit_of_nat)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_shift_times_monom_ge: \n \"n \\ m \\ poly_shift n (monom c m * p) = smult c (poly_shift (n - m) p)\"", "output": "by (intro poly_eqI) (auto simp: coeff_monom_mult coeff_poly_shift)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_pmf_return_pmf2: \"rel_pmf R M (return_pmf x) \\ (\\a\\M. R a x)\"", "output": "by (subst pmf.rel_flip[symmetric]) (simp add: rel_pmf_return_pmf1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmeasurableI2: \"A \\ fmeasurable M \\ B \\ A \\ B \\ sets M \\ B \\ fmeasurable M\"", "output": "using emeasure_mono[of B A M]\nby (auto simp: fmeasurable_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gt_0_lt_mult_gt_1_hmset:\n fixes m n :: hmultiset\n assumes \"m > 0\" and \"n > 1\"\n shows \"m < m * n\"", "output": "using assms\nby (metis mult.right_neutral mult_less_cancel1_hmset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma monad_optionT' [locale_witness]:\n \"monad return (bind :: ('a option, 'm) bind)\n \\ monad return (bind :: ('a, ('a, 'm) optionT) bind)\"", "output": "unfolding return_optionT_def bind_optionT_def\nby(rule monad_optionT)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hypnat_le_add_diff_inverse2 [simp]: \"\\m n::hypnat. n \\ m \\ (m - n) + n = m\"", "output": "by transfer (rule le_add_diff_inverse2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmlookup_filter[simp]: \"fmlookup (fmfilter P m) x = (if P x then fmlookup m x else None)\"", "output": "by transfer' (auto simp: map_filter_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma measurable_count_space_eq2_countable:\n fixes f :: \"'a => 'c::countable\"\n shows \"f \\ measurable M (count_space A) \\ (f \\ space M \\ A \\ (\\a\\A. f -` {a} \\ space M \\ sets M))\"", "output": "by (intro measurable_count_space_eq_countable countableI_type)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exists_upto_of_nat:\n \"exists_upto p (of_nat n) as \\ (\\m0_def lookup_single)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma space_eq_univ [simp]: \"space M = UNIV\"", "output": "using M_is_borel[THEN sets_eq_imp_space_eq]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path2_nontriv[elim]: \"\\g \\ n-ns\\m; n \\ m\\ \\ length ns > 1\"", "output": "by (metis hd_Cons_tl last_appendR last_snoc length_greater_0_conv length_tl path2_def path_not_Nil zero_less_diff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AE_E3:\n assumes \"AE x in M. P x\"\n obtains N where \"\\x. x \\ space M - N \\ P x\" \"N \\ None_sets M\"", "output": "using assms unfolding eventually_ae_filter\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cart_product_add_1_filter2: \"{#m \\# (M \\# (add_mset b N)) . P m #} = \n {#m \\# (M \\# N) . P m #} + {#m \\# (M \\# {#b#}) . P m #}\"", "output": "unfolding add_mset_add_single [of b N] Sigma_mset_plus_distrib1\nby (metis Times_insert_left Times_mset_single_right add_mset_add_single filter_union_mset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_sum_replicate [simp]: \"\\_sum (replicate m a) = \\ \\ a * ord_of_nat m\"", "output": "by (induction m) (auto simp: mult_succ simp flip: replicate_append_same)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma helperX1_Empty: \"matches \\ m' Empty p \\ \n approximating_bigstep_fun \\ p (map ((\\m. Rule m Empty) \\ MatchAnd m') m2' @ rs2) Undecided =\n approximating_bigstep_fun \\ p rs2 Undecided\"", "output": "by(induction m2')(simp_all split: action.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma size_Diff_submset:\n \"M \\# M' \\ size (M' - M) = size M' - size(M::'a multiset)\"", "output": "by (metis add_diff_cancel_left' size_union mset_subset_eq_exists_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in monoid) nat_pow_pow:\n \"x \\ carrier G ==> (x [^] n) [^] m = x [^] (n * m::nat)\"", "output": "by (induct m) (simp, simp add: nat_pow_mult add.commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eout_knows_nonKS_s:\n assumes h1:\"m \\ specSecrets A\"\n and h2:\"eout A (sE m)\"\n and h3:\"eoutKnowsECorrect A (sE m)\"\n shows \"knows A [sE m]\"", "output": "using assms\nby (metis Expression.distinct(1) Expression.inject(2) eoutKnowsECorrect_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hm_delete_rule: \n \" hm_delete k ht \"", "output": "unfolding is_hashmap_def[of m]\nby (sep_auto heap add: hm_delete_rule')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma distinct_set_mset_eq:\n assumes \"distinct_mset M\" \"distinct_mset N\" \"set_mset M = set_mset N\"\n shows \"M = N\"", "output": "using assms distinct_mset_set_mset_ident\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fct_gen_subalgebra_eq_sets:\n assumes \"sets M = sets P\"\n shows \"fct_gen_subalgebra M N X = fct_gen_subalgebra P N X\"", "output": "proof - have \"space M = space P\"\nusing sets_eq_imp_space_eq assms\nby auto thus ?thesis unfolding fct_gen_subalgebra_def gen_subalgebra_def\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abc_list_crsp_simp4[simp]: \"\\abc_list_crsp lma lmb; \\ m < length lma; \\ m < length lmb\\ \\ \n abc_list_crsp (lma @ 0 \\ (m - length lma) @ [n]) (lmb @ 0 \\ (m - length lmb) @ [n])\"", "output": "by(auto simp: abc_list_crsp_def list_update_append replicate_merge_anywhere)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma canonical_empty_zone_spec:\n assumes \"canonical M n\"\n shows \"[M]\\<^bsub>v,n\\<^esub> = {} \\ (\\i\\n. M i i < \\)\"", "output": "using canonical_empty_zone[of n v M, OF _ _ assms] clock_numbering\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma forget:\n shows \"x\\M \\ M{x:=.P} = M\"\n and \"c\\M \\ M{c:=(x).P} = M\"", "output": "apply(nominal_induct M avoiding: x c P rule: trm.strong_induct)\napply(auto simp add: fresh_atm abs_fresh abs_supp fin_supp) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ask_option_parametric [transfer_rule]:\n \"(((R ===> M) ===> M) ===> (R ===> rel_optionT M) ===> rel_optionT M) ask_option ask_option\"", "output": "unfolding ask_option_def\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filter_set_insert[simp]: \"filter_set m (insert x A) t = (let m' = filter_set m A t in\n case Mapping.lookup m' x of Some u \\ if t = u then Mapping.delete x m' else m' | _ \\ m')\"", "output": "unfolding filter_set_def\nby transfer (auto simp: fun_eq_iff Let_def Map_To_Mapping.map_apply_def split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fold_mset_insort[simp]: \"fold (\\x M. M + mset (f x)) (insort x xs) M =\n fold (\\x M. M + mset (f x)) xs (mset (f x) + M)\"", "output": "by (induct xs arbitrary: M) (auto simp: ac_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_set_list: \n assumes \"mat nr nc M\" \n and \"length v = k\"\n and \" x \\ set M\" \n shows \"\\ys.\\zs.(ys@x#zs = M)\"", "output": "using assms set_def in_set_conv_decomp\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma smap_union_empty1[simp]: \"{}. \\. m = m\"", "output": "by(rule ext, auto simp add:smap_union_def smap_empty_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pause_writer_parametric [transfer_rule]:\n \"((Out ===> (In ===> M) ===> M) ===> Out ===> (In ===> rel_writerT W A M) ===> rel_writerT W A M)\n pause_writer pause_writer\"", "output": "unfolding pause_writer_def\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma VRMWWrite:\n \"\\cond (\\(t\\m a)); \n \\' = \\(t\\ret (m a) (f(\\(t\\m a))));\n m' = m(a:= f(\\(t\\m a)));\n ghst = (\\, \\, \\, \\); \n ghst' = (False,\\ \\ A - R, \\, \\ \\\\<^bsub>W\\<^esub> R \\\\<^bsub>A\\<^esub> L)\\ \n \\ \n (RMW a t (D,f) cond ret A L R W# is, \\, x, m, ghst) \\\\<^sub>v (is, \\',x, m' , ghst')\"", "output": "apply (simp add: virtual_memop_step.RMWWrite) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Module) mHom_eq:\"\\R module N; f \\ mHom R M N; g \\ mHom R M N; \n \\m\\carrier M. f m = g m\\ \\ f = g\"", "output": "apply (simp add:mHom_def aHom_def)\napply (erule conjE)+\napply (rule funcset_eq, assumption+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma congruence_congruence_inv [simp]:\n assumes \"mat_det M \\ 0\"\n shows \"congruence M (congruence (mat_inv M) H) = H\"", "output": "using assms congruence_congruence[of M \"mat_inv M\" H]\nusing mat_inv_l[of M] mat_eye_l mat_eye_r unfolding congruence_def\nby (simp del: eye_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_nn_integral_mono:\n assumes \"\\x. x \\ space M \\ A \\ f x \\ g x\"\n shows \"set_nn_integral M A f \\ set_nn_integral M A g\"", "output": "using assms\nby (intro nn_integral_mono) (auto simp: indicator_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wm_to_state_works_for_wf_wm_closed:\n \"wf_world_model M \\ fmla\\close_world M \\ close_eq (wm_to_state M) \\ fmla\"", "output": "apply (cases fmla rule: wf_fmla_atom.cases)\nby (auto simp: wf_world_model_def close_eq_def wm_to_state_def close_world_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma word_diff_less:\n fixes n :: \"'a :: len word\"\n shows \"\\0 < n; 0 < m; n \\ m\\ \\ m - n < m\"", "output": "apply (subst word_less_nat_alt)\napply (subst unat_sub)\napply assumption\napply (rule diff_less)\napply (simp_all add: word_less_nat_alt) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sees_methods_idemp:\n assumes \"P \\ C sees_methods Mm\" and \"Mm M = Some(m,D)\"\n shows \"\\Mm'. (P \\ D sees_methods Mm') \\ Mm' M = Some(m,D)\"", "output": "using assms\nby(induct arbitrary: m D)(fastforce dest: Methods.intros)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sets_stream_space_cong[measurable_cong]:\n \"sets M = sets N \\ sets (stream_space M) = sets (stream_space N)\"", "output": "using sets_eq_imp_space_eq[of M N]\nby (simp add: stream_space_def vimage_algebra_def cong: sets_PiM_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_filter_finite[intro]:\n assumes \"finite (dom m)\"\n shows \"finite (dom (map_filter P m))\"", "output": "proof - have \"dom (map_filter P m) = Set.filter P (dom m)\" unfolding map_filter_def Set.filter_def dom_def\nby auto then show ?thesis\nusing assms\nby (simp add: Set.filter_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sequence_parametric [transfer_rule]:\n \"((M ===> (A ===> M) ===> M) ===> list_all2 M ===> (list_all2 A ===> M) ===> M) monad_base.sequence monad_base.sequence\"", "output": "unfolding monad_base.sequence_def[abs_def]\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in finite_measure) finite_measure_Union:\n assumes sets: \"A \\ sets M\" \"B \\ sets M\" and \"A \\ B = {}\"\n shows \"measure M (A \\ B) = measure M A + measure M B\"", "output": "using measure_Union[OF _ _ assms]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ldropn_inf_llist [simp]:\n \"ldropn n (inf_llist f) = inf_llist (\\m. f (m + n))\"", "output": "unfolding inf_llist_def ldropn_lmap ldropn_iterates\nby(simp add: iterates_conv_inf_llist o_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lead_monom_geI [intro]:\n assumes \"coeff p m \\ 0\"\n shows \"m \\ lead_monom p\"", "output": "using assms\nby (auto simp: lead_monom_def coeff_def in_keys_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Inf_between_alt:\n \"Inf_between N M = {\\ \\ Inf. \\ \\ Inf_from (N \\ M) \\ set (prems_of \\) \\ M \\ {}}\"", "output": "unfolding Inf_from_def Inf_between_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in cpx_sq_mat) proj_measurement_proj:\n assumes \"proj_measurement p M\"\nand \"i < p\"\nshows \"projector (meas_outcome_prj (M i))\"", "output": "using assms unfolding proj_measurement_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invariant_iff:\n \"invariant M \\ (\\x\\M. flow0 x ` (existence_ivl0 x)) \\ M\"", "output": "unfolding invariant_iff_pos_and_neg_invariant positively_invariant_iff negatively_invariant_iff\nby (metis (mono_tags) SUP_le_iff invariant_def invariant_iff_pos_and_neg_invariant negatively_invariant_iff positively_invariant_iff trapped_iff_on_existence_ivl0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma p_collinear_p_isometry_pt [simp]: \n shows \"p_collinear (p_isometry_pt M ` A) \\ p_collinear A\"", "output": "proof- have *: \"\\ M A. ((\\x. moebius_pt M (conjugate x)) ` A = moebius_pt M ` (conjugate ` A))\"\nby auto show ?thesis\nby transfer (auto simp add: unit_disc_fix_f_def *)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma emeasure_mono:\n \"a \\ b \\ b \\ sets M \\ emeasure M a \\ emeasure M b\"", "output": "by (metis zero_le sets.additive_increasing emeasure_additive emeasure_notin_sets emeasure_positive increasingD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma density_None_measure[simp]: \"density (None_measure M) f = None_measure M\"", "output": "proof (intro measure_eqI) fix A show \"emeasure (density (None_measure M) f) A = emeasure (None_measure M) A\"\nby (simp add: density_def) (simp only: None_measure_def[symmetric] emeasure_None_measure)\nqed simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in finite_measure) finite_measure_eq_AE:\n assumes iff: \"AE x in M. x \\ A \\ x \\ B\"\n assumes A: \"A \\ sets M\" and B: \"B \\ sets M\"\n shows \"measure M A = measure M B\"", "output": "using assms emeasure_eq_AE[OF assms]\nby (simp add: emeasure_eq_measure)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma timpl_closure_set_mono:\n assumes \"M \\ M'\" \"TI \\ TI'\"\n shows \"timpl_closure_set M TI \\ timpl_closure_set M' TI'\"", "output": "using assms(1) timpl_closure_mono[OF assms(2)] unfolding timpl_closure_set_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prob_space_restrict_space:\n \"S \\ sets M \\ emeasure M S = 1 \\ prob_space (restrict_space M S)\"", "output": "by (intro prob_spaceI) (simp add: emeasure_restrict_space space_restrict_space)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pairwise_imp_mult:\n assumes \"N \\ {#}\" and \"\\x \\ set_mset M. \\y \\ set_mset N. (x, y) \\ r\"\n shows \"(M, N) \\ mult r\"", "output": "using assms one_step_implies_mult[of _ _ _ \"{#}\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in -) rwof_leof_init: \"m \\\\<^sub>n SPEC (rwof m c f)\"", "output": "apply rule\nusing rwof.init\napply (fastforce simp: nofail_RES_conv) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma markedElementIsMarkedTrue: \n shows \"(m \\ set (markedElements M)) = ((m, True) \\ set M)\"", "output": "by (induct M) (auto split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma VDM_lowerm: \"\\ \\\\<^sub>n c:A; m \\ n \\ \\ \\\\<^sub>m c:A\"", "output": "apply (simp add: VDM_validn_def, clarsimp)\napply (erule_tac x=\"ma\" in allE, simp) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l3_dy_payload_refines_dy_fake_msg:\n \"M \\ payload \\\n {R23s \\ UNIV \\ l3_inv5} l2_dy_fake_msg M, l3_dy M {>R23s}\"", "output": "apply (auto simp add: PO_rhoare_defs R23s_defs)\napply (auto simp add: l3_defs l2_dy_fake_msg_def dest: l3_inv5D) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sets_tree_sigma_eq: \"sets (tree_sigma M) = sigma_sets (trees (space M)) (trees_cyl ` trees (sets M))\"", "output": "unfolding tree_sigma_def\nby (rule sets_measure_of) (rule trees_cyl_sets_in_space)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma less_log_of_power:\n assumes \"b ^ n < m\" \"1 < b\"\n shows \"n < log b m\"", "output": "proof - have \"0 < m\"\nby (metis assms less_trans zero_less_power zero_less_one) thus ?thesis\nusing assms\nby (simp add: less_log_iff powr_realpow)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_fin_silent_moves_RunningI:\n assumes \"silent_moves t (x, m) (x', m')\"\n shows \"\\trsys.silent_moves (init_fin t) init_fin_\\move ((Running, x), m) ((Running, x'), m')\"", "output": "using assms\nby(induct rule: rtranclp_induct2)(auto elim: rtranclp.rtrancl_into_rtrancl intro: init_fin_silent_move_RunningI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hmsetmset_le[simp]: \"hmsetmset M \\ hmsetmset N \\ M \\ N\"", "output": "unfolding le_less hmsetmset_less\nby (metis hmultiset.collapse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma decode_exp_shift:\n assumes \"aligned\\<^sub>d e M\"\n shows \"decode 0 M = base ^ e * decode e M\"", "output": "using assms\nby (induct e) (auto simp: decode_exp_shift_Suc dest: aligned\\<^sub>d_mono_exp_Suc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mulex_on_add_mset:\n assumes \"mulex_on P A M N\" and \"m \\ A\"\n shows \"mulex_on P A (add_mset m M) (add_mset m N)\"", "output": "unfolding add_mset_add_single[of m M] add_mset_add_single[of m N]\napply (rule mulex_on_union')\nusing assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma legendre_aux_set_eq:\n assumes \"prime p\" \"x \\ 1\"\n shows \"{m. m > 0 \\ real (p ^ m) \\ x} = {0<..nat \\log (real p) x\\}\"", "output": "using prime_gt_1_nat[OF assms(1)] assms\nby (auto simp: le_nat_iff le_log_iff le_floor_iff powr_realpow)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in finite_measure) emeasure_finite[simp, intro]: \"emeasure M A \\ top\"", "output": "using finite_emeasure_space emeasure_space[of M A]\nby (auto simp: top_unique)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma qmpt_I:\n assumes \"sigma_finite_measure M\"\n \"T \\ measurable M M\"\n \"\\A. A \\ sets M \\ ((T-`A \\ space M) \\ None_sets M) \\ (A \\ None_sets M)\"\n shows \"qmpt M T\"", "output": "unfolding qmpt_def qmpt_axioms_def quasi_measure_preserving_def\nby (auto simp add: assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonsat_push_\\: \"nonsat_push_precond f l (u,v) \\ \\ = excess f u\"", "output": "unfolding \\_def nonsat_push_precond_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_strict_mono: \"\\\\ < \\; \\ < \\; Ord \\; Ord \\; Ord \\; Ord \\\\ \\ \\+\\ < \\+\\\"", "output": "by (metis order.strict_implies_order add_less_cancel_left add_right_mono le_less_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma typing_ctxt_correct1:\n shows \"\\, \\ \\\\<^sub>T (ctxt_subst E r) : T \\ \\U. (\\, \\ \\\\<^sub>T r : U \\ \\, \\ \\\\<^sub>c\\<^sub>t\\<^sub>x\\<^sub>t E : T \\ U)\"", "output": "by(induction E arbitrary: \\ \\ T r; force)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma at_least_delta:\n assumes \"x \\ \\\"\n assumes \"t_stop \\ x\"\n shows \"ego.q x = ego2.s (x - \\)\"", "output": "using assms ego2.t_stop_nonneg unfolding t_stop_def ego2.s_def less_eq_real_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wls_subst_Op_simp[simp]:\nassumes \"wls (asSort ys) Y\"\n and \"wlsInp delta inp\" and \"wlsBinp delta binp\"\nshows\n\"((Op delta inp binp) #[Y / y]_ys) =\n Op delta (inp %[Y / y]_ys) (binp %%[Y / y]_ys)\"", "output": "using assms unfolding subst_def substInp_def substAbs_def substBinp_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma run_subseteq_reach:\n assumes \"range w \\ \\\"\n shows \"range (run \\ q\\<^sub>0 w) \\ reach \\ \\ q\\<^sub>0\" \n and \"range (run\\<^sub>t \\ q\\<^sub>0 w) \\ reach\\<^sub>t \\ \\ q\\<^sub>0\"", "output": "using assms unfolding reach_def reach\\<^sub>t_def\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rem_implicit_pres_ops_in\\D: \"op \\ set (ast_problem.ast\\ (rem_implicit_pres_ops prob))\n \\ (\\op'. op' \\ set (ast_problem.ast\\ prob) \\ op = rem_implicit_pres op')\"", "output": "by (cases prob) (force simp: ast_problem.ast\\_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma scc_ce_distinct:\n \"(C,E) \\ sc \\ G \\ D \\ set C \\ set E = {}\"", "output": "by(induction \\ G \\ D arbitrary: C E rule: sc.induct) (fastforce split: if_splits)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_action_Some_in_\\: \"lookup_action op = Some ast_op \\ ast_op \\ set ast\\\"", "output": "using lookup_operator_works_1 lookup_Some_in\\\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unwind_toI[intro?]:\nassumes\n\"\\ s vl s1 vl1.\n \\reachNT s; reach s1; \\ s vl s1 vl1\\\n \\\n vl \\ [] \\ exit s (hd vl)\n \\\n iaction (disjAll \\s) s vl s1 vl1\n \\\n (vl \\ [] \\ vl1 = []) \\ reaction (disjAll \\s) s vl s1 vl1\"\nshows \"unwind_to \\ \\s\"", "output": "using assms unfolding unwind_to_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_d_b_u_fresh:\n fixes x::u and b::b and \\::\\ and bv::bv\n assumes \"atom x \\ \\\"\n shows \"atom x \\ \\[bv::=b]\\<^sub>\\\\<^sub>b\"", "output": "using subst_b_fresh_u_cls subst_b_\\_def assms\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_states_cart: \n \"q \\ \\_states (\\_prod \\1 \\2) \\ q \\ \\_states \\1 \\ \\_states \\2\"", "output": "by (unfold \\_states_def \\_prod_def) (force split: ta_rule.split simp add: set_zip)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_apply_fv_unfold': \"fv (t \\ \\) = (\\v \\ fv t. fv (\\ v))\"", "output": "using subst_apply_fv_unfold\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n shows BotL_canonical[intro!]: \"\\,\\\\\\\"\n and Ax_canonical[intro!]: \"Atom k,\\ \\ Atom k,\\\"", "output": "by (meson SCp.intros union_single_eq_member)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma IntegralE:\n assumes \"Integral (a, b) f k\" and \"0 < e\"\n obtains \\ where \"gauge {a..b} \\\" and \"\\D. fine \\ (a, b) D \\ \\rsum D f - k\\ < e\"", "output": "using assms unfolding Integral_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alpha_alphaInp:\n\"(qOp delta qinp qbinp #= qOp delta' qinp' qbinp') =\n (delta = delta' \\ qinp %= qinp' \\ qbinp %%= qbinp')\"", "output": "unfolding alphaInp_def alphaBinp_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma MittenTauschA: \"\\@\\

#\\ \\ \\ \\ \\
#\\@\\ \\ \\\"", "output": "by(induction \\ arbitrary: \\ rule: List.rev_induct) (simp_all add: VertauschungA)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"y \\ 0 \\ x * y div y = (x::nat)\"", "output": "nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"\\x \\ 0; y \\ 0\\ \\ x * y \\ (y::nat)\"", "output": "nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"occurs a xs = occurs b (replace a b xs)\"", "output": "quickcheck[random, expect = counterexample] quickcheck[exhaustive, expect = counterexample] \\ \\Wrong. Precondition needed.\\ oops"} {"instruct": "Given a lemma, please prove it.", "input": "theorem \"map g (map f xs) = map (g o f) xs\"", "output": "quickcheck[random, expect = no_counterexample] quickcheck[exhaustive, size = 3, expect = no_counterexample] oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"Suc (occurs a (del1 a xs)) = occurs a xs\"\n \\ \\Wrong. Precondition needed.\\", "output": "quickcheck[random, expect = counterexample] quickcheck[exhaustive, expect = counterexample] oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sorted_merge [simp]:\n assumes \"sorted (map key xs)\" and \"sorted (map key ys)\"\n shows \"sorted (map key (merge xs ys))\"", "output": "using assms\nby (induct xs ys rule: merge.induct) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transf_res_is_rev: \"sorted (rev ns) \\ n > hd ns \\ sorted (rev ((transf n ( ns))))\"", "output": "by (induct ns) (auto simp add:transf_def sorted_wrt_append)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma distinct_sorted: \"sorted xs \\ distinct xs\"", "output": "by (induct xs) (auto simp add: sorted_wrt_append sorted_sorted_wrt)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n shows sorted_runs: \"\\x\\set (runs xs). sorted x\"\n and sorted_asc: \"ascP f \\ sorted (f []) \\ \\x\\set (f []). x \\ a \\ \\x\\set (asc a f ys). sorted x\"\n and sorted_desc: \"sorted xs \\ \\x\\set xs. a \\ x \\ \\x\\set (desc a xs ys). sorted x\"", "output": "by (induct xs and a f ys and a xs ys rule: runs_asc_desc.induct) (auto simp: sorted_append not_less dest: order_trans, fastforce)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma obs_consistent_behaviours:\n \"\\ obs_consistent R pi Sa Sc; bc \\ beh Sc; ba \\ beh Sa; (ba, bc) \\ seq_lift R\\\n \\ map pi (map (obs Sc) bc) = map (obs Sa) ba\"", "output": "by (erule seq_lift.induct) (auto simp add: obs_consistent_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma run_one_step_basic_set_local_result:\n assumes \"run_one_step d i (s,vs,ves,$Set_local x15) = (s', vs', res)\"\n shows \"(\\r. res = RSNormal r) \\ (\\e. res = RSCrash e)\"", "output": "using assms\nby (cases ves; cases \"x15 < length vs\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma round_down_float[simp]: \"round_down prec x \\ float\"", "output": "unfolding round_down_def\nby (auto intro!: times_float simp flip: of_int_minus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Chernoff:\n shows \"Chernoff_on X linear_cf\"", "output": "using %invisible Rf_mono_on range Rf_mono_on_iia_on[of X linear_cf, symmetric] Chernoff_on_iia_on\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma implode_select: \"String.implode ''select'' = STR ''select''\"", "output": "by (metis Literal.rep_eq String.implode_explode_eq zero_literal.rep_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem mbisim_simulation2:\n \"\\ mbisim s1 s2; r2.redT s2 tl2 s2'; \\ m\\move2 s2 tl2 s2' \\\n \\ \\s1' s1'' tl1. r1.mthr.silent_moves s1 s1' \\ r1.redT s1' tl1 s1'' \\ \\ m\\move1 s1' tl1 s1'' \\\n mbisim s1'' s2' \\ mta_bisim tl1 tl2\"", "output": "using FWdelay_bisimulation_obs.mbisim_simulation1[OF FWdelay_bisimulation_obs_flip] unfolding flip_simps ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_integral_diff_series_convergent: \"convergent sum_integral_diff_series\"", "output": "using sum_integral_diff_series_Bseq sum_integral_diff_series_monoseq\nby (blast intro!: Bseq_monoseq_convergent)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sub_branch_nominals:\n \\branch_nominals (sub_branch f branch) = f ` branch_nominals branch\\", "output": "unfolding branch_nominals_def sub_branch_def\nby (induct branch) (auto simp: sub_block_nominals)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mod_ring_mult_integer: \"(mod_ring_rel_integer ===> mod_ring_rel_integer ===> mod_ring_rel_integer) (mult_p_integer pp) ((*))\"", "output": "using urel_integer_mult mod_ring_mult unfolding mod_ring_rel_integer_def rel_fun_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in graph) init_loop_1_a[simp]: \"\\ Init {| Q1_a |} Loop\"", "output": "apply (unfold hoare_demonic Init_def Q1_a_def Loop_def)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma clearjunk_delete: \"clearjunk (delete x al) = delete x (clearjunk al)\"", "output": "by (induct al rule: clearjunk.induct) (auto simp add: delete_idem delete_twist)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma at_map_compl_pres: \"at_map \\ uminus = uminus \\ at_map\"", "output": "unfolding fun_eq_iff\nby (simp add: Abs_atoms_inverse at_map_def atom_map_compl_pres uminus_atoms.abs_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma split_head_repeat[simp]:\n \"Oc # list1 = Bk \\ j @ list2 \\ j = 0 \\ Oc # list1 = list2\"\n \"Bk # list1 = Oc \\ j @ list2 \\ j = 0 \\ Bk # list1 = list2\"\n \"Bk \\ j @ list2 = Oc # list1 \\ j = 0 \\ Oc # list1 = list2\"\n \"Oc \\ j @ list2 = Bk # list1 \\ j = 0 \\ Bk # list1 = list2\"", "output": "by(cases j;force)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Disj_eq_iff [simp]:\n assumes \"finite (supp xset1)\" and \"finite (supp xset2)\"\n shows \"Disj xset1 = Disj xset2 \\ xset1 = xset2\"", "output": "using assms unfolding Disj_def\nby (metis Conj_eq_iff Not_eq_iff bset.inj_map_strong finite_supp_map_bset_Not)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in encoding) indRelEQ_is_equivalence:\n shows \"equivalence indRelEQ\"", "output": "using indRelEQ_is_preorder indRelEQ_symm unfolding equiv_def preorder_on_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in poly_set_rev_iterateoi) proper_ro[proper_it]:\n \"proper_it' rev_iterateoi rev_iterateoi\"", "output": "apply (rule proper_it'I)\nby (rule pi_rev_iterateoi)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interaction_bounded_by_obsf_distinguisher [interaction_bound]:\n \"interaction_bounded_by consider (obsf_distinguisher \\) bound\"\n if [interaction_bound]: \"interaction_bounded_by consider \\ bound\"", "output": "unfolding obsf_distinguisher_def\nby(rule interaction_bound|simp)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rb_sp_Cons :\n assumes \"RedBlack prb\"\n shows \"subpath (red prb) rv1 (re # res) rv2 (subs prb) =\n ( sub_rel_of (red prb) (subs prb)\n \\ (rv1 = src re \\ (rv1, src re) \\ subs prb) \n \\ re \\ edges (red prb) \n \\ subpath (red prb) (tgt re) res rv2 (subs prb))\"", "output": "using assms subs_wf_sub_rel_of wf_sub_rel_of.sp_Cons\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma delete_map_transform_env_delete:\n \"delete x (map_transform t (env_delete x ae) \\) = delete x (map_transform t ae \\)\"", "output": "unfolding map_transform_def\nby (induction \\) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sort_key_embedding_injective: \n \"sort_key_embedding x = sort_key_embedding y \\ x = y\"", "output": "apply (induct x arbitrary: y)\napply (metis embed_dir_inj list.distinct(1) list.inject sort_key.exhaust sort_key_embedding.simps)\nby (metis fst_conv list.distinct(1) list.inject sort_key.exhaust sort_key_embedding.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma encode_all_operator_effects_valid:\n \"t < Suc h \\\n sv \\ atoms (encode_all_operator_effects (\\ (prob_with_noop abs_prob)) (operators_of (\\ (prob_with_noop abs_prob))) t) \\ \n valid_state_var sv\"", "output": "unfolding encode_all_operator_effects_def foldr_And\nby (force simp add: encode_operator_effect_valid)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma oracle\\<^sub>n_apply [simp]:\n \"oracle\\<^sub>n b \\ s (i, x) = map_spmf (apsnd (fun_upd s i)) (oracle\\<^sub>1 b \\ (s i) x)\"", "output": "by(simp add: oracle\\<^sub>n_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lset_lconst: \"x \\ lset (lconst b) \\ x = b\"", "output": "apply (induct x \"lconst b\" arbitrary: b rule: llist.set_induct) subgoal\nby (subst (asm) lconst.code) auto subgoal\nby (subst (asm) (2) lconst.code) auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"\\ \\ \\ (None->isEmpty\\<^sub>B\\<^sub>a\\<^sub>g())\"", "output": "by(auto simp: OclIsEmpty_def OclValid_def defined_def valid_def False_def True_def bot_fun_def None_fun_def OclAnd_def OclOr_def OclNot_def None_is_valid split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coclop_dual: \"(coclop::('a::order_with_dual \\ 'a) \\ bool) = clop \\ \\\\<^sub>F\"", "output": "unfolding coclop_def clop_def id_def mono_def map_dual_def comp_def fun_eq_iff le_fun_def\nby (metis invol_dual_var ord_dual)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sup_conv_fun_lub: \"Sup = fun_lub Sup\"", "output": "by(auto simp add: Sup_fun_def fun_eq_iff fun_lub_def intro: arg_cong[where f=Sup])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma permutation_lists_fc_succ[intro, simp]: \"permutation (lists_fc_succ xss)\"", "output": "using lists_fc_succ_permutes\nby (auto simp: permutation_permutes)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comm_monoid_mult_ow: \"class.comm_monoid_mult = comm_monoid_mult_ow UNIV\"", "output": "unfolding class.comm_monoid_mult_def comm_monoid_mult_ow_def class.comm_monoid_mult_axioms_def comm_monoid_mult_ow_axioms_def one_ow_def neutral_ow_def ab_semigroup_mult_ow\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mono2mono_ltakeWhile[THEN llist.mono2mono, cont_intro, simp]:\n shows monotone_ltakeWhile: \"monotone lprefix lprefix (ltakeWhile P)\"", "output": "by(rule llist.fixp_preserves_mono1[OF ltakeWhile_mono ltakeWhile_conv_fixp]) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PX5d_linear:\n shows \"Linear_order (PX5d d)\"", "output": "by (cases d) (simp_all add: linord_of_list_Linear_order)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma divisors_fun_nat: \"divisors_fun divisors_nat\"", "output": "unfolding divisors_fun_def\nusing divisors_nat\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem gdpr_EF': \"gdpr_Kripke \\ EF sgdpr\"", "output": "using gdpr_AT\nby (auto simp: gdpr_Kripke_def gdpr_states_def Igdpr_def dest: AT_EF)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma es_A2A: \"succ_ok \\ edge_succ (mk_map (mk_graph iG) iM) \\ arcs (mk_graph iG) \\ arcs (mk_graph iG)\"", "output": "using succ_ok_imp_permutes\nby (auto dest: permutes_in_image)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mirror_pair_equal: \"equal_pair (mirror_pair p) = (equal_pair p)\"", "output": "by (fastforce simp: mirror_pair_def equal_pair_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma robdd_equiv_alt_def :\nassumes \"robdd_invar b1\"\n and \"robdd_invar b2\"\nshows \"robdd_equiv b1 b2 \\ robdd_\\ b1 = robdd_\\ b2\"", "output": "using assms\napply (rule_tac robdd_equiv_alt_def_full)\napply (simp_all add: robdd_invar_def robdd_invar_ext_def robdd_invar_vars_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cprank_max1: \"cprank_max1 A \\ cprank_max 1 A\"", "output": "by (metis One_nat_def dims_tensor0 cprank_max.simps cprank_max0 tensor_add_0_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transfer_update:\n \"((=) ===> (=) ===> rel_state (=)) update' update\"", "output": "unfolding rel_fun_def\nby (auto intro: rel_state_update)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in encoding) indRelLST_to_SRel:\n fixes SRel :: \"('procS \\ 'procS) set\"\n and TRel :: \"('procT \\ 'procT) set\"\n and SP SQ :: \"'procS\"\n assumes rel: \"SourceTerm SP \\\\\\\\L SourceTerm SQ\"\n shows \"(SP, SQ) \\ SRel\"", "output": "using rel\nby (simp add: indRelLST.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma k_invariantAD:\n \"\\ k_isNode ec; k_memb ec A; k_invariant A \\\n \\ \\acts. lookup aOps (aActs A) ec = Some acts \\ set acts = set (simAction a ec)\"", "output": "unfolding k_invariant_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bounded_clinear_cblinfun_scaleC_left[bounded_clinear]: \"bounded_clinear cblinfun_scaleC_left\"", "output": "by transfer (rule bounded_cbilinear.flip[OF bounded_cbilinear_scaleC])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GNil_append:\n assumes \"GNil = G1@G2\"\n shows \"G1 = GNil \\ G2 = GNil\"", "output": "proof(rule ccontr) assume \"\\ (G1 = GNil \\ G2 = GNil)\" hence \"G1@G2 \\ GNil\"\nusing append_g.simps\nby (metis \\.distinct(1) \\.exhaust) thus False\nusing assms\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_within_tan: \"cos z \\ 0 \\ continuous (at z within s) tan\"", "output": "using continuous_at_imp_continuous_within isCont_tan\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hop_count_zero_oip_dip_sip:\n \"paodv i \\ (recvmsg msg_zhops \\) onl \\\\<^sub>A\\<^sub>O\\<^sub>D\\<^sub>V (\\(\\, l).\n (l\\{PAodv-:4..PAodv-:5} \\ {PRreq-:n|n. True} \\\n (hops \\ = 0 \\ oip \\ = sip \\))\n \\\n ((l\\{PAodv-:6..PAodv-:7} \\ {PRrep-:n|n. True} \\\n (hops \\ = 0 \\ dip \\ = sip \\))))\"", "output": "by (inv_cterms inv add: onl_invariant_sterms [OF aodv_wf received_msg_inv]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iam_new_sz_rule: \" iam_new_sz n < is_iam Map.empty >\"", "output": "unfolding iam_new_sz_def is_iam_def[abs_def]\nby (sep_auto simp: iam_new_abs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finfun_fst_update: \"finfun_fst (f(a $:= bc)) = (finfun_fst f)(a $:= fst bc)\"\n and finfun_fst_update_code: \"finfun_fst (finfun_update_code f a bc) = (finfun_fst f)(a $:= fst bc)\"", "output": "by(simp_all add: finfun_fst_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GoTo':\n assumes \\A, Suc n \\ ([], i) # branch\\ \\i \\ branch_nominals branch\\\n shows \\A, Suc n \\ branch\\", "output": "using assms GoTo STA_potential\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CD_on_range:\n shows \"CD_on ds A \\ A \\ (\\d\\ds. Field (Pd d))\"", "output": "using Cd_range unfolding CD_on_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subrobdds_set_mono2 :\n \"bs1 \\ bs2 \\ (subrobdds_set bs1 \\ subrobdds_set bs2)\"", "output": "unfolding subrobdds_set_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Ln_exp [simp]:\n assumes \"-pi < Im(z)\" \"Im(z) \\ pi\"\n shows \"ln(exp z) = z\"", "output": "proof (rule exp_complex_eqI) show \"\\Im (ln (exp z)) - Im z\\ < 2 * pi\"\nusing assms mpi_less_Im_Ln [of \"exp z\"] Im_Ln_le_pi [of \"exp z\"]\nby auto\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rank_invar_hd_cons: \n \"\\rank_invar bq; rank t < rank (hd bq)\\ \\ rank_invar (t # bq)\"", "output": "apply(cases bq)\napply(auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_fresh_FDERIV_floatariths:\n \"\\ fresh_floatariths (FDERIV_floatariths ode_e [0..\n length ds = DIM('a) \\ \\fresh_floatariths ode_e i \\ \\fresh_floatariths ds i\"", "output": "by (induction ode_e) (auto simp: FDERIV_floatariths_def dest!: not_fresh_FDERIV_floatarith)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_child_nodes_split:\n \"P (invoke (a_get_child_nodes_tups @ xs) ptr ()) =\n ((known_ptr ptr \\ P (get_child_nodes ptr))\n \\ (\\(known_ptr ptr) \\ P (invoke xs ptr ())))\"", "output": "by(auto simp add: known_ptr_impl get_child_nodes_impl a_get_child_nodes_def a_get_child_nodes_tups_def known_ptr_defs CharacterDataClass.known_ptr_defs ElementClass.known_ptr_defs NodeClass.known_ptr_defs split: invoke_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_accessible: \"low_equal s1 s2 \\\nvirt_to_phys addra (mmu s1) (mem s1) = Some (a, b) \\\nvirt_to_phys addra (mmu s2) (mem s2) = Some (a, b) \\\nmmu_readable (get_acc_flag b) 10 \\\nmem_equal s1 s2 a\"", "output": "apply (simp add: low_equal_def)\napply (simp add: user_accessible_def)\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma domo_narrow_subset: \"domo (S1 \\ S2) \\ domo S1 \\ domo S2\"", "output": "apply(induction S1 S2 rule: narrow_option.induct)\napply (auto simp: domo_def narrow_st_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isduu:\n \\is_up UCAST\\ if \\is_down d\\\n for d :: \\'b word \\ 'a word\\", "output": "using that is_up_down [of UCAST d]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cf_map_vdomain[cat_map_cs_simps]: \"\\\\<^sub>\\ (cf_map \\) = 2\\<^sub>\\\"", "output": "unfolding cf_map_def\nby (simp add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n notes [poincare_tac_theorems] = vdp_pi_0 vdp_ro vdp_start\n shows \"\\x\\{(1.41, 2.25) .. (1.42, 2.25)}.\n vdp.returns_to {(1, 2.25) .. (2, 2.25)} x \\\n vdp.poincare_map {(1, 2.25) .. (2, 2.25)} x \\ {(1.41, 2.25) .. (1.42, 2.25)}\"", "output": "unfolding ninequarters\nby (tactic \\poincare_bnds_tac @{thms vdp_fas_def} 30 20 7 14 [(0, 1, \"0x000000\")] \"\" (* \"out_p0_vdp_0.out\" *) @{context} 1\\)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Bossy_CH_BCh:\n shows \"Bossy.CH X = BCh h1 X \\ BCh h3 X\" (is \"?lhs = ?rhs\")", "output": "proof(rule equalityI) show \"?lhs \\ ?rhs\" unfolding Bossy.CH_def\nby clarsimp (simp add: BCh_def split: if_splits) show \"?rhs \\ ?lhs\" unfolding Bossy.CH_def\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma line_integral_exists_on_typeII_Cube_boundaries':\n assumes \"(k,\\) \\ boundary twoC\"\n shows \"line_integral_exists F {j} \\\"", "output": "using assms GreenThm_typeII_twoCube(2)\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma r_trans [simp]: \"trans r\"", "output": "using r_wo unfolding well_order_on_def linear_order_on_def partial_order_on_def preorder_on_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in semiring_hom) vector_smult_hom:\n \"hom x *s (map_vector hom v) = map_vector hom (x *s v)\"", "output": "by (transfer fixing: hom, auto simp: vec_hom_smult)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FHModule_addfunset : \"FGModule H rrsmult (addfunset FH V)\"", "output": "proof (rule FGModule.intro) from FH rrsmult show \"RModule Supgroup.group_ring (\\) (addfunset FH V)\"\nusing Group Supgroup.Ring1_RG Ring1.RModule_addfunset\nby fast\nqed (unfold_locales)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_cond_spmf [simp]: \"set_spmf (cond_spmf p A) = set_spmf p \\ A\"", "output": "by(auto 4 4 simp add: cond_spmf_def in_set_spmf iff: set_cond_pmf[THEN set_eq_iff[THEN iffD1], THEN spec, rotated])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma termMOD_igSwapCls: \"igSwapCls termMOD\"", "output": "unfolding igSwapCls_def\nusing termMOD_igSwapIGVar termMOD_igSwapIGAbs termMOD_igSwapIGOp\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma radical_sqrt_rule_division:\n \"x \\ radical_sqrt \\ y \\ radical_sqrt \\ y \\ 0 \\ x/y \\ radical_sqrt\"", "output": "by (metis divide_real_def radical_sqrt.intros(3) radical_sqrt.intros(5) real_scaleR_def real_vector.scale_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_one_2_stop:\n \"wprepare_add_one2 m lm (b, Oc # list) \n \\ wprepare_stop m lm (tl b, hd b # Oc # list)\"", "output": "apply(simp add: wprepare_add_one2.simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valid_add_new_ts_mmsaux:\n assumes \"valid_mmsaux args cur aux auxlist\" \"nt \\ cur\"\n shows \"valid_mmsaux args nt (add_new_ts_mmsaux args nt aux)\n (filter (\\(t, rel). enat (nt - t) \\ right (args_ivl args)) auxlist)\"", "output": "using valid_add_new_ts_mmsaux'[OF valid_shift_end_mmsaux[OF assms] assms(2)] unfolding add_new_ts_mmsaux_def ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma r_e2frame_prim: \"prim_recfn 1 r_e2frame\"", "output": "unfolding r_e2frame_def\nusing r_hd_prim r_e2stack_prim\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flush_all_until_volatile_write_unchanged_addresses':\n assumes notin: \"a \\ \\ ((\\(_,_,_,sb,_,_,_). outstanding_refs (Not \\ is_volatile) sb) ` set ls)\"\n shows \"flush_all_until_volatile_write ls m a = m a\"", "output": "using notin_outstanding_non_volatile_takeWhile_Un_lem' [OF notin]\nby (auto intro: flush_all_until_volatile_write_unchanged_addresses)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_tms_of[simp]: \"length (tms_of aprog) = length aprog\"", "output": "apply(auto simp: tms_of.simps tpairs_of.simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma swapInp_preserves_good[simp]:\nassumes \"goodInp inp\"\nshows \"goodInp (inp %[x \\ y]_xs)\"", "output": "using assms\nby (auto simp: goodInp_def lift_def swapInp_def liftAll_def split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R_loopI: \n \"X \\ rel_R \\I\\ \\I\\ \\ \\P\\ \\ \\I\\ \\ \\I\\ \\ \\Q\\ \\ LOOP X INV I \\ rel_R \\P\\ \\Q\\\"", "output": "unfolding rel_rkat.spec_def\nusing H_loopI\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma arg_uminus:\n assumes \"z \\ 0\"\n shows \"arg (-z) = \\arg z + pi\\\"", "output": "using assms\nusing arg_mult[of \"-1\" z]\nusing arg_complex_of_real_negative[of \"-1\"]\nby (auto simp add: field_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma handshake_obj_fields_markedD:\n \"\\ atS gc gc.obj_fields_marked_locs s; gc.handshake_invL s \\ \\ sys_ghost_hs_phase s\\ = hp_IdleMarkSweep \\ All (ghost_hs_in_sync (s\\ sys))\"", "output": "unfolding gc.handshake_invL_def\nby (metis (no_types, lifting) atS_mono gc.obj_fields_marked_locs_subseteq_hp_IdleMarkSweep_locs gc.obj_fields_marked_locs_subseteq_hs_in_sync_locs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PO_m3_inv1_lkeysec_trans [iff]:\n \"{m3_inv1_lkeysec} trans m3 {> m3_inv1_lkeysec}\"", "output": "by (fastforce simp add: PO_hoare_defs m3_defs intro!: m3_inv1_lkeysecI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_up_compose:\n \"\\ is_up uc; is_up uc' \\ \\ is_up (uc' \\ uc)\"", "output": "unfolding is_up_def\nby (simp add: Word.target_size Word.source_size)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_of_SomeI:\n \"\\ distinct_fst kxs; (k,x) \\ set kxs \\ \\ map_of kxs k = Some x\"", "output": "by (induct kxs) (auto simp:fun_upd_apply)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bi_total_rel_gpv' [transfer_rule]: \"bi_total A \\ bi_total (rel_gpv' A)\"", "output": "unfolding rel_gpv'_def\nby(simp add: bi_total_rel_gpv bi_total_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sym_non_volatile_conflict:\n \"symP (non_volatile_conflict P E)\"", "output": "unfolding non_volatile_conflict_def\nby(rule symPI) blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diff_prs[quot_preserve]:\n assumes \"Quotient3 R Abs Rep\"\n shows \"((-`) Abs ---> (-`) Abs ---> (-`) Rep) (-) = (-)\"", "output": "unfolding fun_eq_iff\nby (simp add: Quotient3_abs_rep[OF set_quotient[OF assms]] vimage_Diff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ENF_offending_subseteq_lhs:\n assumes \"sinvar_all_edges_normal_form P\"\n shows \"set_offending_flows G nP \\ { {(e1,e2). (e1, e2) \\ edges G \\ \\ P (nP e1) (nP e2)} }\"", "output": "using assms\nby (force simp: ENF_offending_set_P_representation)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_element_is_l_new_element [instances]: \n \"l_new_element type_wf\"", "output": "using l_new_element.intro new_element_type_wf_preserved\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_additive_principal_0: \"\\ additive_principal 0\"", "output": "by (clarify, drule additive_principal.not_0, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma combine_inv2:\n assumes \"inv2 lt\" \"inv2 rt\" \"bheight lt = bheight rt\"\n shows \"bheight (combine lt rt) = bheight lt\" \"inv2 (combine lt rt)\"", "output": "using assms\nby (induct lt rt rule: combine.induct) (auto simp: balance_left_inv2_app split: rbt.splits color.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma predCC_eqvt[eqvt, simp]: \"\\ \\ (predCC S f) = predCC (\\ \\ S) (\\ \\ f)\"", "output": "apply (rule cfun_eqvtI) unfolding predCC_eq\nby perm_simp rule"} {"instruct": "Given a lemma, please prove it.", "input": "lemma loose_bvar1_subst_bvs1'_closeds: \"\\ loose_bvar1 t lev \\ lev < k \\ \\x\\set us . is_closed x\n \\ \\ loose_bvar1 (subst_bvs1' t k us) lev\"", "output": "by (induction t k us arbitrary: lev rule: subst_bvs1'.induct) (use is_open_def loose_bvar_iff_exist_loose_bvar1 in \\auto simp add: is_open_def\\)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma monotone_map_prod [simp]:\n \"monotone (rel_prod orda ordb) (rel_prod ordc ordd) (map_prod f g) \\\n monotone orda ordc f \\ monotone ordb ordd g\"", "output": "by(auto simp add: monotone_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma e2tail_tail [simp]:\n \"e2tail (encode_config (s # ss, rv)) = list_encode (map encode_frame ss)\"", "output": "unfolding e2tail_def\nusing encode_config\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind_option_option [simp]: \"monad.bind_option None = Option.bind\"", "output": "by(simp add: monad.bind_option_def fun_eq_iff split: option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma replace_basis_completely :\n \"\\ set vs \\ V; lin_independent vs; length us = length vs;\n set us \\ Span vs; lin_independent us \\ \\ basis_for (Span vs) us\"", "output": "using replace_basis[of vs us]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_converter_id14: \"map_converter id b out id res = map_converter' b out res\"", "output": "by(coinduction arbitrary: res) (auto 4 3 intro!: rel_funI simp add: converter.map_sel gpv.rel_map map_gpv_conv_map_gpv'[symmetric] intro!: gpv.rel_refl_strong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma test_bremdup1_refine_aux: \"(test_bremdup1, my_bremdup_impl_loc.test_remdup) \\ [my_bremdup_impl_loc]\\<^sub>a nat_assn\\<^sup>k \\ nat_assn\"", "output": "using test_bremdup1.refine unfolding hfref_def hn_refine_def\nby (auto simp: pure_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma s1619: \"\\ scf R16 \\[Fishb(R19 A1)] scf R19\"", "output": "by (intro strategyproof'[where j = A1]) (simp_all add: insert_commute R16.eval R19.eval)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invariant_in_dom [simp]: \"callee_invariant oracle (\\\\. x \\ dom \\)\"", "output": "by unfold_locales(simp_all add: oracle_def split: option.split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conv_callee_plus_id_right: \"converter_of_callee (plus_intercept callee id_oracle) s =\n parallel_converter (converter_of_callee callee s) id_converter\"", "output": "by (coinduction arbitrary: callee s) (clarsimp split!: sum.split intro!: rel_funI , (force intro: gpv.rel_refl | simp add: gpv.rel_map id_oracle_def)+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CCFix_nonrec_eqvt[eqvt]: \"\\ \\ (CoCallArityAnalysis.CCfix_nonrec cccExp x e) = CoCallArityAnalysis.CCfix_nonrec (\\ \\ cccExp) (\\ \\ x) (\\ \\ e)\"", "output": "apply (rule cfun_eqvtI) unfolding CoCallArityAnalysis.CCfix_nonrec_eq\nby perm_simp rule"} {"instruct": "Given a lemma, please prove it.", "input": "lemma group_law_group: \"group_law inverse neutral mult\"", "output": "unfolding group_law_def\nusing group_class.axioms monoidl_law_monoidl unfolding class.group_axioms_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma value_subst_value:\n assumes \"value e\" \"value e'\"\n shows \"value (e[e' / x])\"", "output": "using assms\nby (induct e e' x rule: subst_term.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma modI_numeral_numeral [simp]:\n \"mod\\(numeral i)\\(numeral j) = MkI' (Rings.modulo (numeral i) (numeral j))\"", "output": "unfolding numeral_Integer_eq mod_Integer_def MkI'_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma den_eq_chop_num: \"den = tree_chop num\"", "output": "by(coinduction rule: tree.coinduct_strong) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gen_dfs_outer_initial: \n assumes \"finite (E\\<^sup>*``V0)\"\n shows \"gen_dfs_outer E (E\\<^sup>*``V0) V0 V0 {} brk\"", "output": "using assms unfolding gen_dfs_outer_def\nby (auto intro: rev_ImageI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cupcake_v_update_preserve:\n assumes \"is_cupcake_all_env env\" \"is_cupcake_ns (f (sem_env.v env))\"\n shows \"is_cupcake_all_env (sem_env.update_v f env)\"", "output": "using assms\nby (metis is_cupcake_all_env.simps(1) is_cupcake_all_envE is_cupcake_nsE sem_env.collapse sem_env.record_simps(1) sem_env.record_simps(2) sem_env.sel(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in encoding) indRelTEQ_impl_TRel_is_weak_reduction_coupled_simulation:\n fixes TRel :: \"('procT \\ 'procT) set\"\n assumes couSim: \"weak_reduction_coupled_simulation (indRelTEQ TRel) (STCal Source Target)\"\n shows \"weak_reduction_coupled_simulation (TRel\\<^sup>*) Target\"", "output": "using couSim weak_reduction_coupled_simulation_versus_simulation_and_contrasimulation refl indRelTEQ_impl_TRel_is_weak_reduction_simulation[where TRel=\"TRel\"] indRelTEQ_impl_TRel_is_weak_reduction_contrasimulation[where TRel=\"TRel\"]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fields_Base [simp]: \n\"DeclConcepts.fields tprg Base \n = [((arr,Base), \\access=Public,static=True ,type=PrimT Boolean.[]\\),\n ((vee,Base), \\access=Public,static=False,type=Iface HasFoo \\)]\"", "output": "apply (subst fields_rec')\napply (auto simp add: BaseCl_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma att_orD1: \" \\(x1 # x2 \\\\<^sub>\\\\<^bsup>x\\<^esup>) \\ \\ x1\"", "output": "by (case_tac x2, (subst (asm) att_or, simp)+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma make_invar_thm: \"is_invar I \\ I s\"\n \\ \\Lemma to transfer an invariant into this locale\\", "output": "using rwof_cons[OF _ rwof, folded is_invar_def] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma inst_cswitch_independent_of_state:\n assumes \"rcurrent s = rcurrent t\"\n shows \"rcurrent (rcswitch n s) = rcurrent (rcswitch n t)\"", "output": "using rstate_invariant cswitch_preserves_invariants unfolding rcurrent_def rcswitch_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma amd2_delete_refine: \n \"(uncurry (amd_delete dflt), uncurry (RETURN oo (amd1_delete dflt))) \n \\ id_assn\\<^sup>k*\\<^sub>a(is_nff dflt)\\<^sup>d \\\\<^sub>a is_nff dflt\"", "output": "by (sep_auto simp: amd_delete_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_freshen_conclusions[simp]:\n assumes \"pf \\ set conclusions\"\n shows \"subst s (freshen a pf) = pf \"", "output": "using assms conclusions_closed\nby (simp add: closed_no_lconsts freshen_def rename_closed subst_closed)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wadjust_on_left_moving_B_Bk1[simp]: \"wadjust_on_left_moving_B m rs \n (Oc # Oc # Oc\\(rs) @ Bk # Oc # Oc\\(m), [Bk])\"", "output": "apply(simp add: wadjust_on_left_moving_B.simps, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CD4a: \"Der_1a \\ \\ Der_4e \\ \\ Cl_4 (\\\\<^sub>D \\)\"", "output": "unfolding Cl_der_def\nby (smt ADDI_a_def Der_4e_def IDEM_def join_def)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wls_freshEnv_swapEnv_exchange1:\nassumes \"wlsEnv rho\"\nshows \"freshEnv xs x2 (rho &[x1 \\ x2]_xs) = freshEnv xs x1 rho\"", "output": "using assms\nby (intro freshEnv_swapEnv_exchange1) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stone_phi_complement:\n \"complement (stone_phi (Abs_regular (-x))) (stone_phi (Abs_regular (--x)))\"", "output": "by (metis (mono_tags, lifting) eq_onp_same_args stone_phi.phi_complemented uminus_regular.abs_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cUNION_parametric [transfer_rule]: includes lifting_syntax shows\n \"(rel_cset A ===> (A ===> rel_cset B) ===> rel_cset B) cUNION cUNION\"", "output": "unfolding rel_fun_def\nby transfer(blast intro: rel_set_UNION)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lossless_S1: \"lossless_spmf (S1 msgs ())\"", "output": "by(simp add: S1_def local.etp.lossless_I split_def etp.lossless_S)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weight_sample_uniform_0 [simp]: \"weight_spmf (sample_uniform 0) = 0\"", "output": "by(auto simp add: weight_sample_uniform indicator_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma M_simps:\n \"edge_succ M = lists_succ xss\"", "output": "unfolding to_map_def\nby (cases G_list) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sorted_list_subset_fusion_code:\n \"sorted_list_subset_fusion eq g1 g2 s1 s2 =\n (if list.has_next g1 s1 then\n let (x, s1') = list.next g1 s1\n in list.has_next g2 s2 \\ (\n let (y, s2') = list.next g2 s2 \n in if eq x y then sorted_list_subset_fusion eq g1 g2 s1' s2' \n else y < x \\ sorted_list_subset_fusion eq g1 g2 s1 s2')\n else True)\"", "output": "unfolding sorted_list_subset_fusion_def\nby(subst (1 2 5) list.unfoldr.simps)(simp add: split_beta Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma erfc_at_top [tendsto_intros]: \"((erfc :: real \\ real) \\ 0) at_top\"", "output": "unfolding erfc_def [abs_def]\nby (auto intro!: tendsto_eq_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_ancestors_si_ptr:\n assumes \"h \\ get_ancestors_si ptr \\\\<^sub>r ancestors\"\n shows \"ptr \\ set ancestors\"", "output": "using assms\nby(simp add: get_ancestors_si_def) (auto elim!: bind_returns_result_E2 split: option.splits intro!: bind_pure_I)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma link_size[simp]: \"size (link hp) = size hp\"", "output": "by (cases hp rule: link.cases) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uminus_sum_list: \"- sum_list as = sum_list (map uminus (rev as))\"", "output": "by (induct as) (auto simp add: minus_add)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma F_Un_D_subset: \"(F \\ D) \\ A\"", "output": "by (intro Un_least subset_trans [OF F_subset] subset_trans [OF D_subset]) (auto simp: A_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_strict_prefix_set: \n shows \"finite {xa. strict_prefix xa (x::'a list)}\"", "output": "apply (induct x rule:rev_induct, simp)\napply (subgoal_tac \"{xa. strict_prefix xa (xs @ [x])} = {xa. strict_prefix xa xs} \\ {xs}\")\nby (auto simp:strict_prefix_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma complex_norm_eq_1_exp: \"norm z = 1 \\ exp(\\ * of_real (Arg2pi z)) = z\"", "output": "by (metis Arg2pi_eq cis_conv_exp mult.left_neutral norm_cis of_real_1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ab_semigroup_add_ow: \"class.ab_semigroup_add = ab_semigroup_add_ow UNIV\"", "output": "unfolding class.ab_semigroup_add_def ab_semigroup_add_ow_def class.ab_semigroup_add_axioms_def ab_semigroup_add_ow_axioms_def semigroup_add_ow\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inl_invertible: \"inl op xs = Some opinl \\ deinl opinl = op\"", "output": "by (induction op xs rule: inl.induct; simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Rep_formula_top: \"Rep_formula \\ = UNIV\"", "output": "unfolding top_formula_def\nby (intro Abs_formula_inverse fba_UNIV)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_functor:\n shows \"functor Cop.comp S map\"", "output": "apply (unfold_locales)\nusing map_def arr_map map_preserves_dom map_preserves_cod map_preserves_comp\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma per_init_per[simp, intro!]:\n \"part_equiv (per_init D)\"", "output": "unfolding per_init_def\nby (auto simp: part_equiv_def sym_def trans_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R23 [simp]: \"pmf (sds R23) b = 0\" \"pmf (sds R23) c = 0\" \"pmf (sds R23) d = 1 - pmf (sds R23) a\"", "output": "using R23_R19.strategyproofness(1) lottery_conditions[OF R23.wf] R23.support\nby (auto simp del: pmf_nonneg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_cls_poss[simp]: \"(poss AA) \\ \\ = poss (AA \\am \\)\"", "output": "unfolding subst_cls_def subst_lit_def subst_atm_mset_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trans_Sbis: \"trans Sbis\"", "output": "by (metis Sbis_def Sretr_sym Sretr_sym_trans mono_Retr sym_trans_gfp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_element_get_child_nodes_is_l_new_element_get_child_nodes [instances]: \n \"l_new_element_get_child_nodes type_wf known_ptr get_child_nodes get_child_nodes_locs\"", "output": "using new_element_is_l_new_element get_child_nodes_is_l_get_child_nodes\napply(auto simp add: l_new_element_get_child_nodes_def l_new_element_get_child_nodes_axioms_def)[1]\nusing get_child_nodes_new_element new_element_no_child_nodes\nby fast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Scons_not_Atom [iff]: \"Scons M N \\ Atom(a)\"", "output": "unfolding Atom_def Scons_def Push_Node_def One_nat_def\nby (blast intro: Node_K0_I Rep_Node [THEN Node_Push_I] dest!: Abs_Node_inj elim!: apfst_convE sym [THEN Push_neq_K0])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chart_eucl_in_atlas[intro,simp]: \"chart_eucl \\ manifold_eucl.atlas k\"", "output": "using manifold_eucl.charts_subset_atlas\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma venv_approx_trans[trans]:\n fixes ve1 ve2 ve3 :: \"'c \\\"\n shows \"\\ ve1 \\ ve2; ve2 \\ ve3 \\ \\ (ve1 \\ ve3)\"", "output": "unfolding venv_approx_def\nby (rule smap_less_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pre_post_zero_top:\n \"bot\\-q = bot\"", "output": "using bot_least order.eq_iff pre_post_galois tests_dual.sba_dual.sub_bot_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lsu_one: \"\\\\<^sup>\\ 1 \\ (1::'a::unital_quantale)\"", "output": "unfolding lsu_def\nusing bres_canc1 dual_order.trans le_top\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma P1_real_ideal_DDH_advantage_False:\n assumes \"\\ = False\" \n shows \"mal_def.adv_P1 M \\ z (P1_S1, P1_S2) \\ D = ddh.DDH_advantage (P1_DDH_mal_adv_\\_False M z \\ D)\"", "output": "by(simp add: P1_adv_real_ideal_model_def ddh.DDH_advantage_def P1_ideal_ddh1_\\_False P1_real_ddh0_\\_False assms P1_advantages_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interp_subseteq_INTERP: \"interp C \\ INTERP\"", "output": "unfolding interp_def INTERP_def\nby (auto simp: production_unfold)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_rel_irreducible[transfer_rule]: \"(poly_rel ===> (=)) (irreducible_i ops) irreducible\\<^sub>d\"", "output": "unfolding irreducible_i_def[abs_def] irreducible\\<^sub>d_def[abs_def]\nby (transfer_prover_start, transfer_step+, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma to_tree_order_is_l_to_tree_order [instances]: \"l_to_tree_order to_tree_order\"", "output": "using to_tree_order_pure l_to_tree_order_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tbisim_flip [flip_simps]:\n \"FWbisimulation_base.tbisim (\\t. flip (bisim t)) (flip bisim_wait) w t ts2 m2 ts1 m1 =\n FWbisimulation_base.tbisim bisim bisim_wait w t ts1 m1 ts2 m2\"", "output": "unfolding FWbisimulation_base.tbisim_def flip_simps\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bigomega_const_iff [simp]: \"(\\_. c1) \\ \\[F](\\_. c2) \\ F = bot \\ c1 \\ 0 \\ c2 = 0\"", "output": "by (cases \"c1 = 0\"; cases \"c2 = 0\") (auto simp: bigomega_def eventually_False mult_le_0_iff intro: exI[of _ 1] exI[of _ \"norm c1 / norm c2\"])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extensionalD_empty[simp]: \"extensionalD d {} = {\\x. d}\"", "output": "unfolding extensionalD_def\nby (simp add: set_eq_iff fun_eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma S_list_endomorphism:\n \"ss\\lists S \\ ChamberComplexEndomorphism X (permutation (sum_list ss))\"", "output": "by (induct ss) (auto simp add: zero_permutation.rep_eq trivial_endomorphism plus_permutation.rep_eq S_endomorphism ChamberComplexEndomorphism.endo_comp )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma monotone_lzip: \"monotone (rel_prod (\\) (\\)) (\\) (case_prod lzip)\"", "output": "by(rule llist.fixp_preserves_mono2[OF lzip_mono lzip_conv_fixp]) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in sys) mut_handshake_invL[intro]:\n notes if_splits[split]\n notes fun_upd_apply[simp]\n shows\n \"\\ mut_m.handshake_invL m \\ sys\"", "output": "by (vcg_chainsaw mut_m.handshake_invL_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_phis'_codem_next:\n assumes \"\\ns. Mapping.lookup nodes_of_phis (snd next) = Some ns \\ finite ns\"\n shows \"Mapping.lookup (phis'_codem g next next' nodes_of_phis) next = None\"", "output": "using assms unfolding phis'_codem_def\nby (auto simp: Set.remove_def lookup_delete split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ta_bisim_mono:\n assumes major: \"ta_bisim bisim ta1 ta2\"\n and mono: \"\\t s1 s2. bisim t s1 s2 \\ bisim' t s1 s2\"\n shows \"ta_bisim bisim' ta1 ta2\"", "output": "using major\nby(auto simp add: ta_bisim_def elim!: List.list_all2_mono nta_bisim_mono intro: mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invar_initial: \n \"\\outer_invar it D0; v0\\it; v0\\D0\\ \\ invar v0 D0 (initial v0 D0)\"", "output": "unfolding outer_invar_def\napply (drule outer_invar_loc.invar_initial_aux)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma resource_of_obsf_oracle_Fault [simp]:\n \"resource_of_oracle (obsf_oracle oracle) Fault = const_resource Fault\"", "output": "by(coinduction)(auto simp add: rel_fun_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma app_iso_inv[simp]:\n assumes \"digraph_isomorphism hom\"\n shows \"app_iso (inv_iso hom) (app_iso hom G) = G\"", "output": "using assms\nby (intro pre_digraph.equality) (auto intro: rev_image_eqI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ccw'_sortedP_polychain_of2:\n assumes \"ccw'.sortedP 0 [u, v]\"\n shows \"ccw'.sortedP x0 (map snd (polychain_of x0 [u, v]))\"", "output": "using assms\nby (auto intro!: linorder_list0.sortedP.Nil linorder_list0.sortedP.Cons elim!: linorder_list0.sortedP_Cons simp: ac_simps ccw'.translate_origin)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_of_dlist_eq_singleton_conv:\n \"list_of_dlist dxs = [x] \\ dxs = DList_Set.insert x DList_Set.empty\"", "output": "by transfer(case_tac dxs, auto simp add: equal_base.list_insert_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma orbit_cycle_elem:\n assumes \"distinct as\" and \"a \\ set as\"\n shows \"orbit \\as\\ a = set as\"", "output": "oops \\ \\(we need rotation here\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma permutation_edge_pred: \"permutation (edge_pred M)\"", "output": "by (metis edge_pred_permutes finite_arcs permutation_permutes)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ennreal_inverse_top[simp]: \"inverse top = (0::ennreal)\"", "output": "by transfer (simp add: top_ereal_def ereal_inverse_eq_0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"continuous_on UNIV stereographic\"", "output": "unfolding continuous_on_iff unfolding dist_complex_homo_def dist_riemann_sphere_def\nby (subst dist_stereographic', auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma recvcap_preserves_InvCapsNonneg:\n assumes \"InvCapsNonneg c0\"\n and \"next_recvcap' c0 c1 p t\"\n shows \"InvCapsNonneg c1\"", "output": "using assms unfolding InvCapsNonneg_def next_recvcap'_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gmd_correct:\n assumes \"is_measured_digit d\"\n shows \"gmd d = sum_list (map snd (digitToList d))\"", "output": "by (insert assms, cases d, auto simp add: gmn_correct add.assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma col_space_eq_row_space_transpose:\n shows \"col_space A = row_space A\\<^sup>T\"", "output": "unfolding col_space_def row_space_def Matrix.rows_transpose .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in strategic_space_2p) coop_is_pareto_opt:\n assumes \"alice_payoff = 3 \\ bob_payoff = 3\"\n shows \"is_pareto_opt\"", "output": "using is_pareto_opt_def strategic_space_2p.sum_payoff_le_6 assms\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma block_size_lt_v: \"\\ \\ \\\"", "output": "using v_non_zero block_size_lt_v design_blocks_nempty uniform\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_attribute_is_l_get_attribute [instances]: \n \"l_get_attribute type_wf get_attribute get_attribute_locs\"", "output": "apply(unfold_locales)\nusing get_attribute_reads get_attribute_ok get_attribute_ptr_in_heap get_attribute_pure\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma range_prefix_match_sm[simp]: \"wordinterval_to_set (fst (range_prefix_match pfx rg)) = \n fst (ipset_prefix_match pfx (wordinterval_to_set rg))\"", "output": "by (metis fst_conv ipset_prefix_match_m wordinterval_intersection_set_eq prefix_to_wordinterval_set_eq range_prefix_match_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cupcake_list_complete:\n \"evaluate_list (evaluate env) s1 es res \\\n is_cupcake_all_env env \\ list_all is_cupcake_exp es \\ \\rs. list_all2_shortcircuit (cupcake_evaluate_single env) es rs \\ sequence_result rs = (snd res)\"", "output": "by (fastforce intro:cupcake_list_complete0 cupcake_single_complete evaluate_list_mono_strong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma splitAt_simpD'[simp]: \"\\ a. a \\ ram \\ snd (splitAt ram (a # b)) = snd (splitAt ram b)\"", "output": "apply (rule splitAt_simpD)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma non_trivial_combine_imp_dependent:\n assumes \"set Ks \\ K\" and \"combine Ks Us = \\\" and \"\\ set (take (length Us) Ks) \\ { \\ }\"\n shows \"dependent K Us\"", "output": "using independent_imp_trivial_combine[OF _ assms(1-2)] assms(3)\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isovarspar_sum: \n \"isolate_variable_sparse (p+q) var deg = \n isolate_variable_sparse (p) var deg\n + isolate_variable_sparse (q) var deg\"", "output": "apply (auto simp add: mpoly_eq_iff coeff_isolate_variable_sparse )\napply (metis More_MPoly_Type.coeff_add coeff_isolate_variable_sparse)\nby (metis More_MPoly_Type.coeff_add add.comm_neutral coeff_isolate_variable_sparse less_numeral_extra(3))"} {"instruct": "Given a lemma, please prove it.", "input": "theorem Hset1_bd: \"|Hset1 (x :: ('p1, 'p2, 'p3, 'p, 'a1, 'a2) H )| \\o\n (Hbd :: ('p1, 'p2, 'p3, 'p) Hbd_type rel)\"", "output": "by (tactic \\BNF_Comp_Tactics.mk_comp_set_bd_tac @{context} @{thm refl} NONE @{thm Hset1_alt} @{thms comp_single_set_bd[OF F1.bd_Card_order F1.set_bd(1) G.set_bd(1)] comp_single_set_bd[OF F2.bd_Card_order F2.set_bd(1) G.set_bd(2)] comp_single_set_bd[OF F3.bd_Card_order F3.set_bd(1) G.set_bd(3)]}\\)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_calM: \"finite calM\"", "output": "unfolding calM_def\nby (rule finite_subset [where B = \"Pow (carrier G)\"]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_longest_prefix_routing_sort: \"is_longest_prefix_routing (sort_rtbl r)\"", "output": "unfolding sort_rtbl_def is_longest_prefix_routing_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SV_inv3_inductive:\n \"init sv_TS \\ SV_inv3\" \n \"{SV_inv3} trans sv_TS {> SV_inv3}\"", "output": "apply (simp add: sv_TS_defs SV_inv3_def)\nby (auto simp add: sv_TS_defs SV_inv3_event_pres)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma d0_omega_mult:\n \"d(x\\<^sup>\\ * y * bot) = d(x\\<^sup>\\ * bot)\"", "output": "apply (rule order.antisym)\napply (simp add: d_isotone mult_isotone omega_sub_vector)\nby (metis d_isotone mult_assoc mult_right_isotone bot_least)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pincAB: \"Fr_2 \\ \\ \\\\<^sup>AA \\<^bold>\\ \\\\<^sup>BA\"", "output": "using Br_fr_def Cl_fr_def pF2 conn\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in CRR_market) delta_pf_portfolio:\n shows \"portfolio (delta_pf N der matur)\"", "output": "unfolding delta_pf_def\nby (simp add: single_comp_portfolio)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in complete_lattice) lattice_partial_function_definition:\n \"partial_function_definitions (\\) Sup\"", "output": "by(unfold_locales)(auto intro: Sup_upper Sup_least)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exec1_drop_suffix_aux:\n\"(cs12,s) \\ (cs1'2,s') \\ \\cs1 cs2 cs1'.\n cs12 = cs1@cs2 & cs1'2 = cs1'@cs2 & cs1 \\ [] \\ (cs1,s) \\ (cs1',s')\"", "output": "apply(erule exec1.induct)\napply (force intro:exec1.intros simp add: neq_Nil_conv)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wd_hide_prize:\n \"well_def hide_prize\"", "output": "unfolding hide_prize_def hide_behind_def\nby(simp add:wd_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma asIMOD_wlsFSwSb: \"wlsSEM SEM \\ iwlsFSwSb (asIMOD SEM)\"", "output": "unfolding iwlsFSwSb_def\nusing asIMOD_wlsFSw asIMOD_igSubstAllIPresIGWlsAll asIMOD_igSubstCls\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nlistToTree_inv: \n \"\\ x \\ set nl. is_measured_node x \\ is_measured_ftree (nlistToTree nl)\"\n \"\\ x \\ set nl. is_leveln_node n x \\ is_leveln_ftree n (nlistToTree nl)\"", "output": "by (unfold nlistToTree_def, induct nl, auto simp add: nlcons_invmeas) (induct nl, auto simp add: nlcons_invlevel)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cfinite_dim_finite_subspace_basis:\n assumes \\csubspace X\\\n shows \"\\basis::'a::cfinite_dim set. finite basis \\ cindependent basis \\ cspan basis = X\"", "output": "by (meson assms cindependent_cfinite_dim_finite complex_vector.basis_exists complex_vector.span_subspace)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind_option_gpv_transfer [transfer_rule]:\n \"(cr_option_le_gpv ===> ((=) ===> cr_option_le_gpv) ===> cr_option_le_gpv) Option.bind bind_gpv\"", "output": "apply(clarsimp simp add: cr_option_le_gpv_def rel_fun_def bind_eq_Some_conv) subgoal for f g x y\nby(erule allE[where x=y]) auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_two_chain_horizontal_boundary:\n assumes \"finite two_chain\"\n shows \"finite (two_chain_horizontal_boundary two_chain)\"", "output": "using assms\nby (simp add: two_chain_horizontal_boundary_def horizontal_boundary_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iffb_surj: \"surj fb\\<^sup>-\\<^sub>\\\"", "output": "using surj_def\nby (metis comp_apply iffb_inv1 surj_id)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Conj_eq_iff [simp]:\n assumes \"finite (supp xset1)\" and \"finite (supp xset2)\"\n shows \"Conj xset1 = Conj xset2 \\ xset1 = xset2\"", "output": "using assms\nby (metis (erased, hide_lams) Conj\\<^sub>\\_eq_iff Conj_rep_eq Rep_formula_inverse injI inj_eq bset.inj_map)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fin_dim[simp]: \"fin_dim\"", "output": "unfolding fin_dim_def\napply (intro eqTrueI exI conjI)\nusing span_unit_vecs_is_carrier unit_vecs_carrier\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prec_first_EV_SIGNAL_action:\nassumes \"is_SK_EV_SIGNAL aseq\"\n shows \"rprecondition s d (hd aseq)\"", "output": "using assms unfolding is_SK_EV_SIGNAL_def rprecondition_def atomic_step_precondition_def ev_signal_precondition_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fun_chain_at_top_at_top:\n assumes \"filterlim (f :: ('a::order) \\ 'a) at_top at_top\"\n shows \"filterlim (f ^^ n) at_top at_top\"", "output": "by (induction n) (auto intro: filterlim_ident filterlim_compose[OF assms])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bal_i1: \"bal_i 1 1\"", "output": "using bal_i_balance[of \"Node Leaf undefined Leaf\"]\nby(auto simp add: balance_tree_def Balance.bal_tree_def Balance.bal_list_def Balance.bal_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inverse_ereal_tendsto_at_right_0: \"(inverse \\ \\) (at_right (0::ereal))\"", "output": "unfolding tendsto_compose_filtermap[symmetric] at_right_ereal zero_ereal_def\nby (subst filterlim_cong[OF refl refl, where g=\"\\x. ereal (inverse x)\"]) (auto simp: eventually_at_filter tendsto_PInfty_eq_at_top filterlim_inverse_at_top_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmf_of_alist_aux:\n assumes \"(s, \\) \\ set K\"\n shows\n \"pmf (pmf_of_alist \\) t = (case map_of \\ t of\n None \\ 0\n | Some p \\ p)\"", "output": "using assms is_pmf unfolding pmf_of_alist_def\nby (intro pmf_embed_pmf pmf_of_alist_support_aux_2) (auto 4 3 split: option.split dest: map_of_SomeD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transpose_mult_matrix:\n assumes\n \"\\a. fmul 0 a = 0\"\n \"\\a. fmul a 0 = 0\"\n \"fadd 0 0 = 0\"\n \"\\x y. fmul y x = fmul x y\"\n shows\n \"transpose_matrix (mult_matrix fmul fadd A B) = mult_matrix fmul fadd (transpose_matrix B) (transpose_matrix A)\"", "output": "apply (simp add: Rep_matrix_inject[THEN sym])\napply (rule ext)+\nusing assms\napply (simp add: Rep_mult_matrix ac_simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma max_Var_floatarith_fold_const_fa:\n \"max_Var_floatarith (fold_const_fa fa) \\ max_Var_floatarith fa\"", "output": "by (induction fa) (auto simp: fold_const_fa.simps split!: option.splits floatarith.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem phis'_pruned: \"braun_ssa.pruned g\"", "output": "unfolding braun_ssa.pruned_def braun_ssa.phiDefs_def\napply (subst phis'_def)\nby (auto split:prod.splits if_split_asm simp add:phiDefNodes_def elim!:fold_union_elem phiDefNodes_aux_pruned)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma T_on_rand_as_sum: \"T_on_rand A s0 rs = sum (T_on_rand_n A s0 rs) {..\\ OO cr_spmf_gpv\"", "output": "by(simp add: fun_eq_iff relcompp.simps cr_option_gpv_def cr_spmf_gpv_def cr_spmf_option_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma scast_scast_a:\n \"\\ is_down (scast :: 'b word \\ 'c word) \\ \\\n (scast (scast (a :: 'a::len word) :: 'b::len word) :: 'c::len word) = scast a\"", "output": "apply (simp only: scast_eq)\napply (metis down_cast_same is_up_down scast_eq ucast_down_wi) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lim_h_minus_le_lim_h_plus: \"lim_h_minus e \\ lim_h_plus e\"", "output": "by(rule SUP_mono)(blast intro: h_minus_le_h_plus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filter_IFS_no_violations_accu_distinct: \"\\ distinct (Es@accu) \\ \\ distinct (filter_IFS_no_violations_accu G M accu Es)\"", "output": "apply(induction Es arbitrary: accu)\nby(simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_state_present2:\n assumes\n \"execute (init_state k1 k2) heap = Some ((k_ref1, k_ref2, m_ref1, m_ref2), heap')\"\n shows\n \"Array.present heap' (Ref.get heap' m_ref1)\" \"Array.present heap' (Ref.get heap' m_ref2)\"", "output": "using assms unfolding init_state_def\nby (auto 4 3 simp: execute_simps init_state_inner_alloc elim!: execute_bind_success'[OF success_empty] dest: inite_state_inner_present' empty_present empty_present' )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HomFtorContraCod: \"CatCod (Hom\\<^bsub>C\\<^esub>[\\,X]) = SET\"", "output": "by(simp add: HomFtorContra_def HomFtorContra'_def MakeFtor_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_case_simps [simp] :\n \"set_case {} c_empty c_sing c_else = c_empty\"\n \"set_case {x} c_empty c_sing c_else = c_sing x\"\n \"card s > 1 \\ set_case s c_empty c_sing c_else = c_else\"\n \"\\(finite s) \\ set_case s c_empty c_sing c_else = c_else\"", "output": "unfolding set_case_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coeffs_of_int_poly: \"coeffs (of_int_poly (Mp x) :: 'a mod_ring poly) = map of_int (coeffs (Mp x))\"", "output": "apply (rule coeffs_map_poly)\nby (metis M_0 M_M Mp_coeff leading_coeff_0_iff of_int_hom.hom_zero to_int_mod_ring_of_int_M)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rwof_step: \n \"\\ nofail (m0 \\ WHILE cond step); rwof m0 cond step s; cond s \\\n \\ step s \\ SPEC (rwof m0 cond step)\"", "output": "using pw_rwof_step[of m0 cond step s]\nby (simp add: pw_le_iff refine_pw_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_attribute_reads: \n \"reads (get_attribute_locs element_ptr) (get_attribute element_ptr k) h h'\"", "output": "by(auto simp add: get_attribute_impl[unfolded a_get_attribute_def] get_attribute_locs_impl[unfolded a_get_attribute_locs_def] reads_insert_writes_set_right intro!: reads_bind_pure)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strict3[simp,code_unfold]: \" f None y = invalid\"", "output": "by(rule ext, simp add: def_scheme' True_def False_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma node_ptr_kinds_commutes [simp]: \n \"cast node_ptr |\\| object_ptr_kinds h \\ node_ptr |\\| node_ptr_kinds h\"", "output": "apply(auto simp add: node_ptr_kinds_def split: option.splits)[1]\nby (metis (no_types, lifting) ffmember_filter fimage_eqI fset.map_comp is_node_ptr_kind_none node_ptr_casts_commute2 option.distinct(1) option.sel)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valid7[simp]: \"\\ (X \\ Y) = True\"", "output": "by(rule ext, auto simp: valid_def True_def False_def StrongEq_def bot_fun_def bot_option_def None_option_def None_fun_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_msg_inv_ip [simp]:\n \"\\' \\ is_rerr \\ \\ ip \\' = ip \\\"\n \"\\' \\ is_rrep \\ \\ ip \\' = ip \\\"\n \"\\' \\ is_rreq \\ \\ ip \\' = ip \\\"\n \"\\' \\ is_pkt \\ \\ ip \\' = ip \\\"\n \"\\' \\ is_newpkt \\ \\ ip \\' = ip \\\"", "output": "unfolding is_msg_defs\nby (cases \"msg \\\", clarsimp+)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma web_flow_iff: \"web_flow \\ f \\ current \\ f\"", "output": "using bipartite_V\nby(auto simp add: web_flow.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma effective_tensor_compose_distribution2:\"matrix_match A1 A2 B1 B2 \\ \n mat ((row_length A1)*(row_length B1)) \n ((length A2)*(length B2)) \n ((A1 \\ B1) \\(A2 \\B2))\"", "output": "using tensor_compose_distribution2 unfolding matrix_match_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in lbv) top_le_conv [simp]: \"\\ \\\\<^sub>r x = (x = \\)\"", "output": "by (insert semilat) (simp add: top top_le_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GroupByPresentationInducedFun_S_P_id:\n \"GroupByPresentationInducedFun S P id\"", "output": "by ( intro_locales, rule GroupByPresentation_S_P, unfold_locales, rule freeliftid_trivial_P )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma paval_extend: \"ps1 ## ps2 \\ vars a \\ dom ps1 \\ paval a (ps1 + ps2) = paval a ps1\"", "output": "apply(induct a)\napply (auto simp: sep_disj_fun_def domain_conv)\nby (metis domI map_add_comm map_add_dom_app_simps(1) option.sel plus_fun_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma e2stack_stack [simp]:\n \"e2stack (encode_config (ss, rv)) = list_encode (map encode_frame ss)\"", "output": "unfolding e2stack_def\nusing encode_config\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rGamma_series_nonpos_Ints_LIMSEQ: \"z \\ \\\\<^sub>\\\\<^sub>0 \\ rGamma_series z \\ 0\"", "output": "by (elim nonpos_Ints_cases', hypsubst, subst tendsto_cong, rule rGamma_series_minus_of_nat, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parent_child_rel_node_ptr:\n \"(parent, child) \\ parent_child_rel h \\ is_node_ptr_kind child\"", "output": "by(auto simp add: parent_child_rel_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eval_eval_max: \"\\s1 -e1\\v1- n1 \\ t1 ; s2 -e2\\v2- n2\\ t2\\ \\ \n s1 -e1\\v1-max n1 n2\\ t1 \\ s2 -e2\\v2-max n1 n2\\ t2\"", "output": "by (fast intro: eval_mono max.cobounded1 max.cobounded2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sin_cos_squared_add_cpx:\n \"\\*complex_of_real (sin (\\/2)) * (\\*complex_of_real (sin (\\/2))) -\n complex_of_real (cos (\\/2)) * complex_of_real (cos (\\/2)) = -1\"", "output": "apply (auto simp add: algebra_simps)\nby (metis of_real_add of_real_hom.hom_one of_real_mult sin_cos_squared_add3)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parallel_oracle_split_asm:\n \"P (parallel_oracle s1s2 lr) \\\n \\ ((\\s1 s2 x. s1s2 = (s1, s2) \\ lr = Inl x \\ \\ P (map_spmf (map_prod Inl (\\s1'. (s1', s2))) (left s1 x))) \\\n (\\s1 s2 y. s1s2 = (s1, s2) \\ lr = Inr y \\ \\ P (map_spmf (map_prod Inr (Pair s1)) (right s2 y))))\"", "output": "by(cases s1s2; cases lr) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_ancestors_not_node:\n assumes \"h \\ get_ancestors ptr \\\\<^sub>r ancestors\"\n assumes \"\\is_node_ptr_kind ptr\"\n shows \"ancestors = [ptr]\"", "output": "using assms\napply(simp add: get_ancestors_def)\nby(auto elim!: bind_returns_result_E2 split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Quotient3_tmap_Abs_Rep:\n \"\\Quotient3 R1 Abs1 Rep1; Quotient3 R2 Abs2 Rep2\\\n \\ tmap Abs1 Abs2 (tmap Rep1 Rep2 ts) = ts\"", "output": "by(drule abs_o_rep)+(simp add: tllist.map_comp tmap_id_id)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma witness_weights:\"witness_l rs = insert_weights shared_weights (deep_model_l rs) witness_weights\"", "output": "by (metis (full_types) insert_extract_weights_cong_shared insert_extract_weights_cong_unshared shared_weight_net_witness witness_is_deep_model witness_weights_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exec_gpv_pauses:\n \"exec_gpv callee (pauses xs) s =\n map_spmf (Pair ()) (foldl_spmf (map_fun id (map_fun id (map_spmf snd)) callee) (return_spmf s) xs)\"", "output": "by(induction xs arbitrary: s)(simp_all add: split_def foldl_spmf_Cons' map_bind_spmf bind_map_spmf o_def del: foldl_spmf_Cons)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem se_mono_for_sub :\n assumes \"se c1 l c1'\"\n assumes \"se c2 l c2'\"\n assumes \"c2 \\ c1\"\n shows \"c2' \\ c1'\"", "output": "using assms\nby ((cases l), (simp add : ), (simp add : states_of_se_assume subsums_def, blast), (simp add : states_of_se_assign subsums_def, blast))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma natural_transformation_\\:\n shows \"natural_transformation VVV.comp vcomp HoHV HoVH \\\\<^sub>S\\<^sub>B\"", "output": "using assoc_def \\.natural_transformation_axioms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma substInputChain[simp]:\n fixes xvec :: \"name list\"\n and N :: \"'a\"\n and P :: \"('a, 'b, 'c) psi\"\n and yvec :: \"name list\"\n and Tvec :: \"'a list\"\n\n assumes \"xvec \\* yvec\"\n and \"xvec \\* Tvec\"\n\n shows \"subs' (inputChain xvec N P) yvec Tvec = inputChain xvec (substTerm N yvec Tvec) (subs P yvec Tvec)\"", "output": "using assms\nby(induct xvec) (auto simp add: psi.inject)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parse_nodes [intro]:\n \"is_parser parse_nodes\"", "output": "unfolding is_parser_def\nusing parse_nodes_help\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_of_simp:\n \"state_mem_defs.map_of lookup_trace = map_of o snd\"", "output": "unfolding state_mem_defs.map_of_def lookup_trace_def\nby (rule ext) (auto split: prod.split option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_theory_imp_is_std_sig: \"wf_theory \\ \\ is_std_sig (sig \\)\"", "output": "by (cases \\ rule: theory_full_exhaust) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma edges_less_eq_linorder: \"is_linorder_rel edges_less_eq\"", "output": "unfolding edges_less_eq_def is_linorder_rel_def\nby (metis linear order_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma essential_\\: fixes \\ (structure) shows \"essential \\ (B \\) (\\ S) = essential \\ (B \\) S\"", "output": "by(subst essential_RF[symmetric])(simp only: RF_essential essential_RF)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma special_soundness: \n shows \"\\_OR.special_soundness\"", "output": "unfolding \\_OR.special_soundness_def\nusing ss prod.collapse\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valid_plan_then_lookup_Some: \"valid_plan \\s \\ (\\\\ \\ set \\s. lookup_operator \\ \\ None)\"", "output": "using path_to_then_lookup_Some\nby(simp add: valid_plan_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reachNT_reach: assumes \"reachNT s\" shows \"reach s\"", "output": "using assms\nby induct (auto intro: reach.intros, metis reach.Step snd_conv validTrans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Infinitesimal_monad_eq: \"e \\ Infinitesimal \\ monad (x + e) = monad x\"", "output": "by (fast intro!: Infinitesimal_add_approx_self [THEN approx_sym] approx_monad_iff [THEN iffD1])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_no_adm_edges[simp]: \"adm_edges pp_init_f pp_init_l = {}\"", "output": "unfolding adm_edges_def pp_init_l_def\nusing card_V_ge2\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma DN_in_hom [intro]:\n assumes \"arr \\\"\n shows \"\\DN \\ : DN (src \\) \\\\<^sub>B DN (trg \\)\\\"\n and \"\\DN \\ : DN (dom \\) \\\\<^sub>B DN (cod \\)\\\"", "output": "using assms DN_def arr_char [of \\] B.vconn_implies_hpar(1-2) E.eval_in_hom(1) B.in_hhom_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_atoms_equiv_bounds:\n \"{} \\ \\ (init t)\"", "output": "using init_bounds unfolding atoms_equiv_bounds.simps satisfies_bounds.simps in_bounds.simps satisfies_atom_set_def unfolding bound_compare_defs\nby (auto simp: indexl_def indexu_def boundsl_def boundsu_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inner_loop2_correct:\n assumes \"(succl, succ) \\ \\Id\\list_set_rel\"\n (*assumes \"N \\ dom PRED\"*)\n assumes [simplified, simp]: \n \"(dsti,dst)\\Id\" \"(ui, u) \\ Id\" \"(PREDi, PRED) \\ Id\" \"(Ni, N) \\ Id\"\n shows \"inner_loop2 dsti succl ui PREDi Ni \n \\ \\ Id (add_succ_spec dst succ u PRED N)\"", "output": "apply simp\napply (rule conc_trans[OF inner_loop2_refine inner_loop_refine, simplified])\nusing assms(1-2)\napply (simp_all) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hom_inverse[hom_distribs]: \"hom (inverse x) = inverse (hom x)\"", "output": "by (metis hom_mult hom_one hom_zero inverse_unique inverse_zero right_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cong3_transitivity:\n assumes \"A0 B0 C0 Cong3 A1 B1 C1\" and\n \"A1 B1 C1 Cong3 A2 B2 C2\"\n shows \"A0 B0 C0 Cong3 A2 B2 C2\"", "output": "by (meson assms(1) assms(2) Cong3_def cong_inner_transitivity not_cong_3412)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lm012: \n \"allAllocations N {} \\ {{}}\"", "output": "using emptyset_part_emptyset3 rangeEmpty characterizationallAllocations mem_Collect_eq subsetI vimage_def\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma satA_o:\n\"satA (int \\ o \\) at = satA \\ (substA \\ at)\"", "output": "by (cases at, simp_all add: int_o_subst int_o[of \\ \\])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HMA_V_add [transfer_rule]: \"(HMA_V ===> HMA_V ===> HMA_V) (+) (+) \"", "output": "unfolding rel_fun_def HMA_V_def\nby (auto simp: from_hma\\<^sub>v_add)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_mode_get_shadow_root_is_l_set_mode_get_shadow_root [instances]:\n \"l_set_mode_get_shadow_root type_wf set_mode set_mode_locs get_shadow_root\n get_shadow_root_locs\"", "output": "using set_mode_is_l_set_mode get_shadow_root_is_l_get_shadow_root\napply(simp add: l_set_mode_get_shadow_root_def l_set_mode_get_shadow_root_axioms_def)\nusing set_mode_get_shadow_root\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma measure_spmf_return_spmf: \"measure_spmf (return_spmf x) = Giry_Monad.return (count_space UNIV) x\"", "output": "by(rule measure_eqI)(simp_all add: measure_spmf_def emeasure_distr space_restrict_space emeasure_restrict_space indicator_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma randomElLemma:\n assumes \"set list \\ {}\"\n shows \"randomEl list random \\ set list\"", "output": "using assms\nby (simp add: randomEl_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inverse_mat_base_case_2_R: \n shows \"inverts_mat (mat_of_rows_list 3 [[1,1,1], [0,1,0], [1,0,-1]]::rat mat) (mat_of_rows_list 3 [[1/2, -1/2, 1/2], [0, 1, 0], [1/2, -1/2, -1/2]]:: rat mat)\"", "output": "unfolding inverts_mat_def mat_of_rows_list_def mat_eq_iff\napply auto unfolding less_three\nby (auto simp add: scalar_prod_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma g_1_lemma:\n fixes res :: \"int \\ int\"\n assumes \"0 \\ fst res\" \"fst res < p\" \"0 \\ snd res\" \"snd res < q\"\n shows \"P_1 res (g_1 res)\"", "output": "using assms P_1_lemma [of res] theI' [of \"P_1 res\"] g_1_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma epath_stl_smap_fst[simp]:\n \"epath (smap fst stepSs) \\\n epath (smap fst (stl stepSs))\"", "output": "by (erule epath.cases) (auto simp del: stream.map_sel simp add: stream.map_sel[symmetric])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_parent_reads: \"reads get_parent_locs (get_parent node_ptr) h h'\"", "output": "using get_child_nodes_reads[unfolded reads_def]\nby(auto simp add: get_parent_def get_parent_locs_def intro!: reads_bind_pure reads_subset[OF check_in_heap_reads] reads_subset[OF get_child_nodes_reads] reads_subset[OF return_reads] reads_subset[OF object_ptr_kinds_M_reads] filter_M_reads filter_M_pure_I bind_pure_I)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma restrict_bind_spmf: \"bind_spmf p g \\ A = p \\ (\\x. g x \\ A)\"", "output": "by(auto simp add: bind_spmf_def restrict_bind_pmf cong del: option.case_cong_weak cong: option.case_cong intro!: bind_pmf_cong split: option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ennsqrt_strict_mono:\n \"strict_mono ennsqrt\"", "output": "unfolding ennsqrt_def\napply (rule strict_mono_compose[OF ennexp_strict_mono])\napply (rule strict_mono_compose[OF _ eln_strict_mono])\nby (auto simp add: ereal_less_divide_pos ereal_mult_divide strict_mono_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proj_tuple_replicate: \"(\\i. i \\ set bs \\ \\i) \\ length bs = length as \\\n proj_tuple bs as = replicate (length bs) None\"", "output": "by (induction bs as rule: proj_tuple.induct) fastforce+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma advantage\\<^sub>1_nonneg: \"advantage\\<^sub>1 \\ \\ \\ 0\"", "output": "by(simp add: advantage\\<^sub>1_def pmf_nonneg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma less_eq_prod_simps [simp]:\n \"(x1, x2) \\ (y1, y2) \\ x1 \\\\<^sub>a y1 \\ x1 \\\\<^sub>a y1 \\ x2 \\\\<^sub>b y2\"", "output": "by(simp add: less_eq_prod_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_singleton_real_normed_is_perfect_space[simp]: \\class.perfect_space (open :: 'a::{not_singleton,real_normed_vector} set \\ bool)\\", "output": "apply standard\nby (metis UNIV_not_singleton clopen closed_singleton empty_not_insert)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordIso_natLeq_on_imp_finite:\n\"|A| =o natLeq_on n \\ finite A\"", "output": "unfolding ordIso_def iso_def[abs_def]\nby (auto simp: Field_natLeq_on bij_betw_finite)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valid_path_part_circlepath [simp]: \"valid_path (part_circlepath z r s t)\"", "output": "unfolding valid_path_def\nby (auto simp: C1_differentiable_on_eq vector_derivative_works vector_derivative_part_circlepath has_vector_derivative_part_circlepath intro!: C1_differentiable_imp_piecewise continuous_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma L_measurable[measurable]:\n \"Measurable.pred S (L os)\"", "output": "apply (induction os)\napply (simp; fail) subgoal premises that for o os\nby(subst L_Cons) (intro Measurable.pred_intros_logic measurable_compose[OF measurable_shd] measurable_compose[OF measurable_stl that]; measurable) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma one_le_inverse_iff: \"1 \\ inverse x \\ 0 < x \\ x \\ 1\"", "output": "by (metis local.dual_order.strict_trans1 local.inverse_1 local.inverse_le_imp_le local.inverse_positive_iff_positive local.one_le_inverse local.zero_less_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_FvarsT_psubstTD:\nassumes \"y \\ FvarsT (psubstT r txs)\"\nand \"r \\ atrm\" and \"snd ` (set txs) \\ var\" and \"fst ` (set txs) \\ atrm\"\nand \"distinct (map snd txs)\"\nshows \"y \\ (FvarsT r - snd ` (set txs)) \\\n (\\ {if x \\ FvarsT r then FvarsT t else {} | t x . (t,x) \\ set txs})\"", "output": "using assms FvarsT_psubstT\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filterlim_inverse_at_right_top: \"LIM x at_top. inverse x :> at_right (0::real)\"", "output": "unfolding filterlim_at\nby (auto simp: eventually_at_top_dense) (metis tendsto_inverse_0 filterlim_mono at_top_le_at_infinity order_refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Smith_normal_form_upt_k_0[simp]: \"Smith_normal_form_upt_k A 0\"", "output": "unfolding Smith_normal_form_upt_k_def unfolding isDiagonal_upt_k_def isDiagonal_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iteration_refl: \"1 \\ x\\<^sup>\\\"", "output": "using local.iteration_unfoldl local.order_prop\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_strong_tricolour_inv:\n \"\\ obj_mark ` ran (sys_heap \\GST = s, HST = []\\\\) \\ {gc_fM \\GST = s, HST = []\\\\}; sys_fM \\GST = s, HST = []\\\\ = gc_fM \\GST = s, HST = []\\\\ \\\n \\ strong_tricolour_inv \\GST = s, HST = []\\\\\"", "output": "unfolding strong_tricolour_inv_def ran_def white_def\nby (auto split: obj_at_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sup_pres_multr: \"sup_pres (\\(z::'a::proto_near_quantale). z \\ y)\"", "output": "using Sup_pres_multr Sup_sup_pres\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nsqn\\<^sub>r_zero [simp]:\n \"\\dsn dsk flag hops nhip pre. nsqn\\<^sub>r (0, dsk, flag, hops, nhip, pre) = 0\"", "output": "unfolding nsqn\\<^sub>r_def\nby clarsimp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zip_last :\n assumes \"length r1 > 0\"\n and \"length r1 = length r2\"\nshows \"last (r1 || r2) = (last r1, last r2)\"", "output": "by (metis (no_types) assms(1) assms(2) less_nat_zero_code list.size(3) map_fst_zip zip_Nil zip_last)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iso_comp:\n assumes \"ChamberComplexIsomorphism Y Z g\"\n shows \"ChamberComplexIsomorphism X Z (g\\f)\"", "output": "by ( rule ChamberComplexIsomorphism.intro, rule comp, rule ChamberComplexIsomorphism.axioms(1), rule assms, unfold_locales, rule bij_betw_trans, rule bij_betw_vertices, rule ChamberComplexIsomorphism.bij_betw_vertices, rule assms ) (simp add: setsetmapim_comp surj_simplex_map assms ChamberComplexIsomorphism.surj_simplex_map )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in encoding) indRelTEQ_impl_TRel_is_weak_reduction_contrasimulation:\n fixes TRel :: \"('procT \\ 'procT) set\"\n assumes conSim: \"weak_reduction_contrasimulation (indRelTEQ TRel) (STCal Source Target)\"\n shows \"weak_reduction_contrasimulation (TRel\\<^sup>*) Target\"", "output": "using conSim indRelTEQ.target[where TRel=\"TRel\"] indRelTEQ_to_TRel(4)[where TRel=\"TRel\"] trans_closure_of_TRel_refl_cond rel_with_target_impl_reflC_transC_TRel_is_weak_reduction_contrasimulation[where Rel=\"indRelTEQ TRel\" and TRel=\"TRel\"]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma free_vars_integrate_vars[simp]:\n \"free_vars (integrate_vars \\ vs e) = free_vars e - set vs\"", "output": "by (induction vs arbitrary: e) (auto simp: integrate_vars_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ftype_preservation''':\n \"\\find_path_f P ctx' cl = Some suffix; wf_program P; (ctx, cld) \\ set suffix\\\n \\ \\prefix' suffix'.\n find_path_rec_f P ctx (cl_fqn (fqn_def (class_name_f cld))) prefix' = Some (prefix' @ suffix') \\ ftype_in_path_f P suffix' f = Some ty \\\n ftype_in_path_f P suffix f = Some ty\"", "output": "apply(cut_tac x = \"(ctx, cld)\" in ftype_preservation''''[of _ _ _ \"[]\", rule_format])\napply(simp add: find_path_f_def)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma T_tree23_of_list: \"T_tree23_of_list as \\ 3*(length as) + 4\"", "output": "using T_join_all[of \"leaves as\"]\nby(simp add: T_tree23_of_list_def T_leaves len_leaves)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mut_del_barrier2_subseteq_mut_mo_valid_ref[locset_cache]: (* FIXME rename *)\n \"mut_m.ins_barrier_locs \\ mut_m.mo_valid_ref_locs\"", "output": "unfolding mut_m.ins_barrier_locs_def mut_m.mo_valid_ref_locs_def\nby (auto intro: append_prefixD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma supp_asToHeap: \"supp (asToHeap as) = supp as\"", "output": "by (induct as rule: asToHeap.induct) (simp_all add: exp_assn.supp supp_Nil supp_Cons supp_Pair sup_assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_assoc_eqpoll: \"elts ((a\\b)\\c) \\ elts (a\\(b\\c))\"", "output": "unfolding eqpoll_def\nby (metis sum_assoc_bij)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma OclAnd10[simp]: \"(False and False) = False\"", "output": "by(rule ext,simp add: OclAnd_def None_def invalid_def True_def False_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in insert_impl) insert_modifies:\n \"\\\\. \\\\ {\\} \\p :== PROC insert(\\r,\\p){t. t may_only_modify_globals \\ in [next]}\"", "output": "apply (hoare_rule HoarePartial.ProcRec1)\napply (vcg spec=modifies) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"rec_BitList nil bit0 bit1 (Bit0 xs) = bit0 xs (rec_BitList nil bit0 bit1 xs)\"", "output": "nitpick [expect = none]\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cat_smc_obj_intial[slicing_simps]:\n \"obj_initial (cat_smc \\) a \\ obj_initial \\ a\"", "output": "unfolding obj_initial_def obj_terminal_def unfolding smc_op_simps slicing_simps .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma trace_rest_aux_append:\n \"trace_rest_aux rest p (tr @ tr') = trace_rest_aux rest (trace_rest_aux rest p tr) tr'\"", "output": "by(induction p tr rule: trace_rest_aux.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_element_get_child_nodes_is_l_new_element_get_child_nodes [instances]:\n \"l_new_element_get_child_nodes type_wf known_ptr get_child_nodes get_child_nodes_locs\"", "output": "using new_element_is_l_new_element get_child_nodes_is_l_get_child_nodes\napply(auto simp add: l_new_element_get_child_nodes_def l_new_element_get_child_nodes_axioms_def)[1]\nusing get_child_nodes_new_element new_element_no_child_nodes\nby fast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma i_cut_Un_disj: \"\n \\ cut_op = (\\<) \\ cut_op = (\\\\) \\\n cut_op = (\\>) \\ cut_op = (\\\\) \\\n \\ cut_op (A \\ B) t = cut_op A t \\ cut_op B t\"", "output": "apply (drule i_cut_set_restriction_disj[where f=\"\\I. cut_op I t\"], simp)\nby (rule set_restriction_Un)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ta_union_wrap_rta:\n fixes TA TA'\n assumes TA: \"ranked_tree_automaton TA A\"\n assumes TA': \"ranked_tree_automaton TA' A\"\n shows \"ranked_tree_automaton (ta_union_wrap TA TA') A\"", "output": "proof - interpret ta: ranked_tree_automaton TA A\nusing TA . interpret ta': ranked_tree_automaton TA' A\nusing TA' . show ?thesis\nby (unfold ta_union_wrap_def) (simp add: ta_union_rta)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wsX_if1:\n assumes \"wsX G xcs\"\n shows \"(( atom ` fst ` set xcs) \\ atom_dom G) \\ List.distinct (List.map fst xcs)\"", "output": "using assms\nby(induct rule: wsX.induct,force+ )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma supp_of_atom_list:\n fixes as::\"atom list\"\n shows \"supp as = set as\"", "output": "by (induct as) (simp_all add: supp_Nil supp_Cons supp_atom)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in incidence_system) image_set_system_wellformed: \n \"incidence_system (f ` \\) (blocks_image \\ f)\"", "output": "by (unfold_locales, auto simp add: blocks_image_def) (meson image_eqI wf_invalid_point)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_pddl_ground_act_is_sound_opr:\n assumes \"wf_ground_action g_opr\"\n shows \"sound_opr g_opr (pddl_opr_to_act g_opr)\"", "output": "using wf_eff_impt_wf_eff_inst wf_eff_pddl_ground_act_is_sound_opr assms\nby (cases g_opr; auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nat_term_compare_inv_conv: \"nat_term_compare_inv to = key_compare (key_order_of_nat_term_order_inv to)\"", "output": "unfolding key_order_of_nat_term_order_inv_def\nby (rule sym, rule Abs_key_order_inverse, simp add: comparator_nat_term_compare_inv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma evaldjf_ex: \"Ifm bs (evaldjf f ps) = (\\ p \\ set ps. Ifm bs (f p))\"", "output": "by (induct ps) (simp_all add: evaldjf_def djf_Or)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma U0_in_NUM: \"U\\<^sub>0 \\ NUM\"", "output": "using prenum_in_R2 U0_altdef\nby (intro NUM_I[of prenum]; force)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pi_dom[icf_proper_iteratorI]:\n assumes P: \"proper_it it it'\"\n shows \"proper_it (map_iterator_dom it) \n (map_iterator_dom it')\"", "output": "unfolding proper_it_def\napply (rule proper_itE[OF P])\nby (auto simp: map_iterator_dom_foldli_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dgrad_sig_set_closed_mult_scalar:\n \"dickson_grading d \\ p \\ punit_dgrad_max_set d \\ r \\ dgrad_sig_set' j d \\ p \\ r \\ dgrad_sig_set' j d\"", "output": "unfolding dgrad_sig_set'_def\nby (auto intro: dgrad_p_set_closed_mult_scalar sig_inv_set_closed_mult_scalar)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma psubst_ball:\n\"\\ \\ fmla \\ y \\ var \\ snd ` set txs \\ var \\ t \\ atrm \\\n fst ` set txs \\ trm \\ fst ` set txs \\ atrm \\ y \\ snd ` set txs \\ y \\ (\\t \\ fst ` set txs. FvarsT t) \\\n distinct (map snd txs) \\\n psubst (ball y t \\) txs = ball y (psubstT t txs) (psubst \\ txs)\"", "output": "unfolding ball_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_point_to_blocks_finite: \"finite_incidence_system (add_point p) (add_point_to_blocks p bs)\"", "output": "using add_point_blocks_wf add_point_finite finite_incidence_system.finite_sets incidence_system.finite_sysI\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interaction_bounded_by_PauseI [interaction_bound]:\n \"(\\input. interaction_bounded_by consider (c input) (n input))\n \\ interaction_bounded_by consider (Pause out c) (if consider out then 1 + (SUP input. n input) else (SUP input. n input))\"", "output": "by(auto simp add: iadd_is_0 enat_add_sub_same intro: interaction_bounded_by_mono SUP_upper)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Arg2pi_real: \"z \\ \\ \\ Arg2pi z = (if 0 \\ Re z then 0 else pi)\"", "output": "using Arg2pi_eq_0 Arg2pi_eq_0_pi\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stable_translation_length_nonneg [simp]:\n \"stable_translation_length f \\ 0\"", "output": "unfolding stable_translation_length_def\nby (rule cInf_greatest, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wprepare_erase_Bk_nonempty_list[simp]: \"\\lm \\ []; wprepare_erase m lm (b, Bk # list)\\ \\ list \\ []\"", "output": "apply(simp only: wprepare_invs, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diffconst_sound_lemma:\"sound (proof_result DiffConstProof)\"", "output": "apply(rule\nproof_sound) unfolding DiffConstProof_def\nby (auto simp add: prover DiffConstProof_def DiffConstSubst_def Equals_def empty_def TUadmit_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fail_reachable_ob :\n assumes \"\\ M1 \\ M2\"\n and \"well_formed M1\"\n and \"well_formed M2\"\n and \"observable M2\"\n and \"productF M2 M1 FAIL PM\"\nobtains p\nwhere \"path PM p (initial PM)\" \"target p (initial PM) = FAIL\"", "output": "using assms fail_reachable\nby (metis FSM.reachable_target_elim)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bin_last_bl_to_bin: \"bin_last (bl_to_bin bs) \\ bs \\ [] \\ last bs\"", "output": "by(cases \"bs = []\")(auto simp add: bl_to_bin_def last_bin_last'[where w=0])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assumes 1: \"~x0\"\n and 2: \"~x30\"\n and 3: \"~x29\"\n and 4: \"~x59\"\n and 5: \"x1 | x31 | x0\"\n and 6: \"x2 | x32 | x1\"\n and 7: \"x3 | x33 | x2\"\n and 8: \"x4 | x34 | x3\"\n and 9: \"x35 | x4\"\n and 10: \"x5 | x36 | x30\"\n and 11: \"x6 | x37 | x5 | x31\"\n and 12: \"x7 | x38 | x6 | x32\"\n and 13: \"x8 | x39 | x7 | x33\"\n and 14: \"x9 | x40 | x8 | x34\"\n and 15: \"x41 | x9 | x35\"\n and 16: \"x10 | x42 | x36\"\n and 17: \"x11 | x43 | x10 | x37\"\n and 18: \"x12 | x44 | x11 | x38\"\n and 19: \"x13 | x45 | x12 | x39\"\n and 20: \"x14 | x46 | x13 | x40\"\n and 21: \"x47 | x14 | x41\"\n and 22: \"x15 | x48 | x42\"\n and 23: \"x16 | x49 | x15 | x43\"\n and 24: \"x17 | x50 | x16 | x44\"\n and 25: \"x18 | x51 | x17 | x45\"\n and 26: \"x19 | x52 | x18 | x46\"\n and 27: \"x53 | x19 | x47\"\n and 28: \"x20 | x54 | x48\"\n and 29: \"x21 | x55 | x20 | x49\"\n and 30: \"x22 | x56 | x21 | x50\"\n and 31: \"x23 | x57 | x22 | x51\"\n and 32: \"x24 | x58 | x23 | x52\"\n and 33: \"x59 | x24 | x53\"\n and 34: \"x25 | x54\"\n and 35: \"x26 | x25 | x55\"\n and 36: \"x27 | x26 | x56\"\n and 37: \"x28 | x27 | x57\"\n and 38: \"x29 | x28 | x58\"\n and 39: \"~x1 | ~x31\"\n and 40: \"~x1 | ~x0\"\n and 41: \"~x31 | ~x0\"\n and 42: \"~x2 | ~x32\"\n and 43: \"~x2 | ~x1\"\n and 44: \"~x32 | ~x1\"\n and 45: \"~x3 | ~x33\"\n and 46: \"~x3 | ~x2\"\n and 47: \"~x33 | ~x2\"\n and 48: \"~x4 | ~x34\"\n and 49: \"~x4 | ~x3\"\n and 50: \"~x34 | ~x3\"\n and 51: \"~x35 | ~x4\"\n and 52: \"~x5 | ~x36\"\n and 53: \"~x5 | ~x30\"\n and 54: \"~x36 | ~x30\"\n and 55: \"~x6 | ~x37\"\n and 56: \"~x6 | ~x5\"\n and 57: \"~x6 | ~x31\"\n and 58: \"~x37 | ~x5\"\n and 59: \"~x37 | ~x31\"\n and 60: \"~x5 | ~x31\"\n and 61: \"~x7 | ~x38\"\n and 62: \"~x7 | ~x6\"\n and 63: \"~x7 | ~x32\"\n and 64: \"~x38 | ~x6\"\n and 65: \"~x38 | ~x32\"\n and 66: \"~x6 | ~x32\"\n and 67: \"~x8 | ~x39\"\n and 68: \"~x8 | ~x7\"\n and 69: \"~x8 | ~x33\"\n and 70: \"~x39 | ~x7\"\n and 71: \"~x39 | ~x33\"\n and 72: \"~x7 | ~x33\"\n and 73: \"~x9 | ~x40\"\n and 74: \"~x9 | ~x8\"\n and 75: \"~x9 | ~x34\"\n and 76: \"~x40 | ~x8\"\n and 77: \"~x40 | ~x34\"\n and 78: \"~x8 | ~x34\"\n and 79: \"~x41 | ~x9\"\n and 80: \"~x41 | ~x35\"\n and 81: \"~x9 | ~x35\"\n and 82: \"~x10 | ~x42\"\n and 83: \"~x10 | ~x36\"\n and 84: \"~x42 | ~x36\"\n and 85: \"~x11 | ~x43\"\n and 86: \"~x11 | ~x10\"\n and 87: \"~x11 | ~x37\"\n and 88: \"~x43 | ~x10\"\n and 89: \"~x43 | ~x37\"\n and 90: \"~x10 | ~x37\"\n and 91: \"~x12 | ~x44\"\n and 92: \"~x12 | ~x11\"\n and 93: \"~x12 | ~x38\"\n and 94: \"~x44 | ~x11\"\n and 95: \"~x44 | ~x38\"\n and 96: \"~x11 | ~x38\"\n and 97: \"~x13 | ~x45\"\n and 98: \"~x13 | ~x12\"\n and 99: \"~x13 | ~x39\"\n and 100: \"~x45 | ~x12\"\n and 101: \"~x45 | ~x39\"\n and 102: \"~x12 | ~x39\"\n and 103: \"~x14 | ~x46\"\n and 104: \"~x14 | ~x13\"\n and 105: \"~x14 | ~x40\"\n and 106: \"~x46 | ~x13\"\n and 107: \"~x46 | ~x40\"\n and 108: \"~x13 | ~x40\"\n and 109: \"~x47 | ~x14\"\n and 110: \"~x47 | ~x41\"\n and 111: \"~x14 | ~x41\"\n and 112: \"~x15 | ~x48\"\n and 113: \"~x15 | ~x42\"\n and 114: \"~x48 | ~x42\"\n and 115: \"~x16 | ~x49\"\n and 116: \"~x16 | ~x15\"\n and 117: \"~x16 | ~x43\"\n and 118: \"~x49 | ~x15\"\n and 119: \"~x49 | ~x43\"\n and 120: \"~x15 | ~x43\"\n and 121: \"~x17 | ~x50\"\n and 122: \"~x17 | ~x16\"\n and 123: \"~x17 | ~x44\"\n and 124: \"~x50 | ~x16\"\n and 125: \"~x50 | ~x44\"\n and 126: \"~x16 | ~x44\"\n and 127: \"~x18 | ~x51\"\n and 128: \"~x18 | ~x17\"\n and 129: \"~x18 | ~x45\"\n and 130: \"~x51 | ~x17\"\n and 131: \"~x51 | ~x45\"\n and 132: \"~x17 | ~x45\"\n and 133: \"~x19 | ~x52\"\n and 134: \"~x19 | ~x18\"\n and 135: \"~x19 | ~x46\"\n and 136: \"~x52 | ~x18\"\n and 137: \"~x52 | ~x46\"\n and 138: \"~x18 | ~x46\"\n and 139: \"~x53 | ~x19\"\n and 140: \"~x53 | ~x47\"\n and 141: \"~x19 | ~x47\"\n and 142: \"~x20 | ~x54\"\n and 143: \"~x20 | ~x48\"\n and 144: \"~x54 | ~x48\"\n and 145: \"~x21 | ~x55\"\n and 146: \"~x21 | ~x20\"\n and 147: \"~x21 | ~x49\"\n and 148: \"~x55 | ~x20\"\n and 149: \"~x55 | ~x49\"\n and 150: \"~x20 | ~x49\"\n and 151: \"~x22 | ~x56\"\n and 152: \"~x22 | ~x21\"\n and 153: \"~x22 | ~x50\"\n and 154: \"~x56 | ~x21\"\n and 155: \"~x56 | ~x50\"\n and 156: \"~x21 | ~x50\"\n and 157: \"~x23 | ~x57\"\n and 158: \"~x23 | ~x22\"\n and 159: \"~x23 | ~x51\"\n and 160: \"~x57 | ~x22\"\n and 161: \"~x57 | ~x51\"\n and 162: \"~x22 | ~x51\"\n and 163: \"~x24 | ~x58\"\n and 164: \"~x24 | ~x23\"\n and 165: \"~x24 | ~x52\"\n and 166: \"~x58 | ~x23\"\n and 167: \"~x58 | ~x52\"\n and 168: \"~x23 | ~x52\"\n and 169: \"~x59 | ~x24\"\n and 170: \"~x59 | ~x53\"\n and 171: \"~x24 | ~x53\"\n and 172: \"~x25 | ~x54\"\n and 173: \"~x26 | ~x25\"\n and 174: \"~x26 | ~x55\"\n and 175: \"~x25 | ~x55\"\n and 176: \"~x27 | ~x26\"\n and 177: \"~x27 | ~x56\"\n and 178: \"~x26 | ~x56\"\n and 179: \"~x28 | ~x27\"\n and 180: \"~x28 | ~x57\"\n and 181: \"~x27 | ~x57\"\n and 182: \"~x29 | ~x28\"\n and 183: \"~x29 | ~x58\"\n and 184: \"~x28 | ~x58\"\n shows \"False\"", "output": "using assms\nby argo"} {"instruct": "Given a lemma, please prove it.", "input": "lemma projs [simp]:\n \"\\\\<^sub>2(dsn, dsk, flag, hops, nhip, pre) = dsn\"\n \"\\\\<^sub>3(dsn, dsk, flag, hops, nhip, pre) = dsk\"\n \"\\\\<^sub>4(dsn, dsk, flag, hops, nhip, pre) = flag\"\n \"\\\\<^sub>5(dsn, dsk, flag, hops, nhip, pre) = hops\"\n \"\\\\<^sub>6(dsn, dsk, flag, hops, nhip, pre) = nhip\"\n \"\\\\<^sub>7(dsn, dsk, flag, hops, nhip, pre) = pre\"", "output": "by (clarsimp simp: proj2_def proj3_def proj4_def proj5_def proj6_def proj7_def)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_rel_range[relator_props]: \"\\Range Ra=UNIV; Range Rb=UNIV\\ \n \\ Range (\\Ra,Rb\\prod_rel) = UNIV\"", "output": "apply (auto simp: prod_rel_def)\nby (metis Range_iff UNIV_I)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma treewidth_upper_bound_ex:\n \"\\ TreeDecomposition G (T :: nat Graph) bag; TreeDecomposition.width T bag \\ n \\ \\ treewidth \\ n\"", "output": "unfolding treewidth_def\nby (metis (mono_tags, lifting) Min_le dual_order.trans mem_Collect_eq treewidth_cards_finite)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R20 [simp]: \"pmf (sds R20) a = 0\" \"pmf (sds R20) c = 0\" \"pmf (sds R20) d = 1 - pmf (sds R20) b\"", "output": "using R46_R20.strategyproofness(1) lottery_conditions[OF R20.wf]\nby (auto simp del: pmf_nonneg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_on_norm_id [continuous_intros]: \"continuous_on S norm\"", "output": "by (intro continuous_on_id continuous_on_norm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gval_fold_equiv_gval_foldr:\n \"gval (fold gAnd G (Bc True)) s = gval (foldr gAnd G (Bc True)) s\"", "output": "proof - have \"gval (fold gAnd G (Bc True)) s = gval (fold gAnd (rev G) (Bc True)) s\"\nusing gval_fold_equiv_fold_rev\nby force then show ?thesis\nby (simp add: foldr_conv_fold)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assigned_nodes_pure [simp]: \"pure (assigned_nodes slot) h\"", "output": "by(auto simp add: assigned_nodes_def intro!: bind_pure_I filter_M_pure_I)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inj_image_filter_cartesian_product_alt:\n \"inj_image_filter_cartesian_product f s1 s2 ==\n iterate_to_set s3.empty s3.ins_dj (set_iterator_image_filter f (\n set_iterator_product (s1.iteratei s1) (\\_. s2.iteratei s2)))\"", "output": "unfolding inj_image_filter_cartesian_product_def iterate_to_set_alt_def set_iterator_image_filter_def set_iterator_product_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma liftE_handleE' [simp]: \"((liftE a) b) = liftE a\"", "output": "apply (clarsimp simp: liftE_def handleE'_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_heap_merge:\n assumes \"is_heap t1\" \"is_heap t2\"\n shows \"is_heap (merge t1 t2)\"", "output": "using assms\nby (auto simp add: merge_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma of_rat_of_int_eq [simp]: \"of_rat (of_int z) = of_int z\"", "output": "by (cases z rule: int_diff_cases) (simp add: of_rat_diff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_remdups_conv_remdups [simp]:\n \"equal_base.list_remdups (=) = List.remdups\"", "output": "unfolding equal_base.list_remdups_def List.remdups_def list_member_conv_member List.member_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma Append_preserves_ardenable:\n \"ardenable rhs \\ ardenable (Append_rexp_rhs rhs r)\"", "output": "apply (auto simp: ardenable_def Append_rexp_rhs_def)\nby (case_tac x, auto simp: conc_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eNorm_zero [simp]:\n \"eNorm N 0 = 0\"", "output": "by (metis eNorm_cmult abs_zero ennreal_0 mult_zero_left real_vector.scale_zero_left)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma arc_to_block_to_ends_swap: \"{snd (arc_to_ends G e), fst (arc_to_ends G e)} = arc_to_block e\"", "output": "using arc_to_block_to_ends\nby (simp add: arc_to_block_to_ends insert_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wsorted_map\\[simp]: \"wsorted' s \\ wsorted (map \\ s)\"", "output": "by(auto simp: wsorted'_def sorted_wrt_map)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem Theorem_1_COP:\n \"\\nonbossy ds Contracts.cop\"", "output": "using ContractsWithBilateralSubstitutesAndIRC.Theorem_1 Theorem_1 mechanism_stable_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n \\_ne_0[simp]: \"\\ \\ 0\" and\n \\_ne_1[simp]: \"\\ \\ 1\" and\n \\_ne_of_nat[simp]: \"\\ \\ of_nat m\" and\n \\_ne_numeral[simp]: \"\\ \\ numeral n\"", "output": "using zero_ne_\\ one_ne_\\ of_nat_ne_\\ numeral_ne_\\\nby metis+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma create_alt_def[code]: \"create = State (\\a. (next a, next a))\"", "output": "unfolding create_def State_Monad.update_def State_Monad.get_def State_Monad.set_def State_Monad.bind_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma S_transform_Conj [simp]:\n assumes \"finite (supp xset)\"\n shows \"S_transform (Conj xset) = Conj (map_bset S_transform xset)\"", "output": "using assms unfolding S_transform_def\nby (simp, simp add: Conj_def bset.map_comp o_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convert_closed:\n shows \"\\i. i \\ set_fml (fst (convert fml)) \\ i < length (snd (convert fml))\"", "output": "unfolding convert_def Let_def\napply (auto simp add: fml.set_map)\nby (simp add: index_of_lookup(1) poly_list_set_fml)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_concat:\nassumes \"path f nl1\" and \"path f ((last nl1) # nl2)\"\nshows \"path f (nl1 @ nl2)\"", "output": "using assms\napply(induct rule: path.induct)\napply simp\nby (metis append_Cons last.simps list.simps(3) path.Ind)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma while_zero_zero:\n \"(x \\ bot) \\ bot = x \\ bot\"", "output": "by (metis order.antisym mult_left_zero sup_bot_left while_left_unfold while_sub_associative while_mult_sub_while_while)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma enqueue_new_thread_eq_Nil [simp]:\n \"enqueue_new_thread queue nta = [] \\ queue = [] \\ (\\t b. nta = ThreadExists t b)\"", "output": "by(cases nta) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_ok_sp_generalize2:\n assumes \"is_ok (sp F xs (replicate n None))\"\n shows \"is_ok (sp F (map generalize_instr xs) (replicate n None))\"", "output": "using assms is_ok_sp_generalize\nby (metis Ex_list_of_length map_replicate_const)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fMin_less_Length[simp]: \"x |\\| m1\\<^bsup>\\\\<^esup>k \\ fMin (m1\\<^bsup>\\\\<^esup>k) < Length \\\"", "output": "by transfer (force elim: order.strict_trans2[OF MSB_greater, rotated -1] intro: fMin_in split: order.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma results'_gpv_Done [simp]: \"results'_gpv (Done x) = {x}\"", "output": "by(auto intro: results'_gpvI elim: results'_gpv_cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma JVM_states_unfold: \n \"states P mxs mxl \\ err(opt((Union {list n (types P) |n. n <= mxs}) \\\n list mxl (err(types P))))\"", "output": "apply (unfold states_def sl_def Opt.esl_def Err.sl_def stk_esl_def loc_sl_def Product.esl_def Listn.sl_def upto_esl_def SemiType.esl_def Err.esl_def)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in network_with_ops) apply_operations_empty [simp]:\n shows \"apply_operations [] = Some initial_state\"", "output": "by(auto simp add:\napply_operations_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sets_D: \"sets D = sets (stream_space (\\\\<^sub>M s\\UNIV. count_space UNIV))\"", "output": "by (intro sets_stream_space_cong sets_PiM_cong) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma t_stop_nonneg: \"0 \\ t_stop\"", "output": "unfolding t_stop_def\nusing ego2.t_stop_nonneg pos_react\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_rerr_asm [dest!]:\n assumes \"\\' \\ is_rerr \\\"\n shows \"(\\dests' sip'.\n msg \\ = Rerr dests' sip' \\\n \\' = \\\\ dests := dests', sip := sip' \\)\"", "output": "using assms unfolding is_rerr_def\nby (cases \"msg \\\") simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_nonempty_carrier_has_minimum:\n assumes \"carrier \\ {}\"\n shows \"\\e \\ carrier. \\m \\ carrier. m \\[relation] e\"", "output": "using finite_nempty_preorder_has_min[of carrier relation] assms \\finite carrier\\ reflexivity total transitivity\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dy_fake_chan_extr_insert_parts:\n \"M \\ dy_fake_chan bad IK CH \\\n parts (extr bad IK (insert M CH)) \\ parts (extr bad IK CH) \\ dy_fake_msg bad IK CH\"", "output": "by (drule dy_fake_chan_extr_insert [THEN parts_mono], auto simp add: dy_fake_msg_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mpath_weight'_correct: \"\\dinvarm (wl,res)\\ \\\n mpath_weight' (res v) = path_weight' (\\r res v)\n \"", "output": "unfolding dinvarm_def res_invarm_def \\r_def\nby (auto split: option.split option.split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reachable_If: \"reachable (IF b THEN c1 ELSE c2) \\\n {IF b THEN c1 ELSE c2} \\ reachable c1 \\ reachable c2\"", "output": "by(auto simp: reachable_def dest!: If_starD)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem \"\\ sudoku\n x11 x12 1 x14 x15 4 x17 x18 x19\n x21 x22 x23 x24 6 x26 3 x28 5 \n x31 x32 x33 9 x35 x36 x37 x38 x39\n 8 x42 x43 x44 x45 x46 7 x48 3 \n x51 x52 x53 x54 x55 x56 x57 2 8 \n 5 x62 x63 x64 7 x66 6 x68 x69\n 3 x72 x73 x74 8 x76 x77 x78 6 \n x81 x82 9 2 x85 x86 x87 x88 x89\n x91 4 x93 x94 x95 1 x97 x98 x99\"", "output": "nitpick [expect=genuine] oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma insert_before_wf_is_l_insert_before_wf [instances]:\n \"l_insert_before_wf Shadow_DOM.heap_is_wellformed ShadowRootClass.type_wf\nShadowRootClass.known_ptr ShadowRootClass.known_ptrs\n Shadow_DOM.insert_before Shadow_DOM.get_child_nodes\"", "output": "apply(auto simp add: l_insert_before_wf_def l_insert_before_wf_axioms_def instances)[1]\nusing insert_before_removes_child\napply fast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes \"z \\ 0\"\n shows Arg_eq: \"z = of_real(norm z) * exp(\\ * Arg z)\"", "output": "using assms exp_Ln exp_eq_polar\nby (auto simp: Arg_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma st_proj2_inv_ne_top: \"st_proj2_inv xa \\ bot_sphere\"", "output": "by transfer (auto simp: divide_simps add_nonneg_eq_0_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma NO_sub:\"OadmitFO \\ ODE A \\ B \\ A \\ OadmitFO \\ ODE B\"", "output": "by(induction ODE, auto simp add: OUadmitFO_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma composite_in_hom [intro]:\n shows \"\\\\ \\ \\ \\ \\ : dom \\ \\ dom \\ \\ dom \\ \\ cod \\ \\ cod \\ \\ cod \\\\\"\n and \"\\(\\ \\ \\) \\ \\ : (dom \\ \\ dom \\) \\ dom \\ \\ (cod \\ \\ cod \\) \\ cod \\\\\"", "output": "using \\\\.composable \\\\.composable\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem negative_resolvent_is_finite : \"derived_clauses_are_finite ordered_negative_resolvent\"", "output": "using less_restrictive_and_finite negative_resolvent_is_resolvent resolvent_is_finite\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"(unfold_ruleset_CHAIN_safe chain a rs = Some rs') \\ simple_ruleset rs'\"", "output": "by(simp add: Let_def unfold_ruleset_CHAIN_safe_def unfold_optimize_ruleset_CHAIN_def split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"continuous_on UNIV inv_stereographic\"", "output": "unfolding continuous_on_iff unfolding dist_complex_homo_def dist_riemann_sphere_def\nby (subst dist_stereographic, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma balance_left_inv1l: \"\\ inv1l lt; inv1 rt \\ \\ inv1l (balance_left lt k x rt)\"", "output": "by (induct lt k x rt rule: balance_left.induct) (auto simp: balance_inv1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abs_summable_on_altdef: \"f abs_summable_on A \\ set_integrable (count_space UNIV) A f\"", "output": "unfolding abs_summable_on_def set_integrable_def\nby (metis (no_types) inf_top.right_neutral integrable_restrict_space restrict_count_space sets_UNIV)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes \"solution z\"\n shows pell_mul_cnj_right: \"pell_mul z (pell_cnj z) = (1, 0)\"\n and pell_mul_cnj_left: \"pell_mul (pell_cnj z) z = (1, 0)\"", "output": "using assms\nby (auto simp: pell_mul_def pell_cnj_def solution_def power2_eq_square)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vec_of_basis_enum_zero:\n defines \"nA \\ length (canonical_basis :: 'a::basis_enum list)\" \n shows \"vec_of_basis_enum (0::'a) = 0\\<^sub>v nA\"", "output": "by (metis assms carrier_vecI dim_vec_of_basis_enum' minus_cancel_vec right_minus_eq vec_of_basis_enum_minus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ctxt_sub_cong:\n assumes \"closed e1\"\n assumes \"closed e2\"\n assumes \"evalDdb e1\\env_empty_db = evalDdb e2\\env_empty_db\"\n shows \"evalDdb (C)\\env_empty_db = evalDdb (C)\\env_empty_db\"", "output": "unfolding ctxt_sub_def\nusing assms\nby (auto intro: closing_subst_evalDdb_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cblinfun_blinfun_transfer_minus[cblinfun_blinfun_transfer]:\n includes lifting_syntax\n shows \"(blinfun_cblinfun_eq ===> blinfun_cblinfun_eq ===> blinfun_cblinfun_eq) (-) (-)\"", "output": "unfolding rel_fun_def\napply transfer\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eSubstInp_simp3[simp]:\nassumes *: \"\\ igWls MOD (asSort ys) Y\" and **: \"\\ einp = (\\ i. None)\"\nshows \"\\ liftAll (\\eX. eX \\ ERR) (eSubstInp MOD ys (OK Y) y einp)\"", "output": "using assms\nby (auto simp: igSubstInp_def liftAll_lift_comp lift_def liftAll_def split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma P1_real_ideal_DDH_advantage_True:\n assumes \"\\ = True\" \n shows \"mal_def.adv_P1 M \\ z (P1_S1, P1_S2) \\ D = ddh.DDH_advantage (P1_DDH_mal_adv_\\_True M z \\ D)\"", "output": "by(simp add: P1_adv_real_ideal_model_def ddh.DDH_advantage_def P1_real_ddh1_\\_True P1_ideal_ddh0_\\_True assms P1_advantages_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Quotient_resumption [quot_map]:\n \"\\ Quotient R1 Abs1 Rep1 T1; Quotient R2 Abs2 Rep2 T2 \\\n \\ Quotient (rel_resumption R1 R2) (map_resumption Abs1 Abs2) (map_resumption Rep1 Rep2) (rel_resumption T1 T2)\"", "output": "by(simp add: Quotient_alt_def5 resumption.rel_Grp[of UNIV _ UNIV _, symmetric, simplified] resumption.rel_compp resumption.rel_conversep[symmetric] resumption.rel_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat0[simp,intro]: \"mat nr nc (mat0I ze nr nc)\"", "output": "unfolding mat_def mat0I_def\nusing replicate_prop[of \"vec nr\" \"vec0I ze nr\" \"nc\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comp_converter_map1_out:\n \"comp_converter (map_converter f g id id conv) conv' = map_converter f g id id (comp_converter conv conv')\"", "output": "by(simp add: comp_converter_map_converter1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_radix_sort: \"mset (radix_sort i xss) = mset xss\"", "output": "by(induction i arbitrary: xss) (auto simp: mset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma primorial_pos [simp, intro]: \"primorial x > 0\"", "output": "unfolding primorial_def\nby (intro prod_pos) (auto dest: prime_gt_0_nat)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sup_case_exp_case_exp_same:\n \"sup_class.sup \n (case_exp cNew cNewArray cCast cInstanceOf cVal cBinOp cVar cLAss cAAcc cAAss cALen cFAcc cFAss cCAS cCall cBlock cSync cInSync cSeq cCond cWhile cThrow cTry e)\n (case_exp cNew' cNewArray' cCast' cInstanceOf' cVal' cBinOp' cVar' cLAss' cAAcc' cAAss' cALen' cFAcc' cFAss' cCAS' cCall' cBlock' cSync' cInSync' cSeq' cCond' cWhile' cThrow' cTry' e) =\n (case e of\n new C \\ sup_class.sup (cNew C) (cNew' C)\n | newArray T e \\ sup_class.sup (cNewArray T e) (cNewArray' T e)\n | Cast T e \\ sup_class.sup (cCast T e) (cCast' T e)\n | InstanceOf e T \\ sup_class.sup (cInstanceOf e T) (cInstanceOf' e T)\n | Val v \\ sup_class.sup (cVal v) (cVal' v)\n | BinOp e bop e' \\ sup_class.sup (cBinOp e bop e') (cBinOp' e bop e')\n | Var V \\ sup_class.sup (cVar V) (cVar' V)\n | LAss V e \\ sup_class.sup (cLAss V e) (cLAss' V e)\n | AAcc a e \\ sup_class.sup (cAAcc a e) (cAAcc' a e)\n | AAss a i e \\ sup_class.sup (cAAss a i e) (cAAss' a i e)\n | ALen a \\ sup_class.sup (cALen a) (cALen' a)\n | FAcc e F D \\ sup_class.sup (cFAcc e F D) (cFAcc' e F D)\n | FAss e F D e' \\ sup_class.sup (cFAss e F D e') (cFAss' e F D e')\n | CompareAndSwap e D F e' e'' \\ sup_class.sup (cCAS e D F e' e'') (cCAS' e D F e' e'')\n | Call e M es \\ sup_class.sup (cCall e M es) (cCall' e M es)\n | Block V T vo e \\ sup_class.sup (cBlock V T vo e) (cBlock' V T vo e)\n | Synchronized v e e' \\ sup_class.sup (cSync v e e') (cSync' v e e')\n | InSynchronized v a e \\ sup_class.sup (cInSync v a e) (cInSync' v a e)\n | Seq e e' \\ sup_class.sup (cSeq e e') (cSeq' e e')\n | Cond b e e' \\ sup_class.sup (cCond b e e') (cCond' b e e')\n | While b e \\ sup_class.sup (cWhile b e) (cWhile' b e)\n | throw e \\ sup_class.sup (cThrow e) (cThrow' e)\n | TryCatch e C V e' \\ sup_class.sup (cTry e C V e') (cTry' e C V e'))\"", "output": "apply(cases e)\napply(simp_all) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fg_symmetric: \"OpposedThinChamberComplexFoldings X g f D0\"", "output": "using chambers(2-4) chamber_D0 adjacent_sym\nby unfold_locales auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in encoding) indRelT_to_TRel:\n fixes TRel :: \"('procT \\ 'procT) set\"\n and TP TQ :: \"'procT\"\n assumes rel: \"TargetTerm TP \\\\\\\\T TargetTerm TQ\"\n shows \"(TP, TQ) \\ TRel\"", "output": "using rel\nby (simp add: indRelT.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rotate_toppos_inv:\"rotate_toppos w1 w2 \\ (kauff_mat w1) = (kauff_mat w2)\"", "output": "unfolding rotate_toppos_def\nusing rotate_toppos_kauff_mat\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma embed_transaction_simps [simp]:\n \"embed_transaction (Transaction cm pm views) =\n Transaction\\<^sub>m (Unblinded ((Unblinded cm, Unblinded pm), map embed_view views))\" \n for views", "output": "unfolding Transaction_Transaction'\nby transfer simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_concat_merge_pairs [simp]:\n \"length (concat (merge_pairs xss)) = length (concat xss)\"", "output": "by (induct xss rule: merge_pairs.induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parallel_converter2_comp2_out:\n \"parallel_converter2 conv'' (comp_converter conv conv') = comp_converter (parallel_converter2 id_converter conv) (parallel_converter2 conv'' conv')\"", "output": "by(simp add: comp_converter_parallel2 comp_converter_id_left)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonregular_event:\n \"~ regular_event ev = (isSnapshot ev \\ isRecvMarker ev)\"", "output": "by (meson event.distinct_disc event.exhaust_disc regular_event)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transfer_FOREACHci_nres[refine_transfer]:\n assumes A: \"set_iterator iterate s\"\n assumes R: \"\\x \\. nres_of (fi x \\) \\ f x \\\"\n shows \"nres_of (dres_it iterate c fi \\) \\ FOREACHci I s c f \\\"", "output": "using assms unfolding FOREACHci_def set_iterator_def\nby (rule transfer_FOREACHoci_nres)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Ch_CH_irc_idem:\n shows \"Ch h (CH A) = Ch h A\"", "output": "using %invisible CH_domain CH_irc_idem Ch_domain\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma card_com_lookup [unfolded length_map, simp]:\n \"card (dom (lookup (t :: ('a, 'b) mapping_rbt))) = length (List.map fst (entries t))\"", "output": "by transfer(auto simp add: linorder.rbt_lookup_keys[OF mapping_linorder] linorder.distinct_entries[OF mapping_linorder] RBT_Impl.keys_def ord.is_rbt_rbt_sorted ID_ccompare_neq_None List.card_set simp del: set_map length_map)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mem_correct_tracing: \"mem_correct lookup_trace update_trace (P o snd)\"", "output": "by standard (auto intro!: lift_pI elim: lift_p_P[OF lookup_inv] simp: lookup_trace_def update_trace_def state_mem_defs.map_of_def map_of_simp split: prod.splits option.splits; metis snd_conv lookup_correct update_correct lift_p_P update_inv lookup_inv lift_p_P )+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Z_I_unitary:\n shows \"unitary Z_I\"", "output": "unfolding Z_I_def\nusing tensor_mat_unitary[of Z \"1\\<^sub>m 2\"] Z_carrier unitary_Z\nusing unitary_one\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma negative_resolvent_is_model_res:\n \"less_restrictive ordered_negative_resolvent (ordered_model_resolvent UNIV)\"", "output": "unfolding ordered_negative_resolvent_def ordered_model_resolvent_def less_restrictive_def\nusing positive_part_lemma\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Z_I_hermitian:\n shows \"hermitian Z_I\"", "output": "unfolding Z_I_def\nusing tensor_mat_hermitian[of Z 2 \"1\\<^sub>m 2\" 2]\nby (simp add: Z_carrier Z_hermitian hermitian_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma carrier_Fexp': \"carrier (Texp e\\a) \\ fv e\"", "output": "unfolding Texp_simp carrier_ccTTree\nby (rule Aexp_edom)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lim_1_over_ln: \"((\\n. 1 / ln(real_of_nat n)) \\ 0) sequentially\"", "output": "using lim_1_over_Ln [THEN filterlim_sequentially_Suc [THEN iffD2]]\napply (subst filterlim_sequentially_Suc [symmetric])\nby (simp add: lim_sequentially dist_norm Ln_Reals_eq norm_powr_real_powr norm_divide)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in encoding) full_abstraction_impl_SRel_iff_TRel_is_sym:\n fixes SRel :: \"('procS \\ 'procS) set\"\n and TRel :: \"('procT \\ 'procT) set\"\n assumes fullAbs: \"fully_abstract SRel TRel\"\n shows \"sym SRel \\ sym {(T1, T2). \\S1 S2. T1 = \\S1\\ \\ T2 = \\S2\\ \\ (T1, T2) \\ TRel}\"", "output": "unfolding sym_def\nby (simp add: fullAbs, blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma terminated_GST_stable:\n assumes \"system_step q sh' sh\"\n assumes \"terminated p sh\"\n shows \"GST sh p = GST sh' p\"", "output": "using assms\nby (auto dest!: terminated_no_commands simp: small_step_stuck elim!: system_step.cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma canAccessThis_simp2: \"canAccessThis \\ vertex_1 \\ succ_tran \\nodes = {vertex_1, canAccessThis}, edges = {(vertex_1, canAccessThis)}\\ canAccessThis = {}\"", "output": "apply (simp add: succ_tran_def)\nby (metis Domain.DomainI Domain_empty Domain_insert singleton_iff trancl_domain)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma check_certD:\n \"check_cert G mxs mxr n cert \\ cert_ok cert n Err (OK None) (states G mxs mxr)\"", "output": "apply (unfold cert_ok_def check_cert_def check_types_def)\napply (auto simp add: list_all_iff) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dflt_plain_comb[sepref_monadify_comb]:\n \"EVAL$(If$b$t$e) \\ Refine_Basic.bind$(EVAL$b)$(\\\\<^sub>2b. If$b$(EVAL$t)$(EVAL$e))\"\n \"EVAL$(case_list$fn$(\\\\<^sub>2x xs. fc x xs)$l) \\ \n Refine_Basic.bind$(EVAL$l)$(\\\\<^sub>2l. case_list$(EVAL$fn)$(\\\\<^sub>2x xs. EVAL$(fc x xs))$l)\"\n \"EVAL$(case_prod$(\\\\<^sub>2a b. fp a b)$p) \\ \n Refine_Basic.bind$(EVAL$p)$(\\\\<^sub>2p. case_prod$(\\\\<^sub>2a b. EVAL$(fp a b))$p)\"\n \"EVAL$(case_option$fn$(\\\\<^sub>2x. fs x)$ov) \\ \n Refine_Basic.bind$(EVAL$ov)$(\\\\<^sub>2ov. case_option$(EVAL$fn)$(\\\\<^sub>2x. EVAL$(fs x))$ov)\"\n \"EVAL $ (Let $ v $ (\\\\<^sub>2x. f x)) \\ (\\) $ (EVAL $ v) $ (\\\\<^sub>2x. EVAL $ (f x))\"", "output": "apply (rule eq_reflection, simp split: list.split prod.split option.split)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma P1_real_ideal_DDH_advantage_False_bound:\n assumes \"\\ = False\"\n shows \"mal_def.adv_P1 M \\ z (P1_S1, P1_S2) \\ D \n \\ ddh.advantage (P1_DDH_mal_adv_\\_False M z \\ D) \n + ddh.advantage (ddh.DDH_\\' (P1_DDH_mal_adv_\\_False M z \\ D))\"", "output": "using P1_real_ideal_DDH_advantage_False ddh.DDH_advantage_bound assms\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GSMP_disjoint_empty[simp]:\n \"GSMP_disjoint {} A Sec\" \"GSMP_disjoint A {} Sec\"", "output": "unfolding GSMP_disjoint_def GSMP_def\nby fastforce+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_succeed_t:\n \"finite (succeed i) = finite (succeed_t i)\"", "output": "using finite_succeed_t' finite_succeed_t''\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rot_circle_left_bot_edges_neq [simp]: \"rot_circle_left_edge \\ rot_circle_top_edge\"", "output": "apply (simp add: rot_circle_top_edge_def rot_circle_left_edge_def)\nby (metis (no_types, hide_lams) cancel_comm_monoid_add_class.diff_cancel d_gt_0 mult.commute mult_zero_right nonzero_mult_div_cancel_left order_less_irrefl prod.sel(2) times_divide_eq_right x_coord_def zero_neq_numeral)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_sig_imp_exe_wf_sig': \"exe_sig_conds \\ \\\n wf_sig (translate_signature \\) \\\n exe_wf_sig \\\"", "output": "by (metis exe_sig_conds_def exesignature.exhaust_sel wf_sig_iff_exe_wf_sig translate_signature.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem ParT_ZObis[simp]:\nassumes \"properL cl\" and \"properL dl\" and \"SbisL cl dl\"\nshows \"ParT cl \\01 ParT dl\"", "output": "using assms thetaZOParT_ZObis unfolding thetaZOParT_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lex_two_compat'2:\n assumes \"ns1 O s1 \\ s1\" \"s1 O ns1 \\ s1\" \"s1 O s1 \\ s1\" \"ns1 O ns1 \\ ns1\" \"s2 O ns2 \\ s2\"\n shows \"lex_two s1 ns1 s2 O lex_two s1 ns1 ns2 \\ lex_two s1 ns1 s2\"", "output": "using lex_two_compat'[OF assms]\nby (intro subsetI, elim relcompE, fast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma leqv_trans:\nassumes 12: \"leqv L1 L2\" and 23: \"leqv L2 L3\"\nshows \"leqv L1 L3\"", "output": "using assms unfolding leqv_def\nby (metis (lifting) subs_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finsum_vec[simp]: \"finsum_vec TYPE('a) n = finsum V\"", "output": "by (force simp: finsum_vec_def monoid_vec_def finsum_def finprod_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma module_hom_with_overloaded[ud_with]: \n \"module_hom =\n (\n \\scale\\<^sub>1 scale\\<^sub>2.\n module_hom_with (+) 0 (-) uminus scale\\<^sub>1 (+) 0 (-) uminus scale\\<^sub>2\n )\"", "output": "unfolding module_hom_def module_hom_axioms_def module_hom_with_def module_hom_with_axioms_def unfolding module_with_overloaded .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma CD_on_inj_on_Xd:\n shows \"inj_on Xd (CD_on ds X)\"", "output": "unfolding CD_on_def\nby (rule inj_onI) (clarsimp simp: Cd_Xd Cd_singleton)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vsubstEnv_preserves_wls[simp]:\nassumes \"wlsEnv rho\"\nshows \"wlsEnv (rho &[x1 // x]_xs)\"", "output": "using assms unfolding vsubstEnv_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma swing_pos_inv:\"swing_pos w1 w2 \\ (kauff_mat w1) = (kauff_mat w2)\"", "output": "unfolding swing_pos_def\nusing kauff_mat_swingpos\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_atm_mset_list_empty_iff[simp]: \"AAs \\aml \\ = [] \\ AAs = []\"", "output": "unfolding subst_atm_mset_list_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hoare_triple_D1:\n \"\\\\<^sub>p \n {Q} \n Utrans_P vars1 mat_O\n {Q1}\"", "output": "unfolding Utrans_P_is_tensor_P1 mat_O_times_Q1[symmetric]\napply (subst hoare_partial.intros(2))\nusing qp_Q1\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Inr_in_cont_par:\n\"Inr t \\ cont (tr1 \\ tr2) \\ (t \\ par ` (Inr -` cont tr1 \\ Inr -` cont tr2))\"", "output": "using Inr_cont_par[of tr1 tr2] unfolding vimage_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma asTerm_equal_iff_alpha:\nassumes \"qGood qX \\ qGood qY\"\nshows \"(asTerm qX = asTerm qY) = (qX #= qY)\"", "output": "by (metis alpha_imp_asTerm_equal alpha_sym asTerm_equal_imp_alpha assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma translation_eq:\n \"\\x\\set (zip (tr_ss_f (map_of (zip (map (case_vd (\\cl. x_var)) vds) (map x_var vars'))(x_this \\ x')) ss') ss').\n (\\(s'', s'). tr_s (map_of (zip (map (case_vd (\\cl. x_var)) vds) (map x_var vars'))(x_this \\ x')) s' s'') x\"", "output": "apply(induct ss')\napply(simp add: tr_rel_f_eq)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_I: \"wf_world_model I\"", "output": "using wf_problem unfolding I_def wf_world_model_def wf_problem_def\napply(safe) subgoal for f\nby (induction f) auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R12_c [simp]: \"pmf (sds R12) c = 0\"", "output": "using R12_R10.strategyproofness(1) lottery_conditions[OF R12.wf]\nby (auto simp del: pmf_nonneg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma factorize_polys_map_square_free:\n assumes \"factorize_polys ps = (fs,data)\"\n assumes \"fss = map real_of_rat_poly fs\"\n shows \"\\f. f \\ set fss \\ square_free f\"", "output": "using factorize_polys_square_free[OF assms(1)]\nusing assms(2) field_hom_0'.square_free_map_poly of_rat_hom.field_hom_0'_axioms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma one_extra_update_direct_subsumption:\n \"one_extra_update t1 t2 s2 e2 \\ directly_subsumes e1 e2 s1 s2 t1 t2\"", "output": "apply (insert must_be_an_update[of \"Updates t1\" r \"Updates t2\"])\napply (simp add: one_extra_update_def)\nby (metis eq_fst_iff hd_Cons_tl one_extra_update_directly_subsumes)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lspasl_a_eq: \n \"((h1,h2\\h0) \\ (h3,h4\\h1)) = \n (\\h5. (h3,h5\\h0) \\ (h2,h4\\h5) \\ (h1,h2\\h0) \\ (h3,h4\\h1))\"", "output": "using lspasl_a_der\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_p_E:\n obtains v heap' where \"execute f heap = Some (v, heap')\" \"P heap'\"", "output": "using execute_cases\nby (cases \"execute f heap\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordertype_eq_Ord [simp]:\n assumes \"Ord \\\" \n shows \"ordertype (elts \\) VWF = \\\"", "output": "using assms ordermap_eq_self [OF assms]\nby (simp add: ordertype_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma recover_pure:\n \"RECOVER_PURE emp emp\"\n \"\\RECOVER_PURE P2 Q2; RECOVER_PURE P1 Q1\\ \\ RECOVER_PURE (P1*P2) (Q1*Q2)\"\n \"CONSTRAINT is_pure R \\ RECOVER_PURE (hn_invalid R x y) (hn_ctxt R x y)\"\n \"RECOVER_PURE (hn_ctxt R x y) (hn_ctxt R x y)\"", "output": "unfolding RECOVER_PURE_def subgoal\nby sep_auto subgoal\nby (drule (1) entt_star_mono) subgoal\nby (rule recover_pure_aux) subgoal\nby sep_auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_sig_iff_exe_wf_sig': \"exe_sig_conds \\ \\\n wf_sig (translate_signature \\) \\\n exe_wf_sig \\\"", "output": "by (metis exe_sig_conds_def exesignature.exhaust_sel wf_sig_iff_exe_wf_sig translate_signature.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nempty_list_append_length_add: \n fixes l1 l2 l3\n assumes \"l2 \\ []\"\n shows \"length (l1 @ l3) < length (l1 @ l2 @l3)\"", "output": "using assms\nby (induction l2) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma special_soundness:\n shows \"\\_AND.special_soundness\"", "output": "using \\_AND.special_soundness_def ss\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stone_phi_embed_triple_pair:\n \"(if Rep_phi f = stone_phi then Rep_stone_phi_pair x else triple.pairs_uminus (Rep_phi f) (triple.pairs_uminus (Rep_phi f) (Rep_stone_phi_pair x))) \\ triple.pairs (Rep_phi f)\"", "output": "by (metis (no_types, hide_lams) Rep_stone_phi_pair simp_phi surj_pair triple.pairs_uminus_closed triple_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nil_absorb: \"nil \\ nil = nil\"", "output": "using nil_par_nil skip_nil par_skip\nby (metis inf.absorb_iff2 inf.orderE inf_par_distrib2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma WT_dem: \"\\_uniform UNIV (insert None (Some ` vld \\)), \\_full \\\\<^sub>\\ \\_uniform UNIV (insert None (Some ` (nlists UNIV \\ \\ nlists UNIV \\))) \\\\<^sub>C MAC.dem \\ \\\"", "output": "unfolding MAC.dem_def\nby (rule WT_converter_of_callee) (auto simp add: vld_def stateless_callee_def mac_def split: option.split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma asIMOD_igAbs:\n\"igAbs (asIMOD SEM) xs x X =\n(\\val. if sWlsVal SEM val then sAbs xs (\\sX. if sWls SEM (asSort xs) sX\n then X (val (x := sX)_xs)\n else sDummy SEM (SOME s. sWls SEM s (X val)))\n else undefined)\"", "output": "unfolding asIMOD_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dim_subset_UNIV: \"dim S \\ dimension\"", "output": "by (metis dim_subset subset_UNIV dim_UNIV dimension_def)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem qfree_qe_FM: \"qfree (qe_FM f)\"", "output": "by(simp add:qe_FM_def R\\<^sub>e.qfree_lift_dnfeq_qe qfree_qe_FM\\<^sub>1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma resultant_impl_idom_divide[simp]: \"resultant_impl_idom_divide = resultant\"", "output": "unfolding resultant_impl_idom_divide_def\nby (rule resultant_impl_generic[OF basic_div_exp])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cnf_singleton_False: \"(\\a'\\set as. \\ cnf_to_bool \\ [a']) \\ \\ cnf_to_bool \\ as\"", "output": "by(induction \\ as rule: cnf_to_bool.induct) (simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ZN_atLeastAtMost [transfer_rule]:\n \"(ZN ===> ZN ===> rel_set ZN) atLeastAtMost atLeastAtMost\"", "output": "unfolding rel_fun_def ZN_def rel_set_def\nby (clarsimp simp add: Bex_def, arith)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_FGcontra_eq: \"rel_FGcontra (=) (=) (=) (=) (=) (=) (=) (=) (=) (=) (=) = (=)\"", "output": "unfolding rel_FGcontra_def\nby (simp add: rel_F_eq rel_G_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma end_point_no_cycle:\n assumes \"has_end_points_path x\"\n shows \"\\ cycle x\"", "output": "using assms end_point_iff2 end_point_iff1 many_strongly_connected_implies_no_start_end_points no_start_end_points_iff\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma app\\<^sub>iSwap[simp]: \n\"app\\<^sub>i (Swap,P,pc,mxs,T\\<^sub>r,s) = (\\T1 T2 ST LT. s = (T1#T2#ST,LT))\"", "output": "by(rule length_cases4) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fin_dim_span_cols:\nassumes \"A \\ carrier_mat n nc\"\nshows \"vectorspace.fin_dim class_ring (vs (span (set (cols A))))\"", "output": "using fin_dim_span cols_dim List.finite_set assms carrier_matD(1) module_vec_simps(3)\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wellformed_items_Complete:\n \"wellformed_items I \\ wellformed_items (Complete k I)\"", "output": "apply (auto simp add: wellformed_items_def wellformed_item_def Complete_def bin_def)\napply (metis dual_order.trans)\nusing is_complete_def next_symbol_not_complete not_less_eq_eq\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abc_append_first_step_eq_pre: \n \"st < length A\n \\ abc_step_l (st, lm) (abc_fetch st (A @ B)) = \n abc_step_l (st, lm) (abc_fetch st A)\"", "output": "by(simp add: abc_step_l.simps abc_fetch.simps nth_append)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in vfsequence) vfsequence_vcard_in_omega[simp]: \"vcard xs \\\\<^sub>\\ \\\"", "output": "using vfsequence_vdomain_in_omega\nby (simp add: vfsequence_vdomain)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ta_bisim_\\ [simp]:\n \"ta_bisim b \\ ta' \\ ta' = \\\" \"ta_bisim b ta \\ \\ ta = \\\"", "output": "apply(cases ta', fastforce simp add: ta_bisim_def)\napply(cases ta, fastforce simp add: ta_bisim_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma br'_initial_abs: \"br'_\\`(br'_initial \\) = {br_initial \\}\"", "output": "apply (force simp add: br_initial_def br'_\\_def elim: br'_initial.cases intro: br'_initial.intros) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hm_exch_op_\\_correct: \"hm_exch_op hm i j \\\\<^sub>n SPEC (\\hm'. \n hm_valid hm i \\ hm_valid hm j \\ hm'=hm_exch hm i j\n )\"", "output": "unfolding hm_exch_op_def\napply refine_vcg\napply (vc_solve simp: hm_valid_def hm_length_def heapmap_\\_def solve: asm_rl)\napply (auto simp add: hm_key_of_def hm_exch_def swap_def) [] done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rbt_comp_delete: \"rbt_comp_delete = ord.rbt_delete (lt_of_comp c)\"", "output": "unfolding rbt_comp_delete_def[abs_def] ord.rbt_delete_def[abs_def] unfolding rbt_comp_del .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma trivial_mute_fun[simp,intro]: \"mute_fun trivial_mute_fun\"", "output": "unfolding mute_fun_def trivial_mute_fun_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma boundOutputApp:\n fixes xvec :: \"name list\"\n and yvec :: \"name list\"\n and B :: \"('a::fs_name, 'b::fs_name, 'c::fs_name) boundOutput\"\n\n shows \"\\\\*(xvec@yvec)\\B = \\\\*xvec\\(\\\\*yvec\\B)\"", "output": "by(induct xvec) auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem swapEnv_idEnv[simp]: \"(idEnv &[x \\ y]_xs) = idEnv\"", "output": "unfolding idEnv_def swapEnv_def comp_def swapEnvDom_def swapEnvIm_def lift_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extf_ext_wf_bounded: \"ext_wf_bounded (extf f)\"", "output": "unfolding ext_wf_bounded_def\nusing extf_ext_irrefl_before_trans extf_ext_hd_or_tl\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma yxml_string_of_xml_tree_code [code]:\n \"yxml_string_of_xml_tree (xml.Elem name atts ts) rest =\n yot_append xml.XY (\n yot_append (yot_literal name) (\n foldr (\\(a, x) rest.\n yot_append xml.Y (\n yot_append (yot_literal a) (\n yot_append (yot_literal (STR ''='')) (\n yot_append (yot_literal x) rest)))) atts (\n foldr yxml_string_of_xml_tree ts (\n yot_append xml.XYX rest))))\"\n \"yxml_string_of_xml_tree (xml.Text s) rest = yot_append (yot_literal s) rest\"", "output": "by(rule yot_anything)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R_loopI: \"X \\ Ref \\I\\ \\I\\ \\ \\P\\ \\ \\I\\ \\ \\I\\ \\ \\Q\\ \\ LOOP X INV I \\ Ref \\P\\ \\Q\\\"", "output": "unfolding spec_def\nusing H_loopI\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transC_MtransT[simp]:\nassumes \"cf \\c cf'\" and \"cf' \\*t s''\"\nshows \"cf \\*t s''\"", "output": "by (metis PL.MtransC_MtransT assms(1) assms(2) transC_MtransC)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma observable3_equiv_observable2: \"observable3 ob P = observable2 ob P\"", "output": "by (unfold observable3_def observable2_def) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strict2[simp,code_unfold]: \" f x invalid = invalid\"", "output": "by(rule ext, simp add: def_scheme'' True_def False_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finalStateNonApplicable: \n fixes state::State\n shows \"isFinalState state F0 decisionVars = \n (\\ applicableDecide state decisionVars \\ \n \\ applicableUnitPropagate state F0 \\ \n \\ applicableBacktrack state F0)\"", "output": "unfolding isFinalState_def unfolding transition_def unfolding applicableDecide_def unfolding applicableUnitPropagate_def unfolding applicableBacktrack_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_fin_bisim_wait_flip [flip_simps]:\n \"FWbisimulation_base.init_fin_bisim_wait (flip bisim_wait) =\n flip (FWbisimulation_base.init_fin_bisim_wait bisim_wait)\"", "output": "by(auto simp add: fun_eq_iff FWbisimulation_base.init_fin_bisim_wait_simps flip_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma config'_embed: \"config'_rand (embed A) (return_pmf s0) qs = return_pmf (config' A s0 qs)\"", "output": "apply(induct qs arbitrary: s0)\napply(simp_all add: Step_def split_def bind_return_pmf)\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dlist_not_memb_remove:\n \"\\ member dl x \\ remove x dl = dl\"", "output": "by descending (simp add: List.member_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma non_Limit_ord_of_nat [iff]: \"\\ Limit (ord_of_nat m)\"", "output": "by (metis Limit_def mem_ord_of_nat_iff not_succ_Limit ord_of_eq_0_iff ord_of_minus_1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in encoding) indRelRST_to_SRel:\n fixes SRel :: \"('procS \\ 'procS) set\"\n and TRel :: \"('procT \\ 'procT) set\"\n and SP SQ :: \"'procS\"\n assumes rel: \"SourceTerm SP \\\\\\\\R SourceTerm SQ\"\n shows \"(SP, SQ) \\ SRel\"", "output": "using rel\nby (simp add: indRelRST.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma relhoare_conj_right_cartesian [intro]:\n \"\\ {Domain pre} Ra {> I}; {Range pre} Rc {> J};\n {pre} Ra, Rc {> post} \\ \n \\ {pre} Ra, Rc {> post \\ I \\ J}\"", "output": "by (force simp add: PO_rhoare_defs PO_hoare_defs Domain_def Range_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strictly_generalizes_neq: \"strictly_generalizes D' D \\ D' \\ D \\ \\\"", "output": "unfolding strictly_generalizes_def generalizes_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rcp_specD2:\n assumes \"rcp_spec rcp\"\n and \"h \\ set (fst (rcp gs bs ps sps data))\" and \"b \\ set gs \\ set bs\" and \"fst b \\ 0\"\n shows \"\\ lt (fst b) adds\\<^sub>t lt (fst h)\"", "output": "using assms unfolding rcp_spec_def\nby (elim allE conjE, blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wtC_wax_unprot[simp]: \"\\\\ unprot \\; \\ isRes \\ \\ protCl \\\\ \\ GE.wtC (wax \\)\"", "output": "unfolding wax_def GE.wtC_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma points_index_one_unique_block: \n assumes \"B index ps = 1\"\n shows \"\\! bl . (bl \\# B \\ ps \\ bl)\"", "output": "using assms points_index_gt0_impl_existance points_index_one_unique\nby (metis zero_less_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma at_begin_norm_Bk[intro]: \"at_begin_norm (as, am) (q, aaa, []) ires\n \\ at_begin_norm (as, am) (q, aaa, [Bk]) ires\"", "output": "apply(simp add: at_begin_norm.simps)\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_rbt_RBT_Impl_diag:\n \"ord.is_rbt lt t \\ ord.is_rbt (less_prod leq lt lt) (RBT_Impl_diag t)\"", "output": "by(simp add: ord.is_rbt_def rbt_sorted_RBT_Impl_diag inv_RBT_Impl_diag)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_mdpc_compose: \"map_mdpc f (map_mdpc g M) = map_mdpc (f \\ g) M\"", "output": "by (intro mdpc_eqI) (auto simp add: states_map_mdpc image_comp actions_map_mdpc image_UN map_pmf_compose[symmetric] vimage_comp[symmetric])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma right_unique_rel_converter:\n \"\\ right_total A; right_unique B; right_unique C; right_total R \\ \\ right_unique (rel_converter A B C R)\"", "output": "unfolding right_unique_alt_def right_total_alt_def rel_converter_conversep[symmetric]\nby(subst rel_converter_eq[symmetric], rule order_trans[OF rel_converter_pos_distr], erule (3) rel_converter_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_post_concat:\nassumes \"path f (nl1 @ nl2)\" and \"nl2 \\ Nil\"\nshows \"path f nl2\"", "output": "using assms\napply (induct nl1)\napply (metis append_Nil)\nby (metis Nil_is_append_conv append_Cons path_post)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AssertAllState''_sat_atoms_equiv_bounds:\n \"\\ t \\ \\ \\ (assert_bound_loop ats (init t)) \\ flat (set ats) \\ \\ (assert_bound_loop ats (init t))\"", "output": "using AssertAllState''_precond\nusing assert_bound_nolhs_atoms_equiv_bounds init_atoms_equiv_bounds\nby (induct ats rule: rev_induct) (auto simp add: Let_def assert_bound_loop_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closed_orbit_period_nonneg:\n assumes \"closed_orbit x\"\n shows \"period x \\ 0\"", "output": "unfolding period_def\nusing assms(1) unfolding closed_orbit_def\napply (auto intro!:cInf_greatest)\nby (smt recurrence_time_flip_sign)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_new_same_addr_singleton:\n assumes E: \"E \\ \\\"\n shows \"\\a. new_actions_for P E adal \\ {a}\"", "output": "by(blast dest: \\_new_actions_for_fun[OF E])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma np_specI:\n assumes \"\\gs bs hs data.\n snd ` set (np gs bs hs data) \\ set hs \\ (set gs \\ set bs \\ set hs) \\\n set hs \\ (set gs \\ set bs) \\ snd ` set (np gs bs hs data) \\\n (\\a b. a \\ set hs \\ b \\ set hs \\ a \\ b \\ (a, b) \\\\<^sub>p snd ` set (np gs bs hs data)) \\\n (\\p q. (True, p, q) \\ set (np gs bs hs data) \\ q \\ set gs \\ set bs)\"\n shows \"np_spec np\"", "output": "unfolding np_spec_def\nusing assms\nby meson"} {"instruct": "Given a lemma, please prove it.", "input": "lemma test_bit_uint_transfer [transfer_rule]:\n \\(cr_uint ===> (=)) bit (!!)\\", "output": "unfolding test_bit_eq_bit\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cont_case_prod_iff:\n \"\\ monotone (rel_prod orda ordb) leq (case_prod f);\n class.preorder orda (mk_less orda); lub_singleton luba;\n class.preorder ordb (mk_less ordb); lub_singleton lubb \\\n \\ cont (prod_lub luba lubb) (rel_prod orda ordb) lub leq (case_prod f) \\\n (\\x. cont lubb ordb lub leq (\\y. f x y)) \\ (\\y. cont luba orda lub leq (\\x. f x y))\"", "output": "by(blast dest: cont_case_prodD1 cont_case_prodD2 intro: cont_case_prodI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma S_transform_Not [simp]: \"S_transform (Not x) = Not (S_transform x)\"", "output": "unfolding S_transform_def\nby (simp add: Not.abs_eq eq_onp_same_args)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma max_flow_val_unique: \n \"\\is_max_flow_val fv1; is_max_flow_val fv2\\ \\ fv1=fv2\"", "output": "unfolding is_max_flow_val_def isMaxFlow_def\nby (auto simp: antisym)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem sorted_merge_sort [simp, intro]: \"sorted (merge_sort xs)\"", "output": "by (induction xs rule: merge_sort.induct) (subst merge_sort.simps, use sorted01 in auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma I_valid: \"I \\ valid_states\"", "output": "using wf_initial unfolding valid_states_def Dom_def I_def range_of_var_def\nby (auto split:if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tset_transfer [transfer_rule]:\n \"(pcr_tllist (=) (=) ===> (=)) (lset \\ fst) tset\"", "output": "by(auto simp add: cr_tllist_def tllist.pcr_cr_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_hsubst_c: \"finite (hsubst_c n)\"", "output": "unfolding hsubst_c_def\nby (metis (full_types) finite_cont)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lsnd_ins_impl: \"set_ins lsnd_\\ lsnd_invar lsnd_ins\"", "output": "by (unfold_locales) (auto simp add: lsnd_defs in_set_member)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_field_factorization_i[transfer_rule]: \n \"(poly_rel ===> rel_prod R (list_all2 poly_rel))\n (finite_field_factorization_i p ff_ops) finite_field_factorization\"", "output": "unfolding finite_field_factorization_i_def finite_field_factorization_def Let_def lead_coeff_i_def'\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma normalized_dst_ports_def2: \"normalized_dst_ports ms = normalized_n_primitive (is_Dst_Ports, dst_ports_sel) (\\ps. case ps of L4Ports _ pts \\ length pts \\ 1) ms\"", "output": "by(induction ms rule: normalized_dst_ports.induct, simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma deterministic_heap_ops_no_spurious_wakeups:\n \"deterministic_heap_ops \\ \\ spurious_wakeups\"", "output": "unfolding deterministic_heap_ops_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ceq_equality: \"ceq = Some eq \\ equality eq\"", "output": "by (drule ceq, rule Equality_Generator.equalityI, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_satisfies:\n \"\\ (init t)\"", "output": "using init_satisfies_tableau init_satisfies_bounds init_tableau_id unfolding curr_val_satisfies_state_def satisfies_state_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma need_second_arg_strict[simp]: \n \"\\binop\\CondAnd; binop\\CondOr\\ \\ need_second_arg binop b\"", "output": "by (cases binop) (simp_all add: need_second_arg_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"y0>0 \\ test x0 y0 \\ SPEC (\\S. S={y0 .. y0 + x0 - 1})\"\n \\ \\Choosen pre-condition to get least trouble when proving\\", "output": "unfolding test_def\napply (intro WHILE_rule[where I=\"\\(S,x,y). x+y=x0+y0 \\ x\\x0 \\ S={y0 .. y0 + (x0-x) - 1}\"] refine_vcg)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma decs_clock_monotone:\n \"evaluate_decs ck mn env s d res \\ ck = True \\ (clock (fst res)) \\ (clock s)\"", "output": "by (induction rule:evaluate_decs.inducts) (fastforce dest:dec_clock_monotone)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weak_reflection_of_barbs_and_closures:\n fixes Rel :: \"('proc \\ 'proc) set\"\n and CWB :: \"('proc, 'barbs) calculusWithBarbs\"\n assumes reflection: \"rel_weakly_reflects_barbs Rel CWB\"\n shows \"rel_weakly_reflects_barbs (Rel\\<^sup>=) CWB\"\n and \"rel_weakly_reflects_barbs (Rel\\<^sup>+) CWB\"\n and \"rel_weakly_reflects_barbs (Rel\\<^sup>*) CWB\"", "output": "using reflection reflection_of_binary_predicates_and_closures[where Rel=\"Rel\" and Pred=\"\\P a. P\\a\"]\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma swap_Snapshot_Send:\n assumes\n \"c \\ ev \\ d\" and\n \"d \\ ev' \\ e\" and\n \"isSnapshot ev\" and\n \"isSend ev'\" and\n \"c \\ ev' \\ d'\" and\n \"d' \\ ev \\ e'\" and\n \"occurs_on ev \\ occurs_on ev'\"\n shows\n \"msgs e i = msgs e' i\"", "output": "using assms swap_Send_Snapshot\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma psi_lR_is_beta:\n \"psi_l R = \\\"", "output": "unfolding psi_l_def alpha_l_def beta_l_def R_and_a_half_\\\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma evaldjf_ex: \"Ifm bbs bs (evaldjf f ps) \\ (\\p \\ set ps. Ifm bbs bs (f p))\"", "output": "by (induct ps) (simp_all add: evaldjf_def djf_Or)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma outgoing_transitions_fprod_deterministic:\n\"(\\s b ba bb bc.\n(((s, b), ba), ((s, bb), bc)) \\ fset (outgoing_transitions e s) \\ fset (outgoing_transitions e s)\n\\ b \\ bb \\ ba \\ bc \\ Label ba = Label bc \\ \\choice ba bc)\n\\ deterministic e\"", "output": "apply (rule outgoing_transitions_deterministic)\napply clarify\nby (metis SigmaI fmember_implies_member in_outgoing)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma spr_repMC_S5n[intro, simp]: \"S5n (spr_repMC X)\"", "output": "unfolding spr_repRels_def\nby (intro S5nI equivI refl_onI symI transI) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PO_l2_inv8 [iff]: \"reach l2 \\ l2_inv8\"", "output": "by (rule_tac J=\"l2_inv1 \\ l2_inv3\" in inv_rule_incr) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma circline_set_positive_x_axis_I [simp]:\n assumes \"is_real z\" and \"Re z > 0\"\n shows \"of_complex z \\ positive_x_axis\"", "output": "using assms unfolding positive_x_axis_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma preorder [cont_intro, simp]: \"class.preorder leq (mk_less leq)\"", "output": "by(unfold_locales)(auto simp add: mk_less_def intro: leq_refl leq_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma equivalentFormulaeTransitivity: \n fixes formula1 :: Formula and formula2 :: Formula and formula3 :: Formula\n assumes \"equivalentFormulae formula1 formula2\" and \"equivalentFormulae formula2 formula3\"\n shows \"equivalentFormulae formula1 formula3\"", "output": "using assms unfolding equivalentFormulae_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l6: \"prod Prod S2 = \\ S1\"", "output": "using prod.Union_disjoint[of S2 \"\\x. x\"] l3 l4 l5 unfolding comp_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma padl_inj:\n shows \"inj_on (padl m) (carrier_vec n :: 'a vec set)\"", "output": "apply(intro inj_onI)\nusing append_vec_eq[OF zero_carrier_vec zero_carrier_vec]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_sv[relator_props]: \n \"\\single_valued Rv; single_valued Rw\\ \\ single_valued (\\Rv,Rw\\rel)\"", "output": "unfolding rel_def\nby tagged_solver"} {"instruct": "Given a lemma, please prove it.", "input": "lemma swap_Op_simp[simp]:\nassumes \"goodInp inp\" \"goodBinp binp\"\nshows \"((Op delta inp binp) #[x1 \\ x2]_xs) =\n Op delta (inp %[x1 \\ x2]_xs) (binp %%[x1 \\ x2]_xs)\"", "output": "by (metis Op_asInp_asTerm_qOp Op_def asTerm_qSwap_swap assms(1) assms(2) goodBinp_imp_qGoodBinp_pickBinp goodInp_imp_qGoodInp_pickInp qGood_qGoodInp qSwapBinp_preserves_qGoodBinp qSwapInp_preserves_qGoodInp qSwap_qSwapInp swapBinp_def2 swapInp_def2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"check_simple_fw_preconditions [Rule (MatchAnd MatchAny MatchAny) Drop]\"", "output": "by(simp add: check_simple_fw_preconditions_def normalized_ifaces_def normalized_protocols_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma r_cons [simp]: \"eval r_cons [e, es] \\= e_cons e es\"", "output": "unfolding r_cons_def\nusing r_cons_else_prim r_cons_else e_cons_elementary\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vrat_inverse_transfer[transfer_rule]: \n includes lifting_syntax\n shows \"(cr_vrat ===> cr_vrat) (vrat_inverse_app) (inverse)\"", "output": "using vrat_fsingleton_in_fproduct_vrat\nby (intro rel_funI, unfold vrat_inverse_def cr_vrat_def cr_scalar_def) (simp add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zero_one_eint_neq:\n \"\\ 0 = (1::eint)\"\n \"\\ 1 = (0::eint)\"", "output": "unfolding zero_eint_def one_eint_def\nby simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eclose_hinsert [simp]: \"eclose (b \\ a) = eclose b \\ (eclose a \\ a)\"", "output": "by (metis eclose_singleton eclose_sup hinsert_eq_sup)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map2_val_compat'D1:\n assumes \"map2_val_compat' f\" and \"oalist_inv zs\"\n shows \"oalist_inv (f zs)\"", "output": "using assms unfolding map2_val_compat'_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rotation_minus_pi_2_x_axis [simp]:\n shows \"moebius_circline (moebius_rotation (-pi/2)) x_axis = y_axis\"", "output": "unfolding moebius_rotation_def moebius_similarity_def\nby (transfer, transfer, simp add: mat_adj_def mat_cnj_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_graph_remove_edges: \"wf_graph \\ nodes = V, edges = E \\ \\ wf_graph \\ nodes = V, edges=E - X\\\"", "output": "by (metis delete_edges_simp2 delete_edges_wf select_convs(1) select_convs(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes \"z1 \\ z2\" and \"z1 \\ \\\\<^sub>h\"\n shows \"ratio z1 z2 z1 = \\\\<^sub>h\"", "output": "using assms unfolding ratio_def\nusing divide_zero_right[of \"z1 -\\<^sub>h z2\"]\nusing sub_eq_zero_iff[of z1 z2]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iso3_sharp [simp]: \"d (d (x \\ nc) \\ nc) = d (x \\ nc)\"", "output": "using d_s_subid local.c4 local.d_def local.inf_le1\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chine_composite_in_hom [intro]:\n shows \"\\Chn (\\ \\ \\) : \\.dom.leg0 \\\\ \\.dom.leg1 \\\\<^sub>C \\.cod.leg0 \\\\ \\.cod.leg1\\\"", "output": "using hcomp_def chine_hcomp_props(1) composable\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma consistent_prv_eql_tms_times_rev:\nassumes \"consistent\" \"prv (eql (tms (Num m) (Num n)) (Num k))\"\nshows \"k = m * n\"", "output": "by (metis Num assms consistent_def eql not_times_prv_neg_eql_tms num tms prv_neg_fls subsetCE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alw_HLD_smap:\n \"alw (HLD (f ` S)) (smap f \\)\" if \"alw (HLD S) \\\"", "output": "using that\nby (auto 4 3 elim: HLD_mono alw_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma spr_simAbs_tObsC_abs[simp]:\n assumes tC: \"t \\ SPR.jkbpC\"\n and ec: \"spr_simAbs ec = SPRdet.sim_equiv_class a t\"\n shows \"toSet (fst ec) = tObsC_abs t\"", "output": "using tC spr_simAbs_refl[OF tC ec] unfolding spr_sim_def spr_simAbs_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chopOneContinue: \"dpt \\ Leaf \\ domainNameDeptChopOne (name -- dpt) = name -- domainNameDeptChopOne (dpt)\"", "output": "apply(case_tac dpt)\nby simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parallel_resource_parametric [transfer_rule]: includes lifting_syntax shows\n \"(rel_resource A B ===> rel_resource C D ===> rel_resource (rel_sum A C) (rel_sum B D))\n parallel_resource parallel_resource\"", "output": "unfolding parallel_resource_def\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extended_Gromov_product_nonneg [mono_intros, simp]:\n \"0 \\ extended_Gromov_product_at e x y\"", "output": "unfolding extended_Gromov_product_at_def\nby (rule Inf_greatest, auto intro: Liminf_bounded always_eventually)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_of_conv: \"set_tries = maps.set_of lookup_tries\"", "output": "by(rule ext) (auto simp add: set_tries_def map.set_of_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eovisidifmifiOm:\"(e \\ ov\\ \\ s\\ \\ d\\ \\ f \\ m\\ \\ f^-1) O m \\ m \\ ov \\ f^-1 \\ d^-1 \\ s \\ s\\ \\ e\"", "output": "apply (simp, intro conjI)\nusing cem\napply blast\nusing crm_rules\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_child_nodes_is_l_set_child_nodes [instances]: \n \"l_set_child_nodes type_wf set_child_nodes set_child_nodes_locs\"", "output": "apply(unfold_locales)\nusing set_child_nodes_pointers_preserved set_child_nodes_typess_preserved set_child_nodes_writes\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_simp:\n assumes YX: \"DopxC.ide yx\"\n shows \"\\.map yx =\n S.mkArr (HomC.set (F (fst yx), snd yx)) (HomD.set (fst yx, G (snd yx)))\n (inD o \\ (fst yx) o HomC.\\ (F (fst yx), snd yx))\"", "output": "using YX \\o_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Retr_incl:\n\"\\theta. Sretr theta \\ ZOretrT theta\"\n(* *)\n\"\\theta. ZOretrT theta \\ ZOretr theta\"\n(* *)\n\"\\theta. ZOretrT theta \\ WretrT theta\"\n(* *)\n\"\\theta. ZOretr theta \\ Wretr theta\"\n(* *)\n\"\\theta. WretrT theta \\ Wretr theta\"\n(* *)\n\"\\theta. WretrT theta \\ RetrT theta\"", "output": "unfolding Retr_defs\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma p_fusion_hd: \"\\ps \\ []; qs \\ []\\ \\ hd (p_fusion ps qs) = hd ps\"", "output": "by (metis list.exhaust p_fusion.simps(3) append_Cons list.sel(1))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in encoding) enc_reflects_pred_iff_indRelL_preserves_pred:\n fixes Pred :: \"('procS, 'procT) Proc \\ bool\"\n shows \"enc_reflects_pred Pred = rel_preserves_pred indRelL Pred\"", "output": "using enc_reflects_pred_iff_indRelR_reflects_pred[where Pred=\"Pred\"] indRelR_reflects_pred_iff_indRelL_preserves_pred[where Pred=\"Pred\"]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "theorem equivalence_of_partition:\n \"Equivalence = E\"", "output": "unfolding Equivalence_def unfolding Partition_def\nby auto (metis ClassD Class_closed Class_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"(Abs_perm id :: nat perm) \\ Suc 0 = Suc 0\"", "output": "unfolding permute_atom_def\nby (metis Rep_perm_0 id_apply zero_perm_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult_mult_trm_ord_trans:\n shows \"trans (mult (mult trm_ord))\"", "output": "by (metis (no_types, lifting) mult_def transI transitive_closure_trans(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma llist_all2_cons_fusion3 [stream_fusion]:\n \"llist_all2_cons g (lgenerator h) P sg sh \\ llist_all2 P (lunstream g sg) (lunstream' h sh)\"", "output": "by transfer(rule llist_all2_cons_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exec_step_ind_equiv:\n \"exec_step P h stk loc C M pc ics frs sh = (xp', h', frs', sh')\n = exec_step_ind (exec_step_input P C M pc ics) P h stk loc C M pc ics frs sh (xp', h', frs', sh')\"", "output": "using exec_step_imp_exec_step_ind exec_step_ind_imp_exec_step\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in \\) smc_Par_obj_terminal_obj_initial:\n \"obj_initial (smc_Par \\) A \\ obj_terminal (smc_Par \\) A\"", "output": "unfolding smc_Par_obj_initial smc_Par_obj_terminal\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma RP_state_component_2 :\n assumes \"io \\ (RP M2 s vs xs V'')\"\n and \"observable M2\"\nshows \"io_targets M2 (initial M2) io = {s}\"", "output": "by (metis (mono_tags, lifting) RP.simps R_state_component_2 Un_iff assms mem_Collect_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_ruleset_append: \"wf_ruleset \\ p (rs1@rs2) \\ wf_ruleset \\ p rs1 \\ wf_ruleset \\ p rs2\"", "output": "by(auto simp add: wf_ruleset_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ZObisT_prefix:\n\"ZObisT \\ ZOretrT ZObisT\"", "output": "unfolding ZObisT_def\nusing mono_Retr bis_prefix\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bisim_max_vars: \"bisim Vs e e' xs \\ max_vars e = max_vars e'\"\n and bisims_max_varss: \"bisims Vs es es' xs \\ max_varss es = max_varss es'\"", "output": "apply(induct rule: bisim_bisims.inducts)\napply(auto simp add: max_vars_compE1 max_varss_compEs1) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_fresh':\n assumes a: \"z\\\\\"\n shows \"lookup \\ z = Var z\"", "output": "using a\nby (induct rule: lookup.induct) (auto simp add: fresh_list_cons fresh_prod fresh_atm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Arccos_bounds: \"\\Re z\\ < 1 \\ 0 < Re(Arccos z) \\ Re(Arccos z) < pi\"", "output": "unfolding Re_Arccos\nby (blast intro!: Im_Ln_pos_lt_imp Arccos_range_lemma)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_cenum: \"ID cEnum = Some (enum, rest) \\ f \\ set enum\"", "output": "by(cases rest)(auto dest: ID_cEnum)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proj_ord_POT [code]: \"proj_ord (POT to) = proj_ord to\"", "output": "proof - have \"nat_term_compare (proj_ord (POT to)) = nat_term_compare (proj_ord to)\"\nby (simp add: nat_term_compare_proj_ord nat_term_compare_POT proj_comp_def pot_comp rep_nat_term_prod_def rep_nat_term_pp_def) thus ?thesis\nby (simp only: nat_term_compare_inject)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Arg_lt_pi: \"0 < Arg z \\ Arg z < pi \\ 0 < Im z\"", "output": "using Arg_less_0 [of z] Im_Ln_pos_lt\nby (auto simp: order.order_iff_strict Arg_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma NegativeArraySize_not_Object[simp]: \"NegativeArraySize \\ Object\"", "output": "by(simp add: NegativeArraySize_def Object_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_mwb_lens: \"mwb_lens (list_lens x)\"", "output": "by (unfold_locales, simp_all add: list_lens_def nth'_list_augment list_augment_same_twice)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tensor_mat_add2:\n assumes \"m1 \\ carrier_mat d1 d1\"\n and \"m2 \\ carrier_mat d2 d2\"\n and \"m3 \\ carrier_mat d2 d2\"\n shows \"tensor_mat m1 (m2 + m3) = tensor_mat m1 m2 + tensor_mat m1 m3\"", "output": "apply (rule eq_matI, auto) unfolding tensor_mat_eval\nusing assms(3) semiring_class.distrib_left\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valid_valid':\n \"valid l \\ valid' l\"", "output": "by (induction rule: valid.induct) (auto 4 4 intro: valid'.intros elim: valid'.cases simp: replicate_add[symmetric] append_assoc[symmetric] )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma def_valid_then_def: \"\\(f x y) = (\\(f x y))\"", "output": "apply(rule ext, rename_tac \"\\\")\napply(simp_all add: valid_def defined_def def_scheme'' True_def False_def invalid_def None_def None_fun_def None_option_def bot_fun_def)\nby (metis \"1\" OclValid_def def_scheme'' foundation16 True_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mem_val_alt_10_mem_equal_3: \"mem_equal s1 s2 pa \\\nmem_val_alt 10 ((pa AND 68719476732) + 3) s1 = mem_val_alt 10 ((pa AND 68719476732) + 3) s2\"", "output": "apply (simp add: mem_val_alt_def)\napply (simp add: Let_def)\napply (simp add: mem_equal_def)\nby (metis option.distinct(1))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trunc_closed:\n assumes \"f \\ carrier P\"\n shows \"trunc f \\ carrier P\"", "output": "using assms unfolding truncate_def\nby (metis ltrm_closed P_def UP_ring.UP_ring UP_ring_axioms leading_term_def ring.ring_simprules(4))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cont_eff: \"cont_eff cf b = (cont (fst cf) (snd cf) b, eff (fst cf) (snd cf) b)\"", "output": "unfolding cont_eff_def cont_def eff_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pi_ias[proper_it]: \n \"proper_it' ias.iteratei ias.iteratei\"\n \"proper_it' ias.iterateoi ias.iterateoi\"\n \"proper_it' ias.rev_iterateoi ias.rev_iterateoi\"", "output": "unfolding ias.iteratei_def[abs_def] ias.iterateoi_def[abs_def] ias.rev_iterateoi_def[abs_def]\napply (rule proper_it'I icf_proper_iteratorI)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cbi_alpha1ialpha4mi:\"b^-1 O ( e \\ ov\\ \\ s\\ \\ d\\ \\ f \\ f\\ \\ m\\) \\ b^-1\"", "output": "apply (simp, intro conjI)\nusing cbi_rules\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Inf_upset_id [simp]: \"Inf \\ \\ = id\"", "output": "by (metis comp_assoc comp_id Sup_downset_id Sups_dual_def downset_upset_dual invol_dual)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma merge_length1_nonempty:\n assumes \"merge as bs us vs\" \"as \\ lists (- {[]})\"\n shows \"us \\ lists (- {[]})\"", "output": "using assms\nby induction (auto simp: mem_lists_non_Nil)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma branch_instr_sub1_low_equal:\nassumes a1: \"low_equal s1 s2\"\nshows \"branch_instr_sub1 instr_name s1 = branch_instr_sub1 instr_name s2\"", "output": "using a1\napply (simp add: branch_instr_sub1_def)\nby (simp add: low_equal_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cupcake_single_preserve:\n \"cupcake_evaluate_single env e (Rval res) \\ is_cupcake_all_env env \\ is_cupcake_exp e \\ is_cupcake_value res\"", "output": "by (fastforce dest:cupcake_single_preserve0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma termMOD_iwlsFSb: \"iwlsFSb termMOD\"", "output": "unfolding iwlsFSb_def\nusing termMOD_igWlsAllDisj termMOD_igWlsAbsIsInBar termMOD_igConsIPresIGWls termMOD_igSubstAllIPresIGWlsAll termMOD_igFreshCls termMOD_igSubstCls termMOD_igAbsRen\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stutter_reduced_reduced: \"\\\\\\ = \\\\\"", "output": "by (insert stutter_reduced_suffix[of 0 \"\\\", simplified])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cexpr_sem_expr_rf_to_cexpr:\n \"randomfree e \\ cexpr_sem \\ (expr_rf_to_cexpr e) = expr_sem_rf \\ e\"", "output": "by (induction e arbitrary: \\) (auto simp: cexpr_sem_cexpr_subst)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exec_meth_length_compE2_stack_xliftD:\n \"exec_meth ci P (compE2 e) (stack_xlift d (compxE2 e 0 0)) t h (stk, loc, pc, xcp) ta h' s'\n \\ pc < length (compE2 e)\"", "output": "by(cases s')(auto simp add: stack_xlift_compxE2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma foldl_prs_aux:\n assumes a: \"Quotient3 R1 abs1 rep1\"\n and b: \"Quotient3 R2 abs2 rep2\"\n shows \"abs1 (foldl ((abs1 ---> abs2 ---> rep1) f) (rep1 e) (map rep2 l)) = foldl f e l\"", "output": "by (induct l arbitrary:e) (simp_all add: Quotient3_abs_rep[OF a] Quotient3_abs_rep[OF b])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma any_Err [iff]: \"P \\ T \\\\<^sub>\\ Err\"", "output": "by (unfold sup_ty_opt_def) (rule le_Err [simplified lesub_def])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"taint_labels = (let (Enc_A, Dec_A) = mk_Enc_Dec_pair {''A''};\n (Enc_B, Dec_B) = mk_Enc_Dec_pair {''B''};\n (Enc_C, Dec_C) = mk_Enc_Dec_pair {''C''}\n in [\n ''Sensors_A'' \\ TaintsUntaints {''A''} {},\n ''Sensors_B'' \\ TaintsUntaints {''B''} {},\n ''Sensors_C'' \\ TaintsUntaints {''C''} {},\n\n ''Encryption_A'' \\ Enc_A,\n ''Encryption_B'' \\ Enc_B,\n ''Encryption_C'' \\ Enc_C,\n\n ''C3PO_Dec_A'' \\ Dec_A,\n ''C3PO_Dec_B'' \\ Dec_B,\n ''C3PO_Dec_C'' \\ Dec_C,\n\n ''C3PO_Storage'' \\ TaintsUntaints {''A'',''B'',''C''} {}\n ])\"", "output": "by(simp add: taint_labels_def mk_Enc_Dec_pair_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in category) cat_obj_None_obj_iso:\n \\\\see Chapter I-5 in \\cite{mac_lane_categories_2010}.\\\n assumes \"obj_None \\ z\" and \"obj_None \\ z'\"\n shows \"z \\\\<^sub>o\\<^sub>b\\<^sub>j\\<^bsub>\\\\<^esub> z'\"", "output": "using assms\nby (simp add: cat_obj_terminal_obj_iso obj_NoneD(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Conj_eqvt [simp]:\n assumes \"finite (supp xset)\"\n shows \"p \\ Conj xset = Conj (p \\ xset)\"", "output": "using assms unfolding Conj_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma element_ptr_kinds_commutes [simp]:\n \"cast element_ptr |\\| node_ptr_kinds h \\ element_ptr |\\| element_ptr_kinds h\"", "output": "apply(auto simp add: node_ptr_kinds_def element_ptr_kinds_def)[1]\nby (metis (no_types, lifting) element_ptr_casts_commute2 ffmember_filter fimage_eqI fset.map_comp is_element_ptr_kind_none node_ptr_casts_commute3 node_ptr_kinds_commutes node_ptr_kinds_def option.sel option.simps(3))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma thunks_domA: \"thunks \\ \\ domA \\\"", "output": "by (induction \\ ) (auto simp add: thunks_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Abs'_0:\n shows \"Abs' (CARD('a))=(0::'a)\"", "output": "by (metis (hide_lams, mono_tags) Abs'_def mod_self zero_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma obs_none_no_kth_obs: assumes \\obs \\ k = None\\ shows \\\\ (\\ i. is_kth_obs (path \\) k i)\\", "output": "apply rule\nusing assms unfolding obs_def obsp_def\napply (auto split: option.split_asm)\nby (metis assms kth_obs_not_none kth_obs_unique obs_def option.distinct(2) the_equality)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma intY1_mono: \"monotone (\\ x \\ intY1. f x) intY1 (induced intY1 r)\"", "output": "apply (auto simp add: monotone_def induced_def intY1_f_closed)\napply (blast intro: intY1_elem monotone_f [THEN monotoneE]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma plays_from_strategy_chain_Suc:\n shows \"prefix (strategy_progression \\ p $ n) (strategy_progression \\ p $ Suc n)\"", "output": "unfolding strategy_progression_def\nby (auto simp:take_Suc_prefix nth_prefixes lnth_lappend nth_prefixes_is_prefix_tl augment_list_prefix)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ideal_S1_and: \"and_secret_sharing.Ideal1 (a1, b1) (a2, b2) s2 = S1_and' (a1, b1) (a2, b2) s2\"", "output": "by(simp add: Let_def and_secret_sharing.Ideal1_def S1_and'_def split_def out1_def S1_and_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_new_same_addr_singleton:\n assumes E: \"E \\ \\\"\n shows \"\\a. new_actions_for P E adal \\ {a}\"", "output": "by(blast dest: \\_new_actions_for_fun[OF E])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma image_filter_cartesian_product_alt:\n \"image_filter_cartesian_product f s1 s2 ==\n iterate_to_set s3.empty s3.ins (set_iterator_image_filter f (\n set_iterator_product (s1.iteratei s1) (\\_. s2.iteratei s2)))\"", "output": "unfolding image_filter_cartesian_product_def iterate_to_set_alt_def set_iterator_image_filter_def set_iterator_product_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unit_disc_fix_moebius_add [simp]:\n assumes \"unit_disc_fix M1\" and \"unit_disc_fix M2\"\n shows \"unit_disc_fix (M1 + M2)\"", "output": "using assms unfolding unit_disc_fix_iff_ounit_circle\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PO_m2_sat_m1_inv2i_serv [iff]: \"reach m2 \\ m1_inv2i_serv\"", "output": "by (rule_tac Pa=m1_inv2i_serv and Qa=m1_inv2i_serv and Q=m1_inv2i_serv in m2_implements_m1 [THEN [5] internal_invariant_translation]) (auto simp add: m2_loc_defs med21_def intro!: m1_inv2i_servI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_summaries: \"finite {xs. distinct xs \\ (\\(l1, s, l2) \\ set xs. s \\\\<^sub>A weights l1 l2)}\"", "output": "apply (rule finite_subset[OF _ finite_distinct_bounded[of \"((\\((l1,l2),s). (l1,s,l2)) ` (Sigma UNIV (\\(l1,l2). set_antichain (weights l1 l2))))\"]])\napply (force simp: finite_set_summaries)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interrupt_action_ok_correct [simp]:\n \"is_invar is \\ interrupt_action_ok is ia \\ FWInterrupt.interrupt_action_ok (is_\\ is) ia\"", "output": "by(cases ia)(auto simp add: is.memb_correct)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem cond_2r:\n assumes \"u_max \\ other.s_stop\"\n shows \"collision_react {0 ..}\"", "output": "using assms\napply(intro collision_react_subset[where t=\"{0..}\" and s =\"{0 .. max t_stop other.t_stop}\"])\napply(intro u_other_ivt[where t =\"max t_stop other.t_stop\"])\napply(auto simp: u_eq_u_stop other.s_eq_s_stop) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interaction_bounded_by_upf_dec_Inr [interaction_bound]:\n \"interaction_bounded_by (Not \\ isl) (intercept_upf_dec LD c) 1\"", "output": "unfolding intercept_upf_dec_def case_prod_app\nby(interaction_bound, clarsimp simp add: SUP_constant split: prod.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"is_cons_cluster C \\ quorum C\" \n \\ \\Every consensus cluster is a quorum.\\", "output": "unfolding is_cons_cluster_def\nby (metis inf.order_iff l1 quorum_of_def stellar.quorum_def stellar_axioms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Cinfinite_ctwo_cexp:\n \"Cinfinite r \\ Cinfinite (ctwo ^c r)\"", "output": "unfolding ctwo_def cexp_def cinfinite_def Field_card_of\nby (rule conjI, rule infinite_Func, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in pre_digraph) digraph_isomorphism_subgraphI:\n assumes \"digraph_isomorphism hom\"\n assumes \"subgraph H G\"\n shows \"pre_digraph.digraph_isomorphism H hom\"", "output": "using assms\nby (auto simp: pre_digraph.digraph_isomorphism_def subgraph_def compatible_def intro: subset_inj_on)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma square_free_MP_Rel [transfer_rule]: \"(MP_Rel ===> (=)) square_free_m square_free\"", "output": "unfolding square_free_m_def[abs_def] square_free_def[abs_def]\nby (transfer_prover_start, transfer_step+, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_of_dlist_map[simp]:\n \"list_of_dlist (map f dxs) = remdups (List.map f (list_of_dlist dxs))\"", "output": "by descending (simp add: remdups_map_remdups)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_root_node_si_is_l_get_root_node [instances]: \"l_get_root_node get_root_node_si get_parent\"", "output": "apply(simp add: l_get_root_node_def)\nusing get_root_node_si_no_parent\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mbisim_deadlock_inv:\n \"s1 \\m s2 \\ r1.deadlock s1 = r2.deadlock s2\"", "output": "unfolding r1.deadlock_eq_deadlocked' r2.deadlock_eq_deadlocked'\nby(rule mbisim_deadlocked'_inv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma termMOD_igWlsAbsDisj: \"igWlsAbsDisj termMOD\"", "output": "unfolding igWlsAbsDisj_def\nusing wlsAbs_disjoint\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hcomp_simps\\<^sub>W\\<^sub>C [simp]:\n assumes \"\\ \\ \\ \\ None\"\n shows \"arr (\\ \\ \\)\" and \"dom (\\ \\ \\) = dom \\ \\ dom \\\" and \"cod (\\ \\ \\) = cod \\ \\ cod \\\"", "output": "using assms preserves_arr preserves_dom preserves_cod VoV.arr_char VoV.inclusion VoV.dom_simp VoV.cod_simp\nby force+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cart_alt: \"cart s1 s2 == \n inj_image_filter_cartesian_product Some s1 s2\"", "output": "unfolding cart_def inj_image_filter_cartesian_product_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Gramian_determinant_0 [simp]: \"Gramian_determinant G 0 = 1\"", "output": "unfolding Gramian_determinant_def Gramian_matrix_def Let_def\nby (simp add: times_mat_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma consistent_prv_LLq_Num_leq:\nassumes consistent \"prv (LLq (Num m) (Num n))\"\nshows \"m \\ n\"", "output": "by (metis Num assms consistent_def LLq not_leq_prv_neg_LLq_Num num prv_neg_fls subsetCE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_generat_lub [simp]:\n \"map_generat f g h (generat_lub lub1 lub2 lub3 A) = generat_lub (f \\ lub1) (g \\ lub2) (h \\ lub3) A\"", "output": "by(simp add: generat_lub_def o_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wellFormedSimp[simp]:\n fixes \\ :: \"(('d::fs_name) list \\ ('e::fs_name) list) list\"\n and p :: \"name prm\"\n \n shows \"wellFormedSubst(p \\ \\) = wellFormedSubst \\\"", "output": "by(induct \\) (auto simp add: eqvts wellFormedSubst_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma span_with:\n \"span = (\\X. span_with (+) 0 scale X)\"", "output": "unfolding span_explicit span_with_def sum_with .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma n_replace_proj_le_n_as_2:\n fixes a vs vs'\n assumes \"(vs \\ vs')\" \"(varset_action a vs')\"\n shows \"(varset_action (action_proj a vs') vs \\ varset_action a vs)\"", "output": "unfolding varset_action_def action_proj_def\nusing assms\nby (simp add: exec_drest_5 varset_action_def) \\ \\NOTE type of `PROB` had to be fixed for use of `empty\\_problem\\_bound`.\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_typ'_preserves_term_ok':\n assumes \"wf_theory \\\"\n assumes \"inst_ok \\ insts\"\n assumes \"term_ok' (sig \\) t\"\n shows \"term_ok' (sig \\) (subst_typ' insts t)\"", "output": "using assms term_ok'_subst_typ' typ_ok_def\nby (metis list.pred_mono_strong wf_theory_imp_is_std_sig wf_type_imp_typ_ok_sig)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma merge0:\n assumes idx: \"idx_sequence idx\"\n shows \"merge ws idx 0 = ws 0 0\"", "output": "proof (rule merge[OF idx]) from idx have \"idx 0 < idx (Suc 0)\" unfolding idx_sequence_def\nby blast with idx show \"0 \\ {idx 0 ..< idx (Suc 0)}\"\nby (simp add: idx_sequence_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma line_param:\n shows \"z1 + cor k * (z2 - z1) \\ line z1 z2\"", "output": "unfolding line_def\nby (auto simp add: collinear_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_FGcontra_id0: \"map_FGcontra id id id id id id id id id id id = id\"", "output": "unfolding map_FGcontra_def\nby (simp add: map_F_id0 map_G_id0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bpc_to_sa_run_conv[simp]: \n \"graph_defs.is_run (bpc_to_sa bpc) = bpc_is_run bpc\"", "output": "apply (rule ext) unfolding graph_defs.is_run_def unfolding bpc_to_sa_def bpc_is_run_def ipath_def E_of_succ_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bisims1_lengthD: \"P, es, h \\ (es', xs) [\\] s \\ length es = length es'\"", "output": "apply(induct es arbitrary: es' s)\napply(auto elim: bisims1.cases) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Least_True_nat[intro, simp]: \"(LEAST i::nat. True) = 0\"", "output": "by (metis (lifting) One_nat_def less_one not_less_Least not_less_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma runE'[run_elims]:\n assumes \"run (f \\ g) \\ \\'' res\"\n obtains \\t rt where \n \"run f \\ \\t rt\"\n \"run g \\t \\'' res\"", "output": "using assms\nby (rule_tac runE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strict[simp,code_unfold]: \" f invalid = invalid\"", "output": "by(rule ext, simp add: def_scheme True_def False_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma it_to_it_fold: \"proper_it it (it'::('x,'\\) set_iterator) \n \\ it_to_it it = it'\"", "output": "unfolding it_to_it_def\nby (simp add: proper_it_fold)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma right_total_mod_ring_rel [transfer_rule]: \"right_total mod_ring_rel\"", "output": "unfolding mod_ring_rel_def right_total_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ring_finite_field_ops32: \"ring_ops (finite_field_ops32 pp) mod_ring_rel32\"", "output": "by (unfold_locales, auto simp: finite_field_ops32_def bi_unique_mod_ring_rel32 right_total_mod_ring_rel32 mod_ring_plus32 mod_ring_minus32 mod_ring_uminus32 mod_ring_mult32 mod_ring_eq32 mod_ring_0_32 mod_ring_1_32 Domainp_mod_ring_rel32)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bisim_red_red0_final0D:\n \"\\ bisim_red_red0 (x1, m1) (x2, m2); final_expr0 x2 \\ \\ final_expr x1\"", "output": "by(erule bisim_red_red0.cases) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma brnL_pickFT_BrnFT[simp]:\nassumes \"properL cl\" and \"WtFT cl = 1\"\nshows \"brnL cl (pickFT cl) \\ BrnFT cl dl\"", "output": "using assms brn_gt_0_L unfolding BrnFT_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pathstart_join[simp]: \"pathstart (g1 +++ g2) = pathstart g1\"", "output": "unfolding pathstart_def joinpaths_def pathfinish_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma empty_set_less_eq [iff]: \"{} \\ A\"", "output": "by(auto simp add: set_less_eq_def finite_complement_partition intro: set_less_eq_aux'_into_set_less_eq_aux'')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pre_test_test_same:\n \"-p\\-p = 1\"", "output": "using pre_test tests_dual.sba_dual.less_eq_sup_top tests_dual.sba_dual.reflexive\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Ptl_not_None [simp]: \"\\lNone (ltl P)\"", "output": "using P_LCons P_maximal maximal_no_deadend v0_no_deadend\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hb_consistent_append [intro!]:\n assumes \"hb_consistent suffix\"\n \"hb_consistent prefix\"\n \"\\s p. s \\ set suffix \\ p \\ set prefix \\ \\ s \\ p\"\n shows \"hb_consistent (prefix @ suffix)\"", "output": "using assms\nby (induction rule: hb_consistent.induct) force+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma surj_to_conjugate_space[simp]: \"surj to_conjugate_space\"", "output": "by (meson surj_def to_conjugate_space_cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma before_dist_snd_fst[simp]: \"before vs ram1 ram2 \\ distinct vs \\ snd (splitAt ram2 (fst (splitAt ram1 vs))) = snd (splitAt ram1 (snd (splitAt ram2 vs)))\"", "output": "apply (simp add: before_def)\napply (elim exE)\napply (drule_tac splitAt_dist_ram_all)\nby (auto dest!: pairD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma measurable_lift_Comp_IntVal[simp]:\n \"lift_Comp f g \\ measurable (PRODUCT INTEG INTEG) BOOL\"", "output": "unfolding lift_Comp_def\nby (auto intro!: val_case_stock_measurable)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Gamma_minus_one_half_real:\n \"Gamma (-(1/2) :: real) = - 2 * sqrt pi\"", "output": "using rGamma_plus1[of \"-1/2 :: real\"]\nby (simp add: rGamma_inverse_Gamma divide_simps Gamma_one_half_real split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_remove1_conv_remove1 [simp]:\n \"equal_base.list_remove1 (=) = List.remove1\"", "output": "unfolding equal_base.list_remove1_def List.remove1_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma nn_integral_pmf_of_set: \"nn_integral (measure_pmf pmf_of_set) f = sum f S / card S\"", "output": "by (subst nn_integral_measure_pmf_finite) (simp_all add: sum_distrib_right[symmetric] card_gt_0_iff S_not_empty S_finite divide_ennreal_def divide_ennreal[symmetric] ennreal_of_nat_eq_real_of_nat[symmetric] ennreal_times_divide)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma collect_basis_in_finite: \"finite (Collect (basis_in \\))\"", "output": "unfolding basis_in_def\nusing \\.collect_basis_finite ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma conjugate_in_unit_disc [simp]:\n assumes \"z \\ unit_disc\"\n shows \"conjugate z \\ unit_disc\"", "output": "using conjugate_unit_disc\nusing assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Top_useless: \"\\ \\ F \\ \\ - {\\} \\ F\"", "output": "by (metis NDtrans Top_provable Weaken insert_Diff_single subset_insertI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_inside2:\n assumes \"Some (b1,c1) = lookup (\\'@((x,b0,c0)#\\<^sub>\\\\)) y\" and \"x\\y\"\n shows \"Some (b1,c1) = lookup (\\'@((x,b0,c0')#\\<^sub>\\\\)) y\"", "output": "using assms\nby(induct \\' rule: \\.induct,auto+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PO_m3_inv1_lkeysec_trans [iff]:\n \"{m3_inv1_lkeysec} trans m3 {> m3_inv1_lkeysec}\"", "output": "by (fastforce simp add: PO_hoare_defs m3_defs intro!: m3_inv1_lkeysecI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma psubstT_eq_rawpsubst2:\nassumes \"r \\ atrm\" \"x1 \\ var\" \"x2 \\ var\" \"t1 \\ atrm\" \"t2 \\ atrm\"\nand \"x1 \\ x2\" \"x2 \\ FvarsT t1\"\nshows \"psubstT r [(t1,x1),(t2,x2)] = rawpsubstT r [(t1,x1),(t2,x2)]\"", "output": "using assms\nusing less_SucE\nby (intro psubstT_eq_rawpsubstT) force+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sup_pres_Sup_closed: \"Sup_pres f \\ Sup_closed_set (range f)\"", "output": "by (metis (mono_tags, lifting) Sup_closed_set_def comp_eq_elim range_eqI subset_image_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Infty_neq_0[simp]:\n \"(\\::ereal) \\ 0\" \"0 \\ (\\::ereal)\"\n \"-(\\::ereal) \\ 0\" \"0 \\ -(\\::ereal)\"", "output": "by (simp_all add: zero_ereal_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Br_Border: \"Int_1a \\ \\ \\A. Br(\\ A)\"", "output": "by (metis Br_int_def MONO_MULTa MONO_def diff_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma t_stop_pos:\n assumes \"v \\ 0\"\n shows \"0 < t_stop\"", "output": "using decel nonneg_vel assms\nby (auto simp: t_stop_def divide_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_state_update:\n \"((=) ===> (=) ===> rel_state (=)) pair.update_pair update_pair\"", "output": "unfolding pair.update_pair_def update_pair_def unfolding move12'_def[symmetric] unfolding update1'_def[symmetric] update2'_def[symmetric] get_k2_def[symmetric] get_k2'_def[symmetric] get_k1_def[symmetric] get_k1'_def[symmetric]\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma complete_no_arrive [simp]:\n \"(s, ii\\ni:arrive(m), s') \\ cnet_sos T\"", "output": "proof assume \"(s, ii\\ni:arrive(m), s') \\ cnet_sos T\" hence \"ii\\ni:arrive(m) \\ ii\\ni:arrive(m)\"\nby (rule cnet_sos.cases) auto thus False\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma equal_cnam_code [code]:\n \"HOL.equal list_nam list_nam \\ True\"\n \"HOL.equal test_nam test_nam \\ True\"\n \"HOL.equal list_nam test_nam \\ False\"\n \"HOL.equal test_nam list_nam \\ False\"", "output": "by(simp_all add: distinct_classes distinct_classes[symmetric] equal_cnam_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dtype_simps [simp]:\n\"dtype CounterImpl'value = CClassT CounterImpl\" \n\"dtype UndoCounter'save = CClassT UndoCounter\"\n\"dtype Dummy'dummy = AClassT Dummy\"\n\"dtype Counter'dummy = InterfaceT Counter\"", "output": "by (simp_all add: dtype_def dtype_def dtype_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diff_existence_ivl_trans:\n \"t0 \\ existence_ivl0 x0 \\ t \\ existence_ivl0 x0 \\ t - t0 \\ existence_ivl0 (flow0 x0 t0)\" for t", "output": "by (metis (no_types, hide_lams) add.left_neutral diff_add_eq local.existence_ivl_reverse local.existence_ivl_trans local.flows_reverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unit_vec_Bounded_vec[simp,intro]: \"unit_vec n i \\ Bounded_vec (max 1 Bnd)\"", "output": "unfolding Bounded_vec_def unit_vec_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_NFlow: \"NFlow c s t (flow_of_cf cf)\"", "output": "using EX_RG f_unique is_NPreflow NFlow.axioms(1)\napply (fold f_def)\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma t_stop_zero:\n assumes \"t_stop \\ x\"\n assumes \"x \\ \\\"\n shows \"v\\<^sub>e = 0\"", "output": "using assms unfolding t_stop_def\nusing ego2.t_stop_nonneg pos_react ego2.t_stop_zero\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abst_action_repc:\n assumes \"cfg \\ R_G.valid_cfg\"\n shows \"abst (action (repc cfg)) = action cfg\"", "output": "using assms unfolding repc_def\nby (auto intro: abst_action_repcs simp: R_G_I)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rem_implicit_pres_ops_numVars[simp]:\n \"ast_problem.numVars (rem_implicit_pres_ops prob) = ast_problem.numVars prob\"", "output": "by (cases prob) (simp add: ast_problem.numVars_def ast_problem.astDom_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fetch_t_wcode_adjust[simp]:\n \"fetch t_wcode_adjust (Suc 0) Bk = (W1, 1)\"\n \"fetch t_wcode_adjust (Suc 0) Oc = (R, 2)\"\n \"fetch t_wcode_adjust (Suc (Suc 0)) Oc = (R, 3)\"\n \"fetch t_wcode_adjust (Suc (Suc (Suc 0))) Oc = (R, 4)\"\n \"fetch t_wcode_adjust (Suc (Suc (Suc 0))) Bk = (R, 3)\"\n \"fetch t_wcode_adjust 4 Bk = (L, 8)\"\n \"fetch t_wcode_adjust 4 Oc = (L, 5)\"\n \"fetch t_wcode_adjust 5 Oc = (W0, 5)\"\n \"fetch t_wcode_adjust 5 Bk = (L, 6)\"\n \"fetch t_wcode_adjust 6 Oc = (R, 7)\"\n \"fetch t_wcode_adjust 6 Bk = (L, 6)\"\n \"fetch t_wcode_adjust 7 Bk = (W1, 2)\"\n \"fetch t_wcode_adjust 8 Bk = (L, 9)\"\n \"fetch t_wcode_adjust 8 Oc = (W0, 8)\"\n \"fetch t_wcode_adjust 9 Oc = (L, 10)\"\n \"fetch t_wcode_adjust 9 Bk = (L, 9)\"\n \"fetch t_wcode_adjust 10 Bk = (L, 11)\"\n \"fetch t_wcode_adjust 10 Oc = (L, 10)\"\n \"fetch t_wcode_adjust 11 Oc = (L, 11)\"\n \"fetch t_wcode_adjust 11 Bk = (R, 0)\"", "output": "by(auto simp: fetch.simps t_wcode_adjust_def nth_of.simps numeral)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HMA_M_0 [transfer_rule]: \n \"HMA_M (0\\<^sub>m CARD('nr) CARD('nc)) (0 :: 'a :: zero ^ 'nc ^ 'nr )\"", "output": "unfolding HMA_M_def from_hma\\<^sub>m_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma update_arg_wf_tuples [simp]:\n \"\\nhip pre. update_arg_wf (0, unk, val, Suc 0, nhip, pre)\"\n \"\\n hops nhip pre. update_arg_wf (Suc n, kno, val, hops, nhip, pre)\"", "output": "unfolding update_arg_wf_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stack_reachable: \"set (stack s) \\ reachable\"", "output": "using stack_discovered discovered_reachable\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma block_nominals_branch:\n assumes \\block \\. branch\\\n shows \\block_nominals block \\ branch_nominals branch\\", "output": "unfolding branch_nominals_def\nusing assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reachable_sdom_acyclic:\n assumes \"reachable n2\"\n and \"strict_dominate n1 n2\"\n shows \"\\ strict_dominate n2 n1\"", "output": "using assms\napply (insert reachable_dom_acyclic2[OF assms(1) assms(2)])\nby (auto simp add:not_dom_eq_not_sdom)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma equiv'_rotate_1:\n \"B_A.equiv' b a\" if \"A_B.equiv' a b\"", "output": "using that\nby (auto simp: B_A.equiv'_def A_B.equiv'_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dims_output_deep_model:\nassumes \"length rs \\ 2\"\nand \"\\r. r\\set rs \\ r > 0\"\nand \"j < rs!0\"\nand \"remove_weights m = deep_model_l rs\"\nshows \"Tensor.dims (tensors_from_net m $ j) = replicate (2^(length rs - 2)) (last rs)\"", "output": "using dims_tensors_from_net input_sizes_deep_model[OF assms(1)] output_size_correct_tensors valid_deep_model assms(3) assms(4) input_sizes_remove_weights length_output_witness witness_is_deep_model\nby (metis vec_setI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma MP_Rel_OO_conversep_MP_Rel [simp]: \"MP_Rel OO MP_Rel\\\\ = eq_m\"", "output": "by (intro ext, auto simp: OO_def MP_Rel_def Mp_f_representative)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_shadow_root_get_child_nodes_is_l_new_shadow_root_get_child_nodes [instances]:\n \"l_new_shadow_root_get_child_nodes type_wf known_ptr get_child_nodes get_child_nodes_locs\"", "output": "apply(simp add: l_new_shadow_root_get_child_nodes_def l_new_shadow_root_get_child_nodes_axioms_def instances)\nusing get_child_nodes_new_shadow_root new_shadow_root_no_child_nodes\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma multiplicity_one_nat [simp]: \"multiplicity p (Suc 0) = 0\"", "output": "unfolding One_nat_def [symmetric]\nby (rule multiplicity_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reaches_Reverse_iff [simp]:\n \"reaches (Reverse fsm) st (rev xs) st' \\ reaches fsm st' xs st\"", "output": "by (induct xs arbitrary: st st') (auto simp add: Reverse_def reaches_append_iff reaches_imp_states)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma L_transform_Not [simp]: \"L_transform (Not x) = Formula.Not (L_transform x)\"", "output": "unfolding L_transform_def\nby (simp add: Formula.Not_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bs_subset_eq_correct: \"bs_subset_eq s1 s2 \\ bs_\\ s1 \\ bs_\\ s2\"", "output": "unfolding bs_\\_def bs_subset_eq_def\nby transfer (auto simp add: bit_eq_iff bin_nth_ops)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ExcessTable_subset:\n \"set (map fst (ExcessTable g vs)) \\ set vs\"", "output": "by (induct vs) (auto simp add: ExcessTable_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wtE[simp]: \"Ik.wtE \\ \\ GE.wtE \\\"", "output": "unfolding Ik.wtE_def GE.wtE_def intT_def\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma H_rcoset_reps : \"Group.is_rcoset_replist H G H_rcoset_reps\"", "output": "using H_rcoset_reps_def nonzero_H_rcoset_reps_def GRep.ex_rcoset_replist_hd0 someI_ex\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interaction_bounded_by_upf_enc_Inr [interaction_bound]:\n \"interaction_bounded_by (Not \\ isl) (intercept_upf_enc k b LD mm) 0\"", "output": "unfolding intercept_upf_enc_def case_prod_app\nby(interaction_bound, clarsimp simp add: SUP_constant bot_enat_def split: prod.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ins3_Leaf[simp,code]:\n \"ins3 n d x Leaf =\n (if bal_i (n+1) (d+1) then Bal2 (Node Leaf x Leaf) else Unbal2 (Node Leaf x Leaf) 1 1)\"", "output": "using val_cong[OF ins3_tm.simps(1)]\nby(simp only: ins3_def val_simps cmp_val.case_distrib[of val])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma varsA_substA:\n\"varsA (substA \\ at) = (\\ x \\ varsA at. vars (\\ x))\"", "output": "using vars_subst[of \\]\nby (cases at, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma while_top:\n \"top \\ x = top\"", "output": "by (metis sup_left_top star.circ_top star_omega_top while_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma insertion_one : \"insertion f (Const 1 ::real mpoly) = 1\"", "output": "by (metis insertion_one mult.right_neutral mult_one_left)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Rep_hf_0 [simp]: \"Rep_hf 0 = 0\"", "output": "by (metis Abs_hf_inverse HF.HF_def UNIV_I Zero_hf_def image_empty set_encode_empty)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fv_asToHeap: \"fv (asToHeap \\) = fv \\\"", "output": "unfolding fv_def\nby (auto simp add: supp_asToHeap)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ide_hcomp [intro, simp]:\n assumes \"ide \\\" and \"ide \\\" and \"src \\ = trg \\\"\n shows \"ide (\\ \\ \\)\"", "output": "using assms VV.ide_char VV.arr_char H.preserves_ide [of \"(\\, \\)\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma beta_norm_preserves_proves:\n assumes thy: \"wf_theory \\\"\n assumes finite: \"finite \\\"\n assumes term_ok: \"\\, \\ \\ t\"\n assumes beta: \"beta_norm t = Some u\"\n assumes ctxt: \"\\A\\\\. term_ok \\ A\" \"\\A\\\\. typ_of A = Some propT\"\n shows \"\\, \\ \\ u\"", "output": "using assms proves_eq_mp_rule_better[OF thy _ _ finite ctxt] proves_beta_norm[OF thy finite _ _ ctxt] proved_terms_well_formed(2)\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_simps [simp]:\n shows \"iso \\\" and \"arr \\\" and \"src \\ = src u\" and \"trg \\ = trg r\"\n and \"cod \\ = g \\ w\"", "output": "using uw\\\\\\ \\_in_hom\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lhsv\\_upd: \"m p = None \\ lhsv\\ (m(p\\c)) = lhsv' c \\ lhsv\\ m\"", "output": "apply (auto simp: lhsv\\_def ran_def)\nby (metis option.simps(3))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lss_inj_image_filter_impl : \"set_inj_image_filter lss_\\ lss_invar lss_\\ lss_invar lss_inj_image_filter\"", "output": "apply (unfold_locales)\napply (simp_all add: lss_invar_def lss_inj_image_filter_def lss_image_filter_def mergesort_remdups_correct lss_\\_def set_map_filter Bex_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma at_begin_fst_bwtn_Bk[intro]: \"at_begin_fst_bwtn (as, am) (q, aaa, []) ires \n \\ at_begin_fst_bwtn (as, am) (q, aaa, [Bk]) ires\"", "output": "apply(simp only: at_begin_fst_bwtn.simps)\nusing replicate_once\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_link[simp]: \"(tree_to_multiset (link t1 t2)) \n = (tree_to_multiset t1) + (tree_to_multiset t2)\"", "output": "by(cases t1, cases t2, auto simp add: union_ac)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma projecting_Int: \n \"[| projecting C h F XA' XA; projecting C h F XB' XB |] \n ==> projecting C h F (XA' \\ XB') (XA \\ XB)\"", "output": "by (unfold projecting_def, blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proots_unbounded_line_card_code[code]:\n \"proots_unbounded_line_card p st tt = \n (if st\\tt then \n (let pc = pcompose p [:st, tt - st:];\n pR = map_poly Re pc;\n pI = map_poly Im pc;\n g = gcd pR pI\n in nat (changes_R_smods g (pderiv g))) \n else \n Code.abort (STR ''proots_unbounded_line_card fails due to invalid hyperplanes.'') \n (\\_. proots_unbounded_line_card p st tt))\"", "output": "unfolding proots_unbounded_line_card_def\nusing card_proots_unbounded_line[of st tt p]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma theNFTBoth_length_finished[simp]:\nassumes \"n \\ theNFTBoth cl dl\"\nshows \"n < length cl\" and \"\\ finished (cl!n)\"\nand \"n < length dl\" and \"\\ finished (dl!n)\"", "output": "using assms unfolding theNFTBoth_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma power_sub_int:\n \"\\ m \\ n; 0 < b \\ \\ b ^ n div b ^ m = (b ^ (n - m) :: int)\"", "output": "apply (subgoal_tac \"\\n'. n = m + n'\")\napply (clarsimp simp: power_add)\napply (rule exI[where x=\"n - m\"])\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fps_integral0_of_nat:\n \"fps_integral0 (of_nat n :: 'a::division_ring fps) = of_nat n * fps_X\"", "output": "using fps_integral0_fps_const[of \"of_nat n :: 'a\"]\nby (simp add: fps_of_nat)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma totient_less_not_prime:\n assumes \"\\ prime n\" \"1 < n\"\n shows \"totient n < n - 1\"", "output": "using totient_imp_prime totient_less assms\nby (metis One_nat_def Suc_pred le_less_trans less_SucE zero_le_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ppoint_mult_correct: \"on_curvep a b p \\\n make_affine (ppoint_mult a n p) = point_mult a n (make_affine p)\"", "output": "by (induct n) (simp_all add: padd_correct)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma UNpart01_cases[elim, consumes 1, case_names Local0 Local]:\nassumes \"II \\ UNpart01 cl dl P\" and \"II = BrnFT cl dl \\ phi\"\n\"\\ n I. \\n \\ theNFTBoth cl dl; I \\ P n; II = shift cl n I; II \\ UNpart1 cl dl P\\ \\ phi\"\nshows phi", "output": "using assms unfolding UNpart01_def UNpart1_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma multiple_bibd: \"n > 0 \\ bibd \\ (multiple_blocks n) \\ (\\ * n)\"", "output": "using multiple_t_design\nby (simp add: bibd_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma r_lifz_recfn [simp]:\n assumes \"recfn n f\" and \"recfn n g\"\n shows \"recfn (Suc n) (r_lifz f g)\"", "output": "using assms r_lazyifzero_recfn r_lifz_def wellf_arity_nonzero\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma asprod_pos_pos:\"0 \\ x \\ 0 \\ int n *\\<^sub>a x\"", "output": "apply (cases \"n = 0\")\napply simp_all\nusing asprod_pos_mono [THEN sym, of \"int n\" \"0\" \"x\"]\napply (simp add:asprod_n_0) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minWait_least: \"\\enabled (shd (sdrop n rs)) s\\ \\ minWait rs s \\ n\"", "output": "unfolding minWait_def\nby (intro Least_le conjI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_normalise_decomp [simp]: \"length (snd (normalise_decomp x y n)) = n\"", "output": "by (induction x y n rule: normalise_decomp.induct) (auto split: prod.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bernpoly_1': \"bernpoly n 1 = of_real (bernoulli' n)\"", "output": "using bernpoly_1_1 [where ?'a = 'a]\nby (cases \"n = 1\") (simp_all add: bernpoly_1 bernoulli'_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma power_sq_power: \"power_sq x n = p_power (1\\<^sub>\\ + x) n\"", "output": "apply (induct n)\napply (simp)\nusing Suc_eq_plus1 pow_prop power_sq.simps(2)\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pow_equals:\n assumes \"PoW t n = PoW t n'\"\n and \"n'\\n\"\n and \"n''\\n\"\n and \"n''\\n'\"\nshows \"PoW t n = PoW t n''\"", "output": "by (metis pow_mono assms(1) assms(3) assms(4) eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma measure_loop_induct [case_names Step]: \n \"\\\\n. \\ P (f n) \\ (f (Suc n), (f n)) \\ measure_loop\\ \\ \\n. P (f n)\"", "output": "using wf_measure_loop\nby (metis wf_iff_no_infinite_down_chain)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sums_confine_mult:\n fixes f :: \"nat \\ 'a::real_normed_algebra\"\n shows \"confine f N sums a \\ confine (\\n. c * f n) N sums (c * a)\"", "output": "using sums_mult [of \"confine f N\" a c]\nby (simp add: confine_def if_distrib [of \"(*)c\"] cong: if_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ts_ord_mult_isor: \"n x \\ n y \\ n x \\ n z \\ n y \\ n z\"", "output": "using n_comm ts_ord_mult_isol\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eNorm_Norm':\n assumes \"x \\ space\\<^sub>N N\"\n shows \"Norm N x = 0\"", "output": "using assms unfolding Norm_def\napply (auto simp add: spaceN_iff)\nusing top.not_eq_extremum\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma foldli_size_abort: \n \"det_fold_map X (\\n. n_ n. Suc n) 0 (op_map_size_abort m)\"", "output": "apply rule\nusing foldli_size_abort_aux[where ?n0.0=0]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_shifted_pow:\n \"(fls_shift m f) ^ n = fls_shift (n*m) (f ^ n)\"", "output": "by (induct n) (simp_all add: fls_times_both_shifted_simp algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_rexp_of': \"wf_formula n \\ \\ wf n (rexp_of' n \\)\"", "output": "unfolding rexp_of'_def\nby (auto simp: max_idx_vars intro: wf_rexp_of_alt wf_rexp_ENC[OF finite_FOV])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma norm_power_int: \"norm (power_int x n) = power_int (norm x) n\"\n for x :: \"'a::real_normed_div_algebra\"", "output": "by (cases n rule: int_cases4) (auto simp: norm_power power_int_minus norm_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pdevs_val_upd[simp]:\n \"pdevs_val (e(n := e')) X = pdevs_val e X - e n * pdevs_apply X n + e' * pdevs_apply X n\"", "output": "unfolding pdevs_val_def\nby (subst suminf_finite[OF finite.insertI[OF finite_degree_nonzero], of n X], auto simp: pdevs_val_def sum.insert_remove)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fps_X_dvd_fps_ln [simp]: \"fps_X dvd fps_ln c\"", "output": "proof - have \"fps_ln c = fps_X * Abs_fps (\\n. (-1) ^ n / (of_nat (Suc n) * c))\"\nby (intro fps_ext) (simp add: fps_ln_def of_nat_diff) thus ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_plan_act_is_sound:\n assumes \"wf_plan_action (PAction n args)\"\n shows \"sound_opr\n (instantiate_action_schema (the (resolve_action_schema n)) args)\n ((pddl_opr_to_act\n (instantiate_action_schema (the (resolve_action_schema n)) args)))\"", "output": "using assms\nusing wf_action_schema_sound_inst wf_eff_pddl_ground_act_is_sound_opr\nby (auto split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fact_double:\n \"fact (2 * n) = (2 ^ (2 * n) * pochhammer (1 / 2) n * fact n :: 'a::field_char_0)\"", "output": "using pochhammer_double[of \"1/2::'a\" n]\nby (simp add: pochhammer_fact)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma binomial_le_pow:\n assumes \"r \\ n\"\n shows \"n choose r \\ n ^ r\"", "output": "proof - have \"n choose r \\ fact n div fact (n - r)\"\nusing assms\nby (subst binomial_fact_lemma[symmetric]) auto with fact_div_fact_le_pow [OF assms] show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abc_mopup_measure_induct [case_names Step]: \n \"\\\\n. \\ P (f n) \\ (f (Suc n), (f n)) \\ abc_mopup_measure\\ \\ \\n. P (f n)\"", "output": "using wf_abc_mopup_measure\nby (metis wf_iff_no_infinite_down_chain)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma irs_SDG_path_Append:\n \"\\n irs-ns\\\\<^sub>d* n''; n'' irs-ns'\\\\<^sub>d* n'\\ \\ n irs-ns@ns'\\\\<^sub>d* n'\"", "output": "by(induct rule:intra_return_sum_SDG_path.induct, auto intro:intra_return_sum_SDG_path.intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in vars) \"\\,{}\\ \\\\N = 5\\ \\N :== 2 * \\N \\\\N = 10\\\"", "output": "apply vcg_step\napply vcg_step\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fixes e :: \"'addr expr1\" and es :: \"'addr expr1 list\"\n shows compE2_jump_ok [intro!]: \"jump_ok (compE2 e) n (Suc n')\"\n and compEs2_jump_ok [intro!]: \"jump_ok (compEs2 es) n (Suc n')\"", "output": "apply(induct e and es arbitrary: n n' and n n' rule: compE2.induct compEs2.induct)\napply(auto split: bop.split) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma return_node_call_of_return_node:\n \"return_node n \\ \\!n'. call_of_return_node n n'\"", "output": "by -(frule return_node_determines_call_node,unfold call_of_return_node_def,simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_prime_factors'': \"n > 0 \\ f n = (\\p\\prime_factors n. f_prime p ^ multiplicity p n)\"", "output": "by (subst prod_prime_factors') (auto simp: f_prime prime_factors_multiplicity intro!: prod.cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma real_of_nat_div3: \"real n / real x - real (n div x) \\ 1\" for n x :: nat", "output": "proof (cases \"x = 0\") case False then show ?thesis\nby (metis of_int_of_nat_eq real_of_int_div3 zdiv_int)\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PDG_BS_valid_node:\"n \\ PDG_BS S \\ valid_node n\"", "output": "by(auto elim:PDG_path_CFG_path dest:path_valid_node simp:PDG_BS_def split:if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pderiv_monom':\n assumes \"a \\ carrier R\"\n shows \"pderiv (a \\\\<^bsub>P\\<^esub> X[^]\\<^bsub>P\\<^esub>(n::nat)) = ([n]\\a)\\\\<^bsub>P\\<^esub> X[^]\\<^bsub>P\\<^esub>(n-1)\"", "output": "using assms pderiv_monom[of a n ]\nby (simp add: P_def UP_cring.monom_rep_X_pow UP_cring_axioms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma shift2[simp]:\nassumes \"I \\ {..< brn (cl!n)}\"\nand \"ii \\ shift cl n I\"\nshows \"brnL cl n \\ ii \\ ii < brnL cl n + brn (cl!n)\"", "output": "using assms unfolding shift_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma degreen_0[simp]: \"isnpolyh p n \\ m < n \\ degreen p m = 0\"", "output": "by (induct p arbitrary: n rule: degreen.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma setmonotone_funpower: \"setmonotone f \\ setmonotone (funpower f n)\"", "output": "by (induct n, auto simp add: setmonotone_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iFROM_Suc_pred_insert_conv: \"insert n [Suc n\\] = [n\\]\"", "output": "by (insert iFROM_pred_insert_conv[of \"Suc n\"], simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"n \\ length kvs \\ True\"\n and color_of_rbtreeify_g:\n \"\\ n \\ Suc (length kvs); 0 < n \\ \n \\ color_of (fst (rbtreeify_g n kvs)) = B\"", "output": "by(induct n kvs and n kvs rule: rbtreeify_induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prime_factors_multiplicity:\n \"prime_factors n = {p. prime p \\ multiplicity p n > 0}\"", "output": "by (cases \"n = 0\") (auto simp add: prime_factors_dvd prime_multiplicity_gt_zero_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abs_power_eq_0 [simp]: \"\\a\\^n = 0 \\ a = 0 \\ n \\ 0\"", "output": "apply (induct n, force)\napply (unfold power_Suc)\napply (subst real_mult_eq_0_iff, auto) ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma slice1_param_in_slice1:\n \"\\nx \\ sum_SDG_slice1 n; n s-p:V\\\\<^bsub>in\\<^esub> n'\\ \\ nx \\ sum_SDG_slice1 n'\"", "output": "by(induct rule:sum_SDG_slice1.induct, auto intro:sum_SDG_slice1.intros sum_SDG_edge_valid_SDG_node)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coprime_imp_mod_not_zero:\n fixes n x :: nat\n assumes \"1 < n\" \"coprime x n\"\n shows \"0 < x mod n\"", "output": "using assms coprime_0_left_iff nat_dvd_not_less\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma card_grab [simp]:\n assumes \"infinite N\" shows \"card (fst (grab N n)) = n\"", "output": "proof - have \"N \\ enumerate N ` {.. nth_prime k\" \"n < nth_prime (Suc k)\"\n shows \"\\prime n\"", "output": "using assms\nby (metis Suc_leI not_le nth_prime_Suc smallest_prime_beyond_smallest)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma numeral_tree_simps [simp]:\n \"root (numeral n) = numeral n\"\n \"left (numeral n) = numeral n\"\n \"right (numeral n) = numeral n\"", "output": "by(induct n)(auto simp add: numeral.simps plus_tree_def one_tree_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ufa_init_correct: \"ufa_\\ [0.._def\nusing ufa_init_invar[of n]\napply (auto simp: rep_of_refl) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma similarE:\n \"x \\\\ y \\ \\\\<^sup>D\\<^bsub>n\\<^esub>\\x \\\\\\<^bsub>n\\<^esub> \\\\<^sup>E\\<^bsub>n\\<^esub>\\y\"", "output": "unfolding similar_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filterlim_weak_subseq:\n fixes u::\"nat \\ nat\"\n assumes \"(\\n. real(u n)) \\ \\\"\n shows \"LIM n sequentially. u n:> at_top\"", "output": "unfolding filterlim_iff\nby (metis assms eventually_weak_subseq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmlookup_restrict_set_id: \\fset (fmdom N) \\ A \\ fmrestrict_set A N = N\\", "output": "by (metis fmap_ext fmdom'_alt_def fmdom'_notD fmlookup_restrict_set subset_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma allAllocationsInPowerset: \n \"allAllocations N \\ \\ Pow (N \\ (Pow \\ - {{}}))\"", "output": "by (metis PowI allocationPowerset subsetI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma allDefs_disjoint': \"\\n \\ set (\\n g); m \\ set (\\n g); v \\ allDefs g n; v \\ allDefs g m\\ \\ n = m\"", "output": "using allDefs_disjoint\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma quantify_bdd_is_node:\n assumes \"bdd_all (nfa_is_node N) bdd\"\n shows \"bdd_all (nfa_is_node N) (quantify_bdd v bdd)\"", "output": "using assms\nby (induct v bdd rule: quantify_bdd.induct) (simp add: bdd_all_bdd_binop[of \"nfa_is_node N\" _ \"nfa_is_node N\" _ \"nfa_is_node N\" bv_or, OF _ _ bv_or_is_node])+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ccINF_mono:\n \"countable A \\ countable B \\ (\\m. m \\ B \\ \\n\\A. f n \\ g m) \\ (INF n\\A. f n) \\ (INF n\\B. g n)\"", "output": "using ccInf_mono [of \"g ` B\" \"f ` A\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma phils_update_take: \"take n (Up\\<^sub>P ps e) = Up\\<^sub>P (take n ps) e\"", "output": "by (cases e) (simp_all add: phils_state_update_def lphil0_state_update_def rphil_state_update_def take_update_swap)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coprime_set_non_empty: \n assumes \"N > 2\" \n shows \"coprime_set N \\ {}\"", "output": "by(simp add: coprime_set_def; metis assms(1) Suc_lessE coprime_Suc_right_nat lessI numeral_2_eq_2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma split_time_nempty: \n assumes \"0 < n\"\n shows \"split_time s n (n * t) = s t\"", "output": "using assms\nby (simp add: split_time_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma timpl_closure_set_mono_timpl_closure_set:\n assumes N: \"N \\ timpl_closure_set M TI\"\n shows \"timpl_closure_set N TI \\ timpl_closure_set M TI\"", "output": "using timpl_closure_set_mono[OF N, of TI TI] timpl_closure_set_idem[of M TI]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma totient_le: \"totient n \\ n\"", "output": "proof - have \"card (totatives n) \\ card {0<..n}\"\nby (intro card_mono) (auto simp: totatives_def) thus ?thesis\nby (simp add: totient_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GuardK_init [simp]: \"n \\ range shrK \\ GuardK n Ks (initState B)\"", "output": "by (induct B, auto simp: GuardK_def initState.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma compxE2_size_convs [simp]: \"n \\ 0 \\ compxE2 e n d = shift n (compxE2 e 0 d)\"\n and compxEs2_size_convs: \"n \\ 0 \\ compxEs2 es n d = shift n (compxEs2 es 0 d)\"", "output": "by(simp_all add:shift_compxE2 shift_compxEs2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult_root_eq_root2:\n \"n>0 \\ y \\ 0 \\ y * root n x = root n ((y ^ n) * x)\"", "output": "by(simp add: real_root_mult real_root_pos2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma residue_primroot_mod [simp]: \"residue_primroot n (x mod n) = residue_primroot n x\"", "output": "by (cases \"n = 0\") (simp_all add: residue_primroot_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult: \"f (a * b) = f a * f b\"", "output": "proof - { fix n :: nat consider \"n = 0\" | \"n = 1\" | \"n > 1\"\nby force } note P = this show ?thesis\nby (cases a rule: P; cases b rule: P) (simp_all add: zero_aux one_aux mult_aux)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Cauchy_fst: \"Cauchy X \\ Cauchy (\\n. fst (X n))\"", "output": "unfolding Cauchy_def\nby (fast elim: le_less_trans [OF dist_fst_le])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abs_convergent_prod_offset:\n assumes \"abs_convergent_prod (\\n. f (n + m))\" \n shows \"abs_convergent_prod f\"", "output": "using assms unfolding abs_convergent_prod_def\nby (rule convergent_prod_offset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma varsE:\n assumes \"v \\ vars g\"\n obtains n where \"n \\ set (\\n g)\" \"v \\ uses g n\"", "output": "using assms\nby (auto simp:vars_def elim!:fold_union_elem)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unfoldr_upt_generator:\n \"list.unfoldr upt_generator n = [n.. Suc 0\"\n shows \"aprimedivisor n > Suc 0\"", "output": "proof - from assms have \"prime (aprimedivisor n)\"\nby (rule aprimedivisor_nat) thus \"aprimedivisor n > Suc 0\"\nby (simp add: prime_nat_iff)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prime_factors_elem:\n fixes n :: nat assumes \"1 < n\" shows \"\\p. p \\ prime_factors n\"", "output": "using assms\nby (cases \"prime n\") (auto simp: prime_factors_dvd prime_factor_nat)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in design) points_index_count_min: \"multiplicity bl \\ n \\ ps \\ bl \\ \\ index ps \\ n\"", "output": "using points_index_alt_def set_count_size_min\nby (metis filter_mset.rep_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma polyhedral_cone_carrier: assumes \"A \\ carrier_mat nr n\"\n shows \"polyhedral_cone A \\ carrier_vec n\"", "output": "using assms unfolding polyhedral_cone_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dec_interp_Inl: \"\\i \\ FO; i < n\\ \\ \\p. dec_interp n FO x ! i = Inl p\"", "output": "unfolding dec_interp_def\nusing nth_map[of n \"[0..n \\ (take (Suc n) list) [n:=x] = take n list @ [x]\"", "output": "by (induct list arbitrary: n) (auto split: nat.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adjoint_dim:\n \"A \\ carrier_mat n n \\ adjoint A \\ carrier_mat n n\"", "output": "using adjoint_dim_col adjoint_dim_row\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_list_replicate: \"sum_list (replicate n c) = n*c\"", "output": "apply(induction n)\napply(auto simp add: ring_class.ring_distribs(2)) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_set_bits_int_simps: \"wf_set_bits_int f \\ (\\n. (\\n'\\n. \\ f n') \\ (\\n'\\n. f n'))\"", "output": "by(auto simp add: wf_set_bits_int.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fetch_aft_erase_c_b: \n \"fetch (mopup_a n @ shift mopup_b (2 * n)) (2 * n + 4) Bk \n = (R, Suc (2 * n + 1))\"", "output": "apply(subgoal_tac \"length (mopup_a n) = 4 * n\")\napply(subgoal_tac \"2*n + 4 = Suc (2*n + 3)\", simp only: fetch.simps)\napply(auto simp: mopup_b_def nth_append shift.simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tests_complete:\n \"nat_test (\\n . (-p*x)^n\\bot) (bnd(-p*x))\"", "output": "using bnd_test bnd_upper mult_right_dist_bnd nat_test_def tests_dual.complement_bot pre_closed\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma liminf_bounded_iff:\n fixes x :: \"nat \\ ereal\"\n shows \"C \\ liminf x \\ (\\BN. \\n\\N. B < x n)\"\n (is \"?lhs \\ ?rhs\")", "output": "unfolding le_Liminf_iff eventually_sequentially .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma iFROM_iIN_neq: \"[n'\\] \\ [n\\,d]\"", "output": "apply (rule ccontr)\napply (insert iFROM_infinite[of n'], insert iIN_finite[of n d])\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "theorem undiag_diag_fatom[simp]: \"nat_of_fatom (fatom_of_nat n) = n\"", "output": "unfolding fatom_of_nat_def nat_of_fatom_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma real_seq_to_hypreal_approx2:\n \"\\n. norm (x - X n) < inverse(real(Suc n)) \\ star_n X \\ star_of x\"", "output": "by (metis norm_minus_commute real_seq_to_hypreal_approx)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma odd_even_cases [case_names 0 odd even]:\n assumes \"P 0\" and odd: \"\\n. P(Suc (2 * n))\" and even: \"\\n. P(2 * n + 2)\"\n shows \"P n\"", "output": "by (metis nat_induct2 One_nat_def Suc_1 add_Suc_right assms(1) dvdE even odd oddE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in monoid) nat_pow_Suc2:\n \"x \\ carrier G \\ x [^] (Suc n) = x \\ (x [^] n)\"", "output": "using nat_pow_mult[of x 1 n] Suc_eq_plus1[of n]\nby (metis One_nat_def Suc_eq_plus1_left l_one nat.rec(1) nat_pow_Suc nat_pow_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma power_down_nonpos_iff[simp]:\n notes [simp del] = power_down_neg_iff power_down_eq_zero_iff\n shows \"power_down prec b n \\ 0 \\ b < 0 \\ odd n \\ b = 0 \\ n \\ 0\"", "output": "using power_down_neg_iff[of prec b n] power_down_eq_zero_iff[of prec b n]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hyperprime_factor_exists: \"\\n. 1 < n \\ \\k \\ starprime. k dvd n\"", "output": "by transfer (simp add: prime_factor_nat)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_eq_above_subdegreeI:\n assumes \"N \\ fls_subdegree f\" \"N \\ fls_subdegree g\" \"\\k\\N. f $$ k = g $$ k\"\n shows \"f = g\"", "output": "proof (rule fls_eqI) fix n from assms show \"f $$ n = g $$ n\"\nby (cases \"n < N\") auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma size_lt_imp_ex_count_lt: \"size M < size N \\ \\x \\# N. count M x < count N x\"", "output": "by (metis count_eq_zero_iff leD not_le_imp_less not_less_zero size_mset_mono subseteq_mset_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conv_radius_ratio_limit:\n fixes f :: \"nat \\ 'a :: {banach,real_normed_div_algebra}\"\n assumes \"c' = ereal c\"\n assumes nz: \"eventually (\\n. f n \\ 0) sequentially\"\n assumes lim: \"(\\n. norm (f n) / norm (f (Suc n))) \\ c\"\n shows \"conv_radius f = c'\"", "output": "using assms\nby (intro conv_radius_ratio_limit_ereal) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sgn_power:\n fixes x::\"'a::linordered_idom\"\n shows \"sgn (x^n) = (if n=0 then 1 else if even n then \\sgn x\\ else sgn x)\"", "output": "apply (induct n)\nby (auto simp add:sgn_mult)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_compose_power_shift [simp]:\n \"d > 0 \\ fls_compose_power (fls_shift n f) d = fls_shift (d * n) (fls_compose_power f d)\"", "output": "by transfer (auto simp: fun_eq_iff add_ac mult_ac)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma intra_SDG_path_valid_SDG_node:\n assumes \"n i-ns\\\\<^sub>d* n'\" shows \"valid_SDG_node n\" and \"valid_SDG_node n'\"", "output": "using \\n i-ns\\\\<^sub>d* n'\\\nby(induct rule:intra_SDG_path.induct, auto intro:SDG_edge_valid_SDG_node valid_SDG_CFG_node)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma euler_mascheroni_bounds:\n fixes n :: nat assumes \"n \\ 1\" defines \"t \\ harm n - ln (of_nat (Suc n)) :: real\"\n shows \"euler_mascheroni \\ {t + inverse (of_nat (2*(n+1)))..t + inverse (of_nat (2*n))}\"", "output": "using assms euler_mascheroni_upper[of \"n-1\"] euler_mascheroni_lower[of \"n-1\"] unfolding t_def\nby (cases n) (simp_all add: harm_Suc t_def inverse_eq_divide)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma quasinorm_of:\n fixes N::\"('a::real_vector) \\ ennreal\" and C::real\n assumes \"quasinorm_on UNIV C N\"\n shows \"eNorm (quasinorm_of (C,N)) x = N x\"\n \"defect (quasinorm_of (C,N)) = C\"", "output": "using assms unfolding eNorm_def defect_def quasinorm_on_def\nby (auto simp add: quasinorm_of_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma TSdet_Suc: \"Suc n \\ length qs \\ TSdet init initH qs (Suc n) = Step (rTS initH) (TSdet init initH qs n) (qs!n)\"", "output": "by(simp add: take_Suc_conv_app_nth config_snoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma root_main'_pos: \"x \\ 0 \\ n \\ 0 \\ root_main' x n = (y,b) \\ y \\ 0\"", "output": "using root_main'_newton_pos\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zero_spaceN_diff:\n assumes \"x \\ zero_space\\<^sub>N N\" \"y \\ zero_space\\<^sub>N N\"\n shows \"x - y \\ zero_space\\<^sub>N N\"", "output": "using zero_spaceN_add[OF assms(1) zero_spaceN_cmult[OF assms(2), of \"-1\"]]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma smallo_power: \"n > 0 \\ f \\ o[F](g) \\ (\\x. f x ^ n) \\ o[F](\\x. g x ^ n)\"", "output": "by (induction n rule: nat_induct_non_zero) (auto intro: landau_o.small.mult)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma karatsuba_main_step: fixes f :: \"'a :: comm_ring_1 poly\"\n assumes f: \"f = monom_mult n f1 + f0\" and g: \"g = monom_mult n g1 + g0\" \n shows \n \"monom_mult (n + n) (f1 * g1) + (monom_mult n (f1 * g1 - (f1 - f0) * (g1 - g0) + f0 * g0) + f0 * g0) = f * g\"", "output": "unfolding assms\nby (auto simp: field_simps mult_monom monom_mult_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ramsey0: \"\\N::nat. partn_lst {..\\<^sub>d* n'\" shows \"valid_SDG_node n\" and \"valid_SDG_node n'\"", "output": "using \\n ics-ns\\\\<^sub>d* n'\\\nby(induct rule:intra_call_sum_SDG_path.induct, auto intro:sum_SDG_edge_valid_SDG_node valid_SDG_CFG_node)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma limsup_le_extended_Gromov_product_inside':\n assumes \"(\\n. to_Gromov_completion (v n)) \\ (eta::('a::Gromov_hyperbolic_space) Gromov_completion)\"\n shows \"limsup (\\n. Gromov_product_at e (v n) x) \\ extended_Gromov_product_at e eta (to_Gromov_completion x) + deltaG(TYPE('a))\"", "output": "using limsup_le_extended_Gromov_product_inside[OF assms]\nby (simp add: Gromov_product_commute extended_Gromov_product_at_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma enat_min:\n assumes \"m \\ enat n'\"\n and \"enat n < m - enat n'\"\n shows \"enat n + enat n' < m\"", "output": "using assms\nby (metis add.commute enat.simps(3) enat_add_mono enat_add_sub_same le_iff_add)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma non_wildcard_ifaces_upto: \"set (non_wildcard_ifaces_upto n) = {s::string. length s \\ n \\ \\ iface_name_is_wildcard s}\"", "output": "apply(induction n)\napply fastforce\nusing non_wildcard_ifaces\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fps_nth_deriv_mult_const_left[simp]:\n \"fps_nth_deriv n (fps_const c * f) = fps_const c * fps_nth_deriv n f\"", "output": "using fps_nth_deriv_linear[of n \"c\" f 0 0 ]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rev_replicate [simp]: \"rev (replicate n x) = replicate n x\"", "output": "by (induct n) (auto simp: replicate_app_Cons_same)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hermitian_proj_psi_minus_1:\n \"hermitian (2 \\\\<^sub>m proj_psi - 1\\<^sub>m N)\"", "output": "unfolding hermitian_def\napply (subst adjoint_minus[of _ N N])\napply (auto simp add: proj_psi_dim)\napply (subst adjoint_scale)\nusing hermitian_proj_psi[simplified hermitian_def] hermitian_def adjoint_one\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma real_root_gt_zero: \"0 < n \\ 0 < x \\ 0 < root n x\"", "output": "using real_root_less_mono[of n 0 x]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma padic_one_simp:\n assumes \"n >0\"\n shows \"padic_one p n = \\\\<^bsub>residue_ring (p^n)\\<^esub>\" \n \"padic_one p n = 1\"", "output": "apply (simp add: assms padic_one_def residue_ring_def)\nusing assms padic_one_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inv2_rbtreeify_f: \"n \\ length kvs\n \\ inv2 (fst (rbtreeify_f n kvs))\"\n and inv2_rbtreeify_g: \"n \\ Suc (length kvs)\n \\ inv2 (fst (rbtreeify_g n kvs))\"", "output": "by(induct n kvs and n kvs rule: rbtreeify_induct) (auto simp add: bheight_rbtreeify_f bheight_rbtreeify_g intro: bheight_rbtreeify_f_eq_plog2I bheight_rbtreeify_g_eq_plog2I)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma primepow_gt_Suc_0: \"primepow n \\ n > Suc 0\"", "output": "using one_less_power[of \"p::nat\" for p]\nby (auto simp: primepow_def prime_nat_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cong_solve_coprime_int:\n \"\\x. [a * x = 1] (mod n)\" if \"coprime a n\" for a n x :: int", "output": "using that cong_solve_int [of a n]\nby (auto simp add: zabs_def split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eSuc_epred: \"n \\ 0 \\ eSuc (epred n) = n\"", "output": "by(cases n rule: enat_coexhaust) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_Def_valid_SDG_node:\n \"V \\ Def\\<^bsub>SDG\\<^esub> n \\ valid_SDG_node n\"", "output": "by(induct rule:SDG_Def.induct,auto intro:valid_SDG_CFG_node)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma of_complex_of_real_eq [simp]: \"of_complex (of_real n) = of_real n\"", "output": "unfolding of_complex_def of_real_def unfolding scaleR_scaleC\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nformsNoContains: \"[| branch subs gamma f; !n . ~proofTree (tree subs (f n)); nforms (f n) = [] |] ==> ~ contains f iA n\"", "output": "apply(simp add: contains_def2) done \\ \\FIXME tjr assumptions not required\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma kpower_simp: \"kpower f (Suc n) s = (f ; kpower f n) s\"", "output": "unfolding kcomp_eq\napply(induct n) unfolding kpower_base\napply(force simp: subset_antisym) unfolding kpower_def kcomp_eq\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma primerec_all2: \"primerec (rec_all rt rf) n \\ \n primerec rf (Suc n)\"", "output": "by(insert primerec_all[of rt rf n], simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_tv_Fun2: \n \"new_tv n (t1 =-> t2) = (new_tv n t1 \\ new_tv n t2)\"", "output": "apply (unfold new_tv_def)\napply (fastforce) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma powr_complexpow [simp]:\n fixes x::complex shows \"x \\ 0 \\ x powr (of_nat n) = x^n\"", "output": "by (induct n) (auto simp: ac_simps powr_add)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma funpow_shift1:\n \"(Ipoly bs (funpow n shift1 p) :: 'a :: comm_ring_1) =\n Ipoly bs (Mul (Pw (Bound 0) n) p)\"", "output": "by (induct n arbitrary: p) (simp_all add: shift1_isnpoly shift1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fekete:\n fixes u::\"nat \\ real\"\n assumes \"\\n m. u (m+n) \\ u m + u n\"\n \"bdd_below {u n/n | n. n>0}\"\n shows \"(\\n. u n/n) \\ Inf {u n/n | n. n>0}\"", "output": "apply (rule subadditive_converges_bounded) unfolding subadditive_def\nusing assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sasp_exec_noops: \"execute_serial_plan_sas_plus s (replicate n empty_sasp_action) = s\"", "output": "by (induction n arbitrary: ) (auto simp: empty_sasp_action_def STRIPS_Representation.is_operator_applicable_in_def execute_operator_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma emp_UNpart01:\nassumes \"\\ n. n < length cl \\ {} \\ P n\"\nshows \"{} \\ UNpart01 cl dl P - {BrnFT cl dl}\"", "output": "using assms emp_UNpart1 unfolding UNpart01_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma skip_im_Tr4:\"\\x \\ Suc n; 0 < x\\ \\ x - Suc 0 \\ n\"", "output": "apply (simp add:Suc_le_mono [of \"x - Suc 0\" \"n\", THEN sym]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eval_Pr_diverg_Suc [simp]:\n assumes \"recfn (Suc n) (Pr n f g)\"\n and \"n = length xs\"\n and \"eval (Pr n f g) (x # xs) \\\"\n shows \"eval (Pr n f g) (Suc x # xs) \\\"", "output": "using assms\nby (simp add: eval_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma a_star_OrLR:\n \"N \\\\<^sub>a* N'\\ OrL (x).M (y).N z \\\\<^sub>a* OrL (x).M (y).N' z\"", "output": "by (induct set: rtranclp) (blast intro: rtranclp.rtrancl_into_rtrancl)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reads_restr_suc: \\\\ \\ (reads n) = \\' \\ (reads n) \\ suc n \\ = suc n \\'\\", "output": "by (metis reads_restrict uses_suc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma residue_one_dvd: \"a mod n = 1 \\ n dvd a - 1\" for a n :: nat", "output": "by (fastforce intro!: cong_to_1_nat simp: cong_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma(in padic_integers) p_int_pow_nonzero:\n assumes \"(n::int) \\0\"\n shows \"(\\

[^]n) \\ nonzero Zp\"", "output": "by (metis assms not_nonzero_Zp ord_Zp_p_int_pow ord_of_nonzero(1) p_pow_car)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fps_mult_right_fps_X_plus_1_nth:\n fixes a :: \"'a :: semiring_1 fps\"\n shows \"(a*(1+fps_X)) $ n = (if n = 0 then a$n else a$n + a$(n - 1))\"", "output": "using fps_mult_fps_X_plus_1_nth\nby (simp add: distrib_left fps_mult_fps_X_commute distrib_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_real_of_nat_le_real: \"finite {n::nat. real n \\ u}\"", "output": "by (metis infinite_nat_iff_unbounded leD le_nat_floor mem_Collect_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in padic_integers) mod_in_carrier:\n \"a mod (p^n) \\ carrier (Zp_res_ring n)\"", "output": "using p_residue_alt_def p_residue_range'\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coprime_diff_one_right_nat [simp]:\n \"coprime n (n - 1)\" if \"n > 0\" for n :: nat", "output": "using that coprime_diff_one_left_nat [of n]\nby (simp add: ac_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma card_N: \"(n::N) \\ ns \\ card (ns - {n}) < card ns\"", "output": "by (metis finite_N Diff_UNIV Diff_infinite_finite card_Diff1_less finite.emptyI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma space_lborel_f: \"space (lborel_f n) = Pi\\<^sub>E {.._. UNIV)\"", "output": "unfolding lborel_f_def unfolding space_PiM space_lborel space_borel\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma r_dummy_prim [simp]:\n \"prim_recfn a f \\ prim_recfn (a + n) (r_dummy n f)\"", "output": "using wellf_arity_nonzero\nby (auto simp add: r_dummy_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in dcharacter) not_primitive_imp_nonprimitive:\n assumes \"\\primitive_dchar n \\\"\n shows \"nonprimitive_dchar n \\\"", "output": "using assms dcharacter_axioms unfolding nonprimitive_dchar_def primitive_dchar_def primitive_dchar_axioms_def nonprimitive_dchar_axioms_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma det_one[simp]: \"det (1\\<^sub>m n) = 1\"", "output": "proof - have \"det (1\\<^sub>m n) = prod_list (diag_mat (1\\<^sub>m n))\"\nby (rule det_upper_triangular[of _ n], auto) also have \"\\ = 1\"\nby (induct n, auto) finally show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exp_converges: \"(\\n. x^n /\\<^sub>R fact n) sums exp x\"", "output": "unfolding exp_def\nby (rule summable_exp_generic [THEN summable_sums])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fold_insert [simp]: \"\\ member dxs x \\ DList_Set.fold f (insert x dxs) b = DList_Set.fold f dxs (f x b)\"", "output": "by(transfer)(simp add: equal_base.list_insert_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma quantale_homset_iff: \"f \\ quantale_homset = (comp_pres f \\ Sup_pres f)\"", "output": "unfolding quantale_homset_def\nby clarsimp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convex_with_UNIV_domain:\n fixes f :: \"'a::euclidean_space \\ ereal\"\n assumes \"convex_on UNIV f\"\n assumes \"domain f = UNIV\"\n shows \"(\\x. f x > -\\) \\ (\\x. f x = -\\)\"", "output": "by (metis assms convex_improper ereal_MInfty_lessI proper_iff rel_interior_UNIV UNIV_I)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma total_preorder_on_map:\n \"total_preorder_on (f -` carrier) (map_relation f le)\"", "output": "proof - interpret R': preorder_on \"f -` carrier\" \"map_relation f le\"\nusing preorder_on_map[of f] . show ?thesis\nby unfold_locales (simp add: map_relation_def total)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_integral_Un:\n fixes f :: \"_ \\ _ :: {banach, second_countable_topology}\"\n assumes \"A \\ B = {}\"\n and \"set_integrable M A f\"\n and \"set_integrable M B f\"\nshows \"LINT x:A\\B|M. f x = (LINT x:A|M. f x) + (LINT x:B|M. f x)\"", "output": "using assms unfolding set_integrable_def set_lebesgue_integral_def\nby (auto simp add: indicator_union_arith indicator_inter_arith[symmetric] scaleR_add_left)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_lc_noop[simp]: \"lc f = {} \\ map_lc p f = f\"", "output": "by (induction f) (auto simp add: map_idI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linear_iff: \"linear s1 s2 f \\\n (vector_space s1 \\ vector_space s2 \\ (\\x y. f (x + y) = f x + f y) \\ (\\c x. f (s1 c x) = s2 c (f x)))\"", "output": "unfolding linear_def module_hom_iff vector_space_def module_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cp [simp]: \"cp self' \\ cp a1' \\ cp res' \\ cp (\\X. f (self' X) (a1' X))\"", "output": "by(rule_tac f=f in cpI2, auto intro:cp0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_on_exp [continuous_intros]: \"continuous_on s f \\ continuous_on s (\\x. exp (f x))\"\n for f :: \"_ \\'a::{real_normed_field,banach}\"", "output": "unfolding continuous_on_def\nby (auto intro: tendsto_exp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integrableI_simple_bochner_integrable:\n fixes f :: \"'a \\ 'b::{banach, second_countable_topology}\"\n shows \"simple_bochner_integrable M f \\ integrable M f\"", "output": "by (intro integrableI_sequence[where s=\"\\_. f\"] borel_measurable_simple_function) (auto simp: zero_ennreal_def[symmetric] simple_bochner_integrable.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma triangle_left:\n shows \"(\\ \\ f) \\ \\\\<^sup>-\\<^sup>1[f, g, f] \\ (f \\ \\) = f\"", "output": "using triangle_left strict_lunit strict_runit\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmu_unfold:\n \"has_least_prefixpoint f \\ f (p\\ f) \\ p\\ f\"", "output": "using is_least_prefixpoint_def least_prefixpoint\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lm157: \n assumes \"X \\ Domain f\" \"runiq f\" \n shows \"f``X = (eval_rel f)`X\"", "output": "using assms lm156\nby (metis restrictedRange lm153 lm155 toFunction_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rep_dom:\n assumes \"arr f\"\n shows \"rep (dom f) = \\<^bold>\\DOM f\\<^bold>\\\"", "output": "using assms dom_simp rep_mkarr Arr_rep Arr_implies_Ide_Dom\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cmult_in_bigo_iff [simp]: \"(\\x. c * f x) \\ O[F](g) \\ c = 0 \\ f \\ O[F](g)\"\n and cmult_in_bigo_iff' [simp]: \"(\\x. f x * c) \\ O[F](g) \\ c = 0 \\ f \\ O[F](g)\"\n and cmult_in_smallo_iff [simp]: \"(\\x. c * f x) \\ o[F](g) \\ c = 0 \\ f \\ o[F](g)\"\n and cmult_in_smallo_iff' [simp]: \"(\\x. f x * c) \\ o[F](g) \\ c = 0 \\ f \\ o[F](g)\"", "output": "by (cases \"c = 0\", simp, simp)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma to_poly_inverse:\n assumes \"f \\ carrier P\"\n assumes \"degree f = 0\"\n shows \"f = to_poly (f 0)\"", "output": "using P_def assms(1) assms(2)\nby (metis ltrm_deg_0 to_polynomial_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diagonalize_strict_arr:\n assumes \"\\\\<^sub>SC.arr f\"\n shows \"D f = f\"", "output": "using assms arr_char D_def strict_arr_char Arr_rep Arr_implies_Ide_Dom Ide_implies_Arr mkarr_Diagonalize_rep [of f]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_sgnx_inverse: \"(f has_sgnx c) F \\ ((inverse o f) has_sgnx (inverse c)) F\"", "output": "unfolding has_sgnx_def comp_def\napply (rule eventually_subst)\napply (rule always_eventually)\nby (metis inverse_inverse_eq sgn_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma DERIV_pos_inc_right:\n fixes f :: \"real \\ real\"\n assumes der: \"DERIV f x :> l\"\n and l: \"0 < l\"\n shows \"\\d > 0. \\h > 0. h < d \\ f x < f (x + h)\"", "output": "using has_real_derivative_pos_inc_right[OF assms]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma summableI[intro, simp]: \"summable f\"\n for f :: \"nat \\ 'a::{canonically_ordered_monoid_add,linorder_topology,complete_linorder}\"", "output": "by (intro summableI_nonneg_bounded[where x=top] zero_le top_greatest)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_on_infnorm[continuous_intros]:\n \"continuous_on s f \\ continuous_on s (\\x. infnorm (f x))\"", "output": "unfolding continuous_on\nby (fast intro: tendsto_infnorm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_on_iff_ereal:\n fixes f :: \"'a::t2_space => real\"\n assumes \"open A\"\n shows \"continuous_on A f \\ continuous_on A (ereal \\ f)\"", "output": "unfolding continuous_on_def comp_def lim_ereal .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma finiteDomainImpliesFinite: \n assumes \"runiq f\" \n shows \"finite (Domain f) = finite f\"", "output": "using assms Domain_empty_iff card_eq_0_iff finite.emptyI lm076\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abs_term_apply_const[simp]:\n \"is_Val f \\ Fun f [] \\\\<^sub>\\ a = Fun (Abs (a (the_Val f))) []\"\n \"\\is_Val f \\ Fun f [] \\\\<^sub>\\ a = Fun f []\"", "output": "by (cases f; auto)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tendsto_of_int_ceiling:\n fixes f::\"'a \\ 'b::{order_topology,floor_ceiling}\"\n assumes \"(f \\ l) F\"\n and \"l \\ \\\"\n shows \"((\\x. of_int (ceiling (f x)):: 'c::{ring_1,topological_space}) \\ of_int (ceiling l)) F\"", "output": "using eventually_ceiling_eq[OF assms]\nby (simp add: eventually_mono topological_tendstoI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integral_lebesgue:\n fixes f :: \"'a::euclidean_space \\ 'b::euclidean_space\"\n shows \"integrable lebesgue f \\ integral UNIV f = (\\x. f x \\lebesgue)\"", "output": "using has_integral_integral_lebesgue\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_vector_derivative_transform:\n assumes \"x \\ S\" \"\\x. x \\ S \\ g x = f x\"\n assumes f': \"(f has_vector_derivative f') (at x within S)\"\n shows \"(g has_vector_derivative f') (at x within S)\"", "output": "using assms unfolding has_vector_derivative_def\nby (rule has_derivative_transform)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filterlim_at_top_linear_iff:\n fixes f::\"'a::linordered_field \\ 'b\"\n assumes \"c\\0\"\n shows \"(LIM x at_top. f (x * c + b) :> F2) \\ (if c>0 then (LIM x at_top. f x :> F2) \n else (LIM x at_bot. f x :> F2))\"", "output": "unfolding filterlim_def\napply (subst filtermap_filtermap[of f \"\\x. x * c + b\",symmetric])\nusing assms\nby (auto simp add:filtermap_at_top_linear_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma countable_bipartite_web_minus_web:\n assumes f: \"current \\ f\"\n shows \"countable_bipartite_web (\\ \\ f)\"", "output": "using bipartite_V A_vertex bipartite_E disjoint currentD_finite_OUT[OF f] currentD_weight_OUT[OF f] currentD_weight_IN[OF f] currentD_outside_OUT[OF f] currentD_outside_IN[OF f]\nby unfold_locales (auto simp add: weight_outside)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma res_fold_A_A_chamber_image:\n \"ChamberComplex.chamber A F \\ res_fold_A ` F = fold_A ` F\"", "output": "using apartments(1) apartment_chamberD_simplex restrict1_image\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma maxsimp_map:\n \"maxsimp x \\ SimplicialComplex.maxsimp (f\\X) (f`x)\"", "output": "using maxsimpD_simplex maxsimp_im_max morph SimplicialComplex.maxsimpI[of \"f\\X\" \"f`x\"]\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma field_differentiable_imp_continuous_at:\n \"f field_differentiable (at x within S) \\ continuous (at x within S) f\"", "output": "by (metis DERIV_continuous field_differentiable_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma n_mult_degree_bound:\n assumes \"f \\ carrier P\"\n shows \"degree (n_mult f) \\ degree f\"", "output": "apply(rule deg_leqI)\napply (simp add: assms n_mult_closed)\nby (simp add: assms deg_leE n_mult_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma incls_coherent:\n assumes \"par f f'\" and \"incl f\" and \"incl f'\"\n shows \"f = f'\"", "output": "using assms incl_def fun_complete\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma openin_Inter [intro]:\n assumes \"finite \\\" \"\\ \\ {}\" \"\\X. X \\ \\ \\ openin T X\" shows \"openin T (\\\\)\"", "output": "by (metis (full_types) assms openin_INT2 image_ident)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tendsto_divide_zero:\n fixes c :: \"'a::real_normed_field\"\n shows \"(f \\ 0) F \\ ((\\x. f x / c) \\ 0) F\"", "output": "by (cases \"c=0\") (simp_all add: divide_inverse tendsto_mult_left_zero)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma absolutely_integrable_periodic_offset:\n fixes f :: \"real \\ real\"\n assumes f: \"f absolutely_integrable_on {a..b}\" and periodic: \"\\x. f(x + (b-a)) = f x\"\n shows \"(\\x. f(x + c)) absolutely_integrable_on {a..b}\" \"(\\x. f(c + x)) absolutely_integrable_on {a..b}\"", "output": "using assms integrable_periodic_offset [of a b \"f\"]\nby (auto simp: integrable_restrict_space set_integrable_def add.commute [of c])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hensel_factor_id:\n\"(divide (f\\a) (f'\\a)) \\ ((f'\\a)) = (f\\a)\"", "output": "using hensel_hypothesis hensel_axioms divide_formula f'a_closed fa_closed hensel_hypothesis_weakened mult_comm\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma functor_is_transformation [simp]:\n assumes \"functor A B F\"\n shows \"natural_transformation A B F F F\"", "output": "proof - interpret \"functor\" A B F\nusing assms\nby auto show \"natural_transformation A B F F F\"\nusing is_extensional B.comp_arr_dom B.comp_cod_arr\nby (unfold_locales, simp_all)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_inverse_base2:\n fixes f :: \"'a::{comm_monoid_add,mult_zero,uminus,inverse} fls\"\n shows \"inverse f $$ (-fls_subdegree f) = inverse (f $$ fls_subdegree f)\"", "output": "by (cases \"f=0\") (simp_all add: fls_inverse_zero_conv_fls_const fls_inverse_def')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eventually_nonzero_inverse [eventually_nonzero_simps]:\n \"eventually_nonzero F (\\x. inverse (f x)) \\ eventually_nonzero F f\"", "output": "unfolding eventually_nonzero_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minus_web_sel [simp]:\n \"edge (\\ \\ f) = edge \\\"\n \"weight (\\ \\ f) x = (if x \\ A \\ then weight \\ x - d_OUT f x else weight \\ x + d_OUT f x - d_IN f x)\"\n \"A (\\ \\ f) = A \\\"\n \"B (\\ \\ f) = B \\\"\n \"\\<^bold>V\\<^bsub>\\ \\ f\\<^esub> = \\<^bold>V\\<^bsub>\\\\<^esub>\"\n \"\\<^bold>E\\<^bsub>\\ \\ f\\<^esub> = \\<^bold>E\\<^bsub>\\\\<^esub>\"\n \"web.more (\\ \\ f) = web.more \\\"", "output": "by(auto simp add: minus_web_def vertex_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma env_restr_env_restr_subset:\n \"d1 \\ d2 \\ x f|` d2 f|` d1 = x f|` d1\"", "output": "by (metis Int_absorb2 env_restr_env_restr)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fps_shift_times_fps_X' [simp]:\n fixes f :: \"'a::{comm_monoid_add,mult_zero,monoid_mult} fps\"\n shows \"fps_shift 1 (f * fps_X) = f\"", "output": "by (intro fps_ext) (simp add: nth_less_subdegree_zero)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_orbit_list':\n assumes \"permutation f\" shows \"set (orbit_list f x) = orbit f x\"", "output": "using assms\nby (simp add: permutation_self_in_orbit set_orbit_list)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_prpart_idem [simp]: \"fls_prpart (fls_prpart_as_fls f) = fls_prpart f\"", "output": "using fls_prpart_as_fls_nth[of f]\nby (intro poly_eqI) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma blinfun_apply_Pair_minus2: \"blinfun_apply f (0, a - b) = blinfun_apply f (0, a) - blinfun_apply f (0, b)\"", "output": "unfolding blinfun.bilinear_simps[symmetric]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stable_transient_empty: \n \"[| F \\ stable A; F \\ transient A; all_total F |] ==> A = {}\"", "output": "apply (drule stable_transient, assumption)\napply (simp add: all_total_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rightUniqueFunctionAfterInverse: \n assumes \"runiq f\" \n shows \"f``(f^-1``Y) \\ Y\"", "output": "using assms runiq_basic ImageE converse_iff subsetI\nby (metis(no_types))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma smallo_imp_le_real: \n assumes \"f \\ o[F](g)\" \"eventually (\\x. g x \\ (0::real)) F\"\n shows \"eventually (\\x. f x \\ g x) F\"", "output": "using landau_o.smallD[OF assms(1) zero_less_one] assms(2)\nby eventually_elim simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fps_unit_factor_decompose':\n \"f = fps_X ^ subdegree f * unit_factor f\"", "output": "using fps_unit_factor_decompose\nby (simp add: fps_mult_fps_X_power_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem constr_fp_uniq:\n assumes \"constr F E\" \"mono F\" \"\\ (range E) = C\"\n shows \"(C \\ \\ F) = (C \\ \\ F)\"", "output": "using assms(1) assms(2) assms(3) chain_pred_terminates\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mu_below_nu:\n \"has_least_fixpoint f \\ has_greatest_fixpoint f \\ \\ f \\ \\ f\"", "output": "using greatest_fixpoint is_greatest_fixpoint_def mu_unfold\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma generate_topology_on_Inter:\n \"\\finite \\; \\K. K \\ \\ \\ generate_topology_on \\ K; \\ \\ {}\\ \\ generate_topology_on \\ (\\\\)\"", "output": "by (induction \\ rule: finite_induct; force intro: generate_topology_on.intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma quantale_closed_unital_maps_iff: \"f \\ quantale_closed_unital_maps = (\\ x y. f x \\ f y \\ f (x \\ y) \\ 1 \\ f 1)\"", "output": "unfolding quantale_closed_unital_maps_def\nby clarsimp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_trans_bigtheta:\n assumes \"f \\ L F (g)\"\n assumes \"(\\x. t x (g x)) \\ \\[F](h)\"\n assumes \"\\f g. f \\ L F (g) \\ (\\x. t x (f x)) \\ L F (\\x. t x (g x))\"\n shows \"(\\x. t x (f x)) \\ L F (h)\"", "output": "using cong_bigtheta[OF assms(2)] assms(3)[OF assms(1)]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_vector_derivative_at_split:\n \"(f has_vector_derivative f') (at x) \\\n (f has_vector_derivative f') (at_left x) \\\n (f has_vector_derivative f') (at_right x)\"", "output": "using has_derivative_at_split[of f \"\\h. h *\\<^sub>R f'\" x]\nby (simp add: has_vector_derivative_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma preserves_comp_1:\n assumes \"A.seq f' f\"\n shows \"\\ (f' \\\\<^sub>A f) = G f' \\\\<^sub>B \\ f\"", "output": "using assms\nby (metis A.seqE A.dom_comp B.comp_assoc G.preserves_comp is_natural_1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nu_below_mu_nu_kappa_mu_nu:\n \"has_least_fixpoint f \\ has_greatest_fixpoint f \\ isotone f \\ apx.isotone f \\ nu_below_mu_nu f \\ kappa_mu_nu f\"", "output": "using apx_meet_below_nu_kappa_mu_nu mu_nu_apx_meet_apx_meet_below_nu mu_nu_apx_nu_mu_nu_apx_meet nu_below_mu_nu_mu_nu_apx_nu\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gmap_eq_imp_glength_eq: \"\n gmap f a = gmap f b \\ glength a = glength b\"", "output": "by (drule arg_cong[where f=glength], simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma imageEquivalence: \n assumes \"runiq (f::(('a \\ ('b set)) set))\" \"x \\ Domain f\" \n shows \"f,,x = f,,,x\"", "output": "using assms Image_runiq_eq_eval cSup_singleton\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_residue_of_int_times:\n fixes f :: \"'a::ring_1 fls\"\n shows \"fls_residue (of_int i * f) = of_int i * fls_residue f\"\n and \"fls_residue (f * of_int i) = fls_residue f * of_int i\"", "output": "by (simp_all add: fls_residue_fls_const_times fls_of_int)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_integral_spike_interior:\n assumes f: \"(f has_integral y) (cbox a b)\" and gf: \"\\x. x \\ box a b \\ g x = f x\"\n shows \"(g has_integral y) (cbox a b)\"", "output": "by (meson Diff_iff gf has_integral_spike[OF negligible_frontier_interval _ f])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma id_imp_bij_betw:\n assumes f: \"f : A \\ A\"\n and ff: \"\\a. a \\ A \\ f (f a) = a\"\n shows \"bij_betw f A A\"", "output": "by (intro bij_betwI[OF f f], simp_all add: ff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_subdegree_lt_fls_regpart_subdegree:\n \"fls_subdegree f \\ int (subdegree (fls_regpart f))\"", "output": "using fls_subdegree_leI nth_subdegree_nonzero[of \"fls_regpart f\"]\nby (cases \"(fls_regpart f) = 0\") (simp_all add: fls_regpart_eq0_imp_nonpos_subdegree)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Network) isMaxFlow_alt: \n \"isMaxFlow f \\ NFlow c s t f \\ \n (\\f'. NFlow c s t f' \\ Flow.val c s f' \\ Flow.val c s f)\"", "output": "unfolding isMaxFlow_def\nby (auto simp: NFlow_def Flow_def NPreflow_def) intro_locales"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conuc_Sup_closed: \"conucleus f \\ f \\ Sup \\ (`) f = Sup \\ (`) f\"", "output": "unfolding conucleus_def fun_eq_iff comp_def\nby (smt coclop_coextensive_var coclop_idem coclop_iso image_comp image_image le_iff_sup mono_SUP sup.orderE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linear_inj_bounded_below_pos:\n fixes f :: \"'a::real_normed_vector \\ 'b::euclidean_space\"\n assumes \"linear f\" \"inj f\"\n obtains B where \"B > 0\" \"\\x. B * norm x \\ norm(f x)\"", "output": "using linear_injective_left_inverse [OF assms] linear_invertible_bounded_below_pos assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_field_derivative_transform_within_open:\n assumes \"(f has_field_derivative f') (at a)\"\n and \"open S\" \"a \\ S\"\n and \"\\x. x \\ S \\ f x = g x\"\n shows \"(g has_field_derivative f') (at a)\"", "output": "using assms unfolding has_field_derivative_def\nby (metis has_derivative_transform_within_open)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integrable_scale_measure [simp]:\n \"\\ integrable M f; r < \\ \\ \\ integrable (scale_measure r M) f\" \n for f :: \"'a \\ 'b::{banach, second_countable_topology}\"", "output": "by(auto simp add: integrable_iff_bounded nn_integral_scale_measure ennreal_mult_less_top)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eqvt_cases:\n fixes f x \\\n assumes eqvt: \"\\x. \\ \\ f x = f (\\ \\ x)\"\n obtains \"f x\" \"f (\\ \\ x)\" | \"\\ f x \" \" \\ f (\\ \\ x)\"", "output": "using assms[symmetric]\nby (cases \"f x\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eta[simp]:\n assumes \"f \\ elts (VPi A B)\"\n shows \"VLambda A ((app)f) = f\"", "output": "proof (rule fun_ext [OF _ assms]) show \"VLambda A (app f) \\ elts (VPi A B)\"\nusing VPi_D VPi_I assms\nby auto\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in order_topology) decreasing_tendsto:\n assumes bdd: \"eventually (\\n. l \\ f n) F\"\n and en: \"\\x. l < x \\ eventually (\\n. f n < x) F\"\n shows \"(f \\ l) F\"", "output": "using assms\nby (intro order_tendstoI) (auto elim!: eventually_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linf_norm_poly_greater_0 [simp]:\n fixes f :: \"'a :: ordered_ab_group_add_abs poly\"\n shows \"\\f\\\\<^sub>\\ > 0 \\ f \\ 0\"", "output": "by (induct f, auto simp: max_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eventually_nonzero_bigtheta':\n \"f \\ \\[F](g) \\ eventually_nonzero F f \\ eventually_nonzero F g\"", "output": "unfolding eventually_nonzero_def\nby (rule eventually_nonzero_bigtheta)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma expands_to_imp_eventually_lt:\n assumes \"basis_wf basis\" \"((\\x. f x - g x) expands_to F) basis\" \"trimmed_neg F\"\n shows \"eventually (\\x. f x < g x) at_top\"", "output": "using expands_to_imp_eventually_neg[OF assms]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fcontX:\n shows \"continuous_on X f\"", "output": "using auto_local_lipschitz local_lipschitz_continuous_on\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ereal_INF_not_infty:\n fixes f :: \"_ \\ ereal\"\n shows \"A \\ {} \\ l \\ -\\ \\ u \\ \\ \\ \\a\\A. l \\ f a \\ f a \\ u \\ \\Inf (f ` A)\\ \\ \\\"", "output": "using INF_lower2[of _ A f u] INF_greatest[of A l f]\nby (cases \"Inf (f ` A)\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_poly_pCons:\n assumes \"f 0 = 0\"\n shows \"map_poly f (pCons c p) = pCons (f c) (map_poly f p)\"", "output": "by (intro poly_eqI) (simp_all add: assms coeff_map_poly coeff_pCons split: nat.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rangeOutside: \n assumes \"runiq f\" \"runiq (f^-1)\" \n shows \"Range(f outside X) = (Range f)-(f``X)\"", "output": "using assms lm089 lm092\nby (metis order_class.order.antisym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comm_semigroup_pair_ow[ud_with]: \n \"comm_semigroup_pair = (\\f\\<^sub>a f\\<^sub>b. comm_semigroup_pair_ow UNIV f\\<^sub>a UNIV f\\<^sub>b)\"", "output": "unfolding comm_semigroup_pair_def comm_semigroup_pair_ow_def ud_with\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmmap_fmupd: \"fmmap f (fmupd x y m) = fmupd x (f y) (fmmap f m)\"", "output": "by transfer' (auto simp: fun_eq_iff map_upd_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_spmf_of_set_inj_on [simp]:\n \"inj_on f A \\ map_spmf f (spmf_of_set A) = spmf_of_set (f ` A)\"", "output": "by(auto simp add: spmf_of_set_def map_pmf_of_set_inj dest: finite_imageD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma range_inj_infinite:\n fixes f :: \"nat \\ 'a\"\n assumes \"inj f\"\n shows \"infinite (range f)\"", "output": "proof assume \"finite (range f)\" from this assms have \"finite (UNIV::nat set)\"\nby (rule finite_imageD) then show False\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_powr_complex:\n assumes \"f (netlimit F) \\ \\\\<^sub>\\\\<^sub>0\" \"continuous F f\" \"continuous F g\"\n shows \"continuous F (\\z. f z powr g z :: complex)\"", "output": "using assms unfolding continuous_def\nby (intro tendsto_powr_complex) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lfp_to_gfp_var: \n fixes f :: \"'a::complete_lattice_with_dual \\ 'a\"\n shows \"lfp f = \\ (gfp (\\\\<^sub>F f))\"", "output": "by (metis invol_dual_var lfp_dual_var)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adj_iso1: \"f \\ g \\ mono f\"", "output": "unfolding adj_def mono_def\nby (meson dual_order.refl dual_order.trans)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem weak_conv_imp_integral_bdd_continuous_conv:\n fixes f :: \"real \\ 'a::{banach, second_countable_topology}\"\n assumes\n \"\\x. isCont f x\" and\n \"\\x. norm (f x) \\ B\"\n shows\n \"(\\ n. integral\\<^sup>L (\\ n) f) \\ integral\\<^sup>L M f\"", "output": "using assms\nby (intro weak_conv_imp_bdd_ae_continuous_conv) (auto intro!: borel_measurable_continuous_onI continuous_at_imp_continuous_on)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem Gibbard_Satterthwaite:\n \"\\ manipulable f \\ \\a.\\P\\Prof. a = f P \\ \\i. dict f i\"", "output": "using GS.Gibbard_Satterthwaite[of f,unfolded GS_def]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma smallomegaD_filterlim_at_infinity:\n assumes \"f \\ \\[F](g)\"\n assumes \"eventually (\\x. g x \\ 0) F\"\n shows \"LIM x F. f x / g x :> at_infinity\"", "output": "using assms\nby (intro filterlim_norm_at_top_imp_at_infinity smallomegaD_filterlim_at_top_norm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GFP_unfold:\n \"\\ Mono f; f \\ carrier L \\ carrier L \\ \\ GFP f = f (GFP f)\"", "output": "using eq_is_equal weak.GFP_weak_unfold\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integrable_abs[simp, intro]:\n fixes f :: \"'a \\ real\"\n assumes [measurable]: \"integrable M f\" shows \"integrable M (\\x. \\f x\\)\"", "output": "using assms\nby (rule integrable_bound) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma runit'_naturality:\n assumes \"arr f\"\n shows \"(f \\ \\) \\ \\\\<^sup>-\\<^sup>1[dom f] = \\\\<^sup>-\\<^sup>1[cod f] \\ f\"", "output": "using assms \\'.naturality \\'_ide_simp\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"Q \\ (D \\ F \\ ((\\ D) \\ (\\ F)))\"", "output": "apply (reify Ifm.simps (\"((\\ D) \\ (\\ F))\")) oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma codomains_simp:\n assumes \"arr f\"\n shows \"codomains f = {cod f}\"", "output": "using assms cod_in_codomains has_codomain_iff_arr codomain_unique\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma infsetsum'_tendsto:\n assumes \\infsetsum'_converges f S\\\n shows \\((\\F. sum f F) \\ infsetsum' f S) (finite_subsets_at_top S)\\", "output": "by (metis assms finite_subsets_at_top_neq_bot infsetsum'_converges_def infsetsum'_def tendsto_Lim)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fpower_Sup_subcomm: \"mono f \\ f \\ fstar f \\ fstar f \\ f\"", "output": "by (metis (mono_tags, lifting) fun_mon.power_commutes le_INF_iff fpower_distr fpower_supdistl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linear_injective_isomorphism:\n assumes lf: \"linear s1 s2 f\"\n and fi: \"inj f\"\n and dims: \"vs2.dim UNIV = vs1.dim UNIV\"\n shows \"\\f'. linear s2 s1 f' \\ (\\x. f' (f x) = x) \\ (\\x. f (f' x) = x)\"", "output": "unfolding isomorphism_expand[symmetric]\nusing linear_injective_imp_surjective[OF lf fi dims]\nusing fi left_right_inverse_eq lf linear_injective_left_inverse linear_surjective_right_inverse\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "theorem M9: \"|~ \\F \\ F \\ \\\\F\"", "output": "using pre[OF ax1[of \"F\"]] pax3[of \"F\"]\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_restriction_absorb: \"\n set_restriction f \\ f (f A) = f A\"", "output": "unfolding set_restriction_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma src_simps [simp]:\n assumes \"arr F\"\n shows \"Dom (src F) = E.Src (Dom F)\" and \"Cod (src F) = E.Src (Dom F)\"\n and \"Map (src F) = \\E.Src (Dom F)\\\"", "output": "using assms src_def arr_char\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ass_function_Complete_set_non_associates:\n assumes f: \"ass_function f\"\n shows \"Complete_set_non_associates (f`UNIV)\"", "output": "unfolding Complete_set_non_associates_def ass_function_def\napply (rule exI[of _ f])\nusing f unfolding ass_function_def unfolding pairwise_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma kappa_mu_nu_L_nu_below_mu_nu_L:\n \"has_least_fixpoint f \\ has_greatest_fixpoint f \\ kappa_mu_nu_L f \\ nu_below_mu_nu_L f\"", "output": "using kappa_mu_nu_L_mu_nu_apx_nu_L mu_nu_apx_nu_L_nu_below_mu_nu_L\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Lim_transform2: \"(f \\ a) F \\ ((\\x. f x - g x) \\ 0) F \\ (g \\ a) F\"\n for a b :: \"'a::real_normed_vector\"", "output": "by (erule Lim_transform) (simp add: tendsto_minus_cancel)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma(in idom) prod_mset_remove_units:\n \"prod_mset F ddvd prod_mset {# f \\# F. \\f dvd 1 #}\"", "output": "proof(induct F) case (add f F) then show ?case\nby (cases \"f = 0\", auto)\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bigtheta_powr_nonneg' [landau_simp]: \n \"eventually (\\x. (f x :: real) \\ 0) F \\ (\\x. if f x < 0 then g x else h x) \\ \\[F](h)\"", "output": "by (intro bigthetaI_cong) (auto elim!: eventually_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integrable_cmul: \"f integrable_on S \\ (\\x. c *\\<^sub>R f(x)) integrable_on S\"", "output": "unfolding integrable_on_def\nby(auto intro: has_integral_cmul)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fin_maintainedI [intro]:\n assumes \"\\ F f. finite_graph F\n \\ subgraph F (fst R)\n \\ extensible (F,fst R) G f\n \\ graph_homomorphism F G f\n \\ extensible (F,snd R) G f\"\n shows \"fin_maintained R G\"", "output": "using assms unfolding fin_maintained_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Zp_continuous_is_Zp_closed:\n assumes \"is_Zp_continuous f\"\n shows \"f \\ carrier (Fun Zp)\"", "output": "using assms is_Zp_continuous_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mono_upclosed_iff: \n fixes f :: \"'a::order_with_dual \\ 'b::order_with_dual\"\n shows \"mono f = (\\Y. upclosed_set Y \\ upclosed_set (f -` Y))\"", "output": "using mono_upclosed upclosed_mono\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma elliptic_isometryD:\n assumes \"elliptic_isometry f\"\n shows \"bounded {(f^^n) x |n. True}\"\n \"isometry f\"", "output": "using assms unfolding elliptic_isometry_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_within_compose3:\n \"isCont g (f x) \\ continuous (at x within s) f \\ continuous (at x within s) (\\x. g (f x))\"", "output": "using continuous_at_imp_continuous_at_within continuous_within_compose2\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tendsto_zero_powrI:\n assumes \"(f \\ (0::real)) F\" \"(g \\ b) F\" \"\\\\<^sub>F x in F. 0 \\ f x\" \"0 < b\"\n shows \"((\\x. f x powr g x) \\ 0) F\"", "output": "using tendsto_powr2[OF assms]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nucleus_alt_def_cor1: \"nucleus f \\ f (x \\ y) \\ x \\ f y\"", "output": "by (metis bres_galois bres_iso clop_extensive_var fres_galois nucleus_alt_def2 nucleus_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_base_factor_to_fps_base_factor:\n \"fls_base_factor_to_fps (fls_base_factor f) = fls_base_factor_to_fps f\"", "output": "using fls_base_factor_to_fps_shift\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma(in UP_ring) lcoeff_Lcf:\n assumes \"f \\ carrier P\"\n shows \"lcoeff f = lcf f\"", "output": "unfolding P_def\nusing assms coeff_simp[of f]\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assumes \"!!x y::'a::wn. x \\ y \\ f x \\ f y\"\nand \"x \\ f x\" and \"\\ f x \\ x\" and \"f(f x) \\ f x\"\nshows \"f(x \\ f x) \\ x \\ f x\"", "output": "nitpick[card = 4, expect = genuine, show_consts, timeout = 120] oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmu_below_pnu_fix:\n \"has_fixpoint f \\ has_least_prefixpoint f \\ has_greatest_postfixpoint f \\ p\\ f \\ p\\ f\"", "output": "by (metis greatest_postfixpoint has_fixpoint_def is_fixpoint_def is_greatest_postfixpoint_def is_least_prefixpoint_def least_prefixpoint order_refl order_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_derivative_iff_norm:\n \"(f has_derivative f') (at x within s) \\\n bounded_linear f' \\ ((\\y. norm ((f y - f x) - f' (y - x)) / norm (y - x)) \\ 0) (at x within s)\"", "output": "using tendsto_norm_zero_iff[of _ \"at x within s\", where 'b=\"'b\", symmetric]\nby (simp add: has_derivative_at_within divide_inverse ac_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma big_prod_in_1:\n assumes \"\\x. x \\ A \\ f x \\ L F (\\_. 1)\"\n shows \"(\\y. \\x\\A. f x y) \\ L F (\\_. 1)\"", "output": "using assms\nby (induction A rule: infinite_finite_induct) (auto intro!: big.mult_in_1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integral_split:\n fixes f :: \"'a::euclidean_space \\ 'b::{real_normed_vector,complete_space}\"\n assumes f: \"f integrable_on (cbox a b)\"\n and k: \"k \\ Basis\"\n shows \"integral (cbox a b) f =\n integral (cbox a b \\ {x. x\\k \\ c}) f +\n integral (cbox a b \\ {x. x\\k \\ c}) f\"", "output": "using k f\nby (auto simp: has_integral_integral intro: integral_unique [OF has_integral_split])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cod_char:\n shows \"cod f = (if arr f then MkIde (Cod f) else None)\"", "output": "using cod_def in_codomains_char cod_in_codomains has_codomain_iff_arr\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ereal_SUP_not_infty:\n fixes f :: \"_ \\ ereal\"\n shows \"A \\ {} \\ l \\ -\\ \\ u \\ \\ \\ \\a\\A. l \\ f a \\ f a \\ u \\ \\Sup (f ` A)\\ \\ \\\"", "output": "using SUP_upper2[of _ A l f] SUP_least[of A f u]\nby (cases \"Sup (f ` A)\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integral_on_1_eq:\n fixes f :: \"'a::euclidean_space \\ real^1\"\n shows \"integral S f = vec (integral S (\\x. f x $ 1))\"", "output": "by (cases \"f integrable_on S\") (simp_all add: integrable_on_1_iff vec_eq_iff not_integrable_integral)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linear_continuous_compose:\n fixes f :: \"'a::euclidean_space \\ 'b::euclidean_space\" and g :: \"'b \\ 'c::real_normed_vector\"\n assumes \"continuous F f\" \"linear g\"\n shows \"continuous F (\\x. g(f x))\"", "output": "using assms unfolding continuous_def\nby (rule Lim_linear)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integral_combine_division_topdown:\n fixes f :: \"'n::euclidean_space \\ 'a::banach\"\n assumes \"f integrable_on S\"\n and \"\\ division_of S\"\n shows \"integral S f = sum (\\i. integral i f) \\\"", "output": "using assms has_integral_combine_division_topdown\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lm079: \n assumes \"x \\ Domain f\" \"runiq f\" \n shows \"{x}\\f``{x} = {(x,f,,x)}\"", "output": "using assms lm078 Image_runiq_eq_eval\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma semigroup_pair_ow[ud_with]: \n \"semigroup_pair = (\\f\\<^sub>a f\\<^sub>b. semigroup_pair_ow UNIV f\\<^sub>a UNIV f\\<^sub>b)\"", "output": "unfolding semigroup_pair_def semigroup_pair_ow_def ud_with\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bigthetaI [intro]: \"f \\ O[F](g) \\ f \\ \\[F](g) \\ f \\ \\[F](g)\"", "output": "unfolding bigtheta_def bigomega_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "theorem F'map_cong: \"\\\\z. z \\ F'set1 x \\ f1 z = g1 z; \\z. z \\ F'set2 x \\ f2 z = g2 z; \\z. z \\ F'set3 x \\ f3 z = g3 z\\\n \\ F'map f1 f2 f3 x = F'map g1 g2 g3 x\"", "output": "apply (rule F.map_cong0)\napply assumption+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simple_function_iff_borel_measurable:\n fixes f :: \"'a \\ 'x::{t2_space}\"\n shows \"simple_function M f \\ finite (f ` space M) \\ f \\ borel_measurable M\"", "output": "by (metis borel_measurable_simple_function simple_functionD(1) simple_function_borel_measurable)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trans_lfp:\n assumes \"mono f\" and \"\\R. trans R \\ trans (f R)\"\n shows \"trans (lfp f)\"", "output": "by (metis lfp_chain_induct[of f trans] assms trans_Sup_of_chain)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in first_countable_topology) eventually_nhds_iff_sequentially:\n \"eventually P (nhds a) \\ (\\f. f \\ a \\ eventually (\\n. P (f n)) sequentially)\"", "output": "using eventually_nhds_within_iff_sequentially[of P a UNIV]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma the_inv_into_f_im_f_im:\n assumes \"inj_on f A\" \"x\\A\"\n shows \"the_inv_into A f ` f ` x = x\"", "output": "using assms(2) the_inv_into_f_f[OF assms(1)]\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Group) im_d_gchainTr1:\"\\d_gchain G n f;\n f l \\ (f ` {i. i \\ n}) - {f 0}\\ \\ \n f (LEAST j. f j \\ (f ` {i. i \\ n}) - {f 0}) \\ (f ` {i. i \\ n} - {f 0})\"", "output": "apply (rule LeastI)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_powr:\n assumes \"continuous F f\"\n and \"continuous F g\"\n and \"f (Lim F (\\x. x)) \\ 0\"\n shows \"continuous F (\\x. (f x) powr (g x :: real))\"", "output": "using assms unfolding continuous_def\nby (rule tendsto_powr)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lfp_in_Fix: \n fixes f :: \"'a::complete_lattice \\ 'a\"\n shows \"mono f \\ lfp f \\ Fix f\"", "output": "by (metis (mono_tags, lifting) Fix_def lfp_unfold mem_Collect_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Liminf_ereal_mult_left:\n assumes \"F \\ bot\" \"(c::real) \\ 0\"\n shows \"Liminf F (\\n. ereal c * f n) = ereal c * Liminf F f\"", "output": "using Liminf_ereal_mult_right[OF assms]\nby (subst (1 2) mult.commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cancel_semigroup_pair_ow[ud_with]: \n \"cancel_semigroup_pair = (\\f\\<^sub>a f\\<^sub>b. cancel_semigroup_pair_ow UNIV f\\<^sub>a UNIV f\\<^sub>b)\"", "output": "unfolding cancel_semigroup_pair_def cancel_semigroup_pair_ow_def ud_with\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flip_altsublist_adjacent_lists:\n \"ss \\ lists S \\ flip_altsublist_adjacent ss ts \\ ts \\ lists S\"", "output": "using flip_altsublist_adjacent_set\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma b_e_type_grow_memory:\n assumes \"\\ \\ [e] : (ts _> ts')\"\n \"e = Grow_memory\"\n shows \"\\ts''. ts = ts''@[T_i32] \\ ts = ts' \\ (\\n. (memory \\) = Some n)\"", "output": "using assms\nby (induction \"[e]\" \"(ts _> ts')\" arbitrary: ts ts' rule: b_e_typing.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma meval_MPred: \"meval n t db (MPred e ts) = ([Option.these\n ((map_option (\\f. tabulate f 0 n) o match ts) ` (\\(e', x)\\db. if e = e' then {x} else {}))], MPred e ts)\"", "output": "unfolding meval.simps image_these image_image o_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma invar_merge[simp]:\n assumes \"invar ts\\<^sub>1\"\n assumes \"invar ts\\<^sub>2\"\n shows \"invar (merge ts\\<^sub>1 ts\\<^sub>2)\"", "output": "using assms\nby (induction ts\\<^sub>1 ts\\<^sub>2 rule: merge.induct) (auto 0 3 simp: Suc_le_eq intro!: invar_ins_tree invar_link elim!: merge_rank_bound)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matchs:\n assumes \"matchs pats ts = Some env\" \"list_all P ts\"\n shows \"fmpred (\\_. P) env\"", "output": "using assms\nby (induction pats ts arbitrary: env rule: matchs.induct) (auto elim!: option_bindE intro: match)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma kernel_foldl_At[simp]: \"(s \\\\ ts)! = (s!) \\\\ (map kernelt ts)\"", "output": "by (induct ts arbitrary: s) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma b_e_type_drop:\n assumes \"\\ \\ [e] : (ts _> ts')\"\n \"e = Drop\"\n shows \"\\t. ts = ts'@[t]\"", "output": "using assms b_e_type_testop_drop_cvt0\nby (induction \"[e]\" \"(ts _> ts')\" arbitrary: ts ts' rule: b_e_typing.induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in valid_reads) valid_reads_nth_update:\n \"\\i < length ts; reads_consistent False \\ m sb \\ \\ \n valid_reads m (ts[i := (p,is,xs,sb,\\,\\,\\)])\"", "output": "by (unfold_locales) (auto dest: valid_reads simp add: nth_list_update split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_fin_descend_thr_None_conv [simp]:\n \"ts t = None \\ init_fin_descend_thr ts t = None\"", "output": "by(simp add: init_fin_descend_thr_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma b_e_type_nop:\n assumes \"\\ \\ [e] : (ts _> ts')\"\n \"e = Nop\"\n shows \"ts = ts'\"", "output": "using assms\nby (induction \"[e]\" \"(ts _> ts')\" arbitrary: ts ts' rule: b_e_typing.induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_foldl_At[simp]:\n \"lift k (s \\\\ ts) = (lift k s) \\\\ (map (lift k) ts)\"", "output": "by(induct ts arbitrary:s) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "theorem (in xvalid_program_progress) store_buffer_execution_result_sequential_consistent'_hol:\n\"(ts\\<^sub>s\\<^sub>b,m,x) \\\\<^sub>s\\<^sub>b\\<^sup>* (ts\\<^sub>s\\<^sub>b',m',x') \\\nempty_store_buffers ts\\<^sub>s\\<^sub>b' \\\nts\\<^sub>s\\<^sub>b \\\\<^sub>d ts \\\ninitial\\<^sub>v ts \\ valid \\\nsafe_reach_virtual safe_free_flowing (ts,m,\\) \n\\\n(\\ts' \\'. \n (ts,m,\\) \\\\<^sub>v\\<^sup>* (ts',m',\\') \\ ts\\<^sub>s\\<^sub>b' \\\\<^sub>d ts')\"", "output": "apply clarify\napply (drule store_buffer_execution_result_sequential_consistent')\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sees_method_fun:\n \"\\P \\ C sees M:TS\\T = m in D; P \\ C sees M:TS'\\T' = m' in D' \\\n \\ TS' = TS \\ T' = T \\ m' = m \\ D' = D\"", "output": "by(fastforce dest: sees_methods_fun simp:Method_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma depth_At_foldl:\n \"depth_At(s \\\\ ts) = depth_At s + size ts\"", "output": "by (induct ts arbitrary: s) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma backwards_c_res_stab:\n \"(ts \\<^bold>\\c(d,n) \\<^bold>\\ ts') \\ (ts',v \\ re(c)) \\ (ts,v \\ re(c))\"", "output": "using create_claim_length_stable traffic.create_clm_eq_res\nby (metis (mono_tags, lifting) traffic.create_claim_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma taints_wellformedness: \"untaints ts \\ taints ts\"", "output": "using raw_of_taints taints_def untaints_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HPT_HADelta:\n \" \\ TS \\ HPT ST; t \\ TS \\ \\ t \\ HADelta (HA ST)\"", "output": "apply (rule ET_HADelta)\napply (unfold HPT_def MaxNonConflict_def)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma redT_updTs_Some:\n \"\\ ts t = \\xw\\; thread_oks ts tas \\ \\ redT_updTs ts tas t = \\xw\\\"", "output": "by(induct ts tas rule: redT_updTs.induct)(auto intro: redT_updT_Some)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lock_thread_ok_has_lockE:\n assumes \"lock_thread_ok ls ts\"\n and \"has_lock (ls $ l) t\"\n obtains x ln' where \"ts t = \\(x, ln')\\\"", "output": "using assms\nby(auto dest!: lock_thread_okD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma L1_Boiler:\n assumes \"SteamBoiler x s y\"\n and \"ts x\"\n shows \"ts s\"", "output": "using assms\nby (simp add: SteamBoiler_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pure_foldl_At[simp]: \"pure(s \\\\ ts) \\ pure s \\ (\\t\\set ts. pure t)\"", "output": "by(induct ts arbitrary: s) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma redT_updTs'_eq_None_conv:\n \"(\\t. ts t = None \\ ts' t = None) \\ redT_updTs' ts tas t = None \\ redT_updTs ts' tas t = None\"", "output": "apply(induct tas arbitrary: ts ts')\napply simp_all\napply(blast intro: redT_updT'_eq_None_conv del: iffI) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_bintree_list_length [simp]:\n \"is_bintree_list l ts \\ length ts = l\"", "output": "by (erule is_bintree_list.induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma external_WT'_iff:\n \"P,h \\ a\\M(vs) : U \\ \n (\\hT Ts Ts' D. typeof_addr h a = \\hT\\ \\ map typeof\\<^bsub>h\\<^esub> vs = map Some Ts \\ P \\ class_type_of hT sees M:Ts'\\U=Native in D \\ P \\ Ts [\\] Ts')\"", "output": "by(simp add: external_WT'.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invar_del_min[simp]:\n assumes \"ts \\ []\"\n assumes \"invar ts\"\n shows \"invar (del_min ts)\"", "output": "using assms unfolding del_min_def\nby (auto split: prod.split tree.split intro!: invar_merge invar_children dest: invar_get_min_rest )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma threads_ok_init_fin_descend_thr [simp]:\n \"thread_oks (init_fin_descend_thr ts) ntas = thread_oks ts ntas\"", "output": "by(induct ntas arbitrary: ts)(auto elim!: thread_oks_ts_change[THEN iffD1, rotated 1])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma liftrT_assoc_Some: \"fs\\l\\\\<^sub>? = \\T\\ \\ \\\\<^sub>r\\<^sub>\\ n k fs\\l\\\\<^sub>? = \\\\\\<^sub>\\ n k T\\\"", "output": "by (induct fs rule: list.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mfinalE:\n fixes ln\n assumes \"mfinal s\" \"thr s t = \\(x, ln)\\\"\n obtains \"final x\" \"ln = no_wait_locks\" \"wset s t = None\"", "output": "using mfinalD[OF assms]\nby(rule that)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assumes \"\\x. \\<^bold>\\(E x)\" shows True", "output": "nitpick [satisfy] oops \\ \\Consistency\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma deadlocked_thread_exists: \n assumes \"t \\ deadlocked s\"\n and \"\\x ln. thr s t = \\(x, ln)\\ \\ thesis\"\n shows thesis", "output": "using assms\nby cases blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wset_final_okE:\n assumes \"wset_final_ok ws ts\" \"ws t = \\w\\\"\n and \"\\x ln. ts t = \\(x, ln)\\ \\ \\ final x \\ thesis\"\n shows thesis", "output": "using assms\nby(blast dest: wset_final_okD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fixes e :: \"('a,'b,'addr) exp\" and es :: \"('a,'b,'addr) exp list\"\n shows inline_call_max_vars: \"call e = \\aMvs\\ \\ max_vars (inline_call e' e) \\ max_vars e + max_vars e'\"\n and inline_calls_max_varss: \"calls es = \\aMvs\\ \\ max_varss (inline_calls e' es) \\ max_varss es + max_vars e'\"", "output": "by(induct e and es rule: call.induct calls.induct)(auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_field_derivative_rGamma_complex' [derivative_intros]:\n \"(rGamma has_field_derivative (if z \\ \\\\<^sub>\\\\<^sub>0 then (-1)^(nat \\-Re z\\) * fact (nat \\-Re z\\) else\n -rGamma z * Digamma z)) (at z within A)\"", "output": "using has_field_derivative_rGamma[of z]\nby (auto elim!: nonpos_Ints_cases')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fixes e :: \"('a, 'b, 'addr) exp\" and es :: \"('a, 'b, 'addr) exp list\"\n shows call1_imp_call: \"call1 e = \\aMvs\\ \\ call e = \\aMvs\\\"\n and calls1_imp_calls: \"calls1 es = \\aMvs\\ \\ calls es = \\aMvs\\\"", "output": "by(induct e and es rule: call1.induct calls1.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma None_Boolean_def : \"(None::('\\)Boolean) = (\\ \\. \\\\\\)\"", "output": "by(simp add: None_fun_def None_option_def bot_option_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma boundOutputFresh: \n fixes x :: name\n and xvec :: \"name list\"\n and B :: \"('a::fs_name, 'b::fs_name, 'c::fs_name) boundOutput\"\n\n shows \"(x \\ (\\\\*xvec\\B)) = (x \\ set xvec \\ x \\ B)\"", "output": "by (induct xvec) (simp_all add: abs_fresh)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma indiff_set_mono: \"indiff_set S A \\ B \\ A \\ B \\ {} \\ indiff_set S B\"", "output": "unfolding indiff_set_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_natural_transformation:\n shows \"natural_transformation A B F.map G.map map\"", "output": "apply unfold_locales\nusing map_def value_is_arr B.comp_arr_dom B.comp_cod_arr\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lcm_proj1_if_dvd:\n assumes \"b dvd a\" shows \"lcm a b = normalize a\"", "output": "proof - have \"normalize (lcm a b) = normalize a\"\nby (rule associatedI) (use assms in auto) thus ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_less_eq_aux''_total:\n \"\\ A \\ infinite_complement_partition; B \\ infinite_complement_partition \\\n \\ A \\''' B \\ B \\''' A\"", "output": "using set_less_eq_aux''_linear_order\nby(auto simp add: linear_order_on_def dest: total_onD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inv_end5_exit_Bk_Oc_via_loop[elim]:\n \"\\0 < x; inv_end5_loop x (b, Oc # list); b \\ []; hd b = Bk\\ \\\n inv_end5_exit x (tl b, Bk # Oc # list)\"", "output": "apply(auto simp: inv_end5_loop.simps inv_end5_exit.simps)\nusing hd_replicate\napply fastforce\nby (metis cell.distinct(1) hd_append2 hd_replicate list.sel(3) self_append_conv2 split_head_repeat(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ucast_down_mult:\n \"is_down (ucast:: 'a word \\ 'b word) \\ ucast ((a :: 'a::len word) * b) = (ucast a * ucast b :: 'b::len word)\"", "output": "apply (rule ucast_distrib [where L=\"(*)\"], (clarsimp simp: uint_word_ariths)+)\napply (metis mod_mult_eq)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subset_insertD: \"A \\ insert x B \\ A \\ B \\ x \\ A \\ (\\B'. A = insert x B' \\ B' \\ B)\"", "output": "apply (case_tac \"x \\ A\")\napply (rule disjI2)\napply (rule_tac x = \"A - {x}\" in exI)\napply fast+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma widen_antisym [trans]: \n assumes a_b: \"a \\ b\" \n assumes b_c: \"b \\ a\" \n shows \"a = b\"", "output": "using a_b b_c antisym_rtrancl_direct_subtype\nby (unfold antisym_def) blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cert_okD3 [intro?]:\n \"cert_ok c n T B A \\ B \\ A \\ pc < n \\ c!Suc pc \\ A\"", "output": "by (drule Suc_leI) (auto simp add: le_eq_less_or_eq dest: cert_okD1 cert_okD2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma measure_count_space[simp]:\n \"B \\ A \\ finite B \\ measure (count_space A) B = card B\"", "output": "unfolding measure_def\nby (subst emeasure_count_space ) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_less_eq_aux_infinite_complement_partitionD:\n \"A \\' B \\ A \\ infinite_complement_partition \\ B \\ infinite_complement_partition\"", "output": "by(auto simp add: set_less_eq_aux_def dest: set_less_aux_finiteD intro: finite_complement_partition)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Order) gt_than_any_outside:\"\\A \\ carrier D; b \\ carrier D;\n \\x\\A. x \\ b\\ \\ b \\ A\"", "output": "apply (rule contrapos_pp, simp+)\napply (frule_tac x = b in bspec)\napply (assumption, thin_tac \"\\x\\A. x \\ b\", simp add:oless_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Melem_subst_atm_mset[simp]: \"A \\# AA \\am \\ \\ (\\B. B \\# AA \\ A = B \\a \\)\"", "output": "unfolding subst_atm_mset_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tm_append_fetch_first: \n \"\\fetch A s b = (ac, ns); ns \\ 0\\ \\ \n fetch (A @ B) s b = (ac, ns)\"", "output": "by(cases b;cases s;force simp: fetch.simps nth_append split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma still_reachable_eq: \"\\ A\\Rb\\<^sup>*``B; B\\Ra\\<^sup>*``A; \\ (x,y) \\ Ra-Rb. y \\(Rb\\<^sup>*``B); \\ (x,y) \\ Rb-Ra. y\\ (Ra\\<^sup>*``A)\\ \\ Ra\\<^sup>*``A = Rb\\<^sup>*``B \"", "output": "apply (rule equalityI)\napply (erule still_reachable ,assumption)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_open_segment_rotD:\n \"x \\ {a<-- (x - a) \\ rot (b - a) = 0 \\ x \\ (b - a) \\ {a\\(b - a) <..< b \\ (b - a)}\"", "output": "by (subst in_open_segment_iff_rot[symmetric]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minus_lt: \"(a::'a) < b \\ a - b < 0\"", "output": "using plus_less[of a b \"-b\"]\nusing plus_less[of \"a - b\" 0 b]\nby (auto simp add: add_assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma IF_simps [simp]:\n \"defined b \\ \\ b \\ \\ (If b then x else y) = x\"\n \"defined b \\ \\ b \\ = False \\ (If b then x else y) = y\"", "output": "by (cases b, simp_all)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sep_Cl_diff: \"Der_1b \\ \\ \\A B. Cl(A) \\ Cl(B) \\ Sep (A \\<^bold>\\ B) (B \\<^bold>\\ A)\"", "output": "unfolding Sep_def\nusing CD1b PD1 bottom_def diff_def meet_def\nby smt"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ivt_decreasing_component_on_1:\n fixes f :: \"real \\ 'a::euclidean_space\"\n assumes \"a \\ b\"\n and \"continuous_on {a..b} f\"\n and \"(f b)\\k \\ y\"\n and \"y \\ (f a)\\k\"\n shows \"\\x\\{a..b}. (f x)\\k = y\"", "output": "using ivt_increasing_component_on_1[of a b \"\\x. - f x\" k \"- y\"] neg_equal_iff_equal\nusing assms continuous_on_minus\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma merge_on_subset:\n \"B \\ A \\ merge_on B h bo m\"", "output": "by unfold_locales (auto dest: same join undefined)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma to_nat_inj[simp]: assumes \"to_nat a = to_nat b\"\n shows \"a = b\"", "output": "proof - from to_nat_ex[of a] to_nat_ex[of b] show \"a = b\" unfolding to_nat_def\nby (metis assms from_nat_to_nat_id)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n \"fst (hd [(a, b)]) = a\"\n \"snd (hd [(a, b)]) = b\"", "output": "using fst_conv snd_conv prod.collapse list.sel(1,3)\nusing [[smt_oracle, z3_extensions]]\nby smt+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sint_numeral:\n \"sint (numeral b :: 'a::len word) =\n (numeral b + 2 ^ (LENGTH('a) - 1)) mod 2 ^ LENGTH('a) - 2 ^ (LENGTH('a) - 1)\"", "output": "by (metis int_word_sint word_numeral_alt)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tl_conc[simp]: \"[] \\ A \\tl ` (A @@ B) = tl ` A @@ B\"", "output": "by (fastforce simp: image_def Bex_def tl_append split: list.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bounded_clinear_left: \"bounded_clinear (\\a. a ** b)\"", "output": "proof - obtain K where \"\\a b. norm (a ** b) \\ norm a * norm b * K\"\nusing pos_bounded\nby blast then show ?thesis\nby (rule_tac K=\"norm b * K\" in bounded_clinear_intro) (auto simp: algebra_simps scaleC_left add_left)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Abs_swap2:\n assumes a1: \"a \\ (supp x) - (set bs)\"\n and a2: \"b \\ (supp x) - (set bs)\"\n shows \"[bs]lst. x = [(a \\ b) \\ bs]lst. ((a \\ b) \\ x)\"", "output": "unfolding Abs_eq_iff unfolding alphas unfolding supp_eqvt[symmetric] Diff_eqvt[symmetric] set_eqvt[symmetric] unfolding fresh_star_def fresh_def unfolding swap_set_not_in[OF a1 a2]\nusing a1 a2\nby (rule_tac [!] x=\"(a \\ b)\" in exI) (auto simp: supp_perm swap_atom)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_set_Union:\n \"finite A \\ finite B \\ A \\ B = {} \\ mset_set (A \\ B) = mset_set A + mset_set B\"", "output": "by (induction A rule: finite_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vdunion_vsum: \"(\\\\<^sub>\\i\\\\<^sub>\\set{0, 1}. if i=0 then A else B) = A \\ B\"", "output": "unfolding vdunion_vdoubleton vsum_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma card_bijections_range_permutation:\n assumes \"finite A\" \"finite B\"\n shows \"card ({f \\ A \\\\<^sub>E B. bij_betw f A B} // range_permutation A B) = iverson (card A = card B)\"", "output": "using assms card_bijections_range_permutation_eq_0 card_bijections_range_permutation_eq_1 unfolding iverson_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Im_complex_div_lt_0: \"Im (a / b) < 0 \\ Im (a * cnj b) < 0\"", "output": "by (metis Im_complex_div_eq_0 Im_complex_div_gt_0 less_asym neq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma less_min_eq1:\n \"(a :: 'a :: order) < b \\ min a b = a\"", "output": "by(auto simp add: min_def order_less_imp_le)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma points_index_block_image_add_eq: \n assumes \"x \\ ps\"\n assumes \"B index ps = l\"\n shows \"{# insert x b . b \\# B#} index ps = l\"", "output": "using points_index_def\nby (metis (no_types, lifting) assms filter_mset_cong image_mset_filter_swap2 points_index_def size_image_mset subset_insert)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma qo_on_subset:\n \"A \\ B \\ qo_on P B \\ qo_on P A\"", "output": "unfolding qo_on_def\nusing reflp_on_subset and transp_on_subset\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_integral_componentwise:\n fixes f :: \"'a :: euclidean_space \\ 'b :: euclidean_space\"\n shows \"(\\b. b \\ Basis \\ ((\\x. f x \\ b) has_integral (y \\ b)) A) \\ (f has_integral y) A\"", "output": "by (subst has_integral_componentwise_iff) blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_fset_image:\n assumes \"rel_fset P A B\"\n assumes \"\\a b. a |\\| A \\ b |\\| B \\ P a b \\ Q (f a) (g b)\"\n shows \"rel_fset Q (f |`| A) (g |`| B)\"", "output": "using assms\nby transfer' (rule rel_set_image)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rtrancl_on_rtranclI:\n \"(a,b) \\ rtrancl_on F r \\ (a,b) \\ r\\<^sup>*\"", "output": "by (induct rule: rtrancl_on_induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma epred_min [simp]: \"epred (min a b) = min (epred a) (epred b)\"", "output": "by(cases a b rule: enat_coexhaust[case_product enat_coexhaust]) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vector_mul_rcancel[simp]: \"a *s x = b *s x \\ (a::'a::field) = b \\ x = 0\"", "output": "by (subst eq_iff_diff_eq_0, subst vector_sub_rdistrib [symmetric]) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sqmatrix_add_commute [simp]:\n \"(A::('a::ab_semigroup_add,'m) sqmatrix) + B = B + A\"", "output": "by (cases A, cases B, simp add: add.commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma compute_float_less[code]: \"a < b \\ is_float_pos (float_plus_down 0 b (- a))\"", "output": "using truncate_down[of 0 \"b - a\"] truncate_down_pos[of \"b - a\" 0]\nby transfer (auto simp: plus_down_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n \"fst (hd [(a, b)]) = a\"\n \"snd (hd [(a, b)]) = b\"", "output": "using fst_conv snd_conv prod.collapse list.sel(1,3)\nusing [[smt_oracle, z3_extensions]]\nby smt+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zdiv_le_dividend:\n \\0 \\ a \\ 0 < b \\ a div b \\ a\\ for a b :: int", "output": "by (metis div_by_1 int_one_le_iff_zero_less zdiv_mono2 zero_less_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma div_reals [simp]:\n assumes \"is_real a\" and \"is_real b\"\n shows \"is_real (a / b)\"", "output": "using assms\nby (simp add: complex_is_Real_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vec_le_iff_diff_le_0: fixes a :: \"'a :: ordered_ab_group_add vec\"\n shows \"(a \\ b) = (a - b \\ 0\\<^sub>v (dim_vec a))\"", "output": "unfolding less_eq_vec_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ennreal_zero_less_divide: \"0 < a / b \\ (0 < a \\ b < (top::ennreal))\"", "output": "unfolding divide_ennreal_def\nby transfer (auto simp: ereal_zero_less_0_iff top_ereal_def ereal_0_gt_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invfun_l1:\"\\f \\ A \\ B; bij_to f A B; a \\ A\\ \n \\ (invfun A B f) (f a) = a\"", "output": "apply (simp add:bij_to_def, erule conjE)\napply (rule invfun_l, assumption+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma perm_restrict_union:\n assumes \"perm_restrict f A permutes A\" \"perm_restrict f B permutes B\" \"A \\ B = {}\"\n shows \"perm_restrict f A o perm_restrict f B = perm_restrict f (A \\ B)\"", "output": "using assms\nby (auto simp: fun_eq_iff perm_restrict_def permutes_def) (metis Diff_iff Diff_triv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in monoid) associated_sym [sym]:\n assumes \"a \\ b\"\n shows \"b \\ a\"", "output": "using assms\nby (iprover intro: associatedI elim: associatedE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma preserves_iso [simp]:\n assumes \"A.iso f\"\n shows \"B.iso (F f)\"", "output": "using assms A.inverse_arrowsE\napply (elim A.isoE A.inverse_arrowsE A.seqE A.ide_compE)\nby (metis A.arr_dom_iff_arr B.ide_dom B.inverse_arrows_def B.isoI preserves_arr preserves_comp preserves_dom)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coll_add_cancel: \"coll 0 a (a + b) \\ coll 0 a b\"", "output": "by (cases a, cases b) (auto simp: det3_def' algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hyperplane_eq_Ex:\n assumes \"a \\ 0\" obtains x where \"a \\ x = b\"", "output": "by (rule_tac x = \"(b / (a \\ a)) *\\<^sub>R a\" in that) (simp add: assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invariant_reaches:\n \"P b\" if \"a \\* b\" \"P a\"", "output": "using that\nby (induction; blast intro: invariant)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma RECT_gfp_def: \"RECT B x = \n (if (trimono B) then (gfp B x) else (top::'a::complete_lattice))\"", "output": "unfolding RECT_def\nby (auto simp: gfp_eq_flatf_gfp[OF trimonoD_flatf_ge trimonoD_mono])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comparator_unit_comparator_of [compare_simps]:\n \"comparator_unit = comparator_of\"", "output": "proof (intro ext) fix a b show \"comparator_unit a b = comparator_of a b\" unfolding comparator_of_def\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma norm_of_complex_addn [simp]:\n \"norm (of_complex x + numeral b :: 'a :: complex_normed_div_algebra) = cmod (x + numeral b)\"", "output": "by (metis norm_of_complex of_complex_add of_complex_numeral)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integral_None [simp]: \"content (cbox a b) = 0 \\ integral (cbox a b) f = 0\"", "output": "by (metis has_integral_None integral_unique)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma(in UP_cring) taylor_deg_1_eval':\n assumes \"f \\ carrier P\"\n assumes \"a \\ carrier R\"\n assumes \"b \\ carrier R\"\n assumes \"c = to_fun (shift (2::nat) (T\\<^bsub>a\\<^esub> f)) b\"\n assumes \"fa = to_fun f a\"\n assumes \"f'a = deriv f a\"\n shows \"to_fun f (a \\ b) = fa \\ (f'a \\ b) \\ (c \\ b[^](2::nat))\"", "output": "using R.add.m_comm taylor_deg_1_eval assms(1) assms(2) assms(3) assms(4) assms(5) assms(6)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in proper_design) resolution_blocks: \"distinct_mset \\ \\ disjoint (set_mset \\) \\ \n \\(set_mset \\) = \\ \\ resolution {#\\#}\"", "output": "unfolding resolution_def resolution_class_def partition_on_mset_def partition_on_def\nusing design_blocks_nempty blocks_nempty\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wd_DC:\n \"\\ well_def a; well_def b \\ \\ well_def (a \\ b)\"", "output": "by(blast intro:healthy_wp_DC nearly_healthy_wlp_DC wp_under_wlp_DC sdp_DC sublinear_wp_DC cts_wp_DC)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dw_closedI [intro]:\n assumes \"\\a b. a \\ A \\ a \\ b \\ b \\ A\"\n shows \"dw_closed A\"", "output": "unfolding dw_closed_def\nusing assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sorted_spvec_cons3: \"sorted_spvec(a#b#t) \\ fst a < fst b\"", "output": "apply (auto simp add: sorted_spvec.simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dvd_div_ge_1:\n fixes a b :: nat\n assumes \"a \\ 1\" \"b dvd a\"\n shows \"a div b \\ 1\"", "output": "proof - from \\b dvd a\\ obtain c where \"a = b * c\" .. with \\a \\ 1\\ show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ucast_down_minus:\n \"is_down (ucast:: 'a word \\ 'b word) \\ ucast ((a :: 'a::len word) - b) = (ucast a - ucast b :: 'b::len word)\"", "output": "apply (rule ucast_distrib [where L=\"(-)\"], (clarsimp simp: uint_word_ariths)+)\napply (metis mod_diff_left_eq mod_diff_right_eq)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma MkArr_in_hom:\n assumes \"A \\ Obj\" and \"B \\ Obj\" and \"f \\ Hom A B\"\n shows \"in_hom (MkArr A B f) (MkIde A) (MkIde B)\"", "output": "using assms arr_char ide_MkIde\nby (simp add: in_codomains_char in_domains_char in_hom_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma smaps_over_un:\n assumes \"m1 \\ smaps_over A B\" and \"m2 \\ smaps_over A B\"\n shows \"m1 \\. m2 \\ smaps_over A B\"", "output": "using assms unfolding smaps_over_def\nby (auto simp add:smap_union_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interval_less_to_le_low [forward]:\n \"(a::('a::linorder idx_interval)) < b \\ low (int a) \\ low (int b)\"", "output": "by (metis eq_iff iint_less int_less less_imp_le)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vunion_vsingleton_iff: \n \"A \\\\<^sub>\\ B = set {x} \\ \n A = 0 \\ B = set {x} \\ A = set {x} \\ B = 0 \\ A = set {x} \\ B = set {x}\"", "output": "by ( metis vsubset_vsingletonD inf_sup_ord(4) sup.idem sup_V_0_right sup_commute )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_const_distr:\n \"a \\ \\ \\ b \\ \\ \\ get_const (a + b) = get_const a + get_const b\"", "output": "by (cases a) (cases b, auto simp: mult)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ucast_less_shiftl_helper':\n \"\\ LENGTH('b) + (a::nat) < LENGTH('a); 2 ^ (LENGTH('b) + a) \\ n\\\n \\ (ucast (x :: 'b::len word) << a) < (n :: 'a::len word)\"", "output": "apply (erule order_less_le_trans[rotated])\nusing ucast_less[where x=x and 'a='a]\napply (simp only: shiftl_t2n field_simps)\napply (rule word_less_power_trans2; simp) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma supset_imp_s_mul_ext:\n assumes \"A \\# B\"\n shows \"(A, B) \\ s_mul_ext NS S\"", "output": "using assms subset_mset.add_diff_inverse[of B A]\nby (auto intro!: s_mul_extI[of A B \"A - B\" B B \"{#}\"] multpw_refl' refl_imp_locally_refl simp: Diff_eq_empty_iff_mset subset_mset.order.strict_iff_order)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sym_simps [simp]:\n assumes \"ide a\" and \"ide b\"\n shows \"arr \\[a, b]\" and \"dom \\[a, b] = a \\ b\" and \"cod \\[a, b] = b \\ a\"", "output": "using assms sym_in_hom\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma less_min_eq2:\n \"(a :: 'a :: order) > b \\ min a b = b\"", "output": "by(auto simp add: min_def order_less_imp_le)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma degeneralize_nodes_fst[simp]: \"fst ` b.nodes (degeneralize A) = a.nodes A\"", "output": "unfolding a.nodes_alt_def b.nodes_alt_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_scale_img:\n assumes \"a < b\" shows \"(\\x::real. a + (b - a) * x) ` {0 .. 1} = {a .. b}\"", "output": "using assms\napply (auto simp: algebra_simps affine_ineq image_iff)\nusing less_eq_real_def\napply force\napply (rule_tac x=\"(x-a)/(b-a)\" in bexI)\napply (auto simp: field_simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma multiplicity_gauss_int_of_nat:\n \"multiplicity (of_nat a) (of_nat b :: gauss_int) = multiplicity a b\"", "output": "unfolding multiplicity_def of_nat_power [symmetric] of_nat_dvd_of_nat_gauss_int_iff .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma swap_set_in_eq:\n assumes a: \"a \\ S\" \"b \\ S\" \"sort_of a = sort_of b\"\n shows \"(a \\ b) \\ S = (S - {a}) \\ {b}\"", "output": "unfolding permute_set_def\nusing a\nby (auto simp: swap_atom)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bounded_convex_hull:\n fixes s :: \"'a::real_normed_vector set\"\n assumes \"bounded s\"\n shows \"bounded (convex hull s)\"", "output": "proof - from assms obtain B where B: \"\\x\\s. norm x \\ B\" unfolding bounded_iff\nby auto show ?thesis\nby (simp add: bounded_subset[OF bounded_cball, of _ 0 B] B subsetI subset_hull)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in finite_measure) finite_measure_mono:\n assumes \"A \\ B\" \"B \\ sets M\" shows \"measure M A \\ measure M B\"", "output": "using emeasure_mono[OF assms] emeasure_real[of A] emeasure_real[of B]\nby (auto simp: measure_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult_carrier_mat[simp]:\n \"A \\ carrier_mat nr n \\ B \\ carrier_mat n nc \\ A * B \\ carrier_mat nr nc\"", "output": "unfolding carrier_mat_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lfp_gfp_compare:\n \\ \\Least and greatest fixed point are either equal, or bot and top\\\n assumes MLE: \"flatf_mono_le B\" and MGE: \"flatf_mono_ge B\"\n shows \"flatf_lfp B x = flatf_gfp B x \n \\ (flatf_lfp B x = bot \\ flatf_gfp B x = top)\"", "output": "using fp_compare[OF MLE MGE] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in order_topology) eventually_at_leftI:\n assumes \"\\x. x \\ {a<.. P x\" \"a < b\"\n shows \"eventually P (at_left b)\"", "output": "using assms unfolding eventually_at_topological\nby (intro exI[of _ \"{a<..}\"]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vsingleton_Un_iff: \n \"set {x} = A \\\\<^sub>\\ B \\ \n A = 0 \\ B = set {x} \\ A = set {x} \\ B = 0 \\ A = set {x} \\ B = set {x}\"", "output": "by (metis vunion_vsingleton_iff sup_V_0_left sup_V_0_right sup_idem)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_b_lookup:\n assumes \"Some (b, c) = lookup \\ x\"\n shows \" Some (b[bv::=b']\\<^sub>b\\<^sub>b, c[bv::=b']\\<^sub>c\\<^sub>b) = lookup \\[bv::=b']\\<^sub>\\\\<^sub>b x\"", "output": "using assms\nby(induct \\ rule: \\_induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma semantics_in_vertices:\n assumes \"graph A\" \"(a,b) \\ :A:\\e\\\"\n shows \"a \\ vertices A\" \"b \\ vertices A\"", "output": "using assms\nby(induct e arbitrary:a b,auto simp:getRel_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma refl_on_restrictPI:\n \"refl_onP A r \\ refl_onP (A \\ B) (r |` B)\"", "output": "by(rule refl_onPI)(blast dest: refl_onPD1 refl_onPD2 refl_onPD)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_default_delete [simp]:\n \"map_default b (f(a := None)) = (map_default b f)(a := b)\"", "output": "by(simp add: map_default_def fun_eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat_gt_trans: assumes sd: \"sd \\ n\" and AB: \"mat_gt gt sd A B\" and BC: \"mat_gt gt sd B C\"\n and A: \"A \\ carrier_mat n n\" and B: \"B \\ carrier_mat n n\"\nshows \"mat_gt gt sd A C\"", "output": "using mat_ge_gt_trans[OF sd mat_gt_imp_mat_ge[OF AB] BC A B] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma resOutputLeft:\n fixes x :: name\n and a :: name\n and b :: name\n and P :: pi\n and Rel :: \"(pi \\ pi) set\"\n\n assumes xineqa: \"x \\ a\"\n and xineqb: \"x \\ b\"\n and Id: \"Id \\ Rel\"\n\n shows \"<\\x>a{b}.P \\[Rel] a{b}.(<\\x>P)\"", "output": "using assms\nby(fastforce simp add: simulation_def elim: outputCases intro: Output ResF)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_le_incr_right2: \"a\\#(b::'a multiset) \\ a\\#c+b\"", "output": "using mset_le_incr_right1\nby (auto simp add: union_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diff_add_cancel_ennreal:\n fixes a b :: ennreal shows \"a \\ b \\ b - a + a = b\"", "output": "unfolding infinity_ennreal_def\nby transfer (metis (no_types) add.commute ereal_diff_positive ereal_ineq_diff_add max_def not_MInfty_nonneg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphic_spheres_gen:\n fixes a :: \"'a::euclidean_space\" and b :: \"'b::euclidean_space\"\n assumes \"0 < r\" \"0 < s\" \"DIM('a::euclidean_space) = DIM('b::euclidean_space)\"\n shows \"(sphere a r homeomorphic sphere b s)\"", "output": "using assms homeomorphic_trans [OF homeomorphic_spheres homeomorphic_spheres']\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma value_gt_False_Some: \"value_gt a b = False \\ (\\x. a = Some x) \\ (\\y. b = Some y)\"", "output": "by (cases a; cases b, auto simp: value_gt_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma possible_steps_select_wrong_arity: \"a = STR ''select'' \\\n length b \\ 1 \\\n possible_steps drinks 0 <> a b = {||}\"", "output": "apply (simp add: possible_steps_def ffilter_def fset_both_sides Abs_fset_inverse Set.filter_def drinks_def)\napply safe\nby (simp_all add: select_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vec_plus[simp]:\nassumes \"dims A = dims B\"\nshows \"vec (A+B) = vec_plus (vec A) (vec B)\"", "output": "unfolding plus_def plus_base_def vec_plus_def\nusing assms\nby (auto; metis (no_types, lifting) length_map length_tensor_vec_from_lookup map_fst_zip tensor_lookup tensor_from_lookup_def vec_tensor)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma append_cols_carrier[simp,intro]:\n \"A \\ carrier_mat n a \\ B \\ carrier_mat n b \\ (A @\\<^sub>c B) \\ carrier_mat n (a+b)\"", "output": "unfolding append_cols_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inverse_less_imp_less_neg:\n \"inverse a < inverse b \\ b < 0 \\ b < a\"", "output": "using local.dual_order.strict_iff_order local.inverse_le_imp_le_neg\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma np_specD3:\n assumes \"np_spec np\" and \"a \\ set hs\" and \"b \\ set hs\" and \"a \\ b\"\n shows \"(a, b) \\\\<^sub>p snd ` set (np gs bs hs data)\"", "output": "using assms(1)[unfolded np_spec_def, rule_format, of gs bs hs data] assms(2,3,4)\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma residual_obtain_orig_block: \n assumes \"b \\# \\\\<^sup>R\"\n obtains bl2 where \"b = bl2 - bl\" and \"bl2 \\# remove1_mset bl \\\"", "output": "using assms residual_blocks_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Int_stableI:\n \"(\\a b. a \\ A \\ b \\ A \\ a \\ b \\ A) \\ Int_stable A\"", "output": "unfolding Int_stable_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma antisym_Elem: \"Elem a b \\ Not (Elem b a)\"", "output": "apply (insert notsym_Elem[of a b])\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma equivalence_data_simps\\<^sub>B [simp]:\n assumes \"B.obj a\"\n shows \"B.ide (d a)\" and \"B.ide (e a)\" and \"B.iso (\\ a)\" and \"B.iso (\\ a)\"\n and \"src\\<^sub>B (e a) = a\" and \"trg\\<^sub>B (e a) = P\\<^sub>0 a\" and \"src\\<^sub>B (d a) = P\\<^sub>0 a\" and \"trg\\<^sub>B (d a) = a\"\n and \"B.dom (e a) = e a\" and \"B.cod (e a) = e a\"\n and \"B.dom (d a) = d a\" and \"B.cod (d a) = d a\"\n and \"src\\<^sub>B (\\ a) = a\" and \"trg\\<^sub>B (\\ a) = a\" and \"src\\<^sub>B (\\ a) = P\\<^sub>0 a\" and \"trg\\<^sub>B (\\ a) = P\\<^sub>0 a\"\n and \"B.dom (\\ a) = a\" and \"B.cod (\\ a) = d a \\\\<^sub>B e a\"\n and \"B.dom (\\ a) = e a \\\\<^sub>B d a\" and \"B.cod (\\ a) = P\\<^sub>0 a\"", "output": "using assms chosen_adjoint_equivalence equivalence_data_in_hom\\<^sub>B B.in_hhom_def\napply auto\nby (meson B.in_homE)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in cf_sspan) cf_sspan_\\'[cat_ss_cs_intros]:\n assumes \"a = \\\" and \"b = \\\"\n shows \"\\ : a \\\\<^bsub>\\\\<^esub> b\"", "output": "unfolding assms\nby (rule cf_sspan_\\)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ends_in_segment [iff]: \"a \\ closed_segment a b\" \"b \\ closed_segment a b\"", "output": "unfolding segment_convex_hull\nby (auto intro!: hull_subset[unfolded subset_eq, rule_format])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tagged_division_of_self_real: \"x \\ {a .. b::real} \\ {(x,{a .. b})} tagged_division_of {a .. b}\"", "output": "unfolding box_real[symmetric]\nby (rule tagged_division_of_self)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"Fr_2 \\ \\ \\A B. Br(A) \\ Br(B) \\ DM1\\<^sup>A\\<^sup>B \\<^bold>\\\\<^sup>C\"", "output": "using CF2 EXP_def pF2 pF3 unfolding conn\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prio_selects_one: \"a+b = a \\ a+b=(b::('e,'a::linorder) Prio)\"", "output": "apply (simp add: plus_def)\napply (cases \"(a,b)\" rule: p_min.cases)\napply simp_all done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma product_reachable_snd[simp]:\n assumes \"alphabet\\<^sub>1 A \\ alphabet\\<^sub>2 B\"\n shows \"snd ` c.reachable (product A B) (p, q) = b.reachable B q\"", "output": "using assms unfolding a.reachable_alt_def a.path_alt_def unfolding b.reachable_alt_def b.path_alt_def unfolding c.reachable_alt_def c.path_alt_def\nby auto force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coprime_of_int_gauss_int: \"coprime (of_int a :: gauss_int) (of_int b) = coprime a b\"", "output": "unfolding coprime_iff_gcd_eq_1 gcd_of_int_gauss_int\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simp_el_hull: assumes \"b \\B G\" shows \"b \\B \\G\\\"", "output": "using simp_elI[of b \"\\G\\\"] unfolding self_gen\nusing assms gen_in simp_el_indecomp[OF \\b \\B G\\]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in module) lincomb_cong:\n assumes h2: \"A=B\" and h3: \"A \\ carrier M\" \n and h4: \"\\v. v\\A \\ a v = b v\" and h5: \"b\\ B\\carrier R\"\n shows \"lincomb a A = lincomb b B\"", "output": "using assms\nby (simp cong: finsum_cong2 add: lincomb_def summands_valid ring_subset_carrier)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma REP_CLS:\n assumes \"B.is_left_adjoint f\"\n shows \"REP \\\\f\\\\ \\\\<^sub>B f\"", "output": "by (metis (mono_tags, lifting) CLS_in_hom Map.simps(1) in_homE REP_in_Map assms B.iso_class_def B.isomorphic_symmetric mem_Collect_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_appendI:\n \"\\a \\ list x A; b \\ list y A\\ \\ a @ b \\ list (x+y) A\"", "output": "apply (unfold list_def)\napply (simp (no_asm))\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_on_topological:\n \"continuous_on s f \\\n (\\x\\s. \\B. open B \\ f x \\ B \\ (\\A. open A \\ x \\ A \\ (\\y\\s. y \\ A \\ f y \\ B)))\"", "output": "unfolding continuous_on_def tendsto_def eventually_at_topological\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma product_simps[simp]:\n \"succ (product A B) a (p\\<^sub>1, p\\<^sub>2) = succ A a p\\<^sub>1 \\ succ B a p\\<^sub>2\"\n \"inputs (product A B) = inputs A \\ inputs B\"\n \"outputs (product A B) = outputs A \\ outputs B\"\n \"initial (product A B) = (initial A, initial B)\"", "output": "unfolding product_def\nby simp+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sigma_sets_UNION:\n \"countable B \\ (\\b. b \\ B \\ b \\ sigma_sets X A) \\ \\ B \\ sigma_sets X A\"", "output": "using from_nat_into [of B] range_from_nat_into [of B] sigma_sets.Union [of \"from_nat_into B\" X A]\nby (cases \"B = {}\") (simp_all add: sigma_sets.Empty cong del: SUP_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma preprm_unit_commutes:\n shows \"preprm_unit a b =p preprm_unit b a\"", "output": "unfolding preprm_ext_def preprm_unit_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma int_not_emptyD:\n \"A \\ B \\ {} \\ \\x. x \\ A \\ x \\ B\"", "output": "by (erule contrapos_np, clarsimp simp: disjoint_iff_not_equal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cong_cop_per2_1:\n assumes \"A \\ B\" and\n \"Per A B X\" and\n \"Per A B Y\" and\n \"Cong B X B Y\" and\n \"Coplanar A B X Y\"\n shows \"X = Y \\ B Midpoint X Y\"", "output": "by (meson Per_cases assms(1) assms(2) assms(3) assms(4) assms(5) cop_per2__col coplanar_perm_3 l7_20_bis not_col_permutation_5)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reachable_finite_sim:\n assumes \"finite (b.E\\<^sup>* `` b.V0)\"\n assumes \"\\b. b \\ b.E\\<^sup>* `` b.V0 \\ finite (R\\ `` {b})\"\n shows \"finite (a.E\\<^sup>* `` a.V0)\"", "output": "apply (rule finite_subset[OF reachable_sim])\napply (rule finite_ImageI)\napply fact+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subset_finite_imp_set_less_eq_aux:\n \"\\ A \\ B; finite B \\ \\ A \\' B\"", "output": "by(cases \"A = B\")(auto simp add: set_less_eq_aux_def finite_complement_partition intro: psubset_finite_imp_set_less_aux)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interval_lebesgue_integral_gt_eq:\n fixes a b f\n assumes \"a > b\"\n shows \"interval_lebesgue_integral M a b f = -(LINT x : einterval b a | M. f x)\"", "output": "using assms\nby (auto simp: interval_lebesgue_integral_def less_imp_le einterval_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vec_to_iarray_plus[code_unfold]: \"vec_to_iarray (a + b) = (vec_to_iarray a) + (vec_to_iarray b)\"", "output": "unfolding vec_to_iarray_def unfolding plus_iarray_def Let_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ennreal_mult_less_top:\n fixes a b :: ennreal\n shows \"a * b < top \\ (a = 0 \\ b = 0 \\ (a < top \\ b < top))\"", "output": "by transfer (auto simp add: top_ereal_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mid__lt:\n assumes \"A \\ B\" and\n \"M Midpoint A B\"\n shows \"A M Lt A B\"", "output": "using assms(1) assms(2) bet__lt1213 midpoint_bet midpoint_distinct_1\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integral_component_lbound:\n fixes f :: \"'a::euclidean_space \\ 'b::euclidean_space\"\n assumes \"f integrable_on cbox a b\"\n and \"\\x\\cbox a b. B \\ f(x)\\k\"\n and \"k \\ Basis\"\n shows \"B * content (cbox a b) \\ (integral(cbox a b) f)\\k\"", "output": "using assms has_integral_component_lbound\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mkArr_restrict_eq':\n assumes \"arr (mkArr A B (restrict F A))\"\n shows \"mkArr A B (restrict F A) = mkArr A B F\"", "output": "using assms\nby (intro mkArr_eqI', auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma to_nat_on_inj[simp]:\n \"countable A \\ a \\ A \\ b \\ A \\ to_nat_on A a = to_nat_on A b \\ a = b\"", "output": "using inj_on_to_nat_on[of A]\nby (auto dest: inj_onD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_map_image:\n assumes \"is_map M\"\n shows \"is_map ((\\(a, b). (a, f a b)) ` M)\"", "output": "using assms unfolding is_map_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closed_open_segment_iff [simp]:\n fixes a :: \"'a::euclidean_space\" shows \"closed(open_segment a b) \\ a = b\"", "output": "by (metis open_segment_def DiffE closure_eq closure_open_segment ends_in_segment(1) insert_iff segment_image_interval(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_integral_open_interval:\n fixes f :: \"'a :: euclidean_space \\ 'b :: banach\"\n shows \"(f has_integral y) (box a b) \\ (f has_integral y) (cbox a b)\"", "output": "unfolding interior_cbox [symmetric]\nby (metis frontier_cbox has_integral_interior negligible_frontier_interval)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sigma_fm_Iff: \"\\{} \\ B IFF A; supp A \\ supp B; Sigma_fm A\\ \\ Sigma_fm B\"", "output": "by (metis Sigma_fm_def Iff_trans order_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dbm_not_lt_eq: \"\\ a \\ b \\ \\ b \\ a \\ a = b\"", "output": "apply (cases a)\napply (cases b, fastforce+)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma computation_downpos:\"rat_poly_times A (A - rat_poly_times (rat_poly_times B B) B) =\n rat_poly_inv (rat_poly_times B (B - rat_poly_times (rat_poly_times A A) A))\"", "output": "using computation_downpos_prelim\nby (metis rat_poly.comm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comm_add_vecset:\n assumes \"(A :: 'a :: ab_semigroup_add vec set) \\ carrier_vec n\"\n and \"B \\ carrier_vec n\"\n shows \"A + B = B + A\"", "output": "unfolding set_plus_def\nusing comm_add_vec assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma drinks2_1_invalid:\n \"\\(a = (STR ''coin'') \\ length b = 1) \\\n \\(a = (STR ''vend'') \\ b = []) \\\n possible_steps drinks2 1 r a b = {||}\"", "output": "apply (simp add: possible_steps_empty drinks2_def)\napply safe\nby (simp_all add: transitions can_take_transition_def can_take_def value_gt_def)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem vcgaIsMaximal: \n assumes \"distinct \\\" \"set \\ \\ {}\" \"finite N\" \"\\ X. b (seller, X) = 0\" \n shows \"sum b (vcga' N \\ b r) = Max{sum b a| a. a \\ soldAllocations N (set \\)}\"", "output": "using assms vcgaIsMaximalAux2\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_of_hom: \"\\x \\ A. f x \\ B \\ restrict f A \\ A \\ B\"", "output": "apply (simp add:Pi_def restrict_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cancel_semigroup_pair_ow_transfer[transfer_rule]:\n assumes [transfer_rule]: \n \"bi_unique A\" \"right_total A\" \"bi_unique B\" \"right_total B\"\n shows \n \"(\n rel_set A ===> (A ===> A ===> A) ===> \n rel_set B ===> (B ===> B ===> B) ===> \n (=)\n ) cancel_semigroup_pair_ow cancel_semigroup_pair_ow\"", "output": "by (ow_locale_transfer locale_defs: cancel_semigroup_pair_ow_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tensor_preserves_ide [simp]:\n assumes \"ide a\" and \"ide b\"\n shows \"ide (a \\ b)\"", "output": "using assms T.preserves_ide CC.ide_char\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma INF_nat_binary:\n \"inf A (INF x\\Collect ((<) (0::nat)). B) = (inf A B::'a::countable_complete_lattice)\"", "output": "apply (subst image_constant)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma scaleC_le_0_iff:\n \"a *\\<^sub>C b \\ 0 \\ 0 < a \\ b \\ 0 \\ a < 0 \\ 0 \\ b \\ a = 0\"\n if \"a \\ \\\" (* Not present in Real_Vector_Spaces *)\n for b::\"'a::ordered_complex_vector\"", "output": "apply (insert zero_le_scaleC_iff [of \"-a\" b])\nusing less_complex_def that\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma join_False_code[code]: \"join A False B = {a \\ A. \\b \\ B. join1 (a, b) \\ Some a}\"", "output": "unfolding join_False_alt join_True_code\nby (auto simp: Option.these_def image_iff dest: self_join1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gcd_bezout_sum_nat:\n fixes a::nat\n assumes \"a * x + b * y = d\"\n shows \"gcd a b dvd d\"", "output": "proof- let ?g = \"gcd a b\" have dv: \"?g dvd a*x\" \"?g dvd b * y\"\nby simp_all from dvd_add[OF dv] assms show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma halfspace_eq_empty_gt:\n \"{x. a \\ x > b} = {} \\ a = 0 \\ b \\ 0\"", "output": "using halfspace_eq_empty_lt [of \"-a\" \"-b\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma upt_eqD: \"upt a b = upt a b' \\ (b = b' \\ b' \\ a \\ b \\ a)\"", "output": "by (induction b) (auto dest!: upt_append_sing split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma preorder_dense_order_ow_transfer[transfer_rule]:\n assumes [transfer_rule]: \"right_total A\" \"bi_unique B\" \"right_total B\"\n shows \n \"(\n rel_set A ===> (A ===> A ===> (=)) ===> (A ===> A ===> (=)) ===> \n rel_set B ===> (B ===> B ===> (=)) ===> (B ===> B ===> (=)) ===> \n (=)\n ) preorder_dense_order_ow preorder_dense_order_ow\"", "output": "by (ow_locale_transfer locale_defs: preorder_dense_order_ow_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mod_integer_ge:\n \"b \\ 0 \\ 0 < a \\ b \\ x mod (a+1)\" for a b x :: integer", "output": "by (metis dual_order.trans less_add_one order.strict_trans unique_euclidean_semiring_numeral_class.pos_mod_sign)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_imp_erf_real_le: \"a \\ (b::real) \\ erf a \\ erf b\"", "output": "by (cases \"a < b\") (auto dest: less_imp_erf_real_less)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\nassumes premise_3: \"\\<^bold>\\ y. \\<^bold>\\ z. ((E y \\ \\ E z) \\ ((y \\<^bold>= (\\<^bold>\\ x. \\ x) \\ z = (\\<^bold>\\ x. \\ x)) \\ y = (\\<^bold>\\ x. \\ x)))\" and something_exists: \"\\<^bold>\\ x. E x\" and god_is_conceivable: \"C g\" and C_atomic: \"atomic C\"\nshows \"\\ E (\\<^bold>\\ x. \\ x) \\ (\\<^bold>\\ y. C y \\ G y (\\<^bold>\\ x. \\ x))\"", "output": "by (metis (no_types, lifting) C_atomic description_theorem_3 g_def god_is_conceivable premise_3 something_exists)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma thm_relation_negation_4[PLM]:\n \"[(\\<^bold>\\((p::\\)\\<^sup>-)) \\<^bold>\\ p in v]\"", "output": "using thm_relation_negation_3[THEN oth_class_taut_5_d[equiv_lr]]\napply -\nby PLM_solver"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"(\\x. E x) \\<^bold>\\ (\\C D. (\\<^bold>\\y. ID(C y) \\<^bold>\\ (C y)\\y \\ y) \\<^bold>\\ (\\<^bold>\\x. ID(D x) \\<^bold>\\ x\\(D x) \\ x) \\<^bold>\\ \\<^bold>\\(D \\<^bold>= C))\"", "output": "nitpick [satisfy] oops \\ \\Model found\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma width_add1:\"\\((\\<^bold>\\ = x) \\<^bold>\\ (\\<^bold>\\ = y) \\<^bold>\\ \\<^bold>\\ = x+y)\"", "output": "using vertical_chop_add1\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma TensorDiag_in_Hom:\n assumes \"Diag t\" and \"Diag u\"\n shows \"t \\<^bold>\\\\<^bold>\\\\<^bold>\\ u \\ Hom (Dom t \\<^bold>\\\\<^bold>\\\\<^bold>\\ Dom u) (Cod t \\<^bold>\\\\<^bold>\\\\<^bold>\\ Cod u)\"", "output": "using assms TensorDiag_preserves_Diag Diag_implies_Arr\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lcp_mismatch': assumes \"\\ u \\ v\" shows \"u! \\<^bold>|u \\\\<^sub>p v\\<^bold>| \\ v! \\<^bold>|u \\\\<^sub>p v\\<^bold>|\"", "output": "using incomp_lcp_len[OF assms, unfolded min_less_iff_conj] lcp_mismatch\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma two_pers: assumes \"w \\p u\\<^sup>\\\" and \"w \\p v\\<^sup>\\\" and \"\\<^bold>|u\\<^bold>|+\\<^bold>|v\\<^bold>| \\ \\<^bold>|w\\<^bold>|\" shows \"u\\v = v\\u\"", "output": "using two_pers'[OF per_rootD[OF assms(1)] per_rootD[OF assms(2)] assms(3)] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma iteI[wp_intro]:\n assumes \"\\P'\\ x \\Q\\\"\n assumes \"\\P''\\ y \\Q\\\"\n shows \"\\\\<^bold>if b \\<^bold>then P' \\<^bold>else P''\\ \\<^bold>if b \\<^bold>then x \\<^bold>else y \\Q\\\"", "output": "using assms\nby (simp add: valid_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CBarcan_I: \"Der_1b \\ \\ \\P. \\(\\<^bold>\\x. P x) \\<^bold>\\ (\\<^bold>\\x. \\(P x))\"", "output": "by (metis (mono_tags, lifting) MONO_def monI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma red_simps [simp]:\n assumes \"Ide t\"\n shows \"Src (t\\<^bold>\\) = Src t\" and \"Trg (t\\<^bold>\\) = Trg t\"\n and \"Dom (t\\<^bold>\\) = t\" and \"Cod (t\\<^bold>\\) = \\<^bold>\\t\\<^bold>\\\"", "output": "using assms red_in_Hom\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma at_neg_neg2:\"\\\\<^bold>\\(\\<^bold>@c \\<^bold>\\ \\) \\<^bold>\\ (\\<^bold>@c \\)\"", "output": "using switch_unique switch_def switch_refl\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rule_sub_lem_1_b[PLM]:\n \"[\\<^bold>\\(\\ \\<^bold>\\ \\) in v] \\ [(\\ \\<^bold>\\ \\) \\<^bold>\\ (\\ \\<^bold>\\ \\) in v]\"", "output": "by (metis equiv_def contraposition_1 CP \"\\<^bold>&E\"(2) \"\\<^bold>\\I\" \"\\<^bold>\\E\"(1) rule_sub_lem_1_a)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma thm_relation_negation_1_1[PLM]:\n \"[\\F\\<^sup>-, x\\<^sup>P\\ \\<^bold>\\ \\<^bold>\\\\F, x\\<^sup>P\\ in v]\"", "output": "unfolding propnot_defs\napply (rule lambda_predicates_2_1[axiom_instance])\nby show_proper"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CompDiag_Inv_Can [simp]:\n assumes \"Can t\" and \"Diag t\"\n shows \"Inv t \\<^bold>\\\\<^bold>\\\\<^bold>\\ t = Dom t\"", "output": "using assms Can_and_Diag_implies_Ide Ide_in_Hom\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma thm_relation_negation_10[PLM]:\n \"[((p::\\) \\<^bold>= q) \\<^bold>\\ ((p\\<^sup>-) \\<^bold>= (q\\<^sup>-)) in v]\"", "output": "using l_identity[where \\=\"p\" and \\=\"q\" and \\=\"\\ x . (p\\<^sup>-) \\<^bold>= (x\\<^sup>-)\", axiom_instance, deduction] id_eq_prop_prop_7_b\nusing CP modus_ponens\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma KBasic2_11[PLM]:\n \"[\\<^bold>\\\\<^bold>\\\\ \\<^bold>\\ (\\<^bold>\\(\\<^bold>\\\\<^bold>\\(\\<^bold>\\\\))) in v]\"", "output": "unfolding diamond_def\napply (PLM_subst_method \"\\<^bold>\\(\\<^bold>\\\\)\" \"\\<^bold>\\(\\<^bold>\\(\\<^bold>\\(\\<^bold>\\\\)))\")\nusing oth_class_taut_4_b oth_class_taut_4_a\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AG_fp_2: \"\\<^bold>A\\<^bold>G p \\ \\<^bold>A\\<^bold>X \\<^bold>A\\<^bold>G p\"", "output": "proof - note AG_fp also have \"p \\ \\<^bold>A\\<^bold>X \\<^bold>A\\<^bold>G p \\ \\<^bold>A\\<^bold>X \\<^bold>A\\<^bold>G p\"\nby auto finally show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_len_iff_less: assumes eq: \"x \\ y = u \\ v\" shows \"\\<^bold>|x\\<^bold>| < \\<^bold>|u\\<^bold>| \\ \\<^bold>|v\\<^bold>| < \\<^bold>|y\\<^bold>|\"", "output": "using lenarg[OF eq] unfolding length_append\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hchop_neg1:\"\\ \\<^bold>\\ (\\ \\<^bold>\\ \\<^bold>\\) \\<^bold>\\ ((\\<^bold>\\ \\) \\<^bold>\\ \\<^bold>\\)\"", "output": "using horizontal_chop1\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"CoP2 \\<^bold>\\\\<^sup>I \\ TNDm \\<^bold>\\\\<^sup>I\"", "output": "using XCoP_def2 CoP2_XCoP TNDm_def TNDw_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Diagonalize_COD:\n assumes \"arr f\"\n shows \"\\<^bold>\\COD f\\<^bold>\\ = Cod \\<^bold>\\rep f\\<^bold>\\\"", "output": "using assms Diag_Diagonalize\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma E_bipartite_web:\n fixes \\ (structure) shows\n \"\\<^bold>E\\<^bsub>bipartite_web_of \\\\<^esub> = (\\(x, y). (Inl x, Inr y)) ` \\<^bold>E \\ (\\x. (Inl x, Inr x)) ` (\\<^bold>V - A \\ - B \\)\"", "output": "by(auto elim: edge_bipartite_webE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma raa_cor_2[PLM]:\n \"\\[\\<^bold>\\\\ in v]; [\\<^bold>\\\\ in v] \\ [\\ in v]\\ \\ ([\\<^bold>\\\\ in v] \\ [\\ in v])\"", "output": "using reductio_aa_1 vdash_properties_9\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma f1_code1 [code]: \n \"f1 b c d ns = Code.abort (STR ''4'') (\\_. ())\" \n \"f1 b c True \\<^bold>[n, m\\<^bold>] = Code.abort (STR ''3'') (\\_. ())\" \n \"f1 b True d \\<^bold>[n\\<^bold>] = Code.abort (STR ''2'') (\\_. ())\" \n \"f1 True c d \\<^bold>[\\<^bold>] = ()\"", "output": "by(simp_all add: f1_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ActualBoxE[PLM_elim, PLM_dest]:\n \"[\\<^bold>\\(\\<^bold>\\\\) in v] \\ [\\<^bold>\\\\ in v]\"", "output": "using qml_act_2[axiom_instance, equiv_rl] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma en_eq_2[PLM]:\n \"[\\x,F\\ \\<^bold>\\ \\<^bold>\\\\x,F\\ in v]\"", "output": "using encoding[axiom_instance] qml_2[axiom_instance]\nby (rule \"\\<^bold>\\I\")"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CoP1_LNC: \"CoP1 \\<^bold>\\ \\ LNC \\<^bold>\\\"", "output": "using CoP1_def ECQm_def LNC_def Cl_fr_def Disj_I ECQm_def unfolding conn\nby smt"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"[\\ \\<^bold>\\ \\a, a \\<^bold>\\ \\<^bold>\\a]\"", "output": "using IB_rel Int_br_def compl_def diff_def dual_def eq_ext' ineg_def join_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"\\\\<^bold>\\\\<^bold>\\\\<^sup>E (Q::\\\\\\\\) \\<^bold>\\ ((\\X. \\<^bold>\\\\<^bold>\\\\<^sup>E X) \\<^bold>\\Q)\\\"", "output": "nitpick oops \\ \\not equivalent!\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma useful_tautologies_6[PLM]:\n \"[(\\ \\<^bold>\\ \\<^bold>\\\\) \\<^bold>\\ (\\ \\<^bold>\\ \\<^bold>\\\\) in v]\"", "output": "by (metis CP useful_tautologies_4 vdash_properties_10)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ActualNotE[PLM_elim,PLM_dest]:\n \"[\\<^bold>\\\\<^bold>\\\\ in v] \\ [\\<^bold>\\\\<^bold>\\\\ in v]\"", "output": "using logic_actual_nec_1[axiom_instance, equiv_lr] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma reductio_aa_4[PLM]:\n \"\\[\\ \\<^bold>\\ \\<^bold>\\\\ in v]; [\\ \\<^bold>\\ \\ in v]\\ \\ [\\<^bold>\\\\ in v]\"", "output": "using reductio_aa_2 vdash_properties_10\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Diagonalize_red2 [simp]:\n assumes \"Ide a\" and \"Ide b\" and \"Diag a\" and \"Diag b\"\n shows \"\\<^bold>\\a \\<^bold>\\ b\\<^bold>\\ = \\<^bold>\\a \\<^bold>\\ b\\<^bold>\\\"", "output": "using assms Can_red2 Ide_Diagonalize_Can Diagonalize_in_Hom [of \"a \\<^bold>\\ b\"] red2_in_Hom Ide_in_Hom\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_add1:\"\\((\\<^bold>\\=x) \\<^bold>\\ (\\<^bold>\\= y)) \\<^bold>\\ (\\<^bold>\\= x+y)\"", "output": "using hchop_def real_int.rchop_def real_int.length_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pderivs_lang_subsetI:\n assumes \"\\s. s \\ A \\ pderivs s r \\ C\"\n shows \"pderivs_lang A r \\ C\"", "output": "using assms unfolding pderivs_lang_def\nby (rule UN_least)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R_assignr: \"R = (\\s. Q (\\ j. ((($) s)(x := e s)) j)) \\ \n rel_R \\P\\ \\R\\; (x ::= e) \\ rel_R \\P\\ \\Q\\\"", "output": "apply(rule_tac R=R in R_seq_law, simp)\nby (rule_tac R_assign_law, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma white_valid_ref[elim!]:\n \"white r s \\ valid_ref r s\"", "output": "unfolding white_def\nby (simp_all split: obj_at_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_enumerate:\n assumes fS: \"finite S\"\n shows \"\\r::nat\\nat. strict_mono_on r {.. (\\n S)\"", "output": "unfolding strict_mono_def\nusing finite_enumerate_in_set[OF fS] finite_enumerate_mono[of _ _ S] fS\nby (metis lessThan_iff strict_mono_on_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in project) lang_pnPlus[simp]: \"\\wf n r; wf n s\\ \\ lang n (pnPlus r s) = lang n (Plus r s)\"", "output": "by (induct r s rule: pnPlus.induct) (auto dest!: lang_subset_lists dest: project subsetD[OF star_subset_lists, unfolded in_lists_conv_set, rotated -1] subsetD[OF conc_subset_lists, unfolded in_lists_conv_set, rotated -1])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l2_run_ended_trans:\n \"run_ended (progress s R) \\\n (s, s') \\ trans l2 \\\n run_ended (progress s' R)\"", "output": "apply (auto simp add: l2_nostep_defs)\napply (simp add: l2_defs, fast ?)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uncurry0_hfref_post[to_hfref_post]: \"hfref (uncurry0 True) R S = hfref (\\_. True) R S\"", "output": "apply (fo_rule arg_cong fun_cong)+\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma(in UP_cring) poly_shift_subring_closed:\n assumes \"subring S R\"\n assumes \"g \\ carrier (UP (R \\ carrier := S \\))\"\n shows \"poly_shift g \\ carrier (UP (R \\ carrier := S \\))\"", "output": "using UP_cring.poly_shift_closed[of \"R \\ carrier := S \\\" g] assms UP_ring_subring[of S]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\

_mono[dest]: \"r \\ s \\ \\
r a \\ \\
s a\"", "output": "unfolding less_eq_language_def\nby (metis Plus.simps(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lang_derivs: \"lang (derivs s r) = Derivs s (lang r)\"", "output": "by (induct s arbitrary: r) (simp_all add: lang_deriv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ring_hom_cringI:\n assumes \"cring R\"\n and \"cring S\"\n and \"h \\ ring_hom R S\"\n shows \"ring_hom_cring R S h\"", "output": "by (fast intro: ring_hom_cring.intro ring_hom_cring_axioms.intro cring.axioms assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma open_fls_def:\n \"open (S :: 'a::group_add fls set) = (\\a \\ S. \\r. r >0 \\ {y. dist y a < r} \\ S)\"", "output": "unfolding open_dist subset_eq\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma(in UP_cring) poly_lift_hom_X_var'':\n assumes \"cring S\"\n assumes \"\\ \\ ring_hom R S\"\n shows \"poly_lift_hom R S \\ (monom (UP R) \\\\<^bsub>R\\<^esub> n) = (monom (UP S) \\\\<^bsub>S\\<^esub> n)\"", "output": "using assms(1) assms(2) poly_lift_hom_monom ring_hom_one\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_set_rel_transfer_back: \"\\(s,s')\\\\R\\set_rel; single_valued (R\\); finite s'\\ \\ finite s\"", "output": "unfolding set_rel_alt\nby (blast intro: finite_subset[OF _ finite_Image_sv])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma recognises_single_possible_step:\n assumes \"possible_steps e s r l i = {|(s', t)|}\"\n and \"recognises_execution e s' (evaluate_updates t i r) trace\"\n shows \"recognises_execution e s r ((l, i)#trace)\"", "output": "apply (rule recognises_execution.step)\nusing assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sig_red_zeroI:\n assumes \"(sig_red sing_reg (\\) F)\\<^sup>*\\<^sup>* r s\" and \"rep_list s = 0\"\n shows \"sig_red_zero sing_reg F r\"", "output": "unfolding sig_red_zero_def\nusing assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rtos_hom3_1:\"\\(0::nat) < r; (0::nat) < s; i \\ (r * s - Suc 0) \\ \\\n (rtos r s i mod r) = i div s\"", "output": "apply (simp add:rtos_def)\napply (simp add:rfn_tool11 [of \"r * s\" \"i\"])\napply (frule rtos_hom0 [of \"r\" \"s\" \"i\"], assumption+)\napply (simp add:mem_of_Nset) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma regular_subtr:\nassumes r: \"regular tr\" and s: \"subtr ns tr' tr\"\nshows \"regular tr'\"", "output": "using r reg_subtr[OF _ s] unfolding regular_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma oneof_length: \n assumes \"oneof xs s = Inr (y, r)\"\n shows \"length s \\ length y + length r \\ y \\ set xs\"", "output": "proof - from oneof_result [OF assms] obtain w where \"s = y @ w @ r \\ y \\ set xs\" .. thus ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trace_reject:\n \"(\\ recognises_execution e s r ((l, i)#t)) = (possible_steps e s r l i = {||} \\ (\\(s', T) |\\| possible_steps e s r l i. \\ recognises_execution e s' (evaluate_updates T i r) t))\"", "output": "using recognises_prim\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_from_eq_frac:\n assumes \"local.frac r s = local.frac r' s'\"\n and \"s \\ (R \\ I)\" and \"s' \\ (R \\ I)\" and \"r \\ R\" \"r' \\ R\"\n obtains h where \"h \\ (R \\ I)\" \"h \\ (s' \\ r - s \\ r') = \\\"", "output": "using local.frac_eq_Ex[of r s r' s'] assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma equivp_inf: \"\\equivp R; equivp S\\ \\ equivp (inf R S)\"", "output": "unfolding equivp_def inf_fun_def inf_bool_def\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Alt_eq_map_rexp_iff:\n \"Alt r s = map_rexp f x \\ (\\r' s'. x = Alt r' s' \\ map_rexp f r' = r \\ map_rexp f s' = s)\"\n \"map_rexp f x = Alt r s \\ (\\r' s'. x = Alt r' s' \\ map_rexp f r' = r \\ map_rexp f s' = s)\"", "output": "by (cases x; auto)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ocomplete_no_cast [simp]:\n \"((\\, s), R:*cast(m), (\\', s')) \\ ocnet_sos T\"", "output": "proof assume \"((\\, s), R:*cast(m), (\\', s')) \\ ocnet_sos T\" hence \"R:*cast(m) \\ R:*cast(m)\"\nby (rule ocnet_sos.cases) auto thus False\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "theorem Times_assoc[simp]: \"Times (Times r s) t = Times r (Times s t)\"", "output": "by (coinduction arbitrary: r s t rule: language_coinduct_upto_Plus) fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma constant_function_comp_is_constant_seq:\n assumes \"a \\ carrier R\"\n assumes \"s \\ closed_seqs R\"\n shows \"is_constant_seq R ((const a) \\ s)\"", "output": "apply(rule is_constant_seqI[of _ _ a] )\napply (simp add: assms(1) assms(2) constant_function_comp_is_closed_seq)\nusing assms(1) assms(2) closed_seqs_memE\nby (simp add: closed_seqs_memE constant_functionE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reduction_language_subset: \"R.language \\ S.language\"", "output": "unfolding S.language_def R.language_def\nusing reduction_words_inf\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conc_fun_chain: \"\\R (\\S M) = \\(R O S) M\"", "output": "unfolding conc_fun_def\nby (auto split: nres.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matcher_correctness: \"matcher r s \\ s \\ lang r\"", "output": "by (induct s arbitrary: r) (simp_all add: Noneable_iff lang_deriv matcher_def Deriv_def)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem (in ring_hom_ring) FactRing_iso_set:\n assumes \"h ` carrier R = carrier S\"\n shows \"(\\X. the_elem (h ` X)) \\ ring_iso (R Quot (a_kernel R S h)) S\"", "output": "using FactRing_iso_set_aux assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eta_star_preserves_typ_of: \"r \\\\<^sub>\\\\<^sup>* s \\ typ_of r = Some T \\ typ_of s = Some T\"", "output": "using eta_star_preserves_typ_of1 typ_of_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma(in UP_cring) poly_lift_hom_comm_taylor_expansion:\n assumes \"cring S\"\n assumes \"\\ \\ ring_hom R S\"\n assumes \"p \\ carrier P\"\n assumes \"a \\ carrier R\"\n shows \"poly_lift_hom R S \\ (taylor_expansion R a p) = taylor_expansion S (\\ a) (poly_lift_hom R S \\ p)\"", "output": "unfolding taylor_expansion_def\nusing poly_lift_hom_sub[of S \\ p \"(X_poly_plus R a)\"] poly_lift_hom_X_plus[of S \\ a] assms\nby (simp add: P_def UP_cring.X_plus_closed UP_cring_axioms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_mrexp3_imp_eq: \"\\eq_mrexp3 r s; ok3 r; ok3 s\\ \\ (r = s)\"", "output": "by (induct rule: eq_mrexp3.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_ran_eq_single_conv: \"mset_ran a r = {#x#} \\ (\\i. r={i} \\ x= a i)\"", "output": "apply (cases \"finite r\")\napply (auto simp: mset_ran_def)\nusing finite_set_mset_mset_set msed_map_invR\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_list_appendI: \"a [\\\\<^bsub>r\\<^esub>] b \\ c [\\\\<^bsub>r\\<^esub>] d \\ a@c [\\\\<^bsub>r\\<^esub>] b@d\"", "output": "apply (unfold Listn.le_def lesub_def)\napply (rule list_all2_appendI, assumption+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma genPrefix_prefix_trans:\n \"[| (x,y) \\ genPrefix r; y<=z |] ==> (x,z) \\ genPrefix r\"", "output": "apply (unfold prefix_def)\napply (drule genPrefix_trans_O, assumption)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Ring) tnm_bilinear:\"\\R module M; R module N; FM\\<^bsub>R\\<^esub> P M N\\ \\ \n bilinear_map (tnm R P M N) R M N (M \\<^bsub>P\\<^esub>\\\\<^bsub>R\\<^esub> N)\"", "output": "apply (simp add:tnm_def)\napply (simp add:tau_mpj_bilinear) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in TwoRings) i_contract_mono:\"\\f \\ rHom R R'; ideal R' J1; ideal R' J2;\n J1 \\ J2 \\ \\ i_contract f R R' J1 \\ i_contract f R R' J2\"", "output": "apply (rule subsetI)\napply (simp add:i_contract_def invim_def)\napply (erule conjE)\napply (rule subsetD, assumption+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma med_progress_dom [simp]: \"dom (med_progress r) = dom r\"", "output": "apply (auto simp add: domIff med_progress_def)\napply (rename_tac x y, case_tac \"r x\", auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tfl_cut_apply: \"\\f R. (x,a)\\R \\ (cut f R a)(x) = f(x)\"", "output": "apply clarify\napply (rule cut_apply, assumption) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma return_sp_rule:\n \"

return x <\\r. P * \\(r = x)>\"", "output": "unfolding hoare_triple_def Let_def\napply (simp add: Abs_assn_inverse)\napply (auto elim!: run_elims intro!: relH_refl intro: models_in_range)\napply (simp add: in_range.simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_list_map_OK [simp]:\n \"\\b. (map OK a [\\\\<^bsub>Err.le r\\<^esub>] map OK b) = (a [\\\\<^sub>r] b)\"", "output": "apply (induct a)\napply simp\napply simp\napply (case_tac b)\napply simp\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strong_low_bisim_mm_R\\<^sub>C_of_RelS_\\:\n \"conc.strong_low_bisim_mm (R\\<^sub>C_of (A.\\ \\ \\ P) RelS_Eg1Eg2 \\simple)\"", "output": "apply(rule R\\<^sub>C_of_strong_low_bisim_mm)\napply(rule A.\\_bisim)\napply(rule RelS_Eg1Eg2_secure_refinement_\\)\napply(simp add: sym_def \\simple_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_poly_l_spec:\n \\(add_poly_l, uncurry (\\p q. SPEC(\\r. add_poly_p\\<^sup>*\\<^sup>* (p, q, {#}) ({#}, {#}, r)))) \\\n sorted_poly_rel \\\\<^sub>r sorted_poly_rel \\\\<^sub>f \\sorted_poly_rel\\nres_rel\\", "output": "unfolding add_poly_l_add_poly\napply (intro nres_relI frefI)\napply (drule add_poly_l'_add_poly_p)\napply (auto simp: conc_fun_RES) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Cons_notle_Nil [iff]: \"\\ x#xs [\\\\<^bsub>r\\<^esub>] []\"", "output": "apply (unfold lesub_def Listn.le_def)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bisim_simple_\\\\<^sub>3:\n \"lc \\\\<^sup>3\\<^bsub>\\,\\,P\\<^esub> lc' \\ (fst (fst lc)) = (fst (fst lc'))\"", "output": "apply(induct rule: \\\\<^sub>3_aux.induct)\nusing bisim_simple_\\\\<^sub>1\napply clarsimp\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diamond_confluent: \"diamond R ==> confluent R\"", "output": "apply (unfold diamond_def)\napply (erule commute_rtrancl) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma array_rel_sv[relator_props]:\n shows \"single_valued R \\ single_valued (\\R\\array_rel)\"", "output": "unfolding array_rel_alt\napply (intro relator_props )\napply (auto intro: single_valuedI) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Module) mHom_mHom:\"\\R module N; g \\ mHom R (mdl M (carrier M)) N\\\n \\ g \\ mHom R M N\"", "output": "apply (rule mHom_test, assumption)\napply (rule conjI)\napply (simp add:mHom_def aHom_def mdl_def)\napply (simp add:mHom_def aHom_def mdl_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_update_le_cong:\n \"\\ i\\<^bsub>r\\<^esub>] ys; x \\\\<^sub>r y \\ \\ xs[i:=x] [\\\\<^bsub>r\\<^esub>] ys[i:=y]\"", "output": "apply (unfold unfold_lesub_list)\napply (unfold Listn.le_def)\napply (simp add: list_all2_update_cong) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma givenBy_DiffI:\n \"[| A \\ givenBy v; B \\ givenBy v |] ==> A-B \\ givenBy v\"", "output": "apply (simp (no_asm_use) add: givenBy_eq_Collect)\napply safe\napply (rule_tac x = \"%z. R z & ~ Q z\" for R Q in exI) unfolding set_diff_eq\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma asprod_distrib2:\"\\0 < i; 0 < j\\ \\ (i + j) *\\<^sub>a x = (i *\\<^sub>a x) + (j *\\<^sub>a x)\"", "output": "by (cut_tac mem_ant[of \"x\"], erule disjE, simp, erule disjE, erule exE, simp add:asprod_mult, simp add: distrib_right a_zpz, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma emeasure_CI':\n \"finite J \\ X \\ sets (PiM J M) \\ CI J X = C 0 (up_to J) (\\_. undefined) (PF.emb {0..i. i \\ J \\ sets (M i) = sets (N i)\" shows \"sets (PiM I M) = sets (PiM J N)\"", "output": "using assms sets_eq_imp_space_eq[OF assms(2)]\nby (simp add: sets_PiM_single cong: PiE_cong conj_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_subst_lt:\n \"i < j + 1 \\ lift (t) i = (lift t i)\"", "output": "by (induct t arbitrary: i j s) (auto simp: subst_Var lift_lift)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_succ_iff: \"Ord i \\ Ord j \\ succ i \\ succ j \\ i \\ j\"", "output": "by (metis Ord_linear_le Ord_succ le_succE order_antisym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_tm_commute2 [simp]:\n \"atom j \\ t \\ atom i \\ u \\ i \\ j \\ subst j u (subst i t tm) = subst i t (subst j u tm)\"", "output": "by (induct tm rule: tm.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma make_first_column_positive_works: \n assumes \"A\\carrier_mat m n\" and i: \"i 0\"\n and \"j A $$ (i,0) < 0 \\ (make_first_column_positive A) $$ (i,j) = - A $$ (i,j)\"\n and \"j A $$ (i,0) \\ 0 \\ (make_first_column_positive A) $$ (i,j) = A $$ (i,j)\"", "output": "using assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma effective_matrix_match_condn_1: \n assumes \"(matrix_match A1 A2 B1 B2) \"\n shows \"\\i j.((i<(row_length A1)*(row_length B1))\n \\(j<(length A2)*(length B2))\n \\ ((A1 \\ A2)\\(B1 \\ B2))!j!i\n = f \n (scalar_product \n (row A1 (i div (row_length B1))) \n (col A2 (j div (length B2))))\n (scalar_product \n (row B1 (i mod (row_length B1))) \n (col B2 (j mod (length B2)))))\"", "output": "using assms matrix_match_condn_1 unfolding matrix_match_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pp_total_linorder_matrix:\n fixes f :: \"('a::finite,'b::non_trivial_linorder_stone_relation_algebra_expansion) square\"\n shows \"matrix_bounded_idempotent_semiring.total (\\\\f) \\ (\\i . \\j . f (i,j) \\ bot)\"", "output": "using matrix_stone_relation_algebra.pp_total pp_total_linorder_matrix_1 pp_total_linorder_matrix_2\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma kth_obs_le_iff: assumes \\is_kth_obs \\ k i\\ \\is_kth_obs \\ l j\\ shows \\k < l \\ i < j\\", "output": "by (metis assms kth_obs_unique kth_obs_mono not_less_iff_gr_or_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nth_append_take_drop_is_nth_conv: \n assumes \"i \\ length xs\" and \"j \\ length xs\" and \"i \\ j\" \n shows \"(take j xs @ y # drop (Suc j) xs)!i = xs!i\"", "output": "proof - from assms have \"i < j \\ i > j\"\nby auto thus ?thesis\nusing assms\nby (auto simp: nth_append_take_is_nth_conv nth_append_drop_is_nth_conv)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma outside_of_col_range_is_0:\n assumes \"i < dim_row A\" and \"j \\ dim_col A\"\n shows \"coeff ((matrix_to_lpolies A)!i) j = 0\"", "output": "using outside_list_coeff0[of \"col A i\" j]\nby (metis assms(1) assms(2) index_row(2) length_rows matrix_to_lpolies.simps nth_map nth_rows outside_list_coeff0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eliminate_entries_i: assumes \n vs: \"\\ j. j < dim_row B' \\ R (vs (integer_of_nat j)) (vs' j)\" \n and i: \"i < dim_row B'\" \n and B: \"mat_rel R B B'\" \n shows \"mat_rel R (eliminate_entries_i ops vs B i j) \n (eliminate_entries vs' B' i j)\"", "output": "unfolding eliminate_entries_i_def eliminate_entries_gen_zero[OF B i]\nby (rule eliminate_entries_gen_transfer, insert assms, auto simp: plus times minus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Disjoint_fresh_iff [simp]: \"a \\ Disjoint t u \\ a \\ t \\ a \\ u\"", "output": "proof - obtain j::name where j: \"atom j \\ (a,t,u)\"\nby (rule obtain_fresh) thus ?thesis\nby (auto simp: Disjoint.simps [of j])\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interchange_columns_code [code abstract]:\n \"vec_nth (interchange_columns_row A n m i) = (%j. if j = n then A $ i $ m else if j = m then A $ i $ n else A $ i $ j)\"", "output": "unfolding interchange_columns_row_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordLeq_Sigma_cong:\nassumes \"bij_betw f I J\" and\n \"\\j \\ J. p j =o r j\"\nshows \"|SIGMA i : I. Field(p(f i))| =o |SIGMA j : J. Field(r j)|\"", "output": "using assms card_of_cong card_of_Sigma_cong [of f I J \"\\ j. Field(p j)\" \"\\ j. Field(r j)\"]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_0_0_subset_Gen: \"\\ 0 0 \\ Gen (\\

0 0)\"", "output": "apply (simp only: \\.simps)\napply (rule_tac thmD5)\napply (rule Init_subset_Gen)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma V_constotal_2I:\n assumes \"f = j # a @ [k] \\ 0\\<^sup>\\\"\n and \"j \\ 2\"\n and \"\\i 1\"\n and \"k \\ 2\"\n and \"\\ j = j # a \\ \\\\<^sup>\\\"\n and \"\\ k = f\"\n shows \"f \\ V_constotal_2\"", "output": "using assms V_constotal_2_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Ring) mprod_expR_mem:\"\\ e \\ {j. j \\ n} \\ {j. (0::nat) \\ j};\n f \\ {j. j \\ n} \\ carrier R\\ \\ mprod_expR R e f n \\ carrier R\"", "output": "apply (simp add:mprod_expR_memTr) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat_eq_iff: \"(x = y) = (dim_row x = dim_row y \\ dim_col x = dim_col y \\\n (\\ i j. i < dim_row y \\ j < dim_col y \\ x $$ (i,j) = y $$ (i,j)))\" (is \"?l = ?r\")", "output": "proof assume ?r show ?l\nby (rule eq_matI, insert \\?r\\, auto)\nqed simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mk_poly2_pre:\n fixes A :: \"'a :: comm_semiring_1 mat\"\n assumes i: \"i < dim_row A\"\n shows \"mk_poly2 A $ i = (\\j' r\" and \"i \\ j\"\nshows \"(succ i, j) \\ r\"", "output": "unfolding succ_def\napply(rule suc_least)\nusing assms unfolding Field_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Ring) prod_n_principal_ideal:\"\\e \\ {j. j\\n} \\ {j. (0::nat)\\j}; \nf \\ {j. j\\n} \\ carrier R; \\k\\ n. J k = (Rxa R (f k))\\<^bsup>\\R (e k)\\<^esup>\\ \\\n ideal_n_prod R n J = Rxa R (mprod_expR R e f n)\"", "output": "apply (simp add:prod_n_principal_idealTr[of e n f J]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fst_splitAt_upt:\n \"j \\ i \\ i < k \\ fst(splitAt i [j..j \\ i; LEQ ord i (#\\<^sub>V \\)\\ \\\n Extend ord j (Extend ord i \\ P1) P2 = Extend ord (Suc i) (Extend ord j \\ P2) P1\"", "output": "by (transfer, force simp del: insert_nth_take_drop simp: replicate_add[symmetric] split: order.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma all_positions_drop_length_take: \"\\i \\ length w; i \\ length x;\n \\j\n \\ drop (length w - i) w = take i x\"", "output": "by (cases \"i = length x\") (auto intro: nth_equalityI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_sdom_not_dom: \"\\strict_dom i j \\ i \\ j \\ \\dom i j\"", "output": "by (unfold strict_dom_def) (auto simp add:dom_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma index_mat_swapcols[simp]: \n \"i < dim_row A \\ j < dim_col A \\ swapcols k l A $$ (i,j) = (if k = j then A $$ (i,l) else \n if l = j then A $$ (i,k) else A $$ (i,j))\"\n \"dim_row (swapcols k l A) = dim_row A\" \"dim_col (swapcols k l A) = dim_col A\"", "output": "unfolding mat_swapcols_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma point_linorder_matrix_unique:\n fixes f :: \"('a::finite,'b::non_trivial_linorder_stone_relation_algebra_expansion) square\"\n shows \"matrix_stone_relation_algebra.point f \\ (\\!i . \\j . f (i,j) = top \\ (\\k . i \\ k \\ f (k,j) = bot))\"", "output": "apply (unfold vector_linorder_matrix bijective_linorder_matrix)\napply (rule iffI)\napply (metis bot_not_top)\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma slide_inj:\"i < j \\ inj_on (slide i) {k. k \\ (j - i)}\"", "output": "apply (simp add:inj_on_def, (rule allI)+)\napply (rule impI, rule allI, rule impI, rule impI)\napply (simp add:slide_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma elts_vcard_VSigma_eqpoll: \"elts (vcard (vtimes i j)) \\ elts i \\ elts j\"", "output": "proof - have \"elts (vtimes i j) \\ elts i \\ elts j\"\nby (simp add: elts_VSigma) then show ?thesis\nusing cardinal_eqpoll eqpoll_trans\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma multiplicity_prime: \n assumes p: \"prime (i :: nat)\" and ji: \"j \\ i\"\n shows \"multiplicity j i = 0\"", "output": "using assms\nby (metis dvd_refl prime_nat_iff multiplicity_eq_zero_iff multiplicity_unit_left multiplicity_zero)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Semaphores_mutex:\n \"\\- \\i\\j\\\n \\out:=True ,,\n COBEGIN \\i\\j\\\n WHILE True INV \\i\\j\\\n DO \\i\\j\\ AWAIT \\out THEN \\out:=False,, \\who:=i END;;\n \\\\\\out \\ \\who=i \\ i\\j\\ \\out:=True OD\n \\False\\\n \\\n \\i\\j\\\n WHILE True INV \\i\\j\\\n DO \\i\\j\\ AWAIT \\out THEN \\out:=False,,\\who:=j END;;\n \\\\\\out \\ \\who=j \\ i\\j\\ \\out:=True OD\n \\False\\\n COEND\n \\False\\\"", "output": "apply oghoare \\ \\38 vc\\\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma enum_strict_mono: \"i \\ n \\ j \\ n \\ enum i < enum j \\ i < j\"", "output": "using enum_mono[of i j] enum_inj[of i j]\nby (auto simp: le_less)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comp_transpos_1:\"\\i \\ n; j \\ n; i \\ j; k \\ n\\ \\\n (transpos i j) ((transpos i j) k) = k\"", "output": "apply (frule comp_transpos [of \"i\" \"n\" \"j\"], assumption+)\napply (simp add:compose_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vector_matrix_mult_code [code abstract]:\n \"vec_nth (x v* A) = (%j. (\\i\\UNIV. A $ i $ j * x $ i))\"", "output": "unfolding vector_matrix_mult_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma canonical_D:\n assumes\n \"cycle_free_up_to m k n\" \"canonical_subs n {0..k} m\" \"i \\ n\" \"j \\ n\" \"k \\ n\"\n shows \"D m i j k = m i j\"", "output": "using assms\napply -\napply (rule D_eqI2)\napply (assumption | simp; fail)+ subgoal\nby (auto intro: canonical_subs_len)\napply clarsimp\nby (rule exI[where x = \"[]\"]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sup_upto_llist_Suc[simp]:\n \"Sup_upto_llist Xs (enat (Suc j)) =\n Sup_upto_llist Xs (enat j) \\ (if enat (Suc j) < llength Xs then lnth Xs (Suc j) else {})\"", "output": "unfolding Sup_upto_llist_def image_def\nby (auto intro: le_SucI elim: le_SucE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_fm_commute [simp]:\n \"atom j \\ A \\ (A(i::=t))(j::=u) = A(i ::= subst j u t)\"", "output": "by (nominal_induct A avoiding: i j t u rule: fm.strong_induct) (auto simp: fresh_at_base)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_to_iarray_cofactor[code_unfold]: \n \"(cofactor A i j) = cofactor_iarrays (matrix_to_iarray A) (to_nat i) (to_nat j)\"", "output": "unfolding o_def cofactor_iarrays_def cofactor_def cofactorM_def unfolding matrix_to_iarray_minorM[symmetric] unfolding matrix_to_iarray_det_euclidean_ring[symmetric]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma arcs_set_elem1:\n assumes \"j \\ k\" \"k \\ set (i # xs)\"\n shows \"\\ l. (k, l) \\ set (arcs i j xs)\"", "output": "using assms\nby (induction xs arbitrary: i) auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem order_finite_chain:\n assumes chX: \"long_ch_by_ord f X\"\n and finiteX: \"finite X\"\n and ordered_nats: \"0 \\ (i::nat) \\ i < j \\ j < l \\ l < card X\"\n shows \"[[(f i) (f j) (f l)]]\"", "output": "by (metis chX long_ch_by_ord_def ordered_nats ordering_ord_ijk)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in ring) indexed_pmult_index_free:\n assumes \"index_free P j\" and \"i \\ j\" shows \"index_free (P \\ i) j\"", "output": "using assms unfolding index_free_def indexed_pmult_def\nby (metis insert_DiffM insert_noteq_member)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fin_stut_after_last: assumes H: \"fin s\" shows \"\\j \\ last s. s j = s (last s)\"", "output": "proof (clarify) fix j assume j: \"j \\ last s\" from H obtain i where \"\\j \\ i. s j = s i\" (is \"?P i\")\nby (auto simp: fin_def) hence \"?P (last s)\" unfolding last_def\nby (rule LeastI) with j show \"s j = s (last s)\"\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_algebraE:\n assumes A: \"A \\ prod_algebra I M\"\n obtains J E where \"A = prod_emb I M J (\\\\<^sub>E j\\J. E j)\"\n \"finite J\" \"J \\ {} \\ I = {}\" \"J \\ I\" \"\\i. i \\ J \\ E i \\ sets (M i)\"", "output": "using A\nby (auto simp: prod_algebra_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stake_suffix_drop:\n \"stake i (\\ |\\<^sub>s j) = drop j (stake (i + j) \\)\"", "output": "by (metis append_eq_conv_conj length_stake semiring_normalization_rules(24) stake_add)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unless_untilI:\n assumes \"Q (\\ |\\<^sub>s j)\"\n assumes \"\\i. i < j \\ P (\\ |\\<^sub>s i)\"\n shows \"(P \\ Q) \\\"", "output": "unfolding defs\nusing assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chain_imp_relpow:\n assumes \"chain r S\" shows \"(S i, S (i + j)) \\ r^^j\"", "output": "proof (induct \"i + j\" arbitrary: j) case (Suc n) thus ?case\nusing assms\nby (cases j) auto\nqed simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adjust_idx_i:\n \"adjust_idx i j \\ i\"", "output": "unfolding adjust_idx_def\nby (cases \"j < i\", auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chainp_imp_relpowp:\n assumes \"chainp P S\" shows \"(P^^j) (S i) (S (i + j))\"", "output": "proof (induct \"i + j\" arbitrary: j) case (Suc n) thus ?case\nusing assms\nby (cases j) auto\nqed simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inv\\<^sub>2I:\n assumes \"lb T A j\" \"j \\ n\"\n \"\\T' A'. lb T' A' j \\ makespan T \\ 3 / 2 * makespan T'\"\n \"\\x > j. T x = 0\"\n \"j \\ m \\ makespan T = Max\\<^sub>0 (t ` {1..j})\"\n shows \"inv\\<^sub>2 T A j\"", "output": "unfolding inv\\<^sub>2_def\nusing assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AbstFormP_subst [simp]:\n \"(AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')\"", "output": "proof - obtain s::name and k::name where \"atom s \\ (v,i,x,x',t,j,k)\" \"atom k \\ (v,i,x,x',t,j)\"\nby (metis obtain_fresh) thus ?thesis\nby (auto simp: AbstFormP.simps [of s _ _ _ _ k])\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iter_bf_heap_unfold[code]:\n \"iter_bf_heap n w t mem = (\\ (i, j).\n (if i \\ n \\ j \\ n\n then do {\n bf\\<^sub>h'_impl n w t mem i j;\n iter_bf_heap n w t mem (if j < n then (i, j + 1) else (i + 1, 0))\n }\n else Heap_Monad.return ()))\"", "output": "unfolding iter_bf_heap_def\nby (rule ext) (safe, simp add: iter_heap_unfold)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Gen_subset_\\_0_0: \"Gen (\\

0 0) \\ \\ 0 0\"", "output": "apply (subst \\

_0_0_Gen)\napply auto\nusing Gen_subset_\\_0_0_helper\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lower_triangular_index:\n assumes \"lower_triangular A\" \"ij\\d. str (t + i + k + d + Suc j) = x\"\n and \"str (t + i + k + d) = x\" \nshows \"\\ j\\ Suc d. str (t + i + k + d + j) = x\"", "output": "using assms streamValue7\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linsD:\n assumes \"\\ \\ lins G\"\n shows \"(distinct \\)\" \n and \"(set \\ = (fset G^V) <+> (set G^E))\" \n and \"(\\i j v e. i < length \\ \\ j < length \\ \n \\ \\!i = Inl v \\ \\!j = Inr e \\ v |\\| fst3 e \\ ij k w e. j < length \\ \\ k < length \\ \n \\ \\!j = Inr e \\ \\!k = Inl w \\ w |\\| thd3 e \\ j (\\y. y = 0)\"", "output": "proof - assume a1: \"ad x = x\" { fix aa :: 'a have \"aa = 0\"\nusing a1\nby (metis (no_types) a_mul_d ans_d_def local.annil local.ans3 local.join.sup.idem local.mult_1_left) } then show ?thesis\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma red_external_aggr_read_mem_typeable:\n \"\\ (ta, va, h') \\ red_external_aggr P t a M vs h; ReadMem ad al v \\ set \\ta\\\\<^bsub>o\\<^esub> \\\n \\ \\T'. P,h \\ ad@al : T'\"", "output": "by(auto simp add: red_external_aggr_def split_beta split: if_split_asm dest: heap_clone_read_typeable)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma red_New_type_match:\n \"\\ h.red' P t e s ta e' s'; NewHeapElem ad CTn \\ set \\ta\\\\<^bsub>o\\<^esub>; typeof_addr ad \\ None \\\n \\ typeof_addr ad = \\CTn\\\" \n and reds_New_type_match:\n \"\\ h.reds' P t es s ta es' s'; NewHeapElem ad CTn \\ set \\ta\\\\<^bsub>o\\<^esub>; typeof_addr ad \\ None \\\n \\ typeof_addr ad = \\CTn\\\"", "output": "by(induct rule: h.red_reds.inducts)(auto dest: allocate_typeof_addr_SomeD red_external_New_type_match)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma a_very_costrict'': \"ad x = 1 \\ x = 0\"", "output": "by (metis add_commute local.add_zerol local.antisym local.apd1 local.apd3 local.join.bot_least local.mult_1_right local.phl_skip)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mono_ccINF:\n \"countable I \\ f (INF i \\ I. A i) \\ (INF x \\ I. f (A x))\"", "output": "by (intro countable_complete_lattice_class.ccINF_greatest monoD[OF \\mono f\\] ccINF_lower)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inner_eucl_of_list:\n fixes i::\"'a::executable_euclidean_space\"\n assumes i: \"i \\ Basis\"\n assumes l: \"length xs = DIM('a)\"\n shows \"i \\ eucl_of_list xs = xs ! (index Basis_list i)\"", "output": "using eucl_of_list_inner[OF assms]\nby (auto simp: inner_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma right_ideal_minus:\n assumes \"right_ideal I\"\n and \"a\\I\" and \"b\\I\"\n shows \"a - b \\ I\"", "output": "by (metis assms(1) assms(2) assms(3) diff_minus_eq_add minus_minus right_ideal_def subgroup_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma index_set_closed_in:\n assumes \"index_set I\" and \"i \\ I\" and \"\\x. eval r_phi [i, x] = eval r_phi [j, x]\"\n shows \"j \\ I\"", "output": "using index_set_def assms\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma DirProds_finite_comm_group_iff:\n assumes \"finite I\"\n shows \"finite_comm_group (DirProds G I) \\ (\\i\\I. finite_comm_group (G i))\"", "output": "using DirProds_finite_group_iff[OF assms] DirProds_comm_group_iff unfolding finite_comm_group_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma B_theorem_3_b: \"\\ i * f i = ff (lead_coeff (H i))\"", "output": "using arg_cong[OF fundamental_theorem_eq_6[folded H_def, OF i], of lead_coeff] unfolding f[of i] lead_coeff_smult\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_of_pm_prod: \"poly_of_pm x (prod f I) = (\\i\\I. poly_of_pm x (f i))\"", "output": "by (induct I rule: infinite_finite_induct) (simp_all add: poly_of_pm_times)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in sigma_algebra) sets_Collect_countable_Ex1:\n \"(\\i :: 'i :: countable. {x \\ \\. P i x} \\ M) \\ {x \\ \\. \\!i. P i x} \\ M\"", "output": "using sets_Collect_countable_Ex1'[of \"UNIV :: 'i set\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_on_blinfunI1:\n \"continuous_on X f\"\n if \"\\i. i \\ Basis \\ continuous_on X (\\x. blinfun_apply (f x) i)\"", "output": "using that\nby (auto simp: continuous_on_def intro: tendsto_componentwise1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma skip_im_Tr2_1:\"\\i \\ {i. i \\ (Suc n)}; i \\ x\\ \\\n skip i x = Suc x\"", "output": "apply (case_tac \"i = 0\")\napply (simp add:skip_def)\napply (simp, rule skip_im_Tr2, assumption+, simp+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma array_shr_rule[sep_heap_rules]:\n \"< src \\\\<^sub>a lsrc >\n array_shr src i k\n <\\_. src \\\\<^sub>a (take (i+k) lsrc @ take (length lsrc - (i+k)) (drop i lsrc))\n >\"", "output": "unfolding array_shr_def\nby sep_auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isom_gch_units_1:\"\\Ugp E; Gchain n g; Gchain n h; \\f. Gch_bridge n g h f\\\n \\ card {i. i \\ n \\ g i \\ E} = card {i. i \\ n \\ h i \\ E}\"", "output": "apply (auto del:equalityI)\napply (simp add:isom_gch_units) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fi_state: \"i < m \\ fi_state state = fs ! i\"", "output": "using get_nth_i[OF to_list_repr(1)] unfolding state\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wt_BinOpInstr:\n \"P \\ T1\\bop\\T2 :: T \\ \\ [BinOpInstr bop],[] [::] [ty\\<^sub>i' (T2 # T1 # ST) E A, ty\\<^sub>i' (T # ST) E A]\"", "output": "by(auto simp:ty\\<^sub>i'_def wt_defs dest: WT_binop_WTrt_binop intro: list_all2_refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cycle_free_up_to_loop_dest:\n \"i \\ n \\ set xs \\ {0..k} \\ cycle_free_up_to m k n \\ len m i i xs \\ \\\"", "output": "unfolding cycle_free_up_to_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tm_min_range:\n assumes \"x \\\\<^sub>i range_tm e t1\"\n assumes \"y \\\\<^sub>i range_tm e t2\"\n \"num_params (tm_poly t1) \\ length I\"\n \"num_params (tm_poly t2) \\ length I\"\n \"develops_at_within e a I\"\n shows \"min x y \\\\<^sub>i range_tm e (tm_min prec I a t1 t2)\"", "output": "using assms\nby (auto simp: Let_def tm_min.simps min_def intro: tm_union_range_left tm_union_range_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma take_cols_carrier_mat_strict:\n assumes \"A \\ carrier_mat nr nc\"\n assumes \"\\i. i \\ set inds \\ i < nc\"\n shows \"take_cols A inds \\ carrier_mat nr (length inds)\"", "output": "unfolding take_cols_def\nusing assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"\\ (\\ i :: rat. i * i = 2)\"", "output": "proof - have \"set (sqrt_rat 2) = {}\"\nby eval thus ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ListLenDrop: \nfixes\n i la lb\nassumes\n \"i < length lb\"\n \"i \\ la\"\nshows\n \"lb ! i \\ set (drop la lb)\"", "output": "using assms\nby (metis Cons_nth_drop_Suc in_set_member member_rec(1) set_drop_subset_set_drop rev_subsetD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma frequently_at_top_realE:\n fixes P::\"nat \\ real \\ bool\"\n assumes \"\\n. \\\\<^sub>F t in at_top. P n t\"\n obtains s::\"nat\\real\"\n where \"\\i. P i (s i)\" \"filterlim s at_top at_top\"", "output": "by (metis assms frequently_at_top_at_topE[OF _ filterlim_real_sequentially])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma scalar_left_mono: assumes \n \"u \\ carrier_vec n\" \"v \\ carrier_vec n\" \"w \\ carrier_vec n\" \n and \"\\ i. i < n \\ u $ i \\ v $ i\"\n and \"\\ i. i < n \\ w $ i \\ (0 :: 'a :: ordered_semiring_0)\"\n shows \"u \\ w \\ v \\ w\"", "output": "unfolding scalar_prod_def\nby (intro sum_mono_ge times_left_mono, insert assms, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"i \\ i1 \\ i \\ i2 \\ (f (i1 := v1, i2 := v2)) i = f i\"", "output": "using fun_upd_same fun_upd_apply\nby smt"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nop_instr_result: \"(fst i) = nop_type NOP \\\n snd (nop_instr i s) = False\"", "output": "apply (simp add: nop_instr_def)\nby (simp add: returnOk_def return_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma complex_Taylor:\n assumes S: \"convex S\"\n and f: \"\\i x. x \\ S \\ i \\ n \\ (f i has_field_derivative f (Suc i) x) (at x within S)\"\n and B: \"\\x. x \\ S \\ cmod (f (Suc n) x) \\ B\"\n and w: \"w \\ S\"\n and z: \"z \\ S\"\n shows \"cmod(f 0 z - (\\i\\n. f i w * (z-w) ^ i / (fact i)))\n \\ B * cmod(z - w)^(Suc n) / fact n\"", "output": "using assms\nby (rule field_Taylor)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pdevs_apply_update_slist: \"pdevs_apply (Pdevs (update_slist n x xs)) i =\n (if i = n then x else pdevs_apply (Pdevs xs) i)\"", "output": "by transfer (auto simp: Pdevs_raw_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inext_le_mono_infin_rev: \"\n \\ inext a I \\ inext b I; a \\ I; b \\ I; infinite I \\ \\ a \\ b\"", "output": "by (metis inext_in_iff inext_le_mono_rev inext_mono2_infin_fin)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem eval_negation:\n \"eval i (Neg' p) =\n (\n if eval i p = Det False then Det True else\n if eval i p = Det True then Det False else\n eval i p\n )\"", "output": "by (cases \"eval i p\") simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chain_boundary_sum:\n \"chain_boundary p (sum g I) = sum (chain_boundary p \\ g) I\"", "output": "by (induction I rule: infinite_finite_induct) (simp_all add: chain_boundary_add)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma DirProds_one:\n assumes \"x \\ carrier (DirProds G I)\"\n shows \"(\\i \\ I. x i = \\\\<^bsub>G i\\<^esub>) \\ x = \\\\<^bsub>DirProds G I\\<^esub>\"", "output": "using assms unfolding DirProds_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AbstrLevels_S6_A41:\n assumes \"sS6 \\ AbstrLevel i\"\n shows \"sA41 \\ AbstrLevel i\"", "output": "using assms\nby (induct i, simp add: AbstrLevel0, simp add: AbstrLevel1, simp add: AbstrLevel2, simp add: AbstrLevel3)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comp_in_carr:\n assumes \"x \\ carrier (DirProds G I)\" \"i \\ I\"\n shows \"x i \\ carrier (G i)\"", "output": "using assms unfolding DirProds_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_of_pm_sum: \"poly_of_pm x (sum f I) = (\\i\\I. poly_of_pm x (f i))\"", "output": "by (induct I rule: infinite_finite_induct) (simp_all add: poly_of_pm_plus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in semiring_of_sets) generated_ring_INTER:\n \"finite I \\ I \\ {} \\ (\\i. i \\ I \\ A i \\ generated_ring) \\ \\(A ` I) \\ generated_ring\"", "output": "by (intro generated_ring_Inter) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma measurable_component_singleton'[measurable_dest]:\n assumes f: \"f \\ measurable N (Pi\\<^sub>M I M)\"\n assumes g: \"g \\ measurable L N\"\n assumes i: \"i \\ I\"\n shows \"(\\x. (f (g x)) i) \\ measurable L (M i)\"", "output": "using measurable_compose[OF measurable_compose[OF g f] measurable_component_singleton, OF i] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma iterate_rule_P:\n \"\\\n invar S;\n I (\\ S) \\0;\n !!x it \\. \\ x \\ it; it \\ \\ S; I it \\ \\ \\ I (it - {x}) (f x \\);\n !!\\. I {} \\ \\ P \\\n \\ \\ P (iteratei S (\\_. True) f \\0)\"", "output": "apply (rule set_iterator_no_cond_rule_P [OF iteratei_correct, of S I \\0 f P])\napply simp_all done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rt_strictly_fresherI [intro]:\n assumes \"rt1 \\\\<^bsub>i\\<^esub> rt2\"\n and \"\\(rt1 \\\\<^bsub>i\\<^esub> rt2)\"\n shows \"rt1 \\\\<^bsub>i\\<^esub> rt2\"", "output": "unfolding rt_strictly_fresher_def\nusing assms .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma plossless_swap_lassocr [plossless_intro]:\n \"plossless_converter (\\1 \\\\<^sub>\\ (\\2 \\\\<^sub>\\ \\3)) (\\2 \\\\<^sub>\\ (\\1 \\\\<^sub>\\ \\3)) swap_lassocr\"", "output": "unfolding swap_lassocr_def\nby(rule plossless_intro WT_intro)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma DirProds_group_iff: \"group (DirProds G I) \\ (\\i\\I. group (G i))\"", "output": "using DirProds_is_group DirProds_group_imp_groups\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_coprime_right:\n \"coprime a (\\i\\A. f i)\" if \"\\i. i \\ A \\ coprime a (f i)\"", "output": "using that prod_coprime_left [of A f a]\nby (simp add: ac_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem subst_lemma [simp]:\n \\eval e f g (subst a t i) = eval (e\\i:evalt e f t\\) f g a\\", "output": "by (induct a arbitrary: e i t) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma delete_cnj_length[termination_simp]: \"length (delete_cnj x i yjs) \\ length yjs\"", "output": "by (induct x i yjs rule: delete_cnj.induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_vector_mul_diag_mat: \"diag_mat f *v s = (\\ i. f i * s$i)\"", "output": "unfolding diag_mat_def matrix_vector_mult_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sumj_upd_C: \"sumj I i (s(C := x)) = sumj I i s\"", "output": "by (induct I) (auto simp add: sum_upd_C [unfolded fun_upd_def])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FOREACHoci_weaken:\n assumes IREF: \"\\it \\. it\\S \\ I it \\ \\ I' it \\\"\n shows \"FOREACHoci RR I' S c f \\0 \\ FOREACHoci RR I S c f \\0\"", "output": "apply (rule FOREACHoci_refine_rcg[where \\=id and R=Id, simplified])\napply (auto intro: IREF) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inext_nth_surj_on:\"surj_on (\\n. I \\ n) UNIV I\"", "output": "apply (simp add: surj_on_conv)\nby (insert inext_nth_surj_aux1[of I], blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bisim_hidden_unmod: \"\\ bisim Vs e e' xs; hidden Vs i \\ \\ unmod e' i\"\n and bisims_hidden_unmods: \"\\ bisims Vs es es' xs; hidden Vs i \\ \\ unmods es' i\"", "output": "by(induct rule: bisim_bisims.inducts)(auto intro: hidden_unmod hidden_unmods dest: hidden_inacc hidden_lengthD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flatten_sum: \"flatten (sum f I) = (\\i\\I. flatten (f i))\"", "output": "by (induct I rule: infinite_finite_induct) (simp_all add: flatten_plus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_mset_imp_in_array: \n \"x \\# (arr_mset arr l r) \\ (\\i. bounded l r i \\ arr i = x)\"", "output": "unfolding mset_ran_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma less_length_cut_same_Inl:\n \"\\(\\x \\ set I. case x of Inr P \\ finite P | _ \\ True); r < length I; I ! r = Inl p\\ \\\n p < length (cut_same (any, replicate (length I) False) (stream_enc (w, I)))\"", "output": "unfolding cut_same_def length_stake\nby (erule LeastI2_ex[OF ex_Loop_stream_enc ccontr], auto simp: smap2_alt list_eq_iff_nth_eq add.commute dest!: add_diff_inverse split: sum.splits, metis)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma InstrElimNext:\n \"\\(M, l, s, n, ll, t) \\ Step;\n get_ins M l = Some I;\n I = const c \\ I = dup \\ I = pop \\ I = swap \\ I = load x \\\n I = store x \\ I = binop f \\ I = unop g \\ I = new d \\\n I = getfield d F \\ I = putfield d F \\ I = checkcast d\\\n \\ ll = l+1\"", "output": "apply (drule eval_cases, simp_all)\napply clarsimp\napply clarsimp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma WHILEI_le_WHILEIT: \"WHILEI I b f s \\ WHILEIT I b f s\"", "output": "unfolding WHILEI_def WHILEIT_def\nby (rule REC_le_RECT)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma skip_im_Tr1_2:\"\\ i \\ (Suc n); x < i\\ \\ skip i x = x\"", "output": "apply (rule skip_im_Tr1_1[of i n x], simp+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma plossless_parallel_converter [plossless_intro]:\n \"\\ plossless_converter \\1 \\ conv1; plossless_converter \\2 \\ conv2; \\1, \\ \\\\<^sub>C conv1 \\; \\2, \\ \\\\<^sub>C conv2 \\ \\\n \\ plossless_converter (\\1 \\\\<^sub>\\ \\2) \\ (parallel_converter conv1 conv2)\"", "output": "by(coinduction arbitrary: conv1 conv2) (clarsimp; erule PlusE; drule (1) plossless_converterD; drule (1) WT_converterD'; fastforce)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma enforce_\\_gpv_lift_spmf [simp]: \"enforce_\\_gpv \\ (lift_spmf p) = lift_spmf p\"", "output": "by(rule gpv.expand)(simp add: enforce_map_spmf spmf.map_comp o_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mem_set_indexed_members:\n \"(i,x) \\ set (indexed_members s) \\ x |\\|\\<^bsub>i\\<^esub> s\"", "output": "unfolding indexed_members_def indexed_fmember.simps\nby (force simp add: set_zip)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma i_set0_i_set_mem_conv: \"(I \\ i_set0) = (I \\ i_set \\ I = {})\"", "output": "apply (simp add: i_set_i_set_ind_eq i_set0_i_set0_ind_eq)\napply (rule iffI)\napply (rule i_set0_ind.cases[of I])\napply blast+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_single_bit[simp]: \"lookup i ((single_bit n)::'a::len word list) \\ i = n\"", "output": "apply (induction n arbitrary: i rule: single_bit.induct)\napply (subst single_bit.simps)\napply (auto simp: bin_nth_sc_gen) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_fun_mono:\n fixes f :: \"nat \\ nat\"\n shows \"(\\i. i < n \\ f i \\ g i) \\ sum f {.. sum g {.. freedb s i \\ lift (s) i = s\"", "output": "by (induct s arbitrary: i dummy) (simp_all add: not_less_eq if_not_P)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Always_giv_le_allocGiv: \"System \\ Always (INT i: lessThan Nclients.\n {s. (giv o sub i o client) s \\ (sub i o allocGiv) s})\"", "output": "apply auto\napply (erule System_Follows_allocGiv [THEN Follows_Bounded]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Ring) I_in_set_ar_cos:\"ideal R I \\ I \\ set_ar_cos R I\"", "output": "apply (cut_tac ring_is_ag, frule ideal_asubg[of \"I\"], rule aGroup.unit_in_set_ar_cos, assumption+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_mul_diag_diag: \"diag_mat f ** diag_mat g = diag_mat (\\i. f i * g i)\"", "output": "unfolding diag_mat_def matrix_matrix_mult_def vec_eq_iff\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma plossless_map_converter:\n \"plossless_converter \\ \\' (map_converter f g h k conv)\"\n if \"plossless_converter (map_\\ (inv_into UNIV f) (inv_into UNIV g) \\) (map_\\ h k \\') conv\" \"inj f\"", "output": "using that\nby(coinduction arbitrary: conv)(auto dest!: plossless_converterD[where a=\"f _\"])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma constraint_model_Value_term_is_Val':\n assumes \\_reach: \"A \\ reachable_constraints P\"\n and \\: \"welltyped_constraint_model I A\"\n and P: \"\\T \\ set P. admissible_transaction T\"\n and x: \"(TAtom Value, m) \\ fv\\<^sub>l\\<^sub>s\\<^sub>s\\<^sub>t A\"\n shows \"\\n. I (TAtom Value, m) = Fun (Val (n,False)) []\"", "output": "using constraint_model_Value_term_is_Val[OF \\_reach \\ P _ x]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inext_le_mono_fin_rev: \"\n \\ inext a I \\ inext b I; a \\ I; b \\ I; finite I; inext a I \\ Max I\\ \\ a \\ b\"", "output": "by (metis inext_in_iff inext_le_mono_rev inext_mono2_infin_fin)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma borel_measurable_vimage_halfspace_component_lt:\n \"f \\ borel_measurable (lebesgue_on S) \\\n (\\a i. i \\ Basis \\ {x \\ S. f x \\ i < a} \\ sets (lebesgue_on S))\"", "output": "apply (rule trans [OF borel_measurable_iff_halfspace_less])\napply (fastforce simp add: space_restrict_space) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma singleton:\"|i| = 1 \\ (\\n. Rep_nat_int i = {n})\"", "output": "using card_1_singletonE card'.rep_eq\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bdd_below_is_intervalI: \"bdd_below I\"\n if \"is_interval I\" \"a \\ b\" \"a \\ I\" \"b \\ I\" for I::\"real set\"", "output": "by (meson bdd_below_def is_interval_1 le_cases that)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma repeat_subst_trm [simp]: \"subst i u (subst i t trm) = subst i (subst i u t) trm\"", "output": "by (induct trm rule: trm.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma echelon_form_upt_row_condition1_explicit_neg:\n assumes \"echelon_form_upt_row A k\"\n and iA: \"\\ is_zero_row i A\" and ia_i: \"ia < i\"\n and i: \"to_nat i < k\"\n shows \"\\ is_zero_row ia A\"", "output": "proof - have \"to_nat ia < k\"\nby (metis ia_i i less_trans to_nat_mono) thus ?thesis\nusing assms unfolding echelon_form_upt_row_def\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Example1_list:\n \"\\- \\n < length \\A\\\n COBEGIN\n SCHEME [0\\in < length \\A\\ \\A:=\\A[i:=0] \\\\A!i=0\\\n COEND\n \\\\i < n. \\A!i = 0\\\"", "output": "apply oghoare\napply force+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma under_succ[simp]:\nassumes \"aboveS i \\ {}\"\nshows \"under (succ i) = insert (succ i) (under i)\"", "output": "using less_succ[OF assms] unfolding under_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bdd_above_is_intervalI: \"bdd_above I\" if \"is_interval I\" \"a \\ b\" \"a \\ I\" \"b \\ I\" for I::\"real set\"", "output": "by (meson bdd_above_def is_interval_1 le_cases that)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stream_enc_cut_same:\n assumes \"(\\x \\ set I. case x of Inr P \\ finite P | _ \\ True)\"\n shows \"stream_enc (w, I) = cut_same (any, replicate (length I) False) (stream_enc (w, I)) @-\n sconst (any, replicate (length I) False)\"", "output": "unfolding cut_same_def\nby (rule trans[OF sym[OF stake_sdrop] arg_cong2[of _ _ _ _ \"(@-)\", OF refl]]) (rule LeastI_ex[OF ex_Loop_stream_enc[OF assms]])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PiE_eq_singleton: \"(\\\\<^sub>E i\\I. S i) = {\\i\\I. f i} \\ (\\i\\I. S i = {f i})\"", "output": "by (metis (mono_tags, lifting) PiE_eq PiE_singleton insert_not_empty restrict_apply' restrict_extensional)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat_row_first_nth[simp]: \"i < n \\ row (mat_row_first A n) i = row A i\"", "output": "unfolding mat_row_first_def row_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma colossless_obsf_converter [simp]:\n \"colossless_converter (exception_\\ \\) \\' (obsf_converter conv)\"", "output": "by(coinduction arbitrary: conv)(auto split: option.split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Ipoly_num_params_cong: \"Ipoly xs p = Ipoly ys p\"\n if \"\\i. i < num_params p \\ xs ! i = ys ! i\"", "output": "using that\nby (induction p; auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in prob_space) indep_vars_compose2:\n assumes \"indep_vars M' X I\"\n assumes rv: \"\\i. i \\ I \\ Y i \\ measurable (M' i) (N i)\"\n shows \"indep_vars N (\\i x. Y i (X i x)) I\"", "output": "using indep_vars_compose [OF assms]\nby (simp add: comp_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integrable_integral[intro]: \"f integrable_on i \\ (f has_integral (integral i f)) i\"", "output": "unfolding integrable_on_def integral_def\nby (metis (mono_tags, lifting) someI_ex)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_SD_iff':\n \"p \\ lotteries_on alts \\ q \\ lotteries_on alts \\ i \\ agents' \\\n p \\[SD(R' i)] q \\ i \\ agents \\ p \\[SD(R i)] q\"", "output": "by (cases \"i \\ agents\") (simp_all add: lift_SD_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_Basis_sum_nth_Basis_list:\n \"(\\i\\Basis. f i) = (\\i {} \\ c \\ -\\ \\ (SUP i\\I. c + f i) = c + (SUP i\\I. f i)\"", "output": "using SUP_ereal_add_left[of I c f]\nby (simp add: add.commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inext_nth_closed: \"I \\ {} \\ I \\ n \\ I\"", "output": "apply (induct n)\napply (simp add: iMinI_ex2)\napply (simp add: inext_closed) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fbox_whilei_break: \n \"d p \\ |y] i \\ d i \\ ad t \\ d q \\ d i \\ d t \\ |x] i \\ d p \\ |y \\ (while t do x inv i)] q\"", "output": "apply (rule fbox_seq_var[OF _ fbox_whilei])\nusing fbox_simp\nby auto \\ \\ Finite iteration \\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma OrdInd2H:\n assumes \"H \\ A(i::= Zero)\"\n and \"H \\ All i (OrdP (Var i) IMP A IMP (A(i::= SUCC (Var i))))\"\n shows \"insert (OrdP (Var i)) H \\ A\"", "output": "by (metis assms thin1 Assume OrdInd2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_seg_simps[simp]: \n \"j\\i \\ path_seg p i j = {}\"\n \"path_seg p i (Suc i) = p!i\"", "output": "unfolding path_seg_def\napply auto []\napply (auto simp: le_less_Suc_eq) [] done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in cf_discrete) cf_discrete_is_functor_cf_CId_selector_is_arr: \n assumes \"i \\\\<^sub>\\ I\"\n shows \"\\\\CId\\\\F i\\ : F i \\\\<^bsub>\\\\<^esub> F i\"", "output": "using assms\nby (meson cat_CId_is_arr' cf_discreteD(2) cf_discrete_axioms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ell2_norm_uminus:\n assumes \"has_ell2_norm x\"\n shows \\has_ell2_norm (\\i. - x i)\\ and \\ell2_norm (\\i. - x i) = ell2_norm x\\", "output": "using assms\nby (auto simp: has_ell2_norm_def ell2_norm_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in ring) cgenideal_self:\n assumes icarr: \"i \\ carrier R\"\n shows \"i \\ PIdl i\"", "output": "unfolding cgenideal_def\nproof simp from icarr have \"i = \\ \\ i\"\nby simp with icarr show \"\\x. i = x \\ i \\ x \\ carrier R\"\nby fast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in ring_closed) coeff_pCons_closed [intro]:\n assumes \"\\i. poly.coeff p i \\ A\" \"x \\ A\"\n shows \"poly.coeff (pCons x p) i \\ A\"", "output": "unfolding poly_altdef\nusing assms\nby (auto simp: coeff_pCons split: nat.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma take_upt_idx:\n assumes i: \"i < length ls\"\n shows \"take i ls = [ ls ! j . j \\ [0.. i\"\nby auto show ?thesis\nusing take_upt[OF e] take_map map_nth\nby (metis (hide_lams, no_types) add.left_neutral i nat_less_le take_upt)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sq_mtx_vec_mult_diag_axis: \"(\\\\\\\\ i. f i) *\\<^sub>V (axis i k) = axis i (f i * k)\"", "output": "unfolding sq_mtx_diag_vec_mult axis_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma atLeastLessThan_impl_correct: \n \"atLeastLessThan_impl a b \\ SPEC (\\r. r = {a..(i,r). r = {a.. a\\i \\ ((a i\\b) \\ (\\a i=a))\" and R = \"measure (\\(i,_). b - i)\" ])\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rt_strictly_fresherI [intro]:\n assumes \"rt1 \\\\<^bsub>i\\<^esub> rt2\"\n and \"\\(rt1 \\\\<^bsub>i\\<^esub> rt2)\"\n shows \"rt1 \\\\<^bsub>i\\<^esub> rt2\"", "output": "unfolding rt_strictly_fresher_def\nusing assms .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_\\_restrict_converter:\n assumes \"\\,\\' \\\\<^sub>C cnv \\\"\n and \"outs_\\ \\ \\ A\"\n shows \"\\,\\' \\\\<^sub>C restrict_converter A \\' cnv \\ cnv\"", "output": "using assms(1)\nby(coinduction arbitrary: cnv) (use assms(2) in \\auto intro!: eq_\\_gpv_reflI eq_\\_restrict_gpv simp add: eq_onp_def dest: WT_converterD\\)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma EqButGH_eqButGH[simp]:\nassumes \"env p = i\" and \"env p' = i'\"\nshows \"sem (EqButGH p p') env = eqButGH i i'\"", "output": "using assms finite_EqButGH unfolding EqButGH_def eqButGH_def sem_Scon[OF finite_EqButGH] image_def\nby simp (metis (hide_lams, no_types) EqOnUC_eqOnUC)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proj_list_Cons:\n \"proj i ((ln i,d)#D) = (ln i,d)#proj i D\"\n \"proj i ((\\,d)#D) = (\\,d)#proj i D\"\n \"i \\ j \\ proj i ((ln j,d)#D) = proj i D\"", "output": "unfolding List.insert_def proj_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AbstrLevels_S1_A12:\n assumes \"sS1 \\ AbstrLevel i\"\n shows \"sA12 \\ AbstrLevel i\"", "output": "using assms\nby (induct i, simp add: AbstrLevel0, simp add: AbstrLevel1, simp add: AbstrLevel2, simp add: AbstrLevel3)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_\\_gpv_into_rel_gpv: \"eq_\\_gpv A \\_full gpv gpv' \\ rel_gpv A (=) gpv gpv'\"", "output": "by(coinduction arbitrary: gpv gpv') (drule eq_\\_gpvD, auto elim: spmf_rel_mono_strong generat.rel_mono_strong dest: eq_\\_generat_into_rel_generat )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wt_Push:\n \"\\ size ST < mxs; typeof v = Some T \\\n \\ \\ [Push v],[] [::] [ty\\<^sub>i' ST E A, ty\\<^sub>i' (T#ST) E A]\"", "output": "by(simp add: ty\\<^sub>i'_def wt_defs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma p_boundsI': \"(\\i (\\i 1 \\ p \\ {y<.. I. \\min_rvar_incdec dir s x\\<^sub>i = Inl I; check' dir x\\<^sub>i s = set_unsat I s\\ \\ P (set_unsat I s)\"\n assumes \"\\ x\\<^sub>j l\\<^sub>i. \\min_rvar_incdec dir s x\\<^sub>i = Inr x\\<^sub>j;\n l\\<^sub>i = the (LB dir s x\\<^sub>i);\n check' dir x\\<^sub>i s = pivot_and_update x\\<^sub>i x\\<^sub>j l\\<^sub>i s\\ \\\n P (pivot_and_update x\\<^sub>i x\\<^sub>j l\\<^sub>i s)\"\n shows \"P (check' dir x\\<^sub>i s)\"", "output": "using assms unfolding check'_def\nby (cases \"min_rvar_incdec dir s x\\<^sub>i\", auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n iNextStrong_True: \"(\\\\<^sub>S t t0 I. True) = (I \\> t0 \\ {} \\ t0 \\ I)\" and\n iNextWeak_False: \"(\\ (\\\\<^sub>W t t0 I. False)) = (I \\> t0 \\ {} \\ t0 \\ I)\"", "output": "by (simp_all add: iTL_defs ex_in_conv inext_singleton_cut_greater_not_empty_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma upper_asymptotic_density_finite_Union:\n assumes \"finite I\"\n shows \"upper_asymptotic_density (\\i\\I. A i) \\ (\\i\\I. upper_asymptotic_density (A i))\"", "output": "using assms\napply (induction I rule: finite_induct)\nusing order_trans[OF upper_asymptotic_density_union]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in TC2) wt_IfFalse:\n \"\\ 2 \\ i; nat i < size \\s + 2; P \\ ty\\<^sub>i' ST E A \\' \\s ! nat(i - 2) \\\n \\ \\ [IfFalse i],[] [::] ty\\<^sub>i' (Boolean # ST) E A # ty\\<^sub>i' ST E A # \\s\"", "output": "by(simp add: ty\\<^sub>i'_def wt_defs eval_nat_numeral nat_diff_distrib)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in prob_space) indep_vars_cong:\n \"I = J \\ (\\i. i \\ I \\ X i = Y i) \\ (\\i. i \\ I \\ M' i = N' i) \\ indep_vars M' X I \\ indep_vars N' Y J\"", "output": "unfolding indep_vars_def2\nby (intro conj_cong indep_sets_cong) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rref_condition2:\n assumes r: \"reduced_row_echelon_form A\"\n shows \" (\\i. \\ (is_zero_row i A) \\ A $ i $ (LEAST k. A $ i $ k \\ 0) = 1)\"", "output": "using r unfolding reduced_row_echelon_form_def'\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CAS_\\red1t_xt2:\n \"\\red1gt uf P t h (e, xs) (e', xs') \\ \\red1gt uf P t h (Val v\\compareAndSwap(D\\F, e, e3), xs) (Val v\\compareAndSwap(D\\F, e', e3), xs')\"", "output": "by(induct rule: tranclp_induct2)(auto intro: tranclp.trancl_into_trancl CAS1Red2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma InstanceOf_\\ExectI:\n \"\\Exec_movet ci P t e h s s' \\ \\Exec_movet ci P t (e instanceof T) h s s'\"", "output": "by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl InstanceOf_\\execI)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma NewArray_\\ExectI:\n \"\\Exec_movet ci P t e h s s' \\ \\Exec_movet ci P t (newA T\\e\\) h s s'\"", "output": "by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl NewArray_\\execI)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma OclNotEmpty_infinite: \"\\ \\ \\ X \\ \\ finite (Rep_Bag_base X \\) \\ \\ \\ \\ \\ (X->notEmpty\\<^sub>B\\<^sub>a\\<^sub>g())\"", "output": "apply(simp add: OclNotEmpty_def)\napply(drule OclIsEmpty_infinite, simp)\nby (metis OclNot_defargs OclNot_not foundation6 foundation9)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\reds1t_map_Val_Throw:\n \"\\reds1gt uf P t h (map Val vs @ Throw a # es, xs) s' \\ False\"\n (is \"?lhs \\ ?rhs\")", "output": "proof assume ?lhs thus ?rhs\nby induct auto\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma b_of_subst_bv:\n \"(b_of \\)[x::=v]\\<^sub>b\\<^sub>b = b_of (\\[x::=v]\\<^sub>\\\\<^sub>b)\"", "output": "proof - obtain z b c where *:\"\\ = \\ z : b | c \\ \\ atom z \\ (x,v)\"\nusing obtain_fresh_z\nby metis thus ?thesis\nusing subst_tv.simps *\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wt_Goto:\n \"\\ 0 \\ int pc + i; nat (int pc + i) < size \\s; size \\s \\ mpc;\n P \\ \\s!pc \\' \\s ! nat (int pc + i) \\\n \\ P,T,mxs,mpc,[] \\ Goto i,pc :: \\s\"", "output": "by(clarsimp simp add: TC2.wt_defs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\exec_movesE:\n assumes \"\\exec_moves ci P t es h (stk, loc, pc, xcp) s'\"\n obtains \"exec_moves ci P t es h (stk, loc, pc, xcp) \\ h s'\" \"\\moves2 P h stk es pc xcp\"", "output": "using assms\nby(simp add: \\exec_moves_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hcomp_ide_cod [simp]:\n assumes \"natural_transformation A B F G \\\"\n shows \"(identity_functor.map B) o \\ = \\\"", "output": "proof - interpret \\: natural_transformation A B F G \\\nusing assms\nby auto show \"\\.B.map o \\ = \\\"\nusing \\.B.map_def \\.is_extensional\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AAss_\\execI2:\n \"\\exec_move ci P t e' h (stk, loc, pc, xcp) (stk', loc', pc', xcp')\n \\ \\exec_move ci P t (e\\e'\\ := e'') h ((stk @ [v]), loc, (length (compE2 e) + pc), xcp) ((stk' @ [v]), loc', (length (compE2 e) + pc'), xcp')\"", "output": "by(blast elim: \\exec_moveE intro: \\exec_moveI \\move2_\\moves2.intros exec_move_AAssI2 \\move2_stk_append)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\reds0r_map_Val:\n \"\\reds0r extTA P t h (map Val vs, xs) s' \\ s' = (map Val vs, xs)\"", "output": "proof assume \"\\reds0r extTA P t h (map Val vs, xs) s'\" thus \"s' = (map Val vs, xs)\"\nby induct auto\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Cond_\\execI3:\n \"\\exec_move ci P t e'' h (stk, loc, pc, xcp) (stk', loc', pc', xcp')\n \\ \\exec_move ci P t (if (e) e' else e'') h (stk, loc, Suc (Suc (length (compE2 e) + length (compE2 e') + pc)), xcp) (stk', loc', Suc (Suc (length (compE2 e) + length (compE2 e') + pc')), xcp')\"", "output": "by(blast elim: \\exec_moveE intro: \\exec_moveI \\move2_\\moves2.intros exec_move_CondI3)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\Red0_conv [iff]:\n \"\\Red0 P t h (e, es) (e', es') = (P,t \\0 \\e/es, h\\ -\\\\ \\e'/es', h\\ \\ \\Move0 P h (e, es))\"", "output": "by(simp add: \\Red0_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ALength_\\ExecrI:\n \"\\Exec_mover ci P t e h s s' \\ \\Exec_mover ci P t (e\\length) h s s'\"", "output": "by(induct rule: rtranclp_induct)(blast intro: rtranclp.rtrancl_into_rtrancl ALength_\\execI)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma type_less_x_OclAny [elim!]:\n \"\\ < OclAny \\\n (\\ = OclVoid \\ P) \\\n (\\ = Boolean \\ P) \\\n (\\ = Integer \\ P) \\\n (\\ = UnlimitedNatural \\ P) \\\n (\\ = Real \\ P) \\\n (\\ = String \\ P) \\\n (\\\\. \\ = Enum \\ \\ P) \\ \n (\\\\. \\ = \\\\\\\\<^sub>\\ \\ P) \\ P\"", "output": "unfolding less_basic_type_def\nby (induct rule: converse_tranclp_induct; auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sync_\\red1r_xt:\n \"\\red1gr uf P t h (e, xs) (e', xs') \\ \\red1gr uf P t h (sync\\<^bsub>V\\<^esub> (e) e2, xs) (sync\\<^bsub>V\\<^esub> (e') e2, xs')\"", "output": "by(induct rule: rtranclp_induct2)(auto intro: rtranclp.rtrancl_into_rtrancl Synchronized1Red1 \\move1Sync)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma instInp_0:\nassumes \\: \"\\ \\ ptrm (Suc 0)\" and \"t \\ trm\" and \"FvarsT t = {}\"\nshows \"instInp \\ t \\ ptrm 0\"", "output": "using assms\nby (intro instInp) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma While_\\ExectI1:\n \"\\Exec_movet ci P t c h s s' \\ \\Exec_movet ci P t (while (c) e) h s s'\"", "output": "by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl While_\\execI1)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma type_less_eq_x_Tuple_intro [intro]:\n \"\\ = Tuple \\ \\ subtuple (\\) \\ \\ \\ \\ \\ Tuple \\\"", "output": "using dual_order.strict_iff_order\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Block_\\ExectI_None:\n \"\\Exec_movet ci P t e h s s' \\ \\Exec_movet ci P t {V:T=None; e} h s s'\"", "output": "by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl Block_\\execI_None)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\red1t_inj_\\reds1t: \"\\red1gt uf P t h (e, xs) (e', xs') \\ \\reds1gt uf P t h (e # es, xs) (e' # es, xs')\"", "output": "by(induct rule: tranclp_induct2)(auto intro: tranclp.trancl_into_trancl List1Red1 \\moves1Hd)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Cond_\\red1t_xt:\n \"\\red1gt uf P t h (e, xs) (e', xs') \\ \\red1gt uf P t h (if (e) e1 else e2, xs) (if (e') e1 else e2, xs')\"", "output": "by(induct rule: tranclp_induct2)(auto intro: tranclp.trancl_into_trancl Cond1Red \\move1Cond)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Cond_\\ExectI1:\n \"\\Exec_movet ci P t e h s s' \\ \\Exec_movet ci P t (if (e) e1 else e2) h s s'\"", "output": "by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl Cond_\\execI1)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proposition3_4:\nassumes t: \"trans r\" and i: \"irrefl r\" and ld: \"LD' r \\ \\ \\1 \\2 \\3 \\1 \\2 \\3\"\nshows \"D r [\\] [\\] (\\1@\\2@\\3) (\\1@\\2@\\3)\"", "output": "using proposition3_4_step[OF t i] ld unfolding LD'_def D[OF assms(1,2)] dl_def dm_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\red0t_dom_lcl:\n assumes wwf: \"wwf_J_prog P\"\n shows \"\\red0t extTA P t h (e, xs) (e', xs') \\ dom xs' \\ dom xs \\ fv e\"", "output": "by(rule \\red0r_dom_lcl[OF wwf])(rule tranclp_into_rtranclp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\reds1t_1step:\n \"\\ uf,P,t \\1 \\es, (h, xs)\\ [-\\\\] \\es', (h, xs')\\; \\moves1 P h es \\\n \\ \\reds1gt uf P t h (es, xs) (es', xs')\"", "output": "by(blast intro: tranclp.r_into_trancl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Cond_\\ExecrI3:\n \"\\Exec_mover ci P t e2 h (stk, loc ,pc, xcp) (stk', loc', pc', xcp') \\\n \\Exec_mover ci P t (if (e) e1 else e2) h (stk, loc, (Suc (Suc (length (compE2 e) + length (compE2 e1) + pc))), xcp) (stk', loc', (Suc (Suc (length (compE2 e) + length (compE2 e1) + pc'))), xcp')\"", "output": "by(induct rule: \\Execr_induct)(blast intro: rtranclp.rtrancl_into_rtrancl Cond_\\execI3)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma type_less_eq_x_OclAny [elim!]:\n \"\\ \\ OclAny \\\n (\\ = OclVoid \\ P) \\\n (\\ = OclAny \\ P) \\\n (\\ = Boolean \\ P) \\\n (\\ = Integer \\ P) \\\n (\\ = UnlimitedNatural \\ P) \\\n (\\ = Real \\ P) \\\n (\\ = String \\ P) \\\n (\\\\. \\ = Enum \\ \\ P) \\ \n (\\\\. \\ = \\\\\\\\<^sub>\\ \\ P) \\ P\"", "output": "by (drule le_imp_less_or_eq; auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ltl_\\inf_step2\\inf_step_table [simp]:\n \"\\ lNone tls \\ ltl (\\inf_step2\\inf_step_table s tls) =\n (let (s', s'') = SOME (s', s''). s -\\\\* s' \\ s' -lhd tls\\ s'' \\ \\ \\move s' (lhd tls) s'' \\ s'' -\\-ltl tls\\* \\\n in \\inf_step2\\inf_step_table s'' (ltl tls))\"", "output": "unfolding \\inf_step2\\inf_step_table_def Let_def\nby(simp add: split_beta)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma down_cast_type':\nassumes isOclAny: \"\\ \\ (X::OclAny) .oclIsTypeOf(OclAny)\"\nand non_None: \"\\ \\ (\\ X)\"\nshows \"\\ \\ not (\\ (X .oclAsType(Person)))\"", "output": "by(rule foundation15[THEN iffD1], simp add: down_cast_type[OF assms])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\Exec_movet_\\Exec_metht:\n \"\\Exec_movet ci P t e = \\Exec_metht ci (compP2 P) (compE2 e) (compxE2 e 0 0) t\"", "output": "by(simp only: \\exec_move_conv_\\exec_meth)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma type_less_x_Integer [elim!]:\n \"\\ < Integer \\\n (\\ = OclVoid \\ P) \\\n (\\ = UnlimitedNatural \\ P) \\ P\"", "output": "unfolding less_basic_type_def\nby (induct rule: converse_tranclp_induct; auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma BinOp_\\red0r_xt1:\n \"\\red0r extTA P t h (e1, xs) (e1', xs') \\ \\red0r extTA P t h (e1 \\bop\\ e2, xs) (e1' \\bop\\ e2, xs')\"", "output": "by(induct rule: rtranclp_induct2)(auto intro: rtranclp.rtrancl_into_rtrancl BinOpRed1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Cond_\\ExecrI1:\n \"\\Exec_mover ci P t e h s s' \\ \\Exec_mover ci P t (if (e) e1 else e2) h s s'\"", "output": "by(induct rule: rtranclp_induct)(blast intro: rtranclp.rtrancl_into_rtrancl Cond_\\execI1)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma NewArray_\\red0r_xt:\n \"\\red0r extTA P t h (e, xs) (e', xs') \\ \\red0r extTA P t h (newA T\\e\\, xs) (newA T\\e'\\, xs')\"", "output": "by(induct rule: rtranclp_induct2)(auto intro: rtranclp.rtrancl_into_rtrancl NewArrayRed)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma match_ex_table_eq_NoneI [simp]:\n \"\\x \\ set xtab. \\ matches_ex_entry P C pc x \\\n match_ex_table P C pc xtab = None\"", "output": "using match_ex_table_app[where ?xt = \"[]\"]\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pred_gpv'_mono' [mono]:\n \"pred_gpv' A C R gpv \\ pred_gpv' A' C' R gpv\"\n if \"\\x. A x \\ A' x\" \"\\x. C x \\ C' x\"", "output": "using that unfolding pred_gpv'.simps\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_ground_cls_mono: \"C \\# D \\ is_ground_cls D \\ is_ground_cls C\"", "output": "unfolding is_ground_cls_def\nby (metis set_mset_mono subsetD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subcls1D:\n \"P \\ C \\\\<^sup>1 D \\ \\fs ms Bs. (class P C = Some (Bs,fs,ms)) \\ (D \\ baseClasses Bs)\"", "output": "by(auto elim: subcls1.cases)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem iter_unfold: \"c\\<^sup>\\ = nil \\ c;c\\<^sup>\\\"", "output": "using iter_def iter_step_mono lfp_unfold\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma redundancy_and_semantics : \n assumes \"redundant C S\"\n assumes \"validate_formula I S\"\n shows \"validate_clause I C\"", "output": "by (meson assms redundant_def subsumption_and_semantics tautologies_are_valid validate_formula.elims)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rbt_comp_minus: assumes c: \"comparator c\"\n shows \"rbt_comp_minus c = ord.rbt_minus (lt_of_comp c)\"", "output": "by (intro ext, unfold rbt_comp_minus_def ord.rbt_minus_def, auto simp: rbt_comp_simps[OF c])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CConcEnd2[rule_format]: \n \"x \\ dom (C a) \\ C (list2FWpolicy (xs @ [a])) x = C a x\" (is \"?P xs\")", "output": "apply (rule_tac P = ?P in list2FWpolicy.induct)\nby (auto simp:C.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hn_refine_nofailI: \n assumes \"nofail a \\ hn_refine \\ c \\' R a\" \n shows \"hn_refine \\ c \\' R a\"", "output": "using assms\nby (auto simp: hn_refine_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wt_jvm_prog_impl_wt_instr:\n \"\\ wf_jvm_prog\\<^bsub>\\\\<^esub> P; \n P \\ C sees M:Ts \\ T = \\(mxs,mxl\\<^sub>0,ins,xt)\\ in C; pc < size ins \\ \n \\ P,T,mxs,size ins,xt \\ ins!pc,pc :: \\ C M\"", "output": "apply (unfold wf_jvm_prog_phi_def)\napply (drule (1) sees_wf_mdecl)\napply (simp add: wf_mdecl_def wt_method_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma class_wf: \n \"\\class P C = Some c; wf_prog wf_md P\\ \\ wf_cdecl wf_md P (C,c)\"", "output": "apply (unfold wf_prog_def class_def)\napply (fast dest: map_of_SomeD) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_subc_put':\n \\new_term c s \\ subc_term c s (substt t u m) = subc_term c s (substt t (subc_term c s u) m)\\\n \\new_term c s \\ subc_list c s (substts l u m) = subc_list c s (substts l (subc_term c s u) m)\\", "output": "by (induct t and l rule: subc_term.induct subc_list.induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma aform_err_leI:\n \"y \\ aform_err e (c, d)\"\n if \"y \\ aform_err e (c, d')\" \"d' \\ d\"", "output": "using that\nby (auto simp: aform_err_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filterlim_int_sequentially [tendsto_intros]:\n \"filterlim int at_top sequentially\"", "output": "unfolding filterlim_at_top\nproof fix C :: int show \"eventually (\\n. int n \\ C) at_top\"\nusing eventually_ge_at_top[of \"nat \\C\\\"]\nby eventually_elim linarith\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma f2: \"foo outs_gpv outs_gpv gpv gpv' C C' \\\n x \\ set_spmf (the_gpv gpv) \\ y \\ set_spmf (the_gpv gpv') \\\n a \\ generat_conts x \\ b \\ generat_conts y \\ R' a' \\ \\ R' \\ b' \\ \n foo outs_gpv outs_gpv (a a') (b b') C C'\"", "output": "by (fastforce elim: generat.set_cases intro: outs_gpv.Cont)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma identity_rules_mono:\n assumes \"C\\<^sub>1 \\ C\\<^sub>2\"\n shows \"identity_rules C\\<^sub>1 \\ identity_rules C\\<^sub>2\"", "output": "using assms unfolding identity_rules_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma compP2_has_method [simp]: \"compP2 P \\ C has M \\ P \\ C has M\"", "output": "by(auto simp add: compP2_def compP_has_method)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sees_field_decl_above:\n \"P \\ C sees F:T in D \\ P \\ C \\\\<^sup>* D\"", "output": "apply(auto simp:sees_field_def)\napply(blast intro: has_fields_decl_above map_of_SomeD map_of_remap_SomeD) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma F_is_essentially_surjective:\n shows \"essentially_surjective_functor D C F\"", "output": "using GF.G_is_essentially_surjective\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_shift_times_monom:\n \"poly_shift n (monom c n * p) = smult c p\"", "output": "by (intro poly_eqI) (auto simp: coeff_monom_mult coeff_poly_shift)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma correctCompositionKeys_subcomp1:\nassumes \"correctCompositionKeys C\"\n and \"x \\ subcomponents C\" \n and \"xb \\ specKeys C\"\nshows \"\\ x \\ subcomponents C. (xb \\ specKeys x)\"", "output": "using assms\nby (simp add: correctCompositionKeys_def, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subseteq_guards_While:\n \"\\c''. c=While b c'' \\ (c'' \\\\<^sub>g c')\" if \"c \\\\<^sub>g While b c'\"", "output": "using that\nby cases simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma covering_space_locally_path_connected:\n fixes p :: \"'a::real_normed_vector \\ 'b::real_normed_vector\"\n assumes \"locally path_connected C\" \"covering_space C p S\"\n shows \"locally path_connected S\"", "output": "using assms covering_space_locally_path_connected_eq\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HomContraMor:\n assumes \"LSCategory C\" and \"f \\ Mor C\" \n shows \"(Hom\\<^bsub>C\\<^esub>[\\,X]) ## f = HomC\\<^bsub>C\\<^esub>[f,X]\"", "output": "by(simp add: HomFtorContra_def HomFtorContra'_def MakeFtor_def assms OppositeCategory_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gtrp_preserve: \n assumes A: \"((s,c),w,(s',c'))\\trcl (gtrp T)\" \n and INIT: \"P (add_mset s c)\" \n and PRES: \"!!s c s' c' e. \\P (add_mset s c); ((s,c),e,(s',c'))\\T\\ \n \\ P (add_mset s' c')\" \n shows \"P (add_mset s' c')\"", "output": "proof - from gtr_preserve[OF gtrp2gtr[OF A], where P=P, OF INIT] PRES show \"P (add_mset s' c')\"\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HomFtorContraDom: \"CatDom (Hom\\<^bsub>C\\<^esub>[\\,X]) = Op C\"", "output": "by(simp add: HomFtorContra_def HomFtorContra'_def MakeFtor_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma modelAppendTautology:\nassumes\n \"model valuation F\" \"clauseTautology c\"\n \"vars valuation \\ vars F \\ vars c\"\nshows\n \"model valuation (F @ [c])\"", "output": "using assms\nusing tautologyInTotalValuation[of \"c\" \"valuation\"]\nby (auto simp add: formulaTrueAppend)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma find_closest_pair_eq_val_find_closest_pair_tm:\n \"val (find_closest_pair_tm (c\\<^sub>0, c\\<^sub>1) ps) = find_closest_pair (c\\<^sub>0, c\\<^sub>1) ps\"", "output": "by (induction \"(c\\<^sub>0, c\\<^sub>1)\" ps arbitrary: c\\<^sub>0 c\\<^sub>1 rule: find_closest_pair.induct) (auto simp: Let_def find_closest_bf_eq_val_find_closest_bf_tm take_eq_val_take_tm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exec_Suc:\n \"\\ P \\ c \\ c'; P \\ c' \\^n c'' \\ \\ P \\ c \\^(Suc n) c''\"", "output": "by (fastforce simp del: split_paired_Ex)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma essential_classD2:\n \"essential_class C \\ x \\ C \\ (x, y) \\ acc \\ y \\ C\"", "output": "unfolding essential_class_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rassocl_inverse: \"lassocr\\<^sub>C \\ rassocl\\<^sub>C = 1\\<^sub>C\"", "output": "unfolding rassocl\\<^sub>C_def lassocr\\<^sub>C_def\napply(simp add: comp_converter_map1_out comp_converter_map_converter2 comp_converter_id_right)\napply(subst map_converter_id_move_right)\napply(simp add: o_def id_def[symmetric]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma replace_in_g_dist:\n assumes \"x' \\ x\" \n shows \"replace_in_g ((x, b,c) #\\<^sub>\\ G) x' c'' = ((x, b,c) #\\<^sub>\\ (replace_in_g G x' c''))\"", "output": "using replace_in_g.simps assms\nby presburger"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iter_isolate2: \"c;c\\<^sup>\\;d \\ c\\<^sup>\\ = c;c\\<^sup>\\;d\"", "output": "by (metis infiter_unfold iter_isolate seq_assoc seq_inf_distrib)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in object_model) attribute_closest:\n \"attribute \\ attr \\ \\ \\\n owned_attribute \\' attr \\ \\\n \\ \\ \\' \\ \\ \\' < \\\"", "output": "by (meson attribute_not_closest.intros closest_attribute.cases unique_closest_attribute.cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eventually_nonzero_const [eventually_nonzero_simps]:\n \"eventually_nonzero F (\\_::_::linorder. c) \\ F = bot \\ c \\ 0\"", "output": "unfolding eventually_nonzero_def\nby (auto simp add: eventually_False)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pw_INF_nofail [refine_pw_simps]: \"nofail (Inf (f ` C)) \\ (\\x\\C. nofail (f x))\"", "output": "using pw_Inf_nofail [of \"f ` C\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eval_Fields_conv:\n \"Predicate.eval (Fields_i_i_o P C) = (\\FDTs. P \\ C has_fields FDTs)\"", "output": "by(auto intro: Fields_i_i_oI elim: Fields_i_i_oE intro!: ext)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma system_components_to_blp:\n \"(\\ trusted SINVAR_BLPtrusted.default_node_properties \\\n security_level (system_components_to_blp c) \\ security_level SINVAR_BLPtrusted.default_node_properties)\n \\\n c = SystemBoundaryOutput \\ c = SystemBoundaryInputOutput\"", "output": "by(cases c)(simp_all add: SINVAR_BLPtrusted.default_node_properties_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma class_add_classes_above:\nassumes ns: \"\\ is_class P C\" and \"\\P \\ D \\\\<^sup>* C\"\nshows \"classes_above (class_add P (C, cdec)) D = classes_above P D\"", "output": "using assms\nby(auto intro: class_add_subcls class_add_subcls_rev)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\nBisT_matchC_TMC_rev: \"\\ c d. c \\T d \\ matchC_TMC BisT d c\"\nand \nBisT_matchT_TMT_rev: \"\\ c d. c \\T d \\ matchT_TMT d c\"", "output": "using BisT_step BisT_sym unfolding sym_def\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cons_cluster_has_ne_slices:\n assumes \"is_cons_cluster C\" and \"p\\C\"\n and \"Sl \\ slices p\" \n shows \"Sl \\ {}\"", "output": "using assms unfolding is_cons_cluster_def quorum_of_set_def quorum_of_def quorum_def\nby (metis empty_iff inf_bot_left inf_bot_right subset_refl)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem closest_pair_dist:\n assumes \"1 < length ps\" \"distinct ps\" \"(c\\<^sub>0, c\\<^sub>1) = closest_pair ps\"\n shows \"sparse (dist c\\<^sub>0 c\\<^sub>1) (set ps)\"", "output": "using assms closest_pair_rec_dist[of \"mergesort fst ps\"] closest_pair_rec_c0_c1[of \"mergesort fst ps\"]\nby (auto simp: sorted_fst_def mergesort closest_pair_simps split: prod.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma produces_imp_Max_literal: \"produces C A \\ A = atm_of (Max_mset C)\"", "output": "using productive_imp_produces_Max_literal\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mem_closed_if_AE_lebesgue: \"closed C \\ (AE x in lebesgue. x \\ C) \\ x \\ C\"", "output": "using mem_closed_if_AE_lebesgue_open[OF open_UNIV]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma less_eq_Max_atms_of: \"C \\ {#} \\ C \\ D \\ Max (atms_of C) \\ Max (atms_of D)\"", "output": "unfolding atms_of_def\nby (metis Max_atm_of_set_mset_commute leq_imp_less_eq_atm_of less_eq_Max_lit less_eq_multiset_empty_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subcls1I: \"\\class C = Some m; super m = D; C \\ Object\\ \\ C\\C1D\"", "output": "apply (unfold subcls1_def)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma producesD: \"produces C A \\ C \\ N \\ C \\ {#} \\ Pos A = Max_mset C \\ \\ interp C \\ C \\ S C = {#}\"", "output": "unfolding production_unfold\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lcr_trans_l: \n assumes \"locally_compatible_r R1 R2 (A + B) (C + D) (E + F)\"\n shows \"locally_compatible_r R1 R2 A C E\"", "output": "using assms[unfolded locally_compatible_r_def, rule_format] unfolding locally_compatible_r_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_subtypes_aux: \n assumes \"CT \\ C <: Da\" \n and \"C \\ Da\" \n and \"CT C = Some CDef\" \n and \"cSuper CDef = D\"\n shows \"CT \\ D <: Da\"", "output": "using assms\nby (induct rule:subtyping.induct) (auto intro:subtyping.intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma classes_above_has_field2:\n \"\\ classes_above P C \\ classes_changed P P' = {};\n P' \\ C has F,b:t in C' \\\n \\ P \\ C has F,b:t in C'\"", "output": "by(auto intro: classes_above_has_field dest: classes_above_classes_changed_sym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poincare_map_in_planeI:\n assumes \"returns_to (plane n c) x0\"\n shows \"poincare_map (plane n c) x0 \\ n = c\"", "output": "using poincare_map_returns[OF assms]\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma collinear_inv_rotation:\n assumes \"collinear (Ax, Ay) (Bx, By) (Cx, Cy)\" and \"c\\<^sup>2 + s\\<^sup>2 = 1\"\n shows \"collinear (Ax * c - Ay * s, Ay * c + Ax * s)\n (Bx * c - By * s, By * c + Bx * s) (Cx * c - Cy * s, Cy * c + Cx * s)\"", "output": "using assms\nby (algebra add: collinear_def split_def fst_conv snd_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lin_minus: \n assumes \"locally_included R1 R2 A C\"\n shows \"locally_included R1 R2 (A - B) (C - D)\"", "output": "using assms unfolding locally_included_def\nby (meson in_diffD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in PolynRg) pol_SOME_2:\"p \\ carrier R \\\n pol_coeff S (SOME c. cf_sol R S X p c) \\ \n p = polyn_expr R X (fst (SOME c. cf_sol R S X p c))\n (SOME c. cf_sol R S X p c)\"", "output": "apply (frule pol_SOME_1[of p])\napply (simp add:cf_sol_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma widen_Class_Class [iff]: \"(G\\Class C\\ Class D) = (G\\C\\C D)\"", "output": "apply (rule iffI)\napply (ind_cases \"G\\Class C \\ Class D\")\napply (auto elim: widen.subcls) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Scheduler_L4:\nassumes \"Scheduler C activation\"\n and \"(t mod cycleLength C) mem (schedule C)\"\nshows \"activation t = [t mod cycleLength C]\"", "output": "using assms\nby (simp add: Scheduler_def Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stable_constrains_Un: \n \"[| F \\ stable C; F \\ A co (C \\ A') |] ==> F \\ (C \\ A) co (C \\ A')\"", "output": "by (unfold stable_def constrains_def, blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma singleDSourceLoop:\n assumes \"DAcc i C = {S}\"\n and \"DAcc i S = {C}\"\n shows \"\\ Z \\ (AbstrLevel i). (Z \\ S \\ Z \\ C \\ C \\ (Sources i Z))\"", "output": "using assms\nby (metis AccSigleLoop Acc_SourcesNOT empty_iff insert_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma If_starD: \"(IF b THEN c1 ELSE c2, s) \\* (c,t) \\\n c = IF b THEN c1 ELSE c2 \\ (c1,s) \\* (c,t) \\ (c2,s) \\* (c,t)\"", "output": "by(induction \"IF b THEN c1 ELSE c2\" s c t rule: star_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma the_gpv_parametric':\n \"(rel_gpv'' A C R ===> rel_spmf (rel_generat A C (R ===> rel_gpv'' A C R))) the_gpv the_gpv\"", "output": "by(rule rel_funI)(auto elim: rel_gpv''.cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Goto_correct:\n\"\\ wf_prog wt G; \n method (G,C) sig = Some (C,rT,maxs,maxl,ins,et); \n ins ! pc = Goto branch; \n wt_instr (ins!pc) G rT (phi C sig) maxs (length ins) et pc; \n Some state' = exec (G, None, hp, (stk,loc,C,sig,pc)#frs) ; \n G,phi \\JVM (None, hp, (stk,loc,C,sig,pc)#frs)\\ \\ \n\\ G,phi \\JVM state'\\\"", "output": "apply (clarsimp simp add: defs2)\napply fast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_bochner_integral_scaleR_left[intro]:\n \"(c \\ 0 \\ has_bochner_integral M f x) \\ has_bochner_integral M (\\x. f x *\\<^sub>R c) (x *\\<^sub>R c)\"", "output": "by (cases \"c = 0\") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_scaleR_left])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wadjust_loop_on_left_moving_Bk_via_erase[simp]: \"\\wadjust_loop_erase m rs (c, Bk # list); c \\ []\\ \\ \n wadjust_loop_on_left_moving m rs (tl c, hd c # Bk # list)\"", "output": "apply(case_tac \"hd c\", simp_all add:wadjust_loop_on_left_moving.simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fields_rec_lemma: \"[|class G C = Some (D,fs,ms); wf ((subcls1 G)\\)|] ==>\n fields (G,C) = \n map (\\(fn,ft). ((fn,C),ft)) fs @ (if C = Object then [] else fields (G,D))\"", "output": "apply (unfold fields_def)\napply (simp split del: if_split)\napply (erule (1) class_rec_lemma [THEN trans])\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CB_rel: \"Fr_2 \\ \\ \\ \\<^bold>\\ \\\\<^sub>B \\\"", "output": "using Br_fr_def Cl_br_def Cl_fr_def Fr_2_def unfolding equal_op_def conn\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in ring) exists_core_chain:\n assumes \"C \\ Chains (relation_of (\\) \\)\" obtains C' where \"C' \\ extensions\" and \"C = law_restrict ` C'\"", "output": "using Chains_relation_of[OF assms]\nby (meson subset_image_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in PolynRg) low_deg_terms_zero1:\"pol_coeff S c \\ \n polyn_expr R X ((fst c) + j) (ext_cf S j c) = \n (X^\\<^bsup>R j\\<^esup>) \\\\<^sub>r (polyn_expr R X (fst c) c)\"", "output": "by (cases c) (simp add: low_deg_terms_zeroTr)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CHECK_monadic_CHECK_refine[refine]:\n assumes \"ci \\ ESPEC (\\e'. (e',e)\\ER \\ \\c) (\\r. r \\ c)\"\n assumes \"(ei,e)\\ER\"\n shows \"CHECK_monadic ci ei \\\\\\<^sub>E ER unit_rel (CHECK c e)\"", "output": "using assms\nby (auto simp: pw_ele_iff refine_pw_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma singular_relboundary_imp_chain:\n \"singular_relboundary p X S c \\ singular_chain p X c\"", "output": "unfolding singular_relboundary singular_chain_subtopology\nby (blast intro: singular_chain_add singular_chain_boundary_alt)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma if_eval_elim':\n \"\\ \\If e c\\<^sub>1 c\\<^sub>2, mds, mem\\ \\ \\c', mds', mem'\\ \\ \\\n ((c' = c\\<^sub>1 \\ ev\\<^sub>B mem e) \\ (c' = c\\<^sub>2 \\ \\ ev\\<^sub>B mem e)) \\ mds' = mds \\ mem' = mem\"", "output": "using if_eval_elim [where annos = \"[]\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma widen_Class_Class: \"G\\Class C\\ Class cm \\ G\\C\\\\<^sub>C cm\"", "output": "apply (ind_cases \"G\\Class C\\ Class cm\")\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma synthetic_div_correct': \"[:-c, 1:] * synthetic_div p c + [:poly p c:] = p\"\n for c :: \"'a::comm_ring_1\"", "output": "using synthetic_div_correct [of p c]\nby (simp add: algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma siso_Done[simp]:\n\"siso Done\"", "output": "proof- { fix c :: \"('test, 'atom, 'choice) cmd\" assume \"c = Done\" hence \"siso c\"\napply induct\nby auto } thus ?thesis\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma period_eq:\n assumes \"C \\ UNIV // communicating\" \"x \\ C\"\n shows \"period C = Gcd (period_set x)\"", "output": "unfolding period_def\nusing assms\nby (rule_tac someI2[where a=\"Gcd (period_set x)\"]) (auto intro!: Gcd_period_set_invariant irreducibleD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_letter_code [code]:\n \"is_letter c \\\n CHR ''a'' \\ c \\ c \\ CHR ''z'' \\\n CHR ''A'' \\ c \\ c \\ CHR ''Z'' \\\n CHR ''0'' \\ c \\ c \\ CHR ''9'' \\\n c \\ set ''_&;:-''\"", "output": "by (cases c) (simp add: is_letter_def letters_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cet_cast_real_int: \"\\ \\\\<^sub>c e : INTEG \\ \\ \\\\<^sub>c \\e\\\\<^sub>c : REAL\"", "output": "by (intro cet_op[where t = INTEG]) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eval_constraint_sat_eq: \"wf_tuple n A x \\ fv_trm t1 \\ A \\ fv_trm t2 \\ A \\\n \\i\\A. i < n \\ eval_constraint (t1, p, c, t2) x =\n Formula.sat \\ V (map the x) i (formula_of_constraint (t1, p, c, t2))\"", "output": "by (induction \"(t1, p, c, t2)\" rule: formula_of_constraint.induct) (simp_all add: meval_trm_eval_trm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in flowgraph) ntr_mon_increasing_s: \n \"(c,ee,c')\\ntr fg \\ mon_c fg c \\ mon_c fg c'\"", "output": "by (erule gtrE) (auto dest: ntrs_mon_increasing_s simp add: mon_c_unconc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma concls_of_inferences_between_eq_Bin_ord_resolve_rename:\n \"concls_of (inference_system.inferences_between (ord_FO_\\ S) Q C) =\n Bin_ord_resolve_rename C C \\ (\\D \\ Q. Bin_ord_resolve_rename C D \\ Bin_ord_resolve_rename D C)\"", "output": "by (subst inferences_between_eq_UNION) (auto simp: image_Un image_UN concls_of_inferences_between_singleton_eq_Bin_ord_resolve_rename)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sbis_pres_discr_R:\nassumes \"discr c\" and \"c \\s d\"\nshows \"discr d\"", "output": "using assms Sbis_pres_discr_L Sbis_sym\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma expands_to_ln:\n fixes C L :: \"'a :: multiseries\"\n assumes trimmed: \"trimmed_pos (MS (MSLCons (C, e) xs) g)\" and basis: \"basis_wf (b # basis)\"\n assumes F: \"(f expands_to MS (MSLCons (C, e) xs) g) (b # basis)\"\n assumes L: \"((\\x. ln (h x) + e * ln (b x)) expands_to L) basis\"\n and h: \"eval C = h\"\n shows \"((\\x. ln (f x)) expands_to MS\n (MSLCons (L, 0) (times_ms_aux (scale_shift_ms_aux (inverse C, - e) xs)\n (powser_ms_aux' (ln_series_stream_aux False 1) \n (scale_shift_ms_aux (inverse C, - e) xs)))) (\\x. ln (f x))) (b # basis)\"", "output": "using is_expansion_aux_expands_to[OF F] assms\nby (auto simp: expands_to.simps intro!: ln_ms_aux)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem c_has_periodic_orbit:\n obtains y where \"c.periodic_orbit y\" \"c.flow0 y ` UNIV \\ trapC\"", "output": "proof - from c.poincare_bendixson_applied[OF compact_trapC _ nonempty_trapC positively_invariant_trapC regular_trapC] show ?thesis\nusing that\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closed_ccpo: \"closed A \\ (\\C. chain C \\ C \\ {} \\ C \\ A \\ Sup C \\ A)\"", "output": "unfolding closed_def open_ccpo\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma YFtorNTApp1: assumes \"X \\ Obj (NTCatDom (YFtorNT C f))\" shows \"(YFtorNT C f) $$ X = Hom\\<^bsub>C\\<^esub>[X,f]\"", "output": "proof- have \"(YFtorNT C f) $$ X = (YFtorNT' C f) $$ X\"\nusing assms\nby (simp add: MakeNTApp YFtorNT_def) thus ?thesis\nby (simp add: YFtorNT'_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interp_imp_INTERP: \"C \\ D \\ interp D \\ C \\ INTERP \\ C\"", "output": "using INTERP_def interp_subseteq_INTERP interp_imp_general linear\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strip_while: fixes f :: \"'a acom \\ 'a acom\"\nassumes \"\\C. strip (f C) = strip C\" and \"while_option P f C = Some C'\"\nshows \"strip C' = strip C\"", "output": "using while_option_rule[where P = \"\\C'. strip C' = strip C\", OF _ assms(2)]\nby (metis assms(1))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nextElem_notin[simp]: \"a \\ set as \\ nextElem as c a = c\"", "output": "by(erule nextElem_append[where ys = \"[]\", simplified])"} {"instruct": "Given a lemma, please prove it.", "input": "theorem finite_char_subset: \\subset_closed C \\ C \\ mk_finite_char C\\", "output": "unfolding mk_finite_char_def subset_closed_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma no_step_final: \n assumes step: \"\\ \\(c,s) \\ (c',s')\"\n shows \"final (c,s) \\ P\"", "output": "using step\nby induct (auto simp add: final_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chamber_facet_is_chamber_facet:\n \"\\ chamber C; chamber D; z\\C; z\\D \\ \\ z\\D\"", "output": "using finite_chamber finite_facetrel_card chamber_card[of C]\nby (fastforce intro: facetrelI_cardSuc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stage:\n shows \"Ifm bs (stage p d (e,c)) = (\\ j\\{1 .. c*d}. Ifm bs (\\ p c (Add e (C j))))\"", "output": "by (unfold stage_def split_def ,simp only: evaldjf_ex simpfm) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma smult_cancel[simp]:\n fixes c :: \"'a :: idom\"\n shows \"smult c f = smult c g \\ c = 0 \\ f = g\"", "output": "proof- have l: \"smult c f = [:c:] * f\"\nby simp have r: \"smult c g = [:c:] * g\"\nby simp show ?thesis unfolding l r mult_cancel_left\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Scheduler_L3:\nassumes \"Scheduler C activation\"\n and \"(t mod cycleLength C) mem (schedule C)\"\nshows \"activation t \\ []\"", "output": "using assms\nby (simp add: Scheduler_def Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Norm_cmult:\n \"Norm N (c *\\<^sub>R x) = abs c * Norm N x\"", "output": "unfolding Norm_def unfolding eNorm_cmult\nby (simp add: enn2real_mult)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma init_config_implies_InvTempJustified: \"init_config c \\ InvTempJustified c\"", "output": "unfolding init_config_def InvTempJustified_def\nusing justified_add_records[OF justified_empty]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_inv_chart: \"continuous (at x within X) (inv_chart c)\" if \"x \\ codomain c\"", "output": "apply (rule continuous_at_imp_continuous_within)\nusing continuous_on_codomain[of c] that at_within_codomain[OF that]\nby (auto simp: continuous_on_eq_continuous_within)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem SubstTermP_Const: \"{ConstP c, TermP t} \\ SubstTermP \\Var w\\ t c c\"", "output": "proof - obtain s::name and k::name where \"atom s \\ (c,t,w,k)\" \"atom k \\ (c,t,w)\"\nby (metis obtain_fresh) thus ?thesis\nby (auto simp: CTermP.simps [of k s c] SeqConstP_imp_SubstTermP)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strip_step: \"strip(step S C) = strip C\"", "output": "by (induction C arbitrary: S) (auto simp: step_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma leastI[intro]:\nassumes \"subgraph S (G:: ('l, 'c) labeled_graph)\"\n \"\\ C :: ('l, 'x) labeled_graph. consequence_graph Rs C \\ maintained (S,G) C\"\n shows \"least (t:: 'x itself) Rs S G\"", "output": "using assms unfolding least_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma DERIV_cdivide:\n \"(f has_field_derivative D) (at x within s) \\\n ((\\x. f x / c) has_field_derivative D / c) (at x within s)\"", "output": "using DERIV_cmult_right[of f D x s \"1 / c\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_components_unions_complement: \"c \\ components s \\ s - c = \\(components s - {c})\"", "output": "by (metis complement_connected_component_unions components_def components_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma negligible_multc: \"negligible (\\\\. f \\ * c) \\ negligible f \\ c = 0\"", "output": "by(subst mult.commute)(simp add: negligible_cmult)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nhop_addpreRT [simp]:\n fixes rt pre ip dip\n assumes \"dip \\ kD rt\"\n shows \"nhop (the (addpreRT rt dip pre)) ip = nhop rt ip\"", "output": "unfolding sqn_def addpreRT_def\nusing assms [THEN kD_Some]\nby (clarsimp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rt_graph_not_dip_trans [dest]:\n \"\\ip ip' \\ dip. (ip, ip') \\ (rt_graph \\ dip)\\<^sup>+ \\ ip \\ dip\"", "output": "by (erule converse_tranclE) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nsqn_sqn_def:\n \"\\rt dip. nsqn rt dip = (if flag rt dip = Some val \\ sqn rt dip = 0\n then sqn rt dip else sqn rt dip - 1)\"", "output": "unfolding nsqn_def sqn_def\nby (clarsimp split: option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vD_Some [dest]:\n fixes dip rt\n assumes \"dip \\ vD rt\"\n shows \"\\dsn dsk hops nhip pre.\n \\\\<^bsub>route\\<^esub>(rt, dip) = Some (dsn, dsk, val, hops, nhip, pre)\"", "output": "using assms unfolding vD_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rt_fresher_update_other [simp]:\n assumes inkD: \"dip\\kD(rt)\"\n and \"dip \\ ip\"\n shows \"rt \\\\<^bsub>dip\\<^esub> update rt ip r\"", "output": "using assms unfolding update_def\nby (clarsimp split: option.split) (fastforce)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nhop_update [simp]: \"\\rt dip dsn dsk flg hops sip.\n rt \\ update rt dip (dsn, dsk, flg, hops, sip, {})\n \\ the (nhop (update rt dip (dsn, dsk, flg, hops, sip, {})) dip) = sip\"", "output": "unfolding update_def sqnf_def\nby (clarsimp split: option.splits if_split_asm) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rt_graph_vD [dest]:\n \"\\ip ip' \\ dip. (ip, ip') \\ rt_graph \\ dip \\ dip \\ vD(rt (\\ ip))\"", "output": "unfolding rt_graph_def vD_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sqnf_invalidate [simp]:\n \"\\dip. sqnf (invalidate (rt \\) (dests \\)) dip = sqnf (rt \\) dip\"", "output": "unfolding sqnf_def invalidate_def\nby (clarsimp split: option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma val_nsqn_sqn [elim, simp]:\n assumes \"ip\\kD(rt)\"\n and \"the (flag rt ip) = val\"\n shows \"nsqn rt ip = sqn rt ip\"", "output": "using assms unfolding nsqn_sqn_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invalidate_other [simp]:\n fixes rt dests dip\n assumes \"dip\\dom(dests)\"\n shows \"invalidate rt dests dip = rt dip\"", "output": "using assms unfolding invalidate_def\nby (clarsimp split: option.split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nsqn_quality_increases [elim]:\n assumes \"i\\kD(rt \\)\"\n and \"quality_increases \\ \\'\"\n shows \"nsqn (rt \\) i \\ nsqn (rt \\') i\"", "output": "using assms\nby (rule kD_nsqn_quality_increases [THEN conjunct2])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rt_fresherE [elim]:\n assumes \"rt1 \\\\<^bsub>dip\\<^esub> rt2\"\n and \"dip \\ kD(rt1)\"\n and \"dip \\ kD(rt2)\"\n and \"\\ nsqn rt1 dip < nsqn rt2 dip \\ \\ P rt1 rt2 dip\"\n and \"\\ nsqn rt1 dip = nsqn rt2 dip;\n the (dhops rt1 dip) \\ the (dhops rt2 dip) \\ \\ P rt1 rt2 dip\"\n shows \"P rt1 rt2 dip\"", "output": "using assms(1) unfolding rt_fresher_def2 [OF assms(2-3)]\nusing assms(4-5)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iD_nsqn_sqn [elim, simp]:\n assumes \"ip\\iD(rt)\"\n shows \"nsqn rt ip = sqn rt ip - 1\"", "output": "proof - from \\ip\\iD(rt)\\ have \"ip\\kD(rt)\" and \"the (flag rt ip) = inv\"\nby auto thus ?thesis ..\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sqnf_update_another [simp]:\n fixes dip ip rt dsn dsk flag hops nhip pre\n assumes \"ip \\ dip\"\n shows \"sqnf (update rt dip (dsn, dsk, flag, hops, nhip, pre)) ip = sqnf rt ip\"", "output": "using assms unfolding update_def sqnf_def\nby (clarsimp split: option.splits) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vD_or_iD [elim]:\n fixes ip rt\n assumes \"ip\\kD(rt)\"\n and \"ip\\vD(rt) \\ P rt ip\"\n and \"ip\\iD(rt) \\ P rt ip\"\n shows \"P rt ip\"", "output": "proof - from \\ip\\kD(rt)\\ have \"ip\\vD(rt) \\ iD(rt)\"\nby (simp add: kD_is_vD_and_iD) thus ?thesis\nby (auto elim: assms(2-3))\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma kD_addpreRT [simp]:\n fixes rt dip npre\n assumes \"dip \\ kD rt\"\n shows \"kD (the (addpreRT rt dip npre)) = kD rt\"", "output": "unfolding kD_def addpreRT_def\nusing assms [THEN kD_Some]\nby clarsimp blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma update_kno_dsn_greater_zero:\n \"\\rt dip ip dsn hops npre. 1 \\ dsn \\ 1 \\ (sqn (update rt dip (dsn, kno, val, hops, ip, npre)) dip)\"", "output": "unfolding update_def\nby (clarsimp split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nhop_update_another [simp]:\n fixes dip ip rt dsn dsk flag hops nhip\n assumes \"ip \\ dip\"\n shows \"nhop (update rt dip (dsn, dsk, flag, hops, nhip)) ip = nhop rt ip\"", "output": "using assms unfolding update_def\nby (clarsimp split: option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flag_update [simp]: \"\\rt dip dsn flg hops sip.\n rt \\ update rt dip (dsn, kno, flg, hops, sip, {})\n \\ the (flag (update rt dip (dsn, kno, flg, hops, sip, {})) dip) = flg\"", "output": "unfolding update_def\nby (clarsimp split: option.split if_split_asm) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rt_graph_not_dip_trans [dest]:\n \"\\ip ip' \\ dip. (ip, ip') \\ (rt_graph \\ dip)\\<^sup>+ \\ ip \\ dip\"", "output": "by (erule converse_tranclE) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nsqn_invalidate_other [simp]:\n assumes \"dip\\kD(rt)\"\n and \"dip\\dom dests\"\n shows \"nsqn (invalidate rt dests) dip = nsqn rt dip\"", "output": "using assms\nby (clarsimp simp add: kD_nsqn)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invalidate_other [simp]:\n fixes rt dests dip\n assumes \"dip\\dom(dests)\"\n shows \"invalidate rt dests dip = rt dip\"", "output": "using assms unfolding invalidate_def\nby (clarsimp split: option.split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sqn_update [simp]: \"\\rt dip dsn flg hops sip.\n rt \\ update rt dip (dsn, kno, flg, hops, sip, {})\n \\ sqn (update rt dip (dsn, kno, flg, hops, sip, {})) dip = dsn\"", "output": "unfolding update_def\nby (clarsimp split: option.split if_split_asm) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma quality_increasesI [intro!]:\n assumes \"\\dip. dip \\ kD(rt \\) \\ dip \\ kD(rt \\')\"\n and \"\\dip. \\ dip \\ kD(rt \\); dip \\ kD(rt \\') \\ \\ rt \\ \\\\<^bsub>dip\\<^esub> rt \\'\" \n and \"\\dip. sqn (rt \\) dip \\ sqn (rt \\') dip\"\n shows \"quality_increases \\ \\'\"", "output": "unfolding quality_increases_def\nusing assms\nby clarsimp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nsqn\\<^sub>r_invalidate [simp]:\n assumes \"dip\\kD(rt)\"\n and \"dip\\dom(dests)\"\n shows \"nsqn\\<^sub>r (the (invalidate rt dests dip)) = the (dests dip) - 1\"", "output": "using assms unfolding invalidate_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sqnf_update [simp]: \"\\rt dip dsn dsk flg hops sip.\n rt \\ update rt dip (dsn, dsk, flg, hops, sip)\n \\ sqnf (update rt dip (dsn, dsk, flg, hops, sip)) dip = dsk\"", "output": "unfolding update_def sqnf_def\nby (clarsimp split: option.splits if_split_asm) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sqn_invalidate_not_in_dests [simp]:\n fixes dests dip rt\n assumes \"dip\\dom(dests)\"\n shows \"sqn (invalidate rt dests) dip = sqn rt dip\"", "output": "using assms unfolding sqn_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nsqn_quality_increases_dhops [elim]:\n assumes \"i\\kD(rt \\)\"\n and \"quality_increases \\ \\'\"\n and \"nsqn (rt \\) i = nsqn (rt \\') i\"\n shows \"the (dhops (rt \\) i) \\ the (dhops (rt \\') i)\"", "output": "using assms unfolding quality_increases_def\nby (clarsimp) (drule(1) bspec, clarsimp simp: rt_fresher_def2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rt_graph_vD [dest]:\n \"\\ip ip' \\ dip. (ip, ip') \\ rt_graph \\ dip \\ dip \\ vD(rt (\\ ip))\"", "output": "unfolding rt_graph_def vD_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma getNonWatchedUnfalsifiedLiteralNoneCharacterization:\nfixes clause :: Clause and w1 :: Literal and w2 :: Literal and M :: LiteralTrail\nassumes \n \"getNonWatchedUnfalsifiedLiteral clause w1 w2 M = None\"\nshows \n \"\\ l. l el clause \\ l \\ w1 \\ l \\ w2 \\ literalFalse l (elements M)\"", "output": "using assms\nby (induct clause) (auto split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in weak_partial_order) weak_complete_latticeI:\n assumes sup_exists:\n \"!!A. [| A \\ carrier L |] ==> \\s. least L s (Upper L A)\"\n and inf_exists:\n \"!!A. [| A \\ carrier L |] ==> \\i. greatest L i (Lower L A)\"\n shows \"weak_complete_lattice L\"", "output": "by standard (auto intro: sup_exists inf_exists)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma less_length_takeWhile_conv: \"i < length (takeWhile P l) \\ (i (\\j\\i. P (l!j)))\"", "output": "apply safe subgoal\nusing length_takeWhile_le less_le_trans\nby blast subgoal\nby (metis dual_order.strict_trans2 nth_mem set_takeWhileD takeWhile_nth) subgoal\nby (meson less_le_trans not_le_imp_less nth_length_takeWhile) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sift_up_step:\n fixes heap::\"int \\ int\"\n assumes \n \"is_heap_except_up (\\) heap l r x\"\n \"parent l x \\ l\" \n \"(heap x) \\ (heap (parent l x))\"\n shows \"is_heap_except_up (\\) (swap heap (parent l x) x) l r (parent l x)\"", "output": "using assms sift_up_step_aux1 sift_up_step_aux2 unfolding is_heap_except_up_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma one_time_pad: \"map_spmf ((\\) x) (spmf_of_set (carrier L)) = spmf_of_set (carrier L)\"\n if \"x \\ carrier L\"", "output": "apply(subst map_spmf_of_set_inj_on)\napply(rule inj_on_xor[OF that])\nby(simp add: surj_xor that)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LIM_fun_less_zero: \"f \\c\\ l \\ l < 0 \\ \\r. 0 < r \\ (\\x. x \\ c \\ \\c - x\\ < r \\ f x < 0)\"\n for f :: \"real \\ real\"", "output": "by (drule LIM_D [where r=\"-l\"]) force+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma satL_snvL_transE[simp]:\nassumes wtL: \"Ik.wtL l\" and \\: \"I.wtE \\\"\nand pL: \"\\ \\. infTp \\ \\ (\\ x \\ nvL l. tpOfV x \\ \\)\" and \"Ik.satL (transE \\) l\"\nshows \"I.satL \\ l\"", "output": "using assms\nby (cases l) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \n heap_parent_le: \"\\heap_invar l; valid l i; has_parent l i\\ \n \\ pparent l i \\ prio_of l i\"", "output": "unfolding heap_invar_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma n_meet_L_0_below_0_meet_L:\n \"(x \\ L) * bot \\ x * bot \\ L\"", "output": "by (meson inf.boundedE inf.boundedI mult_right_sub_dist_inf_left zero_right_mult_decreasing)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PrefixListHasTail:\nfixes \n l1 :: \"'a list\" and\n l2 :: \"'a list\"\nassumes\n \"prefixList l1 l2\"\nshows\n \"\\ l . l2 = l1 @ l \\ l \\ []\"", "output": "using assms\nby (induct rule: prefixList.induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma min_satisfying_None:\n \"min_satisfying P l = None \\ \n (\\ x \\ set l. \\ P x)\"", "output": "unfolding min_satisfying_def Let_def\nby (simp add: filter_empty_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Inf_aform_aform_of_ivl:\n assumes \"l \\ u\"\n shows \"Inf_aform (aform_of_ivl l u) = l\"", "output": "using assms\nby (auto simp: Inf_aform_def aform_of_ivl_def tdev_pdevs_of_ivl abs_diff_eq1 algebra_simps) (metis field_sum_of_halves scaleR_add_left scaleR_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tr_filter_empty [simp]: \"tr_filter l {} = l\"", "output": "by (induct l) (auto simp: filter_chan_set_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invpst_baliR: \"invpst l \\ invpst r \\ invpst (baliR l a r)\"", "output": "by (cases \"(l,a,r)\" rule: baliR.cases) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma emb_injective:\n assumes L: \"J \\ L\" \"L \\ I\" and X: \"X \\ sets (Pi\\<^sub>M J M)\" and Y: \"Y \\ sets (Pi\\<^sub>M J M)\"\n shows \"emb L J X = emb L J Y \\ X = Y\"", "output": "by (intro antisym emb_preserve_mono[OF L X Y] emb_preserve_mono[OF L Y X]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma left_gpv_Inl_transfer: \"rel_gpv'' (=) (\\l r. l = Inl r) (\\l r. l = Inl r) (left_gpv gpv) gpv\"", "output": "by(coinduction arbitrary: gpv) (auto simp add: spmf_rel_map generat.rel_map del: rel_funI intro!: rel_spmf_reflI generat.rel_refl_strong rel_funI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma foldli_bex_aux: \n \"distinct (map fst l) \\ foldli l (\\x. \\x) (\\x _. P x) b \n \\ b \\ op_map_bex (map_of l) P\"", "output": "apply (induct l arbitrary: b)\napply simp\napply (force simp: map_to_set_map_of image_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reps_\\[intro]:\n assumes \"(l, R) \\ \\\"\n shows \"reps (l, R) = (l, SOME u. u \\ R)\"", "output": "using assms unfolding reps_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\\\<^sub>P_leftderives: \"a \\ \\\\<^sub>P \\ \\ b. leftderives [\\] (a@b)\"", "output": "by (metis \\\\<^sub>P_derives \\\\<^sub>P_is_word derives_implies_leftderives_gen)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gap_relabel_aux_refine: \n assumes [simp]: \"C = card V\" \"l_invar l\"\n shows \"gap_relabel_aux C f l u \\ gap_relabel f l u\"", "output": "unfolding gap_relabel_aux_def gap_relabel_def relabel_def gap_relabel_effect_def l_get_def\napply (simp only: Let_def nres_monad_laws)\napply refine_vcg\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Lim_transform_within_set_eq:\n fixes a :: \"'a::metric_space\" and l :: \"'b::metric_space\"\n shows \"eventually (\\x. x \\ S \\ x \\ T) (at a)\n \\ ((f \\ l) (at a within S) \\ (f \\ l) (at a within T))\"", "output": "by (force intro: Lim_transform_within_set elim: eventually_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_compl_induct[case_names Nil Cons]: \"\\P []; !! e l . \\!! ll . length ll <= length l \\ P ll\\ \\ P (e#l)\\ \\ P l\"", "output": "apply(induct_tac l rule: length_induct)\napply(case_tac \"xs\")\napply(auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dec_first_on_right_moving_Bk_nonempty[simp]: \n \"dec_first_on_right_moving n (as, am) (s, l, Bk # xs) ires \\ l \\ []\"", "output": "apply(auto simp: dec_first_on_right_moving.simps split: if_splits) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bottom_weak_eq:\n \"\\ b \\ carrier L; \\ x. x \\ carrier L \\ b \\ x \\ \\ b .= \\\"", "output": "by (metis bottom_closed bottom_lower weak_le_antisym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma as_top_autoref[autoref_rules]:\n assumes \"(l,l')\\\\R\\as_rel\"\n assumes \"SIDE_PRECOND (l' \\ [])\"\n shows \"(as_top l,(OP last ::: \\R\\as_rel \\ R)$l')\\R\"", "output": "using assms\nby (simp add: as_top_refine)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in lower_semilattice) meet_assoc:\n assumes L: \"x \\ carrier L\" \"y \\ carrier L\" \"z \\ carrier L\"\n shows \"(x \\ y) \\ z = x \\ (y \\ z)\"", "output": "using weak_meet_assoc L unfolding eq_is_equal ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma neg_in_filterD: \"Neg A \\# {#L \\l \\'. L \\# mset D#} \\ \\A0. Neg A0 \\# mset D \\ A = A0 \\a \\'\"", "output": "unfolding subst_lit_def image_def\nby (rule neg_in_map_literalD) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma non_empty_projection_on_subset: \"X \\ Y \\ l\\<^sub>1 \\ Y = l\\<^sub>2 \\ Y \\ l\\<^sub>1 \\ X = l\\<^sub>2 \\ X\"", "output": "by (metis projection_subset_eq_from_superset_eq subset_Un_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fresh_distinct_list:\n assumes \"atom ` S \\* l\"\n shows \"S \\ set l = {}\"", "output": "using assms\nby (metis disjoint_iff_not_equal fresh_list_elem fresh_star_def image_eqI not_self_fresh)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma while_mult_L:\n \"(x * L) \\ z = z \\ x * L\"", "output": "by (metis sup_bot_right mult_left_zero while_denest_5 while_one_top while_productstar while_sumstar)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma arg_max_list_element:\n assumes \"length l \\ 1\" shows \"arg_max_list f l \\ set l\"", "output": "by (metis One_nat_def arg_max_list.simps arg_min_list_in assms le_imp_less_Suc less_irrefl list.size(3))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ias_delete_abs1: \"k ias_of_list (l[k := False]) = ias_of_list l - {k}\"", "output": "unfolding ias_of_list_def[abs_def]\nby (auto simp: nth_list_update)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LIM_fun_not_zero: \"f \\c\\ l \\ l \\ 0 \\ \\r. 0 < r \\ (\\x. x \\ c \\ \\c - x\\ < r \\ f x \\ 0)\"\n for f :: \"real \\ real\"", "output": "using LIM_fun_gt_zero[of f l c] LIM_fun_less_zero[of f l c]\nby (auto simp: neq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ackloop_dom: \"ackloop_dom l\"", "output": "by (induction l rule: acklist.induct) (auto simp: ackloop_dom_longer)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pfa_length_rule[sep_heap_rules]: \"\n \n pfa_length a\n <\\r. is_pfa c l a * \\(r=length l)>\"", "output": "by (sep_auto simp: pfa_length_def arl_length_def is_pfa_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_poincare_line_not_trough_zero_not_trough_infty [simp]:\n assumes \"is_poincare_line l\"\n assumes \"0\\<^sub>h \\ circline_set l\"\n shows \"\\\\<^sub>h \\ circline_set l\"", "output": "using assms\nusing is_poincare_line_inverse_point[OF assms(1), of \"\\\\<^sub>h\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma append_sublist_1: \n assumes \"subseq (l1 @ l2) l\"\n shows \"subseq l1 l \\ subseq l2 l\"", "output": "using assms sublist_append_back sublist_append_front sublist_trans\nby blast \\ \\NOTE added lemma (eventually wasn't needed in the remaining\nproofs).\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invc_baldR: \"\\invc l; invc2 r; color l = Black\\ \\ invc (baldR l a r)\"", "output": "by (induct l a r rule: baldR.induct) (simp_all add: invc_baliL)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma imp_graph_vars:\n assumes \"(l, l') \\ imp_graph cnf\" \n shows \"var l \\ vars_of_cnf cnf\"", "output": "using assms unfolding imp_graph_def vars_of_cnf_def\napply (clarsimp elim!: rev_bexI) subgoal for x\nby(cases x)(auto split: uprod_split_asm if_split_asm) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_length_hint3: \nassumes \"length l = Suc 0\"\nshows \"l \\ []\"", "output": "using assms\nby (metis Zero_neq_Suc list.size(3))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma succ_imp_graph_correct: \n \"finite cnf \\ succ_imp_graph cnf l = {l'. (l, l') \\ imp_graph cnf}\"", "output": "by(induction rule: finite_induct)(auto split: succs_of_clause_split simp add: succ_imp_graph_alt_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma type_l_nosupp[simp]:\n fixes x::x and l::l\n shows \"atom x \\ supp (\\ z : b | [[z]\\<^sup>v]\\<^sup>c\\<^sup>e == [[l]\\<^sup>v]\\<^sup>c\\<^sup>e \\)\"", "output": "using supp_at_base supp_l_empty ce.supp(1) c.supp \\.supp\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Idl_subset_eq_dvd: \"Idl\\<^bsub>\\\\<^esub> {k} \\ Idl\\<^bsub>\\\\<^esub> {l} \\ l dvd k\"", "output": "by (subst int_Idl_subset_ideal) (auto simp: dvd_def int_Idl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma INF_Lim:\n fixes X :: \"nat \\ 'a::{complete_linorder,linorder_topology}\"\n assumes dec: \"decseq X\"\n and l: \"X \\ l\"\n shows \"(INF n. X n) = l\"", "output": "using LIMSEQ_INF[OF dec] tendsto_unique[OF trivial_limit_sequentially l]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma se_succs_states :\n assumes \"se c l c1\"\n assumes \"se c l c2\"\n shows \"states c1 = states c2\"", "output": "using assms se_mono_for_states_eq\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_set_lvars [simp]: \"\\ s. set_lvars l (set_lvars l' s) = set_lvars l s\"", "output": "apply (simp (no_asm_simp) only: split_tupled_all)\napply (simp (no_asm)) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invc_baldL: \"\\invc2 l; invc r; color r = Black\\ \\ invc (baldL l a r)\"", "output": "by (induct l a r rule: baldL.induct) (auto simp: invc_baliR invc2I mkNode_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bheight_baliR:\n \"bheight l = bheight r \\ bheight (baliR l a r) = Suc (bheight l)\"", "output": "by (induct l a r rule: baliR.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dec_check_right_move_nonempty[simp]: \"dec_check_right_move (as, am) (s, l, r) ires\\ l \\ []\"", "output": "apply(auto simp: dec_check_right_move.simps split: if_splits) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unique_append: \"unique l' \\ unique l \\\n (\\(x,y) \\ set l. \\(x',y') \\ set l'. x' \\ x) \\ unique (l @ l')\"", "output": "by (induct l) (auto dest: fst_in_set_lemma)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma line_left_inter_1: \n assumes \"P \\ line_ext l\" and \"P \\ line_ext m\"\n shows \"line (inter l m) P = l\"", "output": "by (metis CollectD CollectI assms(1) assms(2) incidA_lAB incidB_lAB incid_inter_left incid_inter_right line_ext_def uniq_inter)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_call_simps [simp]:\n \"\\l fg p. not_call ({l}\\fg\\ p)\"\n \"\\l fa p. not_call ({l}\\fa\\ p)\"\n \"\\p1 p2. not_call (p1 \\ p2)\"\n \"\\l fip fmsg p q. not_call ({l}unicast(fip, fmsg).p \\ q)\"\n \"\\l fmsg p. not_call ({l}broadcast(fmsg).p)\"\n \"\\l fips fmsg p. not_call ({l}groupcast(fips, fmsg).p)\"\n \"\\l fmsg p. not_call ({l}send(fmsg).p)\"\n \"\\l fdata p. not_call ({l}deliver(fdata).p)\"\n \"\\l fmsg p. not_call ({l}receive(fmsg).p)\"\n \"\\l pn. \\(not_call (call(pn)))\"", "output": "unfolding not_call_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invh_baldR_invc:\n \"\\ invh l; invh r; bheight l = bheight r + 1; invc l \\\n \\ invh (baldR l a r) \\ bheight (baldR l a r) = bheight l\"", "output": "by(induct l a r rule: baldR.induct) (auto simp: invh_baliL bheight_baliL invh_paint bheight_paint_Red)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma DropToShift:\nfixes\n l i list\nassumes\n \"l + i < length list\"\nshows\n \"(drop l list) ! i = list ! (l + i)\"", "output": "using assms\nby (induct l, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bst_baliL:\n \"\\bst l; bst r; \\x\\set_tree l. x < a; \\x\\set_tree r. a < x\\\n \\ bst (baliL l a r)\"", "output": "by(cases \"(l,a,r)\" rule: baliL.cases) (auto simp: ball_Un)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma label_tree_simps [simp]:\n \"label_tree (Leaf x) = pure Leaf \\ fresh\"\n \"label_tree (Node l r) = pure Node \\ label_tree l \\ label_tree r\"", "output": "by(simp_all add: label_tree_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma toTree_correct[simp]:\n \"ft_invar (toTree l)\"\n \"toList (toTree l) = l\"", "output": "apply (induct l)\napply (simp add: ft_invar_def)\napply simp\napply (simp add: toTree_def lcons_list lcons_inv)\napply (simp add: toTree_def lcons_list lcons_inv) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma real_of_1_0:\n assumes \"invariant_1 (p,l,r)\"\n shows [simp]: \"the_unique_root (p,l,r) = 0 \\ r = 0\"\n and [dest]: \"l = 0 \\ r = 0\"\n and [intro]: \"r = 0 \\ l = 0\"", "output": "using assms\nby (auto simp: sgn_0_0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma size_rotateR[simp]:\n \"l \\ Leaf \\ size(rotateR l a r) = size l + size r + 1\"", "output": "by(induction l a r rule: rotateR.induct) (auto simp: not_Leaf_if_not_single simp del: rot2.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filter_eq_snocD: \"filter P l = l'@[x] \\ x\\set l \\ P x\"", "output": "proof - assume A: \"filter P l = l'@[x]\" hence \"x\\set (filter P l)\"\nby simp thus ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma plugInLinear :\n assumes lLength : \"length L>var\"\n assumes nonzero : \"B\\0\"\n assumes hb : \"\\v. insertion (nth_default 0 (list_update L var v)) b = B\"\n assumes hc : \"\\v. insertion (nth_default 0 (list_update L var v)) c = C\"\n shows \"aEval (Eq(b*Var var + c)) (list_update L var (-C/B))\"", "output": "by(simp add: lLength insertion_add insertion_mult nonzero hb hc insertion_var)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem flit_of_hlit_hlit_of_flit [simp]:\n assumes \"ground\\<^sub>l l\"\n shows \"flit_of_hlit (hlit_of_flit l) = l\"", "output": "using assms\nby (cases l) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mem_imp_less_HMSet: \"k \\# L \\ k < HMSet L\"", "output": "by (induct k arbitrary: L) (auto intro: ex_gt_imp_less_multiset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nfoldli_map: \"nfoldli (map f l) ctd g s = nfoldli l ctd (g o f) s\"", "output": "apply (induction l arbitrary: s)\nby (auto simp: pw_eq_iff refine_pw_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extender_deeper: \"F \\ extender k S \\ k \\ l \\ F \\ extender l S\"", "output": "using extender_Sucset le_Suc_eq\nby(induction l) (auto simp del: extender.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lower_asymptotic_density_eq_upper:\n assumes \"lower_asymptotic_density A = l\" \"upper_asymptotic_density A = l\"\n shows \"(\\n. card(A \\ {.. l\"", "output": "apply (rule limsup_le_liminf_real)\nusing upper_asymptotic_density_in_01(1)[of A] lower_asymptotic_density_in_01(1)[of A] assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_bal_r_bal:\n \"is_bal l \\ is_bal r \\ height r = height l + 2 \\ is_bal (r_bal\\<^sub>0 n l r)\"", "output": "by (cases r) (auto, auto split: tree\\<^sub>0.split) \\ \\separating the two auto's is just for speed\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma no_zero_height_Step_derivs: \"(M,l,s,0,ll,t):Step \\ False\"", "output": "by (insert no_zero_height_derivsAux2, fast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_calls[simp]: \"finite (calls l)\" and \"finite (callsC c)\" \"finite (callsV v)\"", "output": "by (induct rule: calls_callsC_callsV.induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mem_set_2:\nassumes \"a \\ set l\"\nshows \"a mem l\"", "output": "using assms\nby (metis (full_types) memS_def mem_memS_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma the_cat_parallel_ObjE:\n assumes \"a \\\\<^sub>\\ \\\\\\<^sub>C \\ \\ \\ \\\\Obj\\\"\n obtains \"a = \\\" | \"a = \\\"", "output": "using assms unfolding the_cat_parallel_components(1)\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_cf_adjunction) cf_adjunction_counit_NTMap_vrange: \n \"\\\\<^sub>\\ (\\\\<^sub>C \\\\NTMap\\) \\\\<^sub>\\ \\

\\Arr\\\"", "output": "by ( rule is_cf_adjunction.cf_adjunction_unit_NTMap_vrange[ OF is_cf_adjunction_op, unfolded cf_adjunction_unit_NTMap_op cat_op_simps ] )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_cat_equalizer) cat_eq_Comp_eq: \n \"\\ \\\\<^sub>A\\<^bsub>\\\\<^esub> \\\\NTMap\\\\\\\\<^sub>P\\<^sub>L\\ = \\ \\\\<^sub>A\\<^bsub>\\\\<^esub> \\\\NTMap\\\\\\\\<^sub>P\\<^sub>L\\\"\n \"\\ \\\\<^sub>A\\<^bsub>\\\\<^esub> \\\\NTMap\\\\\\\\<^sub>P\\<^sub>L\\ = \\ \\\\<^sub>A\\<^bsub>\\\\<^esub> \\\\NTMap\\\\\\\\<^sub>P\\<^sub>L\\\"", "output": "unfolding cat_eq_2_eps_NTMap_app[symmetric]\nby simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_iso_ntcf) iso_ntcf_is_arr_isomorphism':\n assumes \"a \\\\<^sub>\\ \\\\Obj\\\" \n and \"A = \\\\ObjMap\\\\a\\\"\n and \"B = \\\\ObjMap\\\\a\\\"\n shows \"\\\\NTMap\\\\a\\ : A \\\\<^sub>i\\<^sub>s\\<^sub>o\\<^bsub>\\\\<^esub> B\"", "output": "using assms\nby (auto intro: cat_arrow_cs_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cf_lcomp_ObjMap_app[cat_cs_simps]:\n assumes \"category \\ \\\" \n and \"\\ : \\ \\\\\\<^sub>C\\<^bsub>\\\\<^esub> \\\" \n and \"a \\\\<^sub>\\ \\\\Obj\\\" \n and \"c \\\\<^sub>\\ \\\\Obj\\\"\n shows \"cf_lcomp \\ \\ \\\\ObjMap\\\\a, c\\\\<^sub>\\ = \\\\ObjMap\\\\\\\\ObjMap\\\\a\\, c\\\\<^sub>\\\"", "output": "using assms unfolding cf_lcomp_def\nby (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros cat_prod_cs_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cat_Set_components:\n shows \"cat_Set \\\\Obj\\ = Vset \\\"\n and \"cat_Set \\\\Arr\\ = set {T. arr_Set \\ T}\"\n and \"cat_Set \\\\Dom\\ = (\\T\\\\<^sub>\\set {T. arr_Set \\ T}. T\\ArrDom\\)\"\n and \"cat_Set \\\\Cod\\ = (\\T\\\\<^sub>\\set {T. arr_Set \\ T}. T\\ArrCod\\)\"\n and \"cat_Set \\\\Comp\\ =\n (\\ST\\\\<^sub>\\composable_arrs (dg_Set \\). ST\\0\\ \\\\<^sub>P\\<^sub>a\\<^sub>r ST\\1\\<^sub>\\\\)\"\n and \"cat_Set \\\\CId\\ = VLambda (Vset \\) id_Set\"", "output": "unfolding cat_Set_def dg_field_simps\nby (simp_all add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dghm_cn_cov_comp_ObjMap_vrange:\n assumes \"\\ : \\ \\<^sub>D\\<^sub>G\\\\\\<^bsub>\\\\<^esub> \\\" and \"\\ : \\ \\\\\\<^sub>D\\<^sub>G\\<^bsub>\\\\<^esub> \\\"\n shows \"\\\\<^sub>\\ ((\\ \\<^sub>D\\<^sub>G\\<^sub>H\\<^sub>M\\ \\)\\ObjMap\\) \\\\<^sub>\\ \\\\Obj\\\"", "output": "using assms\nby ( cs_concl cs_simp: dghm_cn_comp_components cs_intro: is_dghm.dghm_ObjMap_vrange V_cs_intros )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tm_ntcf_arrows_in_cf_arrows[cat_map_cs_intros]:\n assumes \"\\ \\\\<^sub>\\ tm_ntcf_arrows \\ \\ \\\"\n shows \"\\ \\\\<^sub>\\ ntcf_arrows \\ \\ \\\"", "output": "using assms tm_ntcf_arrows_vsubset_ntcf_arrows[of \\ \\ \\]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_tsE[elim]:\n assumes \"\\_ts \\ \\\"\n obtains \"\\_vfsequence \\ \\\"\n and \"2\\<^sub>\\ \\ vcard \\\"\n and \"\\A. A \\\\<^sub>\\ \\\\\\\\ \\ A \\\\<^sub>\\ \\\\\\\\\"\n and \"\\\\\\\\ \\\\<^sub>\\ \\\\\\\\\"\n and \"\\A B. A \\\\<^sub>\\ \\\\\\\\ \\ B \\\\<^sub>\\ \\\\\\\\ \\ A \\\\<^sub>\\ B \\\\<^sub>\\ \\\\\\\\\"\n and \"\\X. X \\\\<^sub>\\ \\\\\\\\ \\ \\\\<^sub>\\X \\\\<^sub>\\ \\\\\\\\\"", "output": "using assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cat_singleton_CId_app: \n assumes \"set {\\j, a\\} \\\\<^sub>\\ (\\\\<^sub>Ci\\\\<^sub>\\set {j}. \\)\\Obj\\\"\n shows \"(\\\\<^sub>Ci\\\\<^sub>\\set {j}. \\)\\CId\\\\set {\\j, a\\}\\ = set {\\j, \\\\CId\\\\a\\\\}\"", "output": "using assms unfolding cat_prod_components VLambda_vsingleton\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_tm_functor) tm_cf_ntcf_id_is_tm_ntcf':\n assumes \"\\' = \\\" and \"\\' = \\\"\n shows \"ntcf_id \\ : \\' \\\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>t\\<^sub>m \\': \\ \\\\\\<^sub>C\\<^sub>.\\<^sub>t\\<^sub>m\\<^bsub>\\\\<^esub> \\\"", "output": "unfolding assms(1,2)\nby (rule tm_cf_ntcf_id_is_tm_ntcf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in category) cat_cf_lcomp_Hom_ObjMap_vrange: \n assumes \"\\ : \\ \\\\\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n shows \"\\\\<^sub>\\ (Hom\\<^sub>O\\<^sub>.\\<^sub>C\\<^bsub>\\\\<^esub>\\(\\-,-)\\ObjMap\\) \\\\<^sub>\\ cat_Set \\\\Obj\\\"", "output": "using category_axioms assms unfolding cf_lcomp_Hom_def\nby (intro cf_cn_cov_lcomp_ObjMap_vrange) (cs_concl cs_intro: cat_cs_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_dghm) dghm_is_arr_HomCod: \n assumes \"f : a \\\\<^bsub>\\\\<^esub> b\"\n shows \"\\\\ArrMap\\\\f\\ \\\\<^sub>\\ \\\\Arr\\\" \"\\\\ObjMap\\\\a\\ \\\\<^sub>\\ \\\\Obj\\\" \"\\\\ObjMap\\\\b\\ \\\\<^sub>\\ \\\\Obj\\\"", "output": "using assms\nby (cs_concl cs_simp: dg_cs_simps cs_intro: dg_cs_intros)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_iso_functorD':\n assumes \"\\ : \\ \\\\\\<^sub>C\\<^sub>.\\<^sub>i\\<^sub>s\\<^sub>o\\<^bsub>\\\\<^esub> \\\"\n shows \"\\ : \\ \\\\\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n and \"v11 (\\\\ObjMap\\)\"\n and \"v11 (\\\\ArrMap\\)\"\n and \"\\\\<^sub>\\ (\\\\ObjMap\\) = \\\\Obj\\\"\n and \"\\\\<^sub>\\ (\\\\ArrMap\\) = \\\\Arr\\\"", "output": "by ( simp_all add: is_iso_functorD[OF assms(1)] is_iso_semifunctorD'(2-5)[ OF is_iso_functorD(2)[OF assms(1)], unfolded slicing_simps ] )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LK_\\23_NTMap_app_0[cat_Kan_cs_simps]:\n assumes \"a = 0\"\n shows \"LK_\\23 \\ \\' \\'\\NTMap\\\\a\\ = \\'\\NTMap\\\\0\\\"", "output": "using assms unfolding LK_\\23_components cat_ordinal_cs_simps\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_cat_obj_prod) is_cat_obj_coprod_op:\n \"op_ntcf \\ : A >\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>\\ P : I \\\\\\<^sub>C\\<^bsub>\\\\<^esub> op_cat \\\"", "output": "using cf_discrete_vdomain_vsubset_Vset\nby (intro is_cat_obj_coprodI) (cs_concl cs_simp: cat_op_simps cs_intro: cat_cs_intros cat_op_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_functor) is_functor_axioms'[cat_cs_intros]:\n assumes \"\\' = \\\" and \"\\' = \\\" and \"\\' = \\\"\n shows \"\\ : \\' \\\\\\<^sub>C\\<^bsub>\\'\\<^esub> \\'\"", "output": "unfolding assms\nby (rule is_functor_axioms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dghm_comp_ObjMap_vdomain[dg_cs_simps]:\n assumes \"\\ : \\ \\\\\\<^sub>D\\<^sub>G\\<^bsub>\\\\<^esub> \\\" and \"\\ : \\ \\\\\\<^sub>D\\<^sub>G\\<^bsub>\\\\<^esub> \\\"\n shows \"\\\\<^sub>\\ ((\\ \\\\<^sub>D\\<^sub>G\\<^sub>H\\<^sub>M \\)\\ObjMap\\) = \\\\Obj\\\"", "output": "using assms\nby ( cs_concl cs_simp: dghm_comp_components dg_cs_simps V_cs_simps cs_intro: is_dghm.dghm_ObjMap_vrange )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma category_cat_prod_3[cat_cs_intros]: \"category \\ (\\ \\\\<^sub>C\\<^sub>3 \\ \\\\<^sub>C\\<^sub>3 \\)\"", "output": "unfolding cat_prod_3_def\nby (rule pcat_category_cat_prod)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_semicategoryI'': \n assumes \"tiny_semicategory \\ \\\" and \"vfinite (\\\\Obj\\)\" and \"vfinite (\\\\Arr\\)\"\n shows \"finite_semicategory \\ \\\"", "output": "using assms\nby (intro finite_semicategoryI') (auto intro: smc_cs_intros smc_small_cs_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cf_bcomp_Hom_ObjMap_app[cat_cs_simps]:\n assumes \"\\ : \\ \\\\\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n and \"\\ : \\ \\\\\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n and \"[a, b]\\<^sub>\\ \\\\<^sub>\\ (op_cat \\ \\\\<^sub>C \\)\\Obj\\\"\n shows \"Hom\\<^sub>O\\<^sub>.\\<^sub>C\\<^bsub>\\\\<^esub>\\(\\-,\\-)\\ObjMap\\\\a, b\\\\<^sub>\\ = \n Hom\\<^sub>O\\<^sub>.\\<^sub>C\\<^bsub>\\\\<^esub>\\(-,-)\\ObjMap\\\\\\\\ObjMap\\\\a\\, \\\\ObjMap\\\\b\\\\\\<^sub>\\\"", "output": "using assms unfolding cf_bcomp_Hom_def\nby (rule cf_cn_cov_bcomp_ObjMap_app)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cat_obj_cf_comma_Cod_app[cat_comma_cs_simps]:\n assumes \"F = [baf, b'a'f', gh]\\<^sub>\\\" and \"F \\\\<^sub>\\ b \\\\<^sub>C\\<^sub>F \\\\Arr\\\"\n shows \"b \\\\<^sub>C\\<^sub>F \\\\Cod\\\\F\\ = b'a'f'\"", "output": "using assms(2) unfolding assms(1) cat_obj_cf_comma_def cat_comma_components\nby (simp add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cf_proj_snd_HomDom: \"\\\\<^sub>C\\<^sub>.\\<^sub>2 \\ \\\\HomDom\\ = \\ \\\\<^sub>C \\\"", "output": "unfolding cf_proj_snd_def cf_proj_components cat_prod_2_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in digraph) dg_Dom_app_in_Obj:\n assumes \"f \\\\<^sub>\\ \\\\Arr\\\"\n shows \"\\\\Dom\\\\f\\ \\\\<^sub>\\ \\\\Obj\\\"", "output": "using assms dg_Dom_vrange\nby (auto simp: Dom.vsv_vimageI2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bnt_proj_snd_is_iso_ntcf_if_is_iso_ntcf'[cat_cs_intros]:\n assumes \"category \\ \\\"\n and \"category \\ \\\"\n and \"\\ : \\ \\\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>i\\<^sub>s\\<^sub>o \\' : \\ \\\\<^sub>C \\ \\\\\\<^sub>C\\<^bsub>\\\\<^esub> \\\" \n and \"\\ = \\\\<^bsub>\\,\\\\<^esub>(a,-)\\<^sub>C\\<^sub>F\"\n and \"\\ = \\'\\<^bsub>\\,\\\\<^esub>(a,-)\\<^sub>C\\<^sub>F\"\n and \"\\' = \\\"\n and \"a \\\\<^sub>\\ \\\\Obj\\\"\n shows \"\\\\<^bsub>\\,\\\\<^esub>(a,-)\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F : \\ \\\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>i\\<^sub>s\\<^sub>o \\ : \\' \\\\\\<^sub>C\\<^bsub>\\\\<^esub> \\\"", "output": "unfolding assms(4-6)\nby (rule bnt_proj_snd_is_iso_ntcf_if_is_iso_ntcf[OF assms(1-3,7)])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma helper_I2_proj_fst_proj_snd_iff: \n \"(\\j\\\\<^sub>\\2\\<^sub>\\. \\'\\NTMap\\\\j\\ = \\\\NTMap\\\\j\\ \\\\<^sub>A\\<^bsub>\\\\<^esub> f') \\\n (proj_fst \\' = proj_fst \\ \\\\<^sub>A\\<^bsub>\\\\<^esub> f' \\ proj_snd \\' = proj_snd \\ \\\\<^sub>A\\<^bsub>\\\\<^esub> f')\"", "output": "unfolding two\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vequalizerD[dest]:\n assumes \"x \\\\<^sub>\\ vequalizer X f g\"\n shows \"x \\\\<^sub>\\ X\" and \"f\\ArrVal\\\\x\\ = g\\ArrVal\\\\x\\\"", "output": "using assms unfolding vequalizer_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma smc_FUNCT_Comp: \n \"smc_FUNCT \\ \\ \\\\Comp\\ =\n (\\\\\\\\\\<^sub>\\composable_arrs (smc_FUNCT \\ \\ \\). \\\\\\0\\ \\\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F\\<^bsub>\\,\\\\<^esub> \\\\\\1\\<^sub>\\\\)\"", "output": "unfolding smc_FUNCT_components smc_FUNCT_composable_arrs_dg_FUNCT .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma cat_1_components:\n shows \"cat_1 \\ \\\\Obj\\ = set {\\}\"\n and \"cat_1 \\ \\\\Arr\\ = set {\\}\"\n and \"cat_1 \\ \\\\Dom\\ = set {\\\\, \\\\}\"\n and \"cat_1 \\ \\\\Cod\\ = set {\\\\, \\\\}\"\n and \"cat_1 \\ \\\\Comp\\ = set {\\[\\, \\]\\<^sub>\\, \\\\}\"\n and \"cat_1 \\ \\\\CId\\ = set {\\\\, \\\\}\"", "output": "unfolding cat_1_def dg_field_simps\nby (simp_all add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_tm_functor) cf_obj_cf_comma_proj_is_tm_functor'[cat_comma_cs_intros]:\n assumes \"b \\\\<^sub>\\ \\\\Obj\\\" and \"\\' = b \\\\<^sub>C\\<^sub>F \\\"\n shows \"b \\<^sub>O\\\\<^sub>C\\<^sub>F \\ : \\' \\\\\\<^sub>C\\<^sub>.\\<^sub>t\\<^sub>m\\<^bsub>\\\\<^esub> \\\"", "output": "using assms(1) unfolding assms(2)\nby (rule cf_obj_cf_comma_proj_is_tm_functor)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ntcf_const_components:\n shows \"ntcf_const \\ \\ f\\NTMap\\ = vconst_on (\\\\Obj\\) f\"\n and \"ntcf_const \\ \\ f\\NTDom\\ = cf_const \\ \\ (\\\\Dom\\\\f\\)\"\n and \"ntcf_const \\ \\ f\\NTCod\\ = cf_const \\ \\ (\\\\Cod\\\\f\\)\"\n and \"ntcf_const \\ \\ f\\NTDGDom\\ = \\\"\n and \"ntcf_const \\ \\ f\\NTDGCod\\ = \\\"", "output": "unfolding ntcf_const_def nt_field_simps\nby (auto simp: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma the_cf_rKe_ObjMap_vrange: \n assumes \"\\c. c \\\\<^sub>\\ \\\\Obj\\ \\ lim_Obj c\\UObj\\ \\\\<^sub>\\ \\\\Obj\\\"\n shows \"\\\\<^sub>\\ (the_cf_rKe \\ \\ \\ lim_Obj\\ObjMap\\) \\\\<^sub>\\ \\\\Obj\\\"", "output": "unfolding the_cf_rKe_components'[OF \\ \\]\nby (intro vrange_VLambda_vsubset assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in category) cat_cf_Hom_snd_ObjMap_vdomain[cat_cs_simps]:\n assumes \"a \\\\<^sub>\\ \\\\Obj\\\"\n shows \"\\\\<^sub>\\ (Hom\\<^sub>O\\<^sub>.\\<^sub>C\\<^bsub>\\\\<^esub>\\(a,-)\\ObjMap\\) = \\\\Obj\\\"", "output": "using category_axioms assms unfolding cf_Hom_snd_def\nby (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros cat_op_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma frameImpResCommRight':\n fixes x :: name\n and xvec :: \"name list\"\n and F :: \"'b frame\"\n\n shows \"\\\\*xvec\\(\\\\x\\F) \\\\<^sub>F \\\\x\\(\\\\*xvec\\F)\"", "output": "by(induct xvec) (auto intro: frameImpResComm FrameStatImpTrans frameImpResPres)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_ntsmcfE':\n assumes \"\\ : \\ \\\\<^sub>S\\<^sub>M\\<^sub>C\\<^sub>F \\ : \\ \\\\\\<^sub>S\\<^sub>M\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n obtains \"\\ \\\"\n and \"vfsequence \\\"\n and \"\\ : \\ \\\\\\<^sub>S\\<^sub>M\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n and \"\\ : \\ \\\\\\<^sub>S\\<^sub>M\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n and \"vcard \\ = 5\\<^sub>\\\"\n and \"\\\\NTDom\\ = \\\"\n and \"\\\\NTCod\\ = \\\"\n and \"\\\\NTDGDom\\ = \\\"\n and \"\\\\NTDGCod\\ = \\\"\n and \"vsv (\\\\NTMap\\)\"\n and \"\\\\<^sub>\\ (\\\\NTMap\\) = \\\\Obj\\\"\n and \"\\a. a \\\\<^sub>\\ \\\\Obj\\ \\ \\\\NTMap\\\\a\\ : \\\\ObjMap\\\\a\\ \\\\<^bsub>\\\\<^esub> \\\\ObjMap\\\\a\\\"\n and \"\\a b f. f : a \\\\<^bsub>\\\\<^esub> b \\\n \\\\NTMap\\\\b\\ \\\\<^sub>A\\<^bsub>\\\\<^esub> \\\\ArrMap\\\\f\\ = \\\\ArrMap\\\\f\\ \\\\<^sub>A\\<^bsub>\\\\<^esub> \\\\NTMap\\\\a\\\"", "output": "using assms\nby (simp add: is_ntsmcfD')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bifunctor_flip_ArrMap_vsv[cat_cs_intros]: \n \"vsv (bifunctor_flip \\ \\ \\\\ArrMap\\)\"", "output": "unfolding bifunctor_flip_components\nby (rule fflip_vsv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_iso_dghm) iso_dghm_Arr_HomDom_if_Arr_HomCod[elim]:\n assumes \"g \\\\<^sub>\\ \\\\Arr\\\"\n obtains f where \"f \\\\<^sub>\\ \\\\Arr\\\" and \"g = \\\\ArrMap\\\\f\\\"", "output": "using assms ArrMap.vrange_atD iso_dghm_ArrMap_vrange\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_cat_obj_prod) cat_obj_prod_unique_cone':\n assumes \"\\' : P' <\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>c\\<^sub>o\\<^sub>n\\<^sub>e :\\: I A \\ : :\\<^sub>C I \\\\\\<^sub>C\\<^bsub>\\\\<^esub> \\\"\n shows \"\\!f'. f' : P' \\\\<^bsub>\\\\<^esub> P \\ (\\j\\\\<^sub>\\I. \\'\\NTMap\\\\j\\ = \\\\NTMap\\\\j\\ \\\\<^sub>A\\<^bsub>\\\\<^esub> f')\"", "output": "by ( rule cat_lim_unique_cone'[ OF assms, unfolded the_cat_discrete_components(1) ] )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in \\) \n M\\_Rel_arrow_lr_is_cat_Rel_arr_isomorphism'[cat_Rel_par_set_cs_intros]:\n assumes \"A \\\\<^sub>\\ cat_Rel \\\\Obj\\\" \n and \"B \\\\<^sub>\\ cat_Rel \\\\Obj\\\" \n and \"C \\\\<^sub>\\ cat_Rel \\\\Obj\\\"\n and \"A' = (A \\\\<^sub>\\ B) \\\\<^sub>\\ C\"\n and \"B' = A \\\\<^sub>\\ (B \\\\<^sub>\\ C)\"\n and \"\\' = cat_Rel \\\"\n shows \"M\\_Rel_arrow_lr A B C : A' \\\\<^sub>i\\<^sub>s\\<^sub>o\\<^bsub>\\'\\<^esub> B'\"", "output": "using assms(1-3) unfolding assms(4-6)\nby (rule M\\_Rel_arrow_lr_is_cat_Rel_arr_isomorphism)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bnt_proj_fst_components:\n shows \"(\\\\<^bsub>\\,\\\\<^esub>(-,b)\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F)\\NTMap\\ = (\\a\\\\<^sub>\\\\\\Obj\\. \\\\NTMap\\\\a, b\\\\<^sub>\\)\"\n and \"(\\\\<^bsub>\\,\\\\<^esub>(-,b)\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F)\\NTDom\\ = \\\\NTDom\\\\<^bsub>\\,\\\\<^esub>(-,b)\\<^sub>C\\<^sub>F\"\n and \"(\\\\<^bsub>\\,\\\\<^esub>(-,b)\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F)\\NTCod\\ = \\\\NTCod\\\\<^bsub>\\,\\\\<^esub>(-,b)\\<^sub>C\\<^sub>F\"\n and \"(\\\\<^bsub>\\,\\\\<^esub>(-,b)\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F)\\NTDGDom\\ = \\\"\n and \"(\\\\<^bsub>\\,\\\\<^esub>(-,b)\\<^sub>N\\<^sub>T\\<^sub>C\\<^sub>F)\\NTDGCod\\ = \\\\NTDGCod\\\"", "output": "unfolding bnt_proj_fst_def nt_field_simps\nby (simp_all add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in \\) vsnd_arrow_is_cat_Par_arr'[cat_rel_Par_set_cs_intros]:\n assumes \"A \\\\<^sub>\\ cat_Par \\\\Obj\\\" \n and \"B \\\\<^sub>\\ cat_Par \\\\Obj\\\"\n and \"AB = A \\\\<^sub>\\ B\"\n and \"B' = B\"\n and \"\\' = cat_Par \\\"\n shows \"vsnd_arrow A B : AB \\\\<^bsub>\\'\\<^esub> B'\"", "output": "using assms(1-2) unfolding assms(3-5)\nby (rule vsnd_arrow_is_cat_Par_arr)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in is_cat_lKe_preserves) is_cat_rKe_preserves_op'[cat_op_intros]:\n assumes \"\\' = op_cf \\\"\n and \"\\' = op_cf \\\"\n and \"\\' = op_cf \\\"\n and \"\\' = op_cf \\\"\n and \"\\' = op_cat \\\"\n and \"\\' = op_cat \\\"\n and \"\\' = op_cat \\\"\n and \"\\
' = op_cat \\
\"\n shows \"op_ntcf \\ :\n \\' \\\\<^sub>C\\<^sub>F \\' \\\\<^sub>C\\<^sub>F\\<^sub>.\\<^sub>r\\<^sub>K\\<^sub>e\\<^bsub>\\\\<^esub> \\' : \\' \\\\<^sub>C \\' \\\\<^sub>C (\\' : \\' \\\\\\<^sub>C \\
')\"", "output": "unfolding assms\nby (rule is_cat_rKe_preserves_op)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dghm_proj_fst_HomDom: \"\\\\<^sub>D\\<^sub>G\\<^sub>.\\<^sub>1 \\ \\\\HomDom\\ = \\ \\\\<^sub>D\\<^sub>G \\\"", "output": "unfolding dghm_proj_fst_def dghm_proj_components dg_prod_2_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\23_components:\n shows \"\\23\\ObjMap\\ = (\\a\\\\<^sub>\\cat_ordinal (2\\<^sub>\\)\\Obj\\. if a = 0 then 0 else 2\\<^sub>\\)\"\n and \"\\23\\ArrMap\\ =\n (\n \\f\\\\<^sub>\\cat_ordinal (2\\<^sub>\\)\\Arr\\.\n if f = [0, 0]\\<^sub>\\ \\ [0, 0]\\<^sub>\\\n | f = [0, 1\\<^sub>\\]\\<^sub>\\ \\ [0, 2\\<^sub>\\]\\<^sub>\\\n | f = [1\\<^sub>\\, 1\\<^sub>\\]\\<^sub>\\ \\ [2\\<^sub>\\, 2\\<^sub>\\]\\<^sub>\\\n | otherwise \\ 0\n )\"\n and [cat_Kan_cs_simps]: \"\\23\\HomDom\\ = cat_ordinal (2\\<^sub>\\)\"\n and [cat_Kan_cs_simps]: \"\\23\\HomCod\\ = cat_ordinal (3\\<^sub>\\)\"", "output": "unfolding \\23_def dghm_field_simps\nby (simp_all add: nat_omega_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma frameResComm':\n fixes x :: name\n and xvec :: \"name list\"\n and F :: \"'b frame\"\n\n shows \"\\\\x\\(\\\\*xvec\\F) \\\\<^sub>F \\\\*xvec\\(\\\\x\\F)\"", "output": "by(induct xvec) (auto intro: frameResComm FrameStatEqTrans frameResPres)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_right_inverseI:\n assumes \"g : b \\\\<^bsub>\\\\<^esub> a\" and \"f : a \\\\<^bsub>\\\\<^esub> b\" and \"f \\\\<^sub>A\\<^bsub>\\\\<^esub> g = \\\\CId\\\\b\\\"\n shows \"is_right_inverse \\ g f\"", "output": "using assms unfolding is_right_inverse_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma the_cat_discrete_Comp_vsv[cat_discrete_cs_intros]: \"vsv (:\\<^sub>C I\\Comp\\)\"", "output": "unfolding the_cat_discrete_components\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in \\) cat_CAT_is_arr_isomorphism_iff[cat_CAT_simps]: \n \"\\ : \\ \\\\<^sub>i\\<^sub>s\\<^sub>o\\<^bsub>cat_CAT \\\\<^esub> \\ \\ \\ : \\ \\\\\\<^sub>C\\<^sub>.\\<^sub>i\\<^sub>s\\<^sub>o\\<^bsub>\\\\<^esub> \\\"", "output": "using cat_CAT_is_arr_isomorphismI cat_CAT_is_arr_isomorphismD\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dghm_up_ArrMap_app_component[dg_cs_simps]: \n assumes \"a \\\\<^sub>\\ \\\\Arr\\\" and \"i \\\\<^sub>\\ I\"\n shows \"dghm_up I \\ \\ \\\\ArrMap\\\\a\\\\i\\ = \\ i\\ArrMap\\\\a\\\"", "output": "using assms unfolding dghm_up_components\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R_zero_one: \"x \\ Ref 0 1\"", "output": "proof - have \"H 0 x 1\"\nby (simp add: Hoare_def) thus ?thesis\nby (rule R2)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "theorem re_refine_aux2: \"gen_dfs \\\\(rel O \\ES\\simple_state_rel) a.a.it_dfs\"", "output": "proof - note re_refine_aux also note a.gen_dfs_refine finally show ?thesis\nby (simp add: conc_fun_chain del: graph_restrict_simps)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fn_not_fst:\n shows \"Fn x T A \\ Fst P\"", "output": "proof(transfer) fix x :: 'a and T A P show \"\\PFn x T A \\ PFst P\"\nproof(rule classical) assume \"\\\\PFn x T A \\ PFst P\" hence False\nusing fnE\nby fastforce thus ?thesis\nby blast\nqed\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma NOT_elementaryCompDD_sA8: \"\\ elementaryCompDD sA8\"", "output": "proof - have \"outSetCorelated data20 \\ outSetCorelated data21 = {}\"\nby (metis OUTfromV.simps(21) inf_bot_right outSetCorelatedEmpty1) thus ?thesis\nby (simp add: elementaryCompDD_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma msg_nonempty1:\n assumes h1:\"msg (Suc 0) a\" \n and h2:\"a t = aa # l\"\n shows \"l = []\"", "output": "proof - from h1 have \"length (a t) \\ Suc 0\"\nby (simp add: msg_def) from h2 and this show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exp_not_eq_zero [simp]: \"exp x \\ 0\"", "output": "proof have \"exp x * exp (- x) = 1\"\nby (simp add: exp_add_commuting[symmetric]) also assume \"exp x = 0\" finally show False\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unat_of_bl_128_16_le_helper: \"unat ((of_bl:: bool list \\ 128 word) (to_bl (b::16 word))) \\ 65535\"", "output": "proof - from unat_of_bl_128_16_less_helper[of b] have \"unat ((of_bl:: bool list \\ 128 word) (to_bl b)) < 65536\"\nby simp from Suc_leI[OF this] show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lim_h_minus_finite [simp]: \"lim_h_minus e \\ top\"", "output": "proof - have \"lim_h_minus e \\ lim_h_plus e\"\nby(rule lim_h_minus_le_lim_h_plus) also have \"\\ < top\" unfolding less_top[symmetric]\nby (rule lim_h_plus_finite) finally show ?thesis unfolding less_top[symmetric]\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonneg_dirichlet_series_lnD: \n assumes \"nonneg_dirichlet_series (fds_ln l f)\" \"exp l = fds_nth f (Suc 0)\"\n shows \"nonneg_dirichlet_series f\"", "output": "proof - from assms have \"nonneg_dirichlet_series (fds_exp (fds_ln l f))\"\nby (intro nonneg_dirichlet_series.nonneg_exp) thus ?thesis\nusing assms\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_max3I2: \"(n3::nat) \\ max n1 (max n2 n3)\"", "output": "proof - have \"n3 \\ max n2 n3\"\nby (rule max.cobounded2) also have \"max n2 n3 \\ max n1 (max n2 n3)\"\nby (rule max.cobounded2) finally show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma acyclicLexLess:\n shows \"acyclic lexLess\"", "output": "proof (rule transIrreflexiveOrderingIsAcyclic) show \"trans lexLess\"\nusing translexLess . show \"\\ x. (x, x) \\ lexLess\"\nusing irreflexiveLexLess\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma complete_lattice_lattice [simp]: \n assumes \"complete_lattice X\"\n shows \"lattice X\"", "output": "proof - interpret c: complete_lattice X\nby (simp add: assms) show ?thesis\nby (unfold_locales)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abundant220ex: \"abundant_number 220\"", "output": "proof- have \"220 Amic 284\"\nusing Amicable_Example_Pythagoras\nby simp moreover have \"(220::nat) < 284\"\nby simp ultimately show ?thesis\nusing Amicable_pair_abundant Amicable_pair_sym\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_Sup_multisetD:\n assumes \"x \\# Sup A\"\n shows \"\\X\\A. x \\# X\"", "output": "proof - have \"subset_mset.bdd_above A\"\nby (rule ccontr) (insert assms, simp_all add: Sup_multiset_unbounded) with assms show ?thesis\nby (simp add: in_Sup_multiset_iff)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "theorem robbins_is_boolean:\n \"class.boolean_algebra minus uminus (\\) (\\) (\\) (\\) \\ \\\"", "output": "proof - interpret huntington: huntington_algebra uminus \"(\\)\" \"(\\)\" \\ \\\nby (fact robbins_is_huntington) show ?thesis\nby (simp add: huntington.huntington_is_boolean)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma notFinished_WtFT[simp]:\nassumes \"n < length cl\" and \"\\ finished (cl ! n)\"\nshows \"1 / length cl \\ 1 - WtFT cl\"", "output": "proof- have \"0 < length cl\"\nusing assms\nby auto thus ?thesis unfolding WtFT_def\napply(intro sum_1[of \"{..< length cl}\"])\nusing assms\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma open_ball [intro, simp]: \"open (ball x e)\"", "output": "proof - have \"open (dist x -` {.. \\\\<^sub>\\ Vset \\\"", "output": "proof- note [smc_cs_intros] = tiny_smc_Obj_in_Vset tiny_smc_Arr_in_Vset tiny_smc_Dom_in_Vset tiny_smc_Cod_in_Vset tiny_smc_Comp_in_Vset show ?thesis\nby (subst smc_def) (cs_concl cs_intro: smc_cs_intros V_cs_intros)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l0e: \"(e*c)/(f2*(e-1)) \\ l0\"", "output": "proof- have 0: \"f2 * (l0 * min e c) \\ e * (f2 * l0)\"\nby (simp add: min_def ac_simps mult_right_mono) from l0 show ?thesis\napply(simp add: field_simps)\nusing 0\nby linarith\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "theorem pi_series: \"pi / 4 = (\\k. (-1)^k * 1 / real (k * 2 + 1))\"\n (is \"_ = ?SUM\")", "output": "proof - have \"pi / 4 = arctan 1\"\nusing arctan_one\nby auto also have \"\\ = ?SUM\"\nusing arctan_series[of 1]\nby auto finally show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"r\\xpos := n\\ = r\\xpos := n'\\\" if \"n = n'\"\n \\ \\elimination of abstract record equality (manual proof)\\", "output": "proof - let \"?lhs = ?rhs\" = ?thesis from that have \"xpos ?lhs = xpos ?rhs\"\nby simp then show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nat_to_sch_at_2: \"nat_to_sch 2 = Base_suc\"", "output": "proof - have S1: \"c_pair 1 0 = 2\"\nby (simp add: c_pair_def sf_def) have S2: \"nat_to_sch (c_pair 1 0) = Base_suc\"\nby (rule loc_srj_0) from S1 S2 show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PO_m2_inv6_resp_ikk [iff]: \"reach m2 \\ m2_inv7_ikk_resp\"", "output": "proof - have \"reach m2 \\ m1_inv2r_serv \\ m2_inv5_ikk_sv\"\nby simp also have \"... \\ m2_inv7_ikk_resp\"\nby (blast intro!: m2_inv7_ikk_respI dest: m2_inv5_ikk_svD) finally show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_imp_card_less:\n assumes \"finite A\"\n shows \"|A| \"", "output": "proof - have \"finite (Field |A| )\"\nusing assms\nby simp thus ?thesis\nusing cardinal card_of_Well_order card_order_on_def finite_ordLess_infinite\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R_one_zero: \"R 1 0 = 0\"", "output": "proof - have \"H 1 (R 1 0) 0\"\nby (simp add: R1) thus ?thesis\nby (simp add: H_def join.le_bot)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zero_matrix_def_nrows[simp]: \"nrows 0 = 0\"", "output": "proof - have a:\"!! (x::nat). x <= 0 \\ x = 0\"\nby (arith) show \"nrows 0 = 0\"\nby (rule a, subst nrows_le, simp)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma many_reducible_to_via_refl: \"many_reducible_to_via A A (\\ x. x)\"", "output": "proof - have \"one_reducible_to_via A A (\\ x. x)\"\nby (rule one_reducible_to_via_refl) then show ?thesis\nby (rule one_reducibility_via_is_many)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ZX_is_gate [simp]:\n shows \"gate 1 ZX\"", "output": "proof show \"dim_row ZX = 2 ^ 1\"\nusing mat_of_cols_list_def\nby simp show \"square_mat ZX\"\nusing mat_of_cols_list_def\nby simp show \"unitary ZX\"\nusing unitary_def l_inv_of_ZX r_inv_of_ZX mat_of_cols_list_def\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vint_non_triviality: \"0\\<^sub>\\ \\ 1\\<^sub>\\\"", "output": "proof- have \"0 \\ (1::int)\"\nby simp from this[untransferred] show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma B_nonneg: \"B \\ 0\"", "output": "proof - have \"0 \\ norm (f t0 x0)\"\nby simp also from b_pos norm_f have \"... \\ B\"\nby (simp add: initial_time_in X_def) finally show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma h_minus_mono: \"h_minus i e \\ h_minus (Suc i) e\"", "output": "proof - have \"h_minus i e + 0 \\ h_minus (Suc i) e\" unfolding h_minus.simps\nby(rule add_mono; simp add: SUP_upper2) thus ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conjugate_1[simp]: \"(conjugate 1 :: 'a :: {conjugatable_ring, ring_1}) = 1\"", "output": "proof- have \"conjugate 1 * 1 = (conjugate 1 :: 'a)\"\nby simp also have \"conjugate \\ = 1\"\nby simp finally show ?thesis\nby (unfold conjugate_dist_mul, simp)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_UNIV_tree: \"finite (UNIV :: 'a tree set) \\ False\"", "output": "proof - have \"rangeIt Leaf (Node (undefined :: 'a) Leaf) \\ UNIV\"\nby simp from finite_subset[OF this] show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assumes s: \"sigma_algebra a\" shows sigma_algebra_UNIV: \"UNIV \\ a\"", "output": "proof - from s have \"{}\\a\"\nby (unfold sigma_algebra_def) blast with s show ?thesis\nby (unfold sigma_algebra_def) auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "theorem inversion_number_between_sorted_correct:\n \"sorted_wrt less_eq xs \\ sorted_wrt less_eq ys \\\n inversion_number_between_sorted xs ys = inversion_number_between xs ys\"", "output": "by (induction xs ys rule: inversion_number_between_sorted.induct) (simp_all add: inversion_number_between_Cons_Cons)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pdevs_val_perm:\n assumes \"xs <~~> ys\"\n assumes mem: \"e \\ UNIV \\ I\"\n obtains e' where \"e' \\ UNIV \\ I\"\n \"pdevs_val e (pdevs_of_list xs) = pdevs_val e' (pdevs_of_list ys)\"", "output": "using assms\nby (metis pdevs_val_perm_ex)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hb_consistent_append_D1 [dest]:\n assumes \"hb_consistent (xs @ ys)\"\n shows \"hb_consistent xs\"", "output": "using assms\nby(induction ys arbitrary: xs rule: List.rev_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interleavings_set:\n assumes \"interleavings xs ys zs\"\n shows \"set xs \\ set ys = set zs\"", "output": "using assms\nby (induct xs ys zs rule: interleavings.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linear_split_sm: \"\\linear_split_help xs p ys = (ls,rs); sorted_less (separators (ys@xs)); \\sep \\ set (separators ys). p > sep\\ \\ \\sep \\ set (separators ls). p > sep\"", "output": "apply(induction xs p ys rule: linear_split_help.induct)\napply(simp_all)\nby (metis prod.inject)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_succ_short:\n assumes \"length xs < 2\" shows \"list_succ xs = id\"", "output": "using assms\nby (cases xs) (rename_tac [2] y ys, case_tac [2] ys, auto simp: list_succ_Nil list_succ_singleton)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ldropWhile_Lazy_llist [code]:\n \"ldropWhile P (Lazy_llist xs) = \n Lazy_llist (\\_. case xs () of None \\ None | Some (x, ys) \\ if P x then force (ldropWhile P ys) else Some (x, ys))\"", "output": "by(auto split: llist.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_list_updates[simp]: \"length (list_updates xs ys vs) = length vs\"", "output": "by (induction xs ys vs rule: list_updates.induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n shows length_runs: \"length (runs xs) \\ length xs\"\n and length_asc: \"ascP f \\ length (asc a f ys) \\ 1 + length ys\"\n and length_desc: \"length (desc a xs ys) \\ 1 + length ys\"", "output": "by (induct xs and a f ys and a xs ys rule: runs_asc_desc.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bal_def2[code]:\n\"bal n xs =\n (if n=0 then (Leaf,xs) else\n (let m = n div 2;\n (l, ys) = bal m xs;\n (r, zs) = bal (n-1-m) (tl ys)\n in (Node l (hd ys) r, zs)))\"", "output": "using val_cong[OF bal_tm.simps(1)]\nby(simp only: bal_def val_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma edrop_mono: \"xs \\ ys \\ edrop n xs \\ edrop n ys\"", "output": "using mono_edrop[of n xs]\nby (auto simp add: less_eq_list_def prefix_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_prefix'_correct: \"is_prefix' xs ys \\ ESPEC (\\_. False) (\\r. r \\ xs = take (length xs) ys)\"", "output": "unfolding is_prefix'_def\napply refine_vcg\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lex_ext_stri_imp_nstri: \n assumes \"fst (lex_ext f m xs ys)\" \n shows \"snd (lex_ext f m xs ys)\"", "output": "using assms\nby (auto simp: lex_ext_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zip_with_map_right: \"zip_with f xs (map g ys) = zip_with (\\x y. f x (g y)) xs ys\"", "output": "using zip_with_map[of f \"\\x. x\" xs g ys]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_append_same1: \"eq xs' ys' \\ eq (xs @ xs') (xs @ ys')\"", "output": "by(induction rule: equivclp_induct)(auto intro: cancel1_append_same1 equivclp_into_equivclp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_take_drop_imp_eq: \"\n \\ xs \\ n = ys \\ n; xs \\ n = ys \\ n \\ \\ xs = ys\"", "output": "apply (rule subst[OF append_take_drop_id[of n xs]])\napply (rule subst[OF append_take_drop_id[of n ys]])\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rotate1_map2:\n \"length xs = length ys \\\n rotate1 (map2 f xs ys) = map2 f (rotate1 xs) (rotate1 ys)\"", "output": "by (cases xs; cases ys) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interleave_comm: \"xs \\ ys \\ zs \\ xs \\ zs \\ ys\"", "output": "by (induction rule: interleave_induct) (auto intro: interleave_intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weight_append:\n \"weight (xs @ a # ys) = weight (xs @ [a]) + weight (a # ys)\"", "output": "by (induction xs rule: weight.induct; simp add: add.assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lprefix_lmergeI:\n \"\\ lprefix xs xs'; lprefix ys ys' \\\n \\ lprefix (lmerge xs ys) (lmerge xs' ys')\"", "output": "by(coinduction arbitrary: xs xs' ys ys')(fastforce simp add: lhd_lmerge ltl_lmerge dest: lprefix_lhdD lprefix_lNoneD simp add: not_lNone_conv split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma asSort_inj[simp]:\n\"(asSort xs = asSort ys) = (xs = ys)\"", "output": "using varSortAsSort_inj_INNER unfolding inj_on_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma c_merge_pairs:\n \"c_merge_pairs xss \\ length (concat xss)\"", "output": "proof (induct xss rule: c_merge_pairs.induct) case (1 xs ys zss) then show ?case\nusing c_merge [of xs ys]\nby simp\nqed simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma merge_conv_merge_it[code_unfold]:\n \"merge f xs ys = merge_it f xs ys\"", "output": "unfolding merge_it_def\nusing merge_conv_merge_it' rev.simps(1) append_Nil\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lexordp_eq_code[code]: \"lexordp_eq xs ys \\ (case xs of [] \\ True\n | x # xs \\ (case ys of [] \\ False\n | y # ys \\ if x < y then True else if x > y then False else lexordp_eq xs ys))\"", "output": "by (subst lexordp_eq.simps) (auto split: list.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma widen_append1:\n \"P \\ (xs @ ys) [\\] Ts = (\\Ts1 Ts2. Ts = Ts1 @ Ts2 \\ length xs = length Ts1 \\ length ys = length Ts2 \\ P \\ xs [\\] Ts1 \\ P \\ ys [\\] Ts2)\"", "output": "unfolding list_all2_append1\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_drop_eq_conv: \"(xs = ys) = (\\n. xs \\ n = ys \\ n)\"", "output": "apply (rule iffI, simp)\napply (drule_tac x=0 in spec)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linear_split_gr:\n \"\\linear_split_help xs p ys = (ls,rs); sorted_less (separators (ys@xs)); \\(sub,sep) \\ set ys. p > sep\\ \\ \n(case rs of [] \\ True | (_,sep)#_ \\ p \\ sep)\"", "output": "apply(cases rs)\nby (auto simp add: some_child_sm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma butlast_append_Cons[simp]: \"butlast (xs @ y # ys) = xs @ butlast (y # ys)\"", "output": "using butlast_append[of xs \"y # ys\", simplified]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordered_insert_pairs_map [rewrite]:\n \"map_of_alist (ordered_insert_pairs x v ys) = update_map (map_of_alist ys) x v\"", "output": "@proof @induct ys @qed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prog_configs_append: \"\\ys. prog_configs (xs@ys) = prog_configs xs \\ prog_configs ys\"", "output": "by (induct xs) (auto split: memref.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dropWhile_append:\n \"dropWhile P (xs @ ys) = (if \\x\\set xs. P x then dropWhile P ys else dropWhile P xs @ ys)\"", "output": "using dropWhile_append1[of _ xs P ys] dropWhile_append2[of xs P ys]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem app_eq: \"app xs ys zs = (zs = xs @ ys)\"", "output": "apply (rule iffI)\napply (erule app_eq2)\napply (erule app_eq1) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zip_with_swap: \"zip_with (\\x y. f y x) xs ys = zip_with f ys xs\"", "output": "by (induction f ys xs rule: zip_with.induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lfinite_lrel_eq:\n \"lrel R xs ys \\ lfinite xs = lfinite ys\"", "output": "using lfinite_lrel lfinite_lrel'\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma not_min_maxsimpchainI_betw:\n \"\\ maxsimpchain (x#ys@[y]); length ys < length xs \\ \\\n \\ min_maxsimpchain (x#xs@[y])\"", "output": "using min_maxsimpchainD_min_betw not_less\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_induct3_snoc_Conssnoc_Cons_pairwise\n [case_names Nil1 Nil2 Nil3 snoc_single_Cons snoc_Conssnoc_Cons]:\n assumes Nil1 : \"\\ys zs. P [] ys zs\"\n and Nil2 : \"\\xs zs. P xs [] zs\"\n and Nil3 : \"\\xs ys. P xs ys []\"\n and snoc_single_Cons : \"\\xs x y z zs. P (xs@[x]) [y] (z#zs)\"\n and snoc_Conssnoc_Cons:\n \"\\xs x y ys w z zs. P xs ys zs \\ P xs (ys@[w]) (z#zs) \\\n P (xs@[x]) (y#ys) zs \\ P (xs@[x]) (y#ys@[w]) (z#zs)\"\n shows \"P xs ys zs\"", "output": "using assms prod_list_induct3_snoc_Conssnoc_Cons_pairwise[of \"\\(xs,ys,zs). P xs ys zs\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lappend_assoc: \"lappend (lappend xs ys) zs = lappend xs (lappend ys zs)\"", "output": "by(coinduction arbitrary: xs rule: llist.coinduct_strong) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma paths_lappendD2:\n assumes \"lfinite xs\"\n and \"lappend xs ys \\ paths graph\"\n shows \"ys \\ paths graph\"", "output": "using assms\nby induct(fastforce elim: paths.cases intro: paths.intros)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma traverse_list_app[simp]: \"traverse_list f (xs @ ys) = do {\n xs \\ traverse_list f xs;\n ys \\ traverse_list f ys;\n return (xs @ ys)\n}\"", "output": "by (induction xs) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma those_eq_Some_lengthD: \"those xs = Some ys \\ length xs = length ys\"", "output": "by (induction xs arbitrary: ys) (auto split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_of_zip_is_Some:\n assumes \"length xs = length ys\"\n shows \"x \\ set xs \\ (\\y. map_of (zip xs ys) x = Some y)\"", "output": "using assms\nby (induct rule: list_induct2) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lprefix_antisym:\n \"\\ xs \\ ys; ys \\ xs \\ \\ xs = ys\"", "output": "by(coinduction arbitrary: xs ys)(auto simp add: not_lNone_conv lprefix_lNone)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma start_remove_id[simp]: \"x \\ set xs \\ start_remove xs x ys = rev ys @ xs\"", "output": "by (induction xs arbitrary: ys) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma emb_Ball_lset_antimono:\n assumes \"emb Xs Ys\"\n shows \"\\Y \\ lset Ys. x \\ Y \\ \\X \\ lset Xs. x \\ X\"", "output": "using emb_lset_mono[OF assms]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transpose_aux_filter_tail:\n \"concat (map (case_list [] (\\h t. [t])) xss) =\n map (\\xs. tl xs) (filter (\\ys. ys \\ []) xss)\"", "output": "by (induct xss) (auto split: list.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lprefix_llength_le: \"xs \\ ys \\ llength xs \\ llength ys\"", "output": "using monotone_llength\nby(rule monotoneD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma szip_eq_scons[iff]: \"szip xs ys = z ## zs \\ (shd xs, shd ys) = z \\ szip (stl xs) (stl ys) = zs\"", "output": "using szip.ctr stream.inject\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma llist_all2_conj:\n \"llist_all2 (\\x y. P x y \\ Q x y) xs ys \\ llist_all2 P xs ys \\ llist_all2 Q xs ys\"", "output": "by(auto simp add: llist_all2_conv_all_lnth)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma card_union_inter_fset: \n shows \"card_fset xs + card_fset ys = card_fset (xs |\\| ys) + card_fset (xs |\\| ys)\"", "output": "unfolding card_fset union_fset inter_fset\nby (rule card_Un_Int[OF finite_fset finite_fset])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_shuffles: \"zs \\ shuffles xs ys \\ mset zs = mset xs + mset ys\"", "output": "by (induction xs ys arbitrary: zs rule: shuffles.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_set_update_listD:\n assumes \"y \\ set (update_list n x ys)\"\n shows \"y = (n, x) \\ (y \\ set ys)\"", "output": "using assms\nby (induct ys) (auto split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma retract_cancel1:\n assumes \"cancel1 ys (map f xs)\"\n shows \"\\zs. eq xs zs \\ ys = map f zs\"", "output": "using retract_cancel1_aux[OF assms]\nby(blast intro: symclpI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_set_eq: \"set xs = set ys\" if \"eq xs ys\"", "output": "using that\nby(induction)(auto dest!: cancel1_set_eq elim!: symclpE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma msetext_huet_mono_strong:\n \"(\\y \\ set ys. \\x \\ set xs. gt y x \\ gt' y x) \\ msetext_huet gt ys xs \\ msetext_huet gt' ys xs\"", "output": "unfolding msetext_huet_def\nby (metis less_le_trans mem_Collect_eq not_le not_less0 set_mset_mset[unfolded set_mset_def])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ex_list_all2:\nassumes \"\\x. x \\ set xs \\ \\y. f x y\"\nshows \"\\ ys. list_all2 f xs ys\"", "output": "using assms\napply(induct xs)\napply fastforce\nby (metis set_simps insertCI list_all2_Cons)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prefs_from_table_eqI:\n assumes \"distinct (map fst xs)\" \"distinct (map fst ys)\" \"set xs = set ys\"\n shows \"prefs_from_table xs = prefs_from_table ys\"", "output": "proof - from assms have \"map_of xs = map_of ys\"\nby (subst map_of_inject_set) simp_all thus ?thesis\nby (simp add: prefs_from_table_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_of_distinct_lookup:\n assumes \"x \\ set(map fst xs)\"\n \"x \\ set (map fst ys)\"\n shows \"map_of (xs @ (x,y) # ys) x = Some y\"", "output": "proof - have \"map_of (xs @ (x,y) # ys) = (map_of (xs @ ys)) (x \\ y)\"\nusing assms map_of_distinct_upd2\nby simp thus ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_decomp: assumes \"path (xs @ ys)\" shows \"path xs\" \"path ys\"", "output": "using walk_decomp assms distinct_append\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lprefix_imp_llexord:\n assumes \"xs \\ ys\"\n shows \"llexord r xs ys\"", "output": "using assms\nby(coinduct)(auto simp add: not_lNone_conv LCons_lprefix_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Cons_step1E [elim!]:\n assumes \"step1 r ys (x # xs)\"\n and \"\\y. ys = y # xs \\ r y x \\ R\"\n and \"\\zs. ys = x # zs \\ step1 r zs xs \\ R\"\n shows R", "output": "using assms\napply (cases ys)\napply (simp add: step1_def)\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_of_sunion_with: \n \"\\ sorted (map fst xs); sorted (map fst ys) \\\n \\ map_of (sunion_with f xs ys) k = \n (case map_of xs k of None \\ map_of ys k \n | Some v \\ case map_of ys k of None \\ Some v \n | Some w \\ Some (f k v w))\"", "output": "by(induct f xs ys rule: sunion_with.induct)(auto split: option.split dest: map_of_SomeD bspec)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma szip_smap1: \"szip (smap f xs) ys = smap (apfst f) (szip xs ys)\"", "output": "by(coinduction arbitrary: xs ys) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cancel_append_same2: \"cancel (xs @ zs) (ys @ zs)\" if \"cancel xs ys\"", "output": "using that\nby induction(blast intro: rtranclp.rtrancl_into_rtrancl cancel1_append_same2)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma remove_cycles_id: \"x \\ set xs \\ remove_cycles xs x ys = rev ys @ xs\"", "output": "by (induction xs arbitrary: ys) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strict_borderE[elim]:\n fixes xs ys :: \"'a list\"\n assumes \"strict_border xs ys\"\n obtains \"border xs ys\" and \"length xs < length ys\"", "output": "using assms unfolding strict_border_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma binop_compose:\n \"binop (\\x y. f (g x y)) z1 z2 xs ys = map (apsnd f) (binop g z1 z2 xs ys)\"", "output": "by (induct \"\\x y. f (g x y)\" z1 z2 xs ys rule: binop.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mul_ext_impl_cong[fundef_cong]:\n assumes \"\\x x'. x \\ set xs \\ x' \\ set ys \\ f x x' = g x x'\"\n shows \"mul_ext_impl f xs ys = mul_ext_impl g xs ys\"", "output": "using assms stri_mul_ext_map[of xs ys g f id] nstri_mul_ext_map[of xs ys g f id] stri_mul_ext_map[of xs ys f g id] nstri_mul_ext_map[of xs ys f g id]\nby (auto simp: mul_ext_impl_sound mul_ext_def Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_msetI:\n assumes \"list_all2 R xs ys\" \"mset xs = A\" \"mset ys = B\"\n shows \"rel_mset R A B\"", "output": "using assms\nby (auto simp: rel_mset_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gcd_list_sub:\n assumes \"set xs \\ set ys\" shows \"gcd_list ys dvd gcd_list xs\"", "output": "by (metis Gcd_fin.subset assms semiring_gcd_class.gcd_dvd1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eucl_of_list_inj: \"length xs = DIM('a::executable_euclidean_space) \\ length ys = DIM('a) \\\n (eucl_of_list xs::'a) = eucl_of_list (ys) \\ xs = ys\"", "output": "apply (auto intro!: nth_equalityI simp: euclidean_eq_iff[where 'a=\"'a\"] eucl_of_list_inner)\nusing nth_Basis_list_in_Basis[where 'a=\"'a\"]\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma genPrefix_imp_nth:\n \"i < length xs \\ (xs, ys) \\ genPrefix r \\ (xs ! i, ys ! i) \\ r\"", "output": "apply (induct xs arbitrary: i ys)\napply auto\napply (case_tac i)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma initial_segment_Cons [simp]: \"initial_segment (x#xs) (y#ys) \\ x=y \\ initial_segment xs ys\"", "output": "by (metis append_Cons initial_segment.simps list.inject)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lrev_is_lrev_conv [iff]:\nassumes fin: \"xs \\ UNIV\\<^sup>\\\" \"ys \\ UNIV\\<^sup>\\\"\n shows \"(lrev xs = lrev ys) = (xs = ys)\"\n (is \"?L = ?R\")", "output": "proof assume L: ?L hence \"lrev (lrev xs) = lrev (lrev ys)\"\nby simp thus ?R\nusing fin\nby simp\nqed simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uv_edge_cases:\n obtains (par) \"(u,v)\\E\" \"(v,u)\\E\" \n | (rev) \"(v,u)\\E\" \"(u,v)\\E\"", "output": "using uv_cf_edge cfE_ss_invE no_parallel_edge\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_shift: \"w = u @- v \\ stake (length u) w = u \\ sdrop (length u) w = v\"", "output": "by (induct u arbitrary: w) (force+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma until_until_disj:\n assumes \"(P \\ Q \\ R) \\\"\n shows \"((P \\<^bold>\\ Q) \\ R) \\\"", "output": "using assms unfolding defs\napply clarsimp\napply (metis (full_types) add_diff_inverse_nat nat_add_left_cancel_less) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma learn_cons_wrt_goedel:\n assumes \"goedel_numbering \\\" and \"learn_cons \\ U s\"\n shows \"\\t. learn_cons \\ U t\"", "output": "using learn_cons_def assms learn_lim_extra_wrt_goedel[where ?extra=\"\\U f n h. \\k\\n. h k = f k\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_RB_inI2:\n assumes \"is_syz_sig d u\"\n shows \"is_RB_in d rword G u\"", "output": "unfolding is_RB_in_def Let_def\nusing assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma c_ipurge_aux_append:\n \"c_ipurge_aux I D U (xs @ [x]) = (if D x \\ c_sources_aux I D U [x]\n then c_ipurge_aux I D (insert (D x) U) xs @ [x]\n else c_ipurge_aux I D U xs)\"", "output": "by (induction xs, simp_all add: c_sources_aux_append)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_component_intermediate_subset:\n \"path_component_set u a \\ t \\ t \\ u\n \\ path_component_set t a = path_component_set u a\"", "output": "by (metis (no_types) path_component_mono path_component_path_component subset_antisym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isolated_other_da:\n assumes \"u \\ {tail G a, head G a}\" shows \"u \\ H.isolated_verts \\ u \\ G.isolated_verts\"", "output": "using assms\nby (auto simp: pre_digraph.isolated_verts_def verts_H arcs_H tail_H out_arcs_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes \"u \\ verts G\" \"set p \\ arcs G\"\n shows awhd_in_verts: \"awhd u p \\ verts G\"\n and awlast_in_verts: \"awlast u p \\ verts G\"", "output": "using assms\nby (auto elim: awalk_verts_in_verts)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_greaterThanAtMost_integer [iff]: \"finite {l<..(u::integer)}\"", "output": "by (subst atLeastPlusOneAtMost_greaterThanAtMost_integer [THEN sym], simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eval_subst_tm: \"\\subst i t u\\e = \\u\\(finfun_update e i \\t\\e)\"", "output": "by (induct u rule: tm.induct) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma atU_add_mset[simp]: \"atU U (add_mset c c2) = (atU_s U c \\ atU U c2)\"", "output": "unfolding add_mset_add_single[of c c2] atU_union\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"\\u::'a \\ 'b. \\v::'c. \\w::'d. \\x::'e \\ 'f.\n f u v w x = f u (g u w) w (h u)\"", "output": "nitpick [card = 1-2, dont_box, expect = genuine] oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma open_neighbourhood_base_at:\n \"(\\S. \\P S; x \\ S\\ \\ openin X S)\n \\ neighbourhood_base_at x P X \\ (\\W. openin X W \\ x \\ W \\ (\\U. P U \\ x \\ U \\ U \\ W))\"", "output": "unfolding neighbourhood_base_at_def\nby (meson subsetD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lsteps_comp_map: \"lsteps zs (f \\ g) l u v = lsteps (map g zs) f l u v\"", "output": "by (induction zs \"f \\ g\" l u v rule: lsteps.induct) (auto simp add: lsteps.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cas_simp:\n assumes \"es \\ []\"\n shows \"cas u es v \\ tail G (hd es) = u \\ cas (head G (hd es)) (tl es) v\"", "output": "using assms\nby (cases es) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma greaterThanLessThan_eq_iff:\n fixes r s t u::real\n shows \"({r<.. s \\ u \\ t \\ r = t \\ s = u)\"", "output": "by (metis cInf_greaterThanLessThan cSup_greaterThanLessThan greaterThanLessThan_empty_iff not_le)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma edge_cap_positive: \"(u,v)\\E \\ c (u,v) > 0\"", "output": "unfolding E_def\nusing cap_non_negative[THEN spec2, of u v]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unit_disc_fix_preserve_poincare_collinear3 [simp]:\n assumes \"unit_disc_fix M\"\n shows \"poincare_collinear {moebius_pt M u, moebius_pt M v, moebius_pt M w} \\\n poincare_collinear {u, v, w}\"", "output": "using assms unit_disc_fix_preserve_poincare_collinear_iff[of M \"{u, v, w}\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma max_repU2:\n assumes \"w1 \\\\<^sub>U y\"\n assumes \"w2 \\\\<^sub>U x\"\n shows \"wmax w1 w2 \\\\<^sub>U x\"", "output": "using wmax_lemma assms repU_def\nby (meson le_max_iff_disj)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nth_factorization_lattice:\n fixes u and d\n defines \"n \\ degree u\"\n assumes \"i < n + d\"\n shows \"factorization_lattice u d m ! i =\n vec_of_poly_n (if i < d then u * monom 1 (d - Suc i) else monom m (n+d-Suc i)) (n+d)\"", "output": "using assms\nby (unfold factorization_lattice_def, auto simp: nth_append smult_monom Let_def not_less)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fi_map_Some: \"(fi_map u = Some v) \\ u\\f`V \\ fi u = v\"", "output": "unfolding fi_map_def\nby (auto split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ord_strict_pE:\n assumes \"p \\\\<^sub>p q\"\n obtains v where \"lookup p v = 0\" and \"lookup q v \\ 0\" and \"\\u. v \\\\<^sub>t u \\ lookup p u = lookup q u\"", "output": "using assms unfolding ord_strict_p_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma abs_Gromov_completion_in_Gromov_boundary [simp]:\n assumes \"Gromov_converging_at_boundary u\"\n shows \"abs_Gromov_completion u \\ Gromov_boundary\"", "output": "using Gromov_completion_rel_to_const Gromov_converging_at_boundary_imp_not_constant' Gromov_converging_at_boundary_rel[OF assms] Quotient3_rel[OF Quotient3_Gromov_completion] assms not_in_Gromov_boundary to_Gromov_completion_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pot_comp_monotone:\n assumes \"cmp u v = Lt \\ cmp (splus t u) (splus t v) = Lt\" and \"pot_comp cmp u v = Lt\"\n shows \"pot_comp cmp (splus t u) (splus t v) = Lt\"", "output": "using assms(2)\nby (auto simp: pot_comp splus_term pprod.splus_def comparator_of_def deg_pp_plus split: order.splits if_splits intro: assms(1))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adds_term_antisym:\n assumes \"u adds\\<^sub>t v\" and \"v adds\\<^sub>t u\"\n shows \"u = v\"", "output": "using assms unfolding adds_term_def\nusing adds_antisym\nby (metis term_of_pair_pair)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convexD:\n assumes \"convex s\" and \"x \\ s\" and \"y \\ s\" and \"0 \\ u\" and \"0 \\ v\" and \"u + v = 1\"\n shows \"u *\\<^sub>R x + v *\\<^sub>R y \\ s\"", "output": "using assms unfolding convex_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma openin_Un[intro]: \"openin U S \\ openin U T \\ openin U (S \\ T)\"", "output": "using openin_Union[of \"{S,T}\" U]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sheaf_spec_extensional[simp]:\n \"a \\ \\ U \\ a \\ extensional U\"", "output": "unfolding sheaf_spec_def\nby (simp add: PiE_iff Set_Theory.map_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Subset_fresh_iff [simp]: \"a \\ t SUBS u \\ a \\ t \\ a \\ u\"", "output": "apply (rule obtain_fresh [where x=\"(t, u)\"])\napply (subst Subset.simps, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lead_coeff_factor: assumes u: \"u = v * (w :: 'a ::idom poly)\"\n shows \"smult (lead_coeff u) u = (smult (lead_coeff w) v) * (smult (lead_coeff v) w)\"\n \"lead_coeff (smult (lead_coeff w) v) = lead_coeff u\" \"lead_coeff (smult (lead_coeff v) w) = lead_coeff u\"", "output": "unfolding u\nby (auto simp: lead_coeff_mult lead_coeff_smult)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Q'_init_eq: \n \"Q' initQ init\\ r = (\\u. if (u,r)\\edges rg then enat (w {u,r}) else \\)\"", "output": "apply (rule ext)\nusing reachable_edges_subset\napply (simp add: Q'_def Qinter_def upd_cond_def initQ_def init\\_def)\nby (auto simp: Prim.rg_def edges_sym' reachable_nodes_step'(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unique_poincare_line_general:\n assumes in_disc: \"u \\ v\" \"u \\ inversion v\"\n assumes on_l: \"u \\ circline_set l\" \"v \\ circline_set l\" \"is_poincare_line l\"\n shows \"l = poincare_line u v\"", "output": "using assms\nusing unique_is_poincare_line_general[of u v l \"poincare_line u v\"] unfolding circline_set_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma c_fst_le_arg: \"c_fst u \\ u\"", "output": "proof - have \"c_fst u \\ c_sum u\"\nby (rule c_fst_le_c_sum) moreover have \"c_sum u \\ u\"\nby (rule c_sum_le_arg) ultimately show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma VSeq_implies_HPar:\n shows \"VSeq t u \\ HPar t u\"", "output": "using Src_Dom [of t] Src_Cod [of u] Trg_Dom [of t] Trg_Cod [of u]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma learn_lim_wrt_goedel:\n assumes \"goedel_numbering \\\" and \"learn_lim \\ U s\"\n shows \"\\t. learn_lim \\ U t\"", "output": "using assms learn_lim_extra_wrt_goedel[where ?extra=\"\\U f n h. True\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poincare_line_sym_general:\n assumes \"u \\ v\" \"u \\ inversion v\"\n shows \"poincare_line u v = poincare_line v u\"", "output": "using assms\nusing unique_poincare_line_general[of u v \"poincare_line v u\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nat_term_compD2:\n assumes \"nat_term_comp cmp\" and \"fst (rep_nat_term u) = fst (rep_nat_term v)\" and \"snd (rep_nat_term u) < snd (rep_nat_term v)\"\n shows \"cmp u v = Lt\"", "output": "using assms unfolding nat_term_comp_def fst_conv snd_conv\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sinks_aux_sinks_aux_less:\n \"sinks_aux I D U xs = U \\ sinks_aux_less I D U xs\"", "output": "by (induction xs rule: rev_induct, simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cond_assign_subst:\n \"vwb_lens x \\ (P \\ utp_expr.var x =\\<^sub>u v \\ Q) = (P\\v/x\\ \\ utp_expr.var x =\\<^sub>u v \\ Q)\"", "output": "apply (rel_simp)\nusing vwb_lens.put_eq\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n fixes l u :: real\n assumes [simp]: \"l \\ u\"\n shows measure_lborel_Icc[simp]: \"measure lborel {l .. u} = u - l\"\n and measure_lborel_Ico[simp]: \"measure lborel {l ..< u} = u - l\"\n and measure_lborel_Ioc[simp]: \"measure lborel {l <.. u} = u - l\"\n and measure_lborel_Ioo[simp]: \"measure lborel {l <..< u} = u - l\"", "output": "by (simp_all add: measure_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bfs2_refine:\n assumes succ_impl: \"\\ui u. \\(ui,u)\\Id; u\\V\\ \n \\ succ ui \\ SPEC (\\l. (l,E``{u}) \\ \\Id\\list_set_rel)\"\n shows \"bfs2 succ src dst \\ \\Id (bfs src dst)\"", "output": "unfolding bfs_def bfs2_def\napply (refine_vcg pre_bfs2_refine)\napply refine_dref_type\nusing assms\napply (vc_solve) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adds_term_trans [trans]:\n assumes \"u adds\\<^sub>t v\" and \"v adds\\<^sub>t w\"\n shows \"u adds\\<^sub>t w\"", "output": "using assms unfolding adds_term_def\nusing adds_trans\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma context_unique:\n assumes a1: \"valid \\\"\n and a2: \"(x,T) \\ set \\\"\n and a3: \"(x,U) \\ set \\\"\n shows \"T = U\"", "output": "using a1 a2 a3\nby (induct) (auto simp add: fresh_set fresh_prod fresh_atm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reachable_induce_ss:\n assumes \"u \\\\<^sup>*\\<^bsub>G \\ S\\<^esub> v\" \"S \\ T\" shows \"u \\\\<^sup>*\\<^bsub>G \\ T\\<^esub> v\"", "output": "using assms unfolding reachable_def\nby induct (auto intro: dominates_induce_ss converse_rtrancl_on_into_rtrancl_on)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_scaleR_degen:\n fixes a b ::\"'a::real_vector\"\n assumes \"(u *\\<^sub>R b + v *\\<^sub>R a) = (u *\\<^sub>R a + v *\\<^sub>R b)\" \"u \\ v\"\n shows \"a=b\"", "output": "by (metis (no_types, hide_lams) add.commute add_diff_eq diff_add_cancel real_vector.scale_cancel_left real_vector.scale_left_diff_distrib assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hermitian_decomp_sim: \n assumes \"hermitian_decomp A B U\"\n shows \"similar_mat_wit A B U (Complex_Matrix.adjoint U)\"", "output": "using assms unfolding hermitian_decomp_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poincare_collinear_doubleton [simp]:\n assumes \"u \\ unit_disc\" \"v \\ unit_disc\"\n shows \"poincare_collinear {u, v}\"", "output": "using assms\nusing ex_poincare_line_one_point[of u]\nusing ex_poincare_line_two_points[of u v]\nby (cases \"u = v\") (simp_all add: poincare_collinear_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_mapI:\n assumes \"path E u p v\"\n shows \"path (pairself f ` E) (f u) (map f p) (f v)\"", "output": "using assms\napply induction\napply (simp)\napply (force simp: path_cons_conv) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma berlekamp_basis_code[code]: \"berlekamp_basis u =\n (map (poly_of_list o list_of_vec) (find_base_vectors (berlekamp_resulting_mat u)))\"", "output": "unfolding berlekamp_basis_def poly_of_list_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma Abs_BetaE:\n assumes \"Abs x s \\\\<^sub>\\ t\"\n obtains u where \"t = Abs x u\" and \"s \\\\<^sub>\\ u\"", "output": "using assms\nby (blast dest: Abs_BetaD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma usubstappf_pred2 [simp]: \"SPreds \\ p = Some r \\ FVF(r)\\U\\{} \\ usubstappf \\ U (Pred p \\) = undeff\"", "output": "by (cases \"usubstappt \\ U \\\") (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma suffix_conc_fst[simp]:\n assumes \"n \\ length u\"\n shows \"suffix n (u \\ v) = drop n u \\ v\"", "output": "proof show \"suffix n (u \\ v) i = (drop n u \\ v) i\" for i\nusing assms\nby (cases \"n + i < length u\") (auto simp: algebra_simps)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poincare_distance_sym:\n assumes \"u \\ unit_disc\" and \"v \\ unit_disc\"\n shows \"poincare_distance u v = poincare_distance v u\"", "output": "using assms\nusing poincare_distance_formula[OF assms(1) assms(2)]\nusing poincare_distance_formula[OF assms(2) assms(1)]\nby (simp add: mult.commute norm_minus_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unfold_rsplit_case:\n assumes su: \"(Some s, u) = wordinterval_CIDR_split1 rs\"\n shows \"(case wordinterval_CIDR_split1 rs of (None, u) \\ []\n | (Some s, u) \\ s # wordinterval_CIDR_split_prefixmatch u) = s # wordinterval_CIDR_split_prefixmatch u\"", "output": "using su\nby (metis option.simps(5) split_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma face_of_eq:\n fixes S :: \"'a::real_normed_vector set\"\n assumes \"T face_of S\" \"U face_of S\" \"(rel_interior T) \\ (rel_interior U) \\ {}\"\n shows \"T = U\"", "output": "using assms unfolding disjoint_iff_not_equal\nby (metis IntI empty_iff face_of_imp_subset mem_rel_interior_ball subset_antisym subset_of_face_of)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exact_decompI:\n \"(\\h U. (h, U) \\ set ps \\ h \\ P[X]) \\ (\\h U. (h, U) \\ set ps \\ U \\ X) \\\n (\\h h' U U'. (h, U) \\ set ps \\ (h', U') \\ set ps \\ poly_deg h = poly_deg h' \\\n m < card U \\ m < card U' \\ (h, U) = (h', U')) \\\n exact_decomp m ps\"", "output": "unfolding exact_decomp_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_arcs_app_iso_eq':\n assumes \"digraph_isomorphism hom\" and \"u \\ verts (app_iso hom G)\"\n shows \"in_arcs (app_iso hom G) u = iso_arcs hom ` in_arcs G (iso_verts (inv_iso hom) u)\"", "output": "using assms in_arcs_app_iso_eq[of hom \"iso_verts (inv_iso hom) u\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma u_fresh_xv[simp]:\n fixes u::u and x::x and v::v\n shows \"atom u \\ (x,v)\"", "output": "proof - have \"atom u \\ x\"\nusing fresh_def\nby fastforce moreover have \"atom u \\ v\"\nusing fresh_def u_notin_supp_v\nby metis ultimately show ?thesis\nusing fresh_prod2\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HDomain_Incl_sf [iff]: \"Sigma_fm (HDomain_Incl t u)\"", "output": "proof - obtain x::name and y::name and z::name where \"atom x \\ (t,u,y,z)\" \"atom y \\ (t,u,z)\" \"atom z \\ (t,u)\"\nby (metis obtain_fresh) thus ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma resp: \"\\x. (\\u. R `` {u @ [x]}) respects R\"", "output": "using riR\nby (auto simp: congruent_def right_invariant_def intro!: equiv_class_eq [OF eqR])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_comb_cases[consumes 1]:\n assumes \"t = list_comb f xs\"\n obtains (head) \"t = f\" \"xs = []\"\n | (app) u v where \"t = app u v\"", "output": "using assms\nby (metis list_comb_cases' left_right_simps(3))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma countably_compact_eq_compact:\n \"countably_compact U \\ compact (U :: 'a :: second_countable_topology set)\"", "output": "using countably_compact_imp_compact_second_countable compact_imp_countably_compact\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closedin_subtopology_refl [simp]:\n \"closedin (subtopology U X) X \\ X \\ topspace U\"", "output": "by (metis closedin_def closedin_topspace inf.absorb_iff2 le_inf_iff topspace_subtopology)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma left_options_plus: \n \"left_options (plus_game u v) = zunion (zimage (\\g. plus_game g v) (left_options u)) (zimage (\\h. plus_game u h) (left_options v))\"", "output": "by (subst plus_game.simps, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prev_inI:\n assumes \"u \\ {a<..b}\"\n \"v \\ A\"\n \"v < u\"\n \"{v<.. A = {}\"\n shows \"prev_in A u = v\"", "output": "using assms prev_in_basics[OF \\u \\ {a<..b}\\]\nby (meson disjoint_iff_not_equal greaterThanLessThan_iff less_linear)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ipurge_ref_aux_less_last:\n \"ipurge_ref_aux_less I D U (xs @ [x]) X =\n (if \\v \\ U \\ sinks_aux_less I D U xs. (v, D x) \\ I\n then ipurge_ref_aux_less I D U xs {x' \\ X. (D x, D x') \\ I}\n else ipurge_ref_aux_less I D U xs X)\"", "output": "by (cases \"\\v \\ U \\ sinks_aux_less I D U xs. (v, D x) \\ I\", simp_all add: ipurge_ref_aux_less_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inner_prod_with_itself_nonneg_reals_non0:\n assumes \"u \\ 0\\<^sub>v (dim_vec u)\"\n shows \"\\u|u\\ \\ 0\"", "output": "using assms inner_prod_with_itself_Re_non0\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dlex_fun_plus_monotone:\n fixes s t u::\"'a \\ 'b::{ordered_cancel_comm_monoid_add, ordered_ab_semigroup_add_imp_le}\"\n assumes \"finite (supp_fun s)\" and \"finite (supp_fun t)\" and \"finite (supp_fun u)\" and \"dlex_fun s t\"\n shows \"dlex_fun (s + u) (t + u)\"", "output": "using lex_fun_plus_monotone[of s t u] assms unfolding dlex_fun_def\nby (rule dord_fun_plus_monotone)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma szip_shift[simp]:\n assumes \"length u = length s\"\n shows \"u @- v ||| s @- t = (u || s) @- (v ||| t)\"", "output": "using assms\nby (simp add: eq_shift stake_shift sdrop_shift)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prim_exp_eq: \"primitive u \\ r\\<^sup>@k = u \\ u = r\"", "output": "using prim_exp_one power_one_right\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma MarkGuardsI:\n assumes deriv: \"\\,\\\\\\<^sub>t\\<^bsub>/{}\\<^esub> P c Q,A\"\n shows \"\\,\\\\\\<^sub>t\\<^bsub>/{}\\<^esub> P mark_guards f c Q,A\"", "output": "apply (rule hoaret_complete')\napply (rule MarkGuardsI_sound)\napply (iprover intro: hoaret_sound [OF deriv]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma EndPhase1_HInv3_R:\n \"\\ EndPhase1 s s' t; HInv3_R s p q d; t\\p; t\\ q \\\n \\ HInv3_R s' p q d\"", "output": "by(auto simp add: EndPhase1_def InitializePhase_def HInv3_R_def hasRead_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weakenStatImpE:\n fixes \\ :: 'b\n and P :: \"('a, 'b, 'c) psi\"\n and Rel :: \"('b \\ ('a, 'b, 'c) psi \\ ('a, 'b, 'c) psi) set\"\n and Q :: \"('a, 'b, 'c) psi\"\n and \\' :: 'b\n\n assumes \"\\ \\ P \\\\<^sub>w Q\"\n\n obtains Q' where \"\\ \\ Q \\\\<^sup>^\\<^sub>\\ Q'\" and \"insertAssertion(extractFrame P) \\ \\\\<^sub>F insertAssertion(extractFrame Q') \\ \" and \"(\\, P, Q') \\ Rel\"", "output": "using assms\nby(auto simp add: weakenStatImp_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in encoding) combine_conditions_on_sets_and_pairs_of_relations:\n fixes Rel RelA RelB :: \"(('procS, 'procT) Proc \\('procS, 'procT) Proc) set\"\n and Cond :: \"(('procS, 'procT) Proc \\('procS, 'procT) Proc) set \\ bool\"\n and CondA CondB :: \"(('procS, 'procT) Proc \\('procS, 'procT) Proc) \\ bool\"\n assumes \"\\(P, Q) \\ RelA. CondA (P, Q)\"\n and \"\\(P, Q) \\ RelB. CondB (P, Q)\"\n and \"Cond Rel \\ Rel \\ RelA \\ Rel \\ RelB\"\n shows \"Cond Rel \\ (\\(P, Q) \\ Rel. CondA (P, Q)) \\ (\\(P, Q) \\ Rel. CondB (P, Q))\"", "output": "using assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hom_dvd[intro,simp]: assumes \"p dvd q\" shows \"hom p dvd hom q\"", "output": "proof - from assms obtain r where \"q = p * r\" unfolding dvd_def\nby auto from arg_cong[OF this, of hom] show ?thesis unfolding dvd_def\nby (auto simp: hom_distribs)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma partition_on_eq_implies_eq_carrier:\n assumes \"partition_on A Q\"\n assumes \"partition_on B Q\"\n shows \"A = B\"", "output": "using assms\nby (fastforce elim: partition_onE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ent_pure_pre_iff_sng[simp]: \n \"(\\b \\\\<^sub>A Q) \\ (b \\ (emp \\\\<^sub>A Q))\"", "output": "using ent_pure_pre_iff[where P=emp]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bangPres:\n fixes P :: pi\n and Q :: pi\n \n assumes \"P \\\\<^sup>s Q\"\n\n shows \"!P \\\\<^sup>s !Q\"", "output": "using assms\nby(auto simp add: weakCongruenceSubst_def intro: Weak_Early_Cong_Pres.bangPres)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SKIP:\n \"X \\ Skip : Sec (Q p H) (EQ G q) (EQ G q) \n (\\ (s,t) . EQ G q s t)\"", "output": "apply (rule VDMConseq, rule VDMSkip)\napply (simp add: Sec_def EQ_def Q_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sorted_wrt_dist_insort_key:\n \"sorted_wrt_dist p ps \\ sorted_wrt_dist p (insort_key (\\q. dist q p) q ps)\"", "output": "by (induction ps) (auto simp: sorted_wrt_dist_def set_insort_key)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma floor_divide_upper:\n fixes q :: \"'a::floor_ceiling\"\n shows \"q > 0 \\ p < (of_int \\p / q\\ + 1) * q\"", "output": "by (meson floor_eq_iff pos_divide_less_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hoare_kcomp:\n assumes \"P \\ |G] R\" \"R \\ |F] Q\"\n shows \"P \\ |G ; F] Q\"", "output": "apply(subst fbox_kcomp)\nby (rule order.trans[OF assms(1)]) (rule fbox_iso[OF assms(2)]) \\ \\ Conditional statement \\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma content_dvd_contentI [intro]: \"p dvd q \\ content p dvd content q\"", "output": "using const_poly_dvd_iff_dvd_content content_dvd dvd_trans\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "theorem TBtheorem4a_PQ:\nassumes \"(ine P E) \\ (ine Q E)\"\n and \"subcomponents PQ = {P,Q}\"\n and \"correctCompositionIn PQ\"\n and \"\\ ch. (((ch \\ (ins P)) \\ (ch \\ (ins Q) )) \\ \n (exprChannel ch E) \\ (ch \\ (loc PQ)))\"\nshows \"ine PQ E\"", "output": "using assms\nby (simp add: ine_def correctCompositionIn_def, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vcg_pre_imp:\n \"\\ \\s. P s \\ Q s; \\Q\\ c \\R\\ \\ \\ \\P\\ c \\R\\\"", "output": "by (cases c) (fastforce elim!: vcg_inv intro: vcg.intros)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trace_eq_simcl_bind1_scale: \"trace_eq_simcl S (bind_spmf p f) (scale_spmf (weight_spmf p) q)\"\n if \"\\x\\set_spmf p. trace_eq_simcl S (f x) q\"", "output": "proof - have \"trace_eq_simcl S (bind_spmf p f) (bind_spmf p (\\_. q))\"\nby(rule trace_eq_simcl_bind)(simp add: that) thus ?thesis\nby(simp add: bind_spmf_const)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l9_10:\n assumes \"\\ Col A P Q\"\n shows \"\\ C. P Q TS A C\"", "output": "by (meson Col_perm assms mid_two_sides midpoint_existence symmetric_point_construction)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prerun_valid_conjI:\n assumes \"sys \\\\<^bsub>pre\\<^esub> P\"\n assumes \"sys \\\\<^bsub>pre\\<^esub> Q\"\n shows \"sys \\\\<^bsub>pre\\<^esub> P \\<^bold>\\ Q\"", "output": "using assms unfolding prerun_valid_def always_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R1_comp2:\n assumes A: \"P is R1 healthy\"\n assumes B: \"Q is R1 healthy\"\n shows \"R1 (P;;Q) = ((R1 P);;Q)\"", "output": "using A B\napply (subst R1_comp[simplified Healthy_def, symmetric])\napply (auto simp: fun_eq_iff rp_defs design_defs) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fbox_seq_var: \"p' \\ |y] q \\ p \\ |x] p' \\ p \\ |x \\ y] q\"", "output": "proof - assume h1: \"p \\ |x] p'\" and h2: \"p' \\ |y] q\" hence \"|x] p' \\ |x] |y] q\"\nby (simp add: dka.dom_iso fbox_iso) thus ?thesis\nby (metis h1 dual_order.trans fbox_seq)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tseq_test_seq:\n \"p = --p \\ q = --q \\ r = --r \\ test_seq (tseq p x q r)\"", "output": "using test_seq_def tseq_test\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conjugate_exponent_ennreal_iff:\n assumes \"p \\ (1::ennreal)\"\n shows \"q = conjugate_exponent p \\ (1/p + 1/q = 1)\"", "output": "using conjugate_exponent_ennreal[OF assms]\nby (auto, metis ennreal_add_diff_cancel_left ennreal_add_eq_top ennreal_top_neq_one one_divide_one_divide_ennreal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uniqify_mset: \"queue_invar q \\ queue_to_multiset q = queue_to_multiset (uniqify q)\"", "output": "apply (cases q)\napply simp\napply (simp add: ins_mset) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma seq_comp_prop_2:\n assumes WS: \"weakly_sequential P\"\n shows \"(xs @ [x], X) \\ seq_comp_failures P Q \\\n (xs, {}) \\ seq_comp_failures P Q\"", "output": "by (erule seq_comp_prop_2_aux [OF WS], simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma test_huntington2: \"test p \\ test q \\ !(p + q) + !(p + !q) = !p\"", "output": "proof - assume a1: \"test p\" assume a2: \"test q\" have \"p = !(!p)\"\nusing a1 test_double_comp_var\nby blast thus ?thesis\nusing a2\nby (metis (full_types) n_huntington2 test_double_comp_var)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weakenSimE:\n fixes F :: 'b\n and P :: \"('a, 'b, 'c) psi\"\n and Rel :: \"('b \\ ('a, 'b, 'c) psi \\ ('a, 'b, 'c) psi) set\"\n and Q :: \"('a, 'b, 'c) psi\"\n\n assumes \"\\ \\ P \\\\<^sub>w Q\"\n\n shows \"\\\\ Q'. \\\\ \\ Q \\\\ \\ Q'; bn \\ \\* \\; bn \\ \\* P\\ \\ \n \\P'. \\ \\ P \\\\ \\ P' \\ (\\, P', Q') \\ Rel\"", "output": "using assms\nby(auto simp add: weakenSimulation_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bangExtLeft:\n fixes \\ :: 'b\n and P :: \"('a, 'b, 'c) psi\"\n\n assumes \"guarded P\"\n and \"\\\\' Q. (\\', Q, Q) \\ Rel\"\n\n shows \"\\ \\ !P \\[Rel] P \\ !P\"", "output": "using assms\nby(auto simp add: simulation_def dest: Bang)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Legendre_prod_mset [simp]: \"prime p \\ Legendre (prod_mset M) p = (\\q\\#M. Legendre q p)\"", "output": "by (induction M) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coprime_rat_poly_real_poly:\n assumes \"coprime p (q::rat poly)\"\n shows \"coprime (real_of_rat_poly p) ((real_of_rat_poly q)::real poly)\"", "output": "by (metis assms gcd_dvd_1 of_rat_hom.map_poly_gcd of_rat_poly_hom.hom_dvd_1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iff_qf[simp]: \"qfree p \\ qfree q \\ qfree (iff p q)\"", "output": "unfolding iff_def\nby (cases \"p = q\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem TBtheorem5b_PQ:\nassumes \"(eoutM P M E) \\ (eoutM Q M E)\" \n and \"subcomponents PQ = {P,Q}\"\n and \"correctCompositionOut PQ\"\n and \"\\ ch. (((ch \\ (out P)) \\ (ch \\ (out Q) )) \\ (ch \\ M) \n \\ (exprChannel ch E) \\ (ch \\ (loc PQ)))\"\nshows \"eoutM PQ M E\"", "output": "using assms\nby (simp add: eoutM_def correctCompositionOut_def, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_approx2T: \"\\ P\\Q; s \\ D P\\ \\ s \\ T Q = (s \\ T P)\"", "output": "by(auto simp: le_approx2 T_F_spec[symmetric])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fractrel_normalize_quot:\n \"fractrel p p \\ fractrel q q \\ \n fractrel (normalize_quot p) (normalize_quot q) \\ fractrel p q\"", "output": "by (subst fractrel_normalize_quot_left fractrel_normalize_quot_right, simp)+ (rule refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_spmf_eq_map_spmf_iff: \"map_spmf f p = map_spmf g q \\ rel_spmf (\\x y. f x = g y) p q\"", "output": "by(simp add: spmf_rel_eq[symmetric] spmf_rel_map)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma propa_property2: \n fixes ss w qs q\n assumes step_bounded_pres: \"\\(q, \\) \\ set qs. q < size ss \\ \\ \\ A\"\n and sorted_w: \"sorted (w ::nat list)\"\n and subset_ss_A: \"set ss \\ A\"\n and len_ss_n: \"length ss = n \"\n and dist: \"distinct (map fst qs) \"\n and q_nin: \"q \\ set(map fst qs) \"\n and q_lt_len_ss: \"q < length ss \"\n shows \"(fst(propa f qs ss w))!q = ss!q\"", "output": "using assms\napply (subgoal_tac \"fst (propa f qs ss w) = merges f qs ss\")\napply(simp add: merges_property2)\nby (auto dest:decomp_propa)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma test_below_pre_test_mult:\n \"-q \\ -p\\-p*-q\"", "output": "by (metis pre_test tests_dual.sba_dual.reflexive tests_dual.sba_dual.shunting tests_dual.sub_sup_closed)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma peek_and_forget1_Normal: \n \"G,(A::'a triple set)\\{Normal P} t\\ {Q::'a assn} \n \\ G,A\\{Normal (P \\. p)} t\\ {Q}\"", "output": "apply (erule conseq1)\napply (simp (no_asm)) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma elim:\n fixes P :: pi\n and Rel :: \"(pi \\ pi) set\"\n and Q :: pi\n and a :: name\n and x :: name\n and Q' :: pi\n\n assumes \"P \\[Rel] Q\"\n\n shows \"Q \\ a<\\x> \\ Q' \\ x \\ P \\ \\P'. P \\ a<\\x> \\ P' \\ (P', Q') \\ Rel\"\n and \"Q \\ \\ \\ Q' \\ \\P'. P \\ \\ \\ P' \\ (P', Q') \\ Rel\"", "output": "using assms\nby(simp add: strongSimEarly_def)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rat_to_normalized_int_poly_code[code]:\n \"rat_to_normalized_int_poly p = (if p = 0 then (1,0) else case rat_to_int_poly p of (s,q)\n \\ let c = content q in (of_int c / of_int s, sdiv_poly q c))\"", "output": "unfolding Let_def rat_to_normalized_int_poly_def primitive_part_alt_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma reflection_of_barbs_in_barbed_encoding:\n fixes Rel :: \"(('procS, 'procT) Proc \\ ('procS, 'procT) Proc) set\"\n and P Q :: \"('procS, 'procT) Proc\"\n and a :: \"'barbs\"\n assumes reflection: \"rel_reflects_barbs Rel (STCalWB SWB TWB)\"\n and rel: \"(P, Q) \\ Rel\"\n and barb: \"Q\\.a\"\n shows \"P\\.a\"", "output": "using reflection rel barb\nby (simp add: STCalWB_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rule_cons_pre:\n \"-p \\ -q \\ -q\\x\\-r \\ -p\\x\\-r\"", "output": "using rule_cons tests_dual.sba_dual.reflexive\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma imp_qf[simp]: \"qfree p \\ qfree q \\ qfree (imp p q)\"", "output": "using imp_def\nby (cases \"p = F \\ q = T\") (simp_all add: imp_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma EndPhase1_HInv3_nL: \n \"\\ EndPhase1 s s' t; \\HInv3_L s p q d; t\\p; t\\ q \\\n \\ \\HInv3_L s' p q d\"", "output": "by(auto simp add: EndPhase1_def InitializePhase_def HInv3_L_def hasRead_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma maintain_invar2_first_step_presentation: \n assumes INV: \"prim_invar2_init Q \\\"\n assumes UNS: \"Q u = enat d\"\n shows \"prim_invar2_ctd (Q' Q \\ u) (\\' Q \\ u)\n \\ T_measure2 (Q' Q \\ u) (\\' Q \\ u) < T_measure2 Q \\\"", "output": "using maintain_invar2_first_step assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sterms_cterms [elim]:\n assumes \"p \\ cterms \\\"\n and \"q \\ sterms \\ p\"\n and \"wellformed \\\"\n shows \"q \\ cterms \\\"", "output": "using assms\nby - (cases p, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult_poly_raw_simp[simp]:\n \\mult_poly_raw [] q = []\\\n \\mult_poly_raw (x # p) q = mult_poly_raw p q @ map (mult_monomials x) q\\", "output": "subgoal\nby (auto simp: mult_poly_raw_def) subgoal\nby (induction p) (auto simp: mult_poly_raw_def foldl_append_empty) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cond_hoare_r_wp: \n assumes \"\\p'\\S\\q\\\\<^sub>u\" and \"\\p''\\T\\q\\\\<^sub>u\"\n shows \"\\(b \\ p') \\ (\\b \\ p'')\\S \\ b \\\\<^sub>r T\\q\\\\<^sub>u\"", "output": "using assms\nby pred_simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bisimSubstBangPres:\n fixes \\ :: 'b\n and P :: \"('a, 'b, 'c) psi\"\n and Q :: \"('a, 'b, 'c) psi\"\n \n assumes \"\\ \\ P \\\\<^sub>s Q\"\n and \"guarded P\"\n and \"guarded Q\"\n\n shows \"\\ \\ !P \\\\<^sub>s !Q\"", "output": "using assms\nby(fastforce intro: closeSubstI closeSubstE bisimBangPres guardedSeqSubst)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HT_generalize_penv:\n assumes \"HT_mods Map.empty mods P c Q\"\n shows \"HT_mods \\ mods P c Q\"", "output": "using assms unfolding HT_mods_def HT_def wp_def\napply auto\nusing big_step_mono_prog map_le_empty\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mono_sync_FD[simp]: \"\\P \\ P'; Q \\ Q'\\ \\ (P \\ A \\ Q) \\ (P' \\ A \\ Q')\"", "output": "using mono_sync_FD_oneside[of P P' A Q] mono_sync_FD_oneside[of Q Q' A P]\nby (simp add: order_trans sync_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ord_spmf_map_spmf2: \"ord_spmf R p (map_spmf f q) = ord_spmf (\\x y. R x (f y)) p q\"", "output": "by(simp add: pmf.rel_map ord_option_map2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SeqRule: \"\\ \\- p c1 r; \\- r c2 q \\ \\ \\- p (Seq c1 c2) q\"", "output": "apply(rule Seq)\napply fast+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sig_red_regular_rtrancl_lc:\n assumes \"(sig_red (\\\\<^sub>t) top_tail F)\\<^sup>*\\<^sup>* p q\"\n shows \"lc q = lc p\"", "output": "using assms\nby (induct, auto dest: sig_red_regular_lc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pre_post_right_isotone:\n \"-p \\ -q \\ -r\\-p \\ -r\\-q\"", "output": "using order_lesseq_imp pre_iso pre_post_galois\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ceiling_divide_upper:\n fixes q :: \"'a::floor_ceiling\"\n shows \"q > 0 \\ p \\ of_int (ceiling (p / q)) * q\"", "output": "by (meson divide_le_eq le_of_int_ceiling)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extend_indets_inject:\n assumes \"extend_indets p = extend_indets (q::_ \\\\<^sub>0 _::comm_ring_1)\"\n shows \"p = q\"", "output": "proof - from assms have \"extend_indets (p - q) = 0\"\nby (simp add: extend_indets_minus) thus ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transitive:\n fixes P :: pi\n and Q :: pi\n and R :: pi\n \n assumes \"P \\\\<^sup>s Q\"\n and \"Q \\\\<^sup>s R\"\n \n shows \"P \\\\<^sup>s R\"", "output": "using assms\nby(force simp add: congruenceSubst_def substClosed_def intro: Weak_Late_Cong.transitive)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hoare_triple_preI: \n assumes \"\\h. h\\P \\

c \"\n shows \"

c \"", "output": "using assms unfolding hoare_triple_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tauStepChainPar2:\n fixes \\ :: 'b\n and \\\\<^sub>P :: 'b\n and Q :: \"('a, 'b, 'c) psi\"\n and Q' :: \"('a, 'b, 'c) psi\"\n and P :: \"('a, 'b, 'c) psi\"\n and A\\<^sub>P :: \"name list\"\n\n assumes \"\\ \\ \\\\<^sub>P \\ Q \\\\<^sub>\\ Q'\"\n and \"extractFrame P = \\A\\<^sub>P, \\\\<^sub>P\\\"\n and \"A\\<^sub>P \\* \\\"\n and \"A\\<^sub>P \\* Q\"\n\n shows \"\\ \\ P \\ Q \\\\<^sub>\\ P \\ Q'\"", "output": "using assms\nby(induct rule: trancl.induct) (auto dest: Par2 trancl_into_trancl tauStepChainFreshChain)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma butlast_split: \"n < length q \\ butlast q = (take n q)@(drop n (butlast q))\"", "output": "by (metis append_take_drop_id take_butlast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma progressing_appendD2:\n assumes \"progressing (p @ q)\" shows \"progressing q\"", "output": "using assms unfolding progressing_def\nby (metis append_assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rule_disj_pre:\n \"-p\\x\\-r \\ -q\\x\\-r \\ -p\\-q\\x\\-r\"", "output": "by (metis rule_disj tests_dual.sba_dual.sup_idempotent)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rtrancl_last_touch: \"\\ (q,q')\\R\\<^sup>*; q\\S; !!qt. \\ qt\\S; (q,qt)\\R\\<^sup>*; (qt,q')\\(R-UNIV\\S)\\<^sup>* \\ \\ P \\ \\ P\"", "output": "by (erule rtrancl_last_visit') auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hfref_mop_conv: \"((g,mop P f) \\ [Q]\\<^sub>a R \\ S) \\ (g,f) \\ [\\x. P x \\ Q x]\\<^sub>a R \\ S\"", "output": "apply (simp add: hfref_to_ASSERT_conv)\napply (fo_rule arg_cong fun_cong)+\nby (auto intro!: ext simp: pw_eq_iff refine_pw_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LemAnnoNoAbrupt:\nassumes conseq: \"P \\ {s. \\Z. s\\P' Z \\ (\\t. t \\ Q' Z \\ t \\ Q)}\"\nassumes lem: \"\\Z. \\,\\ \\\\<^sub>t\\<^bsub>/F\\<^esub> (P' Z) c (Q' Z),{}\"\nshows \"\\,\\\\\\<^sub>t\\<^bsub>/F\\<^esub> P (lem x c) Q,{}\"", "output": "apply (rule Lem [OF lem])\nusing conseq\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LocalSecretsComposition_exprChannel_s:\nassumes \"exprChannel x (sE Secrets)\"\n and \"\\ ine P (sE Secrets)\"\n and \"\\ ine Q (sE Secrets)\"\n and \"\\ (x \\ ins P \\ x \\ ins Q)\"\nshows \"False\"", "output": "using assms\nby (metis ine_ins_neg1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_spmf_sample_set_excl [simp]: \n assumes \"finite (Q - P)\" \n shows \"set_spmf (sample_set_excl Q P) = (Q - P)\"", "output": "unfolding sample_set_excl_def\nby (metis set_spmf_of_set assms)+"} {"instruct": "Given a lemma, please prove it.", "input": "theorem TBtheorem5a_notP1:\nassumes \"eout P E\"\n and \"\\ eout Q E\"\n and \"subcomponents PQ = {P,Q}\"\n and \"correctCompositionOut PQ\"\n and \"\\ ch. ((out_exprChannelSingle P ch E) \\ (ch \\ (loc PQ)))\"\nshows \"\\ eout PQ E\"", "output": "using assms\nby (simp add: eout_def correctCompositionOut_def out_exprChannelSingle_def, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diff_prime_power_imp_coprime:\n assumes \"p \\ q\" \"Factorial_Ring.prime (p::nat)\" \"Factorial_Ring.prime q\"\n shows \"coprime (p ^ (n::nat)) (q ^ m)\"", "output": "using assms\nby (metis power_0 power_one_right prime_dvd_power prime_imp_power_coprime_nat prime_nat_iff prime_power_inj'')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nextl_eps: \"q \\ nextl Q u \\ (q,q') \\ eps M \\ q' \\ states M \\ q' \\ nextl Q u\"", "output": "using rtrancl_into_rtrancl epsclo_nextl epsclo_eq_Image\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bisimStructCong:\n fixes P :: ccs\n and Q :: ccs\n\n assumes \"P \\\\<^sub>s Q\"\n\n shows \"P \\ Q\"", "output": "using assms\napply(nominal_induct rule: Struct_Cong.strong_induct)\nby(auto intro: reflexive symmetric transitive parComm parAssoc parId sumComm sumAssoc sumId resNil scopeExt scopeExtSum resAct resComm bangUnfold)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sumPres:\n fixes P :: pi\n and Q :: pi\n and R :: pi\n\n assumes \"P \\\\<^sup>s Q\"\n\n shows \"P \\ R \\\\<^sup>s Q \\ R\"", "output": "using assms\nby(force simp add: substClosed_def intro: Strong_Late_Bisim_Pres.sumPres)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma col_transitivity_2:\n assumes \"P \\ Q\" and\n \"Col P Q A\" and\n \"Col P Q B\"\n shows \"Col Q A B\"", "output": "by (metis Tarski_neutral_dimensionless.col_transitivity_1 Tarski_neutral_dimensionless_axioms assms(1) assms(2) assms(3) not_col_permutation_4)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in ordered_term) mult_scalar_tail_rec_left:\n \"p \\ q = monom_mult (punit.lc p) (punit.lt p) q + (punit.tail p) \\ q\"", "output": "unfolding punit.lc_def punit.tail_alt\nby (fact mult_scalar_rec_left)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weakSimE:\n fixes P :: ccs\n and Rel :: \"(ccs \\ ccs) set\"\n and Q :: ccs\n and \\ :: act\n and Q' :: ccs\n\n assumes \"P \\ Q\"\n and \"Q \\\\ \\ Q'\"\n\n obtains P' where \"P \\\\ \\ P'\" and \"(P', Q') \\ Rel\"", "output": "using assms\nby(auto simp add: weakCongSimulation_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmf_rel_map_restrict_relp: \n shows pmf_rel_map_restrict_relp1: \"rel_pmf (R \\ P \\ Q) (map_pmf f p) = rel_pmf (R \\ f \\ P \\ f \\ Q) p\"\n and pmf_rel_map_restrict_relp2: \"rel_pmf (R \\ P \\ Q) p (map_pmf g q) = rel_pmf ((\\x. R x \\ g) \\ P \\ Q \\ g) p q\"", "output": "by(simp_all add: pmf.rel_map restrict_relp_def fun_eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"ffilter p (ffilter q xs) = ffilter (\\x. q x \\ p x) xs\"", "output": "using filter_filter [Transfer.transferred] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma parSym:\n fixes P :: pi\n and Q :: pi\n\n shows \"P \\ Q \\\\<^sup>s Q \\ P\"", "output": "proof - have \"P \\ Q \\\\<^sup>s Q \\ P\"\nby(rule Strong_Late_Bisim_Subst_SC.parSym) thus ?thesis\nby(rule strongBisimWeakBisim)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma br'_inner_invar_imp_final: \n \"\\ q\\W; br'_inner_invar {r\\\\. q\\set (rhsq r)} q (Q,W-{q},rcm) {} \\' \\ \n \\ ((Q,W,rcm),\\') \\ br'_step \\\"", "output": "apply (unfold br'_inner_invar_def)\napply auto\napply (rule br'_step.intros)\napply assumption\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind_spmf_cong:\n \"\\ p = q; \\x. x \\ set_spmf q \\ f x = g x \\\n \\ bind_spmf p f = bind_spmf q g\"", "output": "by(auto simp add: bind_spmf_def in_set_spmf intro: bind_pmf_cong option.case_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma t_seq_pre_expression:\n \"x \\ While_program \\ p \\ Test_expression \\ q \\ Pre_expression \\ tseq (-p) x (p\\x\\q) (-p\\(x\\(p\\x\\q)*aL)) m \\ Pre_expression\"", "output": "using Pre_expression.pre_pre Pre_expression.test_pre Test_expression.neg_test While_program.while_prog aL_pre_expression tfun_def tfun_pre_expression tseq_pre_expression\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_spmf_spmf_of_pmf [simp]: \"rel_spmf R (spmf_of_pmf p) (spmf_of_pmf q) = rel_pmf R p q\"", "output": "by(simp add: spmf_of_pmf_def pmf.rel_map)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rw_rat_alt: \"rw_rat = (\\p q. \\ rw_rat_strict q p)\"", "output": "by (intro ext, auto simp: rw_rat_def rw_rat_strict_def Let_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simE:\n fixes F :: 'b\n and P :: \"('a, 'b, 'c) psi\"\n and Rel :: \"('b \\ ('a, 'b, 'c) psi \\ ('a, 'b, 'c) psi) set\"\n and Q :: \"('a, 'b, 'c) psi\"\n\n assumes \"\\ \\ P \\[Rel] Q\"\n\n shows \"\\\\ Q'. \\\\ \\ Q \\\\ \\ Q'; bn \\ \\* \\; bn \\ \\* P\\ \\ \\P'. \\ \\ P \\\\ \\ P' \\ (\\, P', Q') \\ Rel\"", "output": "using assms\nby(auto simp add: simulation_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma push_down_state_rank_tokens:\n \"state_rank q n = Some i \\ configuration q n \\ {}\"", "output": "by (metis not_Some_eq state_rank.elims)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma atomic1: \"\\w. \\q. q w \\ (\\p. p w \\ q \\<^bold>\\ p)\"", "output": "using the_sym_eq_trivial\nby (metis (full_types))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simIFresh[consumes 4, case_names cSim]:\n fixes \\ :: 'b\n and P :: \"('a, 'b, 'c) psi\"\n and Rel :: \"('b \\ ('a, 'b, 'c) psi \\ ('a, 'b, 'c) psi) set\"\n and Q :: \"('a, 'b, 'c) psi\"\n and x :: name\n and C :: \"'d::fs_name\"\n\n assumes Eqvt: \"eqvt Rel\"\n and \"x \\ \\\"\n and \"x \\ P\"\n and \"x \\ Q\"\n and \"\\\\ Q'. \\\\ \\ Q \\\\ \\ Q'; bn \\ \\* P; bn \\ \\* Q; bn \\ \\* \\;\n bn \\ \\* subject \\; distinct(bn \\); bn \\ \\* C; x \\ \\; x \\ Q'\\ \\\n \\P'. \\ \\ P \\\\ \\ P' \\ (\\, P', Q') \\ Rel\"\n\n shows \"\\ \\ P \\[Rel] Q\"", "output": "using assms\nby(rule_tac xvec=\"[x]\" and C=C in simIChainFresh) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Prim2) Prim_Invar2_ctd_Presentation_Loc_eq:\n \"Prim_Invar2_ctd_Presentation_Loc w g r Q \\ \\ prim_invar2_ctd Q \\\"", "output": "unfolding Prim_Invar2_ctd_Presentation_Loc_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma det3_eq_zeroI:\n assumes \"p = q + x *\\<^sub>R (t - q)\"\n shows \"det3 q t p = 0\"", "output": "unfolding assms\nby (auto simp: det3_def' algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tauPres:\n fixes P :: pi\n and Q :: pi\n \n assumes \"P \\ Q\"\n\n shows \"\\.(P) \\ \\.(Q)\"", "output": "using assms\nby(blast intro: unfoldI Weak_Late_Step_Sim_Pres.tauPres dest: congruenceWeakBisim symetric)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_impl_aux_alt_cava_reorder:\n \"prod = (\\\n g_V = Collect (\\(q,s). q \\ igba.V \\ s \\ sa.V),\n g_E = E_of_succ (\\(q,s). \n if igba.L q (sa.L s) then \n (\\(s,q). (q,s))`(LIST_SET_REV_TAG (succ_of_E (sa.E) s) \n \\ (succ_of_E (igba.E) q))\n else\n {}\n ),\n g_V0 = igba.V0 \\ sa.V0,\n igbg_num_acc = igba.num_acc,\n igbg_acc = \\(q,s). if s\\sa.V then igba.acc q else {}\n \\)\"", "output": "unfolding prod_def\napply (auto simp: succ_of_E_def E_of_succ_def split: if_split_asm) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma resultant_sub: \"resultant p q = resultant_sub (degree p) (degree q) p q\"", "output": "unfolding resultant_def sylvester_mat_def resultant_sub_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tl_queue_rep: \"\\is_empty q \\ linearize (tl_queue q) = tl (linearize q)\"", "output": "by transfer (auto simp: tl_append split: prod.splits list.splits elim!: tl_queue_t.elims)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem hoare3_sound_complete: \"\\\\<^sub>3 {P}c{Q} \\ \\\\<^sub>3 {P}c{Q}\"", "output": "using hoare3_complete hoare3_sound\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nn_integral_try_spmf:\n \"nn_integral (measure_spmf (try_spmf p q)) f = nn_integral (measure_spmf p) f + nn_integral (measure_spmf q) f * pmf p None\"", "output": "by(simp add: nn_integral_measure_spmf spmf_try_spmf distrib_right nn_integral_add ennreal_mult mult.assoc nn_integral_cmult) (simp add: mult.commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rule_cons_pre_mult:\n \"-q\\x\\-r \\ -p*-q\\x\\-r\"", "output": "by (metis tests_dual.sub_sup_closed rule_cons_pre tests_dual.upper_bound_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pair_commute_spmf:\n \"pair_spmf p q = map_spmf (\\(y, x). (x, y)) (pair_spmf q p)\"", "output": "unfolding pair_spmf_alt_def\nby(subst bind_commute_spmf)(simp add: map_spmf_conv_bind_spmf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Close1:\n fixes P :: pi\n and y :: name\n and P'' :: pi\n and a :: name\n and x :: name\n and P' :: pi\n and Q :: pi\n and Q' :: pi\n \n assumes PTrans: \"P \\\\<^sub>ly in P''\\a \\ P'\"\n and QTrans: \"Q \\\\<^sub>l\\<^sup>^a<\\y> \\ Q'\"\n and xFreshP: \"y \\ P\"\n and xFreshQ: \"y \\ Q\"\n\n shows \"P \\ Q \\\\<^sub>l\\<^sup>^\\ \\ <\\y>(P' \\ Q')\"", "output": "using assms\nby(auto intro: Weak_Late_Step_Semantics.Close1 simp add: weakTransition_def residual.inject)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma djf_simps:\n \"djf f p T = T\"\n \"djf f p F = f p\"\n \"q \\ T \\ q \\ F \\ djf f p q = (let fp = f p in case fp of T \\ T | F \\ q | _ \\ Or (f p) q)\"", "output": "by (simp_all add: djf_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matchPres:\n fixes P :: pi\n and Q :: pi\n and a :: name\n and b :: name\n\n assumes \"P \\ Q\"\n\n shows \"[a\\b]P \\ [a\\b]Q\"", "output": "using assms\nby(blast intro: unfoldI Weak_Late_Step_Sim_Pres.matchPres dest: unfoldE symetric)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem par_by_merge_commute:\n assumes \"M is SymMerge\"\n shows \"P \\\\<^bsub>M\\<^esub> Q = Q \\\\<^bsub>M\\<^esub> P\"", "output": "by (metis Healthy_if assms par_by_merge_commute_swap)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pcompose_mult: \"pcompose (p * q) r = pcompose p r * pcompose q r\"\n for p q r :: \"'a::comm_semiring_0 poly\"", "output": "by (induct p arbitrary: q) (simp_all add: pcompose_add pcompose_smult pcompose_pCons algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma validNF_conjD1: \"\\ P \\ f \\ \\rv s. Q rv s \\ Q' rv s \\! \\ \\ P \\ f \\ Q \\!\"", "output": "by (fastforce simp: validNF_def valid_def no_fail_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma norm_pre_pure_iff[simp]:\n \"b> f \\ (b \\

(\\::'a set set \\ 'a set) = (\\ ::'a set set \\ 'a set) \\ (\\::'a set set set \\ 'a set set)\"", "output": "using fun_eq_iff\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_sorted_list_of_set [simp]:\n \"finite A \\ length (sorted_list_of_set A) = card A\"", "output": "by (metis length_remdups_card_conv length_sort set_sorted_list_of_set sorted_list_of_set_sort_remdups)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ofilter_under_Union:\n\"ofilter A \\ A = \\{under a| a. a \\ A}\"", "output": "using ofilter_under_UNION [of A]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_all_transfer [transfer_rule]:\n \"((A ===> (=)) ===> list_all2 A ===> (=)) list_all list_all\"", "output": "unfolding list_all_iff [abs_def]\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma at_ide_is_diagram:\n assumes a: \"A.ide a\"\n shows \"diagram J B (at a D)\"", "output": "proof - interpret Da: \"functor\" J B \"at a D\"\nusing a functor_at_ide_is_functor functor_axioms\nby simp show ?thesis ..\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in equivalence) closure_idem_strong:\n assumes \"A \\ carrier S\"\n shows \"closure_of (closure_of A) = closure_of A\"", "output": "using assms closure_of_eq complete_classes is_closedI\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pair_completeD:\n assumes \"pair_complete A r\"\n shows \"x \\ A \\ y \\ A \\ \\s. extreme_bound A r {x,y} s\"", "output": "by (intro completeD[OF assms[unfolded pair_complete_def]], auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma graph_le:\n assumes \"finite (nodes A)\" \"w \\ language A\"\n assumes \"v \\ graph A w k\"\n shows \"k \\ 2 * card (nodes A)\"", "output": "using graph_empty graph_antimono assms\nby (metis (no_types, lifting) Suc_leI antimono_def basic_trans_rules(30) empty_iff not_le_imp_less)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma orthogonal_clauses:\n \"orthogonal a 0\"\n \"orthogonal a x \\ orthogonal a (scale c x)\"\n \"orthogonal a x \\ orthogonal a (- x)\"\n \"orthogonal a x \\ orthogonal a y \\ orthogonal a (x + y)\"\n \"orthogonal a x \\ orthogonal a y \\ orthogonal a (x - y)\"\n \"orthogonal 0 a\"\n \"orthogonal x a \\ orthogonal (scale c x) a\"\n \"orthogonal x a \\ orthogonal (- x) a\"\n \"orthogonal x a \\ orthogonal y a \\ orthogonal (x + y) a\"\n \"orthogonal x a \\ orthogonal y a \\ orthogonal (x - y) a\"", "output": "unfolding orthogonal_def inner_add inner_diff\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lookup_default_fold_combine_plus: \n fixes A :: \"'b set\" and f :: \"'b \\ ('a, real) mapping\"\n assumes \"finite A\"\n shows \"Mapping.lookup_default 0 (fold_combine_plus f A) x = \n (\\y\\A. Mapping.lookup_default 0 (f y) x)\"", "output": "unfolding fold_combine_plus_def\nusing assms\nby (induction A rule: finite_induct) (simp_all add: lookup_default_empty lookup_default_neutral_combine)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ann_matches_imp_assertionsR:\n \"ann_matches \\ \\ a c \\ \\ pre_par a \\\n assertionsR \\ \\ Q A a c (pre a)\"", "output": "by (induct arbitrary: Q A rule: ann_matches.induct , (fastforce intro: assertionsR.intros )+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Polys_closed_prod: \"(\\a. a \\ A \\ f a \\ P[X]) \\ prod f A \\ P[X]\"", "output": "by (induct A rule: infinite_finite_induct) (auto intro: one_in_Polys Polys_closed_times)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adjoint_scale:\n fixes A :: \"'a::conjugatable_field mat\"\n shows \"adjoint (a \\\\<^sub>m A) = (conjugate a) \\\\<^sub>m adjoint A\"", "output": "apply (rule eq_matI)\nusing conjugatable_ring_class.conjugate_dist_mul\nby (auto simp add: adjoint_eval)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_to_iarray_invertible[code_unfold]:\nfixes A::\"'a::{field}^'n::{mod_type}^'n::{mod_type}\"\nshows \"invertible A = invertible_iarray (matrix_to_iarray A)\"", "output": "unfolding invertible_iarray_def invertible_eq_full_rank[of A] matrix_to_iarray_rank matrix_to_iarray_nrows .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma FDOM_eff_subset_prob_dom_pair:\n fixes a\n assumes \"a \\ PROB\"\n shows \"fmdom' (snd a) \\ prob_dom PROB\"", "output": "using assms(1) FDOM_eff_subset_prob_dom surjective_pairing\nby metis \\ \\TODO unwrap metis\nproof.\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma MOST_eq [simp]:\n \"(MOST x::'a. x = a) \\ finite (UNIV::'a set)\"\n \"(MOST x::'a. a = x) \\ finite (UNIV::'a set)\"", "output": "unfolding eventually_cofinite\nby simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordIso_natLeq_infinite1:\n\"|A| =o natLeq \\ \\finite A\"", "output": "using ordIso_symmetric ordIso_imp_ordLeq infinite_iff_natLeq_ordLeq\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordering_transfer[transfer_rule]:\n assumes [transfer_rule]: \"bi_unique A\" \"right_total A\" \n shows \n \"((A ===> A ===> (=)) ===> (A ===> A ===> (=)) ===> (=)) \n (ordering_ow (Collect (Domainp A))) ordering\"", "output": "unfolding ordering_ow_def ordering_def\napply transfer_prover_start\napply transfer_step+ unfolding Ball_Collect[symmetric]\nby (intro ext HOL.arg_cong2[where f=\"(\\)\"]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strictly_maximal_wrt_subst:\n \"strictly_maximal_wrt (A \\a \\) (C \\ \\) \\ strictly_maximal_wrt A C\"", "output": "unfolding strictly_maximal_wrt_def\nusing in_atms_of_subst less_atm_stable\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rQuots_simps [simp]:\n shows \"rQuots [] A = A\"\n and \"rQuots (c # s) A = rQuots s (rQuot c A)\"\n and \"rQuots (s1 @ s2) A = rQuots s2 (rQuots s1 A)\"", "output": "unfolding rQuots_def rQuot_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_sorted_list_of_set[simp]: \"mset (sorted_list_of_set A) = mset_set A\"", "output": "by (metis mset_sorted_list_of_multiset sorted_list_of_mset_set)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dvd_gcd_0_iff[simp]:\n shows \"x dvd gcd 0 a \\ x dvd a\" (is ?g1)\n and \"x dvd gcd a 0 \\ x dvd a\" (is ?g2)", "output": "proof- have \"a dvd gcd a 0\" \"a dvd gcd 0 a\"\nby (auto intro: gcd_greatest) with dvd_refl show ?g1 ?g2\nby (auto dest: dvd_trans)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valof_uminus:\n assumes \"is_finite a\"\n shows \"valof (- a) = - valof a\" (is \"?L = ?R\")", "output": "by (cases a rule: sign_cases) (auto simp: valof_eq sign_minus_float)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uconnected_mono: \"A\\A' \\ uconnected A \\ uconnected A'\"", "output": "unfolding uconnected_def\napply(auto)\nusing epath_mono\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dual_SUP: \"(\\(f ` A)) ^ o = (INF a \\ A . (f a) ^ o)\"", "output": "unfolding dual_Sup\napply (subgoal_tac \"(dual ` f ` A) = ((\\a::'b. f a ^ o) ` A)\")\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mkAutoSim_simps[simp]:\n \"pInit (mkAutoSim a) = simInit a\"\n \"pTrans (mkAutoSim a) = (\\obs ec. (SOME ec'. ec' \\ set (simTrans a ec) \\ simObs a ec' = obs))\"\n \"pAct (mkAutoSim a) = simAction a\"", "output": "unfolding mkAutoSim_def\nby simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma consistent_eq_rank_ge_code[code]:\nfixes A::\"'a::{field}^'cols::{mod_type}^'rows::{mod_type}\"\nshows \"consistent A b = (let GJ_P=Gauss_Jordan_PA A; \n P_mult_b = (fst(GJ_P) *v b);\n rank_A = (if A = 0 then 0 else to_nat (GREATEST a. row a (snd GJ_P) \\ 0) + 1) in (rank_A \\ (if (\\a. P_mult_b $ a \\ 0) \n then (to_nat (GREATEST a. P_mult_b $ a \\ 0) + 1) else 0)))\"", "output": "unfolding consistent_eq_rank_ge Let_def rank_Gauss_Jordan_code unfolding Gauss_Jordan_PA_eq P_Gauss_Jordan_def .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma bi_unique_pcr_spmf_gpv [transfer_rule]: \"bi_unique A \\ bi_unique (pcr_spmf_gpv A)\"", "output": "by(simp add: bi_unique_alt_def left_unique_pcr_spmf_gpv right_unique_pcr_spmf_gpv)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wls_freshAbs_psubstAbs_updEnv:\nassumes \"wls (asSort xs) X\" and \"wlsAbs (us,s) A\" and \"wlsEnv rho\"\nand \"freshAbs xs x A\"\nshows \"(A $[rho [x \\ X]_xs]) = (A $[rho])\"", "output": "using assms\nby(simp add: freshAbs_psubstAbs_updEnv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_Inf_Meet [intro?]: \"is_Inf A (\\A)\"", "output": "proof (unfold Meet_def) from ex_Inf obtain inf where \"is_Inf A inf\" .. then show \"is_Inf A (THE inf. is_Inf A inf)\"\nby (rule theI) (rule is_Inf_uniq [OF _ \\is_Inf A inf\\])\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma A_fv: \"\\A. \\ e = \\A\\ \\ A \\ fv e\"\nand \"\\A. \\s es = \\A\\ \\ A \\ fvs es\"", "output": "apply(induct e and es rule: \\.induct \\s.induct)\napply (simp_all add:hyperset_defs)\napply blast+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Skip_is_action: \n\"(R (True \\ \\(A, A'). tr A' = tr A \\ \\wait A' \\ more A = more A')) \\ {p. is_CSP_process p}\"", "output": "apply (simp)\napply (rule rd_is_CSP)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma restrict_simps[simp]:\n \"alphabet (restrict A) = alphabet A\"\n \"initial (restrict A) = initial A\"\n \"transition (restrict A) a p = (if a \\ alphabet A then transition A a p else {})\"\n \"condition (restrict A) = condition A\"", "output": "unfolding restrict_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_vector_all_zero_from_index:\n fixes A::\"'a::{zero}^'columns::{mod_type}^'rows::{mod_type}\"\n shows \"(\\m\\i. A $ m $ k = 0) = (vector_all_zero_from_index (to_nat i, vec_to_iarray (column k A)))\"", "output": "unfolding vector_all_zero_from_index_eq[symmetric] column_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rows_to_keep_lem:\n fixes A:: \"('a::field) mat\"\n shows \"\\ell. ell \\ set (rows_to_keep A) \\ ell < dim_row A\"", "output": "unfolding rows_to_keep_def\napply auto\nusing rref_pivot_positions\nby (metis carrier_mat_triv gauss_jordan_single(2) gauss_jordan_single(3) index_transpose_mat(3))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma D_mndet : \"A\\{} \\ D(mndet A P) = (\\ x\\A. D (x \\ P x))\"", "output": "unfolding mndet_def\napply(simp, subst D_def, subst Process.process.Abs_process_inverse)\nby(auto intro: mndet_is_process[simplified] simp: DIVERGENCES_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma to_of_name[simp]: \"to_name (of_name a) = a\"", "output": "unfolding to_name_def\nusing bij\nby (metis bij_inv_eq_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conjugate_transpose_rank:\n fixes A::\"'a::{conjugatable_ordered_field} mat\"\n shows \"vec_space.rank (dim_row A) A = vec_space.rank (dim_col A) (A\\<^sup>H)\"", "output": "using conjugatable_vec_space.conjugate_transpose_rank_le\nby (metis (no_types, lifting) Matrix.transpose_transpose carrier_matI conjugate_id dim_col_conjugate dual_order.antisym index_transpose_mat(2) transpose_conjugate)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in comm_group) relations_zero_imp_ord_zero:\n assumes \"a \\ A\" \"\\f\\(relations A). f a = 0\"\n and \"a \\ carrier G\"\n shows \"ord a = 0\"", "output": "using assms relations_zero_imp_pow_not_one[OF assms(1, 2)]\nby (meson finite_cyclic_subgroup_int infinite_cyclic_subgroup_order)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma connected_sphere:\n fixes a :: \"'a :: euclidean_space\"\n assumes \"2 \\ DIM('a)\"\n shows \"connected(sphere a r)\"", "output": "using path_connected_sphere [OF assms]\nby (simp add: path_connected_imp_connected)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alpha_A: \n \"\\A::type_scheme list. $ (\\x. TVar (if x : free_tv A then x else n + x)) A = A\"", "output": "apply (rule alpha_A' [THEN ssubst])\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vset_diff_disj_eff_vs:\n fixes PROB a vs\n assumes \"(varset_action a (prob_dom PROB - vs))\"\n shows \"(((fmdom' (snd a)) \\ vs) = {})\"", "output": "using assms unfolding varset_action_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inj_on_image_eqpoll_self: \"inj_on f A \\ f ` A \\ A\"", "output": "by (meson bij_betw_def eqpoll_def eqpoll_sym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma of_int_poly_prod [simp]: \"of_int_poly (prod f A) = prod (\\x. of_int_poly (f x)) A\"", "output": "by (induction A rule: infinite_finite_induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma maxim_equality: \"isMaxim A x \\ maxim A = x\"", "output": "unfolding maxim_def\nby (rule the_equality) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma int_Idl: \"Idl\\<^bsub>\\\\<^esub> {a} = {x * a | x. True}\"", "output": "by (simp_all add: cgenideal_def int.cgenideal_eq_genideal[symmetric])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma degree_le_max_perm_degree: \"degree (det A) \\ max_perm_degree A\"", "output": "unfolding det_eq\nby (rule order_trans[OF degree_sum_le_Max]) (auto intro!: degree_prod_le_max_perm_degree Max_le_iff[THEN iffD2] permutes_id simp: sign_permut)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma det_map_matrix:\n fixes A :: \"int^'n::mod_type^'n::mod_type\"\n shows \"det (map_matrix rat_of_int A) = rat_of_int (det A)\"", "output": "unfolding map_matrix_def unfolding Determinants.det_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma det_wf_nfa:\n assumes A: \"wf_nfa A n\"\n shows \"wf_dfa (det_nfa A) n\"", "output": "proof - from A interpret subset_DFS A n\nby unfold_locales show ?thesis\nby (rule det_wf_nfa)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lm036: \n assumes \"a \\ allAllocations N G\" \n shows \"a \\ injections (Domain a) (Range a) & \n Range a \\ all_partitions G &\n Domain a \\ N\"", "output": "using assms mem_Collect_eq injections_def posssibleAllocationsRelCharacterization order_refl\nby (metis (mono_tags, lifting))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_fm_id [simp]: \"A(a::=Var a) = A\"", "output": "by (nominal_induct A avoiding: a rule: fm.strong_induct) (auto simp: fresh_at_base)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cr_spmf_prob_optionT_bind_transfer:\n \"(cr_spmf_prob_optionT A ===> (A ===> cr_spmf_prob_optionT A) ===> cr_spmf_prob_optionT A)\n (bind_option return_pmf bind_pmf) bind_spmf\"", "output": "by(rule rel_funI cr_spmf_prob_optionTI)+ (auto 4 4 simp add: run_bind_option bind_spmf_def dest!: cr_spmf_prob_optionTD dest: rel_funD intro: rel_pmf_bindI split: option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inconsistent_eq_rank_less:\n fixes A::\"'a::{field}^'cols::{mod_type}^'rows::{mod_type}\"\n shows \"inconsistent A b = (rank A < (if (\\a. (P_Gauss_Jordan A *v b) $ a \\ 0) \n then (to_nat (GREATEST a. (P_Gauss_Jordan A *v b) $ a \\ 0) + 1) else 0))\"", "output": "using inconsistent_imp_rank_less rank_less_imp_inconsistent\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in linorder) le_Max_insertI2: \"\\ finite A; A \\ {}; x \\ Max A \\ \\ x \\ Max (insert b A)\"", "output": "by(auto simp add: max_def not_le simp del: Max_less_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem invertible_target_invertible [intro, simp]:\n \"\\ invertible a; a \\ M \\ \\ invertible' (\\ a)\"", "output": "using invertible_image_lemma\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bezout_ring_imp_diagonal_admits_SNF_mod_ring_admits: \n assumes of: \"class.bezout_ring (*) (1::'a::comm_ring_1) (+) 0 (-) uminus\" (*It is equivalent to the statement based on OFCLASS*)\n shows \"\\A::'a^'n::nontriv mod_ring^'n::nontriv mod_ring. admits_SNF_HA A\"", "output": "using bezout_ring_imp_diagonal_admits_SNF [OF Rings2.class.Rings2.bezout_ring.of_class.intro[OF of]] unfolding admits_SNF_HA_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SatP':\n assumes\n \\(\\<^bold>@ a p) at b in (ps, a) # branch\\\n \\A, n \\ (p # ps, a) # branch\\\n shows \\A, n \\ (ps, a) # branch\\", "output": "using assms SatP Dup STA_Suc\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sactionsE:\n assumes \"a \\ sactions P E\"\n obtains \"a \\ actions E\" \"saction P (action_obs E a)\"", "output": "using assms unfolding sactions_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma induced_modulusD: \"induced_modulus d \\ coprime a n \\ [a = 1] (mod d) \\ \\ a = 1\"", "output": "unfolding induced_modulus_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma row_echelon_form_dim0_row:\nassumes \"A \\ carrier_mat 0 n\"\nshows \"row_echelon_form A\"", "output": "using assms unfolding row_echelon_form_def pivot_fun_def Let_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma derangements_inverse_in_image:\n assumes \"d \\ derangements A\" \"x \\ A\"\n shows \"inv d x \\ A\"", "output": "using assms\nby (auto intro: derangements_in_image derangements_inv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lower_asymptotic_density_finite:\n assumes \"finite A\"\n shows \"lower_asymptotic_density A = 0\"", "output": "using lower_asymptotic_density_in_01(3) upper_asymptotic_density_finite[OF assms] lower_asymptotic_density_le_upper\nby (metis antisym_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma norm_blinfun_transfer[transfer_rule]: \"(rel_blinfun A A ===> (=)) norm norm\"\n if [transfer_rule]: \"(A ===> (=)) norm norm\" \"(rel_set A) UNIV UNIV\"", "output": "unfolding norm_blinfun.rep_eq unfolding onorm_def\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exists_algorithm_is_SNF_imp_admits_diagonal_reduction_all:\n assumes \"(\\algorithm. \\(A::'a mat) \\ carrier_mat m n. is_SNF A (algorithm A))\"\n shows \"(\\(A::'a::comm_ring_1 mat) \\ carrier_mat m n. admits_diagonal_reduction A)\"", "output": "using assms exists_algorithm_is_SNF_imp_admits_diagonal_reduction\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma divisor_asubst[simp]: \"divisor (asubst i ks a) = divisor a\"", "output": "by(induct i ks a rule:asubst.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in aGroup) mem_G_nt:\"\\sfg A a; x \\ carrier A\\ \\ \\n. x = n\\a\\<^bsub>A\\<^esub>\"", "output": "apply (simp add:sfg_def)\napply (erule conjE)\napply (frule single_gen [of \"a\"])\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Domainp_eq_Collect: \"Domainp A = (\\x. x \\ \\) = (\\ = Collect (Domainp A))\"", "output": "by (metis mem_Collect_eq pred_equals_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fst_Gauss_Jordan_column_k_PA:\nfixes A::\"'a::{field}^'cols::{mod_type}^'rows::{mod_type}\"\nassumes PB_A: \"P ** B = A\"\nshows \"fst (Gauss_Jordan_column_k_PA (P,i,A) k) ** B = snd (snd (Gauss_Jordan_column_k_PA (P,i,A) k))\"", "output": "unfolding Gauss_Jordan_column_k_PA_def unfolding Let_def unfolding fst_conv snd_conv\nby (auto intro: assms fst_Gauss_Jordan_in_ij_PA)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_set_pmf_of_setD: \"x \\ set_pmf (pmf_of_set A) \\ finite A \\ A \\ {} \\ x \\ A\"", "output": "by (subst (asm) set_pmf_of_set) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_set_empty_iff: \"mset_set A = {#} \\ A = {} \\ infinite A\"", "output": "using finite_set_mset_mset_set\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_Sup_Join [intro?]: \"is_Sup A (\\A)\"", "output": "proof (unfold Join_def) from ex_Sup obtain sup where \"is_Sup A sup\" .. then show \"is_Sup A (THE sup. is_Sup A sup)\"\nby (rule theI) (rule is_Sup_uniq [OF _ \\is_Sup A sup\\])\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pdevs_domain_One_pdevs[simp]: \"pdevs_domain (One_pdevs::'a::executable_euclidean_space pdevs) =\n {0.. carrier G \\ (\\ (\\ a)) \\ (\\ a) = \\\"", "output": "by (frule i_closed[of \"a\"], cut_tac l_i[of \"\\ a\"], assumption+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma degeneralize_reachable_empty[simp]:\n assumes \"condition\\<^sub>1 A = []\"\n shows \"b.reachable (degeneralize A) (p, k) = a.reachable A p \\ {k}\"", "output": "using degeneralize_reachable_fst degeneralize_reachable_snd_empty assms\nby (metis prod_singleton(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_integral_one':\n assumes \"inverse (1::'a::{ring_1,inverse}) = 1\"\n shows \"fls_integral (1::'a fls) = fls_X\"", "output": "using fls_integral_const'[of 1]\nby (force simp: assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finitely_branching:\n assumes \"reachable a\" \n shows \"finite (Collect (E a))\"", "output": "by (metis assms finite_reachable finite_subset mem_Collect_eq step_reachable subsetI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma twice_power[intro]: \"2 * 2 ^ a = Suc (Suc (2 * bl_bin (Oc \\ a)))\"", "output": "apply(induct a, auto simp: bl_bin.simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma qFreshAbs_imp_ex_qAFreshAbs1:\nassumes \"finite V\" and \"qGoodAbs A\" and \"qFreshAbs zs z A\"\nshows \"\\ A'. qGoodAbs A' \\ A $= A' \\ qAFreshAbs zs z A'\"", "output": "using assms qFreshAbs_imp_ex_qAFreshAbs[of \"{z}\" _ \"undefined(z := {zs})\"]\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pure_tree_parametric [transfer_rule]: \"(rel_fun A (rel_tree A)) pure pure\"", "output": "by(rule rel_funI)(coinduction, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma one_less_log_cancel_iff[simp]: \"1 < a \\ 0 < x \\ 1 < log a x \\ a < x\"", "output": "using log_less_cancel_iff[of a a x]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_to_iarray_ncols:\n fixes A::\"'a^'columns::{mod_type}^'rows::{mod_type}\"\n shows \"ncols A = ncols_iarray (matrix_to_iarray A)\"", "output": "unfolding ncols_def ncols_eq_card_columns .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma limit_nonempty:\n assumes fin: \"finite (range x)\"\n shows \"\\a. a \\ limit x\"", "output": "proof - from fin obtain a where \"a \\ range x \\ infinite (x -` {a})\"\nby (rule inf_img_fin_domE) auto hence \"a \\ limit x\"\nby (auto simp add: limit_vimage) thus ?thesis ..\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rem_effectless_works_4':\n fixes A as\n assumes \"(as \\ valid_plans A)\"\n shows \"(rem_effectless_act as \\ valid_plans A)\"", "output": "using assms\nby (induction as arbitrary: A) (auto simp: valid_plans_def) \\ \\NOTE added lemma.\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Worder) ord_isom_Tw_segment:\"\\Worder E; \n \\a\\carrier D. \\b\\carrier E. \n ord_equiv (Iod D (segment D a)) (Iod E (segment E b)); a\\carrier D\\ \\\n ord_isom (Iod D (segment D a)) (Iod E (segment E (Tw D E a))) \n (restrict (Tw D E) (segment D a))\"", "output": "apply (cut_tac segment_sub[of \"a\"], frule ord_isom_restricted_by_Tw[of \"E\" \"segment D a\"], assumption+, simp add:Tw_segment_segment[of \"E\" \"a\"]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in disc_filtr_prob_space) arbitrage_processE:\n assumes \"arbitrage_process Mkt p\"\n shows \"(\\ m. (self_financing Mkt p) \\ (trading_strategy p) \\\n (\\w \\ space M. cls_val_process Mkt p 0 w = 0) \\\n (AE w in M. 0 \\ cls_val_process Mkt p m w) \\\n 0 < \\

(w in M. cls_val_process Mkt p m w > 0))\"", "output": "using assms disc_filtr_prob_space.arbitrage_process_def disc_filtr_prob_space_axioms self_financingE\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Pw: \"Preorder (Pw w) \\ Total (Pw w)\"", "output": "unfolding preorder_on_def refl_on_def trans_def total_on_def\nby (cases w) (safe, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in infinite_coin_toss_space) spick_eq_pseudo_proj_True:\n shows \"spick w n True = pseudo_proj_True n w\"", "output": "unfolding spick_def pseudo_proj_True_def\nby (metis (full_types) id_apply siterate.code)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma derives_implies_leftderives_gen: \"derives a (u@v) \\ is_word u \\ (\\ w. \n leftderives a (u@w) \\ \n (v = [] \\ w = []) \\ \n (\\ X. is_first X v \\ is_first X w))\"", "output": "using Derivation_implies_leftderives_gen derives_implies_Derivation\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma double_ruler: assumes \"w \\ r\" and \"w' \\ r'\" and \"\\ r \\ r'\" \n shows \"w \\\\<^sub>p w' \\p r \\\\<^sub>p r'\"", "output": "using comp_monotone'[OF \\w' \\ r'\\, of w] unfolding lcp_sym[of w' w]\nusing lcp_ruler[OF comp_monotone'[OF \\w \\ r\\, of w'] _ \\\\ r \\ r'\\]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inprod_cvec_bilinear2 [simp]:\n assumes \"z' = k *\\<^sub>s\\<^sub>v z\"\n shows \"\\w, z'\\ = k * \\w, z\\\"", "output": "using assms\nby (cases z, cases z', cases w) (simp add: vec_cnj_def field_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lincomb_in_finite_cone:\n assumes \"x = lincomb l W\"\n and \"finite W\"\n and \"\\i \\ W . l i \\ 0\"\n and \"W \\ carrier_vec n\"\n shows \"x \\ finite_cone W\"", "output": "using cone_iff_finite_cone assms unfolding finite_cone_def nonneg_lincomb_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem enabledI: \"\\ F \\ Enabled F\"", "output": "proof (clarsimp) fix w assume \"w \\ F\" with seq_app_first_tail[of w] have \"((first w) ## tail w) \\ F\"\nby simp thus \"w \\ Enabled F\"\nby (auto simp: enabled_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma power_eq_1_iff:\n fixes w :: \"'a::real_normed_div_algebra\"\n shows \"w ^ n = 1 \\ norm w = 1 \\ n = 0\"", "output": "by (metis norm_one power_0_left power_eq_0_iff power_eq_imp_eq_norm power_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bv_to_nat_nzero_imp_nempty:\n \"bv_to_nat w \\ 0 \\ norm_unsigned w \\ []\"", "output": "by (induct w rule: bit_list_induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bit_sshiftr1_iff [bit_simps]:\n \\bit (sshiftr1 w) n \\ bit w (if n = LENGTH('a) - 1 then LENGTH('a) - 1 else Suc n)\\\n for w :: \\'a::len word\\", "output": "apply transfer\nby (auto simp add: bit_take_bit_iff bit_signed_take_bit_iff min_def le_Suc_eq simp flip: bit_Suc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dotprod_le_right:\n assumes \"v \\\\<^sub>v w\"\n and \"length b = length w\"\n shows \"b \\ v \\ b \\ w\"", "output": "using assms\nby (auto simp: dotprod_def less_eq_def intro: sum_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fold_delta_b_init_b_mrexps[simp]: \"fold delta_b w (init_b s) \\ mrexps s \\ UNIV\"", "output": "by (induction w arbitrary: s rule: rev_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma p_Suc: \"ennreal (p x y (Suc n)) = (\\\\<^sup>+ w. p w y n \\K x)\"", "output": "unfolding p_def T.emeasure_eq_measure[symmetric]\nby (subst emeasure_Collect_T) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pref_mod_power': assumes \"u \\np w\\<^sup>@l\"\n obtains k z where \"k < l\" and \"z \\np w\" and \"w\\<^sup>@k\\z = u\"", "output": "using pref_mod_list'[of u \"[w]\\<^sup>@l\", unfolded sing_pow_len concat_sing_pow, OF \\u \\np w\\<^sup>@l\\] sing_pow[of _ l w] concat_take_sing[of _ l w] less_imp_le_nat[of _ l]\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lang_rderiv_lderivs[simp]: \"\\wf n r; wf_word n w; a \\ \\ n\\ \\\n lang n (rderiv a (lderivs w r)) = lang n (lderivs w (rderiv a r))\"", "output": "by (induct w arbitrary: n r) (auto, auto simp: lang_lderivs lang_lderiv lang_rderiv lQuot_rQuot)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma approx_HFinite_mult_cancel: \"a \\ HFinite - Infinitesimal \\ a * w \\ a * z \\ w \\ z\"\n for a w z :: \"'a::real_normed_div_algebra star\"", "output": "by (metis DiffD2 Infinitesimal_mult_disj bex_Infinitesimal_iff right_diff_distrib)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma take_bin2bl_lem: \"take m (bin_to_bl_aux (m + n) w bs) = take m (bin_to_bl (m + n) w)\"", "output": "by (induct n arbitrary: w bs) (simp_all (no_asm) add: bin_to_bl_def take_bin2bl_lem1, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_fin_range[dest]: \"w\\<^sub>1 =\\<^sub>F w\\<^sub>2 \\ set w\\<^sub>1 = set w\\<^sub>2\"", "output": "by (induct rule: rtranclp.induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem knapsack_correct:\n \"OPT n W = knapsack n W\"", "output": "by (induction n arbitrary: W; auto simp: OPT_0 OPT_Suc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lossless_response_AND: \"lossless_spmf (response_AND R W s)\"", "output": "by(simp add: response_AND_def lossless_response split_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma longest_Lyndon_suf_ext: \"\\ Lyndon (a # w) \\ LynSuf w = LynSuf (a # w)\"", "output": "using longest_Lyndon_suffix.simps(2)\nby presburger"} {"instruct": "Given a lemma, please prove it.", "input": "lemma shiftl_rev: \"shiftl w n = word_reverse (shiftr (word_reverse w) n)\"", "output": "by (induct n) (auto simp add: shiftl_def shiftr_def shiftl1_rev)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adjust_not_mem:\n assumes w[simp]: \"(w :: 'a vec) : carrier_vec n\"\n and us: \"set (us :: 'a vec list) \\ carrier_vec n\"\n and dist: \"distinct us\"\n and ind: \"w \\ span (set us)\"\n shows \"adjuster n w us + w \\ set us\"", "output": "using adjust_not_in_span[OF assms] span_mem[OF us]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma accepts_or:\n \"accepts (or L R) w = (accepts L w | accepts R w)\"", "output": "apply (simp add:accepts_def steps_or)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma match_correct: \"\\wf_word n w; wf n s\\ \\ match s w \\ w \\ lang n s\"", "output": "unfolding match_def\nby (induct w arbitrary: s) (auto simp: in_fold_lQuot lQuot_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma find_sub_True_sound: \"find_sub_True xs = Some (ys, w, ws, z, zs) \\\n xs = ys @ w # ws @ z # zs \\ (z \\ w \\ w \\ z)\"", "output": "using find_sub_in_sound\nby (induction xs arbitrary: ys w ws z zs rule: find_sub_True.induct) (fastforce split: option.splits)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adjuster_carrier[simp]:\n assumes w: \"(w :: 'a vec) : carrier_vec n\"\n and us: \"set (us :: 'a vec list) \\ carrier_vec n\"\n and dist: \"distinct us\"\n shows \"adjuster n w us : carrier_vec n\"", "output": "using adjuster_in_span span_closed assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmaxsimpchain_CConsI:\n \"\\ maxsimp w; pmaxsimpchain (x#xs); w\\x; w \\ set (x#xs) \\ \\\n pmaxsimpchain (w#x#xs)\"", "output": "using pmaxsimpchain_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ucast_up_app:\n \\to_bl (ucast w :: 'b::len word) = replicate n False @ (to_bl w)\\\n if \\source_size (ucast :: 'a word \\ 'b word) + n = target_size (ucast :: 'a word \\ 'b word)\\\n for w :: \\'a::len word\\", "output": "using that\nby (auto simp add : source_size target_size to_bl_ucast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma kripke_rels_trc_worlds:\n assumes R: \"(w, w') \\ (\\a. relations M a)\\<^sup>*\"\n assumes w: \"w \\ worlds M\"\n assumes M: \"kripke M\"\n assumes W: \"W = worlds M\"\n shows \"w' \\ W\"", "output": "using assms\nby (induct rule: rtrancl_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_from_to_last: \"v \\xs\\ w \\ w \\ set (butlast xs)\"", "output": "by (metis path_from_toE append_butlast_last_id distinct_append not_distinct_conv_prefix)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sdrop_shift: \"sdrop i (w @- s) = drop i w @- sdrop (i - length w) s\"", "output": "by (induct i arbitrary: w s) (auto simp: drop_tl drop_Suc neq_Nil_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma awalk_verts_reachable_to:\n assumes \"awalk u p v\" \"w \\ set (awalk_verts u p)\" shows \"w \\\\<^sup>*\\<^bsub>G\\<^esub> v\"", "output": "proof - obtain s where \"awalk w s v\"\nusing awalk_decomp[OF assms]\nby blast then show ?thesis\nby (metis reachable_awalk)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tell_writer_parametric [transfer_rule]:\n \"((rel_prod A (list_all2 W) ===> M) ===> (M ===> (rel_prod A (list_all2 W) ===> M) ===> M)\n ===> W ===> rel_writerT W A M ===> rel_writerT W A M)\n tell_writer tell_writer\"", "output": "unfolding tell_writer_def\nby transfer_prover"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lnth_lconcat_ltake:\n assumes \"enat w < llength (lconcat (ltake (enat n) xss))\"\n shows \"lnth (lconcat (ltake (enat n) xss)) w = lnth (lconcat xss) w\"", "output": "using assms\nby(auto intro: lprefix_lnthD lprefix_lconcatI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma norm_powr_real_powr:\n \"w \\ \\ \\ 0 \\ Re w \\ cmod (w powr z) = Re w powr Re z\"", "output": "by (metis dual_order.order_iff_strict norm_powr_real norm_zero of_real_0 of_real_Re powr_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in infinite_coin_toss_space) pseudo_proj_True_proj:\n shows \"pseudo_proj_True n (pseudo_proj_True n w) = pseudo_proj_True n w\"", "output": "by (metis pseudo_proj_True_def pseudo_proj_True_stake)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma per_sing_one: assumes \"w \\ \\\" \"w \\p [a]\\<^sup>\\\" shows \"periodN w 1\"", "output": "using root_periodN[OF \\w \\ \\\\ \\w \\p [a]\\<^sup>\\\\] unfolding sing_len[of a] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma stream_pred_coinduct[case_names stream_pred, coinduct pred: pred_stream]:\n assumes \"R w\"\n assumes \"\\ a w. R (a ## w) \\ P a \\ R w\"\n shows \"pred_stream P w\"", "output": "using assms unfolding stream.pred_rel eq_onp_def\nby (coinduction arbitrary: w) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inverse_scaleC_times [simp]:\n fixes a :: \"'a::complex_algebra_1\"\n shows \"(1 / numeral v) *\\<^sub>C (numeral w * a) = (numeral w / numeral v) *\\<^sub>C a\"", "output": "by (metis divide_inverse_commute inverse_eq_divide of_complex_numeral scaleC_conv_of_complex scaleC_scaleC)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valuate_poly_of_vec: assumes \"w \\ carrier_vec n\" \n and \"v \\ carrier_vec n\" \nshows \"valuate (poly_of_vec v) (val_of_vec w) = v \\ w\"", "output": "using assms\nby (transfer, auto simp: val_of_vec_def scalar_prod_def intro: sum.mono_neutral_left)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_language_L_size: \"in_language (L idx I) w \\ x \\ set w \\ size x = idx\"", "output": "by (induct w arbitrary: x I) (auto split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uint_shiftr_eq:\n \\uint (w >> n) = uint w div 2 ^ n\\", "output": "by transfer (simp flip: drop_bit_eq_div add: drop_bit_take_bit min_def le_less less_diff_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma from_bool_to_bool_iff:\n \"w = from_bool b \\ to_bool w = b \\ (w = 0 \\ w = 1)\"", "output": "by (cases b) (auto simp: from_bool_def to_bool_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_compression_3:\n \"path_compression_invariant p x (p[[w]]) p0 w \\ path_compression_postcondition p x (p[[w]]) p0\"", "output": "using path_compression_invariant_def path_compression_postcondition_def path_compression_precondition_def path_compression_3a\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma max_word_less_eq_iff [simp]:\n \\- 1 \\ w \\ w = - 1\\ for w :: \\'a::len word\\", "output": "by (fact word_order.extremum_unique)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mon_loc_uncons[simp]: \n \"mon_loc fg (e#w) \n = (case e of ENV a \\ {} | LOC a \\ mon_w fg a) \\ mon_loc fg w\"", "output": "by (unfold mon_loc_def) (auto split: el_step.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Lang_no_Nil :\n\"w \\ Lang G S \\ w \\ []\"", "output": "by(simp add: Lang_def, drule trancl_into_rtrancl, drule DSTEP_star_mono, force)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af\\<^sub>G_decompose:\n \"af\\<^sub>G (\\ and \\) w = (af\\<^sub>G \\ w) and (af\\<^sub>G \\ w)\"\n \"af\\<^sub>G (\\ or \\) w = (af\\<^sub>G \\ w) or (af\\<^sub>G \\ w)\"", "output": "by (induction w rule: rev_induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma remove_strong_ops_sound [simp]:\n \"w \\\\<^sub>n F\\<^sub>n (remove_strong_ops y) \\ w \\\\<^sub>n F\\<^sub>n y\"", "output": "by (induction y arbitrary: w) (auto; force)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gen_cart:\n assumes PRIO_TAG_GEN_ALGO\n assumes [param]: \"(sigma, Sigma) \\ (\\Rx\\Rsx \\ (Rx \\ \\Ry\\Rsy) \\ \\Rx \\\\<^sub>r Ry\\Rsp)\"\n shows \"(\\x y. sigma x (\\_. y), op_set_cart) \\ \\Rx\\Rsx \\ \\Ry\\Rsy \\ \\Rx \\\\<^sub>r Ry\\Rsp\"", "output": "unfolding op_set_cart_def[abs_def]\nby parametricity"} {"instruct": "Given a lemma, please prove it.", "input": "theorem AA24[simp_unl]: \"\\ \\\\\\P\\_f\\_f = \\\\P\\_f\"", "output": "unfolding angle_action_def angle_actrans_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonInterferenceI: \n \"\\\\s1 s2 s1' s2'. \\\\ \\ s1 \\\\<^sub>L s2; \\c,s1\\ \\* \\Skip,s1'\\; \\c,s2\\ \\* \\Skip,s2'\\\\\n \\ \\ \\ s1' \\\\<^sub>L s2'\\ \\ nonInterference \\ c\"", "output": "by(auto simp:nonInterference_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma norm_cvec_gt_0:\n assumes \"z \\ vec_zero\"\n shows \"\\z\\ > 0\"", "output": "using assms\nby (simp del: inprod_cvec_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma execn_to_execn_strip_guards:\n assumes exec_c: \"\\\\\\c,s\\ =n\\ t\"\n assumes t_not_Fault: \"\\ isFault t\"\n shows \"\\\\\\strip_guards F c,s\\ =n\\ t \"", "output": "using exec_c t_not_Fault [simplified not_isFault_iff]\nby (induct) (auto intro: execn.intros dest: noFaultn_startD')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assign_loc_reach:\n \"\\ \\c', mds', mem'\\ \\ loc_reach \\(x \\ e) \\ annos, mds, mem\\ \\ \\\n (c' = Stop \\ mds' = (mds \\ annos)) \\ (c' = (x \\ e) \\ annos \\ mds' = mds)\"", "output": "apply (induct rule: loc_reach.induct)\napply simp_all\nby (metis assign_annos_eval_elim stop_no_eval)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma impl_blue_dfs_autoref[autoref_rules]:\n fixes R :: \"('a \\ 'a::linorder) set\"\n assumes \"PREFER_id R\"\n shows \"(impl_blue_dfs, blue_dfs) \n \\ bg_impl_rel_ext unit_rel R \n \\ \\\\\\R\\list_rel \\\\<^sub>r \\R\\list_rel\\Relators.option_rel\\nres_rel\"", "output": "using assms impl_blue_dfs.refine\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lst_graph_rel_empty[simp]: \"([], {}) \\ \\concrete_edge_rel\\list_set_rel\"", "output": "unfolding list_set_rel_def\napply(rule relcompI[where b=\"[]\"])\nby (auto simp add: in_br_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma red1_preserves_unmod:\n \"\\ uf,P,t \\1 \\e, s\\ -ta\\ \\e', s'\\; unmod e i \\ \\ (lcl s') ! i = (lcl s) ! i\"\n \n and reds1_preserves_unmod:\n \"\\ uf,P,t \\1 \\es, s\\ [-ta\\] \\es', s'\\; unmods es i \\ \\ (lcl s') ! i = (lcl s) ! i\"", "output": "apply(induct rule: red1_reds1.inducts)\napply(auto split: if_split_asm) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FAssThrow2':\n \"\\ P,E \\ \\e\\<^sub>1,s\\<^sub>0\\ \\' \\Val v,s\\<^sub>1\\; P,E \\ \\e\\<^sub>2,s\\<^sub>1\\ \\' \\throw e',s\\<^sub>2\\ \\\n \\ P,E \\ \\e\\<^sub>1\\F{Cs}:=e\\<^sub>2,s\\<^sub>0\\ \\' \\throw e',s\\<^sub>2\\\"", "output": "by transfer(rule FAssThrow2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma decisionD: \"\\,\\,p\\ \\r, s\\ \\ t \\ s = Decision X \\ t = Decision X\"", "output": "by (induction rule: iptables_bigstep_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nodes_param[param]: \"(nodes, nodes) \\ \\L, S\\ dra_rel \\ \\S\\ set_rel\"", "output": "proof - have 1: \"nodes A = reachable A (initial A)\" for A :: \"('label, 'state) dra\" unfolding dra.nodes_alt_def\nby simp show ?thesis unfolding 1\nby parametricity\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CallRedsObj:\n \"P \\ \\e,s\\ \\* \\e',s'\\ \\ P \\ \\e\\M(es),s\\ \\* \\e'\\M(es),s'\\\"", "output": "apply(erule rtrancl_induct2)\napply blast\napply(erule rtrancl_into_rtrancl)\napply(erule CallObj) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SeqReds:\n \"P \\ \\e,s\\ \\* \\e',s'\\ \\ P \\ \\e;;e\\<^sub>2, s\\ \\* \\e';;e\\<^sub>2, s'\\\"", "output": "apply(erule rtrancl_induct2)\napply blast\napply(erule rtrancl_into_rtrancl)\napply(erule SeqRed) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_match_match_not_cases:\n \"\\,\\,p\\ \\add_match (MatchNot m) rs, Undecided\\ \\ Undecided \\ matches \\ m p \\ \\,\\,p\\ \\rs, Undecided\\ \\ Undecided\"", "output": "by (metis matches.simps(2) matches_add_match_simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma param_case_array[param]:\n \"(case_array,case_array) \\ (\\Ra\\list_rel \\ Rb) \\ \\Ra\\array_rel \\ Rb\"", "output": "apply (clarsimp split: array.split)\napply (drule array_relD)\nby parametricity"} {"instruct": "Given a lemma, please prove it.", "input": "lemma apply_self_in_orbit [simp]:\n \"f \\$\\ a \\ orbit f a\"", "output": "using\napply_power_self_in_orbit [of _ 1]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma param_cmp_prod[param]:\n \"(cmp_prod,cmp_prod)\\\n (Ra\\Rb\\Id)\\(Rc\\Rd\\Id)\\\\Ra,Rc\\prod_rel\\\\Rb,Rd\\prod_rel\\Id\"", "output": "unfolding cmp_prod_alt\nby (parametricity)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma steps_z_V':\n \"A \\ \\l,Z\\ \\* \\l',Z'\\ \\ valid_abstraction A X k \\ \\c\\clk_set A. v c \\ n \\ Z \\ V' \\ Z' \\ V'\"", "output": "by (induction rule: steps_z.induct) (auto intro: step_z_V')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma acceptD: \"\\,\\,p\\ \\r, s\\ \\ t \\ r = [Rule m Accept] \\ matches \\ m p \\ s = Undecided \\ t = Decision FinalAllow\"", "output": "by (induction rule: iptables_bigstep.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma autoref_RECT[autoref_rules]:\n assumes \"(B,B') \\ (Ra\\\\Rr\\nres_rel) \\ Ra\\\\Rr\\nres_rel\"\n assumes \"DEFER trimono B\"\n shows \"(RECT B,\n (OP RECT \n ::: ((Ra\\\\Rr\\nres_rel) \\ Ra \\ \\Rr\\nres_rel) \\ Ra \\ \\Rr\\nres_rel)$B'\n ) \\ Ra \\ \\Rr\\nres_rel\"", "output": "using assms unfolding autoref_tag_defs\nby (rule param_RECT)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma BinOpThrow1':\n \"P,E \\ \\e\\<^sub>1,s\\<^sub>0\\ \\' \\throw e,s\\<^sub>1\\ \\\n P,E \\ \\e\\<^sub>1 \\bop\\ e\\<^sub>2, s\\<^sub>0\\ \\' \\throw e,s\\<^sub>1\\\"", "output": "by transfer(rule BinOpThrow1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reds_to_red_n:\"\\c,s\\ \\* \\c',s'\\ \\ \\n. \\c,s\\ \\\\<^bsup>n\\<^esup> \\c',s'\\\"", "output": "by(induct rule:converse_rtranclp_induct2,auto intro:red_n.intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assumes wf: \"wf_J_prog P\"\n shows red_new_thread_sync_ok: \"\\ P,t \\ \\e, s\\ -ta\\ \\e', s'\\; NewThread t'' (e'', x'') h'' \\ set \\ta\\\\<^bsub>t\\<^esub> \\ \\ sync_ok e''\"\n and reds_new_thread_sync_ok: \"\\ P,t \\ \\es, s\\ [-ta\\] \\es', s'\\; NewThread t'' (e'', x'') h'' \\ set \\ta\\\\<^bsub>t\\<^esub> \\ \\ sync_ok e''\"", "output": "by(auto dest!: expr_locks_new_thread[OF wf] expr_locks_new_thread'[OF wf] intro: expr_locks_sync_ok expr_lockss_sync_oks)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma apply_swap_eq_iff [simp]:\n \"\\a \\ b\\ \\$\\ c = a \\ c = b\"\n \"\\a \\ b\\ \\$\\ c = b \\ c = a\"", "output": "by (transfer; auto simp add: Fun.swap_def)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma execn_mono:\n assumes exec: \"\\\\\\c,s\\ =n\\ t\"\n shows \"\\ m. n \\ m \\ \\\\\\c,s\\ =m\\ t\"", "output": "using exec\nby (induct) (auto intro: execn.intros dest: Suc_le_D)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cinner_extensionality:\n assumes \\\\\\. \\\\, \\\\ = \\\\, \\\\\\\n shows \\\\ = \\\\", "output": "by (metis assms cinner_eq_zero_iff cinner_simps(3) right_minus_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma param_Bex[param]: \"(Bex,Bex)\\\\Ra\\set_rel\\(Ra\\Id)\\Id\"", "output": "by (fastforce simp: set_rel_def dest: fun_relD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma autoref_WHILEIT'[autoref_rules]:\n assumes \"\\x x'. \\ (x,x')\\R; I x'\\ \\ (c x,c'$x') \\ Id\"\n assumes \"\\x x'. \\ REMOVE_INTERNAL c' x'; (x,x')\\R; I x'\\ \n \\ (f x,f'$x') \\ \\R\\nres_rel\"\n shows \"(WHILET c f,\n (OP (WHILEIT I) ::: (R\\Id) \\ (R\\\\R\\nres_rel) \\ R \\ \\R\\nres_rel)$c'$f'\n )\\R \\ \\R\\nres_rel\"", "output": "unfolding autoref_tag_defs\nby (parametricity add: autoref_WHILEIT[unfolded autoref_tag_defs] assms[unfolded autoref_tag_defs])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in imap) create_expunge_commute:\n shows \"\\Create i1 e1\\ \\ \\Expunge e2 mo i2\\ = \\Expunge e2 mo i2\\ \\ \\Create i1 e1\\\"", "output": "by(auto simp add: interpret_op_def op_elem_def kleisli_def, fastforce)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Seq_NoFaultStuckD2:\n assumes noabort: \"\\\\\\Seq c1 c2,s\\ \\\\({Stuck} \\ Fault ` F)\"\n shows \"\\t. \\\\\\c1,s\\ \\ t \\ t\\ ({Stuck} \\ Fault ` F) \\\n \\\\\\c2,t\\ \\\\({Stuck} \\ Fault ` F)\"", "output": "using noabort\nby (auto simp add: final_notin_def intro: exec_Seq')"} {"instruct": "Given a lemma, please prove it.", "input": "theorem replace_Goto_with_Call_in_terminal_chain:\n assumes chain_defined: \"\\ chain = Some rs\" and terminal_chain: \"terminal_chain rs\"\n shows \"\\,\\,p\\\\<^sub>g \\[Rule m (Goto chain)], s\\ \\ t \\ \\,\\,p\\\\<^sub>g \\[Rule m (Call chain)], s\\ \\ t\"", "output": "apply(rule just_show_all_bigstep_semantics_equalities_with_start_Undecided)\nusing assms replace_Goto_with_Call_in_terminal_chain_Undecided\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma DynCastRedsRef:\n \"\\ P,E \\ \\e,s\\ \\* \\ref(a,Cs),s'\\; hp s' a = Some (D,S); P \\ Path D to C via Cs';\n P \\ Path D to C unique \\ \n \\ P,E \\ \\Cast C e,s\\ \\* \\ref(a,Cs'),s'\\\"", "output": "apply(rule rtrancl_into_rtrancl)\napply(erule DynCastReds)\napply(fastforce intro:RedDynCast) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma param_map[param]: \n \"(map,map)\\(R1\\R2) \\ \\R1\\list_rel \\ \\R2\\list_rel\"", "output": "unfolding map_rec[abs_def]\nby (parametricity)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma union_dj_autoref[autoref_rules]:\n assumes \"PREFER_id Rk\"\n assumes \"SIDE_PRECOND_OPT (a'\\b'={})\"\n assumes \"(a,a')\\\\Rk\\s1.rel\"\n assumes \"(b,b')\\\\Rk\\s2.rel\"\n shows \"(union_dj a b,(OP (\\) ::: \\Rk\\s1.rel \\ \\Rk\\s2.rel \\ \\Rk\\s3.rel)$a'$b')\n \\\\Rk\\s3.rel\"", "output": "using assms\nby simp (auto simp: union_dj_correct br_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma autoref_detI:\n assumes \"(b,a)\\\\R\\nres_rel\"\n assumes \"RETURN c \\ b\"\n assumes \"c = detTAG d\"\n shows \"(RETURN d, a)\\\\R\\nres_rel\"", "output": "using assms unfolding nres_rel_def detTAG_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nodes_param[param]: \"(nodes, nodes) \\ \\L, S\\ ngba_rel \\ \\S\\ set_rel\"", "output": "unfolding ngba.nodes_alt_def Collect_mem_eq\nby parametricity"} {"instruct": "Given a lemma, please prove it.", "input": "lemma impl_blue_dfs_ahs_autoref[autoref_rules]:\n fixes R :: \"('a \\ 'a::hashable) set\"\n assumes \"MINOR_PRIO_TAG 5\"\n assumes \"PREFER_id R\"\n shows \"(impl_blue_dfs_ahs, blue_dfs) \\ bg_impl_rel_ext unit_rel R \n \\ \\\\\\R\\list_rel \\\\<^sub>r \\R\\list_rel\\Relators.option_rel\\nres_rel\"", "output": "using assms impl_blue_dfs_ahs.refine\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mul\\<^sub>O:\n \"\\mulO n m\\\\<^sub>O = mul\\<^sub>O \\n\\\\<^sub>O \\m\\\\<^sub>O\"", "output": "by (induct m) (simp_all add: add\\<^sub>O)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma red_external_preserves_tconf:\n \"\\ P,t \\ \\a\\M(vs), h\\ -ta\\ext \\va, h'\\; P,h \\ t' \\t \\ \\ P,h' \\ t' \\t\"", "output": "by(drule red_external_hext)(rule tconf_hext_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma param_ahm_iteratei[param]:\n \"(ahm_iteratei,ahm_iteratei) \\ \\Rk,Rv\\ahm_map_rel \\\n (Rb \\ bool_rel) \\ (\\Rk,Rv\\prod_rel \\ Rb \\ Rb) \\ Rb \\ Rb\"", "output": "unfolding ahm_iteratei_def[abs_def] rec_hashmap_is_case\nby parametricity"} {"instruct": "Given a lemma, please prove it.", "input": "lemma evals_preserves_sconf:\n \"\\ wf_C_prog P; P,E \\ \\es,s\\ [\\] \\es',s'\\; P,E \\ es [::] Ts; P,E \\ s \\ \\ \n \\ P,E \\ s' \\\"", "output": "by(blast intro:steps_preserves_sconf bigs_by_smalls WTs_implies_WTrts wf_prog_wwf_prog)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma knowledge_eval_setdiff:\n \"knows A evs - \n {Key (priEK A), Key (priSK A), Key (shrK A)} -\n {X. Notes A X \\ set evs}\n = \n (Key ` range pubEK) \\ (Key ` range pubSK) \\\n {X. \\ S R. Says S R X \\ set evs}\"", "output": "apply (simp only: knowledge_eval)\napply auto oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Spy_see_private_Key [simp]:\n \"evs \\ set_cr\n ==> (Key(invKey (publicKey b A)) \\ parts(knows Spy evs)) = (A \\ bad)\"", "output": "by (erule set_cr.induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Outpts_honest_A_Card_4: \n \"\\ Outpts C A \\Nonce Na, Crypt K X\\ \\set evs; \n A \\ Spy; evs \\ srb \\ \n \\ legalUse(C) \\ C = (Card A) \\ \n Inputs A (Card A) (Agent A) \\ set evs\"", "output": "apply (erule rev_mp, erule srb.induct)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Spy_analz_crdK[simp]: \"evs \\ srb \\ \n (Key (crdK C) \\ analz (knows Spy evs)) = (C \\ cloned)\"", "output": "apply (auto dest!: Spy_knows_cloned) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Inputs_Card_Spy: \n \"\\ Inputs Spy C X \\ set evs \\ Outpts C Spy X \\ set evs; evs \\ srb \\ \n \\ C = (Card Spy) \\ legalUse(Card Spy) \\ \n (\\ A. C = (Card A) \\ illegalUse(Card A))\"", "output": "apply (erule rev_mp, erule srb.induct)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma new_keys_not_used [simp]:\n \"\\Key K \\ used evs; K \\ symKeys; evs \\ orb\\ \\ K \\ keysFor (parts (knows Spy evs))\"", "output": "apply (erule rev_mp)\napply (erule orb.induct, parts_explicit, simp_all)\napply (force dest!: keysFor_parts_insert)\napply (blast+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fresh_rule: \"[| evs' @ ev # evs \\ tr p; wdef p; Nonce n \\ used evs;\nNonce n \\ parts {msg ev} |] ==> \\R s. R \\ p \\ ap' s R = ev\"", "output": "apply (drule trunc, simp, ind_cases \"ev # evs \\ tr p\", simp)\nby (drule_tac x=X in in_sub, drule parts_sub, simp, simp, blast+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Nonce_supply2: \"\\N N'. Nonce N \\ used evs \\ Nonce N' \\ used evs' \\ N \\ N'\"", "output": "apply (cut_tac evs = evs in Nonce_supply_lemma)\napply (cut_tac evs = \"evs'\" in Nonce_supply_lemma, clarify)\napply (metis Suc_n_not_le_n nat_le_linear) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma NB_is_uniq [rule_format]: \"evs \\ nsp \\\nCrypt (pubK A) \\Nonce NA, Nonce NB, Agent B\\ \\ parts (spies evs)\n\\ Crypt (pubK A') \\Nonce NA', Nonce NB, Agent B'\\ \\ parts (spies evs)\n\\ Nonce NB \\ analz (spies evs) \\ A=A' \\ B=B' \\ NA=NA'\"", "output": "apply (erule nsp.induct, simp_all)\nby (blast intro: analz_insertI)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma A_authenticates_B:\n \"\\ Crypt K (Number Ta) \\ parts (spies evs);\n Crypt (shrK A) \\Number Tk, Agent B, Key K, X\\ \\ parts (spies evs);\n Key K \\ analz (spies evs);\n A \\ bad; B \\ bad; evs \\ bankerb_gets \\\n \\ Says B A (Crypt K (Number Ta)) \\ set evs\"", "output": "apply (blast dest!: Kab_authentic intro!: lemma_B) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Nonce_req_notin_knows_max_Friend: \"[| evs \\ p1; req A r n I B \\ set evs;\nA \\ bad; A \\ Friend C |] ==> Nonce n \\ analz (knows_max (Friend C) evs)\"", "output": "apply (clarify, frule_tac C=C in req_imp_Guard_Friend, simp+)\napply (simp add: knows_max_def, drule Guard_invKey_keyset, simp+)\nby (drule priK_notin_knows_max_Friend, auto simp: knows_max_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Nb_certificate_authentic_B: \n \"\\ Gets B (Crypt (pairK(A,B)) (Nonce Nb)) \\ set evs; \n B \\ Spy; \\illegalUse(Card B); \n evs \\ sr \\ \n \\ \\ Na. \n Outpts (Card B) B \\Nonce Nb, Key (sesK(Nb,pairK(A,B))), \n Crypt (pairK(A,B)) \\Nonce Na, Nonce Nb\\, \n Crypt (pairK(A,B)) (Nonce Nb)\\ \\ set evs\"", "output": "apply (blast dest: Gets_imp_knows_Spy [THEN parts.Inj, THEN Nb_certificate_authentic_bis]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma no_Notes_A_PRF [simp]:\n \"evs \\ tls ==> Notes A \\Agent B, Nonce (PRF x)\\ \\ set evs\"", "output": "apply (erule tls.induct, force, simp_all) txt\\ClientKeyExch: PMS is assumed to differ from any PRF.\\\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Notes_imp_used [rule_format]: \"Notes A X \\ set evs \\ X \\ used evs\"", "output": "apply (induct_tac evs)\napply (auto split: event.split) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Gets_imp_knows_Spy_analz_Snd: \n \"\\ Gets B \\X, Y\\ \\ set evs; evs \\ srb \\ \\ Y \\ analz (knows Spy evs)\"", "output": "apply (blast dest!: Gets_imp_Says Says_imp_knows_Spy analz.Inj analz.Snd) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma NS_no_Notes:\n \"evs \\ ns_public \\ Notes A X \\ set evs\"", "output": "apply (erule ns_public.induct)\napply simp_all done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Spy_see_shrK [simp]:\n \"evs \\ yahalom \\ (Key (shrK A) \\ parts (knows Spy evs)) = (A \\ bad)\"", "output": "by (erule yahalom.induct, force, drule_tac [6] YM4_parts_knows_Spy, simp_all, blast+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SR10_imp: \n \"\\ Outpts (Card A) A \\Key K, Crypt (pairK(A,B)) (Nonce Nb)\\ \n \\ set evs; \n A \\ Spy; evs \\ sr \\ \n \\ \\ Cert1 Cert2. \n Gets A \\Nonce (Pairkey (A, B)), Cert1\\ \\ set evs \\ \n Gets A \\Nonce Nb, Cert2\\ \\ set evs\"", "output": "apply (blast dest: Outpts_A_Card_10 Inputs_A_Card_9) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pr_sesk_user_2 [rule_format]:\n \"(evs, S, A, U) \\ protocol \\\n \\Key (sesK K), Agent (User m), Number n, Number run\\ \\ U \\\n Key (sesK K) \\ U\"", "output": "by (erule protocol.induct, blast, simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Says_imp_knows_Spy [rule_format]:\n \"Says A B X \\ set evs \\ X \\ knows Spy evs\"", "output": "apply (induct_tac \"evs\")\napply (auto split: event.split) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Nonce_neq [dest]: \"[| Nonce n' \\ used evs;\nSays A B X \\ set evs; Nonce n \\ parts {X} |] ==> n \\ n'\"", "output": "by (drule not_used_not_spied, auto dest: Says_imp_knows_Spy parts_sub)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Spy_see_shrK [simp]:\n \"evs \\ otway ==> (Key (shrK A) \\ parts (knows Spy evs)) = (A \\ bad)\"", "output": "by (erule otway.induct, force, drule_tac [4] OR2_parts_knows_Spy, simp_all, blast+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Pairkey_Inputs_imp_Gets: \n \"\\ Inputs A (Card A) \n \\Agent B, Nonce Na, Nonce Nb, Nonce (Pairkey(A,B)), \n Cert1, Cert3, Cert2\\ \\ set evs; \n A \\ Spy; evs \\ sr \\ \n \\ Gets A \\Nonce (Pairkey(A,B)), Cert1\\ \\ set evs\"", "output": "apply (erule rev_mp, erule sr.induct)\napply (simp_all (no_asm_simp))\napply force done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Spy_knows_cloned [intro!]: \n \"Card A \\ cloned \\ Key (crdK (Card A)) \\ knows Spy evs & \n Key (shrK A) \\ knows Spy evs & \n Key (pin A) \\ knows Spy evs & \n (\\ B. Key (pairK(B,A)) \\ knows Spy evs)\"", "output": "apply (induct_tac \"evs\")\napply (simp_all (no_asm_simp) add: imageI knows_Cons split: event.split) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Gets_imp_Says:\n \"\\Gets B X \\ set evs; evs \\ yahalom\\ \\ \\A. Says A B X \\ set evs\"", "output": "by (erule rev_mp, erule yahalom.induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unique_KC1:\n \"[|Says C B \\Crypt KC1 X, Crypt EK \\Key KC1, Y\\\\\n \\ set evs;\n Says C B' \\Crypt KC1 X', Crypt EK' \\Key KC1, Y'\\\\\n \\ set evs;\n C \\ bad; evs \\ set_cr|] ==> B'=B \\ Y'=Y\"", "output": "apply (erule rev_mp)\napply (erule rev_mp)\napply (erule set_cr.induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma A_trusts_NS2_lemma [rule_format]: \n \"\\A \\ bad; B \\ bad; evs \\ ns_public\\ \n \\ Crypt (pubEK A) \\Nonce NA, Nonce NB\\ \\ parts (knows Spy evs) \\\n Says A B (Crypt(pubEK B) \\Nonce NA, Agent A\\) \\ set evs \\\n Says B A (Crypt(pubEK A) \\Nonce NA, Nonce NB\\) \\ set evs\"", "output": "apply (erule ns_public.induct)\napply (auto dest: Spy_not_see_NA unique_NA) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Confidentiality_B_temporal:\n \"\\ Crypt (shrK B) \\Number Tk, Agent A, Key K\\\n \\ parts (spies evs);\n \\ expiredK Tk evs;\n A \\ bad; B \\ bad; evs \\ bankerberos\n \\ \\ Key K \\ analz (spies evs)\"", "output": "apply (blast dest!: ticket_authentic Confidentiality_S_temporal) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma B_trusts_OR2:\n \"\\Crypt (shrK B) \\Nonce Nb, Nonce M, Nonce M, Agent A, Agent B\\ \n \\ parts (knows Spy evs); B \\ bad; evs \\ orb\\ \n \\ (\\ X. Says B Server \\Nonce M, Agent A, Agent B, X, \n Crypt (shrK B) \\Nonce Nb, Nonce M, Nonce M, Agent A, Agent B\\\\ \n \\ set evs)\"", "output": "apply (erule rev_mp, erule orb.induct, parts_explicit, simp_all)\napply (blast+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Outpts_honest_B_Card_7: \n \"\\ Outpts C B \\Nonce Nb, Agent A, Key K, Cert1, Cert2\\ \\ set evs; \n B \\ Spy; evs \\ srb \\ \n \\ legalUse(C) \\ C = (Card B) \\ \n (\\ Na. Inputs B (Card B) \\Agent A, Nonce Na\\ \\ set evs)\"", "output": "apply (erule rev_mp, erule srb.induct)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Outpts_Card: \"\\ Outpts C A X \\ set evs; A \\ Spy; evs \\ sr \\ \n \\ C = (Card A) \\ legalUse(C)\"", "output": "apply (erule rev_mp, erule sr.induct)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma analz_insert_freshK2:\n \"\\ evs \\ kerbIV; servK \\ (authKeys evs); servK \\ range shrK;\n K \\ symKeys \\\n \\ (Key K \\ analz (insert (Key servK) (spies evs))) =\n (K = servK | Key K \\ analz (spies evs))\"", "output": "apply (frule not_authKeys_not_AKcryptSK, assumption, assumption)\napply (simp del: image_insert add: analz_image_freshK_simps add: Key_analz_image_Key) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Outpts_which_Card_10: \n \"\\ Outpts (Card A) A \\Agent B, Nonce Nb, Key K, Certificate \\ \\ set evs;\n evs \\ srb \\ \n \\ \\ Na. Inputs A (Card A) \\Agent B, Nonce Na, Nonce Nb, Nonce (Pairkey(A,B)), \n Crypt (shrK A) \\Nonce (Pairkey(A,B)), Agent B\\, \n Crypt (pairK(A,B)) \\Nonce Na, Nonce Nb\\, \n Crypt (crdK (Card A)) (Nonce Na) \\ \\ set evs\"", "output": "apply (erule rev_mp, erule srb.induct)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lprefix_LNil [simp]: \"xs \\ LNil \\ lNone xs\"", "output": "unfolding lNone_def\nby(subst lprefix.simps)simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_nth_append1:\n assumes \"length xs = d\"\n shows \"map ((!) (xs @ ys)) [0..x\\set xs. P x)\"", "output": "proof (induct xs) case (Cons x xs) then show ?case\nusing length_filter_le\nby (simp add: impossible_Cons)\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rev_conv_rev_it[code_unfold]:\n \"rev xs = rev_it xs\"", "output": "unfolding rev_it_def\nusing rev_conv_rev_it' append_Nil2\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inc_i: \"list_repr i ba xs \\ i < length xs \\ list_repr (Suc i) (inc_i ba) xs\"", "output": "unfolding list_repr_def inc_i_def\nby (cases ba, auto simp: rev_take_Suc hd_drop_conv_nth tl_drop_Suc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ltakeWhile_lmap: \"ltakeWhile P (lmap f xs) = lmap f (ltakeWhile (P \\ f) xs)\"", "output": "by(coinduction arbitrary: xs)(auto simp add: ltl_ltakeWhile)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inf_llist_lprefix [simp]: \"inf_llist f \\ xs \\ xs = inf_llist f\"", "output": "by(auto simp add: not_lfinite_lprefix_conv_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma oalist_inv_map_val_raw:\n assumes \"oalist_inv xs\"\n shows \"oalist_inv (map_val_raw f xs)\"", "output": "proof - obtain xs' ko where xs: \"xs = (xs', ko)\"\nby fastforce from assms show ?thesis unfolding xs map_raw.simps oalist_inv_alt\nby (rule oalist_inv_raw_map_val_pair)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pdevs_apply_set_slist: \"x \\ set_slist xs \\ snd x = pdevs_apply (Pdevs xs) (fst x)\"", "output": "by transfer (auto simp: Pdevs_raw_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_ident [simp]: \"map(%x. x)(xs) = xs\"", "output": "by (induct xs rule: list_induct) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_all2_elem_filter:\n assumes \"list_all2 P xs us\" \"x \\ set xs\"\n shows \"length (filter (P x) us) \\ 1\"", "output": "using assms\nby (induction xs arbitrary: us) (auto simp: list_all2_Cons1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma take_prefix: \"\\ take n l = xs \\ \\ \\xs'. l = xs @ xs'\"", "output": "by (induct l arbitrary: n xs, auto) (rename_tac n, case_tac n, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma foldl_spmf_map [simp]: \"foldl_spmf f p (map g xs) = foldl_spmf (map_fun id (map_fun g id) f) p xs\"", "output": "by(induction xs arbitrary: p) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma distinct_concat_map_E:\n assumes \"distinct (concat ((map f xs)))\"\n shows \"\\x y. x \\ set xs \\ y \\ set xs \\ x \\ y \\ (set (f x)) \\ (set (f y)) = {}\"\n and \"\\x. x \\ set xs \\ distinct (f x)\"", "output": "using assms\napply(induct xs)\nby(auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma count_of_empty: \"x \\ fst ` set xs \\ count_of xs x = 0\"", "output": "by (induct xs) (simp_all add: count_of_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma listt_update_in_list [simp, intro!]:\n \"\\ xs \\ list n A; x\\ A \\ \\ xs[i := x] \\ list n A\"", "output": "apply (unfold list_def)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma suffix_same_cases:\n \"suffix (xs\\<^sub>1::'a list) ys \\ suffix xs\\<^sub>2 ys \\ suffix xs\\<^sub>1 xs\\<^sub>2 \\ suffix xs\\<^sub>2 xs\\<^sub>1\"", "output": "unfolding suffix_def\nby (force simp: append_eq_append_conv2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_PLUS[simp]:\n \"wf n (PLUS xs) = (\\r \\ set xs. wf n r)\"", "output": "by (induct xs rule: list_singleton_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma c_ipurge_append_1:\n \"c_ipurge I D (D x) (xs @ [x]) = c_ipurge I D (D x) xs @ [x]\"", "output": "by (induction xs, simp_all add: c_sources_append_1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_append_append_maps:\n assumes map:\"map f xs = ys@zs\"\n obtains xs' xs'' where \"map f xs' = ys\" and \"map f xs'' = zs\" and \"xs=xs'@xs''\"", "output": "by (metis append_eq_conv_conj append_take_drop_id assms drop_map take_map that)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma argmin_Min: \"xs \\ [] \\ f (argmin f xs) = Min (f ` set xs)\"", "output": "by(induction xs) (auto simp: min_def intro!: antisym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LNil_eq_ltake_iff [simp]: \"LNil = ltake n xs \\ xs = LNil \\ n = 0\"", "output": "by(cases n xs rule: enat_coexhaust[case_product llist.exhaust]) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lNone_ltake [simp]: \"lNone (ltake n xs) \\ lNone xs \\ n = 0\"", "output": "by(cases n xs rule: enat_coexhaust[case_product llist.exhaust]) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma at_set_avoiding:\n fixes Xs::\"'a set\"\n assumes at: \"at TYPE('a)\"\n and a: \"finite Xs\"\n and b: \"finite ((supp c)::'a set)\"\n obtains pi::\"'a prm\" where \"(pi\\Xs)\\*c\" and \"set pi \\ Xs \\ (pi\\Xs)\"", "output": "using a b at_set_avoiding_aux[OF at, where Xs=\"Xs\" and As=\"Xs\" and c=\"c\"]\nby (blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma last_rev' [simp]: \"last (rev xs) = hd xs\" \\ \\TODO define \\last []\\ as \\hd []\\?\\", "output": "by (cases xs) (simp add: last_def hd_def, simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sup_upto_llist_0[simp]: \"Sup_upto_llist Xs 0 = (if lNone Xs then {} else lhd Xs)\"", "output": "unfolding zero_enat_def\nby (rule Sup_upto_llist_enat_0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma last_index_eq_index_conv[simp]: \"x \\ set xs \\ y \\ set xs \\\n (last_index xs x = last_index xs y) = (x = y)\"", "output": "by (induct xs) (auto simp:last_index_Cons)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dropWhile_idem_iff:\n \"dropWhile P xs = xs \\ no_leading P xs\"", "output": "by (cases xs) (auto elim: dropWhile_eq_obtain_leading)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_list_xs_take: \"\\n xs.\n length fs \\ n \\\n map_list fs (xs \\ n) =\n map_list fs xs\"", "output": "apply (induct fs, simp+)\napply (rename_tac fs n xs)\napply (simp add: tl_take) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eucl_of_list_append_zeroes[simp]: \"eucl_of_list (xs @ replicate n 0) = eucl_of_list xs\"", "output": "unfolding eucl_of_list_def\napply (auto simp: sum_list_sum_nth)\napply (rule sum.mono_neutral_cong_right)\nby (auto simp: nth_append)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma oalist_inv_raw_sort_oalist_aux:\n assumes \"oalist_inv xs\"\n shows \"oalist_inv_raw ko (sort_oalist_aux ko xs)\"", "output": "proof - obtain xs' ko' where xs: \"xs = (xs', ko')\"\nby fastforce from assms show ?thesis\nby (simp add: xs oalist_inv_alt oalist_inv_raw_sort_oalist)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nth_suffixes [simp]: \"n \\ length xs \\ suffixes xs ! n = drop (length xs - n) xs\"", "output": "by (subst suffixes_conv_prefixes) (simp_all add: rev_take)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem concat_cuts: \"concat (cuts xs) = xs\"", "output": "apply (induction xs rule: cuts.induct)\napply (subst cuts.simps)\napply (auto simp: take2_def Let_def)\nby (metis append_eq_conv_conj take_conc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma take_eq_map_nth: \"n < length xs \\ take n xs = map ((!) xs) [0.. list n A \\ size xs = n\"", "output": "apply (unfold list_def)\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_remdups_eq[iff]:\n \"(length (remdups xs) = length xs) = (remdups xs = xs)\"", "output": "proof (induct xs) case (Cons a xs) then show ?case\nby simp (metis Suc_n_not_le_n impossible_Cons length_remdups_leq)\nqed auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma groupF_distinct: \"distinct xs \\ distinct (concat (groupF f xs))\"", "output": "by (induction f xs rule: groupF.induct) (auto simp add: groupF_Union_set)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmdl_comp_red_monic_basis_subset: \"pmdl (set (comp_red_monic_basis xs)) \\ pmdl (set xs)\"", "output": "unfolding set_comp_red_monic_basis pmdl_image_monic\nby (fact pmdl_comp_red_basis_subset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linord_of_listP_domain:\n assumes \"linord_of_listP x y xs\"\n shows \"x \\ set xs \\ y \\ set xs\"", "output": "using assms\nby (induct xs) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_of_oalist_tc_of_list_id:\n assumes \"tc.oalist_inv_raw xs\"\n shows \"list_of_oalist_tc (OAlist_tc xs) = xs\"", "output": "using assms\nby (simp add: list_of_oalist_OAlist_tc tc.sort_oalist_id)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma remdups_adj_rev[simp]: \"remdups_adj (rev xs) = rev (remdups_adj xs)\"", "output": "by (induct xs rule: remdups_adj.induct, simp_all add: remdups_adj_append_two)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n mtf2_forward_effect3': \"q \\ set xs \\ distinct xs \\ index xs q - n \\ index xs x \\ index xs x < index xs q\n \\ index (mtf2 n q xs) (xs!index xs x) = Suc (index xs (xs!index xs x)) \\ index xs q - n < index (mtf2 n q xs) (xs!index xs x) \\ index (mtf2 n q xs) (xs!index xs x) \\ index xs q\"", "output": "using mtf2_forward_effect3[where xs=xs and i=\"index xs x\"]\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in comm_monoid_add) sum_list_addf:\n \"(\\x\\xs. f x + g x) = sum_list (map f xs) + sum_list (map g xs)\"", "output": "by (induct xs) (simp_all add: algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stkOk_r_rewrite [simp]: \"\\x. x \\ set xs \\\n stkOk c l (r(x := g)) iL iR (Ref x) xs = stkOk c l r iL iR (Ref x) xs\"", "output": "apply (induct xs)\napply (auto simp:eq_sym_conv) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma insort_insert_key_code [code]:\n \"insort_insert_key f x xs = \n (if List.member (map f xs) (f x) then xs else insort_key f x xs)\"", "output": "by(simp add: insort_insert_key_def List.member_def split del: if_split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma some_gcd_ff_list_greatest: \"(\\x \\ set xs. divides_ff d x) \\ divides_ff d (some_gcd_ff_list xs)\"", "output": "using some_gcd_ff_list[of xs] unfolding gcd_ff_list_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fold_max_le:\n fixes x::\"'a::linorder\"\n shows \"x \\ set xs \\ x \\ fold max xs z\"", "output": "by (induct xs arbitrary: x z) (auto intro: order_trans[OF _ fold_max_le_self])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dropWhile_nth: \"j < length (dropWhile P xs) \\\n dropWhile P xs ! j = xs ! (j + length (takeWhile P xs))\"", "output": "by (metis add.commute nth_append_length_plus takeWhile_dropWhile_id)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem f_Exec_Stream_drop:\"\n (f_Exec_Comp_Stream trans_fun xs c) \\ n =\n f_Exec_Comp_Stream trans_fun (xs \\ n)\n (f_Exec_Comp trans_fun (xs \\ n) c)\"", "output": "apply (case_tac \"length xs \\ n\", simp)\napply (rule subst[OF append_take_drop_id, of _ n xs])\napply (simp add: f_Exec_Stream_append del: append_take_drop_id) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interpret_others:\n \"interpret (Neg(ExQ (Neg f))) xs = (\\x. interpret f (x#xs))\"\n \"interpret (Or (Neg f1) f2) xs = (interpret f1 xs \\ interpret f2 xs)\"", "output": "by(simp_all add:interpret_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma of_weak_ranking_imp_in_set:\n assumes \"of_weak_ranking xs a b\"\n shows \"a \\ \\(set xs)\" \"b \\ \\(set xs)\"", "output": "using assms\nby (fastforce elim!: of_weak_ranking.cases)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma removeAll_induct:\n assumes \"\\xs. (\\x. x \\ set xs \\ P (removeAll x xs)) \\ P xs\"\n shows \"P xs\"", "output": "by (induct xs rule:length_induct, rule assms) auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem set2_tllist_induct[consumes 1, case_names find step]:\n assumes \"x \\ set2_tllist xs\" and \"\\xs. is_TNil xs \\ P (terminal xs) xs\"\n and \"\\xs y. \\\\ is_TNil xs; y \\ set2_tllist (ttl xs); P y (ttl xs)\\ \\ P y xs\"\n shows \"P x xs\"", "output": "using assms\nby(induct)(fastforce simp del: tllist.disc(1) iff: tllist.disc(1), auto)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem mset_quicksort [simp]: \"mset (quicksort R xs) = mset xs\"", "output": "by (induction R xs rule: quicksort.induct) (simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem VSGeneralBlocksLimited: \"\\xs. eval (VSGeneralBlocksLimited \\) xs = eval \\ xs\"", "output": "unfolding VSGeneralBlocksLimited_def Unpower_def opt_group_def\nusing QE_dnf_eval[OF gen_qe_eval_augment opt] opt VSLuckiestBlocks\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lconjby_Abs_freelist_relator_freeword:\n \"\\ rs\\R; xs\\lists S \\ \\ lconjby (Abs_freelist xs) (relator_freeword rs) \\ Q\"", "output": "using proper_signed_list_map_uniform_snd\nby (force intro: lconj_relator_freeword_R)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_emb_Nil2 [simp]:\n assumes \"list_emb P xs []\" shows \"xs = []\"", "output": "using assms\nby (cases rule: list_emb.cases) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma llength_ltakeWhile_all: \"llength (ltakeWhile P xs) = llength xs \\ ltakeWhile P xs = xs\"", "output": "by(auto intro: lprefix_llength_eq_imp_eq lprefix_ltakeWhile)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma scalar_product_CONS: \"length xs = length (bs :: bool list) \\\n scalar_product (map_index (\\i n. 2 * n + bs ! i) xs) is =\n scalar_product bs is + 2 * scalar_product xs is\"", "output": "by (induct \"is\" arbitrary: bs xs) (auto split: list.splits simp: algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tl_take: \"tl (take n xs) = take (n - 1) (tl xs)\"", "output": "by (cases n, simp, cases xs, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_acquired_reads_no_pending_write_outstanding_write: \n\"\\A. a \\ acquired_reads False xs A \\ outstanding_refs (is_volatile_Write\\<^sub>s\\<^sub>b) xs \\ {}\"", "output": "apply (induct xs)\napply simp\napply (auto split: memref.splits)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_head_length_one:\n assumes \"hd xs = x\"\n and \"length xs = 1\"\n shows \"xs = [x]\"", "output": "using assms\nby(metis One_nat_def Suc_length_conv hd_Cons_tl length_0_conv list.sel(3))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma memEqvt[eqvt]:\n fixes p :: \"name prm\"\n and x :: \"'a::pt_name\"\n and xs :: \"('a::pt_name) list\"\n\n shows \"(p \\ (x mem xs)) = ((p \\ x) mem (p \\ xs))\"", "output": "by(induct xs) (auto simp add: pt_bij[OF pt_name_inst, OF at_name_inst] eqvts)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sscan_smap[simp]: \"sscan f (smap g xs) a = sscan (f \\ g) xs a\"", "output": "by (coinduction arbitrary: xs a) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma distinct_ext:\n assumes \"distinct xs\" \"a \\ set xs\"\n shows \"distinct (extup a xs)\" \"distinct (extdown a xs)\"", "output": "using assms set_ext\napply (induction xs arbitrary: a)\napply auto\napply (metis eq_iff insert_iff subset_iff)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sup_upto_llist_subset_Sup_llist: \"Sup_upto_llist Xs j \\ Sup_llist Xs\"", "output": "unfolding Sup_llist_def Sup_upto_llist_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ldropn_llist_of [simp]: \"ldropn n (llist_of xs) = llist_of (drop n xs)\"", "output": "proof(induct n arbitrary: xs) case Suc thus ?case\nby(cases xs) simp_all\nqed simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_greaters_less [intro]:\n assumes \"x \\ set xs\"\n shows \"length (greaters R x xs) < length xs\"", "output": "using assms\nby (induction xs) (auto simp: greaters_Cons intro: le_less_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma e2xs_xs [simp]:\n \"e2xs (encode_config ((f, xs, ls) # ss, rv)) = list_encode xs\"", "output": "using e2xs_def e2frame_frame encode_frame\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma foldr_plus_zero_le: \"foldr (+) xs (0::'lbl) \\ foldr (+) xs a\"", "output": "by (induct xs) (simp_all add: plus_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dropWhile_eq_hd_conv: \"dropWhile P xs = hd xs # rest \\ xs \\ [] \\ rest = tl xs \\ \\ P (hd xs)\"", "output": "by (metis append_Nil append_is_Nil_conv dropWhile_eq_Cons_conv list.sel(1) neq_Nil_conv takeWhile_dropWhile_id takeWhile_eq_Nil_conv list.sel(3))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_tries_of_list[simp]:\n \"set_tries(tries_of_list key xs) = set xs\"", "output": "by(simp add: tries_of_list_def set_insert_tries)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma index_vec_of_list: \"i (vec_of_list xs) $ i = xs ! i\"", "output": "by (metis vec.abs_eq index_vec vec_of_list.abs_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma faulty1:\n assumes a: \"t\\(x#xs),t'\"\n shows \"\\(x\\t') \\ \\(x\\bind xs t')\"", "output": "using a\nby (nominal_induct t xs'\\\"x#xs\" t' avoiding: xs rule: unbind.strong_induct) (simp_all add: free_variable)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma take_in_listsetI: \"xs \\ listset XS \\ take n xs \\ listset (take n XS)\"", "output": "by (induction XS arbitrary: xs n) (auto simp: take_Cons listset_Cons_mem_conv set_Cons_def split: nat.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nth_rule:\n \"\\i < length xs\\ \\ \\<^sub>a xs> Array.nth a i <\\r. a \\\\<^sub>a xs * \\(r = xs ! i)>\"", "output": "unfolding hoare_triple_def snga_assn_def\napply (simp add: Let_def Abs_assn_inverse)\napply (auto elim!: run_elims simp: Let_def new_addrs_def Array.get_def Array.set_def Array.alloc_def relH_def in_range.simps Array.length_def ) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sset_simp[simp]:\n shows \"sset \\ = {}\"\n and \"sset [::] = {}\"\n and \"\\x \\ \\; xs \\ \\\\ \\ sset (x :# xs) = insert x (sset xs)\"", "output": "unfolding sset_def\nby (auto elim: slistmem.cases intro: slistmem.intros)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma msetext_dersh_compat_list:\n assumes y_gt_x: \"gt y x\"\n shows \"msetext_dersh gt (xs @ y # xs') (xs @ x # xs')\"", "output": "unfolding msetext_dersh_def Let_def\nproof (intro exI conjI) show \"mset (xs @ x # xs') = mset (xs @ y # xs') - {#y#} + {#x#}\"\nby auto\nqed (auto intro: y_gt_x)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trunc_err_pdevsE:\n assumes \"e \\ UNIV \\ {-1 .. 1}\"\n obtains err where\n \"\\err\\ \\ tdev' p (trunc_err_pdevs p xs)\"\n \"pdevs_val e (trunc_pdevs p xs) = pdevs_val e xs + err\"", "output": "using trunc_bound_pdevsE[of e p xs]\nby (auto simp: trunc_bound_pdevs_def assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_ass_list_to_single_list [simp]:\n \"set (ass_list_to_single_list xs) = {x. \\n. (x, n) \\ set xs \\ n > 0}\"", "output": "by (induct xs rule: ass_list_to_single_list.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iprefix_take_eq_iprefix_take_ex: \"\n (f \\ length xs = xs) = (\\n. f \\ n = xs)\"", "output": "apply (rule iffI)\napply (rule_tac x=\"length xs\" in exI, assumption)\napply clarsimp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma terminal_transfer [transfer_rule]:\n \"(pcr_tllist A (=) ===> (=)) (\\(xs, b). if lfinite xs then b else undefined) terminal\"", "output": "by(force simp add: cr_tllist_def pcr_tllist_def terminal_tllist_of_llist dest: llist_all2_lfiniteD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma listI: \"\\ size xs = n; set xs \\ A \\ \\ xs \\ list n A\"", "output": "apply (unfold list_def)\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_prod_list: \"lift (prod_list xs) = prod_list (map lift xs)\"", "output": "by (induction xs) (simp_all add: lift_mult)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sorted_wrt_hd_drop_less_drop:\n assumes \"sorted_wrt f xs\" \"\\x. f x x\"\n shows \"\\x \\ set (drop n xs). f (hd (drop n xs)) x\"", "output": "using assms sorted_wrt_drop sorted_wrt_hd_less\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pmf_of_set_code_aux:\n assumes \"A \\ {}\" \"set xs = A\" \"distinct xs\"\n shows \"mapping_of_pmf (pmf_of_set A) = Mapping.tabulate xs (\\_. 1 / real (length xs))\"", "output": "using assms\nby (intro mapping_of_pmfI, subst pmf_of_set) (auto simp: lookup_tabulate distinct_card)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exec_xcpt: \"G \\ xs -st-> xs' \\ gx xs' = None \\ gx xs = None\"\n (is \"?H1 \\ ?H2 \\ ?T\")", "output": "proof- assume h1: ?H1 assume h2: ?H2 from h1 h2 eval_evals_exec_xcpt show \"?T\"\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma linord_of_list_trans:\n assumes \"distinct xs\"\n shows \"trans (linord_of_list xs)\"", "output": "using assms unfolding linord_of_list_def\nby (induct xs) (auto intro!: transI dest: linord_of_listP_domain elim: transE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_swap[simp]:\n \"\\ i < size xs; j < size xs \\ \\ set(xs[i := xs!j, j := xs!i]) = set xs\"", "output": "by(simp add: set_conv_nth nth_list_update) metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonsimple_length_gt_1: \"xs \\ [] \\ hd xs \\ last xs \\ length xs > 1\"", "output": "by (metis length_0_conv less_one nat_neq_iff singleton_list_hd_last)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma remdups_adj_Nil_iff[simp]: \"remdups_adj xs = [] \\ xs = []\"", "output": "by (induct xs rule: remdups_adj.induct, simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma natlist_trivial_1: \"natpermute n 1 = {[n]}\"", "output": "proof - have \"\\length xs = 1; n = sum_list xs\\ \\ xs = [sum_list xs]\" for xs\nby (cases xs) auto then show ?thesis\nby (auto simp add: natpermute_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_list_update_id:\n \"f (xs ! pc) = f instr \\ map f (xs[pc := instr]) = map f xs\"", "output": "using list_update_id map_update\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma luckiestFind_eval' : \"\n (\\xs. (length xs = var + 1) \\ eval (list_conj (map fm.Atom L @ F)) (xs @ \\)) =\n (\\xs. (length xs = var + 1) \\ eval (luckiestFind var L F) (xs @ \\))\"", "output": "apply(rule step_converter[of luckiestFind var L F \\])\nusing luckiestFind_eval\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma successively_rev [simp]: \"successively P (rev xs) \\ successively (\\x y. P y x) xs\"", "output": "by (induction xs rule: remdups_adj.induct) (auto simp: successively_append_iff successively_Cons)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma path_from_to_first': \"v \\(xs @ x # xs')\\ w \\ v \\ set xs'\"", "output": "by (metis path_from_toE append_eq_append_conv2 distinct.simps(2) hd_append list.exhaust_sel list.sel(3) list.set_sel(1,2) list.simps(3) path_disjoint self_append_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_all' [iff]:\n \"list_all' P xs = (\\n < size xs. P (xs!n) n)\"", "output": "by (unfold list_all'_def) (simp add: list_all'_rec)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filter_by_key_merge_all_sequences [simp]:\n \"[x\\merge_all (sequences xs) . key x = k] = [x\\xs . key x = k]\"", "output": "using sorted_sequences [of xs]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma compact_LCons_iff [simp]:\n \"ccpo.compact lSup (\\) (LCons x xs) \\ ccpo.compact lSup (\\) xs\"", "output": "by(blast intro: compact_LConsI compact_LConsD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma llength_ltakeWhile_eq_infinity':\n \"llength (ltakeWhile P xs) = \\ \\ \\ lfinite xs \\ (\\x\\lset xs. P x)\"", "output": "by (metis lfinite_ltakeWhile llength_eq_infty_conv_lfinite)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma foldri_foldr :\n \"foldri xs (\\_. True) f \\ = foldr (\\x \\. f x \\) xs \\\"", "output": "by (induct xs arbitrary: \\) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in field) npeneg_correct: \"peval xs (npeneg e) = peval xs (PExpr1 (PNeg e))\"", "output": "by (cases e rule: pexpr_cases) (simp_all add: npeneg_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma shift_snth_less[simp]: \"p < length xs \\ (xs @- s) !! p = xs ! p\"", "output": "by (induct p arbitrary: xs) (auto simp: hd_conv_nth nth_tl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma UN_set_permutations_of_set [simp]:\n \"finite A \\ (\\xs\\permutations_of_set A. set xs) = A\"", "output": "using finite_distinct_list\nby (auto simp: permutations_of_set_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma real_of_3_remdups_equal_3[simp]: \"real_of_3 ` set (remdups_gen equal_3 xs) = real_of_3 ` set xs\"", "output": "by (induct xs, auto simp: equal_3)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Lxx1: \"xs \\ Lxx x y \\ length xs \\ 2\"", "output": "apply(rule LxxI[where P=\"(\\x y qs. length qs \\ 2)\"])\napply(auto)\nby(auto simp: conc_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bounded_by_update_var:\n assumes \"bounded_by xs vs\"\n and \"vs ! i = Some ivl\"\n and bnd: \"x \\\\<^sub>r ivl\"\n shows \"bounded_by (xs[i := x]) vs\"", "output": "using assms\nusing nth_list_update\nby (cases \"i < length xs\") (force simp: bounded_by_def split: option.splits)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma G'_steps_V_last:\n \"V (last xs)\" if \"G'.steps xs\" \"V (hd xs)\"", "output": "using that\nby induction (auto dest: E'_V2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma insert_before_list_subset: \"set xs \\ set (insert_before_list x ref xs)\"", "output": "apply(induct x ref xs rule: insert_before_list.induct)\nby(auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alw_ev_holds_mp:\n \"alw (holds P) xs \\ ev (holds Q) xs \\ ev (holds (\\x. P x \\ Q x)) xs\"", "output": "by (subst ev_cong, assumption) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af_abs_equiv:\n \"foldl \\af \\ (xs @ [x]) = \\step (foldl \\af\\<^sub>\\ (\\Unf \\) xs) x\"", "output": "unfolding af_unfold af_opt_unfold\nby (induction xs arbitrary: x \\ rule: rev_induct) simp+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma successively_map: \"successively P (map f xs) \\ successively (\\x y. P (f x) (f y)) xs\"", "output": "by (induction xs rule: induct_list012) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ltl_lSup [simp]: \"ltl (lSup A) = lSup (ltl ` (A \\ {xs. \\ lNone xs}))\"", "output": "by(cases \"\\xs\\A. lNone xs\")(auto 4 3 simp add: lSup_def intro: llist.expand)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hd_exp_inverse: \n \"xs \\ MSLNil \\ ms_aux_hd_exp (inverse_ms_aux xs) = map_option uminus (ms_aux_hd_exp xs)\"", "output": "by (cases xs) (auto simp: Let_def hd_exp_basis hd_exp_powser inverse_ms_aux.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma toplevel_summands_PLUS_strong:\n \"\\xs \\ []; list_all (\\x. \\(\\r s. x = Plus r s)) xs\\ \\ toplevel_summands (PLUS xs) = set xs\"", "output": "by (induct xs rule: list_singleton_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rga_ops_rem_last:\n assumes \"rga_ops (xs @ [x])\"\n shows \"rga_ops xs\"", "output": "using assms crdt_ops_rem_last rga_ops_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unstream_stream: \"unstream stream xs = xs\"", "output": "by(induction xs)(auto simp add: stream.rep_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Kdelta_in_Zinf:\"\\j \\ (Suc n); k \\ (Suc n)\\ \\\n z *\\<^sub>a (\\\\<^bsub>j k\\<^esub>) \\ Z\\<^sub>\\\"", "output": "apply (simp add:Kronecker_delta_def)\napply (simp add:z_in_aug_inf Zero_in_aug_inf)\napply (simp add:asprod_n_0 Zero_in_aug_inf) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gds_init_refine: \"gds_init gds \n \\ SPEC (\\s. gen_rwof s \\ gds_is_empty_stack gds s)\"", "output": "apply (rule SPEC_rule_conj_leofI1)\napply (rule rwof_init[OF nofail])\napply (rule init_empty_stack) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma analz_image_Key [simp]: \"analz (Key`N) = Key`N\"", "output": "apply auto\napply (erule analz.induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma monotone_lmerge: \"monotone (rel_prod lprefix lprefix) lprefix (case_prod lmerge)\"", "output": "apply(rule llist.fixp_preserves_mono2[OF lmerge_mono lmerge_conv_fixp])\napply(erule conjE|rule allI conjI cont_intro|simp|erule allE, erule llist.mono2mono)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ft_tailR_impl: \"al_tailR ft_\\ ft_invar ft_tailR\"", "output": "apply unfold_locales\napply (auto simp add: ft_defs FingerTree.tailR_correct FingerTree.empty_correct) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filter_oseq_idemp: \"filter_oseq p (filter_oseq p s) = filter_oseq p s\"", "output": "apply (simp add: filter_oseq_def)\napply (rule ext)\napply (case_tac \"s i\")\napply simp_all done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma all2_less_lemma [simp]:\n \"rec_eval (rec_all2_less f) [x, y1, y2] = (if (\\z < x. 0 < rec_eval f [z, y1, y2]) then 1 else 0)\"", "output": "apply(auto simp add: Let_def rec_all2_less_def)\napply(metis nat_less_le)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l2_inv7_step1:\n \"{l2_inv7} l2_step1 Ra A B {> l2_inv7}\"", "output": "apply (auto simp add: PO_hoare_defs l2_defs intro!: l2_inv7I)\napply (auto intro: synth_analz_increasing) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_ciD3_ci_app:\n \"\\ ci_app ci ins P h stk loc C M pc frs; ins_jump_ok ins pc' \\ \\ ci_app ci ins P h stk loc C M pc' frs\"", "output": "apply(cases ci)\napply(simp add: Abs_check_instr_inverse)\napply(erule (2) wf_ciD3) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"[2, mod 10, 4] = {2, 12, 22, 32, 42}\"", "output": "apply (simp only: iMODb_conv)\napply (simp add: iT_defs iT_Plus_def iT_Mult_def)\napply fastforce done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strict_mono_cancel_le:\nfixes f :: \"'a::linorder \\ 'b::linorder\"\nshows \"strict_mono f \\ (f x \\ f y) = (x \\ y)\"", "output": "apply (auto simp add: order_le_less)\napply (simp add: strict_mono_cancel_less)\napply (simp add: strict_mono_cancel_eq)\napply (simp add: strict_monoD) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma equiv_class_member:\n assumes \"x \\ A\"\n and \"\\A `` {x} = \\A `` {y}\" \n shows \"y \\ A\"", "output": "using assms\napply(simp)\napply(simp add: str_eq_def)\napply(metis append_Nil2) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mor_image1: \"mor B1 B2 s1 s2 B1' B2' s1' s2' f g \\ f ` B1 \\ B1'\"", "output": "apply (tactic \\dtac @{context} @{thm iffD1[OF mor_def]} 1\\)\napply (erule conjE)+\napply (rule image_subsetI)\napply (erule bspec)\napply assumption done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_strict_asc_distinct: \"list_strict_asc (xs::'a::preorder list) \\ distinct xs\"", "output": "apply (rule_tac ord=\"(<)\" in list_ord_distinct)\napply (unfold irrefl_def list_strict_asc_def trans_def)\napply (blast intro: less_trans)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hs_ins_impl: \"imp_set_ins is_hashset hs_ins\"", "output": "apply unfold_locales\napply (sep_auto heap: hm_update_rule simp: hs_ins_def is_hashset_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma and_neq_0_is_nth:\n \\x AND y \\ 0 \\ x !! n\\ if \\y = 2 ^ n\\ for x y :: \\'a::len word\\", "output": "apply (simp add: bit_eq_iff bit_simps)\nusing that\napply (simp add: bit_simps not_le)\napply transfer\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma const_le_unat:\n \"\\ b < 2 ^ LENGTH('a); of_nat b \\ a \\ \\ b \\ unat (a :: 'a :: len word)\"", "output": "apply (simp add: word_le_def)\napply (simp only: uint_nat zle_int)\napply transfer\napply (simp add: take_bit_nat_eq_self) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AddSA_HAInitValue_IFF:\n \"\\ States SA \\ HAStates HA = {};\n S \\ HAStates HA;\n (HAInitValue HA) = X \\ \\ (HAInitValue (HA [++] (S, SA))) = X\"", "output": "apply (subst AddSA_HAInitValue)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma order_widen [intro,simp]: \n \"wf_prog m P \\ order (subtype P)\"", "output": "apply (unfold Semilat.order_def lesub_def)\napply (auto intro: widen_trans widen_antisym) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hta_\\_is_ta[simp, intro!]: \"tree_automaton (hta_\\ H)\"", "output": "apply unfold_locales\napply (unfold hta_\\_def)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FAddSA_HierAuto_insert [simp]:\n \"\\ (States SA \\ HAStates HA) = {};\n S \\ HAStates HA \\ \\ \n HierAuto (HAInitValue HA) \n (insert SA (SAs HA)) \n (HAEvents HA \\ SAEvents SA) \n (CompFun HA [f+] (S,SA))\"", "output": "apply (unfold HAStates_def)\napply (rule FAddSA_HierAuto)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma obj_ty_def2 [simp]: \"obj_ty (C,fs) = Class C\"", "output": "apply (unfold obj_ty_def)\napply (simp (no_asm)) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma initedD: \"inited C g \\ \\ obj. g (Stat C) = Some obj\"", "output": "apply (unfold inited_def)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lrev_body_lrev_body1_eq: \"lrev_body1 = unwrapH oo lrev_body oo wrapH\"", "output": "apply (rule cfun_eqI)+\napply (subst lrev_body.unfold)\napply (subst lrev_body1.unfold)\napply (case_tac xa)\napply (simp_all add: list2H_def wrapH_def unwrapH_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_owner_document_is_l_get_owner_document [instances]: \"l_get_owner_document get_owner_document\"", "output": "apply(auto simp add: l_get_owner_document_def)[1]\nusing get_owner_document_ptr_in_heap\napply fast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_vector_mult_in_columnspace_gen:\n fixes A :: \"'a::field^'n^'m\"\n shows \"(A *v x) \\ vec.span(columns A)\"", "output": "apply (simp add: matrix_vector_column columns_def transpose_def column_def)\napply (intro vec.span_sum vec.span_scale)\napply (force intro: vec.span_base) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ucast_and_neg_mask:\n \"ucast (x AND NOT (mask n)) = ucast x AND NOT (mask n)\"", "output": "apply (rule bit_word_eqI)\napply (auto simp add: bit_simps dest: bit_imp_le_length) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma atoms_list_disjE:\n \"a \\ atoms(list_disj fs) \\ a \\ (\\\\ \\ set fs. atoms \\)\"", "output": "apply(induct fs)\napply (simp add:list_disj_def)\napply (auto simp add:list_disj_def Logic.or_def split:if_split_asm) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PO_a0i_obs_inv1_iagree [iff]: \"oreach a0i \\ a0i_inv1_iagree\"", "output": "apply (rule external_from_internal_invariant, fast)\napply (subst a0i_def, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bounded_clinear_vector_to_cblinfun[bounded_clinear]: \"bounded_clinear vector_to_cblinfun\"", "output": "apply (rule bounded_clinearI[where K=1])\napply (transfer, simp add: scaleC_add_right)\napply (transfer, simp add: mult.commute)\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_lasso_gbg: \"gbg.is_lasso T m = is_lasso\"", "output": "unfolding is_lasso_def[abs_def] gbg.is_lasso_def[abs_def]\napply simp\napply (simp_all add: to_gbg_ext_def)\napply (intro ext)\napply (fo_rule arg_cong | intro ext)+\napply (auto simp: F_def accn_def intro!: ext) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma enumerator_bound: \"ls \\ set (enumerator m nmax) \\\n 0 < nmax \\ x \\ set ls \\ x < nmax\"", "output": "apply (auto simp: enumerator_def split: if_split_asm)\napply (subgoal_tac \"x \\ nmax - 2\")\napply arith\napply (rule_tac enumAppend_bound_rec)\nby(auto simp:enumBase_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wp2_Skip[simp]: \"wp\\<^sub>2 SKIP Q = (%s. eSuc (Q s))\"", "output": "apply(auto intro!: ext simp: wp2_def) prefer 2\napply(simp only: SKIPnot)\napply(simp)\napply(simp only: SKIPp SKIPt)\nusing one_enat_def plus_1_eSuc(1)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flatten_while [simp]: \"flatten (while gs b c) = [while gs b c]\"", "output": "apply (simp add: while_def)\napply (induct gs)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fn_comm_power: \"fa \\ tr = tr \\ fr \\ fa ^^ n \\ tr = tr \\ fr ^^ n\"", "output": "apply (rule ext)\napply (induct n)\napply (auto dest: fun_cong) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unat_less_helper:\n \"x < of_nat n \\ unat x < n\"", "output": "apply (simp add: word_less_nat_alt)\napply (erule order_less_le_trans)\napply (simp add: take_bit_eq_mod) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adm_fn:\n shows \"adm (\\x. x \\ fn_lf_rep r)\"", "output": "unfolding fn_lf_rep_def\nusing adm_below_monic_exists[OF _ below_monic_fun_K[where f=\"ValF\"], where P=\"\\_. True\", simplified]\napply (clarsimp simp: split_def)\napply (rule adm_below_monic_exists)\napply (auto simp: cont_fun below_monic_indexed) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma halloc_gext: \"\\s1 s2. G\\s1 \\halloc oi\\a\\ s2 \\ snd s1\\|snd s2\"", "output": "apply (simp (no_asm_simp) only: split_tupled_all)\napply (erule halloc.induct)\napply (auto dest!: new_AddrD) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma BoxPrime: \"\\ \\P \\ \\($P \\ P$)\"", "output": "apply clarsimp\napply (erule dup_boxE)\napply (unfold boxInit_act)\napply (erule STL4E)\napply (auto simp: Init_simps dest!: STL2_pr [temp_use]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Order) ord_isom_mem:\"\\Order E; ord_isom D E f; a \\ carrier D\\ \\\n (f a) \\ carrier E\"", "output": "apply (simp add:ord_isom_def, (erule conjE)+)\napply (simp add:ord_inj_mem) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eFalse: \"A \\\\<^sub>e {\\s. False} e {Q}\"", "output": "apply (rule eThin)\napply (rule ehoare_relative_complete)\napply (auto simp add: evalid_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parts_empty [simp]: \"parts{} = {}\"", "output": "apply safe\napply (erule parts.induct, blast+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma distrPUTLG: \n \"\\x \\ dom P; (list2policy PL) x = P x; disjDomGD PL; PL \\ []\\ \\ \n (PUT x = P x) = PUTListGD PUT x PL \"", "output": "apply (rule iffI)\napply (rule distrPUTLG2)\napply (simp_all)\napply (rule_tac PL = PL in distrPUTLG1)\napply (auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "theorem mutil_not_tiling:\n \"t = {0..< 2 * Suc m} \\ {0..< 2 * Suc n}\n ==> t - {(0,0)} - {(Suc(2 * m), Suc(2 * n))} \\ tiling domino\"", "output": "apply (rule gen_mutil_not_tiling)\napply (blast intro!: dominoes_tile_matrix)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_subcls1: \"finite (subcls1 P)\"", "output": "apply (simp add: subcls1_def2)\napply(rule finite_SigmaI [OF finite_is_class])\napply(rule_tac B = \"{fst (the (class P C))}\" in finite_subset)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pi'_dom[icf_proper_iteratorI]: \"proper_it' it it' \n \\ proper_it' (map_iterator_dom o it) (map_iterator_dom o it')\"", "output": "apply (rule proper_it'I)\napply (simp add: comp_def)\napply (rule icf_proper_iteratorI)\napply (erule proper_it'D) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chart_basis_continuous:\n notes [transfer_rule] = open_nonzero_openin_transfer\n shows \"continuous_on (Collect (chart_basis_domainP b)) (chart_basis b)\"", "output": "apply (rule continuous_on_proj_spaceI) unfolding o_def chart_basis.abs_eq Proj_vimage_chart_basis_domainP\napply transfer subgoal\nby (auto intro!: continuous_intros simp: split_beta) subgoal\nby (rule open_chart_basis_domain) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wset_find_path'_refine: \n \"wset_find_path' E U0 P \\ \\Id (wset_find_path E U0 P)\"", "output": "unfolding wset_find_path'_def wset_find_path_def unfolding op_map_pick_remove_alt\napply (refine_rcg IdI)\napply assumption\napply simp_all done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in normal) oInv_le:\n\"a < F (oSuc x) \\ oInv F a \\ x\"", "output": "apply (erule contrapos_pp)\napply (simp add: linorder_not_less linorder_not_le less_oInvD) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in aGroup) asubg_inc_zero:\"asubGroup A H \\ \\ \\ H\"", "output": "apply (simp add:asubGroup_def)\napply (cut_tac b_ag_group)\napply (frule Group.sg_unit_closed[of \"b_ag A\" \"H\"], assumption)\napply (simp add:b_ag_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Tarski) Y_subset_A: \"Y \\ A\"", "output": "apply (rule subset_trans [OF _ fix_subset])\napply (rule Y_ss [simplified P_def]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma auto_split_is_maxsplit:\n \"auto_split A (start A) res [] xs = maxsplit (accepts A) res [] xs\"", "output": "apply (unfold accepts_def)\napply (subst delta_Nil[where ?s = \"start A\", symmetric])\napply (subst auto_split_lemma)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma States_CDMode_CTRL:\n \"States CDMode_CTRL = CDMode_CTRL_States\"", "output": "apply (simp add: CDMode_CTRL_def)\napply (unfold States_def)\napply (simp add: Abs_seqauto_inverse check_CDMode_CTRL) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mono_Sup:\n fixes f :: \"'a::complete_lattice \\ 'b::complete_lattice\"\n shows \"mono f \\ Sup (f`S) \\ f (Sup S)\"", "output": "apply (rule Sup_least)\napply (erule imageE)\napply simp\napply (erule monoD)\napply (erule Sup_upper) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Rep_map_type: \"(\\x. f(x) \\ A) \\ Rep_map f xs \\ list(A)\"", "output": "apply (simp add: Rep_map_def)\napply (rule list_induct, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iT_Div_conv_count: \"\n 0 < d \\ I \\ d = {k. I \\ [k * d\\,d - Suc 0] \\ {}}\"", "output": "apply (case_tac \"I = {}\")\napply (simp add: iT_Div_empty)\napply (rule set_eqI)\napply (simp add: iT_Div_mem_iff_Int) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma etran_in_comm:\n \"(P, t) # xs \\ comm(guar, post) \\ (P, s) # (P, t) # xs \\ comm(guar, post)\"", "output": "apply(simp add:comm_def)\napply clarify\napply(case_tac i,simp+) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma blue_dfs_correct': \"(uncurry2 blue_dfs, uncurry2 blue_dfs_spec) \\ [\\((E,A),v0). finite (E\\<^sup>*``{v0})]\\<^sub>f ((Id\\\\<^sub>rId)\\\\<^sub>rId) \\ \\Id\\nres_rel\"", "output": "apply (intro frefI nres_relI) unfolding blue_dfs_spec_def\napply clarsimp\napply (refine_vcg blue_dfs_correct) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Derivation_leftmost: \"D \\ [] \\ Derivation a D b \\ \\ i. leftmost i a\"", "output": "apply (case_tac \"D\")\napply (auto)\napply (metis Derives1_leftmost) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma graph_more_rel_sv[relator_props]: \n \"\\single_valued Rm; single_valued Rv; single_valued Rw\\ \n \\ single_valued (\\Rm,Rv,Rw\\graph_more_rel)\"", "output": "unfolding graph_more_rel_def\napply (rule single_valuedI, clarsimp)\napply (rule graph.equality)\napply (erule (1) single_valuedD[rotated], tagged_solver)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma g_sng_impl: \"map_sng \\ invar g_sng\"", "output": "apply unfold_locales\napply (simp_all add: update_correct empty_correct g_sng_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_orA_quasi_commute: \"p2 \\\\<^sub>\\\\<^sub>A p1 = (((\\(x,y). (y,x)) o_f (p1 \\\\<^sub>\\\\<^sub>A p2))) o (\\(a,b).(b,a))\"", "output": "apply (rule ext)\napply (simp add: prod_orA_def policy_range_comp_def o_def)\napply (auto)[1]\napply (simp split: option.splits decision.splits) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma accs_is_b_accessible: \"accs \\ t q \\ q\\b_accessible \\\"", "output": "apply (induct rule: accs.induct)\napply (rule b_accessible.intros)\napply assumption\napply (fastforce simp add: in_set_conv_nth) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_inc: \"finite (inc ` X) = finite X\"", "output": "apply(rule inj_finite_image_eq_finite)\napply(rule_tac B=UNIV in subset_inj_on)\napply(auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in aGroup) ag_r_zero:\"x \\ carrier A \\ x \\ \\ = x\"", "output": "apply (cut_tac ex_zero)\napply (subst pop_commute, assumption+)\napply (rule ag_l_zero, assumption) done"} {"instruct": "Given a lemma, please prove it.", "input": "theorem chopOne_not_decrease: \"dn \\ domainNameDeptChopOne dn\"", "output": "apply(induction dn)\napply(rename_tac name dpt)\napply(drule_tac x=\"name\" in prepend_domain)\napply(case_tac dpt)\napply simp_all done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sorted_sort: \"sorted (map f (sort xs))\"", "output": "apply (induction xs rule: sort.induct)\napply simp\napply (simp only: sorted_append sort.simps part map_append split)\napply (intro conjI TrueI)\nusing sorted_map_same\nby (auto simp: set_sort)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SubnetsInGW_ENF_refl: \"SecurityInvariant_withOffendingFlows.ENF_refl sinvar allowed_subnet_flow\"", "output": "unfolding SecurityInvariant_withOffendingFlows.ENF_refl_def\napply(rule conjI)\napply(simp add: SubnetsInGW_ENF)\napply(simp add: allowed_subnet_flow_refl) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_subcls1:\n \"wf_prog wf_md P \\ wf ((subcls1 P)\\)\"", "output": "apply (rule finite_acyclic_wf_converse)\napply (rule finite_subcls1)\napply (erule acyclic_subcls1) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma publicKey_into_used [iff] :\"Key (publicKey b A) \\ used evs\"", "output": "apply (rule initState_into_used)\napply (rule publicKey_in_initState [THEN parts.Inj]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma States_Root_CTRL:\n \"States Root_CTRL = Root_CTRL_States\"", "output": "apply (simp add: Root_CTRL_def)\napply (unfold States_def)\napply (simp add: Abs_seqauto_inverse check_Root_CTRL) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Rep_take_columns[simp]:\n \"Rep_matrix (take_columns A c) j i =\n (if i < c then (Rep_matrix A j i) else 0)\"", "output": "apply (simp add: take_columns_def)\napply (simplesubst RepAbs_matrix)\napply (rule exI[of _ \"nrows A\"], auto, simp add: nrows_le)\napply (rule exI[of _ \"ncols A\"], auto, simp add: ncols_le) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ps_chains_is_ps_chains2_with_empty_S:\n \"ps_chains = ps_chains2 {||}\"", "output": "apply (unfold fun_eq_iff, intro allI)\napply (unfold ps_chains_def ps_chains2_def)\napply (fold initial_ps_is_initial_ps2_with_empty_S)\napply (fold lins_is_lins2_with_empty_S)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma link_length: \"size (tree_to_multiset (link t1 t2)) = \n size (tree_to_multiset t1) + size (tree_to_multiset t2)\"", "output": "apply(cases t1)\napply(cases t2)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma possible_steps_0_not_select: \"a \\ STR ''select'' \\\n possible_steps drinks 0 <> a b = {||}\"", "output": "apply (simp add: possible_steps_def ffilter_def fset_both_sides Abs_fset_inverse Set.filter_def drinks_def)\napply safe\nby (simp_all add: select_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bl_to_bin_ge0: \"bl_to_bin bs \\ 0\"", "output": "apply (unfold bl_to_bin_def)\napply (rule xtrans(4))\napply (rule bl_to_bin_ge2p_aux)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hta_ensure_idx_s_correct[simp, intro!]: \"hashedTa (hta_ensure_idx_s H)\"", "output": "apply (unfold_locales)\napply (auto)\napply (auto simp add: hta_ensure_idx_f_def hta_ensure_idx_s_def hta_ensure_idx_sf_def index_correct split: option.split_asm) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hidings_empty_entails [intro!]: \"t hidings (\\k. {}) entails R\"", "output": "apply (unfold hidings_entails_def)\napply (simp (no_asm)) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chart_basis_inverse: \"chart_basis_inv (chart_basis b x) = x\" if \"chart_basis_domainP b x\"", "output": "using that\napply transfer unfolding proj_rel_iff\napply transfer\napply (simp add: split_beta prod_eq_iff) subgoal for x\napply (rule exI[where x=\"fst x \\ b\"])\nusing b\nby (simp add: algebra_simps) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma indecomposable_succ [simp]: \"indecomposable (succ \\) \\ \\ = 0\"", "output": "using not_add_mem_right\napply (auto simp: indecomposable_def)\napply (metis add_right_cancel add.right_neutral) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma icard_glength: \"icard (gset a) \\ glength a\"", "output": "apply (unfold icard_def glength_def)\napply (case_tac a)\napply (simp add: card_length)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wprepare_goto_start_pos_Bk_move[simp]: \"\\lm \\ []; wprepare_goto_start_pos m lm (b, Bk # list)\\\n \\ wprepare_goto_start_pos m lm (Bk # b, list)\"", "output": "apply(simp only:wprepare_invs, auto)\napply(case_tac [!] lm, simp, simp_all) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interfree_Color_Target_Append:\n \"interfree_aux (Some Color_Target, {}, Some Append)\"", "output": "apply (unfold modules )\napply interfree_aux\napply(clarify, simp add:abbrev Append_to_free0)+\napply (force simp add: Append_to_free2)\napply(clarify,simp add:abbrev Append_to_free0)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma int_o_subst:\n\"int \\ o subst \\ = int (int \\ o \\)\"", "output": "apply(rule ext)\napply(subst comp_def) unfolding int_o[symmetric] .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"Mutex \\ Always bad_IU\"", "output": "apply (rule AlwaysI, force)\napply (unfold Mutex_def, safety, auto) oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gen_upd_app: \"\\es'. gen_upd var (es@es') = gen_upd var es' \\ gen_upd var es\"", "output": "apply (induct es)\napply (rule ext)\napply (simp add: gen_upd_def)\napply (rule ext)\napply (simp add: gen_upd_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wp_Un_eq: \"single_valued act ==> wp act (A \\ B) = wp act A \\ wp act B\"", "output": "apply (rule equalityI)\napply (force simp add: wp_def single_valued_def)\napply (rule wp_Un_subset) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma parts_insert_Crypt [simp]:\n \"parts (insert (Crypt K X) H) = insert (Crypt K X) (parts (insert X H))\"", "output": "apply (rule equalityI)\napply (rule subsetI)\napply (erule parts.induct, auto)\napply (blast intro: parts.Body) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wlconf_map_sum [simp]: \n \"G,s\\l1 (+) l2[\\\\\\]L1 (+) L2 = (G,s\\l1[\\\\\\]L1 \\ G,s\\l2[\\\\\\]L2)\"", "output": "apply (unfold wlconf_def)\napply safe\napply (case_tac [3] \"n\")\napply (force split: sum.split)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma check_Root_CTRL:\n \"(Root_CTRL_States,Root_CTRL_Init,Root_CTRL_Labels,Root_CTRL_Delta) : seqauto\"", "output": "apply (unfold seqauto_def SeqAuto_def Root_CTRL_States_def Root_CTRL_Init_def Root_CTRL_Labels_def Root_CTRL_Delta_def)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cont_Sup:\n assumes \"cont lub ord Union (\\) f\"\n shows \"cont lub ord Sup (\\) (\\x. \\f x)\"", "output": "apply(rule contI)\napply(simp add: contD[OF assms])\napply(blast intro: Sup_least Sup_upper order_trans antisym) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sim_action_refl [intro!, simp]:\n \"obs \\ obs\"", "output": "apply(cases obs)\napply(rename_tac obs')\napply(case_tac \"obs'\")\napply(auto intro: sim_action.intros) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comm_monoid: \"comm_monoid R\"", "output": "unfolding R_def residue_ring_def\napply (rule comm_monoidI)\nusing m_gt_one\napply auto\napply (metis mod_mult_right_eq mult.assoc mult.commute)\napply (metis mult.commute) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tso_round0_refines:\n \"{tso_ref_rel} Id, tso_round0 r S v {>tso_ref_rel}\"", "output": "apply(rule rhoare_skipI)\napply(auto simp add: tso_ref_rel_def basic_rel_def step1_rel_def step1_add_rel_def step0_rel_def tso_round0_def const_map_equality conj_disj_distribR ex_disj_distrib two_step_phase_Suc) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bl_bin_2[simp]: \n \"bl_bin () + (4 * rs + 4) * 2 ^ (length () - Suc 0)\n = bl_bin (Oc\\(Suc aa) @ Bk # ) + rs * (2 * 2 ^ (aa + length ()))\"", "output": "apply(case_tac \"list\", simp add: add_mult_distrib)\napply(simp add: tape_of_nl_cons_app2 add_mult_distrib)\napply(simp add: tape_of_list_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_processT8_Pair: \"fst s \\ D P \\ s \\ F P\"", "output": "apply(subst surjective_pairing)\napply(rule is_processT8_S, simp) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma local_flow_pend: \"local_flow f UNIV UNIV \\\"", "output": "apply(unfold_locales, simp_all add: local_lipschitz_def lipschitz_on_def vec_eq_iff, clarsimp)\napply(rule_tac x=\"1\" in exI, clarsimp, rule_tac x=1 in exI)\napply(simp add: dist_norm norm_vec_def L2_set_def power2_commute UNIV_2)\nby (auto simp: forall_2 intro!: poly_derivatives)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Safety: \"system \\ stable Safety\"", "output": "apply (unfold Safety_def)\napply (rule stable_INT)\napply (simp add: system_def, safety, fast) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l3_inv3_init [iff]:\n \"init l3 \\ l3_inv3\"", "output": "apply (auto simp add: l3_def l3_init_def intro!: l3_inv3I)\napply (auto simp add: ik_init_def intro!: synth_increasing [THEN [2] rev_subsetD]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_shiftr:\n \"u \\ v \\ u >> (n :: nat) \\ (v :: 'a :: len word) >> n\"", "output": "apply (unfold shiftr_def)\napply (induct_tac \"n\")\napply auto\napply (erule le_shiftr1) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in aGroup) asubg_subset:\"A +> H \\ H \\ carrier A\"", "output": "apply (simp add:asubGroup_def)\napply (simp add:sg_def, (erule conjE)+)\napply (simp add:ag_carrier_carrier) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma i_Exec_Stream_Equal_State: \"\n \\ Exec_Equal_State localState trans_fun;\n localState c1 = localState c2 \\ \\\n i_Exec_Comp_Stream trans_fun input c1 =\n i_Exec_Comp_Stream trans_fun input c2\"", "output": "apply (clarsimp simp: ilist_eq_iff i_Exec_Stream_nth)\napply (rule f_Exec_Equal_State)\napply simp+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma field_class: \"field (cring_class_ops::'a::field ring)\"", "output": "apply unfold_locales\napply (simp_all add: cring_class_ops_def)\napply (auto simp add: Units_def)\napply (rule_tac x=\"1 / x\" in exI)\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extend_guar_increasing:\n \"[| F \\ UNIV guarantees increasing func; \n subset_closed (AllowedActs F) |] \n ==> extend h F \\ X' guarantees increasing (func o f)\"", "output": "apply (erule project_guarantees)\napply (rule_tac [3] extending_increasing)\napply (rule_tac [2] projecting_UNIV, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Nset2_prep1:\"\\finite A; card A = Suc (Suc n) \\ \\ \\x. x\\A\"", "output": "apply (frule card_nonzero[of \"A\"])\napply simp\napply (simp add:nonempty_ex) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma N1_enabled_at_b: \"\\ pc1 = #b \\ Enabled (_(x,y,sem,pc1,pc2))\"", "output": "apply clarsimp\napply (rule_tac F = beta1 in enabled_mono)\napply (enabled Inc_base)\napply (force simp: beta1_def)\napply (force simp: angle_def beta1_def N1_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vecspace_cpx_vec [simp]:\n \"vectorspace cpx_rng (module_cpx_vec n)\"", "output": "apply unfold_locales\napply (auto simp: cpx_rng_def module_cpx_vec_def module_vec_def Units_def field_simps)\napply (auto intro: right_inverse add_inv_exists_vec)\nby (metis add.right_neutral add_diff_cancel_left' add_uminus_conv_diff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma finite_closed_segment [simp]: \"finite(closed_segment a b) \\ a = b\"", "output": "apply auto\napply (rule ccontr)\napply (simp add: segment_image_interval)\nusing infinite_Icc [OF zero_less_one] finite_imageD [OF _ inj_segment]\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma obj_fields_marked_good_ref_subseteq_hp_IdleMarkSweep_locs:\n \"obj_fields_marked_good_ref_locs \\ hp_IdleMarkSweep_locs\"", "output": "unfolding obj_fields_marked_good_ref_locs_def mark_loop_locs_def hp_IdleMarkSweep_locs_def mark_loop_mo_locs_def\napply (clarsimp simp: loc_defs)\napply (drule mp)\napply (auto intro: append_prefixD) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HUnion_iff [iff]: \"hmem x (\\ A) \\ (\\y. y \\<^bold>\\ A \\ x \\<^bold>\\ y)\"", "output": "apply (insert union_of_set [of A], clarify)\napply (simp add: HUnion_def)\napply (rule theI2)\napply (auto simp: hf_ext) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma equiv_induced_by_injS:\"\\Order D; Order E; ord_inj D E f; \n D1 \\ carrier D\\ \\ ord_equiv (SIod D D1) (SIod E (f ` D1))\"", "output": "apply (simp add:ord_equiv_def)\napply (frule ord_inj_Srestrict_isom[of D E f D1], assumption+)\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma field_val [simp]:\n \"field E list_name val_name = (list_name, Integer)\"", "output": "apply (insert class_list)\napply (unfold list_class_def)\napply (fastforce simp add: sees_field_def distinct_classes intro: field_def2 Fields.intros) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Repoint_impl) Repoint_modifies:\n shows \"\\\\. \\\\{\\} \\p :== PROC Repoint (\\p)\n {t. t may_only_modify_globals \\ in [low,high]}\"", "output": "apply (hoare_rule HoarePartial.ProcRec1)\napply (vcg spec=modifies) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma oZero_least: \"oZero \\ x\"", "output": "apply (unfold oZero_def, cases x, clarsimp)\napply (induct_tac z, simp, atomize)\napply (rule ord0_less_imp_le)\napply (rule ord0_le_less_trans)\napply (auto simp: less_ord0_LimI) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_shadow_root_safe_is_l_get_shadow_root_safe [instances]: \"l_get_shadow_root_safe get_shadow_root_safe\"", "output": "using instances\napply(auto simp add: l_get_shadow_root_safe_def)[1] done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma addition_inc_add0:\" A \\ addition_set f A\"", "output": "apply (rule subsetI)\napply (insert addition_inc_add [of \"f\" \"A\" \"0\"])\napply simp\napply (simp add:subsetD) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fix_eqvt[eqvt]:\n \"\\ \\ fix = (fix :: ('a \\ 'a) \\ 'a::{cont_pt,pcpo})\"", "output": "apply (rule cfun_eqI)\napply (subst permute_cfun_def)\napply simp\napply (rule parallel_fix_ind[OF adm_subst2])\napply (auto simp add: permute_self) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma primerec_rec_not_1[intro]: \"primerec rec_not (Suc 0)\"", "output": "apply(simp add: rec_not_def)\napply(rule prime_cn, auto dest!:less_2_cases[unfolded numeral One_nat_def]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma recognises_from_2:\n \"recognises_execution drinks 1 <1 $:= d, 2 $:= Some (Num 100)> [(STR ''vend'', [])]\"", "output": "apply (rule recognises_execution.step)\napply (rule_tac x=\"(2, vend)\" in fBexI)\napply simp\nby (simp add: possible_steps_2_vend)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma restrict_dom_same [simp]: \"m|\\<^bsub>dom m\\<^esub> = m\"", "output": "apply (rule ext)\napply (clarsimp simp add: restrict_map_def)\napply (simp only: not_None_eq [symmetric])\napply rule\napply (drule sym)\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dither_halts:\n shows \"{dither_halt_inv} dither {dither_halt_inv}\"", "output": "apply(rule Hoare_haltI)\nusing dither_halts_aux\napply(auto simp add: tape_of_nat_def)\nby (metis (lifting, mono_tags) holds_for.simps is_final_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma less_oSuc_eq_le: \"(x < oSuc y) = (x \\ y)\"", "output": "apply (rule iffI)\napply (erule contrapos_pp, simp add: linorder_not_less linorder_not_le)\napply (erule oSuc_leI)\napply (erule order_le_less_trans[OF _ less_oSuc]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ThrowRule: \"P \\ A \\ \\, \\ \\\\<^bsub>/F\\<^esub> (AnnExpr P) Throw Q, A\"", "output": "apply (rule Conseq, simp)\napply (rule exI, rule exI, rule exI)\napply (rule conjI, rule Throw, auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma checkNet2_correct: \"checkNet2 c s t \\ checkNet c s t\"", "output": "apply (rule refine_IdD) unfolding checkNet_def checkNet2_def graph_of_def rev_graph_of_def reachable_spec_def reaching_spec_def\napply (refine_rcg)\napply refine_dref_type\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in normal_set) mem_next: \"(LEAST z. z \\ A \\ x < z) \\ A\"", "output": "apply (rule LeastI2_ex)\napply (fold Bex_def, rule unbounded)\napply (erule conjunct1) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma skl1_inv5_trans [iff]:\n \"{skl1_inv5} trans skl1 {> skl1_inv5}\"", "output": "apply (auto simp add: PO_hoare_defs intro!: skl1_inv5I)\napply (drule can_signal_trans, assumption)\napply (auto simp add: skl1_nostep_defs)\napply (auto simp add: skl1_defs ik_dy_def dest: skl1_inv5D) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma WT_fv: \"P,E \\ e :: T \\ fv e \\ dom E\"\nand \"P,E \\ es [::] Ts \\ fvs es \\ dom E\"", "output": "apply(induct rule:WT_WTs.inducts)\napply(simp_all del: fun_upd_apply)\napply fast+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma edka_partial_refine[refine]: \"edka_partial \\ \\Id fofu\"", "output": "unfolding edka_partial_def fofu_def\napply (refine_rcg bind_refine')\napply (refine_dref_type)\napply (vc_solve simp: find_shortest_augmenting_spec_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ntrunc_one_In1 [simp]: \"ntrunc (Suc 0) (In1 M) = {}\"", "output": "apply (simp add: In1_def)\napply (simp add: Scons_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_ms_array_list_prec[safe_constraint_rules]: \"precise (is_ms_array_list ms)\"", "output": "unfolding is_ms_array_list_def[abs_def]\napply(rule preciseI)\napply(simp split: prod.splits)\nusing preciseD snga_prec\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma IV: \"Mutex \\ Always IV\"", "output": "apply (rule AlwaysI, force)\napply (unfold Mutex_def, safety) done"} {"instruct": "Given a lemma, please prove it.", "input": "theorem HuntSands33: \"(p,G,c,H):HS \\ secure p G c H\"", "output": "apply (simp add: secure_def, clarsimp)\napply (drule Theorem4, clarsimp)\napply (rule Prop4A)\napply (rule VDM_Sound_emptyCtxt)\napply fast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_subcls1_E: \"wf ((subcls1 E)\\)\"", "output": "apply (rule finite_acyclic_wf_converse)\napply (simp add: subcls1 del: insert_iff)\napply (rule acyclic_subcls1_E) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Highest_escapes_above: \"system \\ Highest i leadsTo (\\k. {s. i\\above k s})\"", "output": "apply (rule leadsTo_weaken_R)\napply (rule_tac [2] Lowest_above_subset)\napply (rule Highest_leadsTo_Lowest) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nd_fun_distr[nd_fun_ka]: \"(x + y) \\ z = x \\ z + y \\ z\"\n and nd_fun_distl[nd_fun_ka]: \"x \\ (y + z) = x \\ y + x \\ z\" for x::\"'a nd_fun\"", "output": "unfolding plus_nd_fun_def times_nd_fun_def\nby (simp_all add: kcomp_distr kcomp_distl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma star_test_folk: \"test p \\ p \\ x = x \\ p \\ p \\ y = y \\ p \\ (p \\ x + !p \\ y)\\<^sup>\\ \\ p = p \\ (p \\ x)\\<^sup>\\\"", "output": "using star_n_folk\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma runErrorT_bindET [simp]:\n \"runErrorT\\(bindET\\m\\k) = bind\\(runErrorT\\m)\\\n (\\ n. case n of Err\\e \\ return\\(Err\\e) | Ok\\x \\ runErrorT\\(k\\x))\"", "output": "unfolding bindET_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult_zero_right [simp]: \"a \\ 0 = (0::'a)\"", "output": "proof - have \"a \\ 0 = a \\ (0 - (0::'a))\"\nby simp also have \"\\ = a \\ 0 - a \\ 0\"\nby (rule diff_mult_distrib1) simp_all also have \"\\ = 0\"\nby simp finally show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma phl_test_while: \n assumes \"test p\" and \"test b\" \n and \"\\p \\ b\\ x \\p\\\"\n shows \"\\p\\ (b \\ x)\\<^sup>\\ \\ !b \\p \\ !b\\\"", "output": "by (metis assms phl_n_while test_double_comp_var)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma slength_0_conv[simp]:\n \"(slength\\xs = 0) \\ (xs = [::])\"\n \"(slength\\xs = MkI\\0) \\ (xs = [::])\"\n \"eq\\0\\(slength\\xs) = sNone\\xs\"\n \"eq\\(slength\\xs)\\0 = sNone\\xs\"", "output": "by (induct xs) (auto simp: one_Integer_def elim: slengthE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma compare_EQ_iff_eq_TT:\n \"compare\\x\\y = EQ \\ eq\\x\\y = TT\"", "output": "by (cases \"compare\\x\\y\") (simp add: is_EQ_def eq_conv_compare)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma carrier_Fheap':\"carrier (Theap \\ e\\a) = edom (Aheap \\ e\\a)\"", "output": "unfolding Theap_simp carrier_ccTTree\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma runStateT_bindU [simp]:\n \"runStateT\\(bindU\\m\\k)\\s = runStateT\\m\\s \\ (\\ (x, s'). runStateT\\(k\\x)\\s')\"", "output": "unfolding bindU_stateT_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conjugate_eq_aux:\n \"is_conjugation f g \\ f (x \\ -g y) \\ f x \\ -y\"", "output": "by (metis f_subdist galois_aux le_inf_iff modular_1_aux)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wagner_2_var: \"x \\ (y \\ x)\\<^sup>\\ \\ (x \\ y)\\<^sup>\\\"", "output": "proof - have \"x \\ y \\ x \\ x \\ y \\ x\"\nby auto thus \"x \\ (y \\ x)\\<^sup>\\ \\ (x \\ y)\\<^sup>\\\"\nby (simp add: mult_assoc omega_simulation)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"R \\ (S \\ T) = R \\ S \\ R \\ T\"", "output": "apply (auto simp: s_prod_im) nitpick oops"} {"instruct": "Given a lemma, please prove it.", "input": "lemma meet_interchange: \"(w \\ x) ; (y \\ z) \\ w ; y \\ x ; z\"", "output": "by (metis inf_le1 inf_le2 le_infI mult_isol_var)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma n_dist_var2: \"n (n x \\ n y \\ t x \\ n z) = n x \\ t y \\ t x \\ t z\"", "output": "by (metis (no_types) n_add_op_def n_dist_var1 n_t_closed)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"matches\\[::]\\[:10::Integer, 20, 30:] = [:0, 1, 2, 3:]\"", "output": "unfolding matches.unfold endswith.unfold\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n fixes t :: \"['a::Eq_sym]\"\n shows \"eq\\(take\\(length\\t)\\s)\\t \\ isPrefixOf\\t\\s\"", "output": "by (subst eq_sym) (rule eq_take_length_isPrefixOf)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unstream_concatMapS:\n \"unstream\\(concatMapS\\f\\a) = concatMapL\\(unstream oo f)\\(unstream\\a)\"", "output": "by (cases a, simp, simp add: unfold_concatMapStep)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sup_distl: \"x \\ (y \\ z) = (x \\ y) \\ (x \\ z)\"", "output": "using weak_Sup_distl[where Y=\"{y, z}\"]\nby (fastforce intro!: Sup_eqI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_tr_simps [simp]:\n shows \"eq\\TT\\TT = TT\" and \"eq\\TT\\FF = FF\"\n and \"eq\\FF\\TT = FF\" and \"eq\\FF\\FF = TT\"", "output": "unfolding TT_def FF_def eq_lift_def\nby simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conjugation_prop1: \"is_conjugation f g \\ f y \\ z \\ f (y \\ g z)\"", "output": "by (metis le_infE modular_1 order_refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fac_work_final_body3_eq: \"fac_work_final = wrapA\\(fix\\fac_acc_body3)\"", "output": "unfolding fac_work_final_def\nby (rule worker_wrapper_fusion_new[OF wrapA_unwrapA_id unwrapA_strict]) (simp add: fac_acc_body3_body2 fac_acc_body2_body1_eq fac_acc_body1_fac_body_final_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conv_self_conjugate: \"x\\<^sup>\\ \\ y = 0 \\ x \\ y\\<^sup>\\ = 0\"", "output": "by (metis conv_invol conv_times conv_zero)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma S4: \"x\\(y\\z) \\ (x\\y)\\z\"", "output": "by (metis C\\<^sub>0s C\\<^sub>1s C\\<^sub>1's C\\<^sub>2s)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma distr: \"(x \\ y) \\ z = x \\ z \\ y \\ z\"", "output": "by (metis local.residuated_multl local.residuated_sup)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assoc_p_subid: \"(x \\ y) \\ (z \\ 1\\<^sub>\\) = x \\ (y \\ (z \\ 1\\<^sub>\\))\"", "output": "by (metis c_0 local.c6 local.cl5 local.inf.absorb_iff1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma test_kat_prop: \"test p \\ test q \\ p \\ x = p \\ x \\ q \\ x \\ !q = !p \\ x \\ !q\"", "output": "by (metis local.annir local.test1_var local.test_comp_mult2 local.test_eq4 mult_assoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma kat_3': \"d x \\ y \\ ad z = 0 \\ d x \\ y = d x \\ y \\ d z\"", "output": "by (metis dm.dom_one local.am5 local.mult_1_left a_zero_def am_d_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sfilter_sappend[simp]: \"sfilter\\p\\(xs :@ ys) = sfilter\\p\\xs :@ sfilter\\p\\ys\"", "output": "by (cases \"ys\"; clarsimp) (induct xs; fastforce simp: If2_def[symmetric] split: If2_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma d_restrict_iff_1: \"(d x \\ y \\ z) \\ (d x \\ y \\ d x \\ z)\"", "output": "by (metis dom_subid_aux2 domain_1'' domain_invol dsg1 mult_isol_var order_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stake_all_triv[simp]: \"stake\\(slength\\xs)\\xs = xs\"", "output": "by (cases \"xs = \\\") (auto simp: stake_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sset_smap[simp]:\n assumes \"\\x. x \\ sset xs \\ f\\x \\ \\\"\n shows \"sset (smap\\f\\xs) = { f\\x | x. x \\ sset xs }\"", "output": "using assms\nby (induct xs) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"\\ fix\\(unwrap oo body oo wrap) \\ fix\\body'\"", "output": "proof - have l: \"fix\\(unwrap oo body oo wrap) = B\\A\"\nby (subst fix_eq) simp have r: \"fix\\body' = \\\"\nby (simp add: fix_strict) from l r show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iteration_unfoldr_distl [simp]: \" y + y \\ x\\<^sup>\\ \\ x = y \\ x\\<^sup>\\\"", "output": "by (metis distrib_left mult.assoc mult_oner iteration_unfoldr)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conv_contrav': \"1 \\ x\\y = (1 \\ y)\\(1 \\ x)\"", "output": "by (metis local.conv_contrav local.conv_invol local.jonsson3c)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alw_mp:\nassumes \"alw \\ xs\" and \"alw (\\ impl \\) xs\"\nshows \"alw \\ xs\"", "output": "proof- { assume \"alw \\ xs \\ alw (\\ impl \\) xs\" hence ?thesis\nby coinduct auto } thus ?thesis\nusing assms\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SPEC_rule_conj_leofI1:\n assumes \"m \\ SPEC \\\"\n assumes \"m \\\\<^sub>n SPEC \\\"\n shows \"m \\ SPEC (\\s. \\ s \\ \\ s)\"", "output": "using assms\nby (auto simp: pw_le_iff pw_leof_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem goedel_first_strong_ex:\n\"\\consistent \\ \\ \\. \\ \\ fmla \\ \\ prv \\ \\ \\ prv (neg \\) \\ isTrue \\\"", "output": "using goedel_first_strong\nby (intro exI[of _ \\G]) blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af_\\LTL:\n \"\\ \\ \\LTL \\ w \\\\<^sub>n \\ \\ (\\i. af \\ (prefix i w) \\ True\\<^sub>n)\"", "output": "using valid_prefix_implies_ltl \\LTL_implies_valid_prefix\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sas_plus_problem_has_serial_solution_iff_i':\n assumes \"is_valid_problem_sas_plus \\\"\n and \"\\ \\ \\\\<^sub>\\ (\\ (prob_with_noop \\)) t\"\n shows \"SAS_Plus_Semantics.is_serial_solution_for_problem \\ \n (rem_noops\n (map (\\op. \\\\<^sub>O\\ (prob_with_noop \\) op)\n (concat (\\\\ (\\ (prob_with_noop \\)) \\ t))))\"", "output": "using assms noops_valid\nby(force intro!: noops_sound sas_plus_problem_has_serial_solution_iff_i)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n neg[simp]: \"\\\\. \\ \\ fmla \\ neg \\ \\ fmla\"\n and\n Fvars_neg[simp]: \"\\\\. \\ \\ fmla \\ Fvars (neg \\) = Fvars \\\"\n and\n subst_neg[simp]:\n \"\\\\ t x. \\ \\ fmla \\ t \\ trm \\ x \\ var \\\n subst (neg \\) t x = neg (subst \\ t x)\"", "output": "unfolding neg_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fbb_ifbb_galois: \"Inf_pres \\ \\ (\\ = bb\\<^sub>\\ f) = (f = bb\\<^sup>-\\<^sub>\\ \\)\"", "output": "unfolding fbb_def iffb_def\nby (metis (no_types, lifting) comp_apply ffb_iffb_galois ifbb_ifbd_demorgan iffb_ifbd_dual kop_galois)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\\\_semantics:\n \"\\\\ \\ w = {\\ \\ subformulas\\<^sub>\\ \\. w \\\\<^sub>n F\\<^sub>n (G\\<^sub>n \\)}\"", "output": "by (induction \\) force+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prv_eql_subst_trm3:\n\"x \\ var \\ \\ \\ fmla \\ t1 \\ trm \\ t2 \\ trm \\\nprv (eql t1 t2) \\ prv (subst \\ t1 x) \\ prv (subst \\ t2 x)\"", "output": "using prv_eql_subst_trm2\nby (meson subst prv_imp_mp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma RETURN_ref_SPECD:\n assumes \"RETURN c \\ \\R (SPEC \\)\"\n obtains a where \"(c,a)\\R\" \"\\ a\"", "output": "using assms\nby (auto simp: pw_le_iff refine_pw_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nprv_ballE:\n\"nprv F (ball x t \\) \\ nprv F (LLq t1 t) \\ nprv (insert (subst \\ t1 x) F) \\ \\\n F \\ fmla \\ finite F \\ \\ \\ fmla \\ t \\ atrm \\ t1 \\ atrm \\ x \\ var \\ \\ \\ fmla \\\n x \\ FvarsT t \\\n nprv F \\\"", "output": "by (meson atrm_trm local.subst nprv_ballE_aux nprv_cut rev_subsetD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HBL1_iff: \"\\ \\ fmla \\ Fvars \\ = {} \\ bprv (PP \\\\\\) \\ prv \\\"", "output": "using HBL1 HBL1_rev unfolding PP_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GF_advice_restricted_subformulas:\n \"restricted_subformulas (\\[X]\\<^sub>\\) = {}\"", "output": "by (induction \\) (simp_all add: GF_advice_restricted_subformulas_inner)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GF_advice_subst:\n \"\\[X]\\<^sub>\\ = subst \\ (\\\\. Some (\\[X]\\<^sub>\\))\"", "output": "by (induction \\) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\J[simp]:\nassumes \"\\ \\ fmla\" and \"Fvars \\ = {inp}\"\nshows \"\\J \\ \\ fmla\"", "output": "unfolding \\J_def\nusing assms\nby (intro instInpP_fmla) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af_letter_lang_congruent:\n \"\\ \\\\<^sub>L \\ \\ af_letter \\ \\ \\\\<^sub>L af_letter \\ \\\"", "output": "unfolding ltl_lang_equiv_def\nusing af_letter_build\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "theorem Tarski_semantic:\nassumes 0: \"T \\ fmla\" \"Fvars T = {xx}\"\nand 1: \"\\\\. \\ \\ fmla \\ Fvars \\ = {} \\ isTrue (eqv (subst T \\\\\\ xx) \\)\"\nshows \"\\ consistent\"", "output": "using assms prv_eq_isTrue[of \"eqv (subst T \\_\\ xx) _\"]\nby (intro Tarski_proof_theoretic[OF 0]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"iADDI(\\) \\ supremum_closed (fp \\)\"", "output": "by (metis (full_types) Ra_restr_ex iADDI_def supremum_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ltl_implies_satisfiable_prefix:\n \"w \\\\<^sub>n \\ \\ \\ (af \\ (prefix i w) \\ False\\<^sub>n)\"", "output": "using ltl_implies_satisfiable_prefix eq_implies_lang\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nprv_bexiI:\n\"nprv F (subst \\ t1 x) \\ nprv F (LLq t1 t) \\\n F \\ fmla \\ finite F \\ \\ \\ fmla \\ t \\ atrm \\ t1 \\ atrm \\ x \\ var \\\n x \\ FvarsT t \\\n nprv F (bexi x t \\)\"", "output": "unfolding bexi_def\nby (nprover2 r1: nprv_exiI[of _ _ t1] r2: nprv_cnjI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convert_multiway_remove_neg: \"safe_formula (remove_neg \\) \\ convert_multiway (remove_neg \\) = remove_neg (convert_multiway \\)\"", "output": "by (cases \\) (auto elim: case_NegE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prv_imp_triv:\nassumes phi: \"\\ \\ fmla\" and psi: \"\\ \\ fmla\"\nshows \"prv \\ \\ prv (imp \\ \\)\"", "output": "by (meson prv_imp_imp_triv prv_imp_mp imp phi psi)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma consistent_not_prv_not_prv_PPf:\nassumes c: consistent\nand 0[simp]: \"\\ \\ fmla\" \"Fvars \\ = {}\" \"\\ prv \\\" \"n \\ num\"\nshows \"\\ bprv (PPf n \\\\\\)\"", "output": "using not_prv_prv_neg_PPf[OF 0] c[THEN dwf_dwfd.consistent_B_consistent] unfolding B.consistent_def3\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_rexp_of: \"wf_formula n \\ \\ wf n (rexp_of n \\)\"", "output": "by (induct \\ arbitrary: n) (auto intro: wf_rexp_ENC simp: finite_FOV max_idx_vars)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nfv_simps[simp]:\n \"nfv (Let p \\ \\) = nfv \\\"\n \"nfv (Neg \\) = nfv \\\"\n \"nfv (Or \\ \\) = max (nfv \\) (nfv \\)\"\n \"nfv (And \\ \\) = max (nfv \\) (nfv \\)\"\n \"nfv (Prev I \\) = nfv \\\"\n \"nfv (Next I \\) = nfv \\\"\n \"nfv (Since \\ I \\) = max (nfv \\) (nfv \\)\"\n \"nfv (Until \\ I \\) = max (nfv \\) (nfv \\)\"\n \"nfv (MatchP I r) = Regex.nfv_regex fv r\"\n \"nfv (MatchF I r) = Regex.nfv_regex fv r\"\n \"nfv_regex (Regex.Skip n) = 0\"\n \"nfv_regex (Regex.Test \\) = Max (insert 0 (Suc ` fv \\))\"\n \"nfv_regex (Regex.Plus r s) = max (nfv_regex r) (nfv_regex s)\"\n \"nfv_regex (Regex.Times r s) = max (nfv_regex r) (nfv_regex s)\"\n \"nfv_regex (Regex.Star r) = nfv_regex r\"", "output": "unfolding nfv_def Regex.nfv_regex_def\nby (simp_all add: image_Un Max_Un[symmetric])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prv_rawpsubst:\n assumes \"\\ \\ fmla\" and \"snd ` (set txs) \\ var\" and \"fst ` (set txs) \\ trm\"\n and \"prv \\\"\n shows \"prv (rawpsubst \\ txs)\"", "output": "using assms\napply (induct txs arbitrary: \\) subgoal\nby auto subgoal for tx txs \\\nby (cases tx) (auto intro: prv_subst) ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma create_name_gba_aimpl_refine: \n \"create_name_gba_aimpl \\ \\ \\Id (create_name_gba \\)\"", "output": "unfolding create_name_gba_aimpl_def create_name_gba_alt\napply (refine_rcg create_graph_aimpl_refine cr_rename_gba_refine)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PI8: \"Int_1a \\ \\ Int_2 \\ \\ Int_4 \\ \\ Int_8 \\\"", "output": "using ADDI_b_def IDEM_def Int_8_def MONO_ADDIb MONO_MULTa dEXP_def join_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma PI9: \"Int_1a \\ \\ Int_4 \\ \\ Int_9 \\\"", "output": "using IDEM_def Int_9_def MONO_def MONO_MULTa\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ltl_prop_equiv_subst_S:\n \"S \\\\<^sub>P subst \\ m = ((S - dom m) \\ {\\ | \\ \\'. \\ \\ dom m \\ m \\ = Some \\' \\ S \\\\<^sub>P \\'}) \\\\<^sub>P \\\"", "output": "by (induction \\) (auto split: option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af_lifted_range:\n \"range (\\af (Abs \\)) \\ {Abs \\ | \\. nested_prop_atoms \\ \\ nested_prop_atoms \\}\"", "output": "using af_lifted_semantics af_nested_prop_atoms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CI5: \"Cl_5 \\ \\ Int_5 \\\\<^sup>d\"", "output": "unfolding dNOR_def NOR_def dual_def conn\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flip_subst_fmla: \"atom y \\ \\ \\ (x \\ y) \\ \\ = \\(x::=Var y)\"", "output": "apply(nominal_induct \\ avoiding: x y rule: fmla.strong_induct)\napply (auto simp: flip_subst_trm)\nusing fresh_at_base(2)\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma NN_unique:\n assumes \"\\ \\ fmla\" \"Fvars \\ = {}\"\n shows \"bprv (all yy (all yy'\n (imp (cnj (NN \\\\\\ (Var yy)) (NN \\\\\\ (Var yy')))\n (eql (Var yy) (Var yy')))))\"", "output": "using assms N_unique unfolding Let_def NN_def\nby meson"} {"instruct": "Given a lemma, please prove it.", "input": "lemma progress_remove_neg[simp]: \"progress \\ P (remove_neg \\) j = progress \\ P \\ j\"", "output": "by (cases \\) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nf_ACI_juncts:\n \"\\\\ \\ disjuncts \\; nf_ACI \\\\ \\ nf_ACI \\\"\n \"\\\\ \\ conjuncts \\; nf_ACI \\\\ \\ nf_ACI \\\"", "output": "by (induct \\) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lformula_nFAND: \"lformula (nFAND \\s) = (\\\\ \\ set \\s. lformula \\)\"", "output": "by (induct \\s rule: nFAND.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af_const_congruent:\n \"\\ \\\\<^sub>C \\ \\ af \\ w \\\\<^sub>C af \\ w\"", "output": "by (induction w arbitrary: \\ \\) (insert af_letter_const_congruent, fastforce+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma satisfies_bounded_fold_rderiv:\n \"\\wf idx \\; #\\<^sub>V \\ = idx; size x = idx\\ \\\n \\ \\\\<^sub>b fold rderiv (replicate k x) \\ \\ (SNOC x^^k) \\ \\\\<^sub>b \\\"", "output": "by (induct k arbitrary: \\ \\) (auto simp: satisfies_bounded_rderiv wf_rderiv nvars_SNOCs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fold_graph_OR: \"finite \\ \\ fold_graph Or_ltlp False_ltlp \\ (OR \\)\"", "output": "unfolding OR_def\nby (rule someI2_ex[OF finite_imp_fold_graph])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fold_deriv_FNot:\n \"fold (deriv d0) xs (FNot \\) = FNot (fold (deriv d0) xs \\)\"", "output": "by (induct xs arbitrary: \\) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma val_imp_close_world: \"valuation M \\ \\ \\ M \\<^sup>c\\\\<^sub>= \\\"", "output": "unfolding entailment_def\nusing valuation_aux_1\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma satPB_gPB[simp]:\nassumes \"Ik.wtE \\\" and \"GE.satPB \\ (gC ` \\)\"\nshows \"Ik.satPB \\ \\\"", "output": "using Ik.wt_\\ assms unfolding GE.satPB_def Ik.satPB_def\nby (auto simp add: Ik.wtPB_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FIXvarFIX: \"(PhiWhile b) = (\\ \\ . (\\ (s,t,\\) . (b,\\,\\,s,t):var))\"", "output": "apply rule\napply (rule FIXvarFIX') done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FI3: \"Int_3 \\ \\ Fr_3(\\\\<^sub>I \\)\"", "output": "using NOR_def Fr_int_def IC3 unfolding conn\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af_to_af_opt:\n \"Unf (af \\ w) = af\\<^sub>\\ (Unf \\) w\"\n \"Unf\\<^sub>G (af\\<^sub>G \\ w) = af\\<^sub>G\\<^sub>\\ (Unf\\<^sub>G \\) w\"", "output": "by (induction w arbitrary: \\) (simp_all add: af_letter_alt_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alw_impl_ev_alw:\nassumes \"alw (\\ impl ev \\) xs\"\nshows \"alw (ev \\ impl ev \\) xs\"", "output": "using assms\nby coinduct (auto dest: ev_alw_impl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prv_\\G_eqv_all_not_PPf:\n\"prv (eqv \\G (all yy (neg (PPf (Var yy) \\\\G\\))))\"", "output": "using bprv_prv[OF _ _ bprv_\\G_eqv_all_not_PPf, simplified] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma ASSUME_leof_rule[refine_vcg]: \n assumes \"\\ \\ \\ ()\" \n shows \"ASSUME \\ \\\\<^sub>n SPEC \\\"", "output": "using assms\nby (auto simp: ASSUME_leof_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ev_introR[intro]:\nassumes \"\\ \\l\" shows \"ev \\ \\l\"", "output": "using assms unfolding ev_def\nby (auto intro: until_introR)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minit_safe_minit: \"mmonitorable \\ \\ minit_safe \\ = minit \\\"", "output": "unfolding minit_safe_def monitorable_formula_code\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FG_advice_b2:\n \"\\Y \\ \\ \\ w; w \\\\<^sub>n \\[Y]\\<^sub>\\\\ \\ w \\\\<^sub>n \\\"", "output": "by (metis FG_advice_b2_helper \\_elim subset_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nprv_hyp[simp,intro]:\n\"\\ \\ F \\ F \\ fmla \\ finite F \\ nprv F \\\"", "output": "unfolding nprv_def\nby (simp add: prv_scnj_imp_in subset_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma until_constant_simp:\n \"is_constant \\ \\ w \\\\<^sub>n \\ U\\<^sub>n \\ \\ w \\\\<^sub>n \\\"", "output": "by (cases \\) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alice_step_1_state [simp]:\n assumes \"state 1 \\\"\n shows \"state 3 (\\ \\ |\\\\<^sub>0\\<^sub>0\\)\"", "output": "using assms bell00_is_state tensor_state\nby(metis One_nat_def Suc_1 numeral_3_eq_3 plus_1_eq_Suc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prfOf_prv_Pf:\nassumes \"n \\ num\" and \"\\ \\ fmla\" \"Fvars \\ = {}\" and \"prfOf n \\\"\nshows \"bprv (psubst Pf [(n, yy), (\\\\\\, xx)])\"", "output": "using assms unfolding prfOf_def\nby (auto simp: PPf_def2 psubst_eq_rawpsubst2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\\\<^sub>\\_nodes:\n \"DBA.nodes (\\\\<^sub>\\ \\) \\ {Abs \\ | \\. nested_prop_atoms \\ \\ nested_prop_atoms \\}\"", "output": "unfolding \\\\<^sub>\\_def\nusing af_lifted_semantics af_nested_prop_atoms\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nprv_subst:\nassumes \"x \\ var\" \"t \\ trm\" \"\\ \\ fmla\" \"finite F\" \"F \\ fmla\"\nand 1: \"nprv F \\\"\nshows \"nprv ((\\\\. subst \\ t x) ` F) (subst \\ t x)\"", "output": "using assms\nusing prv_subst[OF _ _ _ 1[unfolded nprv_def]] unfolding nprv_def\nby (intro prv_prv_imp_trans[OF _ _ _ prv_subst_scnj_imp]) auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem Goedel_I: \"\\\\. \\ {} \\ \\ \\ \\ {} \\ Neg \\ \\ eval_fm e0 \\\"", "output": "by (meson Iff_MP2_same g1.recover_proofs.goedel_first_classic_strong[OF consistent] neg_Neg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prv_sdsj1_imp:\n\"\\ \\ fmla \\ prv (imp (sdsj {\\}) \\)\"", "output": "using prv_imp_refl prv_sdsj_imp\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma GF_advice_subfrmlsn:\n \"subfrmlsn (\\[X]\\<^sub>\\) \\ {\\[X]\\<^sub>\\ | \\. \\ \\ subfrmlsn \\}\"", "output": "by (induction \\) force+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FC1: \"Cl_1 \\ \\ Cl_2 \\ \\ Fr_1(\\\\<^sub>C \\)\"", "output": "using CI1 EXP_def Fr_1_def Fr_cl_def MULT_def dual_def unfolding conn\nby smt"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphic_compact:\n fixes f :: \"'a::topological_space \\ 'b::t2_space\"\n shows \"compact s \\ continuous_on s f \\ (f ` s = t) \\ inj_on f s \\ s homeomorphic t\"", "output": "unfolding homeomorphic_def\nby (metis homeomorphism_compact)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma frontier_subset_compact:\n fixes S :: \"'a::heine_borel set\"\n shows \"compact S \\ frontier S \\ S\"", "output": "using frontier_subset_closed compact_eq_bounded_closed\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma the_inv_signed_lconjaction_by_order2:\n \"s+s=0 \\ the_inv (signed_lconjaction s) = signed_lconjaction s\"", "output": "using the_inv_signed_lconjaction signed_rconjaction_by_order2_eq_lconjaction\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma remove_empty_implies_subset: assumes \"M -s S = {#}\" shows \"set_mset M \\ S\"", "output": "proof fix x assume A: \"x \\ set_mset M\" have \"x \\ set_mset (M -s S)\"\nusing assms\nby auto thus \"x \\ S\"\nusing A unfolding diff_def\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma check_sat_terminates:\n assumes \"\\ s\" \"\\ (\\ s)\" \"\\ s\" \"\\\\<^sub>n\\<^sub>o\\<^sub>l\\<^sub>h\\<^sub>s s\"\n shows \"check_dom s\"", "output": "using assms\nusing check_sat_terminates'[of s s]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in omega_complete) ordinal_rec0_mono:\nassumes s: \"\\p x. x << s p x\"\nshows \"x \\ y \\ ordinal_rec0 z s lub x << ordinal_rec0 z s lub y\"", "output": "apply (rule ordinal_rec0_mono_lemma[OF s, rule_format])\napply (rule order_refl)\napply assumption done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma outpt_HInv6_2:\n assumes outpt: \"outpt s' = (outpt s) (p:= NotAnInput)\"\n and inv: \"\\p. outpt s p \\ {chosen s, NotAnInput}\"\n and inv2c: \"Inv2c s\"\n and nextp: \"HNextPart s s'\"\n shows \"\\p. outpt s' p \\ {chosen s', NotAnInput}\"", "output": "proof - from outpt_chosen_2[OF outpt inv2c nextp] have \"chosen s = chosen s'\" . with inv outpt show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interior_rel_interior_gen:\n fixes S :: \"'n::euclidean_space set\"\n shows \"interior S = (if aff_dim S = int(DIM('n)) then rel_interior S else {})\"", "output": "by (metis interior_rel_interior low_dim_interior)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma permutes_in_funpow_image:\n assumes \"f permutes S\" \"x \\ S\"\n shows \"(f ^^ n) x \\ S\"", "output": "using assms\nby (induct n) (auto simp: permutes_in_image)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma RedT_induct' [consumes 1, case_names refl step]:\n \"\\ s -\\ttas\\* s';\n P s [] s;\n \\ttas s' t ta s''. \\ s -\\ttas\\* s'; P s ttas s'; s' -t\\ta\\ s'' \\ \\ P s (ttas @ [(t, ta)]) s''\\\n \\ P s ttas s'\"", "output": "unfolding RedT_def\napply(erule rtrancl3p_induct', blast)\napply(case_tac b, blast) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AR_imp_retract:\n fixes S :: \"'a::euclidean_space set\"\n assumes \"AR S \\ closedin (top_of_set U) S\"\n shows \"S retract_of U\"", "output": "using AR_imp_absolute_retract assms homeomorphic_refl\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_consts:\n assumes \"consts t |\\| S\" \"fmpred (\\_ u. consts u |\\| S) env\"\n shows \"consts (subst t env) |\\| S\"", "output": "apply (subst subst_consts')\nusing assms\nby (auto intro!: ffUnion_least)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assert_bound_tableau_id: \"\\\\ \\ s; \\ s; \\ (\\ s); \\ s\\ \\ \\ (assert_bound a s) = \\ s\"", "output": "using assert_bound_tableau\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mono_ndet_F[simp]: \"\\P \\\\<^sub>F P'; S \\\\<^sub>F S'\\ \\ (P \\ S) \\\\<^sub>F (P' \\ S')\"", "output": "by (metis F_ndet Un_mono failure_refine_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_iterator_rule_P:\n\"\\ set_iterator it S0;\n I S0 \\0;\n !!S \\ x. \\ c \\; x \\ S; I S \\; S \\ S0 \\ \\ I (S - {x}) (f x \\);\n !!\\. I {} \\ \\ P \\;\n !!\\ S. S \\ S0 \\ S \\ {} \\ \\ c \\ \\ I S \\ \\ P \\\n \\ \\ P (it c f \\0)\"", "output": "unfolding set_iterator_def\nusing set_iterator_genord.iteratei_rule_P [of it S0 \"\\_ _. True\" I \\0 c f P]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ffb_assign[simp]: \"fb\\<^sub>\\ (x ::= e) Q = {s. (\\ j. ((($) s)(x := (e s))) j) \\ Q}\"", "output": "unfolding vec_upd_def assign_def\nby (subst ffb_eq) simp \\ \\ Nondeterministic assignments \\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iso_homology_contractible_space_subtopology2:\n \"\\contractible_space X; S \\ topspace X; p \\ 0; S \\ {}\\\n \\ homology_group p (subtopology X S) \\ relative_homology_group (p + 1) X S\"", "output": "by (metis (no_types, hide_lams) add.commute isomorphic_group_reduced_homology_of_contractible topspace_subtopology topspace_subtopology_subset un_reduced_homology_group)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valof_valof1:\n \"(e',s) -|-> (v,s')\n ==> e' = VALOF c1 RESULTIS (VALOF c2 RESULTIS e) ==>\n (VALOF c1;;c2 RESULTIS e, s) -|-> (v,s')\"", "output": "by (induct set: eval) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sound_opr_alt:\n \"sound_opr opr f =\n ((\\s. s \\\\<^sub>= (precondition opr) \\\n (\\s'. f s = (Some s')\n \\ (\\atm. is_predAtom atm \\ atm \\ set(dels (effect opr)) \\ s \\\\<^sub>= atm \\ s' \\\\<^sub>= atm)\n \\ (\\atm. is_predAtom atm \\ atm \\ set (adds (effect opr)) \\ s \\\\<^sub>= Not atm \\ s' \\\\<^sub>= Not atm)\n \\ (\\atm. atm \\ set(adds (effect opr)) \\ s' \\\\<^sub>= atm)\n \\ (\\fmla. fmla \\ set (dels (effect opr)) \\ fmla \\ set(adds (effect opr)) \\ s' \\\\<^sub>= (Not fmla))\n \\ (\\a b. s \\\\<^sub>= Atom (Eq a b) \\ s' \\\\<^sub>= Atom (Eq a b))\n \\ (\\a b. s \\\\<^sub>= Not (Atom (Eq a b)) \\ s' \\\\<^sub>= Not (Atom (Eq a b)))\n ))\n \\ (\\fmla\\set(adds (effect opr)). is_predAtom fmla))\"", "output": "by (cases \"(opr,f)\" rule: sound_opr.cases) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmrel_on_fset_addI:\n assumes \"fmrel_on_fset S P m n\" \"fmrel_on_fset S P a b\"\n shows \"fmrel_on_fset S P (m ++\\<^sub>f a) (n ++\\<^sub>f b)\"", "output": "using assms unfolding fmrel_on_fset_fmrel_restrict\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma all_resolvents_upon_is_finite:\n assumes \"all_fulfill finite S\"\n shows \"all_fulfill finite (S \\ (all_resolvents_upon S A))\"", "output": "using assms unfolding all_fulfill_def all_resolvents_upon_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hmac_trans_3:\n \"hmac X K \\ parts (extr (bad s') (ik s') (chan s')) \\\n (s, s') \\ l2_step3 Ra A B Nr gny \\\n hmac X K \\ parts (extr (bad s) (ik s) (chan s)) \\\n (X = \\Number 1, gny, Exp Gen (NonceF (Ra$nx)), Agent A, Agent B\\ \\\n K = Hash \\NonceF (Ra$ni), Nr\\ \\\n guessed_runs Ra = \\role=Init, owner=A, partner=B\\ \\\n progress s' Ra = Some {xnx, xni, xnr, xgnx, xgny, xsk, xEnd} \\\n guessed_frame Ra xgny = Some gny \\\n guessed_frame Ra xnr = Some Nr)\"", "output": "apply (auto simp add: l2_defs parts_insert [where H=\"extr _ _ _\"] parts_insert [where H=\"insert _ (extr _ _ _)\"]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iexec_offset [intro]:\n \"(ins, pc, s, stk) \\ (pc', s', stk') \\\n (ins, pc - i, s, stk) \\ (pc' - i, s', stk')\"", "output": "by (erule iexec.cases, auto simp: iexec_offset_aux)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma f'_comp[derivative_intros]:\n \"(g has_derivative g') (at s within S) \\ (h has_derivative h') (at s within S) \\\n s \\ S \\ (\\x. x \\ S \\ g x \\ T) \\ (\\x. x \\ S \\ h x \\ X) \\\n ((\\x. f (g x) (h x)) has_derivative (\\y. f' (g s, h s) (g' y, h' y))) (at s within S)\"", "output": "apply (rule has_derivative_in_compose2[OF f' _ _ has_derivative_Pair, unfolded split_beta' fst_conv snd_conv, of g h S s g' h'])\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lconjseq_reflections: \"ss\\lists S \\ set (lconjseq ss) \\ \\\"", "output": "using special_subgroup_eq_sum_list[of S]\nby (induct ss rule: rev_induct) (auto simp add: lconjseq_snoc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma connected_component_trans:\n \"connected_component S x y \\ connected_component S y z \\ connected_component S x z\"", "output": "unfolding connected_component_def\nby (metis Int_iff Un_iff Un_subset_iff equals0D connected_Un)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma appDup_x2[simp]:\n\"(app Dup_x2 G maxs rT pc et (Some s)) = (\\ts1 ts2 ts3 ST LT. s = (ts1#ts2#ts3#ST,LT) \\ 3+length ST < maxs)\"", "output": "by (cases s, cases \"2 pmdl.syzygy_module (set bs)\" and \"s = atomize_poly (idx_pm_of_pm bs s')\"\n shows \"s \\ syzygy_module_list bs\"", "output": "unfolding assms(2) syzygy_module_list_def\nby (intro imageI, fact assms(1))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sup_eq_PInfty:\n fixes S :: \"ereal set\"\n shows \"\\ \\ S \\ Sup S = \\\"", "output": "unfolding top_ereal_def[symmetric]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conv_abscissa_MInfI [intro]: \"(\\s. fds_converges (f::'a fds) s) \\ conv_abscissa f = -\\\"", "output": "by (subst conv_abscissa_MInf_iff) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma A_in_listwordinterval_compress: \"A \\ set (listwordinterval_compress ss) \\\n interval_of A \\ (\\s \\ set ss. interval_of s)\"", "output": "using listwordinterval_compress\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AssertAllState''_precond:\n assumes \"\\ t\"\n shows \"let s' = assert_bound_loop ats (init t) in\n \\ (\\ s') \\ \\ s' \\ (\\ \\ s' \\ \\\\<^sub>n\\<^sub>o\\<^sub>l\\<^sub>h\\<^sub>s s' \\ \\ s')\"", "output": "using assms\nusing AssertAllState''_precond'[of \"init t\" ats]\nby (simp add: Let_def init_tableau_id init_unsat_flag init_satisfies satisfies_consistent satisfies_satisfies_no_lhs init_tableau_valuated)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lmeasurable_compact: \"compact S \\ S \\ lmeasurable\"", "output": "using fmeasurable_compact\nby (force simp: fmeasurable_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma supports_finite:\n fixes S :: \"atom set\"\n and x :: \"'a::pt\"\n assumes a1: \"S supports x\"\n and a2: \"finite S\"\n shows \"finite (supp x)\"", "output": "proof - have \"(supp x) \\ S\"\nusing a1 a2\nby (rule supp_is_subset) then show \"finite (supp x)\"\nusing a2\nby (simp add: finite_subset)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ttree_restr_nxt_subset2: \"x \\ S \\ paths (ttree_restr S (nxt t x)) \\ paths (ttree_restr S t)\"", "output": "apply transfer\napply auto\napply force\nby (metis filter.simps(2) imageI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma face_of_polytope_insert:\n \"\\polytope S; a \\ affine hull S; F face_of S\\ \\ F face_of convex hull (insert a S)\"", "output": "by (metis (no_types, lifting) affine_hull_convex_hull face_of_convex_hull_insert hull_insert polytope_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma timing_less_counter:\n \"v \\ dom (discovered s) \\ \\ s v < counter s\"\n \"v \\ dom (finished s) \\ \\ s v < counter s\"", "output": "using s_timing_common_inv\nby (auto simp add: timing_common_inv_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma triple_valid_def2: \"G\\n:{P} t\\ {Q} = \n (\\Y s Z. P Y s Z \n \\ (\\L. (normal s \\ (\\ C T A. \\prg=G,cls=C,lcl=L\\\\t\\T \\ \n \\prg=G,cls=C,lcl=L\\\\dom (locals (store s))\\t\\A)) \\ \n s\\\\(G,L))\n \\ (\\Y' s'. G\\s \\t\\\\n\\ (Y',s')\\ Q Y' s' Z))\"", "output": "apply (unfold triple_valid_def type_ok_def)\napply (simp (no_asm)) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mayDiverge_If_L: \nassumes \"tval tst s\" and \"mayDiverge c1 s\"\nshows \"mayDiverge (If tst c1 c2) s\"", "output": "using assms IfTrue transC_mayDiverge\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma raise_trap_privilege: \n\"(((get_S (cpu_reg_val PSR s)))::word1) = 0 \\\n s' = snd (fst (raise_trap t s)) \\ \n (((get_S (cpu_reg_val PSR s')))::word1) = 0\"", "output": "apply (simp add: raise_trap_def)\napply (simp add: simpler_modify_def add_trap_set_def)\nby (simp add: cpu_reg_val_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_process6: \"is_process P \\ \\ s X. (s@[tick],{}) \\ FAILURES P \\ (s,X-{tick}) \\ FAILURES P\"", "output": "by(drule is_process_spec[THEN iffD1], metis)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rstate_up_down[simp]:\n assumes \"atomic_step_invariant s\"\n shows \"(\\\\s) = s\"", "output": "using assms Abs_rstate_t_inverse unfolding rep_def abs_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_path_single1 [backward1]:\n \"is_valid_graph n S \\ (a, b) \\ S \\ has_path n S a b\"", "output": "@proof @have \"is_path n S [a, b]\" @qed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_progressS_trans: \n \"in_progressS (progress s R) S \\ (s, s') \\ trans l2 \\ in_progressS (progress s' R) S\"", "output": "apply (auto simp add: l2_nostep_defs)\napply (auto simp add: l2_defs domIff) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma evaln_LitI: \"G\\s \\Lit v-\\(if normal s then v else undefined)\\n\\ s\"", "output": "apply (case_tac \"s\", case_tac \"a = None\")\nby (auto intro!: evaln.Lit)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uniform_limit_on_UNION:\n assumes \"finite S\"\n assumes \"\\s. s \\ S \\ uniform_limit (h s) f g F\"\n shows \"uniform_limit (\\(h ` S)) f g F\"", "output": "using assms\nby induct (auto intro: uniform_limit_on_empty uniform_limit_on_Un)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mayDiverge_not_transT:\nassumes \"mayDiverge c s\"\nshows \"\\ (c,s) \\t s'\"", "output": "by (metis assms mayDiverge_transC not_transC_transT)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma him_sum [simp]: \"HIm (sum f S) = (\\x\\S. HIm (f x))\"", "output": "by (induct S rule: infinite_finite_induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma foldi_fold_disj: \"RBT.foldi (\\s. s = False) (\\k v s. s \\ P k) t val = fold_keys (\\k s. s \\ P k) t val\"", "output": "unfolding fold_keys_def including rbt.lifting\nby transfer (rule rbt_foldi_fold_disj)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma euclid:\n \"PRE (\\s::nat store. s ''x'' = x \\ s ''y'' = y)\n (WHILE (\\s. s ''y'' \\ 0) INV (\\s. gcd (s ''x'') (s ''y'') = gcd x y) \n DO\n (''z'' ::= (\\s. s ''y''));\n (''y'' ::= (\\s. s ''x'' mod s ''y''));\n (''x'' ::= (\\s. s ''z''))\n OD)\n POST (\\s. s ''x'' = gcd x y)\"", "output": "apply hoare\nusing gcd_red_nat\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Borsukian_componentwise:\n fixes S :: \"'a::euclidean_space set\"\n assumes \"locally connected S \\ compact S\" \"\\C. C \\ components S \\ Borsukian C\"\n shows \"Borsukian S\"", "output": "by (metis Borsukian_componentwise_eq assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma InitPhase_HInv3_p: \n \"\\ InitializePhase s s' p; HInv3_L s' p q d \\ \\ HInv3_R s' p q d\"", "output": "by(auto simp add: InitializePhase_def HInv3_inner_def hasRead_def HInv3_L_def HInv3_R_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interior_of_eq: \"(X interior_of S = S) \\ openin X S\"", "output": "unfolding interior_of_def\nusing openin_subopen\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma att_or_empty_rev: assumes \"\\(l \\\\<^sub>\\\\<^bsup>(s, s')\\<^esup>)\" and \"\\(s \\ s')\" shows \"l \\ []\"", "output": "using assms att_or_empty\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eventually_nhds_set:\n \"(\\\\<^sub>F x in nhds_set X. P x) \\ (\\S. open S \\ X \\ S \\ (\\x\\S. P x))\"", "output": "unfolding nhds_set_def\nby (subst eventually_INF_base) (auto simp: eventually_principal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma aval'_sound: \"s : \\\\<^sub>f S \\ aval a s : \\(aval' a S)\"", "output": "by (induction a) (auto simp: gamma_num' gamma_plus' \\_st_def lookup_def)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem aval_afold[simp]:\nassumes \"approx t s\"\nshows \"aval (afold a t) s = aval a s\"", "output": "using assms\nby (induct a) (auto simp: approx_def split: aexp.split option.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R_g_oder_subset: \n assumes \"\\s. s \\ S \\ 0 \\ U s \\ is_interval (U s) \\ U s \\ T\"\n and \"R = (\\s. \\t\\U s. (\\\\\\down (U s) t. G (\\ \\ s)) \\ Q (\\ t s))\"\n shows \"rel_R \\P\\ \\R\\; (x\\= (\\t. f) & G on U S @ 0) \\ rel_R \\P\\ \\Q\\\"", "output": "apply (rule_tac R=R in R_seq_law, simp)\nby (rule_tac R_g_ode_rule_subset, simp_all add: assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma no_outgoing_transitions:\n\"ffilter (\\((s', _), _). s = s') e = {||} \\\npossible_steps e s r l i = {||}\"", "output": "apply (simp add: possible_steps_def)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma coCallsLub_is_lub: \"S <<| coCallsLub S\"", "output": "proof (rule is_lubI) show \"S <| coCallsLub S\"\nby (rule is_ubI, transfer, auto) next fix u assume \"S <| u\" hence \"\\x \\ S. x \\ u\"\nby (auto dest: is_ubD) thus \"coCallsLub S \\ u\"\nby transfer auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma p2r_simps[simp]: \n \"\\P\\ \\ \\Q\\ = (\\s. P s \\ Q s)\"\n \"(\\P\\ = \\Q\\) = (\\s. P s = Q s)\"\n \"(\\P\\ ; \\Q\\) = \\\\ s. P s \\ Q s\\\"\n \"(\\P\\ \\ \\Q\\) = \\\\ s. P s \\ Q s\\\"\n \"rel_ad \\P\\ = \\\\s. \\ P s\\\"\n \"rel_aka.ads_d \\P\\ = \\P\\\"", "output": "unfolding p2r_def rel_ad_def rel_aka.ads_d_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma get_bind_set[simp]: \"bind get (\\s. bind (set s) (f s)) = bind get (\\s. f s ())\"", "output": "unfolding bind_def get_def set_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma R_therm_dyn_down: \n assumes \"a > 0\" and \"0 \\ \\\" and \"0 < Tmin\" and \"Tmax < L\"\n shows \"Ref \\\\s. s$4 = 0 \\ I Tmin Tmax s \\ s$2 = 0 \\ s$3 = s$1\\ \\I Tmin Tmax\\ \\ \n (x\\= (\\t. f a 0) & G Tmin Tmax a 0 on (\\s. {0..\\}) UNIV @ 0)\"", "output": "apply(rule local_flow.R_g_ode_ivl[OF local_flow_therm])\nusing assms therm_dyn_down_real_arith[OF assms(1,3), of _ Tmax]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pre_mono: assumes \"\\s. P' s \\ P s\" \n shows \"\\s. pre C P' s \\ pre C P s\"", "output": "using assms\nby (induct C arbitrary: P P', auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma open_inter_closure_rel_interior:\n fixes S A :: \"'n::euclidean_space set\"\n assumes \"convex S\"\n and \"open A\"\n shows \"A \\ closure S = {} \\ A \\ rel_interior S = {}\"", "output": "by (metis assms convex_closure_rel_interior open_Int_closure_eq_empty)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convergent_imp_bounded:\n fixes S :: \"nat \\ 'a::metric_space\"\n shows \"(S \\ l) sequentially \\ bounded (range S)\"", "output": "by (intro cauchy_imp_bounded LIMSEQ_imp_Cauchy)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma v_neq_0_imp: \"cfg \\ valid_cfg \\ v cfg \\ 0 \\ state cfg \\ S\\<^sub>r \\ S2\"", "output": "using p_eq_0_imp[of cfg]\nby (auto simp add: S\\<^sub>r_def S\\<^sub>e_def valid_cfg_state_in_S)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subspace_imp_convex: \"subspace s \\ convex s\"", "output": "using subspace_imp_affine affine_imp_convex\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes \"negligible S\"\n shows integrable_negligible: \"f integrable_on S\" and integral_negligible: \"integral S f = 0\"", "output": "using has_integral_negligible [OF assms]\nby (auto simp: has_integral_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma analytic_on_analytic_at:\n \"f analytic_on s \\ (\\z \\ s. f analytic_on {z})\"", "output": "by (metis analytic_at_ball analytic_on_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma openin_relative_to: \"(openin X relative_to S) = openin (subtopology X S)\"", "output": "by (force simp: relative_to_def openin_subtopology)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_interior_open:\n fixes S :: \"'n::euclidean_space set\"\n assumes \"open S\"\n shows \"rel_interior S = S\"", "output": "by (metis assms interior_eq interior_subset_rel_interior rel_interior_subset set_eq_subset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tendsto_within_open_NO_MATCH:\n \"a \\ S \\ NO_MATCH UNIV S \\ open S \\ (f \\ l)(at a within S) \\ (f \\ l)(at a)\"\n for f :: \"'a::topological_space \\ 'b::topological_space\"", "output": "using tendsto_within_open\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_option_in_optionI:\n \"\\ ox \\ opt S; \\x\\S. ox = Some x \\ f x \\ S \\ \n \\ map_option f ox \\ opt S\"", "output": "apply (unfold map_option_case)\napply (simp split: option.split)\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma emeasure_T':\n assumes [measurable]: \"X \\ sets S\"\n shows \"emeasure (T' I) X = (\\\\<^sup>+s. emeasure (T s) {\\\\space S. s ## \\ \\ X} \\I)\"", "output": "unfolding T'_def\nby (simp add: emeasure_bind[OF _ distr_Stream_subprob] emeasure_distr vimage_def Int_def conj_ac)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vcg_arraycpy_unfolds[named_ss vcg_bb]:\n \"wlp \\ (x[] ::= a) Q s = Q (UPD_STATE s x (s a))\"\n \"wp \\ (x[] ::= a) Q s = Q (UPD_STATE s x (s a))\"", "output": "unfolding UPD_STATE_def\nby (simp_all add: wlp_eq wp_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_processT2_TR : \"\\s. s \\ T P \\ front_tickFree s\"", "output": "apply(simp add: F_def [symmetric] T_def TRACES_def, safe)\napply (drule is_processT2[rule_format], assumption) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma card1_eI: \"1 \\ card S \\ \\y S'. S = {y} \\ S' \\ y \\ S'\"", "output": "by (metis One_nat_def card.infinite card_le_Suc_iff insert_is_Un leD zero_less_Suc)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l2norm_rmult:\n \"f square_integrable S \\ l2norm S (\\x. f x * c) = l2norm S f * \\c\\\"", "output": "using l2norm_lmult\nby (simp add: mult.commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma piecewise_C1_differentiable_diff:\n \"\\f piecewise_C1_differentiable_on S; g piecewise_C1_differentiable_on S\\\n \\ (\\x. f x - g x) piecewise_C1_differentiable_on S\"", "output": "unfolding diff_conv_add_uminus\nby (metis piecewise_C1_differentiable_add piecewise_C1_differentiable_neg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HPhase1or2ReadThen_allBlocks:\n assumes act: \"HPhase1or2ReadThen s s' p d r\"\n shows \"allBlocks s' \\ allBlocks s\"", "output": "using HPhase1or2ReadThen_blocksOf[OF act]\nby(auto simp add: allBlocks_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma empty_delayed_pool_write_privilege: \"get_delayed_pool s = [] \\\n (((get_S (cpu_reg_val PSR s)))::word1) = 0 \\\n s' = delayed_pool_write s \\ \n (((get_S (cpu_reg_val PSR s')))::word1) = 0\"", "output": "apply (simp add: delayed_pool_write_def)\nby (simp add: get_delayed_write_def delayed_write_all_def delayed_pool_rm_list_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diff_inv_axiom1:\n assumes \"G s \\ I s\" and \"diff_invariant I (\\t. f) (\\s. {t. t \\ 0}) UNIV 0 G\"\n shows \"s \\ ((wp (x\\= f & G) \\I\\)\\<^sub>\\) s\"", "output": "using assms unfolding wp_g_orbital diff_invariant_eq\napply clarsimp\nby (erule_tac x=s in allE, frule ivp_solsD(2), clarsimp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma open_neg_translation:\n fixes S :: \"'a::real_normed_vector set\"\n assumes \"open S\"\n shows \"open((\\x. a - x) ` S)\"", "output": "using open_translation[OF open_negations[OF assms], of a]\nby (auto simp: image_image)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\_prefix_conv: \"prefix_of p s \\ prefix_of p s' \\ i < plen p \\ \\ s i = \\ s' i\"", "output": "by transfer (simp add: stake_nth[symmetric])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma holomorphic_higher_deriv [holomorphic_intros]: \"\\f holomorphic_on S; open S\\ \\ (deriv ^^ n) f holomorphic_on S\"", "output": "by (induction n) (auto simp: holomorphic_deriv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma p2_pi4[intro]:\n \"ex_coms, p2, lcond {s23} {c1, r12} (\\s. s \\ []) \\ \\I_pred\\ \\c1\\ IF (\\s. s \\ []) THEN c' FI\"", "output": "apply (rule vcg.intros)\napply (clarsimp simp: I_pred_def atS_def split: lcond_splits) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma read_buffer_typed_auto:\n \"\\ = (\\_. None) \\ \\ = ({},{}) \\ P = {} \\ \n \\\\' \\' P'. has_type \\ \\ P read_buffer \\' \\' P'\"", "output": "by (has_type_tac prog: read_buffer_def aexpr: type_aexpr_Load type_aexpr_Load' type_aexpr_Const bexpr: type_bexprI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma conf_trace_induct_final[consumes 1, case_names trace_nil trace_cons]:\n \"(\\, e, S) \\\\<^sup>*\\<^bsub>T\\<^esub> final \\ (\\ \\ e S. final = (\\, e, S) \\ P \\ e S [] (\\, e, S)) \\ (\\\\ e S T \\' e' S'. (\\', e', S') \\\\<^sup>*\\<^bsub>T\\<^esub> final \\ P \\' e' S' T final \\ (\\, e, S) \\ (\\', e', S') \\ P \\ e S ((\\', e', S') # T) final) \\ P \\ e S T final\"", "output": "by (induction \"(\\, e, S)\" T final arbitrary: \\ e S rule: trace_induct_final) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma memoryless_on_cfg_onI:\n assumes \"\\s. f s \\ K s\"\n shows \"memoryless_on f s \\ cfg_on s\"", "output": "by (coinduction arbitrary: s) (auto intro: assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma small_step_terminated:\n \"s \\\\<^bsub>x\\<^esub> s' \\ atCs (fst s) = {} \\ atCs (fst s') = {}\"", "output": "by (induct pred: small_step) auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem HEndPhase2_HInv3:\n \"\\ HEndPhase2 s s' p; HInv3 s \\ \\ HInv3 s'\"", "output": "by(auto simp add: HInv3_def dest: EndPhase2_HInv3)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma retract_of_closed:\n fixes S :: \"'a :: t2_space set\"\n shows \"\\closed T; S retract_of T\\ \\ closed S\"", "output": "by (metis closedin_retract closedin_closed_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fmap_below_add_restrI:\n assumes \"x f|` (-S) \\ y f|` (-S)\"\n and \"x f|` S \\ z f|` S\"\n shows \"x \\ y ++\\<^bsub>S\\<^esub> z\"", "output": "using assms\nby (auto intro!: fun_belowI dest:env_restr_belowD simp add: lookup_override_on_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ground_subst_no_var[intro]: \"ground (subst_range s) \\ x \\ range_vars s\"", "output": "using ground_range_vars[of s]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HPhase0Read_maxBalInp:\n assumes act: \"HPhase0Read s s' q d\"\n and asm3: \"maxBalInp s b v\"\n shows \"maxBalInp s' b v\"", "output": "proof(auto simp add: maxBalInp_def) fix bk assume bk: \"bk \\ allBlocks s'\" and b_bal: \"b\\ bal bk\" from subsetD[OF HPhase0Read_allBlocks[OF act] bk] asm3 b_bal show \"inp bk = v\"\nby(auto simp add: maxBalInp_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma outside_frontier_eq_complement_closure:\n fixes S :: \"'a :: {real_normed_vector, perfect_space} set\"\n assumes \"bounded S\" \"convex S\"\n shows \"outside(frontier S) = - closure S\"", "output": "by (metis Diff_subset assms convex_closure frontier_def outside_frontier_misses_closure outside_subset_convex subset_antisym)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AssertionsImplyMethInvariants:\n \"\\ G \\ \\ A \\ C,m,l \\ B \\ I; A s0 s\\ \\ I s0 s (heap s)\"", "output": "by (drule AssertionsImplyInvariantsAux, fast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Star_string:\n assumes \"s \\ star A\"\n shows \"\\ss. concat ss = s \\ (\\s \\ set ss. s \\ A)\"", "output": "using assms\nby (metis in_star_iff_concat subsetD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_subseq_closed: \n assumes \"s \\ closed_seqs Zp\"\n assumes \"is_subseq_of s s'\"\n shows \"s' \\ closed_seqs Zp\"", "output": "apply(rule closed_seqs_memI)\nusing is_subseq_ind assms closed_seqs_memE\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma condition_split:\n \"P (condition C a b s) = ((((C s) \\ P (a s)) \\ (\\ (C s) \\ P (b s))))\"", "output": "apply (clarsimp simp: condition_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma siterate_eq_scons[iff]: \"siterate f s = a ## w \\ s = a \\ siterate f (f s) = w\"", "output": "using siterate.ctr stream.inject\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "theorem while_rule_lemma:\n assumes invariant: \"!!s. P s ==> b s ==> P (c s)\"\n and terminate: \"!!s. P s ==> \\ b s ==> Q s\"\n and wf: \"wf {(t, s). P s \\ b s \\ t = c s}\"\n shows \"P s \\ Q (while b c s)\"", "output": "using wf\napply (induct s)\napply simp\napply (subst while_unfold)\napply (simp add: invariant terminate) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matchI[intro?]:\nassumes \"validTrans (Trans s1 a1 ou1 s1')\"\nand \"consume (Trans s1 a1 ou1 s1') vl1 vl1'\" and \"\\ (Trans s a ou s') = \\ (Trans s1 a1 ou1 s1')\"\nand \"\\ (Trans s a ou s') \\ g (Trans s a ou s') = g (Trans s1 a1 ou1 s1')\"\nand \"\\ s' vl' s1' vl1'\"\nshows \"match \\ s s1 vl1 a ou s' vl'\"", "output": "unfolding match_def\nusing assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in poly_set_iteratei) dres_ne_bot_iterate[refine_transfer]:\n assumes A: \"\\x s. f x s \\ dSUCCEED\"\n shows \"iteratei r c (\\x s. dbind s (f x)) (dRETURN s) \\ dSUCCEED\"", "output": "unfolding iteratei_def it_to_list_def it_to_it_def\napply (rule dres_foldli_ne_bot)\nby (simp_all add: A)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_all_add_6E[elim]: \"list_all (\\(acn, s). s \\ Suc q) xs\n \\ list_all (\\(acn, s). s \\ q + (2 * n + 6)) xs\"", "output": "by(auto simp: list_all_length)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Abs_type':\n assumes H: \"\\ \\ (\\x:S. s) : U \\ U'\"\n and H': \"x \\ \\\"\n obtains S'\n where \"\\ \\ U <: S\"\n and \"(VarB x S) # \\ \\ s : S'\"\n and \"\\ \\ S' <: U'\"", "output": "using H subtype_reflexivity_from_typing [OF H] H'\nby (rule Abs_type)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem invertible_is_bijective:\n assumes dom: \"\\ \\ S \\\\<^sub>E S\"\n shows \"invertible \\ \\ bij_betw \\ S S\"", "output": "proof - from dom interpret map \\ S S\nby unfold_locales show ?thesis\nby (auto simp add: bij_betw_iff_has_inverse invertible_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convex_rel_interior_iff2:\n fixes S :: \"'n::euclidean_space set\"\n assumes \"convex S\"\n and \"S \\ {}\"\n shows \"z \\ rel_interior S \\ (\\x\\affine hull S. \\e. e > 1 \\ (1 - e) *\\<^sub>R x + e *\\<^sub>R z \\ S)\"", "output": "using assms hull_subset[of S] convex_rel_interior_if2[of S z] convex_rel_interior_only_if[of S z]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simplicial_chain_diff:\n \"\\simplicial_chain p S c1; simplicial_chain p S c2\\ \\ simplicial_chain p S (c1 - c2)\"", "output": "unfolding simplicial_chain_def\nby (meson UnE keys_diff subset_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma additiveI[intro]:\n \"\\ \\P Q s. \\ sound P; sound Q \\ \\ t (\\s. P s + Q s) s = t P s + t Q s \\ \\\n additive t\"", "output": "unfolding additive_def\nby(blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pre_zeta_aux_eq_pre_zeta:\n assumes \"Re s > -2 * real n\" and \"a > 0\"\n shows \"pre_zeta_aux n a s = pre_zeta a s\"", "output": "unfolding pre_zeta_def\nproof (intro pre_zeta_aux_eq') from assms show \"- 2 * real (nat (1 - \\Re s / 2\\)) < Re s\"\nby linarith\nqed (insert assms, simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphic_to_disc_imp_simply_connected:\n assumes \"S = {} \\ S homeomorphic ball (0::complex) 1\"\n shows \"simply_connected S\"", "output": "using assms homeomorphic_simply_connected_eq convex_imp_simply_connected\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_on_components_open:\n fixes S :: \"'a::real_normed_vector set\"\n assumes \"open S \"\n \"\\c. c \\ components S \\ continuous_on c f\"\n shows \"continuous_on S f\"", "output": "using continuous_on_components open_imp_locally_connected assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exhaustive_fusion_code:\n \"exhaustive_fusion g s =\n (list.has_next g s \\ \n (let (x, s') = list.next g s\n in \\ proper_interval None (Some x) \\ exhaustive_above_fusion g x s'))\"", "output": "unfolding exhaustive_fusion_def exhaustive_above_fusion_def\nby(subst (1) list.unfoldr.simps)(simp add: split_beta)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma countable_image_inj_Int_vimage:\n \"\\inj_on f S; countable A\\ \\ countable (S \\ f -` A)\"", "output": "by (meson countable_image_inj_on countable_subset image_subset_iff_subset_vimage inf_le2 inj_on_Int)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fbox_test[simp]: \"(\\s. ( |\\P?] Q) s) = (\\s. P s \\ Q s)\"", "output": "unfolding fbox_def test_def\nby simp \\ \\ Assignments \\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma colours_flip_fM[simp]:\n \"fl \\ sys_fM s \\ black b (s(sys := (s sys)\\fM := fl, mem_store_buffers := (mem_store_buffers (s sys))(p := ws)\\)) \\ white b s \\ \\grey b s\"", "output": "unfolding black_def white_def\nby (simp add: fun_upd_apply)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_tl_list_minus_butlast_gt_zero:\n assumes \"length s < length t\" and \"strict_prefix (butlast s) t\" and \"length s > 0\"\n shows \"length (tl (t - (butlast s))) > 0\"", "output": "using assms\nby (metis Nitpick.size_list_simp(2) butlast_snoc hd_Cons_tl length_butlast length_greater_0_conv length_tl less_trans nat_neq_iff strict_prefix_minus_not_empty prefix_order.dual_order.strict_implies_order prefix_concat_minus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma assumes \"s \\ S\" and \"fair rs\"\n shows trim_in_R: \"shd (trim rs s) \\ R\"\n and trim_enabled: \"enabled (shd (trim rs s)) s\"\n and trim_fair: \"fair (trim rs s)\"", "output": "unfolding trim_alt[OF assms] minWait_def\nusing LeastI_ex[OF minWait_ex[OF assms]] sdrop_fair[OF assms(2)] conjunct1[OF assms(2)[unfolded fair_def]]\nby simp_all (metis subsetD snth_sset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma SpecIf:\n \"\\P \\ {s. (b s \\ f s \\ Q) \\ (\\ b s \\ g s \\ Q \\ h s \\ Q)}\\ \\\n \\,\\\\\\<^bsub>/F\\<^esub> P Spec (if_rel b f g h) Q,A\"", "output": "apply (rule Spec)\napply (auto simp add: if_rel_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rfn_tool12_2:\"\\0 < (s::nat); (i::nat) mod s = s - Suc 0\\ \\\n (Suc i) mod s = 0\"", "output": "apply (insert div_mult_mod_eq [THEN sym, of \"i\" \"s\"])\napply (insert add_Suc_right [THEN sym, of \"i div s * s\" \"i mod s\"])\napply simp done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wlp_strengthen_modset: \"wlp \\ c Q s \\ wlp \\ c (\\s'. Q s' \\ modifies (lhsv \\ c) s' s) s\"", "output": "unfolding wlp_def\nby (blast intro: modifies_lhsv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma streams_sset:\n assumes \"s \\ streams A\"\n shows \"sset s \\ A\"", "output": "proof fix x assume \"x \\ sset s\" from this \\s \\ streams A\\ show \"x \\ A\"\nby (induct s) (auto intro: streams_shd streams_stl)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Astack_restr_stack_below:\n \"Astack (restr_stack V S) \\ Astack S\"", "output": "by (induction V S rule: restr_stack.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closure_inside_subset:\n fixes S :: \"'a::real_normed_vector set\"\n assumes \"closed S\"\n shows \"closure(inside S) \\ S \\ inside S\"", "output": "by (metis assms closure_minimal open_closed open_outside sup.cobounded2 union_with_inside)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hmac_trans_lkr:\n \"hmac X K \\ parts (extr (bad s') (ik s') (chan s')) \\\n K \\ synth (analz (extr (bad s) (ik s) (chan s))) \\\n s \\ l2_inv3 \\ \n (s, s') \\ l2_lkr_others A \\ l2_lkr_after A \\\n hmac X K \\ parts (extr (bad s) (ik s) (chan s))\"", "output": "apply (auto simp add: l2_defs dest!: parts_monotone [OF _ extr_insert_bad])\napply (auto intro: parts_monotone intro!:hmac_trans_lkr_aux) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dependent_biggerset_general:\n \"(finite S \\ card S > dim S) \\ dependent S\"", "output": "using independent_bound_general[of S]\nby (metis linorder_not_le)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma peek_st_split [simp]: \"(\\s.. \\Y s'. P s Y s') = (\\Y s. P (store s) Y s)\"", "output": "apply (rule ext)\napply (rule ext)\napply (simp (no_asm)) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma deg_fun_superset:\n fixes A::\"'a set\"\n assumes \"supp_fun s \\ A\" and \"finite A\"\n shows \"deg_fun s = (\\x\\A. s x)\"", "output": "unfolding deg_fun_def\nproof (rule sum.mono_neutral_cong_left, fact, fact, rule) fix x assume \"x \\ A - supp_fun s\" hence \"x \\ supp_fun s\"\nby simp thus \"s x = 0\"\nby (simp add: supp_fun_def)\nqed rule"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dfoldli_simps[simp]:\n \"dfoldli [] c f s = dRETURN s\"\n \"dfoldli (x#ls) c f s = \n (if c s then do { s\\f x s; dfoldli ls c f s} else dRETURN s)\"", "output": "apply (subst dfoldli.simps, simp)+ done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma card_insert_Suc:\n \"card (insert x S) \\ Suc (card S)\"", "output": "by (metis Suc_n_not_le_n card.infinite card_insert_if finite_insert linear)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wlp_while_rl[vcg_comb_rules]:\n assumes \"\\''invar-initial'' \\ I s\\<^sub>0\"\n assumes \"\\s. \\ \\''invar-pres''; modifies modset s s\\<^sub>0; I s; bval b s \\ \\ wlp \\ c I s\"\n assumes \"\\s. \\ \\''invar-post''; modifies modset s s\\<^sub>0; I s; \\bval b s \\ \\ Q s\"\n assumes [simp]: \"modset = ANALYZE (lhsv \\ c)\"\n shows \"wlp \\ (WHILE_annotI I b c) Q s\\<^sub>0\"", "output": "using wlp_whileI_modset[of I, OF _ assms(2)] assms(1,3,4) unfolding WHILE_annotI_def GOAL_INDICATION_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Phase1or2ReadThen_HInv3_hasRead: \n \"\\ \\hasRead s pp dd qq; \n Phase1or2ReadThen s s' p d q; \n pp\\p \\ qq\\q \\ dd\\d\\ \n \\ \\hasRead s' pp dd qq\"", "output": "by(auto simp add: hasRead_def Phase1or2ReadThen_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma permutes_imp_bij: \"p permutes S \\ bij_betw p S S\"", "output": "by (metis UNIV_I bij_betw_subset permutes_bij permutes_image subsetI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphism_on_homeomorphic:\n assumes \"homeomorphism_on S f\"\n shows \"S homeomorphic (f`S)\"", "output": "using assms unfolding homeomorphism_on_def homeomorphic_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tagged_division_of_finite: \"s tagged_division_of i \\ finite s\"", "output": "unfolding tagged_division_of_def tagged_partial_division_of_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stack_set_def:\n \"set (stack s) = dom (discovered s) - dom (finished s)\"", "output": "using basic_invar\nby (simp add: basic_invar_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Spair_induced_automorph:\n \"s\\S \\ s = case_prod Abs_induced_automorph (Spair s)\"", "output": "using Spair_def someI_ex[of \"\\fg. fg \\ fundfoldpairs \\ s = case_prod Abs_induced_automorph fg\" ]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hd_stack_in_tj_stack:\n \"stack s \\ [] \\ hd (stack s) \\ set (tj_stack s)\"", "output": "using stack_ss_tj_stack hd_in_set\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ms_of_greek_cons:\n \"ms_of_greek (x # s) = {# adj_msog [] s (x,[]) #} + image_mset (adj_msog [x] []) (ms_of_greek s)\"", "output": "using msog_append[of \"[x]\" s]\nby (auto simp add: adj_msog_def ms_of_greek_def accent.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma F_hiding: \"F(P \\\\ A) = {(s,X). \\ t. s = trace_hide t (ev`A) \\ (t,X \\ (ev`A)) \\ F P} \\\n {(s,X). s \\ div_hide P A}\"", "output": "by (subst F_def, simp only: hiding_def Rep_Abs_Hiding FAILURES_def fst_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma piecewise_C1_differentiable_on_imp_continuous_on:\n assumes \"f piecewise_C1_differentiable_on s\"\n shows \"continuous_on s f\"", "output": "using assms\nby (auto simp add: piecewise_C1_differentiable_on_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma borel_measurableI:\n fixes f :: \"'a \\ 'x::topological_space\"\n assumes \"\\S. open S \\ f -` S \\ space M \\ sets M\"\n shows \"f \\ borel_measurable M\"", "output": "unfolding borel_def\nproof (rule measurable_measure_of, simp_all) fix S :: \"'x set\" assume \"open S\" thus \"f -` S \\ space M \\ sets M\"\nusing assms[of S]\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma connected_openin:\n \"connected S \\\n \\(\\E1 E2. openin (top_of_set S) E1 \\\n openin (top_of_set S) E2 \\\n S \\ E1 \\ E2 \\ E1 \\ E2 = {} \\ E1 \\ {} \\ E2 \\ {})\"", "output": "unfolding connected_def openin_open disjoint_iff_not_equal\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes forward: \"\\s g p v. A g p v s \\ AA g p s \"\n shows \"\\xv yv P s y x s. (A g x yv ** A g y yv ** P) s \\ (AA g y ** sep_True) s\"", "output": "by (sep_cancel add: forward)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma step_Stuck_prop: \n assumes step: \"\\ \\ (c, s) \\ (c', s')\"\n shows \"s=Stuck \\ s'=Stuck\"", "output": "using step\nby (induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma back_edges_tree_pathes_disjoint:\n \"back_edges s \\ (tree_edges s)\\<^sup>+ = {}\"", "output": "using back_edge_disc tree_path_disc\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HT_mods_cong[named_ss vcg_bb cong]:\n assumes \"vs = vs'\"\n assumes \"P=P'\"\n assumes \"c=c'\"\n assumes \"\\s\\<^sub>0 s. modifies vs s s\\<^sub>0 \\ Q s\\<^sub>0 s = Q' s\\<^sub>0 s\"\n shows \"HT_mods \\ vs P c Q = HT_mods \\ vs' P' c' Q'\"", "output": "unfolding HT_mods_def HT_def\nusing assms\nby (auto intro: wp_conseq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HPhase0Read_HInv4b_p:\n \"HPhase0Read s s' p d \\ HInv4b s' p\"", "output": "by(auto simp add: Phase0Read_def HInv4b_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma connected_complement_homeomorphic_interval:\n fixes S :: \"'a::euclidean_space set\"\n assumes \"S homeomorphic cbox a b\" \"2 \\ DIM('a)\"\n shows \"connected(-S)\"", "output": "using assms path_connected_complement_homeomorphic_interval path_connected_imp_connected\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ENR_from_Un_Int:\n fixes S :: \"'a::euclidean_space set\"\n assumes \"closed S\" \"closed T\" \"ENR(S \\ T)\" \"ENR(S \\ T)\"\n shows \"ENR S\"", "output": "by (meson ENR_from_Un_Int_gen assms closed_subset sup_ge1 sup_ge2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma compact_simplex: \"n simplex S \\ compact S\"", "output": "unfolding simplex\nusing finite_imp_compact_convex_hull\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma absolutely_integrable_negligible:\n fixes f :: \"'a::euclidean_space \\ 'b::euclidean_space\"\n assumes \"negligible S\"\n shows \"f absolutely_integrable_on S\"", "output": "using assms\nby (simp add: absolutely_integrable_on_def integrable_negligible)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma V_lemma2: \"Mutex \\ {s. n s = 2} LeadsTo {s. ~ p s}\"", "output": "apply (rule LeadsTo_Diff [OF LeadsTo_weaken_L Int_lower2 [THEN subset_imp_LeadsTo]])\napply (rule LeadsTo_Trans [OF V_F2 V_F3], auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma resolution_blocks_subset: \"S \\# \\

\\ S \\# \\\"", "output": "using partition_on_mset_subsets resolutionD1\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma restrictA_noop: \"domA \\ \\ S \\ restrictA S \\ = \\\"", "output": "unfolding restrict_eq\nby (induction \\) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inorder_node44: \"height n > 0 \\\n inorder (tree\\<^sub>d (node44 l a m b n c r)) = inorder l @ a # inorder m @ b # inorder n @ c # inorder (tree\\<^sub>d r)\"", "output": "by(induct l a m b n c r rule: node44.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inorder_del:\n \"t \\ T h \\ sorted1(inorder t) \\ inorder(del x t) = del_list x (inorder t)\"", "output": "by(induction h arbitrary: t) (auto simp: del_list_simps inorder_n2 inorder_split_min[OF UnI1] inorder_split_min[OF UnI2] split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inorder_del:\n \"sorted(inorder t) \\ inorder(del x t) = del_list x (inorder t)\"", "output": "by(induction x t rule: del.induct) (auto simp: del_list_simps inorder_baldL inorder_baldR split_minD split: prod.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inorder_update: \"t \\ T h \\\n sorted1(inorder t) \\ inorder(update x y t) = upd_list x y (inorder t)\"", "output": "by(simp add: update_def inorder_upd inorder_tree)"}

f )\"", "output": "unfolding hoare_triple_def Let_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma deduct2: \\p # ps \\ q \\ ps \\ p \\<^bold>\\ q\\", "output": "by (metis imply.simps(1-2) imply_append imply_swap_append)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma t_seq_test_seq:\n \"q = --q \\ test_seq (tseq (-p) x (p\\x\\q) (-p\\(x\\(p\\x\\q)*aL)))\"", "output": "using test_seq_def t_seq_test\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weakBisimParPresSym:\n fixes \\ :: 'b\n and P :: \"('a, 'b, 'c) psi\"\n and Q :: \"('a, 'b, 'c) psi\"\n and R :: \"('a, 'b, 'c) psi\"\n\n assumes \"\\ \\ P \\ Q\"\n\n shows \"\\ \\ R \\ P \\ R \\ Q\"", "output": "using assms\nby(metis weakBisimParComm weakBisimParPres weakBisimTransitive)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma meld_correct:\n shows \"to_mset (meld q q') = to_mset q + to_mset q'\"", "output": "apply (unfold to_mset_def meld_def)\napply (simp_all add: BinomialHeapStruc.meld_correct) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rat_less_code [code]:\n \"p < q \\ (let (a, c) = quotient_of p; (b, d) = quotient_of q in a * d < c * b)\"", "output": "by (cases p, cases q) (simp add: quotient_of_Fract mult.commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weakBisimParAssoc:\n fixes \\ :: 'b\n and P :: \"('a, 'b, 'c) psi\"\n and Q :: \"('a, 'b, 'c) psi\"\n and R :: \"('a, 'b, 'c) psi\"\n\n shows \"\\ \\ (P \\ Q) \\ R \\ P \\ (Q \\ R)\"", "output": "by(metis bisimParAssoc strongBisimWeakBisim)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma priority_Min:\n assumes \"\\ is_empty q\"\n shows \"priority q (min q) = Some (Min (the ` priority q ` set (values q)))\"", "output": "using assms\nby (auto simp add: min_def image_snd_alist_of Min_snd_alist_of priority_fst)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in valid_graph) path_end:\"ps\\[] \\ is_path v ps v' \\ v'=snd (snd(last ps))\"", "output": "by (induct ps arbitrary:v,auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma final_lemma4:\n \"E\\{} \n ==> (\\v \\ V. \\e \\ E. \n {s. ((s \\ reachable v) = ((root,v) \\ REACHABLE))} \\ nmsg_eq 0 e) \n = final\"", "output": "apply (rule subset_antisym)\napply (erule final_lemma2)\napply (unfold final_def Equality_def, blast) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Upd_eq_restr_stackD2:\n assumes \"restr_stack V S' = Upd x # S\"\n shows \"x \\ V\"", "output": "using arg_cong[where f = upds, OF assms]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma frame_assign_in [frame]:\n \"\\ vwb_lens a; x \\\\<^sub>L a \\ \\ a:[x := v] = x := v\"", "output": "by (rel_auto, simp_all add: lens_get_put_quasi_commute lens_put_of_quotient)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gtrace_infinite:\n assumes \"grun A w V r v\"\n shows \"infinite (sset (gtrace r v))\"", "output": "using assms\nby (metis grun_elim gtrace_alt_def infinite_Ici sset_fromN sset_szip_finite)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fresh_quote_all [simp]: \"finite V \\ i \\ quote_all p V \\ i \\ V \\ i \\ p\\V\"", "output": "by (induct rule: finite_induct) (auto simp: fresh_finite_insert)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isolate_variable_sparse_ne_zeroD:\n \"isolate_variable_sparse mp v x \\ 0 \\ x \\ MPoly_Type.degree mp v\"", "output": "using isovar_greater_degree leI\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_fv: assumes fv_e: \"FV e \\ {x}\" and fv_v: \"FV v = {}\" \n shows \"FV (subst x v e) = {}\"", "output": "using fv_e fv_v subst_fv_aux\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stutter_extend_edgesI_stutter:\n assumes \"v \\ V\" \"v \\ Domain E\"\n shows \"(v, v) \\ stutter_extend_edges V E\"", "output": "using assms unfolding stutter_extend_edges_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subprob_cexprD:\n assumes \"subprob_cexpr V V' \\ e\"\n shows \"\\\\. \\ \\ space (state_measure V' \\) \\\n (\\\\<^sup>+\\. extract_real (cexpr_sem (merge V V' (\\, \\)) e) \\state_measure V \\) \\ 1\"", "output": "using assms unfolding subprob_cexpr_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extract_var_single':\nassumes \"v \\ v'\"\nshows \"extract_var (monom (Poly_Mapping.single v n) a) v' = monom (Poly_Mapping.single v n) (monom 0 a)\"", "output": "unfolding extract_var_monom\nusing assms\nby (metis add.right_neutral lookup_single_not_eq remove_key_sum single_zero)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_elimD''[dest]: \"subst_elim \\ v \\ v \\ fv (\\ w)\"", "output": "by (metis subst_elim_def subst_apply_term.simps(1))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma E4_R: \"\\\\<^sub>3 {\\(v>0) ** $(2*v) ** pointsto ''x'' (int v) } \n ''x'' ::= Plus (V ''x'') (N (- 1))\n {\\(v>0) ** $(2*v-1) ** pointsto ''x'' (int v-1) }\"", "output": "apply(rule pureI)\napply(rule strongAssign)\napply(rule symeval | frame_inference)+\nby (simp add: sep_reorder_dollar )"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_cev_commute_full:\n fixes e::ce and w::v and v::v\n assumes \"atom z \\ v\" and \"atom x \\ w\" and \"x \\ z\"\n shows \"subst_cev (e[z::=w]\\<^sub>c\\<^sub>e\\<^sub>v) x v = subst_cev (e[x::=v]\\<^sub>c\\<^sub>e\\<^sub>v) z w \"", "output": "using assms\nby(nominal_induct e rule: ce.strong_induct,simp+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ee:\n assumes \"vector v\"\n and \"e \\ v * -v\\<^sup>T\"\n shows \"e * e = bot\"", "output": "proof - have \"e * v \\ bot\"\nby (metis assms covector_vector_comp comp_associative mult_left_isotone mult_right_zero) thus ?thesis\nby (metis assms(2) bot_unique comp_associative mult_right_isotone semiring.mult_not_zero)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_ev_commute_full:\n fixes e::e and w::v and v::v\n assumes \"atom z \\ v\" and \"atom x \\ w\" and \"x \\ z\"\n shows \"subst_ev (e[z::=w]\\<^sub>e\\<^sub>v) x v = subst_ev (e[x::=v]\\<^sub>e\\<^sub>v) z w\"", "output": "using assms\nby(nominal_induct e rule: e.strong_induct,simp+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_exp_simps [simp]:\n \"rel_exp V (Var x) e' \\ (\\y. e' = Var y \\ V x y)\"\n \"rel_exp V (Const n) e' \\ e' = Const n\"\n \"rel_exp V (Plus e1 e2) e' \\ (\\e1' e2'. e' = Plus e1' e2' \\ rel_exp V e1 e1' \\ rel_exp V e2 e2')\"\n \"rel_exp V (Div e1 e2) e' \\ (\\e1' e2'. e' = Div e1' e2' \\ rel_exp V e1 e1' \\ rel_exp V e2 e2')\"\n \"rel_exp V e (Var y) \\ (\\x. e = Var x \\ V x y)\"\n \"rel_exp V e (Const n) \\ e = Const n\"\n \"rel_exp V e (Plus e1' e2') \\ (\\e1 e2. e = Plus e1 e2 \\ rel_exp V e1 e1' \\ rel_exp V e2 e2')\"\n \"rel_exp V e (Div e1' e2') \\ (\\e1 e2. e = Div e1 e2 \\ rel_exp V e1 e1' \\ rel_exp V e2 e2')\"", "output": "by(auto elim: exp.rel_cases)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma scalar_prod_minus_distrib: fixes v\\<^sub>1 :: \"'a :: ring vec\"\n assumes v: \"v\\<^sub>1 \\ carrier_vec n\" \"v\\<^sub>2 \\ carrier_vec n\" \"v\\<^sub>3 \\ carrier_vec n\"\n shows \"v\\<^sub>1 \\ (v\\<^sub>2 - v\\<^sub>3) = v\\<^sub>1 \\ v\\<^sub>2 - v\\<^sub>1 \\ v\\<^sub>3\"", "output": "unfolding minus_add_uminus_vec[OF v(2-3)]\nby (subst scalar_prod_add_distrib[OF v(1)], insert v, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma find_fas_code_refine[refine]:\n fixes V :: \"('vi\\'v) set\"\n assumes \"is_bounded_hashcode V eq bhc\"\n assumes \"(eq,(=)) \\ V \\ V \\ bool_rel\"\n assumes \"is_valid_def_hm_size TYPE ('vi) sz\"\n assumes 2: \"(Gi, G) \\ \\Rm, V\\g_impl_rel_ext\"\n shows \"RETURN (find_fas_code eq bhc sz Gi) \\ \\(\\V\\\\<^sub>rV\\ahs_rel (prod_bhc bhc bhc)) (find_fas G)\"", "output": "proof - note find_fas_code.refine[OF assms] also note find_fas_impl_refine finally show ?thesis .\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma switch_vchop2:\n \"(v'=v1'--v2') \\ (v=c>v') \\\n (\\ v1 v2. (v1 =c> v1') \\ (v2 =c> v2') \\ (v=v1--v2))\"", "output": "by (metis (no_types, hide_lams) select_convs view.vchop_def view.switch_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma min_distI2: \n \"\\ conn v v' ; \\d. \\ dist v d v'; \\d'. dist v d' v' \\ d \\ d' \\ \\ Q d \\ \n \\ Q (min_dist v v')\"", "output": "unfolding min_dist_def\nby (rule LeastI2_wellorder[where Q=Q and a=\"SOME d. dist v d v'\"]) (auto simp: conn_def intro: someI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mds_consistent_preds_tyenv_update:\n \"P' = P'' |` {v. stable \\ v} \\ v \\ dom \\ \\\n mds_consistent mds \\ \\ P \\ mds_consistent mds (\\(v \\ t)) \\ P'\"", "output": "apply(clarsimp simp: mds_consistent_def)\napply(auto simp: restrict_preds_to_vars_def add_pred_def split: if_splits) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cont_nec_fact2_4[PLM]:\n \"[\\<^bold>\\(WeaklyContingent (PLM.L)) in v]\"", "output": "proof - { assume \"[WeaklyContingent PLM.L in v]\" hence \"[Contingent PLM.L in v]\" unfolding WeaklyContingent_def\nusing \"\\<^bold>&E\"(1)\nby blast } thus ?thesis\nusing thm_noncont_e_e_3 unfolding Contingent_def NonContingent_def\nusing modus_tollens_2 CP\nby blast\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_eq_out_arc_ends: \"(u, v) \\ ((arc_to_ends G) ` (in_arcs G v)) \\ \n (v, u) \\ ((arc_to_ends G) ` (out_arcs G v))\"", "output": "using arc_to_ends_def in_in_arcs_conv in_out_arcs_conv\nby (smt (z3) Pair_inject adj_in_verts(1) dominatesI image_iff out_in_arcs_reflexive_uniq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma apx_empty_iff':\n assumes \"Z \\ V'\" shows \"Z = {} \\ Approx\\<^sub>\\ Z = {}\"", "output": "using apx_empty_iff assms unfolding V'_def\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma selectlike_equal_cond: \"(selectlike X \\ V = selectlike Y \\ V) = (\\\\. Uvariation \\ \\ (-V) \\ (\\\\X) = (\\\\Y))\"", "output": "unfolding selectlike_def\nusing Uvariation_Vagree\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma robdd_depends_on_varI :\n \"robdd_\\ b (a(v := True)) \\ robdd_\\ b (a(v := False)) \\\n robdd_depends_on_var v b\"", "output": "unfolding robdd_depends_on_var_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma typeof_i64:\n assumes \"typeof v = T_i64\"\n shows \"\\c. v = ConstInt64 c\"", "output": "using assms unfolding typeof_def\nby (cases v) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma moebius_translation_inv_translation [simp]:\n shows \"moebius_pt (moebius_translation v) (moebius_pt (moebius_translation (-v)) z) = z\"", "output": "using moebius_translation_inv[symmetric, of v]\nby (simp del: moebius_translation_inv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lt_max_keys:\n assumes \"v \\ keys p\"\n shows \"v \\\\<^sub>t lt p\"", "output": "proof (rule lt_max) from assms show \"lookup p v \\ 0\"\nby (simp add: in_keys_iff)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tObsC_abs_tLast[simp]:\n \"(u, v) \\ tObsC_abs t \\ envObsC (es v) = envObsC (es (tLast t))\"", "output": "unfolding tObsC_abs_def tObsC_def\nby (auto iff: o_def elim: tMap_tLast_inv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma as_needed_asses_submap_exec_iii:\n fixes f g v\n shows \"\n fmdom' (action_needed_asses a s)\n = {v \\ fmdom' s. v \\ fmdom' (fst a) \\ fmlookup (fst a) v = fmlookup s v}\"", "output": "unfolding action_needed_asses_def action_needed_vars_def\nby (simp add: Set.filter_def fmfilter_alt_defs(4)) \\ \\NOTE added lemma.\\"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_of_vec_code[code]: \"list_of_vec (vec_impl v) = list_of_vec_impl v\"", "output": "by (transfer, auto simp: mk_vec_def, case_tac b, auto intro: nth_equalityI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma independent_explicit_finite_subsets:\n \"independent A \\ (\\S \\ A. finite S \\ (\\u. (\\v\\S. u v *s v) = 0 \\ (\\v\\S. u v = 0)))\"", "output": "unfolding dependent_explicit [of A]\nby (simp add: disj_not2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma point_in_vector_sup:\n assumes \"point p\"\n and \"vector v\"\n and \"regular v\"\n and \"p \\ v \\ w\"\n shows \"p \\ v \\ p \\ w\"", "output": "by (metis assms inf.absorb1 shunting_var_p sup_commute point_in_vector_or_complement)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma state_qbit_norm_sq:\n assumes \"v\\ state_qbit n\"\n shows \"(cpx_vec_length v)\\<^sup>2 = 1\"", "output": "proof - have \"cpx_vec_length v = 1\"\nusing assms unfolding state_qbit_def\nby simp thus ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma modified_view_valid: \"isViewOn \\V = (V\\<^bsub>\\\\<^esub> \\ N\\<^bsub>\\\\<^esub>), N = {}, C = C\\<^bsub>\\\\<^esub>\\ E\\<^bsub>SES\\<^esub>\"", "output": "using validVU unfolding isViewOn_def V_valid_def VC_disjoint_def VN_disjoint_def NC_disjoint_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ground_ssubst_eq: \"\\finite V; supp t = {}\\ \\ ssubst t V F = t\"", "output": "by (induct V rule: finite_induct) (auto simp: ssubst_insert fresh_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Prf_flat_lang:\n assumes \"\\ v : r\" shows \"flat v \\ lang r\"", "output": "using assms\nby(induct v r rule: Prf.induct) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valid_abs_goal_1: \"abs_ast_goal v \\ None \\ v \\ set abs_ast_variable_section\"", "output": "using wf_goal\nby (auto simp add: abs_ast_goal_def dest!: map_of_SomeD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vec_norm_eq_cpx_vec_length:\n shows \"vec_norm v = cpx_vec_length v\"", "output": "using vec_norm_sq_cpx_vec_length_sq\nby (metis cpx_vec_length_inner_prod inner_prod_csqrt power2_csqrt vec_norm_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wfG_x_fresh_in_v_simple:\n fixes x::x and v :: v\n assumes \"\\; \\; \\ \\ v \\ \\\" and \"atom x \\ \\\" \n shows \"atom x \\ v\"", "output": "using wfV_x_fresh infer_v_wf assms\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma endpow_list_apply_closed :\n \"v \\ V \\ set (map (\\S. S v) (map endpow [0.. V\"", "output": "using VEnd_endpow VectorSpaceEnd.endomorph\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_ran_restrictA:\n \"map_ran f (restrictA V \\) = restrictA V (map_ran f \\)\"", "output": "by (induction \\) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma subst_t_b_eq:\n fixes x::x and v::v\n shows \"b_of (\\[x::=v]\\<^sub>\\\\<^sub>v) = b_of \\\"", "output": "proof - obtain z and b and c where \"\\ = \\ z : b | c \\ \\ atom z \\ (x,v)\"\nusing has_fresh_z\nby blast thus ?thesis\nusing subst_tv.simps\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma terminal_path_is_path:\n assumes \"terminal_path v v' pth\"\n shows \"path v v' pth\"", "output": "using assms\nby induction (auto simp add: path_cons_simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ltl_step_singleton:\n\"\\t. possible_steps e n r (fst v) (snd v) = {|(aa, t)|} \\ evaluate_outputs t (snd v) r = b \\ evaluate_updates t (snd v) r = c\\\nltl_step e (Some n) r v = (Some aa, b, c)\"", "output": "apply (cases v)\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minGraphProps6:\n \"minGraphProps g \\ v : \\ g \\ f \\ set (facesAt g v) \\ v \\ \\ f\"", "output": "by(auto simp: facesAt_def facesAt_eq_def minGraphProps_def minGraphProps'_def faceListAt_len_def split:if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zipper_children_size_change [termination_simp]: \"(a, b) \\ set (zipper_children (p, v)) \\ size b < size v\"", "output": "by(cases v)(clarsimp simp add: splits_iff Set.image_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma restrict_IF_id: assumes o: \"ifex_ordered (IF v t e)\" assumes le: \"v' < v\"\n shows \"restrict (IF v t e) v' val = (IF v t e)\"", "output": "using restrict_id[OF o, unfolded ifex_top_var.simps, OF refl le, of val] ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma vE_push: \"\\ (u,v)\\pE; u\\last p; v\\\\(set p); v\\D \\ \n \\ vE (p @ [{v}]) D ((pE - {(u,v)}) \\ E\\{v}\\UNIV) = insert (u,v) lvE\"", "output": "unfolding vE_def touched_def\nusing pE_E_from_p\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cbv_star_implies_eval:\n assumes a: \"t \\cbv* v\" \"val v\"\n shows \"t \\ v\"", "output": "using a\nby (induct) (auto simp add: eval_val cbv_star_eval dest: cbvs2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eqOn_map_sdrop[simp]:\n\"cpt V env \\l \\ cpt V env1 \\l1 \\\n eqOn V env \\l env1 \\l1 \\ eqOn V env (map (sdrop i) \\l) env1 (map (sdrop i) \\l1)\"", "output": "unfolding eqOn_def cpt_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minGraphProps8:\n \"minGraphProps g \\ v : \\ g \\ distinct (normFaces (facesAt g v))\"", "output": "by(auto simp: facesAt_def minGraphProps_def minGraphProps'_def facesAt_distinct_def normFaces_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma monitor_split: \"ok \\ v \\ k \\ strategy v \\ (i, v) \\ M (splitter \\ k) \\ (i, v) \\ M \\\"", "output": "unfolding splitter_pslice\nby (rule sliceable_M) (auto simp: wf_tuple_def fvi_less_nfv intro!: mem_restrI[rotated 2, where y=\"map the v\"])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma restrict_def':\" restrict v f c = lan v \\ f c\"", "output": "using inf_commute restriction.restrict_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma trnr\\<^sub>\\_eq:\n assumes \"ide u\" and \"ide v\"\n and \"src v = trg g\" and \"src u = trg f\"\n and \"\\ \\ hom (v \\ g) u\"\n shows \"trnr\\<^sub>\\ v \\ = (\\ \\ f) \\ (v \\ \\)\"", "output": "using assms antipar trnr\\<^sub>\\_eq strict_assoc' comp_ide_arr [of \"\\\\<^sup>-\\<^sup>1[v, g, f]\" \"v \\ \\\"]\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proj5_addpre:\n fixes v pre\n shows \"\\\\<^sub>5(addpre v pre) = \\\\<^sub>5(v)\"", "output": "unfolding addpre_def\nby (cases v) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fin_succs: \"\\v \\ set (g_V G). finite (succs v)\"", "output": "by (insert succ_is_subset_of_verts) (auto intro:rev_finite_subset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma restr_stack_cong:\n \"(\\ x. x \\ upds S \\ x \\ V \\ x \\ V') \\ restr_stack V S = restr_stack V' S\"", "output": "by (induction V S rule: restr_stack.induct) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_state_intro:\n assumes\n \"\\ heap v heap'. P heap \\ State_Monad.run_state f heap = (v, heap')\n \\ \\ v'. R v v' \\ execute g heap = Some (v', heap')\"\n \"\\ heap v heap'. P heap \\ State_Monad.run_state f heap = (v, heap') \\ P heap'\"\n shows \"rel_state R f g\"", "output": "unfolding rel_state_def\napply auto\napply (frule assms(1)[rotated])\napply (auto intro: assms(2)) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Finite_Graph) sum_outgoing_extend: \n assumes \"\\v. \\ v\\V; (u,v)\\E \\ \\ g (u,v) = 0\"\n shows \"(\\e\\outgoing u. g e) = (\\v\\V. g (u,v))\"", "output": "apply (subst sum_outgoing_pointwise)\napply (rule sum.mono_neutral_left)\nusing assms succ_ss_V\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma type_aexpr_Load':\n \"v \\ dom \\ \\ t = (the (\\ v)) \\ type_aexpr \\ (Load v) t\"", "output": "apply(insert type_aexpr[of \\ \"Load v\", simplified])\napply(simp add: to_total_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma C_normal_compR_rhs: \"(nm, vs, v) \\ compR \\ C_normal\\<^sub>M\\<^sub>L v\"", "output": "by(auto simp: compR_def image_def Bex_def pure_R C_normal_ML_comp_open)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fresh_ssubst_dbtm: \"\\atom i \\ p\\V; V \\ Vs\\ \\ atom i \\ ssubst (vquot_dbtm V t) V F\"", "output": "by (induct t rule: dbtm.induct) (auto simp: F_unfold fresh_image permute_set_eq_image)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chamber_vertex_outside_facet_image:\n assumes \"v\\z\" \"domain.chamber (insert v z)\"\n shows \"f v \\ f`z\"", "output": "proof- from assms(1) have \"insert v z - z = {v}\"\nby force with assms(2) show ?thesis\nusing codim_map\nby fastforce\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma normB_S: assumes v: \"v \\ S\"\n shows \"norm1 (B *v v) \\ 0\"", "output": "proof - from zero_no_ev[OF v, unfolded rv_mult rv_0] show ?thesis\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma one_strongly_connected_iff_3:\n \"one_strongly_connected x \\ x;1;x \\ x\\<^sup>T\\<^sup>+\"", "output": "by (metis comp_assoc conv_contrav conv_invol conv_iso conv_one star_conv one_strongly_connected_iff_1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in equivalence) closure_of_eq:\n assumes \"A \\ carrier S\" \"x \\ closure_of A\"\n shows \"\\ x' \\ carrier S; x .= x' \\ \\ x' \\ closure_of A\"", "output": "using assms elem_cong_l sym unfolding eq_closure_of_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma star_below_Omega:\n \"x\\<^sup>\\ \\ x\\<^sup>\\\"", "output": "by (metis Omega_induct mult_1_right order_refl star.circ_left_unfold)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isCont_eq_Lb:\n fixes f :: \"real \\ 'a::linorder_topology\"\n shows \"a \\ b \\ \\x. a \\ x \\ x \\ b \\ isCont f x \\\n \\M. (\\x. a \\ x \\ x \\ b \\ M \\ f x) \\ (\\x. a \\ x \\ x \\ b \\ f x = M)\"", "output": "using continuous_attains_inf[of \"{a..b}\" f]\nby (auto simp: continuous_at_imp_continuous_on Ball_def Bex_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_inv_closed_glob_consistent:\n \"(\\c, mds', mem\\, \\c', mds', mem'\\) \\ rel_inv \\\n \\x a b.\n A x = Some (a, b) \\\n (mem x = a \\ mem' x \\ b) \\ \\ var_asm_not_written mds' x \\\n \\x. dma mem [\\\\<^sub>1 A] x \\ dma mem x \\ \\ var_asm_not_written mds' x \\\n \\x. dma mem [\\\\<^sub>1 A] x = Low \\ (x \\ mds' AsmNoReadOrWrite \\ x \\ \\) \\\n mem [\\\\<^sub>1 A] x = mem' [\\\\<^sub>2 A] x \\\n (\\c, mds', mem [\\\\<^sub>1 A]\\, \\c', mds', mem' [\\\\<^sub>2 A]\\) \\ rel_inv\"", "output": "apply(safe elim!: rel_inv.cases)\nusing rel_inv.intros dma_def\nby simp+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sort_key_msort_key_conv:\n \"sort_key key = msort_key\"", "output": "using msort_key_stable [of \"key x\" for x]\nby (intro ext properties_for_sort_key mset_msort_key sorted_msort_key) (metis (mono_tags, lifting) filter_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cont_case_nat[simp]:\n \"\\cont (\\x. f x); \\n. cont (\\x. g x n) \\ \\ cont (\\x. case_nat (f x) (g x) n)\"", "output": "by (cases n, simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma euclidean_proj_space_def: \"euclidean = map_topology Proj euclidean\"", "output": "apply (auto simp: topology_eq_iff openin_map_topology) subgoal for x\nby (induction x) auto subgoal for _ x\nby (induction x) auto done"} {"instruct": "Given a lemma, please prove it.", "input": "theorem wls_Abs_swap_fresh[simp]:\nassumes \"wls s X\" and \"fresh xs x' X\"\nshows \"Abs xs x' (X #[x' \\ x]_xs) = Abs xs x X\"", "output": "using assms\nby(simp add: Abs_swap_fresh)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma power_eq_top_ennreal: \"x ^ n = top \\ (n \\ 0 \\ (x::ennreal) = top)\"", "output": "by (cases x rule: ennreal_cases) (auto simp: ennreal_power top_power_ennreal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma INF_par_distrib: \"X \\ {} \\ (\\x\\X. d x) \\ c = (\\x\\X. d x \\ c)\"", "output": "using par_INF_distrib par_commute\nby (metis (mono_tags, lifting) INF_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convert_new_thread_action_id:\n \"convert_new_thread_action id = (id :: ('t, 'x, 'm) new_thread_action \\ ('t, 'x, 'm) new_thread_action)\" (is ?thesis1)\n \"convert_new_thread_action (\\x. x) = (id :: ('t, 'x, 'm) new_thread_action \\ ('t, 'x, 'm) new_thread_action)\" (is ?thesis2)", "output": "proof - show ?thesis1\nby(rule ext)(case_tac x, simp_all) thus ?thesis2\nby(simp add: id_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma blocking_on_CD_on:\n assumes \"blocking_on ds X h X''\"\n shows \"X'' \\ CD_on ds (X \\ X'')\"", "output": "using assms unfolding blocking_on_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Sup_dual_def_var: \"\\ (\\X) = \\ (\\ ` X)\"", "output": "using comp_eq_dest Sups_dual_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Rep_mod: \"Rep x mod n = Rep x\"", "output": "apply (rule_tac x=x in type_definition.Abs_cases [OF type])\napply (simp add: type_definition.Abs_inverse [OF type]) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pred_option_conj [simp]:\n \"pred_option (\\x. P x \\ Q x) = (\\x. pred_option P x \\ pred_option Q x)\"", "output": "by(auto simp add: pred_option_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dagger_unfoldl_eq [simp]: \"1 + x \\ x\\<^sup>\\ = x\\<^sup>\\\"", "output": "by (metis dagger_prod_unfold mult_1_left mult_1_right)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma derangements_no_fixpoint:\n assumes \"d \\ derangements A\" \"x \\ A\"\n shows \"d x \\ x\"", "output": "using assms\nby (auto elim: derangementsE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma akra_bazzi_term_imp_less':\n assumes \"akra_bazzi_term x\\<^sub>0 (Suc x\\<^sub>1) b t\" \"x > x\\<^sub>1\"\n shows \"t x < x\"", "output": "using assms unfolding akra_bazzi_term_def\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_option_ap_conv[applicative_unfold]: \"map_option f x = ap_option (pure f) x\"", "output": "by (cases x rule: option.exhaust) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordinal_1_times [simp]: \"oSuc 0 * x = (x::ordinal)\"", "output": "by (rule_tac a=x in oLimit_induct, simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem lfp_f_doctor_pessimal:\n assumes \"x \\ match (lfp_F ds)\"\n shows \"\\y \\ match XD_XH. (x, y) \\ Pd (Xd x)\"", "output": "using %invisible assms lfp_F_stable_pair_on[where ds=ds] \\stable_pair_on ds XD_XH\\ stable_pair_on_CD_on stable_pair_on_Xd Cd_Xd mem_CD_on_Cd XD_XH_lfp_F(1) Cd_mono[where d=\"Xd x\" and x=x and X=\"fst (lfp_F ds)\" and Y=\"fst XD_XH\"]\nby (metis sup.absorb_iff2)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma omega_translate_2:\n \"x\\<^sup>\\ * bot \\ x\\<^sup>\\ = x\\<^sup>\\ \\ x\\<^sup>\\\"", "output": "by (metis mult_assoc omega_mult_star_2 star.circ_top top_left_bot)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pderiv_sum: \"pderiv (\\x\\A. f x) = (\\x\\A. pderiv (f x))\"", "output": "by (induction A rule: infinite_finite_induct) (auto simp: pderiv_add)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unit_factor_field [simp]: \n \"unit_factor (x :: 'a :: {field,normalization_semidom}) = x\"", "output": "by (cases \"is_unit x\") (auto simp: is_unit_unit_factor dvd_field_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma algebraic_inverse: \"algebraic x \\ algebraic (inverse x)\"", "output": "using algebraic_of_rat[of 0]\nby (cases \"x = 0\", auto dest: algebraic_imp_represents_irreducible intro: algebraic_representsI represents_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dflt_arity[sepref_monadify_arity]:\n \"RETURN \\ \\\\<^sub>2x. SP RETURN$x\" \n \"RECT \\ \\\\<^sub>2B x. SP RECT$(\\\\<^sub>2D x. B$(\\\\<^sub>2x. RCALL$D$x)$x)$x\" \n \"case_list \\ \\\\<^sub>2fn fc l. SP case_list$fn$(\\\\<^sub>2x xs. fc$x$xs)$l\" \n \"case_prod \\ \\\\<^sub>2fp p. SP case_prod$(\\\\<^sub>2a b. fp$a$b)$p\" \n \"case_option \\ \\\\<^sub>2fn fs ov. SP case_option$fn$(\\\\<^sub>2x. fs$x)$ov\" \n \"If \\ \\\\<^sub>2b t e. SP If$b$t$e\" \n \"Let \\ \\\\<^sub>2x f. SP Let$x$(\\\\<^sub>2x. f$x)\"", "output": "by (simp_all only: SP_def APP_def PROTECT2_def RCALL_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma alw_coinduct[consumes 1, case_names alw stl]:\n \"X x \\ (\\x. X x \\ \\ x) \\ (\\x. X x \\ \\ alw \\ (stl x) \\ X (stl x)) \\ alw \\ x\"", "output": "using alw.coinduct[of X x \\]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "theorem star_cases [case_names star_n, cases type: star]:\n obtains X where \"x = star_n X\"", "output": "by (cases x) (auto simp: star_n_def star_def elim: quotientE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma n_circ_left_unfold:\n \"n(x\\<^sup>\\) = n(x * x\\<^sup>\\)\"", "output": "by (metis circ_n_L circ_plus_same n_mult n_mult_bot)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inj_def_var1: \"is_inj x \\ -(1') ; x \\ -x\"", "output": "by (metis conv_galois_2 double_compl galois_aux inf.commute is_inj_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mapp_mapp:\n \"(\\x. f x 0 = 0) \\ Poly_Mapping.mapp f (Poly_Mapping.mapp g m) =\n Poly_Mapping.mapp (\\x y. f x (g x y)) m\"", "output": "by transfer' (auto simp: fun_eq_iff lookup_mapp in_keys_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lift_self_disjoint: \"x \\ lift x u = 0\"", "output": "by (metis TC_sup_lift arg_subset_TC inf.absorb_iff2 inf_assoc inf_sup_aci(3) lift_0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in aGroup) ag_inv_inv:\"x \\ carrier A \\ -\\<^sub>a (-\\<^sub>a x) = x\"", "output": "by (frule ag_l_inv1[of \"x\"], frule ag_mOp_closed[of \"x\"], rule ag_inv_unique[THEN sym, of \"-\\<^sub>a x\" \"x\"], assumption+)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma foldli_image: \n \"det_fold_set X (\\_. True) (\\x s. insert (f x) s) {} \n ((`) f)\"", "output": "apply rule\nusing foldli_image_aux[where ?s0.0=\"{}\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "theorem TBtheorem5b_notPQ:\nassumes \"subcomponents PQ = {P,Q}\"\n and \"correctCompositionOut PQ\"\n and \"out_exprChannelSet P ChSetP E\"\n and \"out_exprChannelSet Q ChSetQ E\"\n and \"M = ChSetP \\ ChSetQ\"\n and \"\\ (x ::chanID). ((x \\ ChSetP) \\ (x \\ (loc PQ)))\"\n and \"\\ (x ::chanID). ((x \\ ChSetQ) \\ (x \\ (loc PQ)))\"\nshows \"\\ eoutM PQ M E\"", "output": "using assms\nby (simp add: eoutM_def correctCompositionOut_def out_exprChannelSet_def, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma omega_circ:\n \"x\\<^sup>\\\\<^sup>\\ = 1 \\ x\\<^sup>\\\"", "output": "by (metis order.antisym circ_left_unfold mult_left_sub_dist_sup_left mult_1_right omega_sub_vector)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sturm_id_PR_prio2:\n \"{x::real. x > a \\ x \\ b \\ P x} = \n {x::real. x > a \\ x \\ b \\ PR_TAG P x}\"\n \"{x::real. x \\ a \\ x \\ b \\ P x} = \n {x::real. x \\ a \\ x \\ b \\ PR_TAG P x}\"\n \"{x::real. x \\ a \\ x < b \\ P x} = \n {x::real. x \\ a \\ x < b \\ PR_TAG P x}\"\n \"{x::real. x > a \\ x < b \\ P x} = \n {x::real. x > a \\ x < b \\ PR_TAG P x}\"\n \"(\\x::real. a < x \\ x \\ b \\ f x < g x) = \n (\\x::real. a < x \\ x \\ b \\ PR_TAG (\\x. f x < g x) x)\"\n \"(\\x::real. a \\ x \\ x \\ b \\ f x < g x) = \n (\\x::real. a \\ x \\ x \\ b \\ PR_TAG (\\x. f x < g x) x)\"\n \"(\\x::real. a < x \\ x < b \\ f x < g x) = \n (\\x::real. a < x \\ x < b \\ PR_TAG (\\x. f x < g x) x)\"\n \"(\\x::real. a \\ x \\ x < b \\ f x < g x) = \n (\\x::real. a \\ x \\ x < b \\ PR_TAG (\\x. f x < g x) x)\"\n \"(\\x::real. a < x \\ x \\ b \\ P x) = \n (\\x::real. a < x \\ x \\ b \\ \\(PR_TAG (\\x. \\P x)) x)\"\n \"(\\x::real. a \\ x \\ x \\ b \\ P x) = \n (\\x::real. a \\ x \\ x \\ b \\ \\(PR_TAG (\\x. \\P x)) x)\"\n \"(\\x::real. a \\ x \\ x < b \\ P x) = \n (\\x::real. a \\ x \\ x < b \\ \\(PR_TAG (\\x. \\P x)) x)\"\n \"(\\x::real. a < x \\ x < b \\ P x) = \n (\\x::real. a < x \\ x < b \\ \\(PR_TAG (\\x. \\P x)) x)\"", "output": "by (simp_all add: PR_TAG_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphic_space_refl: \"X homeomorphic_space X\"", "output": "by (meson homeomorphic_maps_id homeomorphic_space_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_Done_bind_resumption [simp]:\n \"is_Done (x \\ f) \\ is_Done x \\ (result x \\ None \\ is_Done (f (the (result x))))\"", "output": "by(simp add: bind_resumption_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma strict_linear_asymmetric:\n \"strict_linear x \\ antisymmetric (-x)\"", "output": "by (metis conv_complement eq_refl p_dist_sup pp_one)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in pair_sigma_finite) AE_pair_iff:\n \"{x\\space (M1 \\\\<^sub>M M2). P (fst x) (snd x)} \\ sets (M1 \\\\<^sub>M M2) \\\n (AE x in M1. AE y in M2. P x y) \\ (AE x in (M1 \\\\<^sub>M M2). P (fst x) (snd x))\"", "output": "using AE_pair[of \"\\x. P (fst x) (snd x)\"] AE_pair_measure[of \"\\x. P (fst x) (snd x)\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma limit_single_step:\n assumes \"x \\ f X\"\n shows \"x \\ limit f X\"", "output": "by (metis assms elem_limit_simp funpower.simps(1) funpower.simps(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma foldli_ball: \n \"det_fold_map X (\\x. x) (\\x _. P x) True (\\m. op_map_ball m P)\"", "output": "apply rule\nusing foldli_ball_aux[where b=True]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma contact_reflexive:\n \"contact x \\ reflexive x\"", "output": "using contact_def sup_right_divisibility\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ebind_refine':\n assumes \"mi \\\\\\<^sub>E E R' m\"\n assumes \"\\xi x. \\(xi,x)\\R'; inres mi (Inr xi); inres m (Inr x); nofail mi; nofail m\\ \\ fi xi \\\\\\<^sub>E E R (f x)\"\n shows \"doE { xi \\ mi; fi xi } \\ \\\\<^sub>E E R (doE { x \\ m; f x })\"", "output": "using assms\nby (simp add: pw_ele_iff refine_pw_simps) blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind_gpv'_cong:\n \"\\ gpv = gpv'; \\x. x \\ Some ` results'_gpv gpv' \\ (\\ colossless_gpv \\_full gpv \\ x = None) \\ f x = f' x \\\n \\ bind_gpv' gpv f = bind_gpv' gpv' f'\"", "output": "by(auto elim: results'_gpv_catch_gpvE split: if_split_asm intro!: bind_gpv_cong[OF refl])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma infnorm_eq_1_2:\n fixes x :: \"real^2\"\n shows \"infnorm x = 1 \\\n \\x$1\\ \\ 1 \\ \\x$2\\ \\ 1 \\ (x$1 = -1 \\ x$1 = 1 \\ x$2 = -1 \\ x$2 = 1)\"", "output": "unfolding infnorm_2\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hn_bind[sepref_comb_rules]:\n assumes D1: \"hn_refine \\ m' \\1 Rh m\"\n assumes D2: \n \"\\x x'. bind_ref_tag x m \\ \n hn_refine (\\1 * hn_ctxt Rh x x') (f' x') (\\2 x x') R (f x)\"\n assumes IMP: \"\\x x'. \\2 x x' \\\\<^sub>t \\' * hn_ctxt Rx x x'\"\n shows \"hn_refine \\ (m'\\f') \\' R (Refine_Basic.bind$m$(\\\\<^sub>2x. f x))\"", "output": "using assms unfolding APP_def PROTECT2_def bind_ref_tag_def\nby (rule hnr_bind)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma g_nonneg': \"eventually (\\x. g x \\ 0) at_top\"", "output": "using g_nonneg\nby (force simp: eventually_at_top_linorder)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma le_mtx_norm: \"m \\ {\\A *\\<^sub>V x\\ |x. \\x\\ = 1} \\ m \\ \\A\\\"", "output": "using cSup_upper[of _ \"{\\(to_vec A) *v x\\ | x. \\x\\ = 1}\"]\nby (simp add: op_norm_set_proptys(2) op_norm_def norm_sq_mtx_def sq_mtx_vec_mult.rep_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LIMSEQ_erf_remainder_integral:\n \"x > 0 \\ (\\m. integral {x..x + real m} (\\t. exp (-(t^2)) / t ^ (2*n))) \\\n erf_remainder_integral n x\"", "output": "using convergent_erf_remainder_integral[of x]\nby (simp add: convergent_LIMSEQ_iff erf_remainder_integral_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gamma_deriv_at_within_gen:\n assumes a_leq_b: \"a < b\" and\n x_within_bounds: \"x \\ s\" and\n s_subset: \"s \\ {a..b}\" and\n gamma_differentiable: \"\\x \\ s. \\ differentiable at x\"\n shows \"vector_derivative \\ (at x within ({a..b})) = vector_derivative \\ (at x)\"", "output": "using Derivative.vector_derivative_at_within_ivl[of \"\\\" \"vector_derivative \\ (at x)\" \"x\" \"a\" \"b\"] gamma_differentiable x_within_bounds a_leq_b s_subset\nby (auto simp add: vector_derivative_works)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uniformly_Cauchy_imp_Cauchy:\n \"uniformly_Cauchy_on X f \\ x \\ X \\ Cauchy (\\n. f n x)\"", "output": "unfolding Cauchy_def uniformly_Cauchy_on_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_left_inverse_base_factor:\n fixes x :: \"'a::{ab_group_add,mult_zero}\"\n assumes \"x \\ 0\"\n shows \"fls_left_inverse (fls_base_factor f) x = fls_base_factor (fls_left_inverse f x)\"", "output": "using assms fls_lr_inverse_zero(1)[of x] fls_lr_inverse_subdegree(1)[of x]\nby (cases \"f=0\") auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma uniformly_continuous_on_def:\n fixes f :: \"'a::metric_space \\ 'b::metric_space\"\n shows \"uniformly_continuous_on s f \\\n (\\e>0. \\d>0. \\x\\s. \\x'\\s. dist x' x < d \\ dist (f x') (f x) < e)\"", "output": "unfolding uniformly_continuous_on_uniformity uniformity_dist filterlim_INF filterlim_principal eventually_inf_principal\nby (force simp: Ball_def uniformity_dist[symmetric] eventually_uniformity_metric)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma represents_self: \"represents {x} (monomial 1 x) x\"", "output": "proof - have sub: \"keys (monomial (1::'a) x) \\ {x}\"\nby simp moreover have \"rep (monomial (1::'a) x) = x\"\nby simp ultimately show ?thesis\nby (rule representsI)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in hlde) cond_b [simp]: \"cond_b a b x = cond_B x\"", "output": "using max_y_impl\nby (auto simp: cond_b_def cond_B_def) presburger+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cGDERIV_scaleC:\n \"\\DERIV f x :> df; cGDERIV g x :> dg\\\n \\ cGDERIV (\\x. scaleC (f x) (g x)) x\n :> (scaleC (cnj (f x)) dg + scaleC (cnj df) (cnj (g x)))\"", "output": "unfolding cgderiv_def has_field_derivative_def cinner_add_left cinner_scaleC_left\napply (rule has_derivative_subst)\napply (erule (1) has_derivative_scaleC)\nby (simp add: ac_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sum_pow2_image_Suc:\n \"finite X \\ sum ((^) (2 :: nat)) (Suc ` X) = 2 * sum ((^) 2) X\"", "output": "by (induct X rule: finite_induct) (auto intro: trans[OF sum.insert])"} {"instruct": "Given a lemma, please prove it.", "input": "theorem impossibility_of_doubling_the_cube:\n \"x^3 = 2 \\ (Point x 0) \\ constructible\"", "output": "by (metis abscissa.simps constructible_radical_sqrt impossibility_of_doubling_the_cube_lemma)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cont2cont_case_lambda [simp, cont2cont]:\n assumes \"\\a b c. cont (\\x. f x a b c)\"\n shows \"cont (\\x. case_lambda (f x) l)\"", "output": "using assms\nby (cases l) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma at_map_Sup_pres_var: \"at_map (\\X) = (\\(x::'a::complete_boolean_algebra_alt) \\ X. (at_map x))\"", "output": "using at_map_Sup_pres comp_eq_elim\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma WHILET_refine[refine]:\n assumes R0: \"(x,x')\\R\"\n assumes COND_REF: \"\\x x'. \\ (x,x')\\R \\ \\ b x = b' x'\"\n assumes STEP_REF: \n \"\\x x'. \\ (x,x')\\R; b x; b' x' \\ \\ f x \\ \\R (f' x')\"\n shows \"WHILET b f x \\\\R (WHILET b' f' x')\"", "output": "unfolding WHILET_def\napply (rule WHILEIT_refine)\nusing assms\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma valuate_sum: \"((\\x\\A. f x) \\ v \\) = (\\x\\A. ((f x) \\ v \\))\"", "output": "by (induct A rule: infinite_finite_induct, auto simp: valuate_zero valuate_add)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_inst_eq_aux': \"ty_term Q objT x = Some T \\ objT (subst_term f x) \\ None\"", "output": "by (cases x) (auto simp: wf_inst_eq_aux)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma star_plus_without_loops:\n \"x\\<^sup>\\ \\ -1 = x\\<^sup>+ \\ -1\"", "output": "by (metis maddux_3_13 star_left_unfold_equal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convergent_minus_iff:\n fixes X :: \"nat \\ 'a::topological_group_add\"\n shows \"convergent X \\ convergent (\\n. - X n)\"", "output": "unfolding convergent_def\nby (force dest: tendsto_minus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma word8_and_max_simp:\n \\x AND 0xFF = x\\ for x :: \\8 word\\", "output": "using word_and_full_mask_simp [of x]\nby (simp add: numeral_eq_Suc mask_Suc_exp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma even_square_cong_4_nat: \"even (x::nat) \\ [x ^ 2 = 0] (mod 4)\"", "output": "using even_square_cong_4_int[of \"int x\"]\nby (auto simp flip: cong_int_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prv_imp_neg_allWI:\n assumes \"\\ \\ fmla\" \"t \\ trm\" \"x \\ var\"\n and \"prv (neg (subst \\ t x))\"\n shows \"prv (neg (all x \\))\"", "output": "by (metis all assms fls subst neg_def prv_all_inst prv_prv_imp_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma arctan_upper_42:\n assumes \"x \\ 0\" shows \"arctan(x) \\ arctan_upper_42 x\"", "output": "apply (rule gen_upper_bound_decreasing [OF assms d_delta_arctan_upper_42])\napply (auto simp: diff_delta_arctan_upper_42_def arctan_upper_42_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transp_on_map':\n assumes \"transp_on Q B\"\n and \"g ` A \\ B\"\n and \"h ` A \\ B\"\n and \"\\x. x \\ A \\ Q\\<^sup>=\\<^sup>= (h x) (g x)\"\n shows \"transp_on (\\x y. Q (g x) (h y)) A\"", "output": "using assms unfolding transp_on_def\nby auto (metis imageI subsetD)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hom_sum[hom_distribs]: \"hom (sum f X) = (\\x \\ X. hom (f x))\"", "output": "by (cases \"finite X\", induct rule:finite_induct; simp add: hom_distribs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma swap_preserves_fresh_distinct:\nassumes \"good X\" and\n \"xs \\ ys \\ x \\ {y1,y2}\"\nshows \"fresh xs x (X #[y1 \\ y2]_ys) = fresh xs x X\"", "output": "unfolding fresh_def[of _ _ X]\nusing assms\nby(auto simp: fresh_swap_qFresh_qSwap qSwap_preserves_qFresh_distinct)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bl2nat_simps[simp]: \"bl2nat (Oc # Oc\\x) 0 = (2 * 2 ^ x - Suc 0)\"\n \"bl2nat (Bk\\x) n = 0\"", "output": "by(induct x;force simp: bl2nat.simps bl2nat_double exp_ind)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mWHILE_unfold: \"m \\ WHILE cond step = do {\n x \\ m;\n if cond x then step x \\ WHILE cond step\n else RETURN x\n }\"", "output": "by (subst WHILE_unfold[abs_def]) (rule refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inverse_inverse_ennreal[simp]: \"inverse (inverse x::ennreal) = x\"", "output": "by (cases \"0 < x\"; cases x; auto simp: inverse_ennreal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma blocking_on_imp_not_stable:\n assumes \"blocking_on ds X h X''\"\n shows \"\\stable_on ds X\"", "output": "unfolding stable_on_def stable_no_blocking_on_def\nusing assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma real_divl_pos_less1_bound:\n assumes \"0 < x\" \"x \\ 1\"\n shows \"1 \\ real_divl prec 1 x\"", "output": "using assms\nby (auto intro!: truncate_down_ge1 simp: real_divl_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma f_1_lemma_1: assumes \"x \\ S1\"\n shows \"P x (f_1 x)\"", "output": "using assms P_lemma theI'[of \"P x\"] f_1_def\nby presburger"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iterates_above_le_f: \"\\ x \\ iterates_above a; a \\ Field leq \\ \\ (x, f x) \\ leq\"", "output": "by(induction x rule: iterates_above.induct)(blast intro: increasing FieldI2 lub_in_Field)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma in_set_spmf_extend_state_oracle [simp]:\n \"x \\ set_spmf (extend_state_oracle oracle s y) \\\n fst (snd x) = fst s \\ (fst x, snd (snd x)) \\ set_spmf (oracle (snd s) y)\"", "output": "by(auto 4 4 simp add: extend_state_oracle_def split_beta intro: rev_image_eqI prod.expand)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in ACeD) left_ident [simp]: \"x \\ D \\ e \\ x = x\"", "output": "proof - assume \"x \\ D\" then have \"x \\ e = x\"\nby (rule ident) with \\x \\ D\\ show ?thesis\nby (simp add: commute)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hom_prod_mset: \"hom (prod_mset X) = prod_mset (image_mset hom X)\"", "output": "by (induct X, auto simp: hom_distribs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma l8:\n \"x \\ --x \\ x\"", "output": "by (metis a_inf_complement_bot a_stone il_idempotent il_inf_left_unit il_inf_right_dist_sup il_less_eq il_unit_bot)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lm068: \n assumes \"x \\ Domain (f||X)\" \n shows \"(f||X)``{x} = f``{x}\"", "output": "using assms doubleRestriction restrictedRange Int_empty_right Int_iff Int_insert_right_if1 restrictedDomain\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prim_root_power [elim]: assumes \"x \\ \\\" obtains i where \"(\\ x)\\<^sup>@(Suc i) = x\"", "output": "using prim_rootD[OF primroot_is_primroot[OF \\x \\ \\\\], unfolded root_def] assms pow_zero[of \"\\ x\"] not0_implies_Suc\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma flip_signed_order2: \"flip_signed (flip_signed x) = x\"", "output": "using apsnd_conv[of \"\\b. \\b\" \"fst x\" \"snd x\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma continuous_le_on_closure:\n fixes a::real\n assumes f: \"continuous_on (closure s) f\"\n and x: \"x \\ closure(s)\"\n and xlo: \"\\x. x \\ s ==> f(x) \\ a\"\n shows \"f(x) \\ a\"", "output": "using image_closure_subset [OF f, where T=\" {x. x \\ a}\" ] assms continuous_on_closed_Collect_le[of \"UNIV\" \"\\x. x\" \"\\x. a\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma open_Collect_imp: \"closed {x. P x} \\ open {x. Q x} \\ open {x. P x \\ Q x}\"", "output": "unfolding imp_conv_disj\nby (intro open_Collect_disj open_Collect_neg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rectangle_eq [simp]: \"is_rectangle x \\ x ; 1 ; x = x\"", "output": "by (metis conv_one dedekind eq_iff inf_top_left mult.assoc one_idem_mult is_rectangle_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma surj_Proj: \"surj Proj\"", "output": "apply safe subgoal\nby force subgoal for x\nby (induct x) auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rtranclp_normalize_poly_add_mset:\n \\normalize_poly_p\\<^sup>*\\<^sup>* A r \\ normalize_poly_p\\<^sup>*\\<^sup>* (add_mset x A) (add_mset x r)\\", "output": "by (induction rule: rtranclp_induct) (auto dest: normalize_poly_p.keep_coeff[of _ _ x])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fresh_prod3[nominal_prod_simps,ms_fresh]: \"x \\ (a,b,c) = (x \\ a \\ x \\ b \\ x \\ c)\"", "output": "using fresh_def supp_Pair\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma transitive_star:\n \"x * x \\ x \\ x\\<^sup>\\ = 1 \\ x\"", "output": "by (metis order.antisym star.circ_mult_increasing_2 star.circ_plus_same star_left_induct_mult star_left_unfold_equal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma card_product_dependent:\n assumes \"finite S\"\n assumes \"\\x \\ S. finite (T x)\"\n shows \"card {(x, y). x \\ S \\ y \\ T x} = (\\x \\ S. card (T x))\"", "output": "using card_SigmaI[OF assms, symmetric]\nby (auto intro!: arg_cong[where f=card] simp add: Sigma_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma unadjoin_in_base [simp]: \"x \\ H \\ unadjoin x = (x, 0)\"", "output": "by (intro unadjoin_unique') (auto intro!: subgroup_indicator_pos is_subgroup)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_vector_derivative_transform_at:\n assumes \"0 < d\"\n and \"\\x'. dist x' x < d \\ f x' = g x'\"\n and \"(f has_vector_derivative f') (at x)\"\n shows \"(g has_vector_derivative f') (at x)\"", "output": "using assms unfolding has_vector_derivative_def\nby (rule has_derivative_transform_at)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zero_vector_left_zero:\n assumes \"zero_vector x\"\n shows \"x * y = x * bot\"", "output": "proof - have \"x * y \\ x * bot\"\nby (metis assms mult_isotone top.extremum vector_mult_closed zero_vector zero_vector_def) thus ?thesis\nby (simp add: order.antisym mult_right_isotone)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Z_I_spectrum:\n shows \"{Re x |x. x \\ spectrum Z_I} \\ {- 1, 1}\"", "output": "using unitary_hermitian_Re_spectrum Z_I_hermitian Z_I_unitary Z_I_carrier\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma super_orientable_irreflexive:\n \"super_orientable x \\ irreflexive x\"", "output": "using pseudo_complement super_orientable_irreflexive_inf\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_reflect_poly_nz:\n \"x \\ 0 \\ poly (reflect_poly p) x = x ^ degree p * poly p (inverse x)\"\n for x :: \"'a::field\"", "output": "by (induct rule: pCons_induct) (simp_all add: field_simps reflect_poly_pCons' poly_monom)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma horiz_vector_helper_pos: \n fixes p:: \"real poly\"\n assumes nonzero: \"p\\0\"\n fixes qs:: \"real poly list\"\n assumes pairwise_rel_prime_1: \"\\q. ((List.member qs q) \\ (coprime p q))\"\n fixes I:: \"nat list\" \n fixes sign:: \"rat list\"\n fixes x:: \"real\"\n assumes root_p: \"x \\ {x. poly p x = 0}\"\n assumes sign_fix: \"sign = consistent_sign_vec_copr qs x\"\n assumes welldefined: \"list_constr I (length qs)\"\n shows \"(poly (prod_list (retrieve_polys qs I)) x > 0) \\ (z I sign = 1)\"", "output": "using horiz_vector_helper_pos_ind\nusing pairwise_rel_prime_1 nonzero root_p sign_fix welldefined\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma LIMSEQ_SUP: \"incseq X \\ X \\ (SUP i. X i :: 'a::{complete_linorder,linorder_topology})\"", "output": "by (intro increasing_tendsto) (auto simp: SUP_upper less_SUP_iff incseq_def eventually_sequentially intro: less_le_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma many_strongly_connected_iff_3:\n \"many_strongly_connected x \\ x \\ x\\<^sup>T\\<^sup>\\\"", "output": "by (metis conv_invol many_strongly_connected_iff_1)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma singleton_sub_trivial_uniq:\n fixes x X\n assumes \"{x} \\ X\" and \"trivial X\"\n shows \"x = the_elem X\"", "output": "using assms unfolding trivial_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in algebra) sets_Collect_imp:\n \"{x\\\\. P x} \\ M \\ {x\\\\. Q x} \\ M \\ {x\\\\. Q x \\ P x} \\ M\"", "output": "unfolding imp_conv_disj\nby (intro sets_Collect_disj sets_Collect_neg)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem thm_2_3_6_Dube:\n assumes \"finite X\" and \"set fs \\ P[X]\"\n shows \"punit.is_Groebner_basis (set (punit.Macaulay_list\n (deg_shifts X (Dube (Suc (card X)) (maxdeg (set fs))) fs)))\"", "output": "using assms Dube_is_GB_cofactor_bound\nby (rule thm_2_3_6) (simp_all add: assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cnorm_eq_square: \"norm x = a \\ 0 \\ a \\ cinner x x = complex_of_real (a\\<^sup>2)\"", "output": "by (metis cdot_square_norm norm_ge_zero of_real_eq_iff power2_eq_iff_nonneg)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mask_eq_ucast_eq:\n \"\\ x AND mask LENGTH('a) = (x :: ('c :: len word));\n LENGTH('a) \\ LENGTH('b)\\\n \\ ucast (ucast x :: ('a :: len word)) = (ucast x :: ('b :: len word))\"", "output": "by (metis ucast_and_mask ucast_id ucast_ucast_mask ucast_up_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma star_sqrt_HFinite: \"\\x \\ HFinite; 0 \\ x\\ \\ ( *f* sqrt) x \\ HFinite\"", "output": "by (metis HFinite_square_iff hypreal_sqrt_pow2_iff power2_eq_square)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma proper_part_irreflexivity: \"\\ PP x x\"", "output": "proof assume \"PP x x\" hence \"\\ PP x x\"\nby (rule proper_part_asymmetry) thus \"False\"\nusing `PP x x` ..\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vwb_lens_iff_mwb_UNIV_src: \n \"vwb_lens X \\ (mwb_lens X \\ \\\\<^bsub>X\\<^esub> = UNIV)\"", "output": "by (meson mwb_UNIV_src_is_vwb_lens vwb_lens_def wb_lens.source_UNIV)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma similar_adm: \"adm (\\x. fst x \\\\ snd x)\"", "output": "unfolding similar_def\nby (intro adm_lemmas similar'_admI cont2cont)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma min_product_set_finite:\n \"(\\x. x \\ X \\ finite x) \\ finite (\\\\<^sub>m X)\"", "output": "by (cases \"finite X\", rotate_tac, induction X rule: finite_induct) (simp_all add: min_product_set_def, insert min_product_finite, blast)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma homeomorphic_map_involution:\n \"\\continuous_map X X f; \\x. x \\ topspace X \\ f(f x) = x\\ \\ homeomorphic_map X X f\"", "output": "using homeomorphic_maps_involution homeomorphic_maps_map\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma expands_to_sin_ms_neg_exp: \n assumes \"e < 0\" \"basis_wf basis\" \"(f expands_to MS (MSLCons (C, e) xs) g) basis\"\n shows \"((\\x. sin (f x)) expands_to MS (sin_ms_aux' (MSLCons (C, e) xs)) (\\x. sin (g x))) basis\"", "output": "using assms\nby (auto simp: expands_to.simps snd_dominant_term_ms_aux_MSLCons o_def intro!: sin_ms_aux' elim: eventually_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma no_better_than_nonepty:\n assumes \"carrier \\ {}\"\n shows \"\\x. x \\ carrier \\ (no_better_than x carrier relation) \\ {}\"", "output": "by (metis (no_types, lifting) empty_iff mem_Collect_eq no_better_than_def refl_onD reflexivity)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minus_of_int: \"f (gm x (of_int n)) = f x\"", "output": "using plus_of_int[of x \"of_int (-n)\"]\nby (simp add: minus_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mult_2_right [simp]:\n fixes x::V shows \"x * set{0,1} = x+x\"", "output": "by (subst mult) (auto simp: Sup_V_insert plus_eq_lift)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mcont2mcont_inf [cont_intro, simp]:\n \"\\ mcont lub ord Sup (\\) (\\x. f x);\n mcont lub ord Sup (\\) (\\x. g x) \\\n \\ mcont lub ord Sup (\\) (\\x. f x \\ g x)\"", "output": "by(best intro: ccpo.mcont2mcont'[OF complete_lattice_ccpo] mcont_inf1 mcont_inf2 ccpo.mcont_const[OF complete_lattice_ccpo])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma domainOfGraph: \n \"runiq(graph X f) & Domain(graph X f)=X\"", "output": "unfolding graph_def\nusing rightUniqueRestrictedGraph\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma den_gt_0: \"0 < x\" if \"x \\ set_tree den\"", "output": "proof - from that obtain p where \"x = root (traverse_tree p den)\"\nby(blast dest: set_tree_pathD) with stern_brocot_denominator_non_zero[of p] show \"0 < x\"\nby(simp add: den_conv split_beta)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma(in padic_integers) ac_Zp_factors':\n assumes \"x \\ nonzero Zp\"\n shows \"x = [p] \\ \\ [^] ord_Zp x \\ ac_Zp x\"", "output": "using assms nonzero_memE\nby (simp add: nonzero_closed nonzero_memE(2) ac_Zp_factors_x(2))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma NSCauchy_NSconvergent: \"NSCauchy X \\ NSconvergent X\"\n for X :: \"nat \\ 'a::banach\"", "output": "using Cauchy_convergent NSCauchy_Cauchy convergent_NSconvergent_iff\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ivl_of_aform_err:\n fixes X\n assumes e: \"e \\ UNIV \\ {-1 .. 1}\"\n shows \"x \\ aform_err e X \\ x \\\\<^sub>r ivl_of_aform_err p X\"", "output": "using Inf_Sup_aform_err[OF e, of X p]\nby (auto simp: set_of_eq lower_ivl_of_aform_err upper_ivl_of_aform_err)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cover_of_select_index_is_open:\n assumes \"x \\ U\"\n shows \"is_open (C (select_index x))\"", "output": "using assms\nby (simp add: are_open_subspaces select_index_belongs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \"\\(\\x::real. 2 * x powr 3 + x * x^2/ln x + 42 * x powr 9 + 213 * x powr 5 - 4 * x powr 7) = \n \\(\\x::real. x ^ 3 + x / ln x * x powr (3/2) - 2*x powr 9)\"", "output": "using [[landau_sum_limit = 5]]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bij_is_maprop:\n assumes \"is_bij x\" and \"is_map x\"\n shows \"x\\<^sup>\\ ; x = 1' \\ x ; x\\<^sup>\\ = 1'\"", "output": "by (metis assms is_bij_def eq_iff is_inj_def is_map_def is_p_fun_def is_sur_def is_total_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma test_d_fixpoint:\n \"test x \\ d x = x\"", "output": "by (metis antisym d1_eq d2 test_inf_idempotent test_inf_right_below)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma test_compl_1 [simp]: \"is_test x \\ x + tc x = 1'\"", "output": "by (metis is_test_def local.aux4 local.inf.absorb_iff1 local.inf_commute tc_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nxt_many_calls[simp]: \"nxt (many_calls x) x' = (if x' = x then many_calls x else empty)\"", "output": "by transfer (force simp add: Cons_replicate_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cos_pi_minus [simp]: \"cos (pi - x) = - (cos x)\"", "output": "by (metis cos_minus cos_periodic_pi uminus_add_conv_diff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isnormNum0[simp]: \"isnormNum x \\ INum x = (0::'a::field_char_0) \\ x = 0\\<^sub>N\"", "output": "unfolding INum_int(2)[symmetric]\nby (rule isnormNum_unique) simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma atomize_fBall:\n \"(\\x. x |\\| A ==> P x) == Trueprop (fBall A (\\x. P x))\"", "output": "apply (simp only: atomize_all atomize_imp)\napply (rule equal_intr_rule)\nby (transfer, simp)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eventually_nonneg_ident_at_top [eventually_nonzero_simps]:\n \"eventually_nonneg at_top (\\x. x)\"", "output": "unfolding eventually_nonneg_def\nby (rule eventually_ge_at_top)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma arctan_lower_13:\n assumes \"x \\ 0\"\n shows \"arctan(x) \\ arctan_lower_13 x\"", "output": "using arctan_upper_12 [of \"-x\"] assms\nby (auto simp: arctan_upper_12_def arctan_minus)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_pure_iff_pure_assn: \"is_pure P = (\\x x'. is_pure_assn (P x x'))\"", "output": "unfolding is_pure_def is_pure_assn_def\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Mem_refl_E [intro!]: \"insert (x IN x) H \\ A\"", "output": "by (metis Disj_I1 Mem_Neg_refl anti_deduction thin0)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closure_Union: \"closure (\\X) = (\\x\\X. closure x)\" if \"finite X\"", "output": "using that\nby (induction X) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ereal_divide_same[simp]:\n fixes x :: ereal\n shows \"x / x = (if \\x\\ = \\ \\ x = 0 then 0 else 1)\"", "output": "by (cases x) (simp_all add: divide_real_def divide_ereal_def one_ereal_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma returns_to_cong: \"auto_ll_on_open.returns_to g Y A x = returns_to A x\"", "output": "using returns_to_congI1 returns_to_congI2\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Inf_inf: \"\\X. f(\\ X) = \\{f x | x. x \\ X} \\ f (x \\ y) = f x \\ f y\"", "output": "apply (erule_tac x=\"{x, y}\" in allE)\nby (force intro: Inf_eqI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sin_cos_squared_add [simp]: \"(sin x)\\<^sup>2 + (cos x)\\<^sup>2 = 1\"\n for x :: \"'a::{real_normed_field,banach}\"", "output": "using cos_add [of x \"-x\"]\nby (simp add: power2_eq_square algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isometry_preserves_infdist:\n \"infdist (f x) (f`A) = infdist x A\"\n if \"isometry_on X f\" \"A \\ X\" \"x \\ X\"", "output": "using that\nby (simp add: infdist_def image_comp isometry_on_def subset_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cos_differentiable_at: \"(\\x. cos (f x::real)) differentiable at x within X\"\n if \"f differentiable at x within X\"", "output": "using differentiable_def has_derivative_cos that\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma a_strict:\n \"a(x) = 1 \\ x \\ Z\"", "output": "by (metis a_Z d_def d_strict order.refl tests_dual.sba_dual.double_negation)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma many_strongly_connected_iff_11_eq:\n assumes \"is_inj x\"\n shows \"many_strongly_connected x \\ x\\<^sup>\\;x\\<^sup>T;x = x\\<^sup>+\"", "output": "using assms many_strongly_connected_iff_11 many_strongly_connected_implies_11_eq\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rrsmultD1 : \"x \\ FH \\ (r \\ f) x = f (x*r)\"", "output": "using Ring1.rightreg_scalar_multD1[OF Ring1_FH] rrsmult\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma measure_count_space: \"measure (count_space A) X = (if X \\ A then of_nat (card X) else 0)\"", "output": "by (cases \"finite X\") (auto simp: measure_notin_sets ennreal_of_nat_eq_real_of_nat measure_zero_top measure_eq_emeasure_eq_ennreal)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma toplevel_summands_flatten:\n \"\\X \\ {}; finite X; \\x \\ X. \\(\\r s. x = Plus r s)\\ \\ toplevel_summands (flatten PLUS X) = X\"", "output": "using toplevel_summands_PLUS_strong[of \"sorted_list_of_set X\"] unfolding list_all_iff\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inf_compl: \"x \\ -x = \\\"", "output": "by (metis dbl_neg sup_comm bot_eq towards_inf_compl inf_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Pd_singletons_for_ds_simps:\n shows \"d \\ ds \\ Pd_singletons_for_ds X ds d = dX X d \\ dX X d\"\n and \"d \\ ds \\ Pd_singletons_for_ds X ds d = Pd d\"", "output": "unfolding Pd_singletons_for_ds_def\nby simp_all"} {"instruct": "Given a lemma, please prove it.", "input": "lemma injectively_orientable_orientable:\n \"injectively_orientable x \\ orientable x\"", "output": "using injectively_orientable_def orientable_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma snd_normalize_quot_nonzero [simp]: \"snd (normalize_quot x) \\ 0\"", "output": "using unit_factor_snd_normalize_quot[of x]\nby (auto simp del: unit_factor_snd_normalize_quot)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma myrule: assumes \"case s of (s, n) \\ ($ (2 * x) \\* ''x'' \\ int x) (s, n) \\ lmaps_to_axpr' (Less (N 0) (V ''x'')) True s\" \n and \"symevalb ($ (2 * x) ** ''x'' \\ int x) (Less (N 0) (V ''x'')) v\"\n shows \"(\\(v=True) ** $ (2 * x) ** ''x'' \\ int x) s\"", "output": "using assms unfolding symevalb_def lmaps_to_axpr'_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma norm_ge_zero [simp]: \"0 \\ norm x\"", "output": "proof - have \"0 = norm (x + -1 *\\<^sub>R x)\"\nusing scaleR_add_left[of 1 \"-1\" x] norm_scaleR[of 0 x]\nby (simp add: scaleR_one) also have \"\\ \\ norm x + norm (-1 *\\<^sub>R x)\"\nby (rule norm_triangle_ineq) finally show ?thesis\nby simp\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma x_coord_bounds:\n assumes \"(0::real) \\ x\" \"x \\ 1\"\n shows \"-1/2 \\ x_coord x \\ x_coord x \\ 1/2\"", "output": "using assms\nby(auto simp add: x_coord_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cond_return_pmf [simp]: \"cond_pmf (return_pmf x) A = return_pmf x\" if \"x \\ A\"", "output": "using that\nby(intro pmf_eqI)(auto simp add: pmf_cond split: split_indicator)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closed_map_eq:\n \"\\closed_map X X' f; \\x. x \\ topspace X \\ f x = g x\\ \\ closed_map X X' g\"", "output": "unfolding closed_map_def\nby (metis image_cong closedin_subset subset_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ebind_Let_refine2[refine2]: \"\\ \n m' \\\\\\<^sub>E E R' (ERETURN x);\n \\x'. \\inres m' (Inr x'); (x',x)\\R'\\ \\ f' x' \\ \\\\<^sub>E E R (f x) \n \\ \\ ebind m' (\\x'. f' x') \\ \\\\<^sub>E E R (Let x (\\x. f x))\"", "output": "apply (simp add: pw_ele_iff refine_pw_simps)\napply blast done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma the_map_option_domA[simp]: \"x \\ domA \\ \\ the (map_option f (map_of \\ x)) = f (the (map_of \\ x))\"", "output": "by (induction \\) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma n_meet_L_top_below:\n \"(n(x) \\ L) * top \\ x\"", "output": "using order.trans n_L_decreasing n_meet_L_top_below_n_L\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma approx_mult_SComplex1: \"\\a \\ SComplex; x \\ 0\\ \\ x*a \\ 0\"", "output": "using SComplex_iff approx_mult_subst_star_of\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma s_eq_s_stop: \"NO_MATCH t_stop x \\ x \\ t_stop \\ s x = s_stop\"", "output": "using t_stop_nonneg\nby (auto simp: s_def p_max_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Order) S_inductive_sup_mem:\"\\S_inductive_set D; Chain D X\\ \\\n Sup D X \\ carrier D\"", "output": "apply (frule_tac X = X in S_inductive_sup, assumption)\napply (simp add:minimum_elem_def, (erule conjE)+, simp add:upper_bounds_def, simp add:upper_bound_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Union_Zero1: \"H \\ UnionP Zero x x\"", "output": "proof - obtain i::name where \"atom i \\ x\"\nby (metis obtain_fresh) hence \"{} \\ UnionP Zero x x\"\nby (auto simp: UnionP.simps [of i] intro: Disj_I2) thus ?thesis\nby (metis thin0)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma p_fun_sur_id [simp]:\n assumes \"is_p_fun x\" and \"is_sur x\"\n shows \"x\\<^sup>\\ ; x = 1'\"", "output": "by (metis assms eq_iff is_p_fun_def is_sur_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma find_set_1:\n \"find_set_precondition p x \\ find_set_invariant p x x\"", "output": "apply (unfold find_set_invariant_def)\nusing mult_left_isotone star.circ_reflexive find_set_precondition_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mem_Rep_star_iff: \"X \\ Rep_star x \\ x = star_n X\"", "output": "by (cases x) (simp add: star_n_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prime_not_unit' [simp]:\n \"ASSUMPTION (prime x) \\ \\is_unit x\"", "output": "unfolding ASSUMPTION_def prime_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tdev_eq_zero_iff: fixes X::\"real pdevs\" shows \"tdev X = 0 \\ (\\e. pdevs_val e X = 0)\"", "output": "by (force simp add: pdevs_val_sum tdev_def sum_nonneg_eq_0_iff dest!: spec[where x=\"\\i. if pdevs_apply X i \\ 0 then 1 else -1\"] split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma allB_atLeastLessThan_lower: assumes \\(i::nat) \\ j\\ \\\\ x\\{i.. shows \\\\ x\\{j..", "output": "proof fix x assume \\x\\{j.. hence \\x\\{i..\nusing assms(1)\nby simp thus \\P x\\\nusing assms(2)\nby auto\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma retraction_maps_eq:\n \"\\retraction_maps X Y f g; \\x. x \\ topspace X \\ f x = f' x; \\x. x \\ topspace Y \\ g x = g' x\\\n \\ retraction_maps X Y f' g'\"", "output": "unfolding retraction_maps_def\nby (metis (no_types, lifting) continuous_map_def continuous_map_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lead_monom_sum_le: \"(\\x. x \\ X \\ lead_monom (h x) \\ ub) \\ lead_monom (sum h X) \\ ub\"", "output": "by (induction X rule: infinite_finite_induct) (auto intro!: order.trans[OF lead_monom_add])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \n \"((\\x. ((a powr x - x * ln a) / (b powr x - x * ln b)) powr (1 / x ^ 2)) \\\n exp ((ln a ^ 2 - ln b ^ 2) / 2)) (at 0)\"", "output": "using ab\nby (real_asymp simp: power2_eq_square)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonpos_Reals_Real [dest]: \"x \\ \\\\<^sub>\\\\<^sub>0 \\ x \\ \\\"", "output": "unfolding nonpos_Reals_def Reals_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cos_one_sin_zero:\n fixes x :: \"'a::{real_normed_field,banach}\"\n assumes \"cos x = 1\"\n shows \"sin x = 0\"", "output": "using sin_cos_squared_add [of x, unfolded assms]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cnj_x_x_geq0[simp]: \"cnj x * x \\ 0\"", "output": "proof (cases x) show \"0 \\ cnj x * x\" if \"x = Complex x1 x2\" for x1 :: real and x2 :: real\nusing that\nby (auto simp: complex_cnj complex_mult complex_of_real_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ex_inverse_of_nat_less:\n fixes x :: \"'a::archimedean_field\"\n assumes \"0 < x\"\n shows \"\\n>0. inverse (of_nat n) < x\"", "output": "using reals_Archimedean [OF \\0 < x\\]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wf_dbfm_iff_is_fm: \"wf_dbfm x \\ (\\A::fm. x = trans_fm [] A)\"", "output": "by (metis wf_dbfm_imp_is_fm wf_dbfm_trans_fm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ideal_generated_singleton_dvd:\n assumes i: \"ideal_generated S = ideal_generated {d}\" and x: \"x \\ S\"\n shows \"d dvd x\"", "output": "by (metis i x finite.intros dvd_ideal_generated_singleton ideal_generated_in ideal_generated_singleton_subset)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma powr_nat_bounds_transfer_abs [eventuallized]:\n \"\\x. powr_nat (abs (f x)) (g x) \\ u x \\ powr_nat (f x) (g x) \\ -u x\"\n \"\\x. powr_nat (abs (f x)) (g x) \\ u x \\ powr_nat (f x) (g x) \\ u x\"", "output": "using powr_nat_bounds_ge_neg\nby blast+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sub_mult_one_circ:\n \"x * 1\\<^sup>\\ \\ 1\\<^sup>\\ * x\"", "output": "by (metis L_split_sup sup_commute mult_1_right one_circ_mult_split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sample_cong: \"(\\x. x \\ set_pmf p \\ f x = g x) \\ sample p f = sample q g\" if \"p = q\"", "output": "by(rule sample_parametric[where R=\"eq_onp (\\x. x \\ set_pmf p)\", THEN rel_funD, THEN rel_funD]) (simp_all add: bi_unique_def eq_onp_def rel_fun_def pmf.rel_refl_strong that)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma\n assumes f: \"f \\ borel_measurable (lebesgue_on S)\" and S: \"S \\ sets lebesgue\"\n shows integral_Dirichlet_kernel_mul_expand:\n \"(LINT x|lebesgue_on S. Dirichlet_kernel n x * f x)\n = (LINT x|lebesgue_on S. sin((n+1/2) * x) * f x / (2 * sin(x/2)))\" (is \"?th1\")\n and integrable_Dirichlet_kernel_mul_expand:\n \"integrable (lebesgue_on S) (\\x. Dirichlet_kernel n x * f x)\n \\ integrable (lebesgue_on S) (\\x. sin((n+1/2) * x) * f x / (2 * sin(x/2)))\" (is \"?th2\")", "output": "using inte_Dirichlet_kernel_mul_expand [OF assms]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma quot_Exists_imp_Pf: \"\\Pf \\\\\\ IMP \\\\\\e; atom i \\ \\\\ \\ Pf \\\\Ex i \\ IMP \\\\\\e\"", "output": "by (force simp: Pf_def Prf_def Exists_def quot_simps q_defs intro: BuildSeq_combine AbstForm_trans_fm_eq fresh_imp_VarNonOccForm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comp_iso_in_hom [intro]:\n assumes \"\\f : a \\ b\\\" and \"\\g : b \\ c\\\"\n shows \"\\g \\ f : a \\ c\\\"", "output": "using assms iso_in_hom_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma HR_quot_fm: fixes A::fm shows \"HR \\\\A\\\\e \\\\\\A\\\\\\e\"", "output": "by (metis HR_H HF_quot_coding_tm coding_tm_hf quot_fm_coding)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma implies_entails:\n \"\\ \\s. P s \\ Q s \\ \\ \\P\\ \\ \\Q\\\"", "output": "by(rule entailsI, case_tac \"P s\", simp_all)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rderivs_replicate_diff: \"\\\\rderivs (replicate i as) r\\ = \\rderivs (replicate j as) r\\; i > j\\ \\\n \\rderivs (replicate (i - j) as) (rderivs (replicate j as) r)\\ = \\rderivs (replicate j as) r\\\"", "output": "unfolding rderivs_append[symmetric] replicate_add[symmetric]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prod_in_hom [intro]:\n assumes \"\\f : a \\ c\\\" and \"\\g : b \\ d\\\"\n shows \"\\f \\ g : a \\ b \\ c \\ d\\\"", "output": "using assms prod_def\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pre_import_composition:\n \"-p*(-p*x*y\\-q) = -p*(x\\y\\-q)\"", "output": "by (metis pre_closed pre_seq pre_import)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma eq_split_subst:\n assumes \"vwb_lens x\"\n shows \"(P = Q) \\ (\\ v. P\\\\v\\/x\\ = Q\\\\v\\/x\\)\"", "output": "using assms\nby (pred_auto, metis vwb_lens_wb wb_lens.source_stability)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hcomp_in_hhom [intro]:\n assumes \"\\\\ : a \\ b\\\" and \"\\\\ : b \\ c\\\"\n shows \"\\\\ \\ \\ : a \\ c\\\"", "output": "using assms hseq_char\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Extra_ax_imp_hfthm:\n assumes \"x \\ Extra_ax\" obtains A where \"x = \\\\A\\\\e \\ {} \\ A\"", "output": "using assms unfolding Extra_ax_def\nby (auto intro: eval_quot_fm_ignore hfthm.Extra)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma empty_graph_is_tree :\n assumes \"edges g = {}\"\n shows \"is_tree g\"", "output": "using assms\nby (auto simp add : is_tree_def subpath_def vertices_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ToCT_simp [simp]:\n assumes \"C.arr f\" and \"C.arr g\" and \"C.arr h\"\n shows \"ToCT (f, g, h) = T (f, T (g, h))\"", "output": "using assms ToCT_def CCC.arr_char\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma endpoints_shiftpath:\n assumes \"pathfinish g = pathstart g\"\n and \"a \\ {0 .. 1}\"\n shows \"pathfinish (shiftpath a g) = g a\"\n and \"pathstart (shiftpath a g) = g a\"", "output": "using assms\nby (auto intro!: pathfinish_shiftpath pathstart_shiftpath)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in gcd_condition_monoid) gcd_divides_l:\n assumes \"a \\ carrier G\" \"b \\ carrier G\"\n shows \"(somegcd G a b) divides a\"", "output": "proof - interpret weak_lower_semilattice \"division_rel G\"\nby simp show ?thesis\nby (metis assms gcd_isgcd isgcd_def)\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lm013: \n assumes \"a \\ allAllocations N G\" \"finite G\" \n shows \"finite (Range a)\"", "output": "using assms elementOfPartitionOfFiniteSetIsFinite\nby (metis allocationReverseInjective)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bij_betw_generator_carrier:\n \"bij_betw (\\n :: nat. \\<^bold>g [^] n) {.. carrier G\"\n and \"set fs \\ carrier G\"\n and \"set fs' \\ carrier G\"\n shows \"essentially_equal G fs fs'\"", "output": "using assms\nby (fast intro: ee_wfactorsI[of a a])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma zip_add_closed :\n \"set as \\ G \\ set bs \\ G \\ set [a + b. (a,b)\\zip as bs] \\ G\"", "output": "using add_closed\nby (induct as bs rule: list_induct2') auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma filterlim_cong':\n assumes \"filterlim f F G\"\n assumes \"eventually (\\x. f x = g x) G\"\n shows \"filterlim g F G\"", "output": "using assms\nby (subst filterlim_cong[OF refl refl, of _ f]) (auto elim: eventually_mono)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ENF_offending_not_empty_imp_ENF_offending_subseteq_rhs:\n assumes \"sinvar_all_edges_normal_form P\" \"set_offending_flows G nP \\ {}\"\n shows \"{ {(e1,e2) \\ edges G. \\ P (nP e1) (nP e2)} } \\ set_offending_flows G nP\"", "output": "using assms ENF_offending_set_P_representation\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inv_Characters': \"\\ \\ characters G \\ inv\\<^bsub>Characters G\\<^esub> \\ = inv_character \\\"", "output": "using character.inv_Characters[of G \\]\nby (simp add: characters_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ord_gpv_the_gpvD:\n \"ord_gpv f g \\ ord_spmf (rel_generat (=) (=) (rel_fun (=) ord_gpv)) (the_gpv f) (the_gpv g)\"", "output": "by(erule ord_gpv.cases) simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma matrix_right_invertible:\n \"linear f \\ ((\\B. matrix f ** B = mat 1) \\ (\\g. linear g \\ f \\ g = id))\" for f::\"real^'m \\ real^'n\"", "output": "using matrix_right_invertible_gen[of f]\nby (auto simp: linear_matrix_vector_mul_eq)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma act_inv_act [simp]:\n assumes \"g \\ carrier G\"\n shows \"b g \\ carrier G\\ and act_act_inv [of \"inv g\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma gHom_mem:\"\\Group F; Group G; f \\ gHom F G ; x \\ carrier F\\ \\\n (f x) \\ carrier G\"", "output": "apply (simp add:gHom_def, (erule conjE)+)\napply (simp add:Pi_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in group) IDirProd_one_left:\n assumes \"A \\ carrier G\"\n shows \"IDirProd G {\\} A = generate G A\"", "output": "using IDirProd_one_right[of A] assms unfolding IDirProd_def\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma AbGroup_nth_subset_inner_dirsum :\n \"\\ \\G \\ set Gs. AbGroup G; add_independentS Gs; n < length Gs \\\n \\ Gs!n \\ (\\G\\Gs. G)\"", "output": "using AbGroup_subset_inner_dirsum\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma hfref_weaken_pre_nofail: \n assumes \"(f,g) \\ [P]\\<^sub>a R \\ S\" \n shows \"(f,g) \\ [\\x. nofail (g x) \\ P x]\\<^sub>a R \\ S\"", "output": "using assms unfolding hfref_def hn_refine_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma integrable_on_cong [cong]:\n assumes \"\\x. x \\ A \\ f x = g x\" \"A = B\"\n shows \"f integrable_on A \\ g integrable_on B\"", "output": "using has_integral_cong[of A f g, OF assms(1)] assms(2)\nby (auto simp: integrable_on_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iter_spaceD:\n assumes \"g \\ iter_space\"\n shows \"g \\ T \\\\<^sub>C X\" \"apply_bcontfun g t0 = x0\"", "output": "using assms iv_defined\nby (auto simp add: iter_space_def mem_PiC_iff split: if_splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma distinct_fresh_rename_idns: \"finite G \\ distinct (fresh_rename_idns n B insts G)\"", "output": "using distinct_fresh_rename_ns\nby (metis)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma rel_set_set_rel_eq[pred_set_conv]:\n \"rel_set (\\ x y. (x, y) \\ A) = (\\ f g. (f, g) \\ \\A\\ set_rel)\"", "output": "unfolding rel_set_def set_rel_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma dvd_right_imp_subdegree_le:\n fixes f g :: \"'a::{comm_monoid_add,mult_zero} fps\"\n assumes \"\\k. g = k * f\" \"g \\ 0\"\n shows \"subdegree f \\ subdegree g\"", "output": "using assms fps_mult_subdegree_ge\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma succ_tran_subseteq_nodes: \"\\ wf_graph G \\ \\ succ_tran G v \\ nodes G\"", "output": "unfolding succ_tran_def\nusing tranclD2 wf_graph.E_wfD(2)\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma minGraphProps10:\n \"minGraphProps g \\ (a, b) \\ edges g \\ (b, a) \\ edges g\"", "output": "apply (unfold minGraphProps_def edges_sym_def)\napply (elim conjE allE impE)\nby simp+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma weight_join[simp]: \"edges g\\<^sub>1 \\ edges g\\<^sub>2 = {} \n \\ weight w (graph_join g\\<^sub>1 g\\<^sub>2) = weight w g\\<^sub>1 + weight w g\\<^sub>2\"", "output": "unfolding weight_alt\nby (auto simp: sum.union_disjoint image_Un)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bigo_plus_absorb_lemma2: \"f \\ O(g) \\ O(g) \\ f +o O(g)\"", "output": "by (metis (no_types) bigo_minus bigo_plus_absorb_lemma1 right_minus set_plus_mono set_plus_rearrange2 set_zero_plus subsetD subset_refl subset_trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma infsetsum_mono_neutral:\n fixes f g :: \"'a \\ real\"\n assumes \"f abs_summable_on A\" and \"g abs_summable_on B\"\n assumes \"\\x. x \\ A \\ f x \\ g x\"\n assumes \"\\x. x \\ A - B \\ f x \\ 0\"\n assumes \"\\x. x \\ B - A \\ g x \\ 0\"\n shows \"infsetsum f A \\ infsetsum g B\"", "output": "using assms unfolding infsetsum_altdef set_lebesgue_integral_def abs_summable_on_altdef set_integrable_def\nby (intro Bochner_Integration.integral_mono) (auto simp: indicator_def)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem LT6: \"\\ \\F \\ (F \\ G) \\ \\G\"", "output": "unfolding leadsto_def\nusing LT5[of \"F\" \"G\"]\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma extending_Increasing: \n \"extending (%G. reachable (extend h F\\G)) h F \n (Increasing (func o f)) (Increasing func)\"", "output": "apply (unfold extending_def)\napply (blast intro: project_Increasing_D) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Entry_no_predecessor[simp]: \"predecessors g (Entry g) = []\"", "output": "using Entry_unreachable\nby (auto simp:predecessors_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma F_entails_\\_iff: \"N1 \\\\e N2 \\ \\ (\\_F ` N1) \\e \\ (\\_F ` N2)\"", "output": "unfolding F.entails_\\_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma \\\\_semantics':\n \"\\\\ \\ w = subformulas\\<^sub>\\ \\ \\ {\\. w \\\\<^sub>n F\\<^sub>n (G\\<^sub>n \\)}\"", "output": "unfolding \\\\_semantics\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma has_laplace_add:\n assumes f: \"(f has_laplace F) S\"\n assumes g: \"(g has_laplace G) S\"\n shows \"((\\x. f x + g x) has_laplace F + G) S\"", "output": "apply (rule has_laplaceI)\nusing has_integral_add[OF has_laplaceD[OF f ] has_laplaceD[OF g]]\nby (auto simp: algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bind'_cong : \" f \\ = g \\ \\ (f ;- M )\\ = (g ;- M )\\\"", "output": "unfolding bind_SE'_def bind_SE_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in group)\n assumes finite': \"finite (carrier G)\" \"a \\ carrier G\"\n shows pow_ord_eq_ord_iff: \"group.ord G (a [^] k) = ord a \\ coprime k (ord a)\" (is \"?L \\ ?R\")", "output": "using assms ord_ge_1 [OF assms]\nby (auto simp: div_eq_dividend_iff ord_pow_gen coprime_iff_gcd_eq_1 gcd.commute split: if_split_asm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma solvable_condition:\n assumes \"group_hom G H f\" \"group_hom H K g\"\n and \"g ` (carrier H) = carrier K\" and \"kernel H K g \\ f ` (carrier G)\"\n and \"solvable G\" \"solvable K\" shows \"solvable H\"", "output": "using solvable_seq_condition[OF assms(1-2) _ assms(4) group.subgroup_self] assms(3,5-6) subgroup.subset[OF group_hom.img_is_subgroup[OF assms(1)]] group_hom.axioms(2)[OF assms(1)]\nby (simp add: solvable_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Join_Always_rel_le_giv:\n \"[| Client \\ G \\ Increasing giv; G \\ preserves rel |] \n ==> Client \\ G \\ Always {s. rel s \\ giv s}\"", "output": "by (force intro: AlwaysI Join_Stable_rel_le_giv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma inverse_transformations_sym:\n assumes \"inverse_transformations A B F G \\ \\'\"\n shows \"inverse_transformations A B G F \\' \\\"", "output": "using assms\nby (simp add: category.inverse_arrows_sym inverse_transformations_axioms_def inverse_transformations_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma elems_all_maps_list:\n assumes \"M \\ set (all_maps_list G)\" \"distinct (snd G)\"\n shows \"\\(sset M) = set (snd G)\"", "output": "using assms\nby (simp add: all_maps_list_def in_set_cyc_permutationss distincts_grouped_arcs union_grouped_out_arcs[symmetric]) (metis set_map)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma deriv_smult:\n assumes \"a \\ carrier R\"\n assumes \"b \\ carrier R\"\n assumes \"g \\ carrier P\"\n shows \"deriv (a \\\\<^bsub>P\\<^esub> g) b = a \\ (deriv g b)\"", "output": "unfolding derivative_def taylor_expansion_def\nusing assms sub_smult X_plus_closed cfs_smult\nby (simp add: sub_closed)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FrameStatEqEqvt[eqvt]:\n fixes F :: \"'b frame\"\n and G :: \"'b frame\"\n and p :: \"name prm\"\n\n shows \"(p \\ (F \\\\<^sub>F G)) = ((p \\ F) \\\\<^sub>F (p \\ G))\"", "output": "by(simp add: FrameStatEq_def eqvts)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma is_K33_outer_step:\n assumes \"is_K33_outer_inv G i blue\"\n assumes \"is_K33_inner_inv G i (ig_verts_cnt G) blue\"\n shows \"is_K33_outer_inv G (Suc i) blue\"", "output": "using assms unfolding is_K33_outer_inv_def is_K33_inner_last\nby (auto intro: less_SucI elim: less_SucE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma times_ms_aux_MSLNil_iff: \"times_ms_aux F G = MSLNil \\ F = MSLNil \\ G = MSLNil\"", "output": "by (subst times_ms_aux.code) (simp split: msllist.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in monoid_cancel) assoc_unit_r [trans]:\n assumes aunit: \"a \\ Units G\"\n and asc: \"a \\ b\"\n and bcarr: \"b \\ carrier G\"\n shows \"b \\ Units G\"", "output": "using aunit bcarr associated_sym[OF asc]\nby (blast intro: assoc_unit_l)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vcg1:\n assumes \"(f, g) \\ Id \\ \\Id\\ nres_rel\"\n shows \"g x \\ h x \\ f x \\ h x\"", "output": "using order_trans nres_relD[OF assms[param_fo, OF IdI], THEN refine_IdD]\nby this"} {"instruct": "Given a lemma, please prove it.", "input": "lemma resultant_swap: \"resultant f g = (-1)^(degree f * degree g) * (resultant g f)\"", "output": "unfolding coeff_subresultant_0_0_resultant[symmetric] unfolding arg_cong[OF subresultant_swap[of 0 f g], of \"\\ x. coeff x 0\"] coeff_smult\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma diffeomorphismD:\n assumes \"diffeomorphism k S T f g\"\n shows diffeomorphism_smoothD: \"k-smooth_on S f\" \"k-smooth_on T g\"\n and diffeomorphism_inverseD: \"\\x. x \\ S \\ g (f x) = x\" \"\\y. y \\ T \\ f (g y) = y\"\n and diffeomorphism_image_eq: \"(f ` S = T)\" \"(g ` T = S)\"", "output": "using assms\nby (auto simp: diffeomorphism_def homeomorphism_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma emp_ref: assumes \"us \\ lists \\G\\\\<^sub>+\" and \"Ref G us = \\\" shows \"us = \\\"", "output": "using emp_concat_emp[OF \\us \\ lists \\G\\\\<^sub>+\\] ref[OF lists_drop_emp[OF assms(1)], unfolded \\Ref G us = \\\\ concat.simps(1),symmetric]\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_integral_add [simp]: \"fls_integral (f+g) = fls_integral f + fls_integral g\"", "output": "by (intro fls_eqI) (simp add: algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mono_increasing_o: \n \"mono g ==> increasing f \\ increasing (g o f)\"", "output": "apply (unfold increasing_def stable_def constrains_def, auto)\napply (blast intro: monoD order_trans) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in finite_group) non_trivial_group_ord_gr_1:\n assumes \"carrier G \\ {\\}\"\n shows \"\\e \\ carrier G. ord e > 1\"", "output": "proof - from one_closed obtain e where e: \"e \\ \\\" \"e \\ carrier G\"\nusing assms carrier_not_empty\nby blast thus ?thesis\nusing ord_eq_1[of e] le_neq_implies_less ord_ge_1\nby fastforce\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma af\\<^sub>G_sat_core_generalized:\n \"Only_G \\ \\ i \\ j \\ \\ \\\\<^sub>P af\\<^sub>G \\ (w [0 \\ i]) \\ \\ \\\\<^sub>P af\\<^sub>G \\ (w [0 \\ j])\"", "output": "by (metis af\\<^sub>G_sat_core foldl_append subsequence_append le_add_diff_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in monoid) wfactors_prod_exists [intro, simp]:\n assumes \"\\a \\ set as. irreducible G a\" and \"set as \\ carrier G\"\n shows \"\\a. a \\ carrier G \\ wfactors G as a\"", "output": "unfolding wfactors_def\nusing assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_integral_sub [simp]: \"fls_integral (f-g) = fls_integral f - fls_integral g\"", "output": "by (intro fls_eqI) (simp add: algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma frameEqFresh:\n fixes F :: \"('a::fs_name) frame\"\n and G :: \"'a frame\"\n and x :: name\n and y :: name\n\n assumes \"\\\\x\\F = \\\\y\\G\"\n and \"x \\ F\"\n \n shows \"y \\ G\"", "output": "using assms\nby(auto simp add: frame.inject alpha fresh_left calc_atm)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_gpv'_sel [simp]:\n \"the_gpv (map_gpv' f g h gpv) = map_spmf (map_generat f g (h ---> map_gpv' f g h)) (the_gpv gpv)\"", "output": "by(simp add: map_gpv'.sel spmf.map_comp o_def generat.map_comp map_fun_def[abs_def])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in subgroup) rcos_module:\n assumes \"group G\" \"x \\ carrier G\" \"x' \\ carrier G\"\n shows \"(x' \\ H #> x) = (x' \\ inv x \\ H)\"", "output": "using rcos_module_rev rcos_module_imp assms\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cvm_fold_cong[fundef_cong]:\n assumes \"cvm = cvm'\"\n and \"stepss = stepss'\"\n and \"\\x d. x \\ set stepss \\ g d x = g' d x\"\n shows \"cvm_fold g cvm stepss = cvm_fold g' cvm' stepss'\"", "output": "unfolding cvm_fold_def\nusing assms\nby (fastforce intro: foldl_cong split: prod.split)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_divide_times2:\n fixes f g :: \"'a::{comm_semiring_0,inverse,uminus} fls\"\n shows \"(f * g) / h = (f / h) * g\"", "output": "using fls_divide_times[of g f h]\nby (simp add: mult.commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_le_antisym: \"\\ f \\\\<^sub>m g; g \\\\<^sub>m f \\ \\ f = g\"", "output": "unfolding map_le_def\nby (metis ext domIff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in subgroup) elemrcos_carrier:\n assumes \"group G\" \"a \\ carrier G\"\n and \"a' \\ H #> a\"\n shows \"a' \\ carrier G\"", "output": "by (meson assms group.is_monoid monoid.r_coset_subset_G subset subsetCE)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma maintained_holds_subset_iff[simp]:\n assumes \"graph G\"\n shows \"maintained (transl_rule (e\\<^sub>L \\ e\\<^sub>R)) G \\ (:G:\\e\\<^sub>L\\ \\ :G:\\e\\<^sub>R\\)\"", "output": "using assms maintained_holds_iff sentence_iff prod.sel\nby metis"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ex2: \n \"\\GG. finite GG & GG \\ X \\ {} \\ OK GG (\\G. G) \\ (\\G \\ GG. G) \\ X \n \\ ex_prop X\"", "output": "apply (unfold ex_prop_def, clarify)\napply (drule_tac x = \"{F,G}\" in spec)\napply (auto dest: ok_sym simp add: OK_iff_ok) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closed_Collect_le:\n fixes f g :: \"'a :: topological_space \\ 'b::linorder_topology\"\n assumes f: \"continuous_on UNIV f\"\n and g: \"continuous_on UNIV g\"\n shows \"closed {x. f x \\ g x}\"", "output": "using open_Collect_less [OF g f]\nby (simp add: closed_def Collect_neg_eq[symmetric] not_le)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma closed_Collect_eq_isCont:\n fixes f g :: \"'a :: t2_space \\ 'b::t2_space\"\n assumes f: \"\\x. isCont f x\" and g: \"\\x. isCont g x\"\n shows \"closed {x. f x = g x}\"", "output": "by (intro closed_Collect_eq continuous_at_imp_continuous_on ballI assms)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma convergent_cong:\n assumes \"eventually (\\x. f x = g x) sequentially\"\n shows \"convergent f \\ convergent g\"", "output": "unfolding convergent_def\nby (subst filterlim_cong[OF refl refl assms]) (rule refl)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mu_commute_fixpoint_1:\n \"isotone f \\ has_least_fixpoint (f \\ g) \\ f \\ g = g \\ f \\ is_fixpoint f (\\ (f \\ g))\"", "output": "by (metis is_fixpoint_def mu_roll)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_mapping_size_one [simp]:\n \"poly_mapping_size f g 1 = g 0 + f 0 + g 1 + 1\"", "output": "unfolding poly_mapping_size_def\nby transfer simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Gromov_extension_isometry_composition:\n assumes \"isometry f\"\n \"isometry g\"\n shows \"Gromov_extension (g o f) = Gromov_extension g o Gromov_extension f\"", "output": "using Gromov_extension_isometry_on_composition[OF isometryD(1)[OF assms(1)] isometryD(1)[OF assms(2)]]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma simple_path_imp_arc: \"simple_path g \\ pathfinish g \\ pathstart g \\ arc g\"", "output": "using simple_path_cases\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma A_FactGroup_def':\n fixes G (structure)\n shows \"G A_Mod H \\ \\carrier = a_rcosets\\<^bsub>G\\<^esub> H, mult = set_add G, one = H\\\"", "output": "unfolding A_FactGroup_defs\nby (fold A_RCOSETS_def set_add_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma expands_to_exp_neg:\n assumes \"(f expands_to MS (MSLCons (C, e) xs) g) basis\" \"basis_wf basis\" \"e - 0 < 0\"\n shows \"((\\x. exp (f x)) expands_to MS (powser_ms_aux' exp_series_stream (MSLCons (C, e) xs)) \n (\\x. exp (g x))) basis\"", "output": "using assms is_expansion_exp_neg[of C e xs g basis]\nby (auto simp: expands_to.simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_dual_func1: \"map_dual (f \\ g) = map_dual f \\ map_dual g\"", "output": "unfolding fun_eq_iff comp_def\nby (metis dual.exhaust dual.map)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma condensation_nodes_edges: \"(condensation_edges g P) \\ (condensation_nodes g P \\ condensation_nodes g P)\"", "output": "unfolding condensation_edges_def condensation_nodes_def induced_phi_graph_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma g_pre_additive:\n assumes \"is_conjugation f g\"\n shows \"g (sup x y) \\ z \\ sup (g x) (g y) \\ z\"", "output": "by (metis assms is_conjugation_sym f_pre_additive)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fls_divide_shift_numer_nonzero:\n fixes f g :: \"'a :: {comm_monoid_add,inverse,times,uminus} fls\"\n assumes \"f \\ 0\"\n shows \"fls_shift m f / g = fls_shift m (f/g)\"", "output": "using assms fls_base_factor_to_fps_shift[of m f]\nby (simp add: fls_divide_def algebra_simps)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma CompI: \"\\G\\s \\c1\\ s1; G\\s1 \\c2\\ s2\\ \\ G\\s \\c1;; c2\\ s2\"", "output": "apply (case_tac \"s\", case_tac \"a = None\")\nby (auto intro!: eval.Comp)"} {"instruct": "Given a lemma, please prove it.", "input": "theorem code_blue_dfs_correct':\n assumes G: \"b_graph G\" \"finite ((g_E G)\\<^sup>* `` g_V0 G)\"\n assumes REL: \"(Gi,G)\\bg_impl_rel_ext unit_rel Id\"\n shows \"case code_blue_dfs Gi of\n None \\ \\prpl. \\b_graph.is_lasso_prpl G prpl\n | Some L \\ b_graph.is_lasso_prpl G L\"", "output": "using code_blue_dfs_correct[OF G REL]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma stable_Join_Always2:\n \"[| F \\ invariant A; G \\ stable A |] ==> F\\G \\ Always A\"", "output": "apply (subst Join_commute)\napply (blast intro: stable_Join_Always1) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma map_le_iff_map_add_commute: \"f \\\\<^sub>m f ++ g \\ f ++ g = g ++ f\"", "output": "by (fastforce simp: map_add_def map_le_def fun_eq_iff split: option.splits)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nu_commute_greatest_fixpoint:\n \"isotone f \\ isotone g \\ has_greatest_fixpoint f \\ has_greatest_fixpoint g \\ has_greatest_fixpoint (f \\ g) \\ f \\ g = g \\ f \\ \\ (f \\ g) = \\ f \\ \\ f \\ \\ g\"", "output": "by (metis greatest_fixpoint is_greatest_fixpoint_def nu_roll)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma cadjoint_univ_prop:\n fixes G :: \"'b::chilbert_space \\ 'a::complex_inner\"\n assumes a1: \\bounded_clinear G\\\n shows \\\\x. \\y. \\cadjoint G x, y\\ = \\x, G y\\\\", "output": "using assms cadjoint_is_cadjoint is_cadjoint_def\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma chooseNext: \"redundant g \\ chooseNext g \\ allVars g \\ trivial g (chooseNext g)\"", "output": "by (drule chooseNext', auto simp: trivial_in_allVars)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Vector_Spaces.linear) invertible_lf_intro[intro]:\n assumes \"(g \\ f = id)\" and \"(f \\ g = id)\"\n shows \"invertible_lf ((*a)) ((*b)) f\"", "output": "using assms\nby unfold_locales auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in Group) Gp_smult_nsg1:\"\\G \\ H; G \\ N\\ \\ Gp G (N \\\\<^bsub>G\\<^esub> H) \\ N\"", "output": "apply (simp add:smult_commute_sg_nsg[THEN sym, of \"H\" \"N\"], simp only:Gp_smult_nsg) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma must_have_one_False:\n \"gval (fold gAnd G (Bc True)) s = False \\\n \\g \\ set G. gval g s = False\"", "output": "using must_have_one_False_contra\nby blast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma RDirProd_list_carrier:\n shows \"carrier (RDirProd_list (G # Gs)) = (\\(x, xs). x # xs) ` (carrier G \\ carrier (RDirProd_list Gs))\"", "output": "unfolding RDirProd_list_carrier_def'\nusing DirProd_list_carrier ."} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in group) generate_idem'_right:\n assumes \"A \\ carrier G\" \"B \\ carrier G\"\n shows \"generate G (A \\ generate G B) = generate G (A \\ B)\"", "output": "using generate_idem'[OF assms(2) assms(1)]\nby (simp add: sup_commute)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in wf_digraph) spanning_tree_imp_connected:\n assumes \"spanning_tree H G\"\n shows \"connected G\"", "output": "using assms\nby (auto intro: connected_spanning_imp_connected)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma F_simp:\n assumes \"D.arr g\"\n shows \"F g = initial_arrow_to_functor.the_ext C D G (Fo (D.dom g)) (\\o (D.dom g))\n (Fo (D.cod g)) (\\o (D.cod g) \\\\<^sub>D g)\"", "output": "using assms F_def\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma vimage2p_map_list_all2:\n \"vimage2p (map f) (map g) (list_all2 A) = list_all2 (vimage2p f g A)\"", "output": "by(simp add: vimage2p_def list.rel_map)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in group) cyclic_groupI0:\n assumes \"a \\ carrier G\" \"carrier G = generate G {a}\"\n shows \"cyclic_group G a\"", "output": "using assms\nby (unfold_locales; auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bij_betw_compose: \"bij_betw f A B \\ bij_betw g B C \\ bij_betw (compose A g f) A C\"", "output": "apply (simp add: bij_betw_def compose_eq inj_on_compose)\napply (auto simp add: compose_def image_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Funcs_mkinterp [simp]: \"Funcs (mkinterp(C,F,P,G)) = F\"", "output": "apply (transfer fixing: C F P G)\napply (auto simp add: is_interp_def mono_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma analz_UnI1 [intro]: \"X \\ analz G ==> X \\ analz (G \\ H)\"", "output": "by (subgoal_tac \"G <= G Un H\") (blast dest: analz_mono)+"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Merge_Bounded:\n \"[| G \\ preserves merge.iOut; G \\ preserves merge.Out; M \\ Allowed G |]\n ==> M \\ G \\ Always {s. \\elt \\ set (merge.iOut s). elt < Nclients}\"", "output": "apply (cut_tac Merge_spec)\napply (force dest: guaranteesD simp add: merge_spec_def merge_bounded_def) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in bounded_sesquilinear) comp: \"bounded_clinear f \\ bounded_clinear g \\ bounded_sesquilinear (\\x y. prod (f x) (g y))\"", "output": "using comp1 bounded_sesquilinear.comp2\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma infsetsum_cong [cong]:\n \"(\\x. x \\ A \\ f x = g x) \\ A = B \\ infsetsum f A = infsetsum g B\"", "output": "unfolding infsetsum_def\nby (intro Bochner_Integration.integral_cong) auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma bound_deg_sum':\n assumes \" f \\ carrier P\"\n assumes \"g \\ carrier P\"\n assumes \"degree f < n\"\n assumes \"degree g < n\"\n shows \"degree (f \\\\<^bsub>P\\<^esub> g) < n\"", "output": "using P_def UP_ring_axioms assms(1) assms(2) assms(3) assms(4)\nby (metis bound_deg_sum le_neq_implies_less less_imp_le_nat not_less)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fSup_distr_var: \"\\F \\ g = (\\f \\ F. f \\ g)\"", "output": "unfolding fun_eq_iff comp_def\nby (smt Inf.INF_cong SUP_apply Sup_apply)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ref_pop_hd: \"us \\ \\ \\ us \\ lists \\G\\ \\ refine G us = decompose G (hd us) \\ refine G (tl us)\"", "output": "unfolding refine.simps\nusing list.simps(9)[of \"decompose G\" \"hd us\" \"tl us\"]\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isomorphic_implies_equicomposable:\n assumes \"f \\ g\"\n shows \"\\ \\ f \\ None \\ \\ \\ g \\ None\"\n and \"f \\ \\ \\ None \\ g \\ \\ \\ None\"", "output": "using assms isomorphic_def hom_connected\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma interval_lebesgue_integral_by_parts_01:\n assumes cont_f[intro]: \"continuous_on {0..1} f\"\n assumes cont_g[intro]: \"continuous_on {0..1} g\"\n assumes [intro]: \"\\x. x \\ {0..1} \\ (F has_field_derivative f x) (at x within {0..1})\"\n assumes [intro]: \"\\x. x \\ {0..1} \\ (G has_field_derivative g x) (at x within {0..1})\"\n shows \"(LBINT x=0..1. F x * g x) = F 1 * G 1 - F 0 * G 0 - (LBINT x=0..1. f x * G x)\"", "output": "using interval_lebesgue_integral_by_parts[of 0 1 f g F G] assms\nby (simp add: zero_ereal_def one_ereal_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma accfield_declC_is_class: \n \"\\is_class G C; accfield G S C en = Some (fd, f); ws_prog G\\ \\ \n is_class G fd\"", "output": "apply (drule accfield_fields)\napply (drule fields_declC [THEN conjunct1], assumption)\napply auto done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma G_perm_apply_identity: \"g\\G \\ \\ g \\ e = g\"", "output": "using G_perm_apply identity(1,2)\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma add_node_wf: \"wf_list_graph G \\ wf_list_graph (add_node v G)\"", "output": "unfolding wf_list_graph_def wf_list_graph_axioms_def add_node_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma FG_consitutents_n0:\n \"of_nat (card G) \\ (0::'f::field)\n \\ 0 \\ set (FG_constituents::('f,'g) aezfun set list)\"", "output": "using someI_ex[OF FG_reducible] unfolding FG_constituents_def\nby fast"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ffold_cong:\n assumes \"comp_fun_commute f\" \"comp_fun_commute g\"\n \"\\x. x |\\| A \\ f x = g x\"\n and \"s = t\" and \"A = B\"\n shows \"ffold f s A = ffold g t B\"", "output": "using assms\nby transfer (metis Finite_Set.fold_cong)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma single_valued_subcls1:\n \"wf_prog wf_md G \\ single_valued (subcls1 G)\"", "output": "by(auto simp:wf_prog_def distinct_fst_def single_valued_def dest!:subcls1D)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in infinite_cts_filtration) borel_pseudo_proj_False_preimage':\n fixes g::\"bool stream \\ 'b::{t0_space}\"\n assumes \"g\\ borel_measurable (F n)\"\n shows \"pseudo_proj_False n -` (g -` {g z}) = g -` {g z}\"", "output": "using assms natural_filtration\nby (simp add: set_discriminating_if pseudo_proj_False_preimage')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma adj_iso2: \"f \\ g \\ mono g\"", "output": "unfolding adj_def mono_def\nby (meson dual_order.refl dual_order.trans)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma comp_char:\n shows \"f \\ g = (if seq f g then mkarr (rep f \\<^bold>\\ rep g) else None)\"", "output": "using comp_def seq_char arr_char\nby meson"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ffold_fimage:\n assumes \"inj_on g (fset A)\"\n shows \"ffold f z (g |`| A) = ffold (f \\ g) z A\"", "output": "using assms\nby transfer' (rule fold_image)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma point_in_group: \"G \\ \\ \\ x \\ G \\ x \\ \\\"", "output": "using group_partitions partition_onD1\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma iso_paired2:\n assumes \"group G\" \"group H\"\n shows \"(\\(x,y). (f x,g y)) \\ iso (DirProd G H) (DirProd G' H') \\ f \\ iso G G' \\ g \\ iso H H'\"", "output": "using assms\nby (fastforce simp add: iso_def inj_on_def bij_betw_def hom_paired2 image_paired_Times times_eq_iff group_def monoid.carrier_not_empty)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat_max_0_id: fixes A :: \"'a mat\"\n assumes A: \"A \\ carrier_mat nr nc\"\n shows \"mat_max (0\\<^sub>m nr nc) A = A\"", "output": "unfolding mat_max_comm[OF zero_carrier_mat A]\nby (rule mat_max_id[OF mat0_leastIII[OF A] A], simp)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Crypt_prom: \"[| Crypt (priK A) X \\ parts {prom B ofr A' r I L J C};\nI \\ agl; J \\ agl |] ==> A=B | Crypt (priK A) X \\ parts {L}\"", "output": "apply (simp add: prom_def anchor_def chain_def sign_def)\nby (blast dest: no_Crypt_in_agl no_Crypt_in_appdel)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma enum_n_top: \"a \\ s \\ a = enum n \\ (\\a'\\s. a' \\ a)\"", "output": "unfolding s_eq\nby (auto simp: enum_mono Ball_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma exists_algorithm_is_SNF_imp_admits_diagonal_reduction:\n assumes \"A \\ carrier_mat m n\"\n and \"\\algorithm. is_SNF A (algorithm A)\"\n shows \"admits_diagonal_reduction A\"", "output": "using assms unfolding is_SNF_def admits_diagonal_reduction_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma remdups_mset_singleton_sum[simp]:\n \"remdups_mset (add_mset a A) = (if a \\# A then remdups_mset A else add_mset a (remdups_mset A))\"", "output": "unfolding remdups_mset_def\nby (simp_all add: insert_absorb)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma tts_AA_A_transfer: \n fixes A :: \"'a \\ 'b \\ bool\" and f :: \"'a \\ 'a \\ 'a\"\n assumes closed: \"\\a b. \\ a \\ \\; b \\ \\ \\ \\ f a b \\ \\\"\n assumes \"Domainp A = (\\x. x \\ \\)\" \"bi_unique A\" \"right_total A\" \n shows \"\\rcdt. (A ===> A ===> A) f rcdt\"", "output": "using closed\nby (rule tts_AB_C_transfer[OF _ assms(2-4) assms(2-4) assms(2-4)])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma keys_mapping_sum_add:\n \\finite A \\ keys (mapping_of (\\v \\ A. f v)) \\ \\(keys ` mapping_of ` f ` UNIV)\\", "output": "by (induction A rule: finite_induct) (auto simp add: zero_mpoly.rep_eq plus_mpoly.rep_eq keys_plus_ninv_comm_monoid_add dest: keys_add')"} {"instruct": "Given a lemma, please prove it.", "input": "lemma arev_arev[simp]: \"arev (arev a) = a\"", "output": "using arev_dom\nby (cases \"a \\ arcs G\") (auto simp: arev_arev_raw)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma fcard_fminus_fsingleton_if:\n \"fcard (A |-| {|x|}) = (if x |\\| A then fcard A - 1 else fcard A)\"", "output": "by transfer (rule card_Diff_singleton_if)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma admits_triangular_reduction_1x2:\n assumes \"\\A::'a mat. A \\ carrier_mat 1 2 \\ admits_triangular_reduction A\"\n shows \"\\C::'a mat. admits_triangular_reduction C\"", "output": "using admits_diagonal_imp_admits_triangular assms triangular_eq_diagonal_1x2\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma lm057: \n assumes \"a \\ allocationsUniverse\" \"Domain a \\ N\" \"\\(Range a) = G\" \n shows \"a \\ allAllocations N G\"", "output": "using assms posssibleAllocationsRelCharacterization lm040\nby (metis (mono_tags, lifting))"} {"instruct": "Given a lemma, please prove it.", "input": "lemma set_of_sub_inc_left:\n \"set_of (A - B) \\ set_of (A' - B)\"\n if \"set_of A \\ set_of A'\"\n for A :: \"'a::linordered_ab_group_add interval\"", "output": "using that unfolding set_of_minus\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma poly_monom: \"poly (monom a n) x = a * x ^ n\"\n for a x :: \"'a::comm_semiring_1\"", "output": "by (cases \"a = 0\", simp_all) (induct n, simp_all add: mult.left_commute poly_eq_fold_coeffs)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma a_star_trans[trans]:\n assumes a1: \"M1\\\\<^sub>a* M2\"\n and a2: \"M2\\\\<^sub>a* M3\"\n shows \"M1 \\\\<^sub>a* M3\"", "output": "using a2 a1\nby (induct) (auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma arr_mkIde:\n shows \"arr (mkIde A) \\ A \\ Univ \\ |A| \"", "output": "using ide_mkIde mkIde_def not_arr_None\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma list_all_list[simp]:\nassumes \"finite A\" shows \"list_all \\ (list A) \\ (\\ a \\ A. \\ a)\"", "output": "using assms unfolding list_all_iff\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Bob_in_iff_nonempty: \"Bob \\ A \\ A \\ {}\" if \"Alice \\ A\"", "output": "using that\nby(auto)(metis (full_types) party.exhaust)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma invariant_steps:\n \"list_all P as\" if \"steps (a # as)\" \"P a\"", "output": "using that\nby (induction \"a # as\" arbitrary: as a) (auto intro: invariant)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma sqmatrix_mult_1_right [simp]:\n \"(A::('a::{semiring_0,monoid_mult},'m::len) sqmatrix) * 1 = A\"", "output": "by (cases A, simp add: one_sqmatrix_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma length_Suc_0:\n\"length al = Suc 0 \\ (\\ a. al = [a])\"", "output": "by (metis (lifting) length_0_conv length_Suc_conv)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma reduce_row_mod_D_preserves_dimensions_abs:\n shows [simp]: \"dim_row (reduce_row_mod_D_abs A a xs D m) = dim_row A\" \n and [simp]: \"dim_col (reduce_row_mod_D_abs A a xs D m) = dim_col A\"", "output": "by (induct A a xs D m rule: reduce_row_mod_D_abs.induct, auto)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma isomorphic_REP_trg:\n assumes \"ide A\"\n shows \"REP A \\\\<^sub>B trg (REP A)\"", "output": "using assms ide_char isomorphic_REP_src\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma char_poly_matrix_upper_triangular: \"upper_triangular (char_poly_matrix A)\"", "output": "using A ut unfolding upper_triangular_def char_poly_matrix_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma good_card_imp_finite : \"of_nat (card A) \\ (0::'a::semiring_1) \\ finite A\"", "output": "using card_ge_0_finite[of A]\nby fastforce"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Schema_is_action: \n\"(R ((\\(A, A'). (Pre sc) (more A)) \\ \n (\\(A, A'). sc (more A, more A') & \\wait A' & tr A = tr A'))) \\ {p. is_CSP_process p}\"", "output": "apply (simp)\napply (rule rd_is_CSP)\napply (auto) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mat_of_rows_rows[simp]:\n \"mat_of_rows (dim_col A) (rows A) = A\"", "output": "unfolding mat_of_rows_def\nby (rule, auto simp: row_def)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma maxim_in: \"\\finite A; A \\ {}; A \\ Field r\\ \\ maxim A \\ A\"", "output": "using maxim_isMaxim unfolding isMaxim_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma nonzero_Reals_inverse: \"a \\ \\ \\ a \\ 0 \\ inverse a \\ \\\"\n for a :: \"'a::real_div_algebra\"", "output": "by (metis Reals_def Reals_of_real imageE of_real_inverse)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma wfp_on_imp_has_min_elt:\n assumes \"wfp_on P A\" and \"A \\ {}\"\n shows \"\\x\\A. \\y\\A. \\ P y x\"", "output": "using assms unfolding wfp_on_iff_minimal\nby force"} {"instruct": "Given a lemma, please prove it.", "input": "lemma countable_as_injective_image:\n assumes \"countable A\" \"infinite A\"\n obtains f :: \"nat \\ 'a\" where \"A = range f\" \"inj f\"", "output": "by (metis bij_betw_def bij_betw_from_nat_into [OF assms])"} {"instruct": "Given a lemma, please prove it.", "input": "lemma semilattice_transfer[transfer_rule]:\n assumes [transfer_rule]: \"bi_unique A\" \"right_total A\" \n shows \n \"((A ===> A ===> A) ===> (=)) \n (\\f. semilattice_ow (Collect (Domainp A)) f) semilattice\"", "output": "unfolding semilattice_ow_def semilattice_def semilattice_ow_axioms_def semilattice_axioms_def\napply transfer_prover_start\napply transfer_step+\nby simp"} {"instruct": "Given a lemma, please prove it.", "input": "lemma mset_set_set_mset_msubset: \"mset_set (set_mset A) \\# A\"", "output": "proof (rule mset_subset_eqI) fix x show \"count (mset_set (set_mset A)) x \\ count A x\"\nby (cases \"x \\# A\") simp_all\nqed"} {"instruct": "Given a lemma, please prove it.", "input": "lemma ordLeq_countable_subsets:\n\"|A| \\o |{X. X \\ A \\ countable X}|\"", "output": "apply (rule card_of_ordLeqI[of \"\\ a. {a}\"]) unfolding inj_on_def\nby auto"} {"instruct": "Given a lemma, please prove it.", "input": "lemma Stable_Int: \n \"[| F \\ Stable A; F \\ Stable A' |] ==> F \\ Stable (A \\ A')\"", "output": "apply (unfold Stable_def)\napply (blast intro: Constrains_Int) done"} {"instruct": "Given a lemma, please prove it.", "input": "lemma prob_optionT_of_spmf_transfer: \"(rel_spmf A ===> cr_spmf_prob_optionT A) prob_optionT_of_spmf (\\x. x)\"", "output": "by(auto simp add: rel_fun_def intro: cr_spmf_prob_optionTI)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma row_space_eq_col_space_transpose:\n fixes A::\"'a::{field}^'columns^'rows\"\n shows \"row_space A = col_space (transpose A)\"", "output": "unfolding col_space_def row_space_def columns_transpose[of A] .."} {"instruct": "Given a lemma, please prove it.", "input": "lemma monotone_case_prod_iff [simp]:\n \"monotone (rel_prod orda ordb) ordc (case_prod f) \\\n (\\a. monotone ordb ordc (f a)) \\ (\\b. monotone orda ordc (\\a. f a b))\"", "output": "by(simp add: monotone_rel_prod_iff)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma (in loopfree_digraph) adj_not_same:\n assumes \"a \\ a\" shows \"False\"", "output": "using assms\nby (rule reachableE) (auto dest: no_loops)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma float_neg_sign: \"(sign a) \\ (sign (- a))\"", "output": "by (cases a rule: sign_cases) (auto simp: sign_minus_float)"} {"instruct": "Given a lemma, please prove it.", "input": "lemma pow_assoc: \"(\\::'a set set \\ 'a set) \\ \\