Input:
lemma toplevel_summands_PLUS_strong:
  "\<lbrakk>xs \<noteq> []; list_all (\<lambda>x. \<not>(\<exists>r s. x = Plus r s)) xs\<rbrakk> \<Longrightarrow> toplevel_summands (PLUS xs) = set xs"

Output: by (induct xs rule: list_singleton_induct) auto


Input:
lemma rga_ops_rem_last:
  assumes "rga_ops (xs @ [x])"
  shows "rga_ops xs"

Output:
using assms crdt_ops_rem_last rga_ops_def
by blast


Input: lemma unstream_stream: "unstream stream xs = xs"

Output: by(induction xs)(auto simp add: stream.rep_eq)


Input:
lemma Kdelta_in_Zinf:"\<lbrakk>j \<le> (Suc n); k \<le> (Suc n)\<rbrakk>  \<Longrightarrow>
                 z *\<^sub>a (\<delta>\<^bsub>j k\<^esub>) \<in> Z\<^sub>\<infinity>"

Output:
apply (simp add:Kronecker_delta_def)
apply (simp add:z_in_aug_inf Zero_in_aug_inf)
apply (simp add:asprod_n_0 Zero_in_aug_inf) done


Input:
lemma gds_init_refine: "gds_init gds
      \<le> SPEC (\<lambda>s. gen_rwof s \<and> gds_is_empty_stack gds s)"

Output:
apply (rule SPEC_rule_conj_leofI1)
apply (rule rwof_init[OF nofail])
apply (rule init_empty_stack) done


Input: lemma analz_image_Key [simp]: "analz (Key`N) = Key`N"

Output:
apply auto
apply (erule analz.induct, auto) done


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])
apply(erule conjE|rule allI conjI cont_intro|simp|erule allE, erule llist.mono2mono)+ done


Input: lemma ft_tailR_impl: "al_tailR ft_\<alpha> ft_invar ft_tailR"

Output:
apply unfold_locales
apply (auto simp add: ft_defs FingerTree.tailR_correct FingerTree.empty_correct) done


Input: lemma filter_oseq_idemp: "filter_oseq p (filter_oseq p s) = filter_oseq p s"

Output:
apply (simp add: filter_oseq_def)
apply (rule ext)
apply (case_tac "s i")
apply simp_all done


Input:
lemma all2_less_lemma [simp]:
  "rec_eval (rec_all2_less f) [x, y1, y2] = (if (\<forall>z < x. 0 < rec_eval f [z, y1, y2]) then 1 else 0)"

Output:
apply(auto simp add: Let_def rec_all2_less_def)
apply(metis nat_less_le)+ done


Input:
lemma l2_inv7_step1:
  "{l2_inv7} l2_step1 Ra A B {> l2_inv7}"

Output:
apply (auto simp add: PO_hoare_defs l2_defs intro!: l2_inv7I)
apply (auto intro: synth_analz_increasing) done


Input:
lemma wf_ciD3_ci_app:
  "\<lbrakk> ci_app ci ins P h stk loc C M pc frs; ins_jump_ok ins pc' \<rbrakk> \<Longrightarrow> ci_app ci ins P h stk loc C M pc' frs"

Output:
apply(cases ci)
apply(simp add: Abs_check_instr_inverse)
apply(erule (2) wf_ciD3) done


Input: lemma "[2, mod 10, 4] = {2, 12, 22, 32, 42}"

Output:
apply (simp only: iMODb_conv)
apply (simp add: iT_defs iT_Plus_def iT_Mult_def)
apply fastforce done


Input:
lemma strict_mono_cancel_le:
fixes f :: "'a::linorder \<Rightarrow> 'b::linorder"
shows "strict_mono f \<Longrightarrow> (f x \<le> f y) = (x \<le> y)"

Output:
apply (auto simp add: order_le_less)
apply (simp add: strict_mono_cancel_less)
apply (simp add: strict_mono_cancel_eq)
apply (simp add: strict_monoD) done


Input:
lemma equiv_class_member:
  assumes "x \<in> A"
  and "\<approx>A `` {x} = \<approx>A `` {y}"
  shows "y \<in> A"

Output:
using assms
apply(simp)
apply(simp add: str_eq_def)
apply(metis append_Nil2) done


Input: lemma mor_image1: "mor B1 B2 s1 s2 B1' B2' s1' s2' f g \<Longrightarrow> f ` B1 \<subseteq> B1'"

Output:
apply (tactic \<open>dtac @{context} @{thm iffD1[OF mor_def]} 1\<close>)
apply (erule conjE)+
apply (rule image_subsetI)
apply (erule bspec)
apply assumption done


Input: lemma list_strict_asc_distinct: "list_strict_asc (xs::'a::preorder list) \<Longrightarrow> distinct xs"

Output:
apply (rule_tac ord="(<)" in list_ord_distinct)
apply (unfold irrefl_def list_strict_asc_def trans_def)
apply (blast intro: less_trans)+ done


Input: lemma hs_ins_impl: "imp_set_ins is_hashset hs_ins"

Output:
apply unfold_locales
apply (sep_auto heap: hm_update_rule simp: hs_ins_def is_hashset_def) done


Input:
lemma and_neq_0_is_nth:
  \<open>x AND y \<noteq> 0 \<longleftrightarrow> x !! n\<close> if \<open>y = 2 ^ n\<close> for x y :: \<open>'a::len word\<close>

Output:
apply (simp add: bit_eq_iff bit_simps)
using that
apply (simp add: bit_simps not_le)
apply transfer
apply auto done


Input:
lemma const_le_unat:
  "\<lbrakk> b < 2 ^ LENGTH('a); of_nat b \<le> a \<rbrakk> \<Longrightarrow> b \<le> unat (a :: 'a :: len word)"

Output:
apply (simp add: word_le_def)
apply (simp only: uint_nat zle_int)
apply transfer
apply (simp add: take_bit_nat_eq_self) done


Input:
lemma AddSA_HAInitValue_IFF:
 "\<lbrakk> States SA \<inter> HAStates HA = {};
    S \<in> HAStates HA;
    (HAInitValue HA) = X \<rbrakk> \<Longrightarrow> (HAInitValue (HA [++] (S, SA))) = X"

Output:
apply (subst AddSA_HAInitValue)
apply auto done


Input:
lemma order_widen [intro,simp]:
  "wf_prog m P \<Longrightarrow> order (subtype P)"

Output:
apply (unfold Semilat.order_def lesub_def)
apply (auto intro: widen_trans widen_antisym) done


Input: lemma hta_\<alpha>_is_ta[simp, intro!]: "tree_automaton (hta_\<alpha> H)"

Output:
apply unfold_locales
apply (unfold hta_\<alpha>_def)
apply auto done


Input:
lemma FAddSA_HierAuto_insert [simp]:
  "\<lbrakk> (States SA \<inter> HAStates HA) = {};
      S \<in> HAStates HA \<rbrakk> \<Longrightarrow>
    HierAuto (HAInitValue HA)
             (insert SA (SAs HA))
             (HAEvents HA \<union> SAEvents SA)
             (CompFun HA [f+] (S,SA))"

Output:
apply (unfold HAStates_def)
apply (rule FAddSA_HierAuto)
apply auto done


Input: lemma obj_ty_def2 [simp]: "obj_ty (C,fs) = Class C"

Output:
apply (unfold obj_ty_def)
apply (simp (no_asm)) done


Input: lemma initedD: "inited C g \<Longrightarrow> \<exists> obj. g (Stat C) = Some obj"

Output:
apply (unfold inited_def)
apply auto done


Input: lemma lrev_body_lrev_body1_eq: "lrev_body1 = unwrapH oo lrev_body oo wrapH"

Output:
apply (rule cfun_eqI)+
apply (subst lrev_body.unfold)
apply (subst lrev_body1.unfold)
apply (case_tac xa)
apply (simp_all add: list2H_def wrapH_def unwrapH_def) done


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]
using get_owner_document_ptr_in_heap
apply fast done


Input:
lemma matrix_vector_mult_in_columnspace_gen:
  fixes A :: "'a::field^'n^'m"
  shows "(A *v x) \<in> vec.span(columns A)"

Output:
apply (simp add: matrix_vector_column columns_def transpose_def column_def)
apply (intro vec.span_sum vec.span_scale)
apply (force intro: vec.span_base) done


Input:
lemma ucast_and_neg_mask:
  "ucast (x AND NOT (mask n)) = ucast x AND NOT (mask n)"

Output:
apply (rule bit_word_eqI)
apply (auto simp add: bit_simps dest: bit_imp_le_length) done


Input:
lemma atoms_list_disjE:
  "a \<in> atoms(list_disj fs) \<Longrightarrow> a \<in> (\<Union>\<phi> \<in> set fs. atoms \<phi>)"

Output:
apply(induct fs)
apply (simp add:list_disj_def)
apply (auto simp add:list_disj_def Logic.or_def split:if_split_asm) done


Input: lemma PO_a0i_obs_inv1_iagree [iff]: "oreach a0i \<subseteq> a0i_inv1_iagree"

Output:
apply (rule external_from_internal_invariant, fast)
apply (subst a0i_def, auto) done


Input: lemma bounded_clinear_vector_to_cblinfun[bounded_clinear]: "bounded_clinear vector_to_cblinfun"

Output:
apply (rule bounded_clinearI[where K=1])
apply (transfer, simp add: scaleC_add_right)
apply (transfer, simp add: mult.commute)
by simp


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]
apply simp
apply (simp_all add: to_gbg_ext_def)
apply (intro ext)
apply (fo_rule arg_cong | intro ext)+
apply (auto simp: F_def accn_def intro!: ext) done


Input:
lemma enumerator_bound: "ls \<in> set (enumerator m nmax) \<Longrightarrow>
 0 < nmax \<Longrightarrow> x \<in> set ls \<Longrightarrow> x < nmax"

Output:
apply (auto simp: enumerator_def split: if_split_asm)
apply (subgoal_tac "x \<le> nmax - 2")
apply arith
apply (rule_tac enumAppend_bound_rec)
by(auto simp:enumBase_simps)


Input: lemma wp2_Skip[simp]: "wp\<^sub>2 SKIP Q = (%s. eSuc (Q s))"

Output:
apply(auto intro!: ext simp: wp2_def) prefer 2
apply(simp only: SKIPnot)
apply(simp)
apply(simp only: SKIPp SKIPt)
using one_enat_def plus_1_eSuc(1)
by auto


Input: lemma flatten_while [simp]: "flatten (while gs b c) = [while gs b c]"

Output:
apply (simp add: while_def)
apply (induct gs)
apply auto done


Input: lemma fn_comm_power: "fa \<circ> tr = tr \<circ> fr \<Longrightarrow> fa ^^ n \<circ> tr = tr \<circ> fr ^^ n"

Output:
apply (rule ext)
apply (induct n)
apply (auto dest: fun_cong) done


Input:
lemma unat_less_helper:
  "x < of_nat n \<Longrightarrow> unat x < n"

Output:
apply (simp add: word_less_nat_alt)
apply (erule order_less_le_trans)
apply (simp add: take_bit_eq_mod) done


Input:
lemma adm_fn:
  shows "adm (\<lambda>x. x \<in> fn_lf_rep r)"

Output:
unfolding fn_lf_rep_def
using adm_below_monic_exists[OF _ below_monic_fun_K[where f="ValF"], where P="\<lambda>_. True", simplified]
apply (clarsimp simp: split_def)
apply (rule adm_below_monic_exists)
apply (auto simp: cont_fun below_monic_indexed) done


Input: lemma halloc_gext: "\<And>s1 s2. G\<turnstile>s1 \<midarrow>halloc oi\<succ>a\<rightarrow> s2 \<Longrightarrow> snd s1\<le>|snd s2"

Output:
apply (simp (no_asm_simp) only: split_tupled_all)
apply (erule halloc.induct)
apply (auto dest!: new_AddrD) done


Input: lemma BoxPrime: "\<turnstile> \<box>P \<longrightarrow> \<box>($P \<and> P$)"

Output:
apply clarsimp
apply (erule dup_boxE)
apply (unfold boxInit_act)
apply (erule STL4E)
apply (auto simp: Init_simps dest!: STL2_pr [temp_use]) done


Input:
lemma (in Order) ord_isom_mem:"\<lbrakk>Order E; ord_isom D E f; a \<in> carrier D\<rbrakk> \<Longrightarrow>
                (f a) \<in> carrier E"

Output:
apply (simp add:ord_isom_def, (erule conjE)+)
apply (simp add:ord_inj_mem) done


Input: lemma eFalse: "A \<turnstile>\<^sub>e {\<lambda>s. False} e {Q}"

Output:
apply (rule eThin)
apply (rule ehoare_relative_complete)
apply (auto simp add: evalid_def) done


Input: lemma parts_empty [simp]: "parts{} = {}"

Output:
apply safe
apply (erule parts.induct, blast+) done


Input:
lemma distrPUTLG:
  "\<lbrakk>x \<in> dom P; (list2policy PL) x = P x; disjDomGD PL; PL \<noteq> []\<rbrakk> \<Longrightarrow>
  (PUT x = P x) = PUTListGD PUT x PL "

Output:
apply (rule iffI)
apply (rule distrPUTLG2)
apply (simp_all)
apply (rule_tac PL = PL in distrPUTLG1)
apply (auto) done


Input:
theorem mutil_not_tiling:
  "t = {0..< 2 * Suc m} \<times> {0..< 2 * Suc n}
   ==> t - {(0,0)} - {(Suc(2 * m), Suc(2 * n))} \<notin> tiling domino"

Output:
apply (rule gen_mutil_not_tiling)
apply (blast intro!: dominoes_tile_matrix)
apply auto done


Input: lemma finite_subcls1: "finite (subcls1 P)"

Output:
apply (simp add: subcls1_def2)
apply(rule finite_SigmaI [OF finite_is_class])
apply(rule_tac B = "{fst (the (class P C))}" in finite_subset)
apply auto done


Input:
lemma pi'_dom[icf_proper_iteratorI]: "proper_it' it it'
  \<Longrightarrow> proper_it' (map_iterator_dom o it) (map_iterator_dom o it')"

Output:
apply (rule proper_it'I)
apply (simp add: comp_def)
apply (rule icf_proper_iteratorI)
apply (erule proper_it'D) done


Input:
lemma chart_basis_continuous:
  notes [transfer_rule] = open_nonzero_openin_transfer
  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
apply transfer subgoal
by (auto intro!: continuous_intros simp: split_beta) subgoal
by (rule open_chart_basis_domain) done


Input:
lemma wset_find_path'_refine:
    "wset_find_path' E U0 P \<le> \<Down>Id (wset_find_path E U0 P)"

Output:
unfolding wset_find_path'_def wset_find_path_def unfolding op_map_pick_remove_alt
apply (refine_rcg IdI)
apply assumption
apply simp_all done


Input:
lemma (in normal) oInv_le:
"a < F (oSuc x) \<Longrightarrow> oInv F a \<le> x"

Output:
apply (erule contrapos_pp)
apply (simp add: linorder_not_less linorder_not_le less_oInvD) done


Input: lemma (in aGroup) asubg_inc_zero:"asubGroup A H \<Longrightarrow> \<zero> \<in> H"

Output:
apply (simp add:asubGroup_def)
apply (cut_tac b_ag_group)
apply (frule Group.sg_unit_closed[of "b_ag A" "H"], assumption)
apply (simp add:b_ag_def) done


Input: lemma (in Tarski) Y_subset_A: "Y \<subseteq> A"

Output:
apply (rule subset_trans [OF _ fix_subset])
apply (rule Y_ss [simplified P_def]) done


Input:
lemma auto_split_is_maxsplit:
 "auto_split A (start A) res [] xs = maxsplit (accepts A) res [] xs"

Output:
apply (unfold accepts_def)
apply (subst delta_Nil[where ?s = "start A", symmetric])
apply (subst auto_split_lemma)
apply simp done


Input:
lemma States_CDMode_CTRL:
  "States CDMode_CTRL = CDMode_CTRL_States"

Output:
apply (simp add: CDMode_CTRL_def)
apply (unfold States_def)
apply (simp add: Abs_seqauto_inverse check_CDMode_CTRL) done


Input:
lemma mono_Sup:
  fixes f :: "'a::complete_lattice \<Rightarrow> 'b::complete_lattice"
  shows "mono f \<Longrightarrow> Sup (f`S) \<le> f (Sup S)"

Output:
apply (rule Sup_least)
apply (erule imageE)
apply simp
apply (erule monoD)
apply (erule Sup_upper) done


Input: lemma Rep_map_type: "(\<And>x. f(x) \<in> A) \<Longrightarrow> Rep_map f xs \<in> list(A)"

Output:
apply (simp add: Rep_map_def)
apply (rule list_induct, auto) done


Input:
lemma iT_Div_conv_count: "
  0 < d \<Longrightarrow> I \<oslash> d = {k. I \<inter> [k * d\<dots>,d - Suc 0] \<noteq> {}}"

Output:
apply (case_tac "I = {}")
apply (simp add: iT_Div_empty)
apply (rule set_eqI)
apply (simp add: iT_Div_mem_iff_Int) done


Input:
lemma etran_in_comm:
  "(P, t) # xs \<in> comm(guar, post) \<Longrightarrow> (P, s) # (P, t) # xs \<in> comm(guar, post)"

Output:
apply(simp add:comm_def)
apply clarify
apply(case_tac i,simp+) done


Input: lemma blue_dfs_correct': "(uncurry2 blue_dfs, uncurry2 blue_dfs_spec) \<in> [\<lambda>((E,A),v0). finite (E\<^sup>*``{v0})]\<^sub>f ((Id\<times>\<^sub>rId)\<times>\<^sub>rId) \<rightarrow> \<langle>Id\<rangle>nres_rel"

Output:
apply (intro frefI nres_relI) unfolding blue_dfs_spec_def
apply clarsimp
apply (refine_vcg blue_dfs_correct) done


Input: lemma Derivation_leftmost: "D \<noteq> [] \<Longrightarrow> Derivation a D b \<Longrightarrow> \<exists> i. leftmost i a"

Output:
apply (case_tac "D")
apply (auto)
apply (metis Derives1_leftmost) done


Input:
lemma graph_more_rel_sv[relator_props]:
  "\<lbrakk>single_valued Rm; single_valued Rv; single_valued Rw\<rbrakk>
  \<Longrightarrow> single_valued (\<langle>Rm,Rv,Rw\<rangle>graph_more_rel)"

Output:
unfolding graph_more_rel_def
apply (rule single_valuedI, clarsimp)
apply (rule graph.equality)
apply (erule (1) single_valuedD[rotated], tagged_solver)+ done


Input: lemma g_sng_impl: "map_sng \<alpha> invar g_sng"

Output:
apply unfold_locales
apply (simp_all add: update_correct empty_correct g_sng_def) done


Input: lemma prod_orA_quasi_commute: "p2 \<Otimes>\<^sub>\<or>\<^sub>A p1 = (((\<lambda>(x,y). (y,x)) o_f (p1 \<Otimes>\<^sub>\<or>\<^sub>A p2))) o (\<lambda>(a,b).(b,a))"

Output:
apply (rule ext)
apply (simp add: prod_orA_def policy_range_comp_def o_def)
apply (auto)[1]
apply (simp split: option.splits decision.splits) done


Input: lemma accs_is_b_accessible: "accs \<delta> t q \<Longrightarrow> q\<in>b_accessible \<delta>"

Output:
apply (induct rule: accs.induct)
apply (rule b_accessible.intros)
apply assumption
apply (fastforce simp add: in_set_conv_nth) done


Input: lemma finite_inc: "finite (inc ` X) = finite X"

Output:
apply(rule inj_finite_image_eq_finite)
apply(rule_tac B=UNIV in subset_inj_on)
apply(auto) done


Input: lemma (in aGroup) ag_r_zero:"x \<in> carrier A \<Longrightarrow> x \<plusminus> \<zero> = x"

Output:
apply (cut_tac ex_zero)
apply (subst pop_commute, assumption+)
apply (rule ag_l_zero, assumption) done


Input: theorem chopOne_not_decrease: "dn \<le> domainNameDeptChopOne dn"

Output:
apply(induction dn)
apply(rename_tac name dpt)
apply(drule_tac x="name" in prepend_domain)
apply(case_tac dpt)
apply simp_all done


Input: lemma sorted_sort: "sorted (map f (sort xs))"

Output:
apply (induction xs rule: sort.induct)
apply simp
apply (simp only: sorted_append sort.simps part map_append split)
apply (intro conjI TrueI)
using sorted_map_same
by (auto simp: set_sort)


Input: lemma SubnetsInGW_ENF_refl: "SecurityInvariant_withOffendingFlows.ENF_refl sinvar allowed_subnet_flow"

Output:
unfolding SecurityInvariant_withOffendingFlows.ENF_refl_def
apply(rule conjI)
apply(simp add: SubnetsInGW_ENF)
apply(simp add: allowed_subnet_flow_refl) done


Input:
lemma wf_subcls1:
  "wf_prog wf_md P \<Longrightarrow> wf ((subcls1 P)\<inverse>)"

Output:
apply (rule finite_acyclic_wf_converse)
apply (rule finite_subcls1)
apply (erule acyclic_subcls1) done


Input: lemma publicKey_into_used [iff] :"Key (publicKey b A) \<in> used evs"

Output:
apply (rule initState_into_used)
apply (rule publicKey_in_initState [THEN parts.Inj]) done


Input:
lemma States_Root_CTRL:
  "States Root_CTRL = Root_CTRL_States"

Output:
apply (simp add: Root_CTRL_def)
apply (unfold States_def)
apply (simp add: Abs_seqauto_inverse check_Root_CTRL) done


Input:
lemma Rep_take_columns[simp]:
  "Rep_matrix (take_columns A c) j i =
  (if i < c then (Rep_matrix A j i) else 0)"

Output:
apply (simp add: take_columns_def)
apply (simplesubst RepAbs_matrix)
apply (rule exI[of _ "nrows A"], auto, simp add: nrows_le)
apply (rule exI[of _ "ncols A"], auto, simp add: ncols_le) done


Input:
lemma ps_chains_is_ps_chains2_with_empty_S:
  "ps_chains = ps_chains2 {||}"

Output:
apply (unfold fun_eq_iff, intro allI)
apply (unfold ps_chains_def ps_chains2_def)
apply (fold initial_ps_is_initial_ps2_with_empty_S)
apply (fold lins_is_lins2_with_empty_S)
apply auto done


Input:
lemma link_length: "size (tree_to_multiset (link t1 t2)) =
  size (tree_to_multiset t1) + size (tree_to_multiset t2)"

Output:
apply(cases t1)
apply(cases t2)
apply simp done


Input:
lemma possible_steps_0_not_select: "a \<noteq> STR ''select'' \<Longrightarrow>
       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)
apply safe
by (simp_all add: select_def)


Input: lemma bl_to_bin_ge0: "bl_to_bin bs \<ge> 0"

Output:
apply (unfold bl_to_bin_def)
apply (rule xtrans(4))
apply (rule bl_to_bin_ge2p_aux)
apply simp done


Input: lemma hta_ensure_idx_s_correct[simp, intro!]: "hashedTa (hta_ensure_idx_s H)"

Output:
apply (unfold_locales)
apply (auto)
apply (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


Input: lemma hidings_empty_entails [intro!]: "t hidings (\<lambda>k. {}) entails R"

Output:
apply (unfold hidings_entails_def)
apply (simp (no_asm)) done


Input: lemma chart_basis_inverse: "chart_basis_inv (chart_basis b x) = x" if "chart_basis_domainP b x"

Output:
using that
apply transfer unfolding proj_rel_iff
apply transfer
apply (simp add: split_beta prod_eq_iff) subgoal for x
apply (rule exI[where x="fst x \<bullet> b"])
using b
by (simp add: algebra_simps) done


Input: lemma indecomposable_succ [simp]: "indecomposable (succ \<alpha>) \<longleftrightarrow> \<alpha> = 0"

Output:
using not_add_mem_right
apply (auto simp: indecomposable_def)
apply (metis add_right_cancel add.right_neutral) done


Input: lemma icard_glength: "icard (gset a) \<le> glength a"

Output:
apply (unfold icard_def glength_def)
apply (case_tac a)
apply (simp add: card_length)+ done


Input:
lemma wprepare_goto_start_pos_Bk_move[simp]: "\<lbrakk>lm \<noteq> []; wprepare_goto_start_pos m lm (b, Bk # list)\<rbrakk>
       \<Longrightarrow> wprepare_goto_start_pos m lm (Bk # b, list)"

Output:
apply(simp only:wprepare_invs, auto)
apply(case_tac [!] lm, simp, simp_all) done


Input:
lemma interfree_Color_Target_Append:
  "interfree_aux (Some Color_Target, {}, Some Append)"

Output:
apply (unfold modules )
apply interfree_aux
apply(clarify, simp add:abbrev Append_to_free0)+
apply (force simp add: Append_to_free2)
apply(clarify,simp add:abbrev Append_to_free0)+ done


Input:
lemma int_o_subst:
"int \<xi> o subst \<rho> = int (int \<xi> o \<rho>)"

Output:
apply(rule ext)
apply(subst comp_def) unfolding int_o[symmetric] ..


Input: lemma "Mutex \<in> Always bad_IU"

Output:
apply (rule AlwaysI, force)
apply (unfold Mutex_def, safety, auto) oops


Input: lemma gen_upd_app: "\<And>es'. gen_upd var (es@es') = gen_upd var es' \<circ> gen_upd var es"

Output:
apply (induct es)
apply (rule ext)
apply (simp add: gen_upd_def)
apply (rule ext)
apply (simp add: gen_upd_def) done


Input: lemma wp_Un_eq: "single_valued act ==> wp act (A \<union> B) = wp act A \<union> wp act B"

Output:
apply (rule equalityI)
apply (force simp add: wp_def single_valued_def)
apply (rule wp_Un_subset) done


Input:
lemma parts_insert_Crypt [simp]:
     "parts (insert (Crypt K X) H) = insert (Crypt K X) (parts (insert X H))"

Output:
apply (rule equalityI)
apply (rule subsetI)
apply (erule parts.induct, auto)
apply (blast intro: parts.Body) done


Input:
lemma wlconf_map_sum [simp]:
 "G,s\<turnstile>l1 (+) l2[\<sim>\<Colon>\<preceq>]L1 (+) L2 = (G,s\<turnstile>l1[\<sim>\<Colon>\<preceq>]L1 \<and> G,s\<turnstile>l2[\<sim>\<Colon>\<preceq>]L2)"

Output:
apply (unfold wlconf_def)
apply safe
apply (case_tac [3] "n")
apply (force split: sum.split)+ done


Input:
lemma check_Root_CTRL:
  "(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)
apply simp done


Input:
lemma cont_Sup:
  assumes "cont lub ord Union (\<subseteq>) f"
  shows "cont lub ord Sup (\<le>) (\<lambda>x. \<Squnion>f x)"

Output:
apply(rule contI)
apply(simp add: contD[OF assms])
apply(blast intro: Sup_least Sup_upper order_trans antisym) done


Input:
lemma sim_action_refl [intro!, simp]:
  "obs \<approx> obs"

Output:
apply(cases obs)
apply(rename_tac obs')
apply(case_tac "obs'")
apply(auto intro: sim_action.intros) done


Input: lemma comm_monoid: "comm_monoid R"

Output:
unfolding R_def residue_ring_def
apply (rule comm_monoidI)
using m_gt_one
apply auto
apply (metis mod_mult_right_eq mult.assoc mult.commute)
apply (metis mult.commute) done


Input:
lemma tso_round0_refines:
  "{tso_ref_rel} Id, tso_round0 r S v {>tso_ref_rel}"

Output:
apply(rule rhoare_skipI)
apply(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


Input:
lemma bl_bin_2[simp]:
  "bl_bin (<aa # list>) + (4 * rs + 4) * 2 ^ (length (<aa # list>) - Suc 0)
  = bl_bin (Oc\<up>(Suc aa) @ Bk # <list @ [0]>) + rs * (2 * 2 ^ (aa + length (<list @ [0]>)))"

Output:
apply(case_tac "list", simp add: add_mult_distrib)
apply(simp add: tape_of_nl_cons_app2 add_mult_distrib)
apply(simp add: tape_of_list_def) done


Input: lemma is_processT8_Pair: "fst s \<in> D P \<Longrightarrow> s \<in> F P"

Output:
apply(subst surjective_pairing)
apply(rule is_processT8_S, simp) done


Input: lemma local_flow_pend: "local_flow f UNIV UNIV \<phi>"

Output:
apply(unfold_locales, simp_all add: local_lipschitz_def lipschitz_on_def vec_eq_iff, clarsimp)
apply(rule_tac x="1" in exI, clarsimp, rule_tac x=1 in exI)
apply(simp add: dist_norm norm_vec_def L2_set_def power2_commute UNIV_2)
by (auto simp: forall_2 intro!: poly_derivatives)


Input: lemma Safety: "system \<in> stable Safety"

Output:
apply (unfold Safety_def)
apply (rule stable_INT)
apply (simp add: system_def, safety, fast) done


Input:
lemma l3_inv3_init [iff]:
  "init l3 \<subseteq> l3_inv3"

Output:
apply (auto simp add: l3_def l3_init_def intro!: l3_inv3I)
apply (auto simp add: ik_init_def intro!: synth_increasing [THEN [2] rev_subsetD]) done


Input:
lemma le_shiftr:
  "u \<le> v \<Longrightarrow> u >> (n :: nat) \<le> (v :: 'a :: len word) >> n"

Output:
apply (unfold shiftr_def)
apply (induct_tac "n")
apply auto
apply (erule le_shiftr1) done


Input: lemma (in aGroup) asubg_subset:"A +> H \<Longrightarrow> H \<subseteq> carrier A"

Output:
apply (simp add:asubGroup_def)
apply (simp add:sg_def, (erule conjE)+)
apply (simp add:ag_carrier_carrier) done


Input:
lemma i_Exec_Stream_Equal_State: "
  \<lbrakk> Exec_Equal_State localState trans_fun;
    localState c1 = localState c2 \<rbrakk> \<Longrightarrow>
  i_Exec_Comp_Stream trans_fun input c1 =
  i_Exec_Comp_Stream trans_fun input c2"

Output:
apply (clarsimp simp: ilist_eq_iff i_Exec_Stream_nth)
apply (rule f_Exec_Equal_State)
apply simp+ done


Input: lemma field_class: "field (cring_class_ops::'a::field ring)"

Output:
apply unfold_locales
apply (simp_all add: cring_class_ops_def)
apply (auto simp add: Units_def)
apply (rule_tac x="1 / x" in exI)
apply simp done


Input:
lemma extend_guar_increasing:
     "[| F \<in> UNIV guarantees increasing func;
         subset_closed (AllowedActs F) |]
      ==> extend h F \<in> X' guarantees increasing (func o f)"

Output:
apply (erule project_guarantees)
apply (rule_tac [3] extending_increasing)
apply (rule_tac [2] projecting_UNIV, auto) done


Input: lemma Nset2_prep1:"\<lbrakk>finite A; card A = Suc (Suc n) \<rbrakk> \<Longrightarrow> \<exists>x. x\<in>A"

Output:
apply (frule card_nonzero[of "A"])
apply simp
apply (simp add:nonempty_ex) done


Input: lemma N1_enabled_at_b: "\<turnstile> pc1 = #b \<longrightarrow> Enabled (<N1>_(x,y,sem,pc1,pc2))"

Output:
apply clarsimp
apply (rule_tac F = beta1 in enabled_mono)
apply (enabled Inc_base)
apply (force simp: beta1_def)
apply (force simp: angle_def beta1_def N1_def) done


Input:
lemma vecspace_cpx_vec [simp]:
  "vectorspace cpx_rng (module_cpx_vec n)"

Output:
apply unfold_locales
apply (auto simp: cpx_rng_def module_cpx_vec_def module_vec_def Units_def field_simps)
apply (auto intro: right_inverse add_inv_exists_vec)
by (metis add.right_neutral add_diff_cancel_left' add_uminus_conv_diff)


Input: lemma finite_closed_segment [simp]: "finite(closed_segment a b) \<longleftrightarrow> a = b"

Output:
apply auto
apply (rule ccontr)
apply (simp add: segment_image_interval)
using infinite_Icc [OF zero_less_one] finite_imageD [OF _ inj_segment]
apply blast done


Input:
lemma obj_fields_marked_good_ref_subseteq_hp_IdleMarkSweep_locs:
  "obj_fields_marked_good_ref_locs \<subseteq> 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
apply (clarsimp simp: loc_defs)
apply (drule mp)
apply (auto intro: append_prefixD) done


Input: lemma HUnion_iff [iff]: "hmem x (\<Squnion> A) \<longleftrightarrow> (\<exists>y. y \<^bold>\<in> A \<and> x \<^bold>\<in> y)"

Output:
apply (insert union_of_set [of A], clarify)
apply (simp add: HUnion_def)
apply (rule theI2)
apply (auto simp: hf_ext) done


Input:
lemma equiv_induced_by_injS:"\<lbrakk>Order D; Order E; ord_inj D E f;
      D1 \<subseteq> carrier D\<rbrakk> \<Longrightarrow>  ord_equiv (SIod D D1) (SIod E (f ` D1))"

Output:
apply (simp add:ord_equiv_def)
apply (frule ord_inj_Srestrict_isom[of D E f D1], assumption+)
apply blast done


Input:
lemma field_val [simp]:
  "field E list_name val_name = (list_name, Integer)"

Output:
apply (insert class_list)
apply (unfold list_class_def)
apply (fastforce simp add: sees_field_def distinct_classes intro: field_def2 Fields.intros) done


Input:
lemma (in Repoint_impl) Repoint_modifies:
  shows "\<forall>\<sigma>. \<Gamma>\<turnstile>{\<sigma>} \<acute>p :==  PROC Repoint (\<acute>p)
        {t. t may_only_modify_globals \<sigma> in [low,high]}"

Output:
apply (hoare_rule HoarePartial.ProcRec1)
apply (vcg spec=modifies) done


Input: lemma oZero_least: "oZero \<le> x"

Output:
apply (unfold oZero_def, cases x, clarsimp)
apply (induct_tac z, simp, atomize)
apply (rule ord0_less_imp_le)
apply (rule ord0_le_less_trans)
apply (auto simp: less_ord0_LimI) done


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
apply(auto simp add: l_get_shadow_root_safe_def)[1] done


Input: lemma addition_inc_add0:" A \<subseteq> addition_set f A"

Output:
apply (rule subsetI)
apply (insert addition_inc_add [of "f" "A" "0"])
apply simp
apply (simp add:subsetD) done


Input:
lemma fix_eqvt[eqvt]:
  "\<pi> \<bullet> fix = (fix :: ('a \<rightarrow> 'a) \<rightarrow> 'a::{cont_pt,pcpo})"

Output:
apply (rule cfun_eqI)
apply (subst permute_cfun_def)
apply simp
apply (rule parallel_fix_ind[OF adm_subst2])
apply (auto simp add: permute_self) done


Input: lemma primerec_rec_not_1[intro]: "primerec rec_not (Suc 0)"

Output:
apply(simp add: rec_not_def)
apply(rule prime_cn, auto dest!:less_2_cases[unfolded numeral One_nat_def]) done


Input:
lemma recognises_from_2:
  "recognises_execution drinks 1 <1 $:= d, 2 $:= Some (Num 100)> [(STR ''vend'', [])]"

Output:
apply (rule recognises_execution.step)
apply (rule_tac x="(2, vend)" in fBexI)
apply simp
by (simp add: possible_steps_2_vend)


Input: lemma restrict_dom_same [simp]: "m|\<^bsub>dom m\<^esub> = m"

Output:
apply (rule ext)
apply (clarsimp simp add: restrict_map_def)
apply (simp only: not_None_eq [symmetric])
apply rule
apply (drule sym)
apply blast done


Input:
lemma dither_halts:
  shows "{dither_halt_inv} dither {dither_halt_inv}"

Output:
apply(rule Hoare_haltI)
using dither_halts_aux
apply(auto simp add: tape_of_nat_def)
by (metis (lifting, mono_tags) holds_for.simps is_final_eq)


Input: lemma less_oSuc_eq_le: "(x < oSuc y) = (x \<le> y)"

Output:
apply (rule iffI)
apply (erule contrapos_pp, simp add: linorder_not_less linorder_not_le)
apply (erule oSuc_leI)
apply (erule order_le_less_trans[OF _ less_oSuc]) done


Input: lemma ThrowRule: "P \<subseteq> A \<Longrightarrow> \<Gamma>, \<Theta> \<turnstile>\<^bsub>/F\<^esub> (AnnExpr P) Throw Q, A"

Output:
apply (rule Conseq, simp)
apply (rule exI, rule exI, rule exI)
apply (rule conjI, rule Throw, auto) done


Input: lemma checkNet2_correct: "checkNet2 c s t \<le> 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
apply (refine_rcg)
apply refine_dref_type
apply auto done


Input: lemma (in normal_set) mem_next: "(LEAST z. z \<in> A \<and> x < z) \<in> A"

Output:
apply (rule LeastI2_ex)
apply (fold Bex_def, rule unbounded)
apply (erule conjunct1) done


Input:
lemma skl1_inv5_trans [iff]:
  "{skl1_inv5} trans skl1 {> skl1_inv5}"

Output:
apply (auto simp add: PO_hoare_defs intro!: skl1_inv5I)
apply (drule can_signal_trans, assumption)
apply (auto simp add: skl1_nostep_defs)
apply (auto simp add: skl1_defs ik_dy_def dest: skl1_inv5D) done


Input:
lemma WT_fv: "P,E \<turnstile> e :: T \<Longrightarrow> fv e \<subseteq> dom E"
and "P,E \<turnstile> es [::] Ts \<Longrightarrow> fvs es \<subseteq> dom E"

Output:
apply(induct rule:WT_WTs.inducts)
apply(simp_all del: fun_upd_apply)
apply fast+ done


Input: lemma edka_partial_refine[refine]: "edka_partial \<le> \<Down>Id fofu"

Output:
unfolding edka_partial_def fofu_def
apply (refine_rcg bind_refine')
apply (refine_dref_type)
apply (vc_solve simp: find_shortest_augmenting_spec_def) done


Input: lemma ntrunc_one_In1 [simp]: "ntrunc (Suc 0) (In1 M) = {}"

Output:
apply (simp add: In1_def)
apply (simp add: Scons_def) done


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]
apply(rule preciseI)
apply(simp split: prod.splits)
using preciseD snga_prec
by fastforce


Input: lemma IV: "Mutex \<in> Always IV"

Output:
apply (rule AlwaysI, force)
apply (unfold Mutex_def, safety) done


Input: theorem HuntSands33: "(p,G,c,H):HS \<Longrightarrow> secure p G c H"

Output:
apply (simp add: secure_def, clarsimp)
apply (drule Theorem4, clarsimp)
apply (rule Prop4A)
apply (rule VDM_Sound_emptyCtxt)
apply fast done


Input: lemma wf_subcls1_E: "wf ((subcls1 E)\<inverse>)"

Output:
apply (rule finite_acyclic_wf_converse)
apply (simp add: subcls1 del: insert_iff)
apply (rule acyclic_subcls1_E) done


Input: lemma Highest_escapes_above: "system \<in> Highest i leadsTo (\<Inter>k. {s. i\<notin>above k s})"

Output:
apply (rule leadsTo_weaken_R)
apply (rule_tac [2] Lowest_above_subset)
apply (rule Highest_leadsTo_Lowest) done


Input:
lemma nd_fun_distr[nd_fun_ka]: "(x + y) \<cdot> z = x \<cdot> z + y \<cdot> z"
  and nd_fun_distl[nd_fun_ka]: "x \<cdot> (y + z) = x \<cdot> y + x \<cdot> z" for x::"'a nd_fun"

Output:
unfolding plus_nd_fun_def times_nd_fun_def
by (simp_all add: kcomp_distr kcomp_distl)


Input: lemma star_test_folk: "test p \<Longrightarrow> p \<cdot> x = x \<cdot> p \<longrightarrow> p \<cdot> y = y \<cdot> p \<longrightarrow> (p \<cdot> x + !p \<cdot> y)\<^sup>\<star> \<cdot> p = p \<cdot> (p \<cdot> x)\<^sup>\<star>"

Output:
using star_n_folk
by auto


Input:
lemma runErrorT_bindET [simp]:
  "runErrorT\<cdot>(bindET\<cdot>m\<cdot>k) = bind\<cdot>(runErrorT\<cdot>m)\<cdot>
    (\<Lambda> n. case n of Err\<cdot>e \<Rightarrow> return\<cdot>(Err\<cdot>e) | Ok\<cdot>x \<Rightarrow> runErrorT\<cdot>(k\<cdot>x))"

Output:
unfolding bindET_def
by simp


Input: lemma mult_zero_right [simp]: "a \<cdot> 0 = (0::'a)"

Output:
proof - have "a \<cdot> 0 = a \<cdot> (0 - (0::'a))"
by simp also have "\<dots> = a \<cdot> 0 - a \<cdot> 0"
by (rule diff_mult_distrib1) simp_all also have "\<dots> = 0"
by simp finally show ?thesis .
qed


Input:
lemma phl_test_while:
  assumes "test p" and "test b"
  and "\<lbrace>p \<cdot> b\<rbrace> x \<lbrace>p\<rbrace>"
  shows "\<lbrace>p\<rbrace> (b \<cdot> x)\<^sup>\<star> \<cdot> !b \<lbrace>p \<cdot> !b\<rbrace>"

Output: by (metis assms phl_n_while test_double_comp_var)


Input:
lemma slength_0_conv[simp]:
  "(slength\<cdot>xs = 0) \<longleftrightarrow> (xs = [::])"
  "(slength\<cdot>xs = MkI\<cdot>0) \<longleftrightarrow> (xs = [::])"
  "eq\<cdot>0\<cdot>(slength\<cdot>xs) = sNone\<cdot>xs"
  "eq\<cdot>(slength\<cdot>xs)\<cdot>0 = sNone\<cdot>xs"

Output: by (induct xs) (auto simp: one_Integer_def elim: slengthE)


Input:
lemma compare_EQ_iff_eq_TT:
  "compare\<cdot>x\<cdot>y = EQ \<longleftrightarrow> eq\<cdot>x\<cdot>y = TT"

Output: by (cases "compare\<cdot>x\<cdot>y") (simp add: is_EQ_def eq_conv_compare)+


Input: lemma carrier_Fheap':"carrier (Theap \<Gamma> e\<cdot>a) = edom (Aheap \<Gamma> e\<cdot>a)"

Output:
unfolding Theap_simp carrier_ccTTree
by simp


Input:
lemma runStateT_bindU [simp]:
  "runStateT\<cdot>(bindU\<cdot>m\<cdot>k)\<cdot>s = runStateT\<cdot>m\<cdot>s \<bind> (\<Lambda> (x, s'). runStateT\<cdot>(k\<cdot>x)\<cdot>s')"

Output:
unfolding bindU_stateT_def
by simp


Input:
lemma conjugate_eq_aux:
  "is_conjugation f g \<Longrightarrow> f (x \<cdot> -g y) \<le> f x \<cdot> -y"

Output: by (metis f_subdist galois_aux le_inf_iff modular_1_aux)


Input: lemma wagner_2_var: "x \<cdot> (y \<cdot> x)\<^sup>\<omega> \<le> (x \<cdot> y)\<^sup>\<omega>"

Output:
proof - have "x \<cdot> y \<cdot> x \<le> x \<cdot> y \<cdot> x"
by auto thus "x \<cdot> (y \<cdot> x)\<^sup>\<omega> \<le> (x \<cdot> y)\<^sup>\<omega>"
by (simp add: mult_assoc omega_simulation)
qed


Input: lemma "R \<cdot> (S \<union> T) = R \<cdot> S \<union> R \<cdot> T"

Output: apply (auto simp: s_prod_im) nitpick oops


Input: lemma meet_interchange: "(w \<cdot> x) ; (y \<cdot> z) \<le> w ; y \<cdot> x ; z"

Output: by (metis inf_le1 inf_le2 le_infI mult_isol_var)


Input: lemma n_dist_var2: "n (n x \<cdot> n y \<oplus> t x \<cdot> n z) = n x \<cdot> t y \<oplus> t x \<cdot> t z"

Output: by (metis (no_types) n_add_op_def n_dist_var1 n_t_closed)


Input: lemma "matches\<cdot>[::]\<cdot>[:10::Integer, 20, 30:] = [:0, 1, 2, 3:]"

Output:
unfolding matches.unfold endswith.unfold
by simp


Input:
lemma
  fixes t :: "['a::Eq_sym]"
  shows "eq\<cdot>(take\<cdot>(length\<cdot>t)\<cdot>s)\<cdot>t \<sqsubseteq> isPrefixOf\<cdot>t\<cdot>s"

Output: by (subst eq_sym) (rule eq_take_length_isPrefixOf)


Input:
lemma unstream_concatMapS:
  "unstream\<cdot>(concatMapS\<cdot>f\<cdot>a) = concatMapL\<cdot>(unstream oo f)\<cdot>(unstream\<cdot>a)"

Output: by (cases a, simp, simp add: unfold_concatMapStep)


Input: lemma  sup_distl: "x \<cdot> (y \<squnion> z) = (x \<cdot> y) \<squnion> (x \<cdot> z)"

Output:
using weak_Sup_distl[where Y="{y, z}"]
by (fastforce intro!: Sup_eqI)


Input:
lemma eq_tr_simps [simp]:
  shows "eq\<cdot>TT\<cdot>TT = TT" and "eq\<cdot>TT\<cdot>FF = FF"
    and "eq\<cdot>FF\<cdot>TT = FF" and "eq\<cdot>FF\<cdot>FF = TT"

Output:
unfolding TT_def FF_def eq_lift_def
by simp_all


Input: lemma conjugation_prop1: "is_conjugation f g \<Longrightarrow> f y \<cdot> z \<le> f (y \<cdot> g z)"

Output: by (metis le_infE modular_1 order_refl)


Input: lemma fac_work_final_body3_eq: "fac_work_final = wrapA\<cdot>(fix\<cdot>fac_acc_body3)"

Output:
unfolding fac_work_final_def
by (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)


Input: lemma conv_self_conjugate: "x\<^sup>\<smile> \<cdot> y = 0 \<longleftrightarrow> x \<cdot> y\<^sup>\<smile> = 0"

Output: by (metis conv_invol conv_times conv_zero)


Input: lemma S4: "x\<cdot>(y\<cdot>z) \<cong> (x\<cdot>y)\<cdot>z"

Output: by (metis C\<^sub>0s C\<^sub>1s C\<^sub>1's C\<^sub>2s)


Input: lemma distr: "(x \<squnion> y) \<cdot> z = x \<cdot> z \<squnion> y \<cdot> z"

Output: by (metis local.residuated_multl local.residuated_sup)


Input: lemma assoc_p_subid: "(x \<cdot> y) \<cdot> (z \<cdot> 1\<^sub>\<pi>) = x \<cdot> (y \<cdot> (z \<cdot> 1\<^sub>\<pi>))"

Output: by (metis c_0 local.c6 local.cl5 local.inf.absorb_iff1)


Input: lemma test_kat_prop: "test p \<Longrightarrow> test q  \<Longrightarrow>  p \<cdot> x = p \<cdot> x \<cdot> q  \<longleftrightarrow> x \<cdot> !q = !p \<cdot> x \<cdot> !q"

Output: by (metis local.annir local.test1_var local.test_comp_mult2 local.test_eq4 mult_assoc)


Input: lemma kat_3': "d x \<cdot> y \<cdot> ad z = 0 \<Longrightarrow> d x \<cdot> y = d x \<cdot> y \<cdot> d z"

Output: by (metis dm.dom_one local.am5 local.mult_1_left a_zero_def am_d_def)


Input: lemma sfilter_sappend[simp]: "sfilter\<cdot>p\<cdot>(xs :@ ys) = sfilter\<cdot>p\<cdot>xs :@ sfilter\<cdot>p\<cdot>ys"

Output: by (cases "ys"; clarsimp) (induct xs; fastforce simp: If2_def[symmetric] split: If2_splits)


Input: lemma d_restrict_iff_1: "(d x \<cdot> y \<le> z) \<longleftrightarrow> (d x \<cdot> y \<le> d x \<cdot> z)"

Output: by (metis dom_subid_aux2 domain_1'' domain_invol dsg1 mult_isol_var order_trans)


Input: lemma stake_all_triv[simp]: "stake\<cdot>(slength\<cdot>xs)\<cdot>xs = xs"

Output: by (cases "xs = \<bottom>") (auto simp: stake_all)


Input:
lemma sset_smap[simp]:
  assumes "\<And>x. x \<in> sset xs \<Longrightarrow> f\<cdot>x \<noteq> \<bottom>"
  shows "sset (smap\<cdot>f\<cdot>xs) = { f\<cdot>x | x. x \<in> sset xs }"

Output:
using assms
by (induct xs) auto


Input: lemma "\<not> fix\<cdot>(unwrap oo body oo wrap) \<sqsubseteq> fix\<cdot>body'"

Output:
proof - have l: "fix\<cdot>(unwrap oo body oo wrap) = B\<cdot>A"
by (subst fix_eq) simp have r: "fix\<cdot>body' = \<bottom>"
by (simp add: fix_strict) from l r show ?thesis
by simp
qed


Input: lemma iteration_unfoldr_distl [simp]: " y + y \<cdot> x\<^sup>\<infinity> \<cdot> x = y \<cdot> x\<^sup>\<infinity>"

Output: by (metis distrib_left mult.assoc mult_oner iteration_unfoldr)


Input: lemma conv_contrav': "1 \<lhd> x\<cdot>y = (1 \<lhd> y)\<cdot>(1 \<lhd> x)"

Output: by (metis local.conv_contrav local.conv_invol local.jonsson3c)


Input:
lemma alw_mp:
assumes "alw \<phi> xs" and "alw (\<phi> impl \<psi>) xs"
shows "alw \<psi> xs"

Output:
proof- { assume "alw \<phi> xs \<and> alw (\<phi> impl \<psi>) xs" hence ?thesis
by coinduct auto } thus ?thesis
using assms
by auto
qed


Input:
lemma SPEC_rule_conj_leofI1:
    assumes "m \<le> SPEC \<Phi>"
    assumes "m \<le>\<^sub>n SPEC \<Psi>"
    shows "m \<le> SPEC (\<lambda>s. \<Phi> s \<and> \<Psi> s)"

Output:
using assms
by (auto simp: pw_le_iff pw_leof_iff)


Input:
theorem goedel_first_strong_ex:
"\<omega>consistent \<Longrightarrow> \<exists> \<phi>. \<phi> \<in> fmla \<and> \<not> prv \<phi> \<and> \<not> prv (neg \<phi>) \<and> isTrue \<phi>"

Output:
using goedel_first_strong
by (intro exI[of _ \<phi>G]) blast


Input:
lemma af_\<mu>LTL:
  "\<phi> \<in> \<mu>LTL \<Longrightarrow> w \<Turnstile>\<^sub>n \<phi> \<longleftrightarrow> (\<exists>i. af \<phi> (prefix i w) \<sim> True\<^sub>n)"

Output:
using valid_prefix_implies_ltl \<mu>LTL_implies_valid_prefix
by blast


Input:
lemma sas_plus_problem_has_serial_solution_iff_i':
  assumes "is_valid_problem_sas_plus \<Psi>"
    and "\<A> \<Turnstile> \<Phi>\<^sub>\<forall> (\<phi> (prob_with_noop \<Psi>)) t"
  shows "SAS_Plus_Semantics.is_serial_solution_for_problem \<Psi>
           (rem_noops
                   (map (\<lambda>op. \<phi>\<^sub>O\<inverse> (prob_with_noop \<Psi>) op)
                        (concat (\<Phi>\<inverse> (\<phi> (prob_with_noop \<Psi>)) \<A> t))))"

Output:
using assms noops_valid
by(force intro!: noops_sound sas_plus_problem_has_serial_solution_iff_i)


Input:
lemma
  neg[simp]: "\<And>\<phi>. \<phi> \<in> fmla \<Longrightarrow> neg \<phi> \<in> fmla"
  and
  Fvars_neg[simp]: "\<And>\<phi>. \<phi> \<in> fmla \<Longrightarrow> Fvars (neg \<phi>) = Fvars \<phi>"
  and
  subst_neg[simp]:
  "\<And>\<phi> t x. \<phi> \<in> fmla \<Longrightarrow> t \<in> trm \<Longrightarrow> x \<in> var \<Longrightarrow>
  subst (neg \<phi>) t x = neg (subst \<phi> t x)"

Output:
unfolding neg_def
by auto


Input: lemma fbb_ifbb_galois: "Inf_pres \<phi> \<Longrightarrow> (\<phi> = bb\<^sub>\<F> f) = (f = bb\<^sup>-\<^sub>\<F> \<phi>)"

Output:
unfolding fbb_def iffb_def
by (metis (no_types, lifting) comp_apply ffb_iffb_galois ifbb_ifbd_demorgan iffb_ifbd_dual kop_galois)


Input:
lemma \<F>\<G>_semantics:
  "\<F>\<G> \<phi> w = {\<psi> \<in> subformulas\<^sub>\<nu> \<phi>. w \<Turnstile>\<^sub>n F\<^sub>n (G\<^sub>n \<psi>)}"

Output: by (induction \<phi>) force+


Input:
lemma prv_eql_subst_trm3:
"x \<in> var \<Longrightarrow> \<phi> \<in> fmla \<Longrightarrow> t1 \<in> trm \<Longrightarrow> t2 \<in> trm \<Longrightarrow>
prv (eql t1 t2) \<Longrightarrow> prv (subst \<phi> t1 x) \<Longrightarrow> prv (subst \<phi> t2 x)"

Output:
using prv_eql_subst_trm2
by (meson subst prv_imp_mp)


Input:
lemma RETURN_ref_SPECD:
  assumes "RETURN c \<le> \<Down>R (SPEC \<Phi>)"
  obtains a where "(c,a)\<in>R" "\<Phi> a"

Output:
using assms
by (auto simp: pw_le_iff refine_pw_simps)


Input:
lemma nprv_ballE:
"nprv F (ball x t \<phi>) \<Longrightarrow> nprv F (LLq t1 t) \<Longrightarrow> nprv (insert (subst \<phi> t1 x) F) \<psi> \<Longrightarrow>
 F \<subseteq> fmla \<Longrightarrow> finite F \<Longrightarrow> \<phi> \<in> fmla \<Longrightarrow> t \<in> atrm \<Longrightarrow> t1 \<in> atrm \<Longrightarrow> x \<in> var \<Longrightarrow> \<psi> \<in> fmla \<Longrightarrow>
 x \<notin> FvarsT t \<Longrightarrow>
 nprv F \<psi>"

Output: by (meson atrm_trm local.subst nprv_ballE_aux nprv_cut rev_subsetD)


Input: lemma HBL1_iff: "\<phi> \<in> fmla \<Longrightarrow> Fvars \<phi> = {} \<Longrightarrow> bprv (PP \<langle>\<phi>\<rangle>) \<longleftrightarrow> prv \<phi>"

Output:
using HBL1 HBL1_rev unfolding PP_def
by auto


Input:
lemma GF_advice_restricted_subformulas:
  "restricted_subformulas (\<phi>[X]\<^sub>\<nu>) = {}"

Output: by (induction \<phi>) (simp_all add: GF_advice_restricted_subformulas_inner)


Input:
lemma GF_advice_subst:
  "\<phi>[X]\<^sub>\<nu> = subst \<phi> (\<lambda>\<psi>. Some (\<psi>[X]\<^sub>\<nu>))"

Output: by (induction \<phi>) auto


Input:
lemma \<phi>J[simp]:
assumes "\<psi> \<in> fmla" and "Fvars \<psi> = {inp}"
shows "\<phi>J \<psi> \<in> fmla"

Output:
unfolding \<phi>J_def
using assms
by (intro instInpP_fmla) auto


Input:
lemma af_letter_lang_congruent:
  "\<phi> \<sim>\<^sub>L \<psi> \<Longrightarrow> af_letter \<phi> \<nu> \<sim>\<^sub>L af_letter \<psi> \<nu>"

Output:
unfolding ltl_lang_equiv_def
using af_letter_build
by blast


Input:
theorem Tarski_semantic:
assumes 0: "T \<in> fmla" "Fvars T = {xx}"
and 1: "\<And>\<phi>. \<phi> \<in> fmla \<Longrightarrow> Fvars \<phi> = {} \<Longrightarrow> isTrue (eqv (subst T \<langle>\<phi>\<rangle> xx) \<phi>)"
shows "\<not> consistent"

Output:
using assms prv_eq_isTrue[of "eqv (subst T \<langle>_\<rangle> xx) _"]
by (intro Tarski_proof_theoretic[OF 0]) auto


Input: lemma "iADDI(\<phi>) \<Longrightarrow> supremum_closed (fp \<phi>)"

Output: by (metis (full_types) Ra_restr_ex iADDI_def supremum_def)


Input:
lemma ltl_implies_satisfiable_prefix:
  "w \<Turnstile>\<^sub>n \<phi> \<Longrightarrow> \<not> (af \<phi> (prefix i w) \<sim> False\<^sub>n)"

Output:
using ltl_implies_satisfiable_prefix eq_implies_lang
by blast


Input:
lemma nprv_bexiI:
"nprv F (subst \<phi> t1 x) \<Longrightarrow> nprv F (LLq t1 t) \<Longrightarrow>
 F \<subseteq> fmla \<Longrightarrow> finite F \<Longrightarrow> \<phi> \<in> fmla \<Longrightarrow> t \<in> atrm \<Longrightarrow> t1 \<in> atrm \<Longrightarrow> x \<in> var \<Longrightarrow>
 x \<notin> FvarsT t \<Longrightarrow>
 nprv F (bexi x t \<phi>)"

Output:
unfolding bexi_def
by (nprover2 r1: nprv_exiI[of _ _ t1] r2: nprv_cnjI)


Input: lemma convert_multiway_remove_neg: "safe_formula (remove_neg \<phi>) \<Longrightarrow> convert_multiway (remove_neg \<phi>) = remove_neg (convert_multiway \<phi>)"

Output: by (cases \<phi>) (auto elim: case_NegE)


Input:
lemma prv_imp_triv:
assumes phi: "\<phi> \<in> fmla" and psi: "\<psi> \<in> fmla"
shows "prv \<psi> \<Longrightarrow> prv (imp \<phi> \<psi>)"

Output: by (meson prv_imp_imp_triv prv_imp_mp imp phi psi)


Input:
lemma consistent_not_prv_not_prv_PPf:
assumes c: consistent
and 0[simp]: "\<phi> \<in> fmla" "Fvars \<phi> = {}" "\<not> prv \<phi>" "n \<in> num"
shows "\<not> bprv (PPf n \<langle>\<phi>\<rangle>)"

Output:
using not_prv_prv_neg_PPf[OF 0] c[THEN dwf_dwfd.consistent_B_consistent] unfolding B.consistent_def3
by auto


Input: lemma wf_rexp_of: "wf_formula n \<phi> \<Longrightarrow> wf n (rexp_of n \<phi>)"

Output: by (induct \<phi> arbitrary: n) (auto intro: wf_rexp_ENC simp: finite_FOV max_idx_vars)


Input:
lemma nfv_simps[simp]:
  "nfv (Let p \<phi> \<psi>) = nfv \<psi>"
  "nfv (Neg \<phi>) = nfv \<phi>"
  "nfv (Or \<phi> \<psi>) = max (nfv \<phi>) (nfv \<psi>)"
  "nfv (And \<phi> \<psi>) = max (nfv \<phi>) (nfv \<psi>)"
  "nfv (Prev I \<phi>) = nfv \<phi>"
  "nfv (Next I \<phi>) = nfv \<phi>"
  "nfv (Since \<phi> I \<psi>) = max (nfv \<phi>) (nfv \<psi>)"
  "nfv (Until \<phi> I \<psi>) = max (nfv \<phi>) (nfv \<psi>)"
  "nfv (MatchP I r) = Regex.nfv_regex fv r"
  "nfv (MatchF I r) = Regex.nfv_regex fv r"
  "nfv_regex (Regex.Skip n) = 0"
  "nfv_regex (Regex.Test \<phi>) = Max (insert 0 (Suc ` fv \<phi>))"
  "nfv_regex (Regex.Plus r s) = max (nfv_regex r) (nfv_regex s)"
  "nfv_regex (Regex.Times r s) = max (nfv_regex r) (nfv_regex s)"
  "nfv_regex (Regex.Star r) = nfv_regex r"

Output:
unfolding nfv_def Regex.nfv_regex_def
by (simp_all add: image_Un Max_Un[symmetric])


Input:
lemma prv_rawpsubst:
  assumes "\<phi> \<in> fmla" and "snd ` (set txs) \<subseteq> var" and "fst ` (set txs) \<subseteq> trm"
    and "prv \<phi>"
  shows "prv (rawpsubst \<phi> txs)"

Output:
using assms
apply (induct txs arbitrary: \<phi>) subgoal
by auto subgoal for tx txs \<phi>
by (cases tx) (auto intro: prv_subst) .


Input:
lemma create_name_gba_aimpl_refine:
  "create_name_gba_aimpl \<phi> \<le> \<Down>Id (create_name_gba \<phi>)"

Output:
unfolding create_name_gba_aimpl_def create_name_gba_alt
apply (refine_rcg create_graph_aimpl_refine cr_rename_gba_refine)
by auto


Input: lemma PI8: "Int_1a \<phi> \<Longrightarrow> Int_2 \<phi> \<Longrightarrow> Int_4 \<phi> \<Longrightarrow> Int_8 \<phi>"

Output:
using ADDI_b_def IDEM_def Int_8_def MONO_ADDIb MONO_MULTa dEXP_def join_def
by auto


Input: lemma PI9: "Int_1a \<phi> \<Longrightarrow> Int_4 \<phi> \<Longrightarrow> Int_9 \<phi>"

Output:
using IDEM_def Int_9_def MONO_def MONO_MULTa
by simp


Input:
lemma ltl_prop_equiv_subst_S:
  "S \<Turnstile>\<^sub>P subst \<phi> m = ((S - dom m) \<union> {\<chi> | \<chi> \<chi>'. \<chi> \<in> dom m \<and> m \<chi> = Some \<chi>' \<and> S \<Turnstile>\<^sub>P \<chi>'}) \<Turnstile>\<^sub>P \<phi>"

Output: by (induction \<phi>) (auto split: option.split)


Input:
lemma af_lifted_range:
  "range (\<up>af (Abs \<phi>)) \<subseteq> {Abs \<psi> | \<psi>. nested_prop_atoms \<psi> \<subseteq> nested_prop_atoms \<phi>}"

Output:
using af_lifted_semantics af_nested_prop_atoms
by blast


Input: lemma CI5:  "Cl_5 \<phi>  \<Longrightarrow> Int_5 \<phi>\<^sup>d"

Output:
unfolding dNOR_def NOR_def dual_def conn
by simp


Input: lemma flip_subst_fmla: "atom y \<sharp> \<phi> \<Longrightarrow> (x \<leftrightarrow> y) \<bullet> \<phi> = \<phi>(x::=Var y)"

Output:
apply(nominal_induct \<phi> avoiding: x y rule: fmla.strong_induct)
apply (auto simp: flip_subst_trm)
using fresh_at_base(2)
by blast


Input:
lemma NN_unique:
  assumes "\<phi> \<in> fmla" "Fvars \<phi> = {}"
  shows "bprv (all yy (all yy'
    (imp (cnj (NN \<langle>\<phi>\<rangle> (Var yy)) (NN \<langle>\<phi>\<rangle> (Var yy')))
         (eql (Var yy) (Var yy')))))"

Output:
using assms N_unique unfolding Let_def NN_def
by meson


Input: lemma progress_remove_neg[simp]: "progress \<sigma> P (remove_neg \<phi>) j = progress \<sigma> P \<phi> j"

Output: by (cases \<phi>) simp_all


Input:
lemma nf_ACI_juncts:
  "\<lbrakk>\<psi> \<in> disjuncts \<phi>; nf_ACI \<phi>\<rbrakk> \<Longrightarrow> nf_ACI \<psi>"
  "\<lbrakk>\<psi> \<in> conjuncts \<phi>; nf_ACI \<phi>\<rbrakk> \<Longrightarrow> nf_ACI \<psi>"

Output: by (induct \<phi>) auto


Input: lemma lformula_nFAND: "lformula (nFAND \<phi>s) = (\<forall>\<phi> \<in> set \<phi>s. lformula \<phi>)"

Output: by (induct \<phi>s rule: nFAND.induct) auto


Input:
lemma af_const_congruent:
  "\<phi> \<sim>\<^sub>C \<psi> \<Longrightarrow> af \<phi> w \<sim>\<^sub>C af \<psi> w"

Output: by (induction w arbitrary: \<phi> \<psi>) (insert af_letter_const_congruent, fastforce+)


Input:
lemma satisfies_bounded_fold_rderiv:
  "\<lbrakk>wf idx \<phi>; #\<^sub>V \<AA> = idx; size x = idx\<rbrakk> \<Longrightarrow>
     \<AA> \<Turnstile>\<^sub>b fold rderiv (replicate k x) \<phi> \<longleftrightarrow> (SNOC x^^k) \<AA> \<Turnstile>\<^sub>b \<phi>"

Output: by (induct k arbitrary: \<AA> \<phi>) (auto simp: satisfies_bounded_rderiv wf_rderiv nvars_SNOCs)


Input: lemma fold_graph_OR: "finite \<Phi> \<Longrightarrow> fold_graph Or_ltlp False_ltlp \<Phi> (OR \<Phi>)"

Output:
unfolding OR_def
by (rule someI2_ex[OF finite_imp_fold_graph])


Input:
lemma fold_deriv_FNot:
  "fold (deriv d0) xs (FNot \<phi>) = FNot (fold (deriv d0) xs \<phi>)"

Output: by (induct xs arbitrary: \<phi>) auto


Input: lemma val_imp_close_world: "valuation M \<Turnstile> \<phi> \<Longrightarrow> M \<^sup>c\<TTurnstile>\<^sub>= \<phi>"

Output:
unfolding entailment_def
using valuation_aux_1
by blast


Input:
lemma satPB_gPB[simp]:
assumes "Ik.wtE \<xi>" and "GE.satPB \<xi> (gC ` \<Phi>)"
shows "Ik.satPB \<xi> \<Phi>"

Output:
using Ik.wt_\<Phi> assms unfolding GE.satPB_def Ik.satPB_def
by (auto simp add: Ik.wtPB_def)


Input: lemma FIXvarFIX: "(PhiWhile b) = (\<lambda> \<Phi> . (\<lambda> (s,t,\<beta>) . (b,\<Phi>,\<beta>,s,t):var))"

Output:
apply rule
apply (rule FIXvarFIX') done


Input: lemma FI3: "Int_3 \<phi> \<Longrightarrow> Fr_3(\<F>\<^sub>I \<phi>)"

Output:
using NOR_def Fr_int_def IC3 unfolding conn
by auto


Input:
lemma af_to_af_opt:
  "Unf (af \<phi> w) = af\<^sub>\<UU> (Unf \<phi>) w"
  "Unf\<^sub>G (af\<^sub>G \<phi> w) = af\<^sub>G\<^sub>\<UU> (Unf\<^sub>G \<phi>) w"

Output: by (induction w arbitrary: \<phi>) (simp_all add: af_letter_alt_def)


Input:
lemma alw_impl_ev_alw:
assumes "alw (\<phi> impl ev \<psi>) xs"
shows "alw (ev \<phi> impl ev \<psi>) xs"

Output:
using assms
by coinduct (auto dest: ev_alw_impl)


Input:
lemma prv_\<phi>G_eqv_all_not_PPf:
"prv (eqv \<phi>G (all yy (neg (PPf (Var yy) \<langle>\<phi>G\<rangle>))))"

Output: using bprv_prv[OF _ _ bprv_\<phi>G_eqv_all_not_PPf, simplified] .


Input:
lemma ASSUME_leof_rule[refine_vcg]:
    assumes "\<Phi> \<Longrightarrow> \<Psi> ()"
    shows "ASSUME \<Phi> \<le>\<^sub>n SPEC \<Psi>"

Output:
using assms
by (auto simp: ASSUME_leof_iff)


Input:
lemma ev_introR[intro]:
assumes "\<phi> \<pi>l" shows "ev \<phi> \<pi>l"

Output:
using assms unfolding ev_def
by (auto intro: until_introR)


Input: lemma minit_safe_minit: "mmonitorable \<phi> \<Longrightarrow> minit_safe \<phi> = minit \<phi>"

Output:
unfolding minit_safe_def monitorable_formula_code
by simp


Input:
lemma FG_advice_b2:
  "\<lbrakk>Y \<subseteq> \<G> \<phi> w; w \<Turnstile>\<^sub>n \<phi>[Y]\<^sub>\<mu>\<rbrakk> \<Longrightarrow> w \<Turnstile>\<^sub>n \<phi>"

Output: by (metis FG_advice_b2_helper \<G>_elim subset_eq)


Input:
lemma nprv_hyp[simp,intro]:
"\<phi> \<in> F \<Longrightarrow> F \<subseteq> fmla \<Longrightarrow> finite F \<Longrightarrow> nprv F \<phi>"

Output:
unfolding nprv_def
by (simp add: prv_scnj_imp_in subset_iff)


Input:
lemma until_constant_simp:
  "is_constant \<psi> \<Longrightarrow> w \<Turnstile>\<^sub>n \<phi> U\<^sub>n \<psi> \<longleftrightarrow> w \<Turnstile>\<^sub>n \<psi>"

Output: by (cases \<psi>) auto


Input:
lemma alice_step_1_state [simp]:
  assumes "state 1 \<phi>"
  shows "state 3 (\<phi> \<Otimes> |\<beta>\<^sub>0\<^sub>0\<rangle>)"

Output:
using assms bell00_is_state tensor_state
by(metis One_nat_def Suc_1 numeral_3_eq_3 plus_1_eq_Suc)


Input:
lemma prfOf_prv_Pf:
assumes "n \<in> num" and "\<phi> \<in> fmla" "Fvars \<phi> = {}" and "prfOf n \<phi>"
shows "bprv (psubst Pf [(n, yy), (\<langle>\<phi>\<rangle>, xx)])"

Output:
using assms unfolding prfOf_def
by (auto simp: PPf_def2 psubst_eq_rawpsubst2)


Input:
lemma \<AA>\<^sub>\<mu>_nodes:
  "DBA.nodes (\<AA>\<^sub>\<mu> \<phi>) \<subseteq> {Abs \<psi> | \<psi>. nested_prop_atoms \<psi> \<subseteq> nested_prop_atoms \<phi>}"

Output:
unfolding \<AA>\<^sub>\<mu>_def
using af_lifted_semantics af_nested_prop_atoms
by fastforce


Input:
lemma nprv_subst:
assumes "x \<in> var" "t \<in> trm" "\<psi> \<in> fmla" "finite F" "F \<subseteq> fmla"
and 1: "nprv F \<psi>"
shows "nprv ((\<lambda>\<phi>. subst \<phi> t x) ` F) (subst \<psi> t x)"

Output:
using assms
using prv_subst[OF _ _ _ 1[unfolded nprv_def]] unfolding nprv_def
by (intro prv_prv_imp_trans[OF _ _ _ prv_subst_scnj_imp]) auto


Input: theorem Goedel_I: "\<exists>\<phi>. \<not> {} \<turnstile> \<phi> \<and> \<not> {} \<turnstile> Neg \<phi> \<and> eval_fm e0 \<phi>"

Output: by (meson Iff_MP2_same g1.recover_proofs.goedel_first_classic_strong[OF consistent] neg_Neg)


Input:
lemma prv_sdsj1_imp:
"\<phi> \<in> fmla \<Longrightarrow> prv (imp (sdsj {\<phi>}) \<phi>)"

Output:
using prv_imp_refl prv_sdsj_imp
by fastforce


Input:
lemma GF_advice_subfrmlsn:
  "subfrmlsn (\<phi>[X]\<^sub>\<nu>) \<subseteq> {\<psi>[X]\<^sub>\<nu> | \<psi>. \<psi> \<in> subfrmlsn \<phi>}"

Output: by (induction \<phi>) force+


Input: lemma FC1: "Cl_1 \<phi> \<Longrightarrow> Cl_2 \<phi> \<Longrightarrow>  Fr_1(\<F>\<^sub>C \<phi>)"

Output:
using CI1 EXP_def Fr_1_def Fr_cl_def MULT_def dual_def unfolding conn
by smt


Input:
lemma homeomorphic_compact:
  fixes f :: "'a::topological_space \<Rightarrow> 'b::t2_space"
  shows "compact s \<Longrightarrow> continuous_on s f \<Longrightarrow> (f ` s = t) \<Longrightarrow> inj_on f s \<Longrightarrow> s homeomorphic t"

Output:
unfolding homeomorphic_def
by (metis homeomorphism_compact)


Input:
lemma frontier_subset_compact:
  fixes S :: "'a::heine_borel set"
  shows "compact S \<Longrightarrow> frontier S \<subseteq> S"

Output:
using frontier_subset_closed compact_eq_bounded_closed
by blast


Input:
lemma the_inv_signed_lconjaction_by_order2:
  "s+s=0 \<Longrightarrow> the_inv (signed_lconjaction s) = signed_lconjaction s"

Output:
using the_inv_signed_lconjaction signed_rconjaction_by_order2_eq_lconjaction
by simp


Input: lemma remove_empty_implies_subset: assumes "M -s S = {#}" shows "set_mset M \<subseteq> S"

Output:
proof fix x assume A: "x \<in> set_mset M" have "x \<notin> set_mset (M -s S)"
using assms
by auto thus "x \<in> S"
using A unfolding diff_def
by auto
qed


Input:
lemma check_sat_terminates:
  assumes "\<nabla> s" "\<triangle> (\<T> s)" "\<diamond> s" "\<Turnstile>\<^sub>n\<^sub>o\<^sub>l\<^sub>h\<^sub>s s"
  shows "check_dom s"

Output:
using assms
using check_sat_terminates'[of s s]
by simp


Input:
lemma (in omega_complete) ordinal_rec0_mono:
assumes s: "\<forall>p x. x << s p x"
shows "x \<le> y \<Longrightarrow> ordinal_rec0 z s lub x << ordinal_rec0 z s lub y"

Output:
apply (rule ordinal_rec0_mono_lemma[OF s, rule_format])
apply (rule order_refl)
apply assumption done


Input:
lemma outpt_HInv6_2:
  assumes outpt: "outpt s' = (outpt s) (p:= NotAnInput)"
  and inv: "\<forall>p. outpt s p \<in> {chosen s, NotAnInput}"
  and inv2c: "Inv2c s"
  and nextp: "HNextPart s s'"
  shows "\<forall>p. outpt s' p \<in> {chosen s', NotAnInput}"

Output:
proof - from outpt_chosen_2[OF outpt inv2c nextp] have "chosen s = chosen s'" . with inv outpt show ?thesis
by auto
qed


Input:
lemma interior_rel_interior_gen:
  fixes S :: "'n::euclidean_space set"
  shows "interior S = (if aff_dim S = int(DIM('n)) then rel_interior S else {})"

Output: by (metis interior_rel_interior low_dim_interior)


Input:
lemma permutes_in_funpow_image:
  assumes "f permutes S" "x \<in> S"
  shows "(f ^^ n) x \<in> S"

Output:
using assms
by (induct n) (auto simp: permutes_in_image)


Input:
lemma RedT_induct' [consumes 1, case_names refl step]:
  "\<lbrakk> s -\<triangleright>ttas\<rightarrow>* s';
     P s [] s;
     \<And>ttas s' t ta s''. \<lbrakk> s -\<triangleright>ttas\<rightarrow>* s'; P s ttas s'; s' -t\<triangleright>ta\<rightarrow> s'' \<rbrakk> \<Longrightarrow> P s (ttas @ [(t, ta)]) s''\<rbrakk>
  \<Longrightarrow> P s ttas s'"

Output:
unfolding RedT_def
apply(erule rtrancl3p_induct', blast)
apply(case_tac b, blast) done


Input:
lemma AR_imp_retract:
  fixes S :: "'a::euclidean_space set"
  assumes "AR S \<and> closedin (top_of_set U) S"
    shows "S retract_of U"

Output:
using AR_imp_absolute_retract assms homeomorphic_refl
by blast


Input:
lemma subst_consts:
  assumes "consts t |\<subseteq>| S" "fmpred (\<lambda>_ u. consts u |\<subseteq>| S) env"
  shows "consts (subst t env) |\<subseteq>| S"

Output:
apply (subst subst_consts')
using assms
by (auto intro!: ffUnion_least)


Input: lemma assert_bound_tableau_id: "\<lbrakk>\<not> \<U> s; \<Turnstile> s; \<triangle> (\<T> s); \<nabla> s\<rbrakk> \<Longrightarrow> \<T> (assert_bound a s) = \<T> s"

Output:
using assert_bound_tableau
by blast


Input: lemma mono_ndet_F[simp]: "\<lbrakk>P \<sqsubseteq>\<^sub>F P'; S \<sqsubseteq>\<^sub>F S'\<rbrakk> \<Longrightarrow> (P \<sqinter> S) \<sqsubseteq>\<^sub>F (P' \<sqinter> S')"

Output: by (metis F_ndet Un_mono failure_refine_def)


Input:
lemma set_iterator_rule_P:
"\<lbrakk> set_iterator it S0;
   I S0 \<sigma>0;
   !!S \<sigma> x. \<lbrakk> c \<sigma>; x \<in> S; I S \<sigma>; S \<subseteq> S0 \<rbrakk> \<Longrightarrow> I (S - {x}) (f x \<sigma>);
   !!\<sigma>. I {} \<sigma> \<Longrightarrow> P \<sigma>;
   !!\<sigma> S. S \<subseteq> S0 \<Longrightarrow> S \<noteq> {} \<Longrightarrow> \<not> c \<sigma> \<Longrightarrow> I S \<sigma> \<Longrightarrow> P \<sigma>
 \<rbrakk> \<Longrightarrow> P (it c f \<sigma>0)"

Output:
unfolding set_iterator_def
using set_iterator_genord.iteratei_rule_P [of it S0 "\<lambda>_ _. True" I \<sigma>0 c f P]
by simp


Input: lemma ffb_assign[simp]: "fb\<^sub>\<F> (x ::= e) Q = {s. (\<chi> j. ((($) s)(x := (e s))) j) \<in> Q}"

Output:
unfolding vec_upd_def assign_def
by (subst ffb_eq) simp \<comment> \<open> Nondeterministic assignments \<close>


Input:
lemma iso_homology_contractible_space_subtopology2:
  "\<lbrakk>contractible_space X; S \<subseteq> topspace X; p \<noteq> 0; S \<noteq> {}\<rbrakk>
    \<Longrightarrow> homology_group p (subtopology X S) \<cong> 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)


Input:
lemma valof_valof1:
     "(e',s) -|-> (v,s')
      ==> e' = VALOF c1 RESULTIS (VALOF c2 RESULTIS e) ==>
          (VALOF c1;;c2 RESULTIS e, s) -|-> (v,s')"

Output: by (induct set: eval) auto


Input:
lemma sound_opr_alt:
    "sound_opr opr f =
      ((\<forall>s. s \<Turnstile>\<^sub>= (precondition opr) \<longrightarrow>
          (\<exists>s'. f s = (Some s')
                \<and> (\<forall>atm. is_predAtom atm \<and> atm \<notin> set(dels (effect opr)) \<and> s \<Turnstile>\<^sub>= atm \<longrightarrow> s' \<Turnstile>\<^sub>= atm)
                \<and> (\<forall>atm. is_predAtom atm \<and> atm \<notin> set (adds (effect opr)) \<and> s \<Turnstile>\<^sub>= Not atm \<longrightarrow> s' \<Turnstile>\<^sub>= Not atm)
                \<and> (\<forall>atm. atm \<in> set(adds (effect opr)) \<longrightarrow> s' \<Turnstile>\<^sub>= atm)
                \<and> (\<forall>fmla. fmla \<in> set (dels (effect opr)) \<and> fmla \<notin> set(adds (effect opr)) \<longrightarrow> s' \<Turnstile>\<^sub>= (Not fmla))
                \<and> (\<forall>a b. s \<Turnstile>\<^sub>= Atom (Eq a b) \<longrightarrow> s' \<Turnstile>\<^sub>= Atom (Eq a b))
                \<and> (\<forall>a b. s \<Turnstile>\<^sub>= Not (Atom (Eq a b)) \<longrightarrow> s' \<Turnstile>\<^sub>= Not (Atom (Eq a b)))
                ))
        \<and> (\<forall>fmla\<in>set(adds (effect opr)). is_predAtom fmla))"

Output: by (cases "(opr,f)" rule: sound_opr.cases) auto


Input:
lemma fmrel_on_fset_addI:
  assumes "fmrel_on_fset S P m n" "fmrel_on_fset S P a b"
  shows "fmrel_on_fset S P (m ++\<^sub>f a) (n ++\<^sub>f b)"

Output:
using assms unfolding fmrel_on_fset_fmrel_restrict
by auto


Input:
lemma all_resolvents_upon_is_finite:
  assumes "all_fulfill finite S"
  shows "all_fulfill finite (S \<union> (all_resolvents_upon S A))"

Output:
using assms unfolding all_fulfill_def all_resolvents_upon_def
by auto


Input:
lemma hmac_trans_3:
  "hmac X K \<in> parts (extr (bad s') (ik s') (chan s')) \<Longrightarrow>
   (s, s') \<in> l2_step3 Ra A B Nr gny \<Longrightarrow>
   hmac X K \<in> parts (extr (bad s) (ik s) (chan s)) \<or>
   (X = \<langle>Number 1, gny, Exp Gen (NonceF (Ra$nx)), Agent A, Agent B\<rangle> \<and>
    K = Hash \<langle>NonceF (Ra$ni), Nr\<rangle> \<and>
    guessed_runs Ra = \<lparr>role=Init, owner=A, partner=B\<rparr> \<and>
    progress s' Ra = Some {xnx, xni, xnr, xgnx, xgny, xsk, xEnd} \<and>
    guessed_frame Ra xgny = Some gny \<and>
    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


Input:
lemma iexec_offset [intro]:
 "(ins, pc, s, stk) \<mapsto> (pc', s', stk') \<Longrightarrow>
    (ins, pc - i, s, stk) \<mapsto> (pc' - i, s', stk')"

Output: by (erule iexec.cases, auto simp: iexec_offset_aux)


Input:
lemma f'_comp[derivative_intros]:
  "(g has_derivative g') (at s within S) \<Longrightarrow> (h has_derivative h') (at s within S) \<Longrightarrow>
  s \<in> S \<Longrightarrow> (\<And>x. x \<in> S \<Longrightarrow> g x \<in> T) \<Longrightarrow> (\<And>x. x \<in> S \<Longrightarrow> h x \<in> X) \<Longrightarrow>
  ((\<lambda>x. f (g x) (h x)) has_derivative (\<lambda>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'])
apply auto done


Input: lemma lconjseq_reflections: "ss\<in>lists S \<Longrightarrow> set (lconjseq ss) \<subseteq> \<H>"

Output:
using special_subgroup_eq_sum_list[of S]
by (induct ss rule: rev_induct) (auto simp add: lconjseq_snoc)


Input:
lemma connected_component_trans:
  "connected_component S x y \<Longrightarrow> connected_component S y z \<Longrightarrow> connected_component S x z"

Output:
unfolding connected_component_def
by (metis Int_iff Un_iff Un_subset_iff equals0D connected_Un)


Input:
lemma appDup_x2[simp]:
"(app Dup_x2 G maxs rT pc et (Some s)) = (\<exists>ts1 ts2 ts3 ST LT. s = (ts1#ts2#ts3#ST,LT) \<and> 3+length ST < maxs)"

Output: by (cases s, cases "2 <length (fst s)", auto dest: 1 2)


Input:
lemma syzygy_module_listI:
  assumes "s' \<in> pmdl.syzygy_module (set bs)" and "s = atomize_poly (idx_pm_of_pm bs s')"
  shows "s \<in> syzygy_module_list bs"

Output:
unfolding assms(2) syzygy_module_list_def
by (intro imageI, fact assms(1))


Input:
lemma Sup_eq_PInfty:
  fixes S :: "ereal set"
  shows "\<infinity> \<in> S \<Longrightarrow> Sup S = \<infinity>"

Output:
unfolding top_ereal_def[symmetric]
by auto


Input: lemma conv_abscissa_MInfI [intro]: "(\<And>s. fds_converges (f::'a fds) s) \<Longrightarrow> conv_abscissa f = -\<infinity>"

Output: by (subst conv_abscissa_MInf_iff) auto


Input:
lemma A_in_listwordinterval_compress: "A \<in> set (listwordinterval_compress ss) \<Longrightarrow>
    interval_of A \<subseteq> (\<Union>s \<in> set ss. interval_of s)"

Output:
using listwordinterval_compress
by blast


Input:
lemma AssertAllState''_precond:
  assumes "\<triangle> t"
  shows "let s' = assert_bound_loop ats (init t) in
         \<triangle> (\<T> s') \<and> \<nabla> s' \<and> (\<not> \<U> s' \<longrightarrow> \<Turnstile>\<^sub>n\<^sub>o\<^sub>l\<^sub>h\<^sub>s s' \<and> \<diamond> s')"

Output:
using assms
using AssertAllState''_precond'[of "init t" ats]
by (simp add: Let_def init_tableau_id init_unsat_flag init_satisfies satisfies_consistent satisfies_satisfies_no_lhs init_tableau_valuated)


Input: lemma lmeasurable_compact: "compact S \<Longrightarrow> S \<in> lmeasurable"

Output:
using fmeasurable_compact
by (force simp: fmeasurable_def)


Input:
lemma supports_finite:
  fixes S :: "atom set"
  and   x :: "'a::pt"
  assumes a1: "S supports x"
  and     a2: "finite S"
  shows "finite (supp x)"

Output:
proof - have "(supp x) \<subseteq> S"
using a1 a2
by (rule supp_is_subset) then show "finite (supp x)"
using a2
by (simp add: finite_subset)
qed


Input: lemma ttree_restr_nxt_subset2: "x \<notin> S \<Longrightarrow> paths (ttree_restr S (nxt t x)) \<subseteq> paths (ttree_restr S t)"

Output:
apply transfer
apply auto
apply force
by (metis filter.simps(2) imageI)


Input:
lemma face_of_polytope_insert:
     "\<lbrakk>polytope S; a \<notin> affine hull S; F face_of S\<rbrakk> \<Longrightarrow> 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)


Input:
lemma timing_less_counter:
    "v \<in> dom (discovered s) \<Longrightarrow> \<delta> s v < counter s"
    "v \<in> dom (finished s) \<Longrightarrow> \<phi> s v < counter s"

Output:
using s_timing_common_inv
by (auto simp add: timing_common_inv_def)


Input:
lemma triple_valid_def2: "G\<Turnstile>n:{P} t\<succ> {Q} =
 (\<forall>Y s Z. P Y s Z
  \<longrightarrow> (\<exists>L. (normal s \<longrightarrow> (\<exists> C T A. \<lparr>prg=G,cls=C,lcl=L\<rparr>\<turnstile>t\<Colon>T \<and>
                   \<lparr>prg=G,cls=C,lcl=L\<rparr>\<turnstile>dom (locals (store s))\<guillemotright>t\<guillemotright>A)) \<and>
           s\<Colon>\<preceq>(G,L))
  \<longrightarrow> (\<forall>Y' s'. G\<turnstile>s \<midarrow>t\<succ>\<midarrow>n\<rightarrow> (Y',s')\<longrightarrow> Q Y' s' Z))"

Output:
apply (unfold triple_valid_def type_ok_def)
apply (simp (no_asm)) done


Input:
lemma mayDiverge_If_L:
assumes "tval tst s" and "mayDiverge c1 s"
shows "mayDiverge (If tst c1 c2) s"

Output:
using assms IfTrue transC_mayDiverge
by metis


Input:
lemma raise_trap_privilege:
"(((get_S (cpu_reg_val PSR s)))::word1) = 0 \<and>
  s' = snd (fst (raise_trap t s)) \<Longrightarrow>
  (((get_S (cpu_reg_val PSR s')))::word1) = 0"

Output:
apply (simp add: raise_trap_def)
apply (simp add: simpler_modify_def add_trap_set_def)
by (simp add: cpu_reg_val_def)


Input: lemma is_process6: "is_process P \<Longrightarrow>  \<forall> s X. (s@[tick],{}) \<in> FAILURES P \<longrightarrow> (s,X-{tick}) \<in> FAILURES P"

Output: by(drule is_process_spec[THEN iffD1], metis)


Input:
lemma rstate_up_down[simp]:
  assumes "atomic_step_invariant s"
  shows "(\<down>\<up>s) = s"

Output:
using assms Abs_rstate_t_inverse unfolding rep_def abs_def
by auto


Input:
lemma has_path_single1 [backward1]:
  "is_valid_graph n S \<Longrightarrow> (a, b) \<in> S \<Longrightarrow> has_path n S a b"

Output: @proof @have "is_path n S [a, b]" @qed


Input:
lemma in_progressS_trans:
  "in_progressS (progress s R) S \<Longrightarrow> (s, s') \<in> trans l2 \<Longrightarrow> in_progressS (progress s' R) S"

Output:
apply (auto simp add: l2_nostep_defs)
apply (auto simp add: l2_defs domIff) done


Input: lemma evaln_LitI: "G\<turnstile>s \<midarrow>Lit v-\<succ>(if normal s then v else undefined)\<midarrow>n\<rightarrow> s"

Output:
apply (case_tac "s", case_tac "a = None")
by (auto intro!: evaln.Lit)


Input:
lemma uniform_limit_on_UNION:
  assumes "finite S"
  assumes "\<And>s. s \<in> S \<Longrightarrow> uniform_limit (h s) f g F"
  shows "uniform_limit (\<Union>(h ` S)) f g F"

Output:
using assms
by induct (auto intro: uniform_limit_on_empty uniform_limit_on_Un)


Input:
lemma mayDiverge_not_transT:
assumes "mayDiverge c s"
shows "\<not> (c,s) \<rightarrow>t s'"

Output: by (metis assms mayDiverge_transC not_transC_transT)


Input: lemma him_sum [simp]: "HIm (sum f S) = (\<Sum>x\<in>S. HIm (f x))"

Output: by (induct S rule: infinite_finite_induct) auto


Input: lemma foldi_fold_disj: "RBT.foldi (\<lambda>s. s = False) (\<lambda>k v s. s \<or> P k) t val = fold_keys (\<lambda>k s. s \<or> P k) t val"

Output:
unfolding fold_keys_def including rbt.lifting
by transfer (rule rbt_foldi_fold_disj)


Input:
lemma euclid:
  "PRE (\<lambda>s::nat store. s ''x'' = x \<and> s ''y'' = y)
   (WHILE (\<lambda>s. s ''y'' \<noteq> 0) INV (\<lambda>s. gcd (s ''x'') (s ''y'') = gcd x y)
    DO
     (''z'' ::= (\<lambda>s. s ''y''));
     (''y'' ::= (\<lambda>s. s ''x'' mod s ''y''));
     (''x'' ::= (\<lambda>s. s ''z''))
    OD)
   POST (\<lambda>s. s ''x'' = gcd x y)"

Output:
apply hoare
using gcd_red_nat
by auto


Input:
lemma Borsukian_componentwise:
  fixes S :: "'a::euclidean_space set"
  assumes "locally connected S \<or> compact S" "\<And>C. C \<in> components S \<Longrightarrow> Borsukian C"
  shows "Borsukian S"

Output: by (metis Borsukian_componentwise_eq assms)


Input:
lemma InitPhase_HInv3_p:
  "\<lbrakk> InitializePhase s s' p; HInv3_L s' p q d \<rbrakk> \<Longrightarrow> HInv3_R s' p q d"

Output: by(auto simp add: InitializePhase_def HInv3_inner_def hasRead_def HInv3_L_def HInv3_R_def)


Input: lemma interior_of_eq: "(X interior_of S = S) \<longleftrightarrow> openin X S"

Output:
unfolding interior_of_def
using openin_subopen
by blast


Input: lemma att_or_empty_rev: assumes "\<turnstile>(l \<oplus>\<^sub>\<or>\<^bsup>(s, s')\<^esup>)" and "\<not>(s \<subseteq> s')" shows "l \<noteq> []"

Output:
using assms att_or_empty
by blast


Input:
lemma eventually_nhds_set:
  "(\<forall>\<^sub>F x in nhds_set X. P x) \<longleftrightarrow> (\<exists>S. open S \<and> X \<subseteq> S \<and> (\<forall>x\<in>S. P x))"

Output:
unfolding nhds_set_def
by (subst eventually_INF_base) (auto simp: eventually_principal)


Input: lemma aval'_sound: "s : \<gamma>\<^sub>f S \<Longrightarrow> aval a s : \<gamma>(aval' a S)"

Output: by (induction a) (auto simp: gamma_num' gamma_plus' \<gamma>_st_def lookup_def)


Input:
theorem aval_afold[simp]:
assumes "approx t s"
shows "aval (afold a t) s = aval a s"

Output:
using assms
by (induct a) (auto simp: approx_def split: aexp.split option.split)


Input:
lemma R_g_oder_subset:
  assumes "\<And>s. s \<in> S \<Longrightarrow> 0 \<in> U s \<and> is_interval (U s) \<and> U s \<subseteq> T"
    and "R = (\<lambda>s. \<forall>t\<in>U s. (\<forall>\<tau>\<in>down (U s) t. G (\<phi> \<tau> s)) \<longrightarrow> Q (\<phi> t s))"
  shows "rel_R \<lceil>P\<rceil> \<lceil>R\<rceil>; (x\<acute>= (\<lambda>t. f) & G on U S @ 0) \<le> rel_R \<lceil>P\<rceil> \<lceil>Q\<rceil>"

Output:
apply (rule_tac R=R in R_seq_law, simp)
by (rule_tac R_g_ode_rule_subset, simp_all add: assms)


Input:
lemma no_outgoing_transitions:
"ffilter (\<lambda>((s', _), _). s = s') e = {||} \<Longrightarrow>
possible_steps e s r l i = {||}"

Output:
apply (simp add: possible_steps_def)
by auto


Input: lemma coCallsLub_is_lub: "S <<| coCallsLub S"

Output:
proof (rule is_lubI) show "S <| coCallsLub S"
by (rule is_ubI, transfer, auto) next fix u assume "S <| u" hence "\<forall>x \<in> S. x \<sqsubseteq> u"
by (auto dest: is_ubD) thus "coCallsLub S \<sqsubseteq> u"
by transfer auto
qed


Input:
lemma p2r_simps[simp]:
  "\<lceil>P\<rceil> \<le> \<lceil>Q\<rceil> = (\<forall>s. P s \<longrightarrow> Q s)"
  "(\<lceil>P\<rceil> = \<lceil>Q\<rceil>) = (\<forall>s. P s = Q s)"
  "(\<lceil>P\<rceil> ; \<lceil>Q\<rceil>) = \<lceil>\<lambda> s. P s \<and> Q s\<rceil>"
  "(\<lceil>P\<rceil> \<union> \<lceil>Q\<rceil>) = \<lceil>\<lambda> s. P s \<or> Q s\<rceil>"
  "rel_ad \<lceil>P\<rceil> = \<lceil>\<lambda>s. \<not> P s\<rceil>"
  "rel_aka.ads_d \<lceil>P\<rceil> = \<lceil>P\<rceil>"

Output:
unfolding p2r_def rel_ad_def rel_aka.ads_d_def
by auto


Input: lemma get_bind_set[simp]: "bind get (\<lambda>s. bind (set s) (f s)) = bind get (\<lambda>s. f s ())"

Output:
unfolding bind_def get_def set_def
by simp


Input:
lemma R_therm_dyn_down:
  assumes "a > 0" and "0 \<le> \<tau>" and "0 < Tmin" and "Tmax < L"
  shows "Ref \<lceil>\<lambda>s. s$4 = 0 \<and> I Tmin Tmax s \<and> s$2 = 0 \<and> s$3 = s$1\<rceil> \<lceil>I Tmin Tmax\<rceil> \<ge>
    (x\<acute>= (\<lambda>t. f a 0) & G Tmin Tmax a 0 on (\<lambda>s. {0..\<tau>}) UNIV @ 0)"

Output:
apply(rule local_flow.R_g_ode_ivl[OF local_flow_therm])
using assms therm_dyn_down_real_arith[OF assms(1,3), of _ Tmax]
by auto


Input:
lemma pre_mono: assumes "\<And>s. P' s \<le> P s"
  shows "\<And>s. pre C P' s \<le> pre C P s"

Output:
using assms
by (induct C arbitrary: P P', auto)


Input:
lemma open_inter_closure_rel_interior:
  fixes S A :: "'n::euclidean_space set"
  assumes "convex S"
    and "open A"
  shows "A \<inter> closure S = {} \<longleftrightarrow> A \<inter> rel_interior S = {}"

Output: by (metis assms convex_closure_rel_interior open_Int_closure_eq_empty)


Input:
lemma convergent_imp_bounded:
  fixes S :: "nat \<Rightarrow> 'a::metric_space"
  shows "(S \<longlongrightarrow> l) sequentially \<Longrightarrow> bounded (range S)"

Output: by (intro cauchy_imp_bounded LIMSEQ_imp_Cauchy)


Input: lemma v_neq_0_imp: "cfg \<in> valid_cfg \<Longrightarrow> v cfg \<noteq> 0 \<Longrightarrow> state cfg \<in> S\<^sub>r \<union> S2"

Output:
using p_eq_0_imp[of cfg]
by (auto simp add: S\<^sub>r_def S\<^sub>e_def valid_cfg_state_in_S)


Input: lemma subspace_imp_convex: "subspace s \<Longrightarrow> convex s"

Output:
using subspace_imp_affine affine_imp_convex
by auto


Input:
lemma
  assumes "negligible S"
  shows integrable_negligible: "f integrable_on S" and integral_negligible: "integral S f = 0"

Output:
using has_integral_negligible [OF assms]
by (auto simp: has_integral_iff)


Input:
lemma analytic_on_analytic_at:
    "f analytic_on s \<longleftrightarrow> (\<forall>z \<in> s. f analytic_on {z})"

Output: by (metis analytic_at_ball analytic_on_def)


Input: lemma openin_relative_to: "(openin X relative_to S) = openin (subtopology X S)"

Output: by (force simp: relative_to_def openin_subtopology)


Input:
lemma rel_interior_open:
  fixes S :: "'n::euclidean_space set"
  assumes "open S"
  shows "rel_interior S = S"

Output: by (metis assms interior_eq interior_subset_rel_interior rel_interior_subset set_eq_subset)


Input:
lemma tendsto_within_open_NO_MATCH:
  "a \<in> S \<Longrightarrow> NO_MATCH UNIV S \<Longrightarrow> open S \<Longrightarrow> (f \<longlongrightarrow> l)(at a within S) \<longleftrightarrow> (f \<longlongrightarrow> l)(at a)"
  for f :: "'a::topological_space \<Rightarrow> 'b::topological_space"

Output:
using tendsto_within_open
by blast


Input:
lemma map_option_in_optionI:
  "\<lbrakk> ox \<in> opt S; \<forall>x\<in>S. ox = Some x \<longrightarrow> f x \<in> S \<rbrakk>
  \<Longrightarrow> map_option f ox \<in> opt S"

Output:
apply (unfold map_option_case)
apply (simp split: option.split)
apply blast done


Input:
lemma emeasure_T':
  assumes [measurable]: "X \<in> sets S"
  shows "emeasure (T' I) X = (\<integral>\<^sup>+s. emeasure (T s) {\<omega>\<in>space S. s ## \<omega> \<in> X} \<partial>I)"

Output:
unfolding T'_def
by (simp add: emeasure_bind[OF _ distr_Stream_subprob] emeasure_distr vimage_def Int_def conj_ac)


Input:
lemma vcg_arraycpy_unfolds[named_ss vcg_bb]:
    "wlp \<pi> (x[] ::= a) Q s = Q (UPD_STATE s x (s a))"
    "wp \<pi> (x[] ::= a) Q s = Q (UPD_STATE s x (s a))"

Output:
unfolding UPD_STATE_def
by (simp_all add: wlp_eq wp_eq)


Input: lemma  is_processT2_TR : "\<forall>s. s \<in> T P \<longrightarrow> front_tickFree s"

Output:
apply(simp add: F_def [symmetric] T_def TRACES_def, safe)
apply (drule is_processT2[rule_format], assumption) done


Input: lemma card1_eI: "1 \<le> card S \<Longrightarrow> \<exists>y S'. S = {y} \<union> S' \<and> y \<notin> S'"

Output: by (metis One_nat_def card.infinite card_le_Suc_iff insert_is_Un leD zero_less_Suc)


Input:
lemma l2norm_rmult:
   "f square_integrable S \<Longrightarrow> l2norm S (\<lambda>x. f x * c) = l2norm S f * \<bar>c\<bar>"

Output:
using l2norm_lmult
by (simp add: mult.commute)


Input:
lemma piecewise_C1_differentiable_diff:
    "\<lbrakk>f piecewise_C1_differentiable_on S;  g piecewise_C1_differentiable_on S\<rbrakk>
     \<Longrightarrow> (\<lambda>x. f x - g x) piecewise_C1_differentiable_on S"

Output:
unfolding diff_conv_add_uminus
by (metis piecewise_C1_differentiable_add piecewise_C1_differentiable_neg)


Input:
lemma HPhase1or2ReadThen_allBlocks:
  assumes act: "HPhase1or2ReadThen s s' p d r"
  shows "allBlocks s' \<subseteq> allBlocks s"

Output:
using HPhase1or2ReadThen_blocksOf[OF act]
by(auto simp add: allBlocks_def)


Input:
lemma empty_delayed_pool_write_privilege: "get_delayed_pool s = [] \<and>
  (((get_S (cpu_reg_val PSR s)))::word1) = 0 \<and>
  s' = delayed_pool_write s \<Longrightarrow>
  (((get_S (cpu_reg_val PSR s')))::word1) = 0"

Output:
apply (simp add: delayed_pool_write_def)
by (simp add: get_delayed_write_def delayed_write_all_def delayed_pool_rm_list_def)


Input:
lemma diff_inv_axiom1:
  assumes "G s \<longrightarrow> I s" and "diff_invariant I (\<lambda>t. f) (\<lambda>s. {t. t \<ge> 0}) UNIV 0 G"
  shows "s \<in> ((wp (x\<acute>= f & G) \<lceil>I\<rceil>)\<^sub>\<bullet>) s"

Output:
using assms unfolding wp_g_orbital diff_invariant_eq
apply clarsimp
by (erule_tac x=s in allE, frule ivp_solsD(2), clarsimp)


Input:
lemma open_neg_translation:
  fixes S :: "'a::real_normed_vector set"
  assumes "open S"
  shows "open((\<lambda>x. a - x) ` S)"

Output:
using open_translation[OF open_negations[OF assms], of a]
by (auto simp: image_image)


Input: lemma \<Gamma>_prefix_conv: "prefix_of p s \<Longrightarrow> prefix_of p s' \<Longrightarrow> i < plen p \<Longrightarrow> \<Gamma> s i = \<Gamma> s' i"

Output: by transfer (simp add: stake_nth[symmetric])


Input: lemma holomorphic_higher_deriv [holomorphic_intros]: "\<lbrakk>f holomorphic_on S; open S\<rbrakk> \<Longrightarrow> (deriv ^^ n) f holomorphic_on S"

Output: by (induction n) (auto simp: holomorphic_deriv)


Input:
lemma p2_pi4[intro]:
  "ex_coms, p2, lcond {s23} {c1, r12} (\<lambda>s. s \<noteq> []) \<turnstile> \<lbrace>I_pred\<rbrace> \<lbrace>c1\<rbrace> IF (\<lambda>s. s \<noteq> []) THEN c' FI"

Output:
apply (rule vcg.intros)
apply (clarsimp simp: I_pred_def atS_def split: lcond_splits) done


Input:
lemma read_buffer_typed_auto:
  "\<Gamma> = (\<lambda>_. None) \<Longrightarrow> \<S> = ({},{}) \<Longrightarrow> P = {} \<Longrightarrow>
  \<exists>\<Gamma>' \<S>' P'. has_type \<Gamma> \<S> P read_buffer \<Gamma>' \<S>' P'"

Output: by (has_type_tac prog: read_buffer_def aexpr: type_aexpr_Load type_aexpr_Load' type_aexpr_Const bexpr: type_bexprI)


Input:
lemma conf_trace_induct_final[consumes 1, case_names trace_nil trace_cons]:
  "(\<Gamma>, e, S) \<Rightarrow>\<^sup>*\<^bsub>T\<^esub> final \<Longrightarrow> (\<And> \<Gamma> e S. final = (\<Gamma>, e, S) \<Longrightarrow> P \<Gamma> e S [] (\<Gamma>, e, S)) \<Longrightarrow> (\<And>\<Gamma> e S T \<Gamma>' e' S'. (\<Gamma>', e', S') \<Rightarrow>\<^sup>*\<^bsub>T\<^esub> final \<Longrightarrow> P \<Gamma>' e' S' T final \<Longrightarrow> (\<Gamma>, e, S) \<Rightarrow> (\<Gamma>', e', S') \<Longrightarrow> P \<Gamma> e S ((\<Gamma>', e', S') # T) final) \<Longrightarrow> P \<Gamma> e S T final"

Output: by (induction "(\<Gamma>, e, S)" T final arbitrary: \<Gamma> e S rule: trace_induct_final) auto


Input:
lemma memoryless_on_cfg_onI:
  assumes "\<And>s. f s \<in> K s"
  shows "memoryless_on f s \<in> cfg_on s"

Output: by (coinduction arbitrary: s) (auto intro: assms)


Input:
lemma small_step_terminated:
  "s \<rightarrow>\<^bsub>x\<^esub> s' \<Longrightarrow> atCs (fst s) = {} \<Longrightarrow> atCs (fst s') = {}"

Output: by (induct pred: small_step) auto


Input:
theorem HEndPhase2_HInv3:
  "\<lbrakk> HEndPhase2 s s' p; HInv3 s \<rbrakk> \<Longrightarrow> HInv3 s'"

Output: by(auto simp add: HInv3_def dest: EndPhase2_HInv3)


Input:
lemma retract_of_closed:
    fixes S :: "'a :: t2_space set"
    shows "\<lbrakk>closed T; S retract_of T\<rbrakk> \<Longrightarrow> closed S"

Output: by (metis closedin_retract closedin_closed_eq)


Input:
lemma  fmap_below_add_restrI:
  assumes "x f|` (-S) \<sqsubseteq> y f|` (-S)"
  and     "x f|` S \<sqsubseteq> z f|` S"
  shows  "x \<sqsubseteq> y ++\<^bsub>S\<^esub> z"

Output:
using assms
by (auto intro!: fun_belowI dest:env_restr_belowD simp add: lookup_override_on_eq)


Input: lemma ground_subst_no_var[intro]: "ground (subst_range s) \<Longrightarrow> x \<notin> range_vars s"

Output:
using ground_range_vars[of s]
by blast


Input:
lemma HPhase0Read_maxBalInp:
  assumes act: "HPhase0Read s s' q d"
    and asm3: "maxBalInp s b v"
  shows "maxBalInp s' b v"

Output:
proof(auto simp add: maxBalInp_def) fix bk assume bk: "bk \<in> allBlocks s'" and b_bal: "b\<le> bal bk" from subsetD[OF HPhase0Read_allBlocks[OF act] bk] asm3 b_bal show "inp bk = v"
by(auto simp add: maxBalInp_def)
qed


Input:
lemma outside_frontier_eq_complement_closure:
  fixes S :: "'a :: {real_normed_vector, perfect_space} set"
    assumes "bounded S" "convex S"
      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)


Input:
lemma AssertionsImplyMethInvariants:
 "\<lbrakk> G \<rhd> \<lbrace> A \<rbrace> C,m,l \<lbrace> B \<rbrace> I; A s0 s\<rbrakk> \<Longrightarrow> I s0 s (heap s)"

Output: by (drule AssertionsImplyInvariantsAux, fast)


Input:
lemma Star_string:
  assumes "s \<in> star A"
  shows "\<exists>ss. concat ss = s \<and> (\<forall>s \<in> set ss. s \<in> A)"

Output:
using assms
by (metis in_star_iff_concat subsetD)


Input:
lemma is_subseq_closed:
  assumes "s \<in> closed_seqs Zp"
  assumes "is_subseq_of s s'"
  shows "s' \<in> closed_seqs Zp"

Output:
apply(rule closed_seqs_memI)
using is_subseq_ind assms closed_seqs_memE
by metis


Input:
lemma condition_split:
  "P (condition C a b s) = ((((C s) \<longrightarrow> P (a s)) \<and> (\<not> (C s) \<longrightarrow> P (b s))))"

Output: apply (clarsimp simp: condition_def) done


Input: lemma siterate_eq_scons[iff]: "siterate f s = a ## w \<longleftrightarrow> s = a \<and> siterate f (f s) = w"

Output:
using siterate.ctr stream.inject
by metis


Input:
theorem while_rule_lemma:
  assumes invariant: "!!s. P s ==> b s ==> P (c s)"
    and terminate: "!!s. P s ==> \<not> b s ==> Q s"
    and wf: "wf {(t, s). P s \<and> b s \<and> t = c s}"
  shows "P s \<Longrightarrow> Q (while b c s)"

Output:
using wf
apply (induct s)
apply simp
apply (subst while_unfold)
apply (simp add: invariant terminate) done


Input:
lemma matchI[intro?]:
assumes "validTrans (Trans s1 a1 ou1 s1')"
and "consume (Trans s1 a1 ou1 s1') vl1 vl1'" and "\<gamma> (Trans s a ou s') = \<gamma> (Trans s1 a1 ou1 s1')"
and "\<gamma> (Trans s a ou s') \<Longrightarrow> g (Trans s a ou s') = g (Trans s1 a1 ou1 s1')"
and "\<Delta> s' vl' s1' vl1'"
shows "match \<Delta> s s1 vl1 a ou s' vl'"

Output:
unfolding match_def
using assms
by auto


Input:
lemma (in poly_set_iteratei) dres_ne_bot_iterate[refine_transfer]:
  assumes A: "\<And>x s. f x s \<noteq> dSUCCEED"
  shows "iteratei r c (\<lambda>x s. dbind s (f x)) (dRETURN s) \<noteq> dSUCCEED"

Output:
unfolding iteratei_def it_to_list_def it_to_it_def
apply (rule dres_foldli_ne_bot)
by (simp_all add: A)


Input:
lemma list_all_add_6E[elim]: "list_all (\<lambda>(acn, s). s \<le> Suc q) xs
        \<Longrightarrow> list_all (\<lambda>(acn, s). s \<le> q + (2 * n + 6)) xs"

Output: by(auto simp: list_all_length)


Input:
lemma Abs_type':
  assumes H: "\<Gamma> \<turnstile> (\<lambda>x:S. s) : U \<rightarrow> U'"
  and H': "x \<sharp> \<Gamma>"
  obtains S'
  where "\<Gamma> \<turnstile> U <: S"
  and "(VarB x S) # \<Gamma> \<turnstile> s : S'"
  and "\<Gamma> \<turnstile> S' <: U'"

Output:
using H subtype_reflexivity_from_typing [OF H] H'
by (rule Abs_type)


Input:
theorem invertible_is_bijective:
  assumes dom: "\<alpha> \<in> S \<rightarrow>\<^sub>E S"
  shows "invertible \<alpha> \<longleftrightarrow> bij_betw \<alpha> S S"

Output:
proof - from dom interpret map \<alpha> S S
by unfold_locales show ?thesis
by (auto simp add: bij_betw_iff_has_inverse invertible_def)
qed


Input:
lemma convex_rel_interior_iff2:
  fixes S :: "'n::euclidean_space set"
  assumes "convex S"
    and "S \<noteq> {}"
  shows "z \<in> rel_interior S \<longleftrightarrow> (\<forall>x\<in>affine hull S. \<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S)"

Output:
using assms hull_subset[of S] convex_rel_interior_if2[of S z] convex_rel_interior_only_if[of S z]
by auto


Input:
lemma simplicial_chain_diff:
   "\<lbrakk>simplicial_chain p S c1; simplicial_chain p S c2\<rbrakk> \<Longrightarrow> simplicial_chain p S (c1 - c2)"

Output:
unfolding simplicial_chain_def
by (meson UnE keys_diff subset_iff)


Input:
lemma additiveI[intro]:
  "\<lbrakk> \<And>P Q s. \<lbrakk> sound P; sound Q \<rbrakk> \<Longrightarrow> t (\<lambda>s. P s + Q s) s = t P s + t Q s \<rbrakk> \<Longrightarrow>
   additive t"

Output:
unfolding additive_def
by(blast)


Input:
lemma pre_zeta_aux_eq_pre_zeta:
  assumes "Re s > -2 * real n" and "a > 0"
  shows   "pre_zeta_aux n a s = pre_zeta a s"

Output:
unfolding pre_zeta_def
proof (intro pre_zeta_aux_eq') from assms show "- 2 * real (nat (1 - \<lceil>Re s / 2\<rceil>)) < Re s"
by linarith
qed (insert assms, simp_all)


Input:
lemma homeomorphic_to_disc_imp_simply_connected:
  assumes "S = {} \<or> S homeomorphic ball (0::complex) 1"
  shows "simply_connected S"

Output:
using assms homeomorphic_simply_connected_eq convex_imp_simply_connected
by auto


Input:
lemma continuous_on_components_open:
 fixes S :: "'a::real_normed_vector set"
  assumes "open S "
          "\<And>c. c \<in> components S \<Longrightarrow> continuous_on c f"
    shows "continuous_on S f"

Output:
using continuous_on_components open_imp_locally_connected assms
by blast


Input:
lemma exhaustive_fusion_code:
  "exhaustive_fusion g s =
  (list.has_next g s \<and>
   (let (x, s') = list.next g s
    in \<not> proper_interval None (Some x) \<and> exhaustive_above_fusion g x s'))"

Output:
unfolding exhaustive_fusion_def exhaustive_above_fusion_def
by(subst (1) list.unfoldr.simps)(simp add: split_beta)


Input:
lemma countable_image_inj_Int_vimage:
   "\<lbrakk>inj_on f S; countable A\<rbrakk> \<Longrightarrow> countable (S \<inter> f -` A)"

Output: by (meson countable_image_inj_on countable_subset image_subset_iff_subset_vimage inf_le2 inj_on_Int)


Input: lemma fbox_test[simp]: "(\<lambda>s. ( |\<questiondown>P?] Q) s) = (\<lambda>s. P s \<longrightarrow> Q s)"

Output:
unfolding fbox_def test_def
by simp \<comment> \<open> Assignments \<close>


Input:
lemma colours_flip_fM[simp]:
  "fl \<noteq> sys_fM s \<Longrightarrow> black b (s(sys := (s sys)\<lparr>fM := fl, mem_store_buffers := (mem_store_buffers (s sys))(p := ws)\<rparr>)) \<longleftrightarrow> white b s \<and> \<not>grey b s"

Output:
unfolding black_def white_def
by (simp add: fun_upd_apply)


Input:
lemma length_tl_list_minus_butlast_gt_zero:
  assumes "length s < length t" and "strict_prefix (butlast s) t" and "length s > 0"
  shows "length (tl (t - (butlast s))) > 0"

Output:
using assms
by (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)


Input:
lemma assumes "s \<in> S" and "fair rs"
  shows trim_in_R: "shd (trim rs s) \<in> R"
  and trim_enabled: "enabled (shd (trim rs s)) s"
  and trim_fair: "fair (trim rs s)"

Output:
unfolding trim_alt[OF assms] minWait_def
using LeastI_ex[OF minWait_ex[OF assms]] sdrop_fair[OF assms(2)] conjunct1[OF assms(2)[unfolded fair_def]]
by simp_all (metis subsetD snth_sset)


Input:
lemma SpecIf:
  "\<lbrakk>P \<subseteq> {s. (b s \<longrightarrow> f s \<in> Q) \<and> (\<not> b s \<longrightarrow> g s \<in> Q \<and> h s \<in> Q)}\<rbrakk> \<Longrightarrow>
   \<Gamma>,\<Theta>\<turnstile>\<^bsub>/F\<^esub> P Spec (if_rel b f g h) Q,A"

Output:
apply (rule Spec)
apply (auto simp add: if_rel_def) done


Input:
lemma  rfn_tool12_2:"\<lbrakk>0 < (s::nat); (i::nat) mod s = s - Suc 0\<rbrakk> \<Longrightarrow>
                                               (Suc i) mod s = 0"

Output:
apply (insert div_mult_mod_eq [THEN sym, of "i" "s"])
apply (insert add_Suc_right [THEN sym, of "i div s * s" "i mod s"])
apply simp done


Input: lemma wlp_strengthen_modset: "wlp \<pi> c Q s \<Longrightarrow> wlp \<pi> c (\<lambda>s'. Q s' \<and> modifies (lhsv \<pi> c) s' s) s"

Output:
unfolding wlp_def
by (blast intro: modifies_lhsv)


Input:
lemma streams_sset:
  assumes "s \<in> streams A"
  shows "sset s \<subseteq> A"

Output:
proof fix x assume "x \<in> sset s" from this \<open>s \<in> streams A\<close> show "x \<in> A"
by (induct s) (auto intro: streams_shd streams_stl)
qed


Input:
lemma Astack_restr_stack_below:
  "Astack (restr_stack V S) \<sqsubseteq> Astack S"

Output: by (induction V S rule: restr_stack.induct) auto


Input:
lemma closure_inside_subset:
    fixes S :: "'a::real_normed_vector set"
    assumes "closed S"
      shows "closure(inside S) \<subseteq> S \<union> inside S"

Output: by (metis assms closure_minimal open_closed open_outside sup.cobounded2 union_with_inside)


Input:
lemma hmac_trans_lkr:
  "hmac X K \<in> parts (extr (bad s') (ik s') (chan s')) \<Longrightarrow>
   K \<notin> synth (analz (extr (bad s) (ik s) (chan s))) \<Longrightarrow>
   s \<in> l2_inv3 \<Longrightarrow>
   (s, s') \<in> l2_lkr_others A \<union> l2_lkr_after A \<Longrightarrow>
   hmac X K \<in> parts (extr (bad s) (ik s) (chan s))"

Output:
apply (auto simp add: l2_defs dest!: parts_monotone [OF _ extr_insert_bad])
apply (auto intro: parts_monotone intro!:hmac_trans_lkr_aux) done


Input:
lemma dependent_biggerset_general:
  "(finite S \<Longrightarrow> card S > dim S) \<Longrightarrow> dependent S"

Output:
using independent_bound_general[of S]
by (metis linorder_not_le)


Input: lemma peek_st_split [simp]: "(\<lambda>s.. \<lambda>Y s'. P s Y s') = (\<lambda>Y s. P (store s) Y s)"

Output:
apply (rule ext)
apply (rule ext)
apply (simp (no_asm)) done


Input:
lemma deg_fun_superset:
  fixes A::"'a set"
  assumes "supp_fun s \<subseteq> A" and "finite A"
  shows "deg_fun s = (\<Sum>x\<in>A. s x)"

Output:
unfolding deg_fun_def
proof (rule sum.mono_neutral_cong_left, fact, fact, rule) fix x assume "x \<in> A - supp_fun s" hence "x \<notin> supp_fun s"
by simp thus "s x = 0"
by (simp add: supp_fun_def)
qed rule


Input:
lemma dfoldli_simps[simp]:
  "dfoldli [] c f s = dRETURN s"
  "dfoldli (x#ls) c f s =
    (if c s then do { s\<leftarrow>f x s; dfoldli ls c f s} else dRETURN s)"

Output: apply (subst dfoldli.simps, simp)+ done


Input:
lemma card_insert_Suc:
  "card (insert x S) \<le> Suc (card S)"

Output: by (metis Suc_n_not_le_n card.infinite card_insert_if finite_insert linear)


Input:
lemma wlp_while_rl[vcg_comb_rules]:
    assumes "\<paragraph>''invar-initial'' \<Longrightarrow> I s\<^sub>0"
    assumes "\<And>s. \<lbrakk> \<paragraph>''invar-pres''; modifies modset s s\<^sub>0; I s; bval b s \<rbrakk> \<Longrightarrow> wlp \<pi> c I s"
    assumes "\<And>s. \<lbrakk> \<paragraph>''invar-post''; modifies modset s s\<^sub>0; I s; \<not>bval b s \<rbrakk> \<Longrightarrow> Q s"
    assumes [simp]: "modset = ANALYZE (lhsv \<pi> c)"
    shows "wlp \<pi> (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
by auto


Input:
lemma Phase1or2ReadThen_HInv3_hasRead:
  "\<lbrakk> \<not>hasRead s pp dd qq;
     Phase1or2ReadThen s s' p d q;
     pp\<noteq>p \<or> qq\<noteq>q \<or> dd\<noteq>d\<rbrakk>
  \<Longrightarrow> \<not>hasRead s' pp dd qq"

Output: by(auto simp add: hasRead_def Phase1or2ReadThen_def)


Input: lemma permutes_imp_bij: "p permutes S \<Longrightarrow> bij_betw p S S"

Output: by (metis UNIV_I bij_betw_subset permutes_bij permutes_image subsetI)


Input:
lemma homeomorphism_on_homeomorphic:
  assumes "homeomorphism_on S f"
  shows "S homeomorphic (f`S)"

Output:
using assms unfolding homeomorphism_on_def homeomorphic_def
by auto


Input: lemma tagged_division_of_finite: "s tagged_division_of i \<Longrightarrow> finite s"

Output:
unfolding tagged_division_of_def tagged_partial_division_of_def
by auto


Input:
lemma stack_set_def:
    "set (stack s) = dom (discovered s) - dom (finished s)"

Output:
using basic_invar
by (simp add: basic_invar_def)


Input:
lemma Spair_induced_automorph:
  "s\<in>S \<Longrightarrow> s = case_prod Abs_induced_automorph (Spair s)"

Output:
using Spair_def someI_ex[of "\<lambda>fg. fg \<in> fundfoldpairs \<and> s = case_prod Abs_induced_automorph fg" ]
by auto


Input:
lemma hd_stack_in_tj_stack:
    "stack s \<noteq> [] \<Longrightarrow> hd (stack s) \<in> set (tj_stack s)"

Output:
using stack_ss_tj_stack hd_in_set
by auto


Input:
lemma ms_of_greek_cons:
  "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]
by (auto simp add: adj_msog_def ms_of_greek_def accent.splits)


Input:
lemma F_hiding: "F(P \\ A) = {(s,X). \<exists> t. s = trace_hide t (ev`A) \<and> (t,X \<union> (ev`A)) \<in> F P} \<union>
                              {(s,X). s \<in> div_hide P A}"

Output: by (subst F_def, simp only: hiding_def Rep_Abs_Hiding FAILURES_def fst_conv)


Input:
lemma piecewise_C1_differentiable_on_imp_continuous_on:
  assumes "f piecewise_C1_differentiable_on s"
  shows "continuous_on s f"

Output:
using assms
by (auto simp add: piecewise_C1_differentiable_on_def)


Input:
lemma borel_measurableI:
  fixes f :: "'a \<Rightarrow> 'x::topological_space"
  assumes "\<And>S. open S \<Longrightarrow> f -` S \<inter> space M \<in> sets M"
  shows "f \<in> borel_measurable M"

Output:
unfolding borel_def
proof (rule measurable_measure_of, simp_all) fix S :: "'x set" assume "open S" thus "f -` S \<inter> space M \<in> sets M"
using assms[of S]
by simp
qed


Input:
lemma connected_openin:
      "connected S \<longleftrightarrow>
       \<not>(\<exists>E1 E2. openin (top_of_set S) E1 \<and>
                 openin (top_of_set S) E2 \<and>
                 S \<subseteq> E1 \<union> E2 \<and> E1 \<inter> E2 = {} \<and> E1 \<noteq> {} \<and> E2 \<noteq> {})"

Output:
unfolding connected_def openin_open disjoint_iff_not_equal
by blast


Input:
lemma
  assumes forward: "\<And>s g p v. A g p v s \<Longrightarrow> AA g p s "
  shows "\<And>xv yv P s y x s. (A g x yv ** A g y yv ** P) s \<Longrightarrow> (AA g y ** sep_True) s"

Output: by (sep_cancel add: forward)


Input:
lemma step_Stuck_prop:
  assumes step: "\<Gamma> \<turnstile> (c, s) \<rightarrow> (c', s')"
  shows "s=Stuck \<Longrightarrow> s'=Stuck"

Output:
using step
by (induct) auto


Input:
lemma back_edges_tree_pathes_disjoint:
    "back_edges s \<inter> (tree_edges s)\<^sup>+ = {}"

Output:
using back_edge_disc tree_path_disc
by force


Input:
lemma HT_mods_cong[named_ss vcg_bb cong]:
    assumes "vs = vs'"
    assumes "P=P'"
    assumes "c=c'"
    assumes "\<And>s\<^sub>0 s. modifies vs s s\<^sub>0 \<Longrightarrow> Q s\<^sub>0 s = Q' s\<^sub>0 s"
    shows "HT_mods \<pi> vs P c Q = HT_mods \<pi> vs' P' c' Q'"

Output:
unfolding HT_mods_def HT_def
using assms
by (auto intro: wp_conseq)


Input:
lemma HPhase0Read_HInv4b_p:
  "HPhase0Read s s' p d \<Longrightarrow> HInv4b s' p"

Output: by(auto simp add: Phase0Read_def HInv4b_def)


Input:
lemma connected_complement_homeomorphic_interval:
  fixes S :: "'a::euclidean_space set"
  assumes "S homeomorphic cbox a b" "2 \<le> DIM('a)"
  shows "connected(-S)"

Output:
using assms path_connected_complement_homeomorphic_interval path_connected_imp_connected
by blast


Input:
lemma ENR_from_Un_Int:
  fixes S :: "'a::euclidean_space set"
  assumes "closed S" "closed T" "ENR(S \<union> T)" "ENR(S \<inter> T)"
  shows "ENR S"

Output: by (meson ENR_from_Un_Int_gen assms closed_subset sup_ge1 sup_ge2)


Input: lemma compact_simplex: "n simplex S \<Longrightarrow> compact S"

Output:
unfolding simplex
using finite_imp_compact_convex_hull
by blast


Input:
lemma absolutely_integrable_negligible:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  assumes "negligible S"
  shows "f absolutely_integrable_on S"

Output:
using assms
by (simp add: absolutely_integrable_on_def integrable_negligible)


Input: lemma V_lemma2: "Mutex \<in> {s. n s = 2} LeadsTo {s. ~ p s}"

Output:
apply (rule LeadsTo_Diff [OF LeadsTo_weaken_L Int_lower2 [THEN subset_imp_LeadsTo]])
apply (rule LeadsTo_Trans [OF V_F2 V_F3], auto) done


Input: lemma resolution_blocks_subset: "S \<in># \<P> \<Longrightarrow> S \<subseteq># \<B>"

Output:
using partition_on_mset_subsets resolutionD1
by auto


Input: lemma restrictA_noop: "domA \<Gamma> \<subseteq> S \<Longrightarrow> restrictA S \<Gamma> = \<Gamma>"

Output:
unfolding restrict_eq
by (induction \<Gamma>) auto


Input:
lemma inorder_node44: "height n > 0 \<Longrightarrow>
  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


Input:
lemma inorder_del:
  "t \<in> T h \<Longrightarrow> sorted1(inorder t) \<Longrightarrow> 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)


Input:
lemma inorder_del:
 "sorted(inorder t) \<Longrightarrow>  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)