Input:
lemma lex_two_compat'2:
  assumes "ns1 O s1 \<subseteq> s1" "s1 O ns1 \<subseteq> s1" "s1 O s1 \<subseteq> s1" "ns1 O ns1 \<subseteq> ns1" "s2 O ns2 \<subseteq> s2"
  shows "lex_two s1 ns1 s2 O lex_two s1 ns1 ns2 \<subseteq> lex_two s1 ns1 s2"

Output:
using lex_two_compat'[OF assms]
by (intro subsetI, elim relcompE, fast)


Input:
lemma leqv_trans:
assumes 12: "leqv L1 L2" and 23: "leqv L2 L3"
shows "leqv L1 L3"

Output:
using assms unfolding leqv_def
by (metis (lifting) subs_trans)


Input: lemma finsum_vec[simp]: "finsum_vec TYPE('a) n = finsum V"

Output: by (force simp: finsum_vec_def monoid_vec_def finsum_def finprod_def)


Input:
lemma module_hom_with_overloaded[ud_with]:
  "module_hom =
    (
      \<lambda>scale\<^sub>1 scale\<^sub>2.
        module_hom_with (+) 0 (-) uminus scale\<^sub>1 (+) 0 (-) uminus scale\<^sub>2
    )"

Output: unfolding module_hom_def module_hom_axioms_def module_hom_with_def module_hom_with_axioms_def unfolding module_with_overloaded ..


Input:
lemma CD_on_inj_on_Xd:
  shows "inj_on Xd (CD_on ds X)"

Output:
unfolding CD_on_def
by (rule inj_onI) (clarsimp simp: Cd_Xd Cd_singleton)


Input:
lemma vsubstEnv_preserves_wls[simp]:
assumes "wlsEnv rho"
shows "wlsEnv (rho &[x1 // x]_xs)"

Output:
using assms unfolding vsubstEnv_def
by simp


Input: lemma swing_pos_inv:"swing_pos w1 w2 \<Longrightarrow> (kauff_mat w1) = (kauff_mat w2)"

Output:
unfolding swing_pos_def
using kauff_mat_swingpos
by auto


Input: lemma subst_atm_mset_list_empty_iff[simp]: "AAs \<cdot>aml \<eta> = [] \<longleftrightarrow> AAs = []"

Output:
unfolding subst_atm_mset_list_def
by auto


Input:
lemma hoare_triple_D1:
  "\<turnstile>\<^sub>p
   {Q}
   Utrans_P vars1 mat_O
   {Q1}"

Output:
unfolding Utrans_P_is_tensor_P1 mat_O_times_Q1[symmetric]
apply (subst hoare_partial.intros(2))
using qp_Q1
by auto


Input:
lemma Inr_in_cont_par:
"Inr t \<in> cont (tr1 \<parallel> tr2) \<longleftrightarrow> (t \<in> par ` (Inr -` cont tr1 \<times> Inr -` cont tr2))"

Output:
using Inr_cont_par[of tr1 tr2] unfolding vimage_def
by auto


Input:
lemma asTerm_equal_iff_alpha:
assumes "qGood qX \<or> qGood qY"
shows "(asTerm qX = asTerm qY) = (qX #= qY)"

Output: by (metis alpha_imp_asTerm_equal alpha_sym asTerm_equal_imp_alpha assms)


Input:
lemma translation_eq:
  "\<forall>x\<in>set (zip (tr_ss_f (map_of (zip (map (case_vd (\<lambda>cl. x_var)) vds) (map x_var vars'))(x_this \<mapsto> x')) ss') ss').
             (\<lambda>(s'', s'). tr_s (map_of (zip (map (case_vd (\<lambda>cl. x_var)) vds) (map x_var vars'))(x_this \<mapsto> x')) s' s'') x"

Output:
apply(induct ss')
apply(simp add: tr_rel_f_eq)+ done


Input: lemma wf_I: "wf_world_model I"

Output:
using wf_problem unfolding I_def wf_world_model_def wf_problem_def
apply(safe) subgoal for f
by (induction f) auto done


Input: lemma R12_c [simp]: "pmf (sds R12) c = 0"

Output:
using R12_R10.strategyproofness(1) lottery_conditions[OF R12.wf]
by (auto simp del: pmf_nonneg)


Input:
lemma factorize_polys_map_square_free:
  assumes "factorize_polys ps = (fs,data)"
  assumes "fss =  map real_of_rat_poly fs"
  shows "\<And>f. f \<in> set fss \<Longrightarrow> square_free f"

Output:
using factorize_polys_square_free[OF assms(1)]
using assms(2) field_hom_0'.square_free_map_poly of_rat_hom.field_hom_0'_axioms
by auto


Input:
lemma one_extra_update_direct_subsumption:
  "one_extra_update t1 t2 s2 e2 \<Longrightarrow> directly_subsumes e1 e2 s1 s2 t1 t2"

Output:
apply (insert must_be_an_update[of "Updates t1" r "Updates t2"])
apply (simp add: one_extra_update_def)
by (metis eq_fst_iff hd_Cons_tl one_extra_update_directly_subsumes)


Input:
lemma lspasl_a_eq:
  "((h1,h2\<triangleright>h0) \<and> (h3,h4\<triangleright>h1)) =
  (\<exists>h5. (h3,h5\<triangleright>h0) \<and> (h2,h4\<triangleright>h5) \<and> (h1,h2\<triangleright>h0) \<and> (h3,h4\<triangleright>h1))"

Output:
using lspasl_a_der
by blast


Input:
lemma lift_p_E:
  obtains v heap' where "execute f heap = Some (v, heap')" "P heap'"

Output:
using execute_cases
by (cases "execute f heap") auto


Input:
lemma ordertype_eq_Ord [simp]:
  assumes "Ord \<alpha>"
  shows "ordertype (elts \<alpha>) VWF = \<alpha>"

Output:
using assms ordermap_eq_self [OF assms]
by (simp add: ordertype_def)


Input:
lemma recover_pure:
  "RECOVER_PURE emp emp"
  "\<lbrakk>RECOVER_PURE P2 Q2; RECOVER_PURE P1 Q1\<rbrakk> \<Longrightarrow> RECOVER_PURE (P1*P2) (Q1*Q2)"
  "CONSTRAINT is_pure R \<Longrightarrow> RECOVER_PURE (hn_invalid R x y) (hn_ctxt R x y)"
  "RECOVER_PURE (hn_ctxt R x y) (hn_ctxt R x y)"

Output:
unfolding RECOVER_PURE_def subgoal
by sep_auto subgoal
by (drule (1) entt_star_mono) subgoal
by (rule recover_pure_aux) subgoal
by sep_auto done


Input:
lemma wf_sig_iff_exe_wf_sig': "exe_sig_conds \<Sigma> \<Longrightarrow>
    wf_sig (translate_signature \<Sigma>) \<longleftrightarrow>
    exe_wf_sig \<Sigma>"

Output: by (metis exe_sig_conds_def exesignature.exhaust_sel wf_sig_iff_exe_wf_sig translate_signature.simps)


Input:
lemma nempty_list_append_length_add:
  fixes l1 l2 l3
  assumes "l2 \<noteq> []"
  shows "length (l1 @ l3) < length (l1 @ l2 @l3)"

Output:
using assms
by (induction l2) auto


Input:
lemma special_soundness:
  shows "\<Sigma>_AND.special_soundness"

Output:
using \<Sigma>_AND.special_soundness_def ss
by fast


Input:
lemma stone_phi_embed_triple_pair:
  "(if Rep_phi f = stone_phi then Rep_stone_phi_pair x else triple.pairs_uminus (Rep_phi f) (triple.pairs_uminus (Rep_phi f) (Rep_stone_phi_pair x))) \<in> triple.pairs (Rep_phi f)"

Output: by (metis (no_types, hide_lams) Rep_stone_phi_pair simp_phi surj_pair triple.pairs_uminus_closed triple_def)


Input: lemma nil_absorb: "nil \<parallel> nil = nil"

Output:
using nil_par_nil skip_nil par_skip
by (metis inf.absorb_iff2 inf.orderE inf_par_distrib2)


Input: lemma WT_dem: "\<I>_uniform UNIV (insert None (Some ` vld \<eta>)), \<I>_full \<oplus>\<^sub>\<I> \<I>_uniform UNIV (insert None (Some ` (nlists UNIV \<eta> \<times> nlists UNIV \<eta>))) \<turnstile>\<^sub>C MAC.dem \<eta> \<surd>"

Output:
unfolding MAC.dem_def
by (rule WT_converter_of_callee) (auto simp add: vld_def stateless_callee_def mac_def split: option.split_asm)


Input:
lemma asIMOD_igAbs:
"igAbs (asIMOD SEM) xs x X =
(\<lambda>val. if sWlsVal SEM val then sAbs xs (\<lambda>sX. if sWls SEM (asSort xs) sX
                                                then X (val (x := sX)_xs)
                                                else sDummy SEM (SOME s. sWls SEM s (X val)))
                          else undefined)"

Output:
unfolding asIMOD_def
by simp


Input: lemma dim_subset_UNIV: "dim S \<le> dimension"

Output: by (metis dim_subset subset_UNIV dim_UNIV dimension_def)


Input: theorem qfree_qe_FM: "qfree (qe_FM f)"

Output: by(simp add:qe_FM_def R\<^sub>e.qfree_lift_dnfeq_qe qfree_qe_FM\<^sub>1)


Input: lemma resultant_impl_idom_divide[simp]: "resultant_impl_idom_divide = resultant"

Output:
unfolding resultant_impl_idom_divide_def
by (rule resultant_impl_generic[OF basic_div_exp])


Input: lemma cnf_singleton_False: "(\<exists>a'\<in>set as. \<not> cnf_to_bool \<gamma> [a']) \<longleftrightarrow> \<not> cnf_to_bool \<gamma> as"

Output: by(induction \<gamma> as rule: cnf_to_bool.induct) (simp_all)


Input:
lemma ZN_atLeastAtMost [transfer_rule]:
  "(ZN ===> ZN ===> rel_set ZN) atLeastAtMost atLeastAtMost"

Output:
unfolding rel_fun_def ZN_def rel_set_def
by (clarsimp simp add: Bex_def, arith)


Input: lemma rel_FGcontra_eq: "rel_FGcontra (=) (=) (=) (=) (=) (=) (=) (=) (=) (=) (=) = (=)"

Output:
unfolding rel_FGcontra_def
by (simp add: rel_F_eq rel_G_eq)


Input:
lemma end_point_no_cycle:
  assumes "has_end_points_path x"
    shows "\<not> cycle x"

Output:
using assms end_point_iff2 end_point_iff1 many_strongly_connected_implies_no_start_end_points no_start_end_points_iff
by blast


Input:
lemma app\<^sub>iSwap[simp]:
"app\<^sub>i (Swap,P,pc,mxs,T\<^sub>r,s) = (\<exists>T1 T2 ST LT. s = (T1#T2#ST,LT))"

Output: by(rule length_cases4) auto


Input:
lemma fin_dim_span_cols:
assumes "A \<in> carrier_mat n nc"
shows "vectorspace.fin_dim class_ring (vs (span (set (cols A))))"

Output:
using fin_dim_span cols_dim List.finite_set assms carrier_matD(1) module_vec_simps(3)
by force


Input:
lemma wellformed_items_Complete:
  "wellformed_items I \<Longrightarrow> wellformed_items (Complete k I)"

Output:
apply (auto simp add: wellformed_items_def wellformed_item_def Complete_def bin_def)
apply (metis dual_order.trans)
using is_complete_def next_symbol_not_complete not_less_eq_eq
by blast


Input:
lemma abc_append_first_step_eq_pre:
  "st < length A
 \<Longrightarrow> abc_step_l (st, lm) (abc_fetch st (A @ B)) =
    abc_step_l (st, lm) (abc_fetch st A)"

Output: by(simp add: abc_step_l.simps abc_fetch.simps nth_append)


Input: lemma (in vfsequence) vfsequence_vcard_in_omega[simp]: "vcard xs \<in>\<^sub>\<circ> \<omega>"

Output:
using vfsequence_vdomain_in_omega
by (simp add: vfsequence_vdomain)


Input:
lemma ta_bisim_\<epsilon> [simp]:
  "ta_bisim b \<epsilon> ta' \<longleftrightarrow> ta' = \<epsilon>" "ta_bisim b ta \<epsilon> \<longleftrightarrow> ta = \<epsilon>"

Output:
apply(cases ta', fastforce simp add: ta_bisim_def)
apply(cases ta, fastforce simp add: ta_bisim_def) done


Input: lemma br'_initial_abs: "br'_\<alpha>`(br'_initial \<delta>) = {br_initial \<delta>}"

Output: apply (force simp add: br_initial_def br'_\<alpha>_def elim: br'_initial.cases intro: br'_initial.intros) done


Input:
lemma hm_exch_op_\<alpha>_correct: "hm_exch_op hm i j \<le>\<^sub>n SPEC (\<lambda>hm'.
      hm_valid hm i \<and> hm_valid hm j \<and> hm'=hm_exch hm i j
      )"

Output:
unfolding hm_exch_op_def
apply refine_vcg
apply (vc_solve simp: hm_valid_def hm_length_def heapmap_\<alpha>_def solve: asm_rl)
apply (auto simp add: hm_key_of_def hm_exch_def swap_def) [] done


Input: lemma rbt_comp_delete: "rbt_comp_delete = ord.rbt_delete (lt_of_comp c)"

Output: unfolding rbt_comp_delete_def[abs_def] ord.rbt_delete_def[abs_def] unfolding rbt_comp_del ..


Input: lemma trivial_mute_fun[simp,intro]: "mute_fun trivial_mute_fun"

Output:
unfolding mute_fun_def trivial_mute_fun_def
by auto


Input:
lemma boundOutputApp:
  fixes xvec :: "name list"
  and   yvec :: "name list"
  and   B    :: "('a::fs_name, 'b::fs_name, 'c::fs_name) boundOutput"

  shows "\<lparr>\<nu>*(xvec@yvec)\<rparr>B = \<lparr>\<nu>*xvec\<rparr>(\<lparr>\<nu>*yvec\<rparr>B)"

Output: by(induct xvec) auto


Input: theorem swapEnv_idEnv[simp]: "(idEnv &[x \<and> y]_xs) = idEnv"

Output:
unfolding idEnv_def swapEnv_def comp_def swapEnvDom_def swapEnvIm_def lift_def
by simp


Input: lemma extf_ext_wf_bounded: "ext_wf_bounded (extf f)"

Output:
unfolding ext_wf_bounded_def
using extf_ext_irrefl_before_trans extf_ext_hd_or_tl
by simp


Input:
lemma yxml_string_of_xml_tree_code [code]:
  "yxml_string_of_xml_tree (xml.Elem name atts ts) rest =
   yot_append xml.XY (
   yot_append (yot_literal name) (
   foldr (\<lambda>(a, x) rest.
     yot_append xml.Y (
     yot_append (yot_literal a) (
     yot_append (yot_literal (STR ''='')) (
     yot_append (yot_literal x) rest)))) atts (
   foldr yxml_string_of_xml_tree ts (
   yot_append xml.XYX rest))))"
  "yxml_string_of_xml_tree (xml.Text s) rest = yot_append (yot_literal s) rest"

Output: by(rule yot_anything)+


Input: lemma R_loopI: "X \<le> Ref \<lceil>I\<rceil> \<lceil>I\<rceil> \<Longrightarrow> \<lceil>P\<rceil> \<le> \<lceil>I\<rceil> \<Longrightarrow> \<lceil>I\<rceil> \<le> \<lceil>Q\<rceil> \<Longrightarrow> LOOP X INV I \<le> Ref \<lceil>P\<rceil> \<lceil>Q\<rceil>"

Output:
unfolding spec_def
using H_loopI
by blast


Input:
lemma transC_MtransT[simp]:
assumes "cf \<rightarrow>c cf'" and "cf' \<rightarrow>*t s''"
shows "cf \<rightarrow>*t s''"

Output: by (metis PL.MtransC_MtransT assms(1) assms(2) transC_MtransC)


Input: lemma observable3_equiv_observable2: "observable3 ob P = observable2 ob P"

Output: by (unfold observable3_def observable2_def) (auto)


Input: lemma strict2[simp,code_unfold]: " f x invalid = invalid"

Output: by(rule ext, simp add: def_scheme'' True_def False_def)


Input:
lemma finalStateNonApplicable:
  fixes state::State
  shows "isFinalState state F0 decisionVars =
          (\<not> applicableDecide state decisionVars \<and>
           \<not> applicableUnitPropagate state F0 \<and>
           \<not> applicableBacktrack state F0)"

Output:
unfolding isFinalState_def unfolding transition_def unfolding applicableDecide_def unfolding applicableUnitPropagate_def unfolding applicableBacktrack_def
by auto


Input:
lemma init_fin_bisim_wait_flip [flip_simps]:
  "FWbisimulation_base.init_fin_bisim_wait (flip bisim_wait) =
   flip (FWbisimulation_base.init_fin_bisim_wait bisim_wait)"

Output: by(auto simp add: fun_eq_iff FWbisimulation_base.init_fin_bisim_wait_simps flip_simps)


Input: lemma config'_embed: "config'_rand (embed A) (return_pmf s0) qs = return_pmf (config' A s0 qs)"

Output:
apply(induct qs arbitrary: s0)
apply(simp_all add: Step_def split_def bind_return_pmf)
by metis


Input:
lemma dlist_not_memb_remove:
  "\<not> member dl x \<Longrightarrow> remove x dl = dl"

Output: by descending (simp add: List.member_def)


Input: lemma non_Limit_ord_of_nat [iff]: "\<not> Limit (ord_of_nat m)"

Output: by (metis Limit_def mem_ord_of_nat_iff not_succ_Limit ord_of_eq_0_iff ord_of_minus_1)


Input:
lemma (in encoding) indRelRST_to_SRel:
  fixes SRel  :: "('procS \<times> 'procS) set"
    and TRel  :: "('procT \<times> 'procT) set"
    and SP SQ :: "'procS"
  assumes rel: "SourceTerm SP \<R>\<lbrakk>\<cdot>\<rbrakk>R<SRel,TRel> SourceTerm SQ"
  shows "(SP, SQ) \<in> SRel"

Output:
using rel
by (simp add: indRelRST.simps)


Input:
lemma relhoare_conj_right_cartesian [intro]:
  "\<lbrakk> {Domain pre} Ra {> I}; {Range pre} Rc {> J};
     {pre} Ra, Rc {> post} \<rbrakk>
  \<Longrightarrow> {pre} Ra, Rc {> post \<inter> I \<times> J}"

Output: by (force simp add: PO_rhoare_defs PO_hoare_defs Domain_def Range_def)


Input: lemma strictly_generalizes_neq: "strictly_generalizes D' D \<Longrightarrow> D' \<noteq> D \<cdot> \<sigma>"

Output:
unfolding strictly_generalizes_def generalizes_def
by blast


Input:
lemma rcp_specD2:
  assumes "rcp_spec rcp"
    and "h \<in> set (fst (rcp gs bs ps sps data))" and "b \<in> set gs \<union> set bs" and "fst b \<noteq> 0"
  shows "\<not> lt (fst b) adds\<^sub>t lt (fst h)"

Output:
using assms unfolding rcp_spec_def
by (elim allE conjE, blast)


Input: lemma wtC_wax_unprot[simp]: "\<lbrakk>\<not> unprot \<sigma>; \<not> isRes \<sigma> \<or> protCl \<sigma>\<rbrakk> \<Longrightarrow> GE.wtC (wax \<sigma>)"

Output:
unfolding wax_def GE.wtC_def
by simp


Input:
lemma points_index_one_unique_block:
  assumes "B index ps = 1"
  shows "\<exists>! bl . (bl \<in># B \<and> ps \<subseteq> bl)"

Output:
using assms points_index_gt0_impl_existance points_index_one_unique
by (metis zero_less_one)


Input:
lemma at_begin_norm_Bk[intro]:  "at_begin_norm (as, am) (q, aaa, []) ires
             \<Longrightarrow> at_begin_norm (as, am) (q, aaa, [Bk]) ires"

Output:
apply(simp add: at_begin_norm.simps)
by fastforce


Input:
lemma is_rbt_RBT_Impl_diag:
  "ord.is_rbt lt t \<Longrightarrow> ord.is_rbt (less_prod leq lt lt) (RBT_Impl_diag t)"

Output: by(simp add: ord.is_rbt_def rbt_sorted_RBT_Impl_diag inv_RBT_Impl_diag)


Input: lemma map_mdpc_compose: "map_mdpc f (map_mdpc g M) = map_mdpc (f \<circ> g) M"

Output: by (intro mdpc_eqI) (auto simp add: states_map_mdpc image_comp actions_map_mdpc image_UN map_pmf_compose[symmetric] vimage_comp[symmetric])


Input:
lemma right_unique_rel_converter:
  "\<lbrakk> right_total A; right_unique B; right_unique C; right_total R \<rbrakk> \<Longrightarrow> right_unique (rel_converter A B C R)"

Output:
unfolding right_unique_alt_def right_total_alt_def rel_converter_conversep[symmetric]
by(subst rel_converter_eq[symmetric], rule order_trans[OF rel_converter_pos_distr], erule (3) rel_converter_mono)


Input:
lemma path_post_concat:
assumes "path f (nl1 @ nl2)" and "nl2 \<noteq> Nil"
shows "path f nl2"

Output:
using assms
apply (induct nl1)
apply (metis append_Nil)
by (metis Nil_is_append_conv append_Cons path_post)


Input:
lemma AssertAllState''_sat_atoms_equiv_bounds:
  "\<triangle> t \<Longrightarrow> \<not> \<U> (assert_bound_loop ats (init t)) \<longrightarrow> flat (set ats) \<doteq> \<B> (assert_bound_loop ats (init t))"

Output:
using AssertAllState''_precond
using assert_bound_nolhs_atoms_equiv_bounds init_atoms_equiv_bounds
by (induct ats rule: rev_induct) (auto simp add: Let_def assert_bound_loop_def)


Input:
lemma closed_orbit_period_nonneg:
  assumes "closed_orbit x"
  shows "period x \<ge> 0"

Output:
unfolding period_def
using assms(1) unfolding closed_orbit_def
apply (auto intro!:cInf_greatest)
by (smt recurrence_time_flip_sign)


Input:
lemma \<E>_new_same_addr_singleton:
  assumes E: "E \<in> \<E>"
  shows "\<exists>a. new_actions_for P E adal \<subseteq> {a}"

Output: by(blast dest: \<E>_new_actions_for_fun[OF E])


Input:
lemma np_specI:
  assumes "\<And>gs bs hs data.
              snd ` set (np gs bs hs data) \<subseteq> set hs \<times> (set gs \<union> set bs \<union> set hs) \<and>
              set hs \<times> (set gs \<union> set bs) \<subseteq> snd ` set (np gs bs hs data) \<and>
              (\<forall>a b. a \<in> set hs \<longrightarrow> b \<in> set hs \<longrightarrow> a \<noteq> b \<longrightarrow> (a, b) \<in>\<^sub>p snd ` set (np gs bs hs data)) \<and>
              (\<forall>p q. (True, p, q) \<in> set (np gs bs hs data) \<longrightarrow> q \<in> set gs \<union> set bs)"
  shows "np_spec np"

Output:
unfolding np_spec_def
using assms
by meson


Input:
lemma test_bit_uint_transfer [transfer_rule]:
  \<open>(cr_uint ===> (=)) bit (!!)\<close>

Output:
unfolding test_bit_eq_bit
by transfer_prover


Input:
lemma cont_case_prod_iff:
  "\<lbrakk> monotone (rel_prod orda ordb) leq (case_prod f);
     class.preorder orda (mk_less orda); lub_singleton luba;
     class.preorder ordb (mk_less ordb); lub_singleton lubb \<rbrakk>
  \<Longrightarrow> cont (prod_lub luba lubb) (rel_prod orda ordb) lub leq (case_prod f) \<longleftrightarrow>
   (\<forall>x. cont lubb ordb lub leq (\<lambda>y. f x y)) \<and> (\<forall>y. cont luba orda lub leq (\<lambda>x. f x y))"

Output: by(blast dest: cont_case_prodD1 cont_case_prodD2 intro: cont_case_prodI)


Input: lemma S_transform_Not [simp]: "S_transform (Not x) = Not (S_transform x)"

Output:
unfolding S_transform_def
by (simp add: Not.abs_eq eq_onp_same_args)


Input:
lemma max_flow_val_unique:
  "\<lbrakk>is_max_flow_val fv1; is_max_flow_val fv2\<rbrakk> \<Longrightarrow> fv1=fv2"

Output:
unfolding is_max_flow_val_def isMaxFlow_def
by (auto simp: antisym)


Input: theorem sorted_merge_sort [simp, intro]: "sorted (merge_sort xs)"

Output: by (induction xs rule: merge_sort.induct) (subst merge_sort.simps, use sorted01 in auto)


Input: lemma I_valid: "I \<in> valid_states"

Output:
using wf_initial unfolding valid_states_def Dom_def I_def range_of_var_def
by (auto split:if_splits)


Input:
lemma tset_transfer [transfer_rule]:
  "(pcr_tllist (=) (=) ===> (=)) (lset \<circ> fst) tset"

Output: by(auto simp add: cr_tllist_def tllist.pcr_cr_eq)


Input: lemma finite_hsubst_c: "finite (hsubst_c n)"

Output:
unfolding hsubst_c_def
by (metis (full_types) finite_cont)


Input: lemma lsnd_ins_impl: "set_ins lsnd_\<alpha> lsnd_invar lsnd_ins"

Output: by (unfold_locales) (auto simp add: lsnd_defs in_set_member)


Input:
lemma finite_field_factorization_i[transfer_rule]:
  "(poly_rel ===> rel_prod R (list_all2 poly_rel))
     (finite_field_factorization_i p ff_ops) finite_field_factorization"

Output:
unfolding finite_field_factorization_i_def finite_field_factorization_def Let_def lead_coeff_i_def'
by transfer_prover


Input: lemma normalized_dst_ports_def2: "normalized_dst_ports ms = normalized_n_primitive (is_Dst_Ports, dst_ports_sel) (\<lambda>ps. case ps of L4Ports _ pts \<Rightarrow> length pts \<le> 1) ms"

Output: by(induction ms rule: normalized_dst_ports.induct, simp_all)


Input:
lemma deterministic_heap_ops_no_spurious_wakeups:
  "deterministic_heap_ops \<Longrightarrow> \<not> spurious_wakeups"

Output:
unfolding deterministic_heap_ops_def
by blast


Input: lemma ceq_equality: "ceq = Some eq \<Longrightarrow> equality eq"

Output: by (drule ceq, rule Equality_Generator.equalityI, simp)


Input:
lemma init_satisfies:
  "\<Turnstile> (init t)"

Output:
using init_satisfies_tableau init_satisfies_bounds init_tableau_id unfolding curr_val_satisfies_state_def satisfies_state_def
by simp


Input:
lemma need_second_arg_strict[simp]:
 "\<lbrakk>binop\<noteq>CondAnd; binop\<noteq>CondOr\<rbrakk> \<Longrightarrow> need_second_arg binop b"

Output: by (cases binop) (simp_all add: need_second_arg_def)


Input:
lemma "y0>0 \<Longrightarrow> test x0 y0 \<le> SPEC (\<lambda>S. S={y0 .. y0 + x0 - 1})"
  \<comment> \<open>Choosen pre-condition to get least trouble when proving\<close>

Output:
unfolding test_def
apply (intro WHILE_rule[where I="\<lambda>(S,x,y). x+y=x0+y0 \<and> x\<le>x0 \<and> S={y0 .. y0 + (x0-x) - 1}"] refine_vcg)
by auto


Input:
lemma decs_clock_monotone:
  "evaluate_decs ck mn env s d res \<Longrightarrow> ck = True \<Longrightarrow> (clock (fst res)) \<le> (clock s)"

Output: by (induction rule:evaluate_decs.inducts) (fastforce dest:dec_clock_monotone)+


Input:
lemma weak_reflection_of_barbs_and_closures:
  fixes Rel :: "('proc \<times> 'proc) set"
    and CWB :: "('proc, 'barbs) calculusWithBarbs"
  assumes reflection: "rel_weakly_reflects_barbs Rel CWB"
  shows "rel_weakly_reflects_barbs (Rel\<^sup>=) CWB"
    and "rel_weakly_reflects_barbs (Rel\<^sup>+) CWB"
    and "rel_weakly_reflects_barbs (Rel\<^sup>*) CWB"

Output:
using reflection reflection_of_binary_predicates_and_closures[where Rel="Rel" and Pred="\<lambda>P a. P\<Down><CWB>a"]
by blast+


Input:
lemma swap_Snapshot_Send:
  assumes
    "c \<turnstile> ev \<mapsto> d" and
    "d \<turnstile> ev' \<mapsto> e" and
    "isSnapshot ev" and
    "isSend ev'" and
    "c \<turnstile> ev' \<mapsto> d'" and
    "d' \<turnstile> ev \<mapsto> e'" and
    "occurs_on ev \<noteq> occurs_on ev'"
  shows
    "msgs e i = msgs e' i"

Output:
using assms swap_Send_Snapshot
by auto


Input:
lemma psi_lR_is_beta:
  "psi_l R = \<beta>"

Output:
unfolding psi_l_def alpha_l_def beta_l_def R_and_a_half_\<theta>
by auto


Input: lemma evaldjf_ex: "Ifm bbs bs (evaldjf f ps) \<longleftrightarrow> (\<exists>p \<in> set ps. Ifm bbs bs (f p))"

Output: by (induct ps) (simp_all add: evaldjf_def djf_Or)


Input:
lemma outgoing_transitions_fprod_deterministic:
"(\<And>s b ba bb bc.
(((s, b), ba), ((s, bb), bc)) \<in> fset (outgoing_transitions e s) \<times> fset (outgoing_transitions e s)
\<Longrightarrow> b \<noteq> bb \<or> ba \<noteq> bc \<Longrightarrow> Label ba = Label bc \<Longrightarrow> \<not>choice ba bc)
\<Longrightarrow> deterministic e"

Output:
apply (rule outgoing_transitions_deterministic)
apply clarify
by (metis SigmaI fmember_implies_member in_outgoing)


Input: lemma spr_repMC_S5n[intro, simp]: "S5n (spr_repMC X)"

Output:
unfolding spr_repRels_def
by (intro S5nI equivI refl_onI symI transI) auto


Input: lemma PO_l2_inv8 [iff]: "reach l2 \<subseteq> l2_inv8"

Output: by (rule_tac J="l2_inv1 \<inter> l2_inv3" in inv_rule_incr) (auto)


Input:
lemma circline_set_positive_x_axis_I [simp]:
  assumes "is_real z" and "Re z > 0"
  shows "of_complex z \<in> positive_x_axis"

Output:
using assms unfolding positive_x_axis_def
by simp


Input: lemma preorder [cont_intro, simp]: "class.preorder leq (mk_less leq)"

Output: by(unfold_locales)(auto simp add: mk_less_def intro: leq_refl leq_trans)


Input:
lemma equivalentFormulaeTransitivity:
  fixes formula1 :: Formula and formula2 :: Formula and formula3 :: Formula
  assumes "equivalentFormulae formula1 formula2" and "equivalentFormulae formula2 formula3"
  shows "equivalentFormulae formula1 formula3"

Output:
using assms unfolding equivalentFormulae_def
by auto


Input: lemma l6: "prod Prod S2 = \<Prod> S1"

Output:
using prod.Union_disjoint[of S2 "\<lambda>x. x"] l3 l4 l5 unfolding comp_def
by auto


Input:
lemma padl_inj:
  shows "inj_on (padl m) (carrier_vec n :: 'a vec set)"

Output:
apply(intro inj_onI)
using append_vec_eq[OF zero_carrier_vec zero_carrier_vec]
by auto


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

Output:
unfolding rel_def
by tagged_solver


Input:
lemma swap_Op_simp[simp]:
assumes "goodInp inp"  "goodBinp binp"
shows "((Op delta inp binp) #[x1 \<and> x2]_xs) =
       Op delta (inp %[x1 \<and> x2]_xs) (binp %%[x1 \<and> x2]_xs)"

Output: by (metis Op_asInp_asTerm_qOp Op_def asTerm_qSwap_swap assms(1) assms(2) goodBinp_imp_qGoodBinp_pickBinp goodInp_imp_qGoodInp_pickInp qGood_qGoodInp qSwapBinp_preserves_qGoodBinp qSwapInp_preserves_qGoodInp qSwap_qSwapInp swapBinp_def2 swapInp_def2)


Input: lemma "check_simple_fw_preconditions [Rule (MatchAnd MatchAny MatchAny) Drop]"

Output: by(simp add: check_simple_fw_preconditions_def normalized_ifaces_def normalized_protocols_def)


Input: lemma r_cons [simp]: "eval r_cons [e, es] \<down>= e_cons e es"

Output:
unfolding r_cons_def
using r_cons_else_prim r_cons_else e_cons_elementary
by simp


Input:
lemma vrat_inverse_transfer[transfer_rule]:
  includes lifting_syntax
  shows "(cr_vrat ===> cr_vrat) (vrat_inverse_app) (inverse)"

Output:
using vrat_fsingleton_in_fproduct_vrat
by (intro rel_funI, unfold vrat_inverse_def cr_vrat_def cr_scalar_def) (simp add: nat_omega_simps)


Input:
lemma zero_one_eint_neq:
  "\<not> 0 = (1::eint)"
  "\<not> 1 = (0::eint)"

Output:
unfolding zero_eint_def one_eint_def
by simp_all


Input: lemma eclose_hinsert [simp]: "eclose (b \<triangleleft> a) = eclose b \<squnion> (eclose a \<triangleleft> a)"

Output: by (metis eclose_singleton eclose_sup hinsert_eq_sup)


Input:
lemma map2_val_compat'D1:
  assumes "map2_val_compat' f" and "oalist_inv zs"
  shows "oalist_inv (f zs)"

Output:
using assms unfolding map2_val_compat'_def
by blast


Input:
lemma rotation_minus_pi_2_x_axis [simp]:
  shows "moebius_circline (moebius_rotation (-pi/2)) x_axis = y_axis"

Output:
unfolding moebius_rotation_def moebius_similarity_def
by (transfer, transfer, simp add: mat_adj_def mat_cnj_def)


Input: lemma wf_graph_remove_edges: "wf_graph \<lparr> nodes = V, edges = E \<rparr> \<Longrightarrow> wf_graph \<lparr> nodes = V, edges=E - X\<rparr>"

Output: by (metis delete_edges_simp2 delete_edges_wf select_convs(1) select_convs(2))


Input:
lemma
  assumes "z1 \<noteq> z2" and "z1 \<noteq> \<infinity>\<^sub>h"
  shows "ratio z1 z2 z1 = \<infinity>\<^sub>h"

Output:
using assms unfolding ratio_def
using divide_zero_right[of "z1 -\<^sub>h z2"]
using sub_eq_zero_iff[of z1 z2]
by simp


Input: lemma iso3_sharp [simp]: "d (d (x \<sqinter> nc) \<cdot> nc) = d (x \<sqinter> nc)"

Output:
using d_s_subid local.c4 local.d_def local.inf_le1
by auto


Input:
lemma chine_composite_in_hom [intro]:
    shows "\<guillemotleft>Chn (\<mu> \<star> \<nu>) : \<mu>.dom.leg0 \<down>\<down> \<nu>.dom.leg1 \<rightarrow>\<^sub>C \<mu>.cod.leg0 \<down>\<down> \<nu>.cod.leg1\<guillemotright>"

Output:
using hcomp_def chine_hcomp_props(1) composable
by auto


Input:
lemma consistent_prv_eql_tms_times_rev:
assumes "consistent" "prv (eql (tms (Num m) (Num n)) (Num k))"
shows "k = m * n"

Output: by (metis Num assms consistent_def eql not_times_prv_neg_eql_tms num tms prv_neg_fls subsetCE)


Input:
lemma alw_HLD_smap:
  "alw (HLD (f ` S)) (smap f \<omega>)" if "alw (HLD S) \<omega>"

Output:
using that
by (auto 4 3 elim: HLD_mono alw_mono)


Input:
lemma spr_simAbs_tObsC_abs[simp]:
  assumes tC: "t \<in> SPR.jkbpC"
      and ec: "spr_simAbs ec = SPRdet.sim_equiv_class a t"
  shows "toSet (fst ec) = tObsC_abs t"

Output:
using tC spr_simAbs_refl[OF tC ec] unfolding spr_sim_def spr_simAbs_def
by auto


Input: lemma chopOneContinue: "dpt \<noteq> Leaf \<Longrightarrow> domainNameDeptChopOne (name -- dpt) = name -- domainNameDeptChopOne (dpt)"

Output:
apply(case_tac dpt)
by simp_all


Input:
lemma parallel_resource_parametric [transfer_rule]: includes lifting_syntax shows
  "(rel_resource A B ===> rel_resource C D ===> rel_resource (rel_sum A C) (rel_sum B D))
   parallel_resource parallel_resource"

Output:
unfolding parallel_resource_def
by transfer_prover


Input:
lemma extended_Gromov_product_nonneg [mono_intros, simp]:
  "0 \<le> extended_Gromov_product_at e x y"

Output:
unfolding extended_Gromov_product_at_def
by (rule Inf_greatest, auto intro: Liminf_bounded always_eventually)


Input: lemma set_of_conv: "set_tries = maps.set_of lookup_tries"

Output: by(rule ext) (auto simp add: set_tries_def map.set_of_def)


Input: lemma eovisidifmifiOm:"(e \<union>  ov\<inverse> \<union> s\<inverse> \<union> d\<inverse> \<union> f \<union> m\<inverse> \<union> f^-1) O m \<subseteq> m \<union> ov \<union> f^-1 \<union> d^-1 \<union> s \<union> s\<inverse> \<union> e"

Output:
apply (simp, intro conjI)
using cem
apply blast
using crm_rules
by auto


Input:
lemma set_child_nodes_is_l_set_child_nodes [instances]:
  "l_set_child_nodes type_wf set_child_nodes set_child_nodes_locs"

Output:
apply(unfold_locales)
using set_child_nodes_pointers_preserved set_child_nodes_typess_preserved set_child_nodes_writes
by blast+


Input:
lemma \<Phi>_simp:
    assumes YX: "DopxC.ide yx"
    shows "\<Phi>.map yx =
           S.mkArr (HomC.set (F (fst yx), snd yx)) (HomD.set (fst yx, G (snd yx)))
                   (inD o \<phi> (fst yx) o HomC.\<psi> (F (fst yx), snd yx))"

Output:
using YX \<Phi>o_def
by simp


Input:
lemma Retr_incl:
"\<And>theta. Sretr theta \<subseteq> ZOretrT theta"
(*  *)
"\<And>theta. ZOretrT theta \<subseteq> ZOretr theta"
(*  *)
"\<And>theta. ZOretrT theta \<subseteq> WretrT theta"
(*  *)
"\<And>theta. ZOretr theta \<subseteq> Wretr theta"
(*  *)
"\<And>theta. WretrT theta \<subseteq> Wretr theta"
(*  *)
"\<And>theta. WretrT theta \<subseteq> RetrT theta"

Output:
unfolding Retr_defs
by auto


Input: lemma p_fusion_hd: "\<lbrakk>ps \<noteq> []; qs \<noteq> []\<rbrakk> \<Longrightarrow> hd (p_fusion ps qs) = hd ps"

Output: by (metis list.exhaust p_fusion.simps(3) append_Cons list.sel(1))


Input:
lemma (in encoding) enc_reflects_pred_iff_indRelL_preserves_pred:
  fixes Pred :: "('procS, 'procT) Proc \<Rightarrow> bool"
  shows "enc_reflects_pred Pred = rel_preserves_pred indRelL Pred"

Output:
using enc_reflects_pred_iff_indRelR_reflects_pred[where Pred="Pred"] indRelR_reflects_pred_iff_indRelL_preserves_pred[where Pred="Pred"]
by blast


Input:
theorem equivalence_of_partition:
  "Equivalence = E"

Output:
unfolding Equivalence_def unfolding Partition_def
by auto (metis ClassD Class_closed Class_eq)


Input: lemma "(Abs_perm id :: nat perm) \<bullet> Suc 0 = Suc 0"

Output:
unfolding permute_atom_def
by (metis Rep_perm_0 id_apply zero_perm_def)


Input:
lemma mult_mult_trm_ord_trans:
  shows "trans (mult (mult trm_ord))"

Output: by (metis (no_types, lifting) mult_def transI transitive_closure_trans(2))


Input:
lemma llist_all2_cons_fusion3 [stream_fusion]:
  "llist_all2_cons g (lgenerator h) P sg sh \<longleftrightarrow> llist_all2 P (lunstream g sg) (lunstream' h sh)"

Output: by transfer(rule llist_all2_cons_def)


Input:
lemma exec_step_ind_equiv:
 "exec_step P h stk loc C M pc ics frs sh = (xp', h', frs', sh')
   = exec_step_ind (exec_step_input P C M pc ics) P h stk loc C M pc ics frs sh (xp', h', frs', sh')"

Output:
using exec_step_imp_exec_step_ind exec_step_ind_imp_exec_step
by auto


Input:
lemma (in \<Z>) smc_Par_obj_terminal_obj_initial:
  "obj_initial (smc_Par \<alpha>) A \<longleftrightarrow> obj_terminal (smc_Par \<alpha>) A"

Output:
unfolding smc_Par_obj_initial smc_Par_obj_terminal
by simp


Input:
lemma RP_state_component_2 :
  assumes "io \<in> (RP M2 s vs xs V'')"
  and     "observable M2"
shows "io_targets M2 (initial M2) io = {s}"

Output: by (metis (mono_tags, lifting) RP.simps R_state_component_2 Un_iff assms mem_Collect_eq)


Input: lemma wf_ruleset_append: "wf_ruleset \<gamma> p (rs1@rs2) \<longleftrightarrow> wf_ruleset \<gamma> p rs1 \<and> wf_ruleset \<gamma> p rs2"

Output: by(auto simp add: wf_ruleset_def)


Input:
lemma ZObisT_prefix:
"ZObisT \<subseteq> ZOretrT ZObisT"

Output:
unfolding ZObisT_def
using mono_Retr bis_prefix
by blast


Input:
lemma bisim_max_vars: "bisim Vs e e' xs \<Longrightarrow> max_vars e = max_vars e'"
  and bisims_max_varss: "bisims Vs es es' xs \<Longrightarrow> max_varss es = max_varss es'"

Output:
apply(induct rule: bisim_bisims.inducts)
apply(auto simp add: max_vars_compE1 max_varss_compEs1) done


Input:
lemma lookup_fresh':
  assumes a: "z\<sharp>\<theta>"
  shows "lookup \<theta> z = Var z"

Output:
using a
by (induct rule: lookup.induct) (auto simp add: fresh_list_cons fresh_prod fresh_atm)


Input: lemma Arccos_bounds: "\<bar>Re z\<bar> < 1 \<Longrightarrow> 0 < Re(Arccos z) \<and> Re(Arccos z) < pi"

Output:
unfolding Re_Arccos
by (blast intro!: Im_Ln_pos_lt_imp Arccos_range_lemma)


Input: lemma in_cenum: "ID cEnum = Some (enum, rest) \<Longrightarrow> f \<in> set enum"

Output: by(cases rest)(auto dest: ID_cEnum)


Input: lemma proj_ord_POT [code]: "proj_ord (POT to) = proj_ord to"

Output:
proof - have "nat_term_compare (proj_ord (POT to)) = nat_term_compare (proj_ord to)"
by (simp add: nat_term_compare_proj_ord nat_term_compare_POT proj_comp_def pot_comp rep_nat_term_prod_def rep_nat_term_pp_def) thus ?thesis
by (simp only: nat_term_compare_inject)
qed


Input: lemma Arg_lt_pi: "0 < Arg z \<and> Arg z < pi \<longleftrightarrow> 0 < Im z"

Output:
using Arg_less_0 [of z] Im_Ln_pos_lt
by (auto simp: order.order_iff_strict Arg_def)


Input: lemma NegativeArraySize_not_Object[simp]: "NegativeArraySize \<noteq> Object"

Output: by(simp add: NegativeArraySize_def Object_def)


Input: lemma list_mwb_lens: "mwb_lens (list_lens x)"

Output: by (unfold_locales, simp_all add: list_lens_def nth'_list_augment list_augment_same_twice)


Input:
lemma tensor_mat_add2:
  assumes "m1 \<in> carrier_mat d1 d1"
    and "m2 \<in> carrier_mat d2 d2"
    and "m3 \<in> carrier_mat d2 d2"
  shows "tensor_mat m1 (m2 + m3) = tensor_mat m1 m2 + tensor_mat m1 m3"

Output:
apply (rule eq_matI, auto) unfolding tensor_mat_eval
using assms(3) semiring_class.distrib_left
by force


Input:
lemma valid_valid':
  "valid l \<Longrightarrow> valid' l"

Output: by (induction rule: valid.induct) (auto 4 4 intro: valid'.intros elim: valid'.cases simp: replicate_add[symmetric] append_assoc[symmetric] )


Input: lemma def_valid_then_def: "\<upsilon>(f x y) = (\<delta>(f x y))"

Output:
apply(rule ext, rename_tac "\<tau>")
apply(simp_all add: valid_def defined_def def_scheme'' True_def False_def invalid_def None_def None_fun_def None_option_def bot_fun_def)
by (metis "1" OclValid_def def_scheme'' foundation16 True_def)


Input:
lemma mem_val_alt_10_mem_equal_3: "mem_equal s1 s2 pa \<Longrightarrow>
mem_val_alt 10 ((pa AND 68719476732) + 3) s1 = mem_val_alt 10 ((pa AND 68719476732) + 3) s2"

Output:
apply (simp add: mem_val_alt_def)
apply (simp add: Let_def)
apply (simp add: mem_equal_def)
by (metis option.distinct(1))


Input:
lemma trunc_closed:
  assumes "f \<in> carrier P"
  shows "trunc f \<in> carrier P"

Output:
using assms unfolding truncate_def
by (metis ltrm_closed P_def UP_ring.UP_ring UP_ring_axioms leading_term_def ring.ring_simprules(4))


Input: lemma cont_eff: "cont_eff cf b = (cont (fst cf) (snd cf) b, eff (fst cf) (snd cf) b)"

Output:
unfolding cont_eff_def cont_def eff_def
by simp


Input:
lemma pi_ias[proper_it]:
  "proper_it' ias.iteratei ias.iteratei"
  "proper_it' ias.iterateoi ias.iterateoi"
  "proper_it' ias.rev_iterateoi ias.rev_iterateoi"

Output:
unfolding ias.iteratei_def[abs_def] ias.iterateoi_def[abs_def] ias.rev_iterateoi_def[abs_def]
apply (rule proper_it'I icf_proper_iteratorI)+ done


Input: lemma cbi_alpha1ialpha4mi:"b^-1 O ( e \<union> ov\<inverse> \<union> s\<inverse> \<union> d\<inverse> \<union> f \<union> f\<inverse> \<union> m\<inverse>) \<subseteq>  b^-1"

Output:
apply (simp, intro conjI)
using cbi_rules
by auto


Input: lemma Inf_upset_id [simp]: "Inf \<circ> \<up> = id"

Output: by (metis comp_assoc comp_id Sup_downset_id Sups_dual_def downset_upset_dual invol_dual)


Input:
lemma merge_length1_nonempty:
  assumes "merge as bs us vs" "as \<in> lists (- {[]})"
  shows "us \<in> lists (- {[]})"

Output:
using assms
by induction (auto simp: mem_lists_non_Nil)


Input:
lemma branch_instr_sub1_low_equal:
assumes a1: "low_equal s1 s2"
shows "branch_instr_sub1 instr_name s1 = branch_instr_sub1 instr_name s2"

Output:
using a1
apply (simp add: branch_instr_sub1_def)
by (simp add: low_equal_def)


Input:
lemma cupcake_single_preserve:
  "cupcake_evaluate_single env e (Rval res) \<Longrightarrow> is_cupcake_all_env env \<Longrightarrow> is_cupcake_exp e \<Longrightarrow> is_cupcake_value res"

Output: by (fastforce dest:cupcake_single_preserve0)


Input: lemma termMOD_iwlsFSb: "iwlsFSb termMOD"

Output:
unfolding iwlsFSb_def
using termMOD_igWlsAllDisj termMOD_igWlsAbsIsInBar termMOD_igConsIPresIGWls termMOD_igSubstAllIPresIGWlsAll termMOD_igFreshCls termMOD_igSubstCls termMOD_igAbsRen
by auto


Input: lemma stutter_reduced_reduced: "\<natural>\<natural>\<sigma> = \<natural>\<sigma>"

Output: by (insert stutter_reduced_suffix[of 0 "\<sigma>", simplified])


Input:
lemma cexpr_sem_expr_rf_to_cexpr:
     "randomfree e \<Longrightarrow> cexpr_sem \<sigma> (expr_rf_to_cexpr e) = expr_sem_rf \<sigma> e"

Output: by (induction e arbitrary: \<sigma>) (auto simp: cexpr_sem_cexpr_subst)


Input:
lemma exec_meth_length_compE2_stack_xliftD:
  "exec_meth ci P (compE2 e) (stack_xlift d (compxE2 e 0 0)) t h (stk, loc, pc, xcp) ta h' s'
  \<Longrightarrow> pc < length (compE2 e)"

Output: by(cases s')(auto simp add: stack_xlift_compxE2)


Input:
lemma foldl_prs_aux:
  assumes a: "Quotient3 R1 abs1 rep1"
  and     b: "Quotient3 R2 abs2 rep2"
  shows "abs1 (foldl ((abs1 ---> abs2 ---> rep1) f) (rep1 e) (map rep2 l)) = foldl f e l"

Output: by (induct l arbitrary:e) (simp_all add: Quotient3_abs_rep[OF a] Quotient3_abs_rep[OF b])


Input: lemma any_Err [iff]: "P \<turnstile> T \<le>\<^sub>\<top> Err"

Output: by (unfold sup_ty_opt_def) (rule le_Err [simplified lesub_def])


Input:
lemma "taint_labels = (let (Enc_A, Dec_A) = mk_Enc_Dec_pair {''A''};
                             (Enc_B, Dec_B) = mk_Enc_Dec_pair {''B''};
                             (Enc_C, Dec_C) = mk_Enc_Dec_pair {''C''}
                       in [
                           ''Sensors_A'' \<mapsto> TaintsUntaints {''A''} {},
                           ''Sensors_B'' \<mapsto> TaintsUntaints {''B''} {},
                           ''Sensors_C'' \<mapsto> TaintsUntaints {''C''} {},

                           ''Encryption_A'' \<mapsto> Enc_A,
                           ''Encryption_B'' \<mapsto> Enc_B,
                           ''Encryption_C'' \<mapsto> Enc_C,

                           ''C3PO_Dec_A'' \<mapsto> Dec_A,
                           ''C3PO_Dec_B'' \<mapsto> Dec_B,
                           ''C3PO_Dec_C'' \<mapsto> Dec_C,

                           ''C3PO_Storage'' \<mapsto> TaintsUntaints {''A'',''B'',''C''} {}
                           ])"

Output: by(simp add: taint_labels_def mk_Enc_Dec_pair_def)


Input:
lemma (in category) cat_obj_None_obj_iso:
  \<comment>\<open>see Chapter I-5 in \cite{mac_lane_categories_2010}.\<close>
  assumes "obj_None \<CC> z" and "obj_None \<CC> z'"
  shows "z \<approx>\<^sub>o\<^sub>b\<^sub>j\<^bsub>\<CC>\<^esub> z'"

Output:
using assms
by (simp add: cat_obj_terminal_obj_iso obj_NoneD(2))


Input:
lemma Conj_eqvt [simp]:
  assumes "finite (supp xset)"
  shows "p \<bullet> Conj xset = Conj (p \<bullet> xset)"

Output:
using assms unfolding Conj_def
by simp


Input:
lemma element_ptr_kinds_commutes [simp]:
  "cast element_ptr |\<in>| node_ptr_kinds h \<longleftrightarrow> element_ptr |\<in>| element_ptr_kinds h"

Output:
apply(auto simp add: node_ptr_kinds_def element_ptr_kinds_def)[1]
by (metis (no_types, lifting) element_ptr_casts_commute2 ffmember_filter fimage_eqI fset.map_comp is_element_ptr_kind_none node_ptr_casts_commute3 node_ptr_kinds_commutes node_ptr_kinds_def option.sel option.simps(3))


Input: lemma thunks_domA: "thunks \<Gamma> \<subseteq> domA \<Gamma>"

Output: by (induction \<Gamma> ) (auto simp add: thunks_def)


Input:
lemma Abs'_0:
  shows "Abs' (CARD('a))=(0::'a)"

Output: by (metis (hide_lams, mono_tags) Abs'_def mod_self zero_def)


Input: lemma obs_none_no_kth_obs: assumes \<open>obs \<sigma> k = None\<close> shows \<open>\<not> (\<exists> i. is_kth_obs (path \<sigma>) k i)\<close>

Output:
apply rule
using assms unfolding obs_def obsp_def
apply (auto split: option.split_asm)
by (metis assms kth_obs_not_none kth_obs_unique obs_def option.distinct(2) the_equality)


Input: lemma intY1_mono: "monotone (\<lambda> x \<in> intY1. f x) intY1 (induced intY1 r)"

Output:
apply (auto simp add: monotone_def induced_def intY1_f_closed)
apply (blast intro: intY1_elem monotone_f [THEN monotoneE]) done


Input:
lemma plays_from_strategy_chain_Suc:
  shows "prefix (strategy_progression \<sigma> p  $  n) (strategy_progression \<sigma> p  $  Suc n)"

Output:
unfolding strategy_progression_def
by (auto simp:take_Suc_prefix nth_prefixes lnth_lappend nth_prefixes_is_prefix_tl augment_list_prefix)


Input: lemma ideal_S1_and: "and_secret_sharing.Ideal1 (a1, b1) (a2, b2) s2 = S1_and' (a1, b1) (a2, b2) s2"

Output: by(simp add: Let_def and_secret_sharing.Ideal1_def S1_and'_def split_def out1_def S1_and_def)


Input:
lemma \<E>_new_same_addr_singleton:
  assumes E: "E \<in> \<E>"
  shows "\<exists>a. new_actions_for P E adal \<subseteq> {a}"

Output: by(blast dest: \<E>_new_actions_for_fun[OF E])


Input:
lemma image_filter_cartesian_product_alt:
    "image_filter_cartesian_product f s1 s2 ==
     iterate_to_set s3.empty s3.ins (set_iterator_image_filter f (
       set_iterator_product (s1.iteratei s1) (\<lambda>_. s2.iteratei s2)))"

Output:
unfolding image_filter_cartesian_product_def iterate_to_set_alt_def set_iterator_image_filter_def set_iterator_product_def
by simp


Input:
lemma unit_disc_fix_moebius_add [simp]:
  assumes "unit_disc_fix M1" and "unit_disc_fix M2"
  shows "unit_disc_fix (M1 + M2)"

Output:
using assms unfolding unit_disc_fix_iff_ounit_circle
by auto


Input: lemma PO_m2_sat_m1_inv2i_serv [iff]: "reach m2 \<subseteq> m1_inv2i_serv"

Output: by (rule_tac Pa=m1_inv2i_serv and Qa=m1_inv2i_serv and Q=m1_inv2i_serv in m2_implements_m1 [THEN [5] internal_invariant_translation]) (auto simp add: m2_loc_defs med21_def intro!: m1_inv2i_servI)


Input: lemma finite_summaries: "finite {xs. distinct xs \<and> (\<forall>(l1, s, l2) \<in> set xs. s \<in>\<^sub>A weights l1 l2)}"

Output:
apply (rule finite_subset[OF _ finite_distinct_bounded[of "((\<lambda>((l1,l2),s). (l1,s,l2)) ` (Sigma UNIV (\<lambda>(l1,l2). set_antichain (weights l1 l2))))"]])
apply (force simp: finite_set_summaries)+ done


Input:
lemma interrupt_action_ok_correct [simp]:
  "is_invar is \<Longrightarrow> interrupt_action_ok is ia \<longleftrightarrow> FWInterrupt.interrupt_action_ok (is_\<alpha> is) ia"

Output: by(cases ia)(auto simp add: is.memb_correct)


Input:
theorem cond_2r:
  assumes "u_max \<ge> other.s_stop"
  shows "collision_react {0 ..}"

Output:
using assms
apply(intro collision_react_subset[where t="{0..}" and s ="{0 .. max t_stop other.t_stop}"])
apply(intro u_other_ivt[where t ="max t_stop other.t_stop"])
apply(auto simp: u_eq_u_stop other.s_eq_s_stop) done


Input:
lemma interaction_bounded_by_upf_dec_Inr [interaction_bound]:
  "interaction_bounded_by (Not \<circ> isl) (intercept_upf_dec LD c) 1"

Output:
unfolding intercept_upf_dec_def case_prod_app
by(interaction_bound, clarsimp simp add: SUP_constant split: prod.split)


Input:
lemma "is_cons_cluster C \<Longrightarrow> quorum C"
  \<comment> \<open>Every consensus cluster is a quorum.\<close>

Output:
unfolding is_cons_cluster_def
by (metis inf.order_iff l1 quorum_of_def stellar.quorum_def stellar_axioms)


Input:
lemma Cinfinite_ctwo_cexp:
  "Cinfinite r \<Longrightarrow> Cinfinite (ctwo ^c r)"

Output:
unfolding ctwo_def cexp_def cinfinite_def Field_card_of
by (rule conjI, rule infinite_Func, auto)


Input:
lemma (in pre_digraph) digraph_isomorphism_subgraphI:
  assumes "digraph_isomorphism hom"
  assumes "subgraph H G"
  shows "pre_digraph.digraph_isomorphism H hom"

Output:
using assms
by (auto simp: pre_digraph.digraph_isomorphism_def subgraph_def compatible_def intro: subset_inj_on)


Input: lemma square_free_MP_Rel [transfer_rule]: "(MP_Rel ===> (=)) square_free_m square_free"

Output:
unfolding square_free_m_def[abs_def] square_free_def[abs_def]
by (transfer_prover_start, transfer_step+, auto)


Input:
lemma list_of_dlist_map[simp]:
  "list_of_dlist (map f dxs) = remdups (List.map f (list_of_dlist dxs))"

Output: by descending (simp add: remdups_map_remdups)


Input: lemma get_root_node_si_is_l_get_root_node [instances]: "l_get_root_node get_root_node_si get_parent"

Output:
apply(simp add: l_get_root_node_def)
using get_root_node_si_no_parent
by fast


Input:
lemma mbisim_deadlock_inv:
  "s1 \<approx>m s2 \<Longrightarrow> r1.deadlock s1 = r2.deadlock s2"

Output:
unfolding r1.deadlock_eq_deadlocked' r2.deadlock_eq_deadlocked'
by(rule mbisim_deadlocked'_inv)


Input: lemma termMOD_igWlsAbsDisj: "igWlsAbsDisj termMOD"

Output:
unfolding igWlsAbsDisj_def
using wlsAbs_disjoint
by auto


Input:
lemma hcomp_simps\<^sub>W\<^sub>C [simp]:
    assumes "\<nu> \<star> \<mu> \<noteq> None"
    shows "arr (\<nu> \<star> \<mu>)" and "dom (\<nu> \<star> \<mu>) = dom \<nu> \<star> dom \<mu>" and "cod (\<nu> \<star> \<mu>) = cod \<nu> \<star> cod \<mu>"

Output:
using assms preserves_arr preserves_dom preserves_cod VoV.arr_char VoV.inclusion VoV.dom_simp VoV.cod_simp
by force+


Input:
lemma cart_alt: "cart s1 s2 ==
    inj_image_filter_cartesian_product Some s1 s2"

Output:
unfolding cart_def inj_image_filter_cartesian_product_def
by simp


Input: lemma Gramian_determinant_0 [simp]: "Gramian_determinant G 0 = 1"

Output:
unfolding Gramian_determinant_def Gramian_matrix_def Let_def
by (simp add: times_mat_def)


Input:
lemma consistent_prv_LLq_Num_leq:
assumes consistent  "prv (LLq (Num m) (Num n))"
shows "m \<le> n"

Output: by (metis Num assms consistent_def LLq not_leq_prv_neg_LLq_Num num prv_neg_fls subsetCE)


Input:
lemma map_generat_lub [simp]:
  "map_generat f g h (generat_lub lub1 lub2 lub3 A) = generat_lub (f \<circ> lub1) (g \<circ> lub2) (h \<circ> lub3) A"

Output: by(simp add: generat_lub_def o_def)


Input:
lemma wellFormedSimp[simp]:
  fixes \<sigma> :: "(('d::fs_name) list \<times> ('e::fs_name) list) list"
  and   p :: "name prm"

  shows "wellFormedSubst(p \<bullet> \<sigma>) = wellFormedSubst \<sigma>"

Output: by(induct \<sigma>) (auto simp add: eqvts wellFormedSubst_def)


Input:
lemma span_with:
  "span = (\<lambda>X. span_with (+) 0 scale X)"

Output: unfolding span_explicit span_with_def sum_with ..


Input:
lemma n_replace_proj_le_n_as_2:
  fixes a vs vs'
  assumes "(vs \<subseteq> vs')" "(varset_action a vs')"
  shows "(varset_action (action_proj a vs') vs \<longleftrightarrow> varset_action a vs)"

Output:
unfolding varset_action_def action_proj_def
using assms
by (simp add: exec_drest_5 varset_action_def) \<comment> \<open>NOTE type of `PROB` had to be fixed for use of `empty\_problem\_bound`.\<close>


Input:
lemma subst_typ'_preserves_term_ok':
  assumes "wf_theory \<Theta>"
  assumes "inst_ok \<Theta> insts"
  assumes "term_ok' (sig \<Theta>) t"
  shows "term_ok' (sig \<Theta>) (subst_typ' insts t)"

Output:
using assms term_ok'_subst_typ' typ_ok_def
by (metis list.pred_mono_strong wf_theory_imp_is_std_sig wf_type_imp_typ_ok_sig)


Input:
lemma merge0:
  assumes idx: "idx_sequence idx"
  shows "merge ws idx 0 = ws 0 0"

Output:
proof (rule merge[OF idx]) from idx have "idx 0 < idx (Suc 0)" unfolding idx_sequence_def
by blast with idx show "0 \<in> {idx 0 ..< idx (Suc 0)}"
by (simp add: idx_sequence_def)
qed


Input:
lemma line_param:
  shows "z1 + cor k * (z2 - z1) \<in> line z1 z2"

Output:
unfolding line_def
by (auto simp add: collinear_def)


Input: lemma map_FGcontra_id0: "map_FGcontra id id id id id id id id id id id = id"

Output:
unfolding map_FGcontra_def
by (simp add: map_F_id0 map_G_id0)


Input:
lemma bpc_to_sa_run_conv[simp]:
  "graph_defs.is_run (bpc_to_sa bpc) = bpc_is_run bpc"

Output:
apply (rule ext) unfolding graph_defs.is_run_def unfolding bpc_to_sa_def bpc_is_run_def ipath_def E_of_succ_def
by auto


Input: lemma bisims1_lengthD: "P, es, h \<turnstile> (es', xs) [\<leftrightarrow>] s \<Longrightarrow> length es = length es'"

Output:
apply(induct es arbitrary: es' s)
apply(auto elim: bisims1.cases) done


Input: lemma Least_True_nat[intro, simp]: "(LEAST i::nat. True) = 0"

Output: by (metis (lifting) One_nat_def less_one not_less_Least not_less_eq)


Input:
lemma runE'[run_elims]:
  assumes "run (f \<then> g) \<sigma> \<sigma>'' res"
  obtains \<sigma>t rt where
    "run f \<sigma> \<sigma>t rt"
    "run g \<sigma>t \<sigma>'' res"

Output:
using assms
by (rule_tac runE)


Input: lemma strict[simp,code_unfold]: " f invalid = invalid"

Output: by(rule ext, simp add: def_scheme True_def False_def)


Input:
lemma it_to_it_fold: "proper_it it (it'::('x,'\<sigma>) set_iterator)
    \<Longrightarrow> it_to_it it = it'"

Output:
unfolding it_to_it_def
by (simp add: proper_it_fold)


Input: lemma right_total_mod_ring_rel [transfer_rule]: "right_total mod_ring_rel"

Output:
unfolding mod_ring_rel_def right_total_def
by simp


Input: lemma ring_finite_field_ops32: "ring_ops (finite_field_ops32 pp) mod_ring_rel32"

Output: by (unfold_locales, auto simp: finite_field_ops32_def bi_unique_mod_ring_rel32 right_total_mod_ring_rel32 mod_ring_plus32 mod_ring_minus32 mod_ring_uminus32 mod_ring_mult32 mod_ring_eq32 mod_ring_0_32 mod_ring_1_32 Domainp_mod_ring_rel32)


Input:
lemma bisim_red_red0_final0D:
  "\<lbrakk> bisim_red_red0 (x1, m1) (x2, m2); final_expr0 x2 \<rbrakk> \<Longrightarrow> final_expr x1"

Output: by(erule bisim_red_red0.cases) auto


Input:
lemma brnL_pickFT_BrnFT[simp]:
assumes "properL cl" and "WtFT cl = 1"
shows "brnL cl (pickFT cl) \<in> BrnFT cl dl"

Output:
using assms brn_gt_0_L unfolding BrnFT_def
by auto


Input: lemma pathstart_join[simp]: "pathstart (g1 +++ g2) = pathstart g1"

Output:
unfolding pathstart_def joinpaths_def pathfinish_def
by auto


Input: lemma empty_set_less_eq [iff]: "{} \<sqsubseteq> A"

Output: by(auto simp add: set_less_eq_def finite_complement_partition intro: set_less_eq_aux'_into_set_less_eq_aux'')


Input:
lemma pre_test_test_same:
  "-p\<guillemotleft>-p = 1"

Output:
using pre_test tests_dual.sba_dual.less_eq_sup_top tests_dual.sba_dual.reflexive
by auto


Input: lemma Ptl_not_None [simp]: "\<not>lNone (ltl P)"

Output:
using P_LCons P_maximal maximal_no_deadend v0_no_deadend
by metis


Input:
lemma hb_consistent_append [intro!]:
  assumes "hb_consistent suffix"
          "hb_consistent prefix"
          "\<And>s p. s \<in> set suffix \<Longrightarrow> p \<in> set prefix \<Longrightarrow> \<not> s \<prec> p"
  shows "hb_consistent (prefix @ suffix)"

Output:
using assms
by (induction rule: hb_consistent.induct) force+


Input: lemma surj_to_conjugate_space[simp]: "surj to_conjugate_space"

Output: by (meson surj_def to_conjugate_space_cases)


Input: lemma before_dist_snd_fst[simp]: "before vs ram1 ram2 \<Longrightarrow> distinct vs \<Longrightarrow> snd (splitAt ram2 (fst (splitAt ram1 vs))) = snd (splitAt ram1 (snd (splitAt ram2 vs)))"

Output:
apply (simp add: before_def)
apply (elim exE)
apply (drule_tac splitAt_dist_ram_all)
by (auto dest!: pairD)


Input:
lemma measurable_lift_Comp_IntVal[simp]:
  "lift_Comp f g \<in> measurable (PRODUCT INTEG INTEG) BOOL"

Output:
unfolding lift_Comp_def
by (auto intro!: val_case_stock_measurable)


Input:
lemma Gamma_minus_one_half_real:
  "Gamma (-(1/2) :: real) = - 2 * sqrt pi"

Output:
using rGamma_plus1[of "-1/2 :: real"]
by (simp add: rGamma_inverse_Gamma divide_simps Gamma_one_half_real split: if_split_asm)


Input:
lemma list_remove1_conv_remove1 [simp]:
  "equal_base.list_remove1 (=) = List.remove1"

Output: unfolding equal_base.list_remove1_def List.remove1_def ..


Input: lemma nn_integral_pmf_of_set: "nn_integral (measure_pmf pmf_of_set) f = sum f S / card S"

Output: by (subst nn_integral_measure_pmf_finite) (simp_all add: sum_distrib_right[symmetric] card_gt_0_iff S_not_empty S_finite divide_ennreal_def divide_ennreal[symmetric] ennreal_of_nat_eq_real_of_nat[symmetric] ennreal_times_divide)


Input: lemma collect_basis_in_finite: "finite (Collect (basis_in \<E>))"

Output:
unfolding basis_in_def
using \<E>.collect_basis_finite .


Input:
lemma conjugate_in_unit_disc [simp]:
  assumes "z \<in> unit_disc"
  shows "conjugate z \<in> unit_disc"

Output:
using conjugate_unit_disc
using assms
by blast


Input: lemma Top_useless: "\<Gamma> \<turnstile> F \<Longrightarrow> \<Gamma> - {\<top>} \<turnstile> F"

Output: by (metis NDtrans Top_provable Weaken insert_Diff_single subset_insertI)


Input:
lemma lookup_inside2:
  assumes "Some (b1,c1) = lookup (\<Gamma>'@((x,b0,c0)#\<^sub>\<Gamma>\<Gamma>)) y" and "x\<noteq>y"
  shows "Some (b1,c1) = lookup (\<Gamma>'@((x,b0,c0')#\<^sub>\<Gamma>\<Gamma>)) y"

Output:
using assms
by(induct \<Gamma>' rule: \<Gamma>.induct,auto+)


Input:
lemma PO_m3_inv1_lkeysec_trans [iff]:
  "{m3_inv1_lkeysec} trans m3 {> m3_inv1_lkeysec}"

Output: by (fastforce simp add: PO_hoare_defs m3_defs intro!: m3_inv1_lkeysecI)


Input:
lemma psubstT_eq_rawpsubst2:
assumes "r \<in> atrm" "x1 \<in> var" "x2 \<in> var" "t1 \<in> atrm" "t2 \<in> atrm"
and "x1 \<noteq> x2" "x2 \<notin> FvarsT t1"
shows "psubstT r [(t1,x1),(t2,x2)] = rawpsubstT r [(t1,x1),(t2,x2)]"

Output:
using assms
using less_SucE
by (intro psubstT_eq_rawpsubstT) force+


Input: lemma Sup_pres_Sup_closed: "Sup_pres f \<Longrightarrow> Sup_closed_set (range f)"

Output: by (metis (mono_tags, lifting) Sup_closed_set_def comp_eq_elim range_eqI subset_image_iff)


Input:
lemma Infty_neq_0[simp]:
  "(\<infinity>::ereal) \<noteq> 0" "0 \<noteq> (\<infinity>::ereal)"
  "-(\<infinity>::ereal) \<noteq> 0" "0 \<noteq> -(\<infinity>::ereal)"

Output: by (simp_all add: zero_ereal_def)


Input: lemma Br_Border: "Int_1a \<I> \<Longrightarrow> \<forall>A. Br(\<B> A)"

Output: by (metis Br_int_def MONO_MULTa MONO_def diff_def)


Input:
lemma t_stop_pos:
  assumes "v \<noteq> 0"
  shows "0 < t_stop"

Output:
using decel nonneg_vel assms
by (auto simp: t_stop_def divide_simps)


Input:
lemma rel_state_update:
  "((=) ===> (=) ===> rel_state (=)) pair.update_pair update_pair"

Output:
unfolding pair.update_pair_def update_pair_def unfolding move12'_def[symmetric] unfolding update1'_def[symmetric] update2'_def[symmetric] get_k2_def[symmetric] get_k2'_def[symmetric] get_k1_def[symmetric] get_k1'_def[symmetric]
by transfer_prover


Input:
lemma complete_no_arrive [simp]:
  "(s, ii\<not>ni:arrive(m), s') \<notin> cnet_sos T"

Output:
proof assume "(s, ii\<not>ni:arrive(m), s') \<in> cnet_sos T" hence "ii\<not>ni:arrive(m) \<noteq> ii\<not>ni:arrive(m)"
by (rule cnet_sos.cases) auto thus False
by simp
qed


Input:
lemma equal_cnam_code [code]:
  "HOL.equal list_nam list_nam \<longleftrightarrow> True"
  "HOL.equal test_nam test_nam \<longleftrightarrow> True"
  "HOL.equal list_nam test_nam \<longleftrightarrow> False"
  "HOL.equal test_nam list_nam \<longleftrightarrow> False"

Output: by(simp_all add: distinct_classes distinct_classes[symmetric] equal_cnam_def)


Input:
lemma dtype_simps [simp]:
"dtype CounterImpl'value = CClassT CounterImpl"
"dtype UndoCounter'save = CClassT UndoCounter"
"dtype Dummy'dummy = AClassT Dummy"
"dtype Counter'dummy = InterfaceT Counter"

Output: by (simp_all add: dtype_def dtype_def dtype_def)


Input:
lemma diff_existence_ivl_trans:
  "t0 \<in> existence_ivl0 x0 \<Longrightarrow> t \<in> existence_ivl0 x0 \<Longrightarrow> t - t0 \<in> existence_ivl0 (flow0 x0 t0)" for t

Output: by (metis (no_types, hide_lams) add.left_neutral diff_add_eq local.existence_ivl_reverse local.existence_ivl_trans local.flows_reverse)


Input: lemma unit_vec_Bounded_vec[simp,intro]: "unit_vec n i \<in> Bounded_vec (max 1 Bnd)"

Output:
unfolding Bounded_vec_def unit_vec_def
by auto


Input: lemma is_NFlow: "NFlow c s t (flow_of_cf cf)"

Output:
using EX_RG f_unique is_NPreflow NFlow.axioms(1)
apply (fold f_def)
by force


Input:
lemma t_stop_zero:
  assumes "t_stop \<le> x"
  assumes "x \<le> \<delta>"
  shows "v\<^sub>e = 0"

Output:
using assms unfolding t_stop_def
using ego2.t_stop_nonneg pos_react ego2.t_stop_zero
by auto


Input:
lemma abst_action_repc:
  assumes "cfg \<in> R_G.valid_cfg"
  shows "abst (action (repc cfg)) = action cfg"

Output:
using assms unfolding repc_def
by (auto intro: abst_action_repcs simp: R_G_I)


Input:
lemma rem_implicit_pres_ops_numVars[simp]:
  "ast_problem.numVars (rem_implicit_pres_ops prob) = ast_problem.numVars prob"

Output: by (cases prob) (simp add: ast_problem.numVars_def ast_problem.astDom_def)


Input:
lemma fetch_t_wcode_adjust[simp]:
  "fetch t_wcode_adjust (Suc 0) Bk = (W1, 1)"
  "fetch t_wcode_adjust (Suc 0) Oc = (R, 2)"
  "fetch t_wcode_adjust (Suc (Suc 0)) Oc = (R, 3)"
  "fetch t_wcode_adjust (Suc (Suc (Suc 0))) Oc = (R, 4)"
  "fetch t_wcode_adjust  (Suc (Suc (Suc 0))) Bk = (R, 3)"
  "fetch t_wcode_adjust 4 Bk = (L, 8)"
  "fetch t_wcode_adjust 4 Oc = (L, 5)"
  "fetch t_wcode_adjust 5 Oc = (W0, 5)"
  "fetch t_wcode_adjust 5 Bk = (L, 6)"
  "fetch t_wcode_adjust 6 Oc = (R, 7)"
  "fetch t_wcode_adjust 6 Bk = (L, 6)"
  "fetch t_wcode_adjust 7 Bk = (W1, 2)"
  "fetch t_wcode_adjust 8 Bk = (L, 9)"
  "fetch t_wcode_adjust 8 Oc = (W0, 8)"
  "fetch t_wcode_adjust 9 Oc = (L, 10)"
  "fetch t_wcode_adjust 9 Bk = (L, 9)"
  "fetch t_wcode_adjust 10 Bk = (L, 11)"
  "fetch t_wcode_adjust 10 Oc = (L, 10)"
  "fetch t_wcode_adjust 11 Oc = (L, 11)"
  "fetch t_wcode_adjust 11 Bk = (R, 0)"

Output: by(auto simp: fetch.simps t_wcode_adjust_def nth_of.simps numeral)


Input:
lemma HMA_M_0 [transfer_rule]:
  "HMA_M (0\<^sub>m CARD('nr) CARD('nc)) (0 :: 'a :: zero ^ 'nc  ^ 'nr )"

Output:
unfolding HMA_M_def from_hma\<^sub>m_def
by auto


Input:
lemma update_arg_wf_tuples [simp]:
  "\<And>nhip pre. update_arg_wf (0, unk, val, Suc 0, nhip, pre)"
  "\<And>n hops nhip pre. update_arg_wf (Suc n, kno, val, hops,  nhip, pre)"

Output:
unfolding update_arg_wf_def
by auto


Input: lemma stack_reachable: "set (stack s) \<subseteq> reachable"

Output:
using stack_discovered discovered_reachable
by blast


Input:
lemma block_nominals_branch:
  assumes \<open>block \<in>. branch\<close>
  shows \<open>block_nominals block \<subseteq> branch_nominals branch\<close>

Output:
unfolding branch_nominals_def
using assms
by blast


Input:
lemma reachable_sdom_acyclic:
  assumes "reachable n2"
      and "strict_dominate n1 n2"
    shows "\<not> strict_dominate n2 n1"

Output:
using assms
apply (insert reachable_dom_acyclic2[OF assms(1) assms(2)])
by (auto simp add:not_dom_eq_not_sdom)


Input:
lemma equiv'_rotate_1:
  "B_A.equiv' b a" if "A_B.equiv' a b"

Output:
using that
by (auto simp: B_A.equiv'_def A_B.equiv'_def)


Input:
lemma dims_output_deep_model:
assumes "length rs \<ge> 2"
and "\<And>r. r\<in>set rs \<Longrightarrow> r > 0"
and "j < rs!0"
and "remove_weights m = deep_model_l rs"
shows "Tensor.dims (tensors_from_net m $ j) = replicate (2^(length rs - 2)) (last rs)"

Output:
using dims_tensors_from_net input_sizes_deep_model[OF assms(1)] output_size_correct_tensors valid_deep_model assms(3) assms(4) input_sizes_remove_weights length_output_witness witness_is_deep_model
by (metis vec_setI)


Input: lemma MP_Rel_OO_conversep_MP_Rel [simp]: "MP_Rel OO MP_Rel\<inverse>\<inverse> = eq_m"

Output: by (intro ext, auto simp: OO_def MP_Rel_def Mp_f_representative)


Input:
lemma new_shadow_root_get_child_nodes_is_l_new_shadow_root_get_child_nodes [instances]:
  "l_new_shadow_root_get_child_nodes type_wf known_ptr get_child_nodes get_child_nodes_locs"

Output:
apply(simp add: l_new_shadow_root_get_child_nodes_def l_new_shadow_root_get_child_nodes_axioms_def instances)
using get_child_nodes_new_shadow_root new_shadow_root_no_child_nodes
by fast


Input: lemma multiplicity_one_nat [simp]: "multiplicity p (Suc 0) = 0"

Output:
unfolding One_nat_def [symmetric]
by (rule multiplicity_one)


Input:
lemma reaches_Reverse_iff [simp]:
     "reaches (Reverse fsm) st (rev xs) st' \<longleftrightarrow> reaches fsm st' xs st"

Output: by (induct xs arbitrary: st st') (auto simp add: Reverse_def reaches_append_iff reaches_imp_states)


Input: lemma L_transform_Not [simp]: "L_transform (Not x) = Formula.Not (L_transform x)"

Output:
unfolding L_transform_def
by (simp add: Formula.Not_def)


Input: lemma bs_subset_eq_correct: "bs_subset_eq s1 s2 \<longleftrightarrow> bs_\<alpha> s1 \<subseteq> bs_\<alpha> s2"

Output:
unfolding bs_\<alpha>_def bs_subset_eq_def
by transfer (auto simp add: bit_eq_iff bin_nth_ops)


Input:
lemma ExcessTable_subset:
  "set (map fst (ExcessTable g vs)) \<subseteq> set vs"

Output: by (induct vs) (auto simp add: ExcessTable_def)


Input: lemma wtE[simp]: "Ik.wtE \<xi> \<Longrightarrow> GE.wtE \<xi>"

Output:
unfolding Ik.wtE_def GE.wtE_def intT_def
by metis


Input: lemma H_rcoset_reps : "Group.is_rcoset_replist H G H_rcoset_reps"

Output:
using H_rcoset_reps_def nonzero_H_rcoset_reps_def GRep.ex_rcoset_replist_hd0 someI_ex
by simp


Input:
lemma interaction_bounded_by_upf_enc_Inr [interaction_bound]:
  "interaction_bounded_by (Not \<circ> isl) (intercept_upf_enc k b LD mm) 0"

Output:
unfolding intercept_upf_enc_def case_prod_app
by(interaction_bound, clarsimp simp add: SUP_constant bot_enat_def split: prod.split)


Input:
lemma ins3_Leaf[simp,code]:
  "ins3 n d x Leaf =
  (if bal_i (n+1) (d+1) then Bal2 (Node Leaf x Leaf) else Unbal2 (Node Leaf x Leaf) 1 1)"

Output:
using val_cong[OF ins3_tm.simps(1)]
by(simp only: ins3_def val_simps cmp_val.case_distrib[of val])


Input:
lemma varsA_substA:
"varsA (substA \<pi> at) = (\<Union> x \<in> varsA at. vars (\<pi> x))"

Output:
using vars_subst[of \<pi>]
by (cases at, auto)


Input:
lemma while_top:
  "top \<star> x = top"

Output: by (metis sup_left_top star.circ_top star_omega_top while_def)


Input: lemma insertion_one : "insertion f (Const 1 ::real mpoly) = 1"

Output: by (metis insertion_one mult.right_neutral mult_one_left)


Input: lemma Rep_hf_0 [simp]: "Rep_hf 0 = 0"

Output: by (metis Abs_hf_inverse HF.HF_def UNIV_I Zero_hf_def image_empty set_encode_empty)


Input: lemma fv_asToHeap: "fv (asToHeap \<Gamma>) = fv \<Gamma>"

Output:
unfolding fv_def
by (auto simp add: supp_asToHeap)


Input:
lemma ide_hcomp [intro, simp]:
    assumes "ide \<nu>" and "ide \<mu>" and "src \<nu> = trg \<mu>"
    shows "ide (\<nu> \<star> \<mu>)"

Output:
using assms VV.ide_char VV.arr_char H.preserves_ide [of "(\<nu>, \<mu>)"]
by auto


Input:
lemma beta_norm_preserves_proves:
  assumes thy: "wf_theory \<Theta>"
  assumes finite: "finite \<Gamma>"
  assumes term_ok: "\<Theta>, \<Gamma> \<turnstile> t"
  assumes beta: "beta_norm t = Some u"
  assumes ctxt: "\<forall>A\<in>\<Gamma>. term_ok \<Theta> A" "\<forall>A\<in>\<Gamma>. typ_of A = Some propT"
  shows "\<Theta>, \<Gamma> \<turnstile> u"

Output:
using assms proves_eq_mp_rule_better[OF thy _ _ finite ctxt] proves_beta_norm[OF thy finite _ _ ctxt] proved_terms_well_formed(2)
by blast


Input:
lemma \<nu>_simps [simp]:
    shows "iso \<nu>" and "arr \<nu>" and "src \<nu> = src u" and "trg \<nu> = trg r"
    and "cod \<nu> = g \<star> w"

Output:
using uw\<theta>\<omega>\<nu> \<nu>_in_hom
by auto


Input: lemma lhsv\<pi>_upd: "m p = None \<Longrightarrow> lhsv\<pi> (m(p\<mapsto>c)) = lhsv' c \<union> lhsv\<pi> m"

Output:
apply (auto simp: lhsv\<pi>_def ran_def)
by (metis option.simps(3))


Input: lemma lss_inj_image_filter_impl : "set_inj_image_filter lss_\<alpha> lss_invar lss_\<alpha> lss_invar lss_inj_image_filter"

Output:
apply (unfold_locales)
apply (simp_all add: lss_invar_def lss_inj_image_filter_def lss_image_filter_def mergesort_remdups_correct lss_\<alpha>_def set_map_filter Bex_def) done


Input:
lemma at_begin_fst_bwtn_Bk[intro]: "at_begin_fst_bwtn (as, am) (q, aaa, []) ires
            \<Longrightarrow> at_begin_fst_bwtn (as, am) (q, aaa, [Bk]) ires"

Output:
apply(simp only: at_begin_fst_bwtn.simps)
using replicate_once
by blast


Input:
lemma mset_link[simp]: "(tree_to_multiset (link t1 t2))
  = (tree_to_multiset t1) + (tree_to_multiset t2)"

Output: by(cases t1, cases t2, auto simp add: union_ac)


Input:
lemma projecting_Int:
     "[| projecting C h F XA' XA;  projecting C h F XB' XB |]
      ==> projecting C h F (XA' \<inter> XB') (XA \<inter> XB)"

Output: by (unfold projecting_def, blast)


Input:
lemma proots_unbounded_line_card_code[code]:
  "proots_unbounded_line_card p st tt =
              (if st\<noteq>tt then
                (let pc = pcompose p [:st, tt - st:];
                     pR = map_poly Re pc;
                     pI = map_poly Im pc;
                     g  = gcd pR pI
                 in nat (changes_R_smods g (pderiv g)))
              else
                  Code.abort (STR ''proots_unbounded_line_card fails due to invalid hyperplanes.'')
                      (\<lambda>_. proots_unbounded_line_card p st tt))"

Output:
unfolding proots_unbounded_line_card_def
using card_proots_unbounded_line[of st tt p]
by auto


Input:
lemma theNFTBoth_length_finished[simp]:
assumes "n \<in> theNFTBoth cl dl"
shows "n < length cl" and "\<not> finished (cl!n)"
and "n < length dl" and "\<not> finished (dl!n)"

Output:
using assms unfolding theNFTBoth_def
by auto


Input:
lemma power_sub_int:
  "\<lbrakk> m \<le> n; 0 < b \<rbrakk> \<Longrightarrow> b ^ n div b ^ m = (b ^ (n - m) :: int)"

Output:
apply (subgoal_tac "\<exists>n'. n = m + n'")
apply (clarsimp simp: power_add)
apply (rule exI[where x="n - m"])
apply simp done


Input:
lemma fps_integral0_of_nat:
  "fps_integral0 (of_nat n :: 'a::division_ring fps) = of_nat n * fps_X"

Output:
using fps_integral0_fps_const[of "of_nat n :: 'a"]
by (simp add: fps_of_nat)


Input:
lemma totient_less_not_prime:
  assumes "\<not> prime n" "1 < n"
  shows "totient n < n - 1"

Output:
using totient_imp_prime totient_less assms
by (metis One_nat_def Suc_pred le_less_trans less_SucE zero_le_one)


Input:
lemma ppoint_mult_correct: "on_curvep a b p \<Longrightarrow>
  make_affine (ppoint_mult a n p) = point_mult a n (make_affine p)"

Output: by (induct n) (simp_all add: padd_correct)


Input:
lemma UNpart01_cases[elim, consumes 1, case_names Local0 Local]:
assumes "II \<in> UNpart01 cl dl P" and "II = BrnFT cl dl \<Longrightarrow> phi"
"\<And> n I. \<lbrakk>n \<in> theNFTBoth cl dl; I \<in> P n; II = shift cl n I; II \<in> UNpart1 cl dl P\<rbrakk> \<Longrightarrow> phi"
shows phi

Output:
using assms unfolding UNpart01_def UNpart1_def
by auto


Input: lemma multiple_bibd: "n > 0 \<Longrightarrow> bibd \<V> (multiple_blocks n) \<k> (\<Lambda> * n)"

Output:
using multiple_t_design
by (simp add: bibd_def)


Input:
lemma r_lifz_recfn [simp]:
  assumes "recfn n f" and "recfn n g"
  shows "recfn (Suc n) (r_lifz f g)"

Output:
using assms r_lazyifzero_recfn r_lifz_def wellf_arity_nonzero
by auto


Input: lemma asprod_pos_pos:"0 \<le> x \<Longrightarrow> 0 \<le> int n *\<^sub>a x"

Output:
apply (cases "n = 0")
apply simp_all
using asprod_pos_mono [THEN sym, of "int n" "0" "x"]
apply (simp add:asprod_n_0) done


Input: lemma minWait_least: "\<lbrakk>enabled (shd (sdrop n rs)) s\<rbrakk> \<Longrightarrow> minWait rs s \<le> n"

Output:
unfolding minWait_def
by (intro Least_le conjI)


Input: lemma length_normalise_decomp [simp]: "length (snd (normalise_decomp x y n)) = n"

Output: by (induction x y n rule: normalise_decomp.induct) (auto split: prod.split)


Input: lemma bernpoly_1': "bernpoly n 1 = of_real (bernoulli' n)"

Output:
using bernpoly_1_1 [where ?'a = 'a]
by (cases "n = 1") (simp_all add: bernpoly_1 bernoulli'_def)


Input: lemma power_sq_power: "power_sq x n = p_power (1\<^sub>\<sigma> + x) n"

Output:
apply (induct n)
apply (simp)
using Suc_eq_plus1 pow_prop power_sq.simps(2)
by simp


Input:
lemma pow_equals:
  assumes "PoW t n = PoW t n'"
  and "n'\<ge>n"
  and "n''\<ge>n"
  and "n''\<le>n'"
shows "PoW t n = PoW t n''"

Output: by (metis pow_mono assms(1) assms(3) assms(4) eq_iff)


Input:
lemma measure_loop_induct [case_names Step]:
  "\<lbrakk>\<And>n. \<not> P (f n) \<Longrightarrow> (f (Suc n), (f n)) \<in> measure_loop\<rbrakk> \<Longrightarrow> \<exists>n. P (f n)"

Output:
using wf_measure_loop
by (metis wf_iff_no_infinite_down_chain)


Input:
lemma sums_confine_mult:
  fixes f :: "nat \<Rightarrow> 'a::real_normed_algebra"
  shows "confine f N sums a \<Longrightarrow> confine (\<lambda>n. c * f n) N sums (c * a)"

Output:
using sums_mult [of "confine f N" a c]
by (simp add: confine_def if_distrib [of "(*)c"] cong: if_cong)


Input: lemma ts_ord_mult_isor: "n x \<sqsubseteq> n y \<Longrightarrow> n x \<cdot> n z \<sqsubseteq> n y \<cdot> n z"

Output:
using n_comm ts_ord_mult_isol
by auto


Input:
lemma eNorm_Norm':
  assumes "x \<notin> space\<^sub>N N"
  shows "Norm N x = 0"

Output:
using assms unfolding Norm_def
apply (auto simp add: spaceN_iff)
using top.not_eq_extremum
by fastforce


Input:
lemma foldli_size_abort:
    "det_fold_map X (\<lambda>n. n<m) (\<lambda>_ n. Suc n) 0 (op_map_size_abort m)"

Output:
apply rule
using foldli_size_abort_aux[where ?n0.0=0]
by simp


Input:
lemma fls_shifted_pow:
  "(fls_shift m f) ^ n = fls_shift (n*m) (f ^ n)"

Output: by (induct n) (simp_all add: fls_times_both_shifted_simp algebra_simps)


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

Output:
unfolding rexp_of'_def
by (auto simp: max_idx_vars intro: wf_rexp_of_alt wf_rexp_ENC[OF finite_FOV])


Input:
lemma norm_power_int: "norm (power_int x n) = power_int (norm x) n"
  for x :: "'a::real_normed_div_algebra"

Output: by (cases n rule: int_cases4) (auto simp: norm_power power_int_minus norm_inverse)


Input:
lemma pdevs_val_upd[simp]:
  "pdevs_val (e(n := e')) X = pdevs_val e X - e n * pdevs_apply X n + e' * pdevs_apply X n"

Output:
unfolding pdevs_val_def
by (subst suminf_finite[OF finite.insertI[OF finite_degree_nonzero], of n X], auto simp: pdevs_val_def sum.insert_remove)+


Input: lemma fps_X_dvd_fps_ln [simp]: "fps_X dvd fps_ln c"

Output:
proof - have "fps_ln c = fps_X * Abs_fps (\<lambda>n. (-1) ^ n / (of_nat (Suc n) * c))"
by (intro fps_ext) (simp add: fps_ln_def of_nat_diff) thus ?thesis
by simp
qed


Input:
lemma wf_plan_act_is_sound:
    assumes "wf_plan_action (PAction n args)"
    shows "sound_opr
      (instantiate_action_schema (the (resolve_action_schema n)) args)
      ((pddl_opr_to_act
        (instantiate_action_schema (the (resolve_action_schema n)) args)))"

Output:
using assms
using wf_action_schema_sound_inst wf_eff_pddl_ground_act_is_sound_opr
by (auto split: option.splits)


Input:
lemma fact_double:
  "fact (2 * n) = (2 ^ (2 * n) * pochhammer (1 / 2) n * fact n :: 'a::field_char_0)"

Output:
using pochhammer_double[of "1/2::'a" n]
by (simp add: pochhammer_fact)


Input:
lemma binomial_le_pow:
  assumes "r \<le> n"
  shows "n choose r \<le> n ^ r"

Output:
proof - have "n choose r \<le> fact n div fact (n - r)"
using assms
by (subst binomial_fact_lemma[symmetric]) auto with fact_div_fact_le_pow [OF assms] show ?thesis
by auto
qed


Input:
lemma abc_mopup_measure_induct [case_names Step]:
  "\<lbrakk>\<And>n. \<not> P (f n) \<Longrightarrow> (f (Suc n), (f n)) \<in> abc_mopup_measure\<rbrakk> \<Longrightarrow> \<exists>n. P (f n)"

Output:
using wf_abc_mopup_measure
by (metis wf_iff_no_infinite_down_chain)


Input:
lemma irs_SDG_path_Append:
  "\<lbrakk>n irs-ns\<rightarrow>\<^sub>d* n''; n'' irs-ns'\<rightarrow>\<^sub>d* n'\<rbrakk> \<Longrightarrow> n irs-ns@ns'\<rightarrow>\<^sub>d* n'"

Output: by(induct rule:intra_return_sum_SDG_path.induct, auto intro:intra_return_sum_SDG_path.intros)


Input: lemma (in vars) "\<Gamma>,{}\<turnstile> \<lbrace>\<acute>N = 5\<rbrace> \<acute>N :== 2 * \<acute>N \<lbrace>\<acute>N = 10\<rbrace>"

Output:
apply vcg_step
apply vcg_step
by simp


Input:
lemma fixes e :: "'addr expr1" and es :: "'addr expr1 list"
  shows compE2_jump_ok [intro!]: "jump_ok (compE2 e) n (Suc n')"
  and compEs2_jump_ok [intro!]: "jump_ok (compEs2 es) n (Suc n')"

Output:
apply(induct e and es arbitrary: n n' and n n' rule: compE2.induct compEs2.induct)
apply(auto split: bop.split) done


Input:
lemma return_node_call_of_return_node:
  "return_node n \<Longrightarrow> \<exists>!n'. call_of_return_node n n'"

Output: by -(frule return_node_determines_call_node,unfold call_of_return_node_def,simp)


Input: lemma prod_prime_factors'': "n > 0 \<Longrightarrow> f n = (\<Prod>p\<in>prime_factors n. f_prime p ^ multiplicity p n)"

Output: by (subst prod_prime_factors') (auto simp: f_prime prime_factors_multiplicity intro!: prod.cong)


Input: lemma real_of_nat_div3: "real n / real x - real (n div x) \<le> 1" for n x :: nat

Output:
proof (cases "x = 0") case False then show ?thesis
by (metis of_int_of_nat_eq real_of_int_div3 zdiv_int)
qed auto


Input: lemma PDG_BS_valid_node:"n \<in> PDG_BS S \<Longrightarrow> valid_node n"

Output: by(auto elim:PDG_path_CFG_path dest:path_valid_node simp:PDG_BS_def split:if_split_asm)


Input:
lemma pderiv_monom':
  assumes "a \<in> carrier R"
  shows "pderiv (a \<odot>\<^bsub>P\<^esub> X[^]\<^bsub>P\<^esub>(n::nat)) = ([n]\<cdot>a)\<odot>\<^bsub>P\<^esub> X[^]\<^bsub>P\<^esub>(n-1)"

Output:
using assms pderiv_monom[of a n ]
by (simp add: P_def UP_cring.monom_rep_X_pow UP_cring_axioms)


Input:
lemma shift2[simp]:
assumes "I \<subseteq> {..< brn (cl!n)}"
and "ii \<in> shift cl n I"
shows "brnL cl n \<le> ii \<and> ii < brnL cl n + brn (cl!n)"

Output:
using assms unfolding shift_def
by auto


Input: lemma degreen_0[simp]: "isnpolyh p n \<Longrightarrow> m < n \<Longrightarrow> degreen p m = 0"

Output: by (induct p arbitrary: n rule: degreen.induct) auto


Input: lemma setmonotone_funpower: "setmonotone f \<Longrightarrow> setmonotone (funpower f n)"

Output: by (induct n, auto simp add: setmonotone_def)


Input: lemma iFROM_Suc_pred_insert_conv: "insert n [Suc n\<dots>] = [n\<dots>]"

Output: by (insert iFROM_pred_insert_conv[of "Suc n"], simp)


Input:
lemma "n \<le> length kvs \<Longrightarrow> True"
  and color_of_rbtreeify_g:
  "\<lbrakk> n \<le> Suc (length kvs); 0 < n \<rbrakk>
  \<Longrightarrow> color_of (fst (rbtreeify_g n kvs)) = B"

Output: by(induct n kvs and n kvs rule: rbtreeify_induct) simp_all


Input:
lemma prime_factors_multiplicity:
  "prime_factors n = {p. prime p \<and> multiplicity p n > 0}"

Output: by (cases "n = 0") (auto simp add: prime_factors_dvd prime_multiplicity_gt_zero_iff)


Input: lemma abs_power_eq_0 [simp]: "\<bar>a\<bar>^n = 0 \<longleftrightarrow> a = 0 \<and> n \<noteq> 0"

Output:
apply (induct n, force)
apply (unfold power_Suc)
apply (subst real_mult_eq_0_iff, auto) .


Input:
lemma slice1_param_in_slice1:
  "\<lbrakk>nx \<in> sum_SDG_slice1 n; n s-p:V\<rightarrow>\<^bsub>in\<^esub> n'\<rbrakk> \<Longrightarrow> nx \<in> sum_SDG_slice1 n'"

Output: by(induct rule:sum_SDG_slice1.induct, auto intro:sum_SDG_slice1.intros sum_SDG_edge_valid_SDG_node)


Input:
lemma coprime_imp_mod_not_zero:
  fixes n x :: nat
  assumes "1 < n" "coprime x n"
  shows "0 < x mod n"

Output:
using assms coprime_0_left_iff nat_dvd_not_less
by fastforce


Input:
lemma card_grab [simp]:
  assumes "infinite N" shows "card (fst (grab N n)) = n"

Output:
proof - have "N \<inter> enumerate N ` {..<n} = enumerate N ` {..<n}"
using assms
by (auto simp: enumerate_in_set) with assms show ?thesis
by (simp add: card_image grab_def strict_mono_enum strict_mono_imp_inj_on)
qed


Input:
lemma between_nth_primes_imp_nonprime:
  assumes "n > nth_prime k" "n < nth_prime (Suc k)"
  shows   "\<not>prime n"

Output:
using assms
by (metis Suc_leI not_le nth_prime_Suc smallest_prime_beyond_smallest)


Input:
lemma numeral_tree_simps [simp]:
  "root (numeral n) = numeral n"
  "left (numeral n) = numeral n"
  "right (numeral n) = numeral n"

Output: by(induct n)(auto simp add: numeral.simps plus_tree_def one_tree_def)


Input: lemma ufa_init_correct: "ufa_\<alpha> [0..<n] = {(x,x) | x. x<n}"

Output:
unfolding ufa_\<alpha>_def
using ufa_init_invar[of n]
apply (auto simp: rep_of_refl) done


Input:
lemma similarE:
  "x \<triangleleft>\<triangleright> y \<Longrightarrow> \<psi>\<^sup>D\<^bsub>n\<^esub>\<cdot>x \<triangleleft>\<triangleright>\<^bsub>n\<^esub> \<psi>\<^sup>E\<^bsub>n\<^esub>\<cdot>y"

Output:
unfolding similar_def
by blast


Input:
lemma filterlim_weak_subseq:
  fixes u::"nat \<Rightarrow> nat"
  assumes "(\<lambda>n. real(u n)) \<longlonglongrightarrow> \<infinity>"
  shows "LIM n sequentially. u n:> at_top"

Output:
unfolding filterlim_iff
by (metis assms eventually_weak_subseq)


Input: lemma fmlookup_restrict_set_id: \<open>fset (fmdom N) \<subseteq> A \<Longrightarrow> fmrestrict_set A N = N\<close>

Output: by (metis fmap_ext fmdom'_alt_def fmdom'_notD fmlookup_restrict_set subset_iff)


Input:
lemma allAllocationsInPowerset:
  "allAllocations N \<Omega> \<subseteq> Pow (N \<times> (Pow \<Omega> - {{}}))"

Output: by (metis PowI allocationPowerset subsetI)


Input: lemma allDefs_disjoint': "\<lbrakk>n \<in> set (\<alpha>n g); m \<in> set (\<alpha>n g); v \<in> allDefs g n; v \<in> allDefs g m\<rbrakk> \<Longrightarrow> n = m"

Output:
using allDefs_disjoint
by auto


Input:
lemma quantify_bdd_is_node:
  assumes "bdd_all (nfa_is_node N) bdd"
  shows "bdd_all (nfa_is_node N) (quantify_bdd v bdd)"

Output:
using assms
by (induct v bdd rule: quantify_bdd.induct) (simp add: bdd_all_bdd_binop[of "nfa_is_node N" _ "nfa_is_node N" _ "nfa_is_node N" bv_or, OF _ _ bv_or_is_node])+


Input:
lemma ccINF_mono:
  "countable A \<Longrightarrow> countable B \<Longrightarrow> (\<And>m. m \<in> B \<Longrightarrow> \<exists>n\<in>A. f n \<le> g m) \<Longrightarrow> (INF n\<in>A. f n) \<le> (INF n\<in>B. g n)"

Output:
using ccInf_mono [of "g ` B" "f ` A"]
by auto


Input: lemma phils_update_take: "take n (Up\<^sub>P ps e) = Up\<^sub>P (take n ps) e"

Output: by (cases e) (simp_all add: phils_state_update_def lphil0_state_update_def rphil_state_update_def take_update_swap)


Input:
lemma coprime_set_non_empty:
  assumes "N > 2"
  shows "coprime_set N \<noteq> {}"

Output: by(simp add: coprime_set_def; metis assms(1) Suc_lessE coprime_Suc_right_nat lessI numeral_2_eq_2)


Input:
lemma split_time_nempty:
  assumes "0 < n"
  shows    "split_time s n (n * t) = s t"

Output:
using assms
by (simp add: split_time_def)


Input:
lemma timpl_closure_set_mono_timpl_closure_set:
  assumes N: "N \<subseteq> timpl_closure_set M TI"
  shows "timpl_closure_set N TI \<subseteq> timpl_closure_set M TI"

Output:
using timpl_closure_set_mono[OF N, of TI TI] timpl_closure_set_idem[of M TI]
by simp


Input: lemma totient_le: "totient n \<le> n"

Output:
proof - have "card (totatives n) \<le> card {0<..n}"
by (intro card_mono) (auto simp: totatives_def) thus ?thesis
by (simp add: totient_def)
qed


Input: lemma GuardK_init [simp]: "n \<notin> range shrK \<Longrightarrow> GuardK n Ks (initState B)"

Output: by (induct B, auto simp: GuardK_def initState.simps)


Input:
lemma compxE2_size_convs [simp]: "n \<noteq> 0 \<Longrightarrow> compxE2 e n d = shift n (compxE2 e 0 d)"
 and compxEs2_size_convs: "n \<noteq> 0 \<Longrightarrow> compxEs2 es n d = shift n (compxEs2 es 0 d)"

Output: by(simp_all add:shift_compxE2 shift_compxEs2)


Input:
lemma mult_root_eq_root2:
  "n>0 \<Longrightarrow> y \<ge> 0 \<Longrightarrow> y * root n x = root n ((y ^ n) * x)"

Output: by(simp add: real_root_mult real_root_pos2)


Input: lemma residue_primroot_mod [simp]: "residue_primroot n (x mod n) = residue_primroot n x"

Output: by (cases "n = 0") (simp_all add: residue_primroot_def)


Input: lemma mult: "f (a * b) = f a * f b"

Output:
proof - { fix n :: nat consider "n = 0" | "n = 1" | "n > 1"
by force } note P = this show ?thesis
by (cases a rule: P; cases b rule: P) (simp_all add: zero_aux one_aux mult_aux)
qed


Input: lemma Cauchy_fst: "Cauchy X \<Longrightarrow> Cauchy (\<lambda>n. fst (X n))"

Output:
unfolding Cauchy_def
by (fast elim: le_less_trans [OF dist_fst_le])


Input:
lemma abs_convergent_prod_offset:
  assumes "abs_convergent_prod (\<lambda>n. f (n + m))"
  shows   "abs_convergent_prod f"

Output:
using assms unfolding abs_convergent_prod_def
by (rule convergent_prod_offset)


Input:
lemma varsE:
    assumes "v \<in> vars g"
    obtains n where "n \<in> set (\<alpha>n g)" "v \<in> uses g n"

Output:
using assms
by (auto simp:vars_def elim!:fold_union_elem)


Input:
lemma unfoldr_upt_generator:
  "list.unfoldr upt_generator n = [n..<bound]"

Output: by(induct "bound - n" arbitrary: n)(simp_all add: list.unfoldr_simps upt_conv_Cons)


Input:
lemma aprimedivisor_gt_Suc_0:
  assumes "n \<noteq> Suc 0"
  shows   "aprimedivisor n > Suc 0"

Output:
proof - from assms have "prime (aprimedivisor n)"
by (rule aprimedivisor_nat) thus "aprimedivisor n > Suc 0"
by (simp add: prime_nat_iff)
qed


Input:
lemma prime_factors_elem:
  fixes n :: nat assumes "1 < n" shows "\<exists>p. p \<in> prime_factors n"

Output:
using assms
by (cases "prime n") (auto simp: prime_factors_dvd prime_factor_nat)


Input: lemma (in design) points_index_count_min: "multiplicity bl \<ge> n \<Longrightarrow> ps \<subseteq> bl \<Longrightarrow> \<B> index ps \<ge> n"

Output:
using points_index_alt_def set_count_size_min
by (metis filter_mset.rep_eq)


Input:
lemma polyhedral_cone_carrier: assumes "A \<in> carrier_mat nr n"
  shows "polyhedral_cone A \<subseteq> carrier_vec n"

Output:
using assms unfolding polyhedral_cone_def
by auto


Input: lemma dec_interp_Inl: "\<lbrakk>i \<in> FO; i < n\<rbrakk> \<Longrightarrow> \<exists>p. dec_interp n FO x ! i = Inl p"

Output:
unfolding dec_interp_def
using nth_map[of n "[0..<n]"]
by auto


Input: lemma take_update_last: "length list>n \<Longrightarrow> (take (Suc n) list) [n:=x] = take n list @ [x]"

Output: by (induct list arbitrary: n) (auto split: nat.split)


Input:
lemma adjoint_dim:
  "A \<in> carrier_mat n n \<Longrightarrow> adjoint A \<in> carrier_mat n n"

Output:
using adjoint_dim_col adjoint_dim_row
by blast


Input: lemma sum_list_replicate: "sum_list (replicate n c) = n*c"

Output:
apply(induction n)
apply(auto simp add: ring_class.ring_distribs(2)) done


Input: lemma wf_set_bits_int_simps: "wf_set_bits_int f \<longleftrightarrow> (\<exists>n. (\<forall>n'\<ge>n. \<not> f n') \<or> (\<forall>n'\<ge>n. f n'))"

Output: by(auto simp add: wf_set_bits_int.simps)


Input:
lemma fetch_aft_erase_c_b:
  "fetch (mopup_a n @ shift mopup_b (2 * n)) (2 * n + 4) Bk
 = (R, Suc (2 * n + 1))"

Output:
apply(subgoal_tac "length (mopup_a n) = 4 * n")
apply(subgoal_tac "2*n + 4 = Suc (2*n + 3)", simp only: fetch.simps)
apply(auto simp: mopup_b_def nth_append shift.simps) done


Input:
lemma tests_complete:
  "nat_test (\<lambda>n . (-p*x)^n\<guillemotleft>bot) (bnd(-p*x))"

Output:
using bnd_test bnd_upper mult_right_dist_bnd nat_test_def tests_dual.complement_bot pre_closed
by blast


Input:
lemma liminf_bounded_iff:
  fixes x :: "nat \<Rightarrow> ereal"
  shows "C \<le> liminf x \<longleftrightarrow> (\<forall>B<C. \<exists>N. \<forall>n\<ge>N. B < x n)"
  (is "?lhs \<longleftrightarrow> ?rhs")

Output: unfolding le_Liminf_iff eventually_sequentially ..


Input: lemma iFROM_iIN_neq: "[n'\<dots>] \<noteq> [n\<dots>,d]"

Output:
apply (rule ccontr)
apply (insert iFROM_infinite[of n'], insert iIN_finite[of n d])
apply simp done


Input: theorem undiag_diag_fatom[simp]: "nat_of_fatom (fatom_of_nat n) = n"

Output:
unfolding fatom_of_nat_def nat_of_fatom_def
by auto


Input:
lemma real_seq_to_hypreal_approx2:
  "\<forall>n. norm (x - X n) < inverse(real(Suc n)) \<Longrightarrow> star_n X \<approx> star_of x"

Output: by (metis norm_minus_commute real_seq_to_hypreal_approx)


Input:
lemma odd_even_cases [case_names 0 odd even]:
  assumes "P 0" and odd: "\<And>n. P(Suc (2 * n))" and even: "\<And>n. P(2 * n + 2)"
  shows "P n"

Output: by (metis nat_induct2 One_nat_def Suc_1 add_Suc_right assms(1) dvdE even odd oddE)


Input:
lemma (in monoid) nat_pow_Suc2:
  "x \<in> carrier G \<Longrightarrow> x [^] (Suc n) = x \<otimes> (x [^] n)"

Output:
using nat_pow_mult[of x 1 n] Suc_eq_plus1[of n]
by (metis One_nat_def Suc_eq_plus1_left l_one nat.rec(1) nat_pow_Suc nat_pow_def)


Input:
lemma power_down_nonpos_iff[simp]:
  notes [simp del] = power_down_neg_iff power_down_eq_zero_iff
  shows "power_down prec b n \<le> 0 \<longleftrightarrow> b < 0 \<and> odd n \<or> b = 0 \<and> n \<noteq> 0"

Output:
using power_down_neg_iff[of prec b n] power_down_eq_zero_iff[of prec b n]
by auto


Input: lemma hyperprime_factor_exists: "\<And>n. 1 < n \<Longrightarrow> \<exists>k \<in> starprime. k dvd n"

Output: by transfer (simp add: prime_factor_nat)


Input:
lemma fls_eq_above_subdegreeI:
  assumes "N \<le> fls_subdegree f" "N \<le> fls_subdegree g" "\<forall>k\<ge>N. f $$ k = g $$ k"
  shows   "f = g"

Output:
proof (rule fls_eqI) fix n from assms show "f $$ n = g $$ n"
by (cases "n < N") auto
qed


Input: lemma size_lt_imp_ex_count_lt: "size M < size N \<Longrightarrow> \<exists>x \<in># N. count M x < count N x"

Output: by (metis count_eq_zero_iff leD not_le_imp_less not_less_zero size_mset_mono subseteq_mset_def)


Input:
lemma conv_radius_ratio_limit:
  fixes f :: "nat \<Rightarrow> 'a :: {banach,real_normed_div_algebra}"
  assumes "c' = ereal c"
  assumes nz:  "eventually (\<lambda>n. f n \<noteq> 0) sequentially"
  assumes lim: "(\<lambda>n. norm (f n) / norm (f (Suc n))) \<longlonglongrightarrow> c"
  shows   "conv_radius f = c'"

Output:
using assms
by (intro conv_radius_ratio_limit_ereal) simp_all


Input:
lemma sgn_power:
  fixes x::"'a::linordered_idom"
  shows "sgn (x^n) = (if n=0 then 1 else if even n then \<bar>sgn x\<bar> else sgn x)"

Output:
apply (induct n)
by (auto simp add:sgn_mult)


Input:
lemma fls_compose_power_shift [simp]:
  "d > 0 \<Longrightarrow> fls_compose_power (fls_shift n f) d = fls_shift (d * n) (fls_compose_power f d)"

Output: by transfer (auto simp: fun_eq_iff add_ac mult_ac)


Input:
lemma intra_SDG_path_valid_SDG_node:
  assumes "n i-ns\<rightarrow>\<^sub>d* n'" shows "valid_SDG_node n" and "valid_SDG_node n'"

Output:
using \<open>n i-ns\<rightarrow>\<^sub>d* n'\<close>
by(induct rule:intra_SDG_path.induct, auto intro:SDG_edge_valid_SDG_node valid_SDG_CFG_node)


Input:
lemma euler_mascheroni_bounds:
  fixes n :: nat assumes "n \<ge> 1" defines "t \<equiv> harm n - ln (of_nat (Suc n)) :: real"
  shows "euler_mascheroni \<in> {t + inverse (of_nat (2*(n+1)))..t + inverse (of_nat (2*n))}"

Output:
using assms euler_mascheroni_upper[of "n-1"] euler_mascheroni_lower[of "n-1"] unfolding t_def
by (cases n) (simp_all add: harm_Suc t_def inverse_eq_divide)


Input:
lemma quasinorm_of:
  fixes N::"('a::real_vector) \<Rightarrow> ennreal" and C::real
  assumes "quasinorm_on UNIV C N"
  shows "eNorm (quasinorm_of (C,N)) x = N x"
        "defect (quasinorm_of (C,N)) = C"

Output:
using assms unfolding eNorm_def defect_def quasinorm_on_def
by (auto simp add: quasinorm_of_inverse)


Input: lemma TSdet_Suc: "Suc n \<le> length qs \<Longrightarrow> TSdet init initH qs (Suc n) = Step (rTS initH) (TSdet init initH qs n) (qs!n)"

Output: by(simp add: take_Suc_conv_app_nth config_snoc)


Input: lemma root_main'_pos: "x \<ge> 0 \<Longrightarrow> n \<ge> 0 \<Longrightarrow> root_main' x n = (y,b) \<Longrightarrow> y \<ge> 0"

Output:
using root_main'_newton_pos
by blast


Input:
lemma zero_spaceN_diff:
  assumes "x \<in> zero_space\<^sub>N N" "y \<in> zero_space\<^sub>N N"
  shows "x - y \<in> zero_space\<^sub>N N"

Output:
using zero_spaceN_add[OF assms(1) zero_spaceN_cmult[OF assms(2), of "-1"]]
by auto


Input: lemma smallo_power: "n > 0 \<Longrightarrow> f \<in> o[F](g) \<Longrightarrow> (\<lambda>x. f x ^ n) \<in> o[F](\<lambda>x. g x ^ n)"

Output: by (induction n rule: nat_induct_non_zero) (auto intro: landau_o.small.mult)


Input:
lemma karatsuba_main_step: fixes f :: "'a :: comm_ring_1 poly"
  assumes f: "f = monom_mult n f1 + f0" and g: "g = monom_mult n g1 + g0"
  shows
    "monom_mult (n + n) (f1 * g1) + (monom_mult n (f1 * g1 - (f1 - f0) * (g1 - g0) + f0 * g0) + f0 * g0) = f * g"

Output:
unfolding assms
by (auto simp: field_simps mult_monom monom_mult_def)


Input: lemma ramsey0: "\<exists>N::nat. partn_lst {..<N} [q1,q2] 0"

Output: by (force simp: partn_lst_def ex_in_conv less_Suc_eq nsets_eq_empty_iff)


Input:
lemma ics_SDG_path_valid_SDG_node:
  assumes "n ics-ns\<rightarrow>\<^sub>d* n'" shows "valid_SDG_node n" and "valid_SDG_node n'"

Output:
using \<open>n ics-ns\<rightarrow>\<^sub>d* n'\<close>
by(induct rule:intra_call_sum_SDG_path.induct, auto intro:sum_SDG_edge_valid_SDG_node valid_SDG_CFG_node)


Input:
lemma limsup_le_extended_Gromov_product_inside':
  assumes "(\<lambda>n. to_Gromov_completion (v n)) \<longlonglongrightarrow> (eta::('a::Gromov_hyperbolic_space) Gromov_completion)"
  shows "limsup (\<lambda>n. Gromov_product_at e (v n) x) \<le> extended_Gromov_product_at e eta (to_Gromov_completion x) + deltaG(TYPE('a))"

Output:
using limsup_le_extended_Gromov_product_inside[OF assms]
by (simp add: Gromov_product_commute extended_Gromov_product_at_commute)


Input:
lemma enat_min:
  assumes "m \<ge> enat n'"
    and "enat n < m - enat n'"
  shows "enat n + enat n' < m"

Output:
using assms
by (metis add.commute enat.simps(3) enat_add_mono enat_add_sub_same le_iff_add)


Input: lemma non_wildcard_ifaces_upto: "set (non_wildcard_ifaces_upto n) = {s::string. length s \<le> n \<and> \<not> iface_name_is_wildcard s}"

Output:
apply(induction n)
apply fastforce
using non_wildcard_ifaces
by fastforce


Input:
lemma fps_nth_deriv_mult_const_left[simp]:
  "fps_nth_deriv n (fps_const c * f) = fps_const c * fps_nth_deriv n f"

Output:
using fps_nth_deriv_linear[of n "c" f 0 0 ]
by simp


Input: lemma rev_replicate [simp]: "rev (replicate n x) = replicate n x"

Output: by (induct n) (auto simp: replicate_app_Cons_same)


Input:
lemma hermitian_proj_psi_minus_1:
  "hermitian (2 \<cdot>\<^sub>m proj_psi - 1\<^sub>m N)"

Output:
unfolding hermitian_def
apply (subst adjoint_minus[of _ N N])
apply (auto simp add: proj_psi_dim)
apply (subst adjoint_scale)
using hermitian_proj_psi[simplified hermitian_def] hermitian_def adjoint_one
by auto


Input: lemma real_root_gt_zero: "0 < n \<Longrightarrow> 0 < x \<Longrightarrow> 0 < root n x"

Output:
using real_root_less_mono[of n 0 x]
by simp


Input:
lemma padic_one_simp:
  assumes "n >0"
  shows "padic_one p n =  \<one>\<^bsub>residue_ring (p^n)\<^esub>"
        "padic_one p n = 1"

Output:
apply (simp add: assms padic_one_def residue_ring_def)
using assms padic_one_def
by auto


Input:
lemma inv2_rbtreeify_f: "n \<le> length kvs
  \<Longrightarrow> inv2 (fst (rbtreeify_f n kvs))"
  and inv2_rbtreeify_g: "n \<le> Suc (length kvs)
  \<Longrightarrow> inv2 (fst (rbtreeify_g n kvs))"

Output: by(induct n kvs and n kvs rule: rbtreeify_induct) (auto simp add: bheight_rbtreeify_f bheight_rbtreeify_g intro: bheight_rbtreeify_f_eq_plog2I bheight_rbtreeify_g_eq_plog2I)


Input: lemma primepow_gt_Suc_0: "primepow n \<Longrightarrow> n > Suc 0"

Output:
using one_less_power[of "p::nat" for p]
by (auto simp: primepow_def prime_nat_iff)


Input:
lemma cong_solve_coprime_int:
  "\<exists>x. [a * x = 1] (mod n)" if "coprime a n" for a n x :: int

Output:
using that cong_solve_int [of a n]
by (auto simp add: zabs_def split: if_splits)


Input: lemma eSuc_epred: "n \<noteq> 0 \<Longrightarrow> eSuc (epred n) = n"

Output: by(cases n rule: enat_coexhaust) simp_all


Input:
lemma in_Def_valid_SDG_node:
  "V \<in> Def\<^bsub>SDG\<^esub> n \<Longrightarrow> valid_SDG_node n"

Output: by(induct rule:SDG_Def.induct,auto intro:valid_SDG_CFG_node)


Input: lemma of_complex_of_real_eq [simp]: "of_complex (of_real n) = of_real n"

Output:
unfolding of_complex_def of_real_def unfolding scaleR_scaleC
by simp


Input: lemma nformsNoContains: "[| branch subs gamma f; !n . ~proofTree (tree subs (f n)); nforms (f n) = []  |] ==> ~ contains f iA n"

Output: apply(simp add: contains_def2) done \<comment> \<open>FIXME tjr assumptions not required\<close>


Input: lemma kpower_simp: "kpower f (Suc n) s = (f ; kpower f n) s"

Output:
unfolding kcomp_eq
apply(induct n) unfolding kpower_base
apply(force simp: subset_antisym) unfolding kpower_def kcomp_eq
by simp


Input:
lemma primerec_all2: "primerec (rec_all rt rf) n \<Longrightarrow>
  primerec rf (Suc n)"

Output: by(insert primerec_all[of rt rf n], simp)


Input:
lemma new_tv_Fun2:
  "new_tv n (t1 =-> t2) = (new_tv n t1 \<and> new_tv n t2)"

Output:
apply (unfold new_tv_def)
apply (fastforce) done


Input:
lemma powr_complexpow [simp]:
  fixes x::complex shows "x \<noteq> 0 \<Longrightarrow> x powr (of_nat n) = x^n"

Output: by (induct n) (auto simp: ac_simps powr_add)


Input:
lemma funpow_shift1:
  "(Ipoly bs (funpow n shift1 p) :: 'a :: comm_ring_1) =
    Ipoly bs (Mul (Pw (Bound 0) n) p)"

Output: by (induct n arbitrary: p) (simp_all add: shift1_isnpoly shift1)


Input:
lemma fekete:
  fixes u::"nat \<Rightarrow> real"
  assumes "\<And>n m. u (m+n) \<le> u m + u n"
          "bdd_below {u n/n | n. n>0}"
  shows "(\<lambda>n. u n/n) \<longlonglongrightarrow> Inf {u n/n | n. n>0}"

Output:
apply (rule subadditive_converges_bounded) unfolding subadditive_def
using assms
by auto


Input: lemma sasp_exec_noops: "execute_serial_plan_sas_plus s (replicate n empty_sasp_action) = s"

Output: by (induction n arbitrary: ) (auto simp: empty_sasp_action_def STRIPS_Representation.is_operator_applicable_in_def execute_operator_def)


Input:
lemma emp_UNpart01:
assumes "\<And> n. n < length cl \<Longrightarrow> {} \<notin> P n"
shows "{} \<notin> UNpart01 cl dl P - {BrnFT cl dl}"

Output:
using assms emp_UNpart1 unfolding UNpart01_def
by auto


Input: lemma skip_im_Tr4:"\<lbrakk>x \<le> Suc n; 0 < x\<rbrakk> \<Longrightarrow> x - Suc 0 \<le> n"

Output: apply (simp add:Suc_le_mono [of "x - Suc 0" "n", THEN sym]) done


Input:
lemma eval_Pr_diverg_Suc [simp]:
  assumes "recfn (Suc n) (Pr n f g)"
    and "n = length xs"
    and "eval (Pr n f g) (x # xs) \<up>"
  shows "eval (Pr n f g) (Suc x # xs) \<up>"

Output:
using assms
by (simp add: eval_def)


Input:
lemma a_star_OrLR:
    "N \<longrightarrow>\<^sub>a* N'\<Longrightarrow> OrL (x).M (y).N z \<longrightarrow>\<^sub>a* OrL (x).M (y).N' z"

Output: by (induct set: rtranclp) (blast intro: rtranclp.rtrancl_into_rtrancl)+


Input: lemma reads_restr_suc: \<open>\<sigma> \<restriction> (reads n) = \<sigma>' \<restriction> (reads n) \<Longrightarrow> suc n \<sigma> = suc n \<sigma>'\<close>

Output: by (metis reads_restrict uses_suc)


Input: lemma residue_one_dvd: "a mod n = 1 \<Longrightarrow> n dvd a - 1" for a n :: nat

Output: by (fastforce intro!: cong_to_1_nat simp: cong_def)


Input:
lemma(in padic_integers) p_int_pow_nonzero:
  assumes "(n::int) \<ge>0"
  shows "(\<p>[^]n) \<in> nonzero Zp"

Output: by (metis assms not_nonzero_Zp ord_Zp_p_int_pow ord_of_nonzero(1) p_pow_car)


Input:
lemma fps_mult_right_fps_X_plus_1_nth:
  fixes a :: "'a :: semiring_1 fps"
  shows "(a*(1+fps_X)) $ n = (if n = 0 then a$n else a$n + a$(n - 1))"

Output:
using fps_mult_fps_X_plus_1_nth
by (simp add: distrib_left fps_mult_fps_X_commute distrib_right)


Input: lemma finite_real_of_nat_le_real: "finite {n::nat. real n \<le> u}"

Output: by (metis infinite_nat_iff_unbounded leD le_nat_floor mem_Collect_eq)


Input:
lemma (in padic_integers) mod_in_carrier:
  "a mod (p^n) \<in> carrier (Zp_res_ring n)"

Output:
using p_residue_alt_def p_residue_range'
by auto


Input:
lemma coprime_diff_one_right_nat [simp]:
  "coprime n (n - 1)" if "n > 0" for n :: nat

Output:
using that coprime_diff_one_left_nat [of n]
by (simp add: ac_simps)


Input: lemma card_N: "(n::N) \<in> ns \<Longrightarrow> card (ns - {n}) < card ns"

Output: by (metis finite_N Diff_UNIV Diff_infinite_finite card_Diff1_less finite.emptyI)


Input: lemma space_lborel_f: "space (lborel_f n) = Pi\<^sub>E {..<n} (\<lambda>_. UNIV)"

Output:
unfolding lborel_f_def unfolding space_PiM space_lborel space_borel
by metis


Input:
lemma r_dummy_prim [simp]:
  "prim_recfn a f \<Longrightarrow> prim_recfn (a + n) (r_dummy n f)"

Output:
using wellf_arity_nonzero
by (auto simp add: r_dummy_def)


Input:
lemma (in dcharacter) not_primitive_imp_nonprimitive:
  assumes "\<not>primitive_dchar n \<chi>"
  shows   "nonprimitive_dchar n \<chi>"

Output:
using assms dcharacter_axioms unfolding nonprimitive_dchar_def primitive_dchar_def primitive_dchar_axioms_def nonprimitive_dchar_axioms_def
by auto


Input: lemma det_one[simp]: "det (1\<^sub>m n) = 1"

Output:
proof - have "det (1\<^sub>m n) = prod_list (diag_mat (1\<^sub>m n))"
by (rule det_upper_triangular[of _ n], auto) also have "\<dots> = 1"
by (induct n, auto) finally show ?thesis .
qed


Input: lemma exp_converges: "(\<lambda>n. x^n /\<^sub>R fact n) sums exp x"

Output:
unfolding exp_def
by (rule summable_exp_generic [THEN summable_sums])


Input: lemma fold_insert [simp]: "\<not> member dxs x \<Longrightarrow> DList_Set.fold f (insert x dxs) b = DList_Set.fold f dxs (f x b)"

Output: by(transfer)(simp add: equal_base.list_insert_def)


Input: lemma quantale_homset_iff: "f \<in> quantale_homset = (comp_pres f \<and> Sup_pres f)"

Output:
unfolding quantale_homset_def
by clarsimp


Input:
lemma convex_with_UNIV_domain:
  fixes f :: "'a::euclidean_space \<Rightarrow> ereal"
  assumes "convex_on UNIV f"
  assumes "domain f = UNIV"
  shows "(\<forall>x. f x > -\<infinity>) \<or> (\<forall>x. f x = -\<infinity>)"

Output: by (metis assms convex_improper ereal_MInfty_lessI proper_iff rel_interior_UNIV UNIV_I)


Input:
lemma total_preorder_on_map:
  "total_preorder_on (f -` carrier) (map_relation f le)"

Output:
proof - interpret R': preorder_on "f -` carrier" "map_relation f le"
using preorder_on_map[of f] . show ?thesis
by unfold_locales (simp add: map_relation_def total)
qed


Input:
lemma set_integral_Un:
  fixes f :: "_ \<Rightarrow> _ :: {banach, second_countable_topology}"
  assumes "A \<inter> B = {}"
  and "set_integrable M A f"
  and "set_integrable M B f"
shows "LINT x:A\<union>B|M. f x = (LINT x:A|M. f x) + (LINT x:B|M. f x)"

Output:
using assms unfolding set_integrable_def set_lebesgue_integral_def
by (auto simp add: indicator_union_arith indicator_inter_arith[symmetric] scaleR_add_left)


Input: lemma map_lc_noop[simp]: "lc f = {} \<Longrightarrow> map_lc p f = f"

Output: by (induction f) (auto simp add: map_idI)


Input:
lemma linear_iff: "linear s1 s2 f \<longleftrightarrow>
  (vector_space s1 \<and> vector_space s2 \<and> (\<forall>x y. f (x + y) = f x + f y) \<and> (\<forall>c x. f (s1 c x) = s2 c (f x)))"

Output:
unfolding linear_def module_hom_iff vector_space_def module_def
by auto


Input: lemma cp [simp]:  "cp self' \<Longrightarrow> cp a1' \<Longrightarrow>  cp res' \<Longrightarrow> cp (\<lambda>X. f (self' X) (a1' X))"

Output: by(rule_tac f=f in cpI2, auto intro:cp0)


Input:
lemma continuous_on_exp [continuous_intros]: "continuous_on s f \<Longrightarrow> continuous_on s (\<lambda>x. exp (f x))"
  for f :: "_ \<Rightarrow>'a::{real_normed_field,banach}"

Output:
unfolding continuous_on_def
by (auto intro: tendsto_exp)