Input:
lemma testN_post1:
  "f k \<Longrightarrow> adjoint (testN k) * post * testN k = testN k"

Output:
apply (subst assoc_mult_mat[of _ N N _ N _ N])
apply (auto simp add: adjoint_dim testN_dim post_dim)
apply (subst post_mult_testNk, simp) unfolding hermitian_testN[unfolded hermitian_def]
using testN_mult_testN
by auto


Input:
lemma LLL_d_Suc: assumes k: "k < m"
shows "of_int (d fs (Suc k)) = sq_norm (gso fs k) * of_int (d fs k)"

Output:
using assms fs.fs_int_d_Suc LLL_inv_wD[OF Linv] unfolding fs.d_def d_def
by auto


Input:
lemma newton_seq_fact2:
"\<And>k.  val_Zp (f\<bullet>(ns k)) \<ge> 2*(val_Zp (f'\<bullet>a)) + (2^k)*t"

Output: by (meson le_iff_add newton_seq_props_induct)


Input: lemma typ_arity_lookup_code: "type_arity (translate_signature \<Sigma>) n = lookup (\<lambda>k. k = n) (exetyp_arity_of \<Sigma>)"

Output: by (cases \<Sigma>) (simp add: lookup_eq_map_of_ap)


Input:
lemma ahm_e_is_be: "\<lbrakk>
  ahm_\<alpha> m k = Some v;
  !!bm. \<lbrakk>m (hashcode k) = Some bm; bm k = Some v \<rbrakk> \<Longrightarrow> P
  \<rbrakk> \<Longrightarrow> P"

Output: by (unfold ahm_\<alpha>_def) (auto split: option.split_asm)


Input:
lemma Prod_any_power_lookup_eq:
  "(\<Prod>k::'a. f k ^ lookup (x::'a\<Rightarrow>\<^sub>0nat) k) = (\<Prod>k\<in>keys x. f k ^ lookup x k)"

Output: by (subst Prod_any.conditionalize) (auto simp: in_keys_iff intro!: Prod_any.cong)


Input:
lemma std_normal_distribution_even_moments_abs:
  fixes k :: nat
  shows "(LINT x|std_normal_distribution. \<bar>x\<bar>^(2 * k)) = fact (2 * k) / (2^k * fact k)"

Output:
using integral_std_normal_moment_even[of k]
by (subst integral_density) (auto simp: normal_density_nonneg power_even_abs)


Input:
lemma xor_negative_int_iff [simp]:
  \<open>k XOR l < 0 \<longleftrightarrow> (k < 0) \<noteq> (l < 0)\<close> for k l :: int

Output: by (subst Not_eq_iff [symmetric]) (auto simp add: not_less)


Input:
lemma (in domain) var_pow_closed:
  assumes "subring K R" shows "X [^]\<^bsub>K[X]\<^esub> (n :: nat) \<in> carrier (K[X])"

Output: using monoid.nat_pow_closed[OF univ_poly_is_monoid[OF assms] var_closed(1)[OF assms]] .


Input: lemma mod_eq_Suc_0_conv: "Suc 0 < k \<Longrightarrow> ((x + k - Suc 0) mod k = 0) = (x mod k = Suc 0)"

Output:
apply (simp only: mod_pred)
apply (case_tac "x mod k = Suc 0")
apply simp_all done


Input:
lemma hermitian_proj_psi_l:
  "k < K \<Longrightarrow> hermitian (proj_psi_l k)"

Output:
using positive_psi_l positive_is_hermitian
by auto


Input:
lemma shiftr_integer_transfer [transfer_rule]:
  \<open>(pcr_integer ===> (=) ===> pcr_integer) (\<lambda>k n. drop_bit n k) (>>)\<close>

Output:
unfolding shiftr_eq_drop_bit
by transfer_prover


Input: lemma selection_completion: "K = Cn(A) \<Longrightarrow> \<gamma> K \<phi> \<subseteq> * \<gamma> K \<phi>"

Output:
using completion_def is_selection tautology_selection
by fastforce


Input:
lemma hm_index_op_correct:
      assumes "hmr_invar hm"
      assumes "heapmap_\<alpha> hm k \<noteq> None"
      shows "hm_index_op hm k \<le> SPEC (\<lambda>r. r= hm_index hm k)"

Output:
using assms unfolding hm_index_op_def
apply refine_vcg
apply (auto simp: heapmap_\<alpha>_def hmr_invar_def hm_index_def index_nth_id) done


Input:
lemma sb_inc_lem: "a + 2^k < 0 \<Longrightarrow> a + 2^k + 2^(Suc k) \<le> (a + 2^k) mod 2^(Suc k)"
  for a :: int

Output:
using int_mod_ge' [where n = "2 ^ (Suc k)" and b = "a + 2 ^ k"]
by simp


Input:
lemma idx_bubble_up_rule [hoare_triple]:
  "index_of_pqueue x \<Longrightarrow>
   <idx_pqueue x a>
   idx_bubble_up a k
   <\<lambda>_. idx_pqueue (idx_bubble_up_fun x k) a>"

Output: @proof @fun_induct "idx_bubble_up_fun x k" @with @subgoal "(x = (xs, m), k = k)" @unfold "idx_bubble_up_fun (xs, m) k" @end @qed


Input:
lemma enat_mult_cancel1 [simp]:
  "k * m = k * n \<longleftrightarrow> m = n \<or> k = 0 \<or> k = (\<infinity> :: enat) \<and> n \<noteq> 0 \<and> m \<noteq> 0"

Output: by(cases k m n rule: enat.exhaust[case_product enat.exhaust[case_product enat.exhaust]])(simp_all add: zero_enat_def)


Input:
lemma update_idx_pqueue_rule [hoare_triple]:
  "k < length m \<Longrightarrow> index_of_pqueue (xs, m) \<Longrightarrow>
   <idx_pqueue (xs, m) p>
   update_idx_pqueue k v p
   <idx_pqueue (update_idx_pqueue_fun k v (xs, m))>\<^sub>t"

Output: @proof @unfold "update_idx_pqueue_fun k v (xs, m)" @qed


Input: lemma eval_fds_at_numeral: "eval_fds f (numeral k) = (\<Sum>n. fds_nth f n / of_nat n ^ numeral k)"

Output:
using eval_fds_at_nat[of f "numeral k"]
by simp


Input:
lemma fps_cutoff_right_mult_nth:
  assumes "k < n"
  shows   "(f * fps_cutoff n g) $ k = (f * g) $ k"

Output:
proof- from assms have "\<forall>i\<in>{0..k}. fps_cutoff n g $ (k - i) = g $ (k - i)"
by auto thus ?thesis
by (simp add: fps_mult_nth)
qed


Input:
lemma (in Corps) mI_gen_in_I1:"\<lbrakk>0 < n; distinct_pds K n P; ideal (O\<^bsub>K P n\<^esub>) I;
  I \<noteq> {\<zero>\<^bsub>(O\<^bsub>K P n\<^esub>)\<^esub>}; I \<noteq> carrier (O\<^bsub>K P n\<^esub>)\<rbrakk> \<Longrightarrow>  (mIg\<^bsub>K n P I\<^esub>) \<in> I"

Output: apply (simp add:mIg_def mI_gen_in_I) done


Input:
lemma iFROM_iT_Div_Int: "
  \<lbrakk> 0 < k; n \<le> iMin A \<rbrakk> \<Longrightarrow> (A \<inter> [n\<dots>]) \<oslash> k = (A \<oslash> k) \<inter> ([n\<dots>] \<oslash> k)"

Output:
apply (rule subset_iT_Div_Int)
apply (blast intro: order_trans iMin_le) done


Input: lemma UN_atLeast_UNIV: "(\<Union>n. atLeast (k - int n)) = UNIV"

Output:
apply auto
apply (rule_tac x = "nat (k - x)" in exI, simp) done


Input:
lemma prj_simps [simp]:
    assumes "ide h" and "is_left_adjoint k" and "trg h = trg k"
    shows "trg (prj\<^sub>0 h k) = src h"
    and "src (prj\<^sub>1 h k) = src (prj\<^sub>0 h k)" and "trg (prj\<^sub>1 h k) = src k"
    and "dom (prj\<^sub>0 h k) = prj\<^sub>0 h k" and "cod (prj\<^sub>0 h k) = prj\<^sub>0 h k"
    and "dom (prj\<^sub>1 h k) = prj\<^sub>1 h k" and "cod (prj\<^sub>1 h k) = prj\<^sub>1 h k"
    and "is_left_adjoint (prj\<^sub>0 h k)" and "is_left_adjoint (prj\<^sub>1 h k)"

Output:
using assms prj_in_hom
by auto


Input:
lemma binomial_code[code]:
  "n choose k = (if k \<le> n then fact n div (fact k * fact (n - k)) else 0)"

Output:
using binomial_eq_0[of n k] binomial_altdef_nat[of k n]
by simp


Input:
lemma summable_Ln_complex:
  fixes z :: "nat \<Rightarrow> complex"
  assumes "convergent_prod z" "\<And>k. z k \<noteq> 0"
  shows "summable (\<lambda>k. Ln (z k))"

Output:
using convergent_prod_def assms convergent_prod_iff_summable_complex
by blast


Input:
lemma length_ci:
  "\<lbrakk>k < length ap; length (ci ly y (ap ! k)) = 2 * qa\<rbrakk>
      \<Longrightarrow> layout_of ap ! k = qa"

Output:
apply(cases "ap ! k")
apply(auto simp: layout_of.simps ci.simps length_of.simps tinc_b_def tdec_b_def length_findnth adjust.simps) done


Input:
lemma liftn_var_dist_lt:
  "\<forall>i\<in>set vs. i < k \<Longrightarrow> liftn n (var_dist vs t) k = var_dist vs (liftn n t k)"

Output: by (induction vs arbitrary: t) auto


Input: lemma degree_ge_iff: "k > 0 \<Longrightarrow> MPoly_Type.degree p x \<ge> k \<longleftrightarrow> (\<exists>m\<in>monomials p. lookup m x \<ge> k)"

Output:
using Max_ge_iff
by (meson degree_less_iff not_less)


Input:
lemma Predict_subset_Gen:
  assumes "I \<subseteq> Gen P"
  assumes "k \<le> length Doc"
  shows "Predict k I \<subseteq> Gen P"

Output:
using Predict_elem_in_Gen assms
by blast


Input: lemma R_nondet_assign: "(x ::= ?) \<le> Ref \<lceil>\<lambda>s. \<forall>k. P (\<chi> j. ((($) s)(x := k)) j)\<rceil> \<lceil>P\<rceil>"

Output:
unfolding spec_def
by (rule H_nondet_assign)


Input:
lemma State_works:
"valid_state_var (State t k) \<Longrightarrow>
      dimacs_to_var (var_to_dimacs (State t k)) =
         (State t k)"

Output: by (induction k) (auto simp add: dimacs_to_var_def add.left_commute Let_def)


Input:
lemma deltas_below:
 "\<And>i. bounded d k \<Longrightarrow> i < k \<Longrightarrow> deltas d w i < k"

Output:
apply (unfold bounded_def)
apply (induct "w")
apply simp_all done


Input:
lemma (in ring) simple_extension_incl:
  assumes "K \<subseteq> carrier R" and "x \<in> carrier R" shows "K \<subseteq> simple_extension K x"

Output:
proof fix k assume "k \<in> K" thus "k \<in> simple_extension K x"
using simple_extension.lin[OF simple_extension.zero, of k K x] assms
by auto
qed


Input: lemma degree_greater_iff: "MPoly_Type.degree p x > k \<longleftrightarrow> (\<exists>m\<in>monomials p. lookup m x > k)"

Output: by transfer' (auto simp: Max_gr_iff)


Input: lemma lookup_delete [simp]: "lookup (delete k al) = (lookup al)(k := None)"

Output: by(simp add: lookup_def delete_def Assoc_List_inverse distinct_delete map_of_delete_aux')


Input:
lemma has_bochner_integral_I0i_power_exp_m':
  "has_bochner_integral lborel (\<lambda>x. x^k * exp (-x) * indicator {0 ..} x::real) (fact k)"

Output:
using nn_intergal_power_times_exp_Ici[of k]
by (intro has_bochner_integral_nn_integral) (auto simp: nn_integral_set_ennreal split: split_indicator)


Input:
lemma GuardK_analz [intro]: "[| GuardK n Ks G; \<forall>K. K \<in> Ks \<longrightarrow> Key K \<notin> analz G |]
==> GuardK n Ks (analz G)"

Output:
apply (auto simp: GuardK_def)
apply (erule analz.induct, auto)
by (ind_cases "Crypt K Xa \<in> guardK n Ks" for K Xa, auto)


Input:
lemma integrable_stretch:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector"
  assumes "f integrable_on cbox a b"
    and "\<forall>k\<in>Basis. m k \<noteq> 0"
  shows "(\<lambda>x::'a. f (\<Sum>k\<in>Basis. (m k * (x\<bullet>k))*\<^sub>R k)) integrable_on
    ((\<lambda>x. \<Sum>k\<in>Basis. (1 / m k * (x\<bullet>k))*\<^sub>R k) ` cbox a b)"

Output:
using assms unfolding integrable_on_def
by (force dest: has_integral_stretch)


Input: lemma iTILL_add_neg: "[\<dots>n] \<oplus>- k = (if k \<le> n then [\<dots>n - k] else {})"

Output: by (force simp add: set_eq_iff iT_Plus_neg_mem_iff iT_iff)


Input:
lemma or_int_rec:
  \<open>k OR l = of_bool (odd k \<or> odd l) + 2 * ((k div 2) OR (l div 2))\<close>
  for k l :: int

Output:
using and_int_rec [of \<open>NOT k\<close> \<open>NOT l\<close>]
by (simp add: or_int_def even_not_iff_int not_int_div_2) (simp add: not_int_def)


Input:
lemma fineI:
  assumes "\<And>x k. (x, k) \<in> s \<Longrightarrow> k \<subseteq> d x"
  shows "d fine s"

Output:
using assms unfolding fine_def
by auto


Input:
lemma fst_snd_snd_echelon_form_of_column_k_det:
  assumes "k < ncols A"
  and "i \<le> nrows A"
  shows "snd (snd ((echelon_form_of_column_k_det bezout) (n,A,i) k))
  = fst (snd (snd (echelon_form_of_column_k_det_iarrays (n,matrix_to_iarray A, i, bezout) k)))"

Output:
unfolding snd_echelon_form_of_column_k_det_eq unfolding snd_echelon_form_of_column_k_det
by (rule fst_snd_matrix_to_iarray_echelon_form_of_column_k[OF assms])


Input:
lemma execl_last:
 "\<lbrakk>P \<Turnstile> cfs; k < length cfs; fst (cfs ! k) \<notin> {0..<size P}\<rbrakk> \<Longrightarrow>
    length cfs - 1 = k"

Output: by (induction cfs arbitrary: k rule: execl.induct, auto simp: nth_Cons exec1_def split: nat.split_asm)


Input: lemma tree\<^sub>i_order: "\<lbrakk>k > 0; root_order_up\<^sub>i k u\<rbrakk> \<Longrightarrow> root_order k (tree\<^sub>i u)"

Output:
apply(cases u)
apply(auto simp add: order_impl_root_order) done


Input:
lemma f_expand_drop_mod: "
  n mod k = 0 \<Longrightarrow> xs \<odot>\<^sub>f k \<up> n = xs \<up> (n div k) \<odot>\<^sub>f k"

Output: by (clarsimp simp: mult.commute[of k] f_expand_drop_mult elim!: dvdE)


Input:
lemma ex_conv_ex_lookup:
  "ex P t \<longleftrightarrow> (\<exists>(k :: 'a) v. lookup t k = Some v \<and> P k v)"

Output: by transfer(auto simp add: ID_ccompare_neq_None linorder.rbt_lookup_keys[OF mapping_linorder] ord.is_rbt_rbt_sorted RBT_Impl.keys_def RBT_Impl_rbt_ex_def linorder.map_of_entries[OF mapping_linorder, symmetric] linorder.distinct_entries[OF mapping_linorder] intro: map_of_is_SomeI)


Input:
lemma primrootE: assumes "x \<in>\<^sub>p r*"
  obtains k where "k \<noteq> 0" and "r\<^sup>@k = x"

Output:
using assms unfolding primitive_rootP_def root_def
using nemp_pow[of r]
by auto


Input:
lemma res_seq_res:
  assumes "s \<in> closed_seqs Zp"
  shows "(res_seq s k) \<in> closed_seqs Zp"

Output:
apply(induction k)
apply (simp add: assms)
by (simp add: const_res_subseq is_subseq_closed)


Input: lemma fmap_of_list_SomeD: "fmlookup (fmap_of_list xs) k = Some v \<Longrightarrow> (k, v) \<in> set xs"

Output: by transfer' (auto dest: map_of_SomeD)


Input: lemma fls_subdegree_ge0I: "(\<And>k. k < 0 \<Longrightarrow> f $$ k = 0) \<Longrightarrow> 0 \<le> fls_subdegree f"

Output:
using fls_subdegree_geI[of f 0]
by (cases "f=0") auto


Input:
lemma (in Corps) vp_gen_nonzero:"\<lbrakk>valuation K v; vp K v = (Vr K v) \<diamondsuit>\<^sub>p t\<rbrakk> \<Longrightarrow>
                 t \<noteq> \<zero>\<^bsub>Vr K v\<^esub>"

Output:
apply (rule contrapos_pp, simp+, cut_tac Ring.Rxa_zero[of "Vr K v"], drule sym, simp, simp add:vp_nonzero)
apply (simp add:Vr_ring) done


Input:
lemma iT_Plus_cut_le: "
  (I \<oplus> k) \<down>\<le> t = (if t < k then {} else I \<down>\<le> (t - k) \<oplus> k)"

Output:
apply (case_tac "t < k")
apply (simp add: cut_le_empty_iff iT_Plus_mem_iff)
apply (insert iT_Plus_cut_le2[of I k "t - k"], simp) done


Input: lemma surj_upOne: "surj upOne"

Output:
proof (unfold Fun.surj_def, rule) fix k::int show "\<exists>m. k = upOne m"
by (rule exI[of "\<lambda>l. k = upOne l" "k - 1"], simp)
qed


Input: lemma proj_sum_list: "proj_poly k (sum_list xs) = sum_list (map (proj_poly k) xs)"

Output:
using proj_zero proj_plus
by (rule fun_sum_list_commute)


Input:
lemma EpriK_synth [elim]: "epriK K \<in> synth H \<Longrightarrow>
       epriK K \<in> H \<or> (\<exists> N. epriK K = epriKA N)"

Output: by (cases K, auto elim: EpriKF_synth)


Input:
lemma lookup_make_fmap1:
  "lookup [ {|k|} |=> v ] k = v"

Output: by (metis finsert.rep_eq insert_iff lookup_make_fmap)


Input:
lemma map_of_mapk_inj_on_SomeI:
  "inj_on f (fst ` (set t)) \<Longrightarrow> map_of t k = Some x \<Longrightarrow>
    map_of (map (case_prod (\<lambda>k. Pair (f k))) t) (f k) = Some x"

Output: by (induct t) (auto simp add: inj_on_def dest!: map_of_SomeD split: if_split_asm)


Input: lemma proj_mult_vec [term_simps]: "proj_poly k (p ** q) = (proj_poly k p) * (proj_poly k q)"

Output:
unfolding mult_vec_def
by (rule proj_lift_poly_fun_2_homogenous, simp)


Input: lemma by_length_paths_le[symmetric]: "by_length k P = by_length k (paths_le k P)"

Output:
using
by_length.simps paths_le_def
by auto


Input:
lemma finite_lookup_nat [simp]:
  fixes f :: "'a \<Rightarrow>\<^sub>0 nat"
  shows "finite {k. 0 < lookup f k}"

Output:
using poly_mapping.lookup [of f]
by simp


Input:
lemma ls_update_map_of_neq:
  "x \<noteq> k \<Longrightarrow> map_of (fst (ls_update k v ls)) x = map_of ls x"

Output:
apply (induct ls rule: ls_update.induct)
by (auto simp add: Let_def)


Input:
lemma minus_plus:
  assumes "s adds t"
  shows "(t - s) + u = (t + u) - s"

Output:
proof - from assms obtain k where k: "t = s + k" unfolding adds_def .. hence "t - s = k"
by simp also from k have "(t + u) - s = k + u"
by (simp add: add_assoc) finally show ?thesis
by simp
qed


Input:
lemma fact_numeral: "fact (numeral k) = numeral k * fact (pred_numeral k)"
  \<comment> \<open>Evaluation for specific numerals\<close>

Output: by (metis fact_Suc numeral_eq_Suc of_nat_numeral)


Input:
lemma division_ofI:
  assumes "finite s"
    and "\<And>K. K \<in> s \<Longrightarrow> K \<subseteq> i"
    and "\<And>K. K \<in> s \<Longrightarrow> K \<noteq> {}"
    and "\<And>K. K \<in> s \<Longrightarrow> \<exists>a b. K = cbox a b"
    and "\<And>K1 K2. K1 \<in> s \<Longrightarrow> K2 \<in> s \<Longrightarrow> K1 \<noteq> K2 \<Longrightarrow> interior K1 \<inter> interior K2 = {}"
    and "\<Union>s = i"
  shows "s division_of i"

Output:
using assms unfolding division_of_def
by auto


Input: lemma path_suc: \<open>path \<sigma> (Suc k) = fst (step (path \<sigma> k, \<sigma>\<^bsup>k\<^esup>))\<close>

Output: by (induction \<open>k\<close>, auto simp: path_def kth_state_def)


Input: lemma key1_issued[simp]: "hotel s \<Longrightarrow> (k,k') : cards s g \<Longrightarrow> k \<in> issued s"

Output: by (induct s) (auto split:event.split)


Input: lemma pres_eq_iff_svb: "((=),(=))\<in>K\<rightarrow>K\<rightarrow>bool_rel \<longleftrightarrow> (single_valued K \<and> single_valued (K\<inverse>))"

Output:
apply (safe intro!: single_valuedI)
apply (metis (full_types) IdD fun_relD1)
apply (metis (full_types) IdD fun_relD1)
by (auto dest: single_valuedD)


Input: lemma cp_eq_cs: assumes \<open>((\<sigma>,k),(\<sigma>',k'))\<in>cp\<close> shows \<open>cs\<^bsup>path \<sigma>\<^esup> k = cs\<^bsup>path \<sigma>'\<^esup> k'\<close>

Output:
using assms
apply(induction rule: cp.induct)
apply blast+
apply simp done


Input:
lemma cycle_free_cycle_free_up_to:
  "cycle_free m n \<Longrightarrow> k \<le> n \<Longrightarrow> cycle_free_up_to m k n"

Output:
unfolding cycle_free_def cycle_free_up_to_def
by force


Input: lemma iT_Minus_cut_greater: "(k \<ominus> I) \<down>> t = k \<ominus> (I \<down>< (k - t))"

Output:
apply (case_tac "t \<le> k")
apply (cut_tac iT_Minus_cut_greater2[of "k - t" k I], simp+)
apply (fastforce simp: i_cut_mem_iff iT_Minus_mem_iff) done


Input:
lemma snd_echelon_form_of_column_k_det:
  shows "(snd (echelon_form_of_column_k_det_iarrays (det_P, A, i, bezout) k))
  = echelon_form_of_column_k_iarrays (A,i,bezout) k"

Output:
unfolding echelon_form_of_column_k_det_iarrays_def Let_def
by auto


Input:
lemma gen_enumerate_it_to_list[refine_transfer_post_simp]:
      "gen_enumerate (it_to_list it) =
       (\<lambda> upd emp S. snd (foldli (it_to_list it S) (\<lambda> _. True)
      (\<lambda> x s. case s of (k, m) \<Rightarrow> (Suc k, upd x k m)) (0, emp)))"

Output:
unfolding gen_enumerate_def unfolding foldl_conv_fold[symmetric] unfolding foldli_foldl[symmetric]
by rule


Input:
lemma (in GroupHom) isoI:
  assumes "\<And>k. k\<in>G \<Longrightarrow> T k = 0 \<Longrightarrow> k=0"
  shows   "GroupIso G T"

Output:
proof (unfold_locales, rule inj_onI) fix x y from assms show "\<lbrakk> x\<in>G; y\<in>G; T x = T y \<rbrakk> \<Longrightarrow> x = y"
using im_diff diff_closed
by force
qed


Input: theorem fast_select_correct: "k < length xs \<Longrightarrow> fast_select k xs = select k xs"

Output:
using fast_select_termination
by (intro fast_select_correct_aux) auto


Input:
lemma pow_mat_ring_pow: assumes A: "(A :: ('a :: semiring_1)mat) \<in> carrier_mat n n"
  shows "A ^\<^sub>m k = A [^]\<^bsub>ring_mat TYPE('a) n b\<^esub> k"
  (is "_ = A [^]\<^bsub>?C\<^esub> k")

Output:
proof - interpret semiring ?C
by (rule semiring_mat) show ?thesis
by (induct k, insert A, auto simp: ring_mat_def nat_pow_def)
qed


Input:
lemma connected_ivt_component_cart:
  fixes x :: "real^'n"
  shows "connected s \<Longrightarrow> x \<in> s \<Longrightarrow> y \<in> s \<Longrightarrow> x$k \<le> a \<Longrightarrow> a \<le> y$k \<Longrightarrow> (\<exists>z\<in>s.  z$k = a)"

Output:
using connected_ivt_hyperplane[of s x y "axis k 1" a]
by (auto simp add: inner_axis inner_commute)


Input:
lemma offs_append:
 "offs (ms @ ns) k = offs ms k @ offs ns (foldl (+) k ms)"

Output: by (induction ms arbitrary: k, simp_all)


Input: lemma lookup_eq_valueI: "(k, v) \<in> set (fst (list_of_oalist xs)) \<Longrightarrow> lookup xs k = v"

Output:
unfolding lookup_def
using oalist_inv_list_of_oalist
by (rule lookup_raw_eq_valueI)


Input: lemma of_nat_fract: "of_nat k = Fract (of_nat k) 1"

Output: by (induct k) (simp_all add: Zero_fract_def One_fract_def)


Input:
lemma table_append_Some_iff: "table_of (xs@ys) k = Some z =
 (table_of xs k = Some z \<or> (table_of xs k = None \<and> table_of ys k = Some z))"

Output:
apply (simp)
apply (rule map_add_Some_iff) done


Input:
lemma CharacterData_simp4 [simp]:
  "h \<turnstile> put_M\<^sub>C\<^sub>h\<^sub>a\<^sub>r\<^sub>a\<^sub>c\<^sub>t\<^sub>e\<^sub>r\<^sub>D\<^sub>a\<^sub>t\<^sub>a character_data_ptr setter v \<rightarrow>\<^sub>h h'
  \<Longrightarrow> preserved (get_M\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t element_ptr getter) h h'"

Output: by(auto simp add: put_M_defs ElementMonad.get_M_defs preserved_def split: option.splits dest: get_heap_E)


Input:
lemma get_elment_ptr_simp2 [simp]:
  "element_ptr \<noteq> element_ptr'
  \<Longrightarrow> get\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t element_ptr (put\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t element_ptr' element h) = get\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t element_ptr h"

Output: by(auto simp add: get\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t_def put\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t_def)


Input:
lemma le_fininfI[intro 0]:
      assumes "v\<^sub>2 \<le>\<^sub>F\<^sub>I w\<^sub>2" "w\<^sub>1 \<preceq>\<^sub>F v\<^sub>2"
      shows "w\<^sub>1 \<preceq>\<^sub>F\<^sub>I w\<^sub>2"

Output:
using assms unfolding le_fininf_def
by auto


Input:
lemma (in lift_state_space) lift_hoaret:
  assumes deriv: "\<Gamma>,{}\<turnstile>\<^sub>t\<^bsub>/F\<^esub> P c Q,A"
  shows
   "(lift\<^sub>e \<Gamma>),{}\<turnstile>\<^sub>t\<^bsub>/F\<^esub> (lift\<^sub>s P) (lift\<^sub>c c) (lift\<^sub>s Q),(lift\<^sub>s A)"

Output:
apply (rule hoaret_complete)
apply (insert hoaret_sound [OF deriv])
apply (rule lift_validt)
apply (simp add: cvalidt_def) done


Input:
lemma shadow_root_put_get [simp]: "h \<turnstile> put_M\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t shadow_root_ptr setter v \<rightarrow>\<^sub>h h'
  \<Longrightarrow> (\<And>x. getter (setter (\<lambda>_. v) x) = v)
  \<Longrightarrow> h' \<turnstile> get_M\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t shadow_root_ptr getter \<rightarrow>\<^sub>r v"

Output: by(auto simp add: put_M_defs get_M_defs split: option.splits)


Input:
lemma is_element_ptr_kind_not_character_data_ptr [simp]:
  "\<not> is_element_ptr_kind (cast\<^sub>c\<^sub>h\<^sub>a\<^sub>r\<^sub>a\<^sub>c\<^sub>t\<^sub>e\<^sub>r\<^sub>_\<^sub>d\<^sub>a\<^sub>t\<^sub>a\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r character_data_ptr)"

Output:
using is_element_ptr_kind_obtains
by fastforce


Input:
theorem wf_typeE1:
  "\<Gamma> \<turnstile> t : T \<Longrightarrow> \<Gamma> \<turnstile>\<^sub>w\<^sub>f"
  "\<Gamma> \<turnstile> fs [:] fTs \<Longrightarrow> \<Gamma> \<turnstile>\<^sub>w\<^sub>f"

Output: by (induct set: typing typings) (blast elim: well_formedE_cases)+


Input:
lemma shadow_root_get_put_6 [simp]:
  "get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t document_ptr (put\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t shadow_root_ptr f h) = get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t document_ptr h"

Output: by(auto simp add: get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t_def get\<^sub>N\<^sub>o\<^sub>d\<^sub>e_def put\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_def)


Input:
lemma get_document_ptr_simp [simp]:
  "get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t document_ptr (put\<^sub>O\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t ptr obj h)
     = (if ptr = cast document_ptr then cast obj else get document_ptr h)"

Output: by(auto simp add: get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t_def split: option.splits Option.bind_splits)


Input:
lemma cast\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>e\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r_ext_none [simp]:
  "cast\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>e\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r (node_ptr.Ext (Inr (Inr node_ext_ptr))) = None"

Output: by(simp add: cast\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>e\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r_def)


Input:
lemma tr_par_deduct_iff:
  assumes "B \<in> set (tr\<^sub>p\<^sub>c A D)"
  shows "ik\<^sub>s\<^sub>t (unlabel B) \<cdot>\<^sub>s\<^sub>e\<^sub>t I \<turnstile> t \<longleftrightarrow> ik\<^sub>s\<^sub>s\<^sub>t (unlabel A) \<cdot>\<^sub>s\<^sub>e\<^sub>t I \<turnstile> t"

Output:
using tr_par_ik_eq[OF assms]
by metis


Input:
lemma (in is_cat_cocone) is_cat_coconeD'[cat_lim_cs_intros]:
  assumes "c' = cf_const \<JJ> \<CC> c"
  shows "\<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F\<^sub>.\<^sub>t\<^sub>m c' : \<JJ> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>t\<^sub>m\<^bsub>\<alpha>\<^esub> \<CC>"

Output:
unfolding assms
by (cs_concl cs_intro: cat_small_cs_intros)


Input:
lemma rreqs_increase:
  "paodv i \<TTurnstile>\<^sub>A onll \<Gamma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V (\<lambda>((\<xi>, _), _, (\<xi>', _)). rreqs \<xi> \<subseteq> rreqs \<xi>')"

Output: by (inv_cterms simp add: subset_insertI)


Input:
lemma flush_append_Prog\<^sub>s\<^sub>b:
"\<And>m. (flush (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) (sb @ [Prog\<^sub>s\<^sub>b p\<^sub>1 p\<^sub>2 mis])) m) =
       (flush (takeWhile (Not \<circ> is_volatile_Write\<^sub>s\<^sub>b) sb) m) "

Output: by (induct sb) (auto split: memref.splits)


Input:
lemma height_gt_0_notin_alphabet_imp_sibling_left[simp]:
"\<lbrakk>height t\<^sub>1 > 0; a \<notin> alphabet t\<^sub>1\<rbrakk> \<Longrightarrow>
 sibling (Node w t\<^sub>1 t\<^sub>2) a = sibling t\<^sub>2 a"

Output: by (case_tac t\<^sub>1) simp+


Input:
lemma cross7_mult_left: "(c *\<^sub>R x) \<times>\<^sub>7 y = c *\<^sub>R (x \<times>\<^sub>7 y)"
  and  cross7_mult_right: "x \<times>\<^sub>7 (c *\<^sub>R y) = c *\<^sub>R (x \<times>\<^sub>7 y)"

Output: by (simp_all add: cross7_simps)


Input: lemma semicategory_smc_prod_2[smc_cs_intros]: "semicategory \<alpha> (\<AA> \<times>\<^sub>S\<^sub>M\<^sub>C \<BB>)"

Output:
unfolding smc_prod_2_def
by (rule psmc_semicategory_smc_prod)


Input:
lemma completeness:
  assumes "\<Phi>.lang\<^sub>W\<^sub>S\<^sub>1\<^sub>S n \<phi> = \<Phi>.lang\<^sub>W\<^sub>S\<^sub>1\<^sub>S n \<psi>" "wf_formula n (FOr \<phi> \<psi>)"
  shows "slow.check_eqv n \<phi> \<psi>"

Output:
using assms(2) unfolding slow.check_eqv_def
by (intro conjI[OF assms(2) slow.D.check_eqv_complete, OF box_equals[OF assms(1) lang\<^sub>W\<^sub>S\<^sub>1\<^sub>S_rexp_of''_norm lang\<^sub>W\<^sub>S\<^sub>1\<^sub>S_rexp_of''_norm]]) (auto intro!: \<Phi>.wf_rexp_of'')


Input:
lemma product_simps[simp]:
      "alphabet\<^sub>2 (product AA) = \<Inter> (alphabet\<^sub>1 ` set AA)"
      "initial\<^sub>2 (product AA) = map initial\<^sub>1 AA"
      "transition\<^sub>2 (product AA) a ps = map2 (\<lambda> A p. transition\<^sub>1 A a p) AA ps"
      "condition\<^sub>2 (product AA) = condition (map condition\<^sub>1 AA)"

Output:
unfolding product_def
by auto


Input:
lemma inv\<^sub>2E:
  assumes "inv\<^sub>2 P\<^sub>1 P\<^sub>2 B\<^sub>1 B\<^sub>2 V"
  shows "inv\<^sub>1 P\<^sub>1 P\<^sub>2 B\<^sub>1 B\<^sub>2 V"
    and "V \<inter> L \<noteq> {} \<Longrightarrow> \<forall>B \<in> P\<^sub>1 \<union> wrap B\<^sub>1. B \<inter> L \<noteq> {}"
    and "bij_exists P\<^sub>1 (\<Union>(P\<^sub>2 \<union> wrap B\<^sub>2))"
    and "2 * card P\<^sub>2 \<le> card (\<Union>P\<^sub>2)"

Output:
using assms unfolding inv\<^sub>2_def
by blast+


Input: lemma is_element_ptr_ref [simp]: "is_element_ptr (element_ptr.Ref n)"

Output: by(simp add: is_element_ptr\<^sub>e\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r_def)


Input:
lemma interpretation_subst_idem:
  "interpretation\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<theta> \<Longrightarrow> subst_idem \<theta>"

Output:
unfolding subst_idem_def
using interpretation_grounds_all[of \<theta>] trm_subst_ident subst_eq_if_eq_vars
by fastforce


Input:
lemma pivot_vars:
  "\<lbrakk>\<triangle> (\<T> s); x\<^sub>i \<in> lvars (\<T> s); x\<^sub>j \<in> rvars_of_lvar (\<T> s) x\<^sub>i\<rbrakk> \<Longrightarrow> tvars (\<T> (pivot x\<^sub>i x\<^sub>j s)) = tvars (\<T> s) "

Output:
using pivot_lvars[of s x\<^sub>i x\<^sub>j] pivot_rvars[of s x\<^sub>i x\<^sub>j]
using rvars_of_lvar_rvars[of x\<^sub>i "\<T> s"]
by auto


Input:
lemma aodv_init_sip_not_i [simp]:
  assumes "(\<xi>, p) \<in> \<sigma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V i"
    shows "sip \<xi> \<noteq> i"

Output:
using assms unfolding \<sigma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V_def
by simp


Input:
lemma af\<^sub>G_False_implies_af_False:
  "af\<^sub>G \<phi> \<psi> w \<sim> False\<^sub>n \<Longrightarrow> af \<psi> w \<sim> False\<^sub>n"

Output: by (metis af_append_False af_not_False_implies_af_equals_af\<^sub>G)


Input: lemma LI_compose_measure_lt: "((S@(map Send T)@S',\<theta>\<^sub>1), (S@Send (Fun f T)#S',\<theta>\<^sub>2)) \<in> measure\<^sub>s\<^sub>t"

Output:
using strand_fv_card_map_fun_eq[of S f T S'] strand_size_map_fun_lt(2)[of T f]
by (simp add: measure\<^sub>s\<^sub>t_def size\<^sub>s\<^sub>t_def)


Input:
lemma tr_par_declassified_eq:
  "B \<in> set (tr\<^sub>p\<^sub>c A D) \<Longrightarrow> declassified\<^sub>l\<^sub>s\<^sub>t B I = declassified\<^sub>l\<^sub>s\<^sub>s\<^sub>t A I"

Output:
using tr_par_labeled_rcv_iff unfolding declassified\<^sub>l\<^sub>s\<^sub>t_def declassified\<^sub>l\<^sub>s\<^sub>s\<^sub>t_def
by simp


Input: lemma dot\<^sub>O\<^sub>c\<^sub>l\<^sub>A\<^sub>n\<^sub>y\<A>\<N>\<Y>_at_pre_strict [simp] : "(invalid).any@pre = invalid"

Output: by(rule ext, simp add: dot_accessor None_fun_def None_option_def bot_option_def None_def invalid_def)


Input:
lemma WTBinOp1: "\<lbrakk> P,E \<turnstile> e\<^sub>1 :: T;  P,E \<turnstile> e\<^sub>2 :: T\<rbrakk>
  \<Longrightarrow> P,E \<turnstile> e\<^sub>1 \<guillemotleft>Eq\<guillemotright> e\<^sub>2 :: Boolean"

Output:
apply (rule WTBinOp)
apply assumption+
apply simp done


Input: lemma oaodv_control_within [simp]: "control_within \<Gamma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V (init (opaodv i))"

Output:
unfolding \<sigma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V'_def
by (rule control_withinI) (auto simp del: \<Gamma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V_simps)


Input:
lemma (in is_cat_colimit) cat_colim_unique:
  assumes "u' : \<FF> >\<^sub>C\<^sub>F\<^sub>.\<^sub>c\<^sub>o\<^sub>l\<^sub>i\<^sub>m r' : \<JJ> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<exists>!f'. f' : r \<mapsto>\<^bsub>\<CC>\<^esub> r' \<and> u' = ntcf_const \<JJ> \<CC> f' \<bullet>\<^sub>N\<^sub>T\<^sub>C\<^sub>F u"

Output: by (intro cat_colim_unique_cocone[OF is_cat_colimitD(1)[OF assms]])


Input: lemma String_defined : "\<delta> String = True"

Output:
apply(rule ext, auto simp: String_def defined_def False_def True_def bot_fun_def None_fun_def None_option_def)
by(simp_all add: Abs_Bag\<^sub>b\<^sub>a\<^sub>s\<^sub>e_inject bot_option_def bot_Bag\<^sub>b\<^sub>a\<^sub>s\<^sub>e_def None_Bag\<^sub>b\<^sub>a\<^sub>s\<^sub>e_def None_option_def)


Input:
lemma new_character_data_get_M\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t:
  "h \<turnstile> new_character_data \<rightarrow>\<^sub>h h' \<Longrightarrow> preserved (get_M\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t ptr getter) h h'"

Output: by(auto simp add: new_character_data_def get_M_defs preserved_def split: prod.splits option.splits elim!: bind_returns_result_E bind_returns_heap_E)


Input: lemma (in fbrelation_pair) fbrelation_fcomp: "fbrelation (r\<^sub>1 \<circ>\<^sub>\<bullet> r\<^sub>2)"

Output:
using r\<^sub>1.fbrelation_axioms r\<^sub>2.fbrelation_axioms
by auto


Input:
lemma aodv_init_sip_not_ip' [simp]:
  assumes "(\<xi>, p) \<in> \<sigma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V i"
    shows "sip \<xi> \<noteq> ip \<xi>"

Output:
using assms unfolding \<sigma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V_def
by simp


Input:
lemma ntcf_ntsmcf_ntcf_vcomp[slicing_commute]:
  "ntcf_ntsmcf \<MM> \<bullet>\<^sub>N\<^sub>T\<^sub>S\<^sub>M\<^sub>C\<^sub>F ntcf_ntsmcf \<NN> = ntcf_ntsmcf (\<MM> \<bullet>\<^sub>N\<^sub>T\<^sub>C\<^sub>F \<NN>)"

Output:
unfolding ntsmcf_vcomp_def ntcf_ntsmcf_def cat_smc_def nt_field_simps dg_field_simps
by (simp add: nat_omega_simps)


Input:
lemma new\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_M_ok [simp]:
  "h \<turnstile> ok new\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_M"

Output: by(auto simp add: new\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_M_def split: prod.splits)


Input: lemma OclIsKindOf\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n_OclAny_strict2[simp]: "(None::OclAny) .oclIsKindOf(Person) = True"

Output: by(rule ext, simp add: None_fun_def None_option_def bot_option_def None_def invalid_def OclIsKindOf\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n_OclAny)


Input:
lemma tr_vars_disj:
  assumes "A' \<in> set (tr A D)" "\<forall>(t,t') \<in> set D. (fv t \<union> fv t') \<inter> bvars\<^sub>s\<^sub>s\<^sub>t A = {}"
  and "fv\<^sub>s\<^sub>s\<^sub>t A \<inter> bvars\<^sub>s\<^sub>s\<^sub>t A = {}"
  shows "fv\<^sub>s\<^sub>t A' \<inter> bvars\<^sub>s\<^sub>t A' = {}"

Output:
using assms tr_vars_subset
by fast


Input:
lemma delete\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_pointer_removed:
  assumes "delete\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t ptr h = Some h'"
  shows "ptr |\<notin>| shadow_root_ptr_kinds h'"

Output:
using assms
by(auto simp add: delete\<^sub>O\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t_pointer_removed delete\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_def shadow_root_ptr_kinds_def split: if_splits)


Input:
lemma ntsmcf_smcf_comp_is_semifunctor'[smc_cs_intros]:
  assumes "\<NN> : \<FF> \<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^sub>F \<GG> : \<BB> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
    and "\<HH> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>"
    and "\<FF>' = \<FF> \<circ>\<^sub>S\<^sub>M\<^sub>C\<^sub>F \<HH>"
    and "\<GG>' = \<GG> \<circ>\<^sub>S\<^sub>M\<^sub>C\<^sub>F \<HH>"
  shows "\<NN> \<circ>\<^sub>N\<^sub>T\<^sub>S\<^sub>M\<^sub>C\<^sub>F\<^sub>-\<^sub>S\<^sub>M\<^sub>C\<^sub>F \<HH> : \<FF>' \<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^sub>F \<GG>' : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"

Output: using assms(1,2) unfolding assms(3,4) ..


Input:
lemma par_step_no_change_on_send_or_receive:
    fixes \<sigma> s a \<sigma>' s'
  assumes "((\<sigma>, s), a, (\<sigma>', s')) \<in> oparp_sos i (oseqp_sos \<Gamma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V i) (seqp_sos \<Gamma>\<^sub>Q\<^sub>M\<^sub>S\<^sub>G)"
      and "a \<noteq> \<tau>"
    shows "\<sigma>' i = \<sigma> i"

Output:
using assms
by (rule qmsg_no_change_on_send_or_receive)


Input:
lemma mtx3_to_mtx: "mtx
  ([a\<^sub>1\<^sub>1, a\<^sub>1\<^sub>2, a\<^sub>1\<^sub>3] #
   [a\<^sub>2\<^sub>1, a\<^sub>2\<^sub>2, a\<^sub>2\<^sub>3] #
   [a\<^sub>3\<^sub>1, a\<^sub>3\<^sub>2, a\<^sub>3\<^sub>3] # []) =
  to_mtx (\<chi> i j::3. if i=1 \<and> j=1 then a\<^sub>1\<^sub>1
  else (if i=1 \<and> j=2 then a\<^sub>1\<^sub>2
  else (if i=1 \<and> j=3 then a\<^sub>1\<^sub>3
  else (if i=2 \<and> j=1 then a\<^sub>2\<^sub>1
  else (if i=2 \<and> j=2 then a\<^sub>2\<^sub>2
  else (if i=2 \<and> j=3 then a\<^sub>2\<^sub>3
  else (if i=3 \<and> j=1 then a\<^sub>3\<^sub>1
  else (if i=3 \<and> j=2 then a\<^sub>3\<^sub>2
  else a\<^sub>3\<^sub>3))))))))"

Output:
apply(simp add: sq_mtx_eq_iff)
using exhaust_3
by force


Input:
lemma (in typed_model) has_all_wt_instances_ofD':
  assumes N_wf_trms: "wf\<^sub>t\<^sub>r\<^sub>m\<^sub>s N"
    and M_wf_trms: "wf\<^sub>t\<^sub>r\<^sub>m\<^sub>s M"
    and N_instance_M: "has_all_wt_instances_of \<Gamma> N M"
    and t_in_N: "t \<in> N"
  shows "\<exists>\<delta>. wt\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<delta> \<and> wf\<^sub>t\<^sub>r\<^sub>m\<^sub>s (subst_range \<delta>) \<and> t \<in> M \<cdot>\<^sub>s\<^sub>e\<^sub>t \<delta>"

Output:
using assms is_wt_instance_of_condD' unfolding has_all_wt_instances_of_def
by fast


Input:
lemma get_shadow_root_ptr_simp1 [simp]:
  "get\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t shadow_root_ptr (put\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t shadow_root_ptr shadow_root h) = Some shadow_root"

Output: by(auto simp add: get\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_def put\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_def)


Input:
lemma cast\<^sub>o\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r_ext_none [simp]:
  "cast\<^sub>o\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r (object_ptr.Ext (Inr (Inr (Inr object_ext_ptr)))) = None"

Output: by(simp add: cast\<^sub>o\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t\<^sub>_\<^sub>p\<^sub>t\<^sub>r\<^sub>2\<^sub>n\<^sub>o\<^sub>d\<^sub>e\<^sub>_\<^sub>p\<^sub>t\<^sub>r_def)


Input: lemma dot\<^sub>O\<^sub>c\<^sub>l\<^sub>A\<^sub>n\<^sub>y\<A>\<N>\<Y>_at_pre_Nonestrict [simp] : "(None).any@pre = invalid"

Output: by(rule ext, simp add: dot_accessor None_fun_def None_option_def bot_option_def None_def invalid_def)


Input: lemma known_ptr_new_shadow_root_ptr: "a_known_ptr ptr \<Longrightarrow> \<not>known_ptr ptr \<Longrightarrow> is_shadow_root_ptr ptr"

Output:
using l_known_ptr\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t.known_ptr_not_shadow_root_ptr
by blast


Input:
lemma meval_sched_snocD:
  "(cms\<^sub>1, mem\<^sub>1) \<rightarrow>\<^bsub>ns@[n]\<^esub> (cms\<^sub>1', mem\<^sub>1') \<Longrightarrow>
   \<exists>cms\<^sub>1'' mem\<^sub>1''. (cms\<^sub>1, mem\<^sub>1) \<rightarrow>\<^bsub>ns\<^esub> (cms\<^sub>1'', mem\<^sub>1'') \<and> (cms\<^sub>1'', mem\<^sub>1'') \<leadsto>\<^bsub>n\<^esub> (cms\<^sub>1', mem\<^sub>1')"

Output: apply(fastforce dest: meval_sched_appD) done


Input:
lemma transaction_fresh_subst_proj:
  assumes "transaction_fresh_subst \<sigma> T A"
  shows "transaction_fresh_subst \<sigma> (transaction_proj n T) (proj n A)"

Output:
using assms transaction_proj_fresh_eq[of n T] contra_subsetD[OF subterms\<^sub>s\<^sub>e\<^sub>t_mono[OF transaction_proj_trms_subset[of n T]]] contra_subsetD[OF subterms\<^sub>s\<^sub>e\<^sub>t_mono[OF trms\<^sub>s\<^sub>s\<^sub>t_proj_subset(1)[of n A]]] unfolding transaction_fresh_subst_def
by metis


Input:
lemma aodv_init_kD_empty [simp]:
  "(\<xi>, p) \<in> \<sigma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V i \<Longrightarrow> kD (rt \<xi>) = {}"

Output:
unfolding \<sigma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V_def kD_def
by simp


Input:
lemma get_disconnected_nodes_ok:
  "type_wf h \<Longrightarrow> document_ptr |\<in>| document_ptr_kinds h \<Longrightarrow>
    h \<turnstile> ok (get_disconnected_nodes document_ptr)"

Output:
apply(unfold type_wf_impl get_disconnected_nodes_impl[unfolded a_get_disconnected_nodes_def])
using CD.get_disconnected_nodes_ok CD.type_wf_impl ShadowRootClass.type_wf\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t
by blast


Input:
lemma size_defined:
 assumes X_finite: "\<And>\<tau>. finite \<lceil>\<lceil>Rep_Set\<^sub>b\<^sub>a\<^sub>s\<^sub>e (X \<tau>)\<rceil>\<rceil>"
 shows "\<delta> (X->size\<^sub>S\<^sub>e\<^sub>t()) = \<delta> X"

Output:
apply(rule ext, simp add: cp_defined[of "X->size\<^sub>S\<^sub>e\<^sub>t()"] OclSize_def)
apply(simp add: defined_def bot_option_def bot_fun_def None_option_def None_fun_def X_finite) done


Input:
lemma cp_OclIncludes1:
"(X->includes\<^sub>S\<^sub>e\<^sub>t(x)) \<tau> = (X->includes\<^sub>S\<^sub>e\<^sub>t(\<lambda> _. x \<tau>)) \<tau>"

Output: by(auto simp: OclIncludes_def StrongEq_def invalid_def cp_defined[symmetric] cp_valid[symmetric])


Input:
lemma (in is_ft_semifunctor) ft_smcf_is_ft_dghm'[slicing_intros]:
  assumes "\<AA>' = smc_dg \<AA>" and "\<BB>' = smc_dg \<BB>"
  shows "smcf_dghm \<FF> : \<AA>' \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^sub>.\<^sub>f\<^sub>a\<^sub>i\<^sub>t\<^sub>h\<^sub>f\<^sub>u\<^sub>l\<^bsub>\<alpha>\<^esub> \<BB>'"

Output:
unfolding assms
by (rule ft_smcf_is_ft_dghm)


Input:
lemma complements_do_not_falsify:
  assumes l1C1': "l\<^sub>1 \<in> C\<^sub>1'"
  assumes l\<^sub>2C1': "l\<^sub>2 \<in> C\<^sub>1'"
  assumes fals: "falsifies\<^sub>g G C\<^sub>1'"
  shows "l\<^sub>1 \<noteq> l\<^sub>2\<^sup>c"

Output:
using assms complements_do_not_falsify'
by blast


Input: lemma cp_OclNotEmpty: "X->notEmpty\<^sub>S\<^sub>e\<^sub>t() \<tau> = ((\<lambda>_. X \<tau>)->notEmpty\<^sub>S\<^sub>e\<^sub>t()) \<tau>"

Output:
apply(simp only: OclNotEmpty_def)
apply(subst (2) cp_OclNot)
by(simp add: cp_OclNot[symmetric] cp_OclIsEmpty[symmetric])


Input:
lemma
  assumes
    "optim 0 [IPush d\<^sub>1, IPush d\<^sub>2, IStore y] [] = Ok (xs, ys)"
    "unbox_ubx1 d\<^sub>1 = Some x"
    "unbox_ubx1 d\<^sub>2 = None" "unbox_ubx2 d\<^sub>2 = None"
  shows "xs = [IPushUbx1 x, IPush d\<^sub>2, IStoreUbx Ubx1 y] \<and> ys = []"

Output:
using assms(1)
by (simp add: assms optim_def try_unbox_def)


Input:
lemma trms\<^sub>s\<^sub>s\<^sub>t_unlabel_subst_cons:
  "trms\<^sub>l\<^sub>s\<^sub>s\<^sub>t ((l,b)#A \<cdot>\<^sub>l\<^sub>s\<^sub>s\<^sub>t \<delta>) = trms\<^sub>s\<^sub>s\<^sub>t\<^sub>p (b \<cdot>\<^sub>s\<^sub>s\<^sub>t\<^sub>p \<delta>) \<union> trms\<^sub>l\<^sub>s\<^sub>s\<^sub>t (A \<cdot>\<^sub>l\<^sub>s\<^sub>s\<^sub>t \<delta>)"

Output: by (metis subst_lsst_unlabel trms\<^sub>s\<^sub>s\<^sub>t_subst_cons unlabel_Cons(1))


Input:
lemma setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t_proj_subset:
  "setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t A"
  "setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj m (proj n A)) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A)"

Output:
unfolding proj_def setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t_def
by auto


Input:
lemma type_wf_put_ptr_not_in_heap_E:
  assumes "type_wf (put\<^sub>O\<^sub>b\<^sub>j\<^sub>e\<^sub>c\<^sub>t ptr obj h)"
  assumes "ptr |\<notin>| object_ptr_kinds h"
  shows "type_wf h"

Output:
using assms
by(auto simp add: type_wf_defs elim!: DocumentMonad.type_wf_put_ptr_not_in_heap_E split: option.splits if_splits)


Input: lemma Act\<^sub>\<alpha>_eqvt [eqvt, simp]: "p \<bullet> Act\<^sub>\<alpha> \<alpha> t\<^sub>\<alpha> = Act\<^sub>\<alpha> (p \<bullet> \<alpha>) (p \<bullet> t\<^sub>\<alpha>)"

Output: by (induct t\<^sub>\<alpha>) (simp add: Act\<^sub>\<alpha>.abs_eq)


Input:
lemma interpretation_grounds_all':
  "interpretation\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<theta> \<Longrightarrow> ground (M \<cdot>\<^sub>s\<^sub>e\<^sub>t \<theta>)"

Output:
using subst_fv_dom_ground_if_ground_img[of _ \<theta>]
by simp


Input:
lemma Person_allInstances_at_post_oclIsTypeOf\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n:
"\<tau> \<Turnstile> (Person .allInstances()->forAll\<^sub>S\<^sub>e\<^sub>t(X|X .oclIsTypeOf(Person)))"

Output:
unfolding OclAllInstances_at_post_def
by(rule Person_allInstances_generic_oclIsTypeOf\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n)


Input: lemma basic_\<tau>_wff: "WFF(\<sigma>\<^sub>1,\<sigma>\<^sub>1')"

Output: by(auto simp: WFF_def \<sigma>\<^sub>1_def \<sigma>\<^sub>1'_def oid0_def oid1_def oid2_def oid3_def oid4_def oid5_def oid6_def oid7_def oid8_def oid_of_\<AA>_def oid_of_type\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n_def oid_of_type\<^sub>O\<^sub>c\<^sub>l\<^sub>A\<^sub>n\<^sub>y_def person1_def person2_def person3_def person4_def person5_def person6_def person7_def person8_def person9_def)


Input: lemma OclAdd\<^sub>R\<^sub>e\<^sub>a\<^sub>l_commute: "(X +\<^sub>r\<^sub>e\<^sub>a\<^sub>l Y) = (Y +\<^sub>r\<^sub>e\<^sub>a\<^sub>l X)"

Output: by(rule ext,auto simp:True_def False_def OclAdd\<^sub>R\<^sub>e\<^sub>a\<^sub>l_def invalid_def split: option.split option.split_asm bool.split bool.split_asm)


Input: lemma if_SE_split_asm : " (\<sigma> \<Turnstile> if\<^sub>S\<^sub>E P B\<^sub>1 B\<^sub>2) = ((P \<sigma> \<and> (\<sigma> \<Turnstile> B\<^sub>1)) \<or> (\<not> P \<sigma> \<and> (\<sigma> \<Turnstile> B\<^sub>2)))"

Output: by(cases "P \<sigma>",auto simp: if_SE_D1 if_SE_D2)


Input:
lemma OclExcluding_excludes:
 assumes "\<tau> \<Turnstile> X->excludes\<^sub>S\<^sub>e\<^sub>t(x)"
   shows "\<tau> \<Turnstile> X->excluding\<^sub>S\<^sub>e\<^sub>t(x) \<triangleq> X"

Output: by(simp add: StrongEq_def OclValid_def True_def OclExcluding_excludes0[OF assms])


Input:
lemma (in is_tiny_semifunctor) is_tiny_semifunctor_op:
  "op_smcf \<FF> : op_smc \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^sub>.\<^sub>t\<^sub>i\<^sub>n\<^sub>y\<^bsub>\<alpha>\<^esub> op_smc \<BB>"

Output: by (intro is_tiny_semifunctorI') (cs_concl cs_intro: smc_small_cs_intros smc_op_intros)+


Input:
lemma op_ntcf_cf_ntcf_comp[cat_op_simps]:
  "op_ntcf (\<HH> \<circ>\<^sub>C\<^sub>F\<^sub>-\<^sub>N\<^sub>T\<^sub>C\<^sub>F \<NN>) = op_cf \<HH> \<circ>\<^sub>C\<^sub>F\<^sub>-\<^sub>N\<^sub>T\<^sub>C\<^sub>F op_ntcf \<NN>"

Output:
unfolding dghm_tdghm_comp_def dghm_comp_def op_ntcf_def op_cf_def op_cat_def dg_field_simps dghm_field_simps nt_field_simps
by (simp add: nat_omega_simps)


Input:
lemma dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t_Cons[simp]:
  "dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t ((l,send\<langle>t\<rangle>)#A) = (l,receive\<langle>t\<rangle>)#(dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t A)"
  "dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t ((l,receive\<langle>t\<rangle>)#A) = (l,send\<langle>t\<rangle>)#(dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t A)"
  "dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t ((l,\<langle>a: t \<doteq> s\<rangle>)#A) = (l,\<langle>a: t \<doteq> s\<rangle>)#(dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t A)"
  "dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t ((l,insert\<langle>t,s\<rangle>)#A) = (l,insert\<langle>t,s\<rangle>)#(dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t A)"
  "dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t ((l,delete\<langle>t,s\<rangle>)#A) = (l,delete\<langle>t,s\<rangle>)#(dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t A)"
  "dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t ((l,\<langle>a: t \<in> s\<rangle>)#A) = (l,\<langle>a: t \<in> s\<rangle>)#(dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t A)"
  "dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t ((l,\<forall>X\<langle>\<or>\<noteq>: F \<or>\<notin>: G\<rangle>)#A) = (l,\<forall>X\<langle>\<or>\<noteq>: F \<or>\<notin>: G\<rangle>)#(dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t A)"

Output: by (simp_all add: dual\<^sub>l\<^sub>s\<^sub>s\<^sub>t_def)


Input:
lemma emb_cases_reverse [consumes 1, case_names refl step]:
  "t \<unrhd>\<^sub>e\<^sub>m\<^sub>b s \<Longrightarrow> (\<And>t'. t = t' \<Longrightarrow> s = t' \<Longrightarrow> P) \<Longrightarrow> (\<And>t' u s'. t = t' \<Longrightarrow> s = s' \<Longrightarrow> t' \<rightarrow>\<^sub>e\<^sub>m\<^sub>b u \<Longrightarrow> u \<unrhd>\<^sub>e\<^sub>m\<^sub>b s' \<Longrightarrow> P) \<Longrightarrow> P"

Output: by (induct rule:emb_induct_reverse; blast+)


Input:
lemma flatten_sigma_2_monotone:
  "w \<Turnstile>\<^sub>n \<phi>[M]\<^sub>\<Sigma>\<^sub>2 \<Longrightarrow> M \<subseteq> M' \<Longrightarrow> w \<Turnstile>\<^sub>n \<phi>[M']\<^sub>\<Sigma>\<^sub>2"

Output: by (induction \<phi> arbitrary: w) (simp; blast dest: GF_advice_monotone)+


Input:
lemma get_document_ptr_simp2 [simp]:
  "document_ptr \<noteq> document_ptr'
   \<Longrightarrow> get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t document_ptr (put\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t document_ptr' document h) = get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t document_ptr h"

Output: by(auto simp add: get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t_def put\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t_def)


Input:
lemma parallel_HSem_ind:
  assumes "adm (\<lambda>\<rho>'. P (fst \<rho>') (snd \<rho>'))"
  assumes "P \<bottom> \<bottom>"
  assumes step: "\<And>y z. P y z \<Longrightarrow>
    P (\<rho>\<^sub>1 ++\<^bsub>domA \<Gamma>\<^sub>1\<^esub> \<^bold>\<lbrakk>\<Gamma>\<^sub>1\<^bold>\<rbrakk>\<^bsub>y\<^esub>) (\<rho>\<^sub>2 ++\<^bsub>domA \<Gamma>\<^sub>2\<^esub> \<^bold>\<lbrakk>\<Gamma>\<^sub>2\<^bold>\<rbrakk>\<^bsub>z\<^esub>)"
  shows "P (\<lbrace>\<Gamma>\<^sub>1\<rbrace>\<rho>\<^sub>1) (\<lbrace>\<Gamma>\<^sub>2\<rbrace>\<rho>\<^sub>2)"

Output:
unfolding HSem_def'
apply (rule parallel_fix_ind[OF assms(1), OF assms(2)])
using step
by simp


Input: theorem lang\<^sub>M\<^sub>2\<^sub>L_rexp_of'': "wf_formula n \<phi> \<Longrightarrow> lang\<^sub>M\<^sub>2\<^sub>L n \<phi> = lang n (rexp_of'' n \<phi>) - {[]}"

Output:
unfolding lang\<^sub>M\<^sub>2\<^sub>L_rexp_of'_rexp_of''[symmetric]
by (rule lang\<^sub>M\<^sub>2\<^sub>L_rexp_of')


Input:
lemma preserves_local_guarantee_compliance_def2:
  "preserves_local_guarantee_compliance \<R> \<equiv>
    \<forall>c\<^sub>A mds\<^sub>A mem\<^sub>A c\<^sub>C mds\<^sub>C mem\<^sub>C.
      abs.respects_own_guarantees (c\<^sub>A, mds\<^sub>A) \<and>
      (\<langle>c\<^sub>A, mds\<^sub>A, mem\<^sub>A\<rangle>\<^sub>A, \<langle>c\<^sub>C, mds\<^sub>C, mem\<^sub>C\<rangle>\<^sub>C) \<in> \<R> \<longrightarrow>
        conc.respects_own_guarantees (c\<^sub>C, mds\<^sub>C)"

Output:
unfolding preserves_local_guarantee_compliance_def
by simp


Input:
lemma \<tau>\<^sub>1_simps [simp]:
    assumes "C.ide f"
    shows "D.arr (\<tau>\<^sub>1 f)"
    and "src\<^sub>D (\<tau>\<^sub>1 f) = map\<^sub>0 (C\<^sub>U.P\<^sub>0 (src\<^sub>C f))" and "trg\<^sub>D (\<tau>\<^sub>1 f) = map\<^sub>0 (trg\<^sub>C f)"
    and "D.dom (\<tau>\<^sub>1 f) = F f \<star>\<^sub>D \<tau>\<^sub>0 (src\<^sub>C f)" and "D.cod (\<tau>\<^sub>1 f) = \<tau>\<^sub>0 (trg\<^sub>C f) \<star>\<^sub>D F (C\<^sub>U.P f)"

Output:
using assms \<tau>\<^sub>1_in_hom
by blast+


Input:
lemma update_simps[simp]:
  "\<B>\<^sub>i\<^sub>u (\<B>\<^sub>i\<^sub>u_update up s) = up (\<B>\<^sub>i\<^sub>u s)"
  "\<B>\<^sub>i\<^sub>l (\<B>\<^sub>i\<^sub>u_update up s) = \<B>\<^sub>i\<^sub>l s"
  "\<T> (\<B>\<^sub>i\<^sub>u_update up s) = \<T> s"
  "\<V> (\<B>\<^sub>i\<^sub>u_update up s) = \<V> s"
  "\<U> (\<B>\<^sub>i\<^sub>u_update up s) = \<U> s"
  "\<U>\<^sub>c (\<B>\<^sub>i\<^sub>u_update up s) = \<U>\<^sub>c s"
  "\<B>\<^sub>i\<^sub>l (\<B>\<^sub>i\<^sub>l_update up s) = up (\<B>\<^sub>i\<^sub>l s)"
  "\<B>\<^sub>i\<^sub>u (\<B>\<^sub>i\<^sub>l_update up s) = \<B>\<^sub>i\<^sub>u s"
  "\<T> (\<B>\<^sub>i\<^sub>l_update up s) = \<T> s"
  "\<V> (\<B>\<^sub>i\<^sub>l_update up s) = \<V> s"
  "\<U> (\<B>\<^sub>i\<^sub>l_update up s) = \<U> s"
  "\<U>\<^sub>c (\<B>\<^sub>i\<^sub>l_update up s) = \<U>\<^sub>c s"
  "\<V> (\<V>_update V s) = V"
  "\<B>\<^sub>i\<^sub>l (\<V>_update V s) = \<B>\<^sub>i\<^sub>l s"
  "\<B>\<^sub>i\<^sub>u (\<V>_update V s) = \<B>\<^sub>i\<^sub>u s"
  "\<T> (\<V>_update V s) = \<T> s"
  "\<U> (\<V>_update V s) = \<U> s"
  "\<U>\<^sub>c (\<V>_update V s) = \<U>\<^sub>c s"
  "\<T> (\<T>_update T s) = T"
  "\<B>\<^sub>i\<^sub>l (\<T>_update T s) = \<B>\<^sub>i\<^sub>l s"
  "\<B>\<^sub>i\<^sub>u (\<T>_update T s) = \<B>\<^sub>i\<^sub>u s"
  "\<V> (\<T>_update T s) = \<V> s"
  "\<U> (\<T>_update T s) = \<U> s"
  "\<U>\<^sub>c (\<T>_update T s) = \<U>\<^sub>c s"

Output: by (atomize(full), cases s, auto)


Input: lemma pivot_valuation_id: "\<lbrakk>\<triangle> (\<T> s); x\<^sub>i \<in> lvars (\<T> s); x\<^sub>j \<in> rvars_of_lvar (\<T> s) x\<^sub>i\<rbrakk> \<Longrightarrow> \<V> (pivot x\<^sub>i x\<^sub>j s) = \<V> s"

Output:
using pivot_id
by (simp add: Let_def)


Input:
lemma get_M_Mdocument_preserved7 [simp]:
  "h \<turnstile> put_M\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t element_ptr setter v \<rightarrow>\<^sub>h h' \<Longrightarrow> preserved (get_M\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t document_ptr getter) h h'"

Output: by(auto simp add: ElementMonad.put_M_defs get_M_defs preserved_def split: option.splits dest: get_heap_E)


Input: lemma lift_o_shift: "lift k \<circ> (V\<^sub>M\<^sub>L 0 ## \<sigma>) = (V\<^sub>M\<^sub>L 0 ## (lift k \<circ> \<sigma>))"

Output: by(rule ext)(simp add: lift_lift_ML_comm)


Input:
lemma new_element_tag_name:
  assumes "h \<turnstile> new_element \<rightarrow>\<^sub>h h'"
  assumes "h \<turnstile> new_element \<rightarrow>\<^sub>r new_element_ptr"
  shows "h' \<turnstile> get_M new_element_ptr tag_name \<rightarrow>\<^sub>r ''''"

Output:
using assms
by(auto simp add: get_M_defs new_element_def new\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t_def Let_def split: option.splits prod.splits elim!: bind_returns_result_E bind_returns_heap_E)


Input: lemma lens_member_override: "x \<in>\<^sub>S A \<Longrightarrow> s\<^sub>1 \<oplus>\<^sub>S s\<^sub>2 on A \<oplus>\<^sub>L s\<^sub>3 on x = s\<^sub>1 \<oplus>\<^sub>S (s\<^sub>2 \<oplus>\<^sub>L s\<^sub>3 on x) on A"

Output:
using lens_member_def
by force


Input: lemma nonneg_Reals_add_I [simp]: "\<lbrakk>a \<in> \<real>\<^sub>\<ge>\<^sub>0; b \<in> \<real>\<^sub>\<ge>\<^sub>0\<rbrakk> \<Longrightarrow> a + b \<in> \<real>\<^sub>\<ge>\<^sub>0"

Output:
apply (simp add: nonneg_Reals_def)
apply clarify
apply (rename_tac r s)
apply (rule_tac x="r+s" in exI, auto) done


Input:
lemma rreqs_increase:
  "paodv i \<TTurnstile>\<^sub>A onll \<Gamma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V (\<lambda>((\<xi>, _), _, (\<xi>', _)). rreqs \<xi> \<subseteq> rreqs \<xi>')"

Output: by (inv_cterms simp add: subset_insertI)


Input:
lemma cat_smc_is_epic_arr[slicing_simps]:
  "f : a \<mapsto>\<^sub>e\<^sub>p\<^sub>i\<^bsub>cat_smc \<CC>\<^esub> b \<longleftrightarrow> f : a \<mapsto>\<^sub>e\<^sub>p\<^sub>i\<^bsub>\<CC>\<^esub> b"

Output:
unfolding is_epic_arr_def slicing_simps op_smc_def
by (simp add: nat_omega_simps)


Input:
lemma get_M_Mdocument_preserved7 [simp]:
  "h \<turnstile> put_M\<^sub>E\<^sub>l\<^sub>e\<^sub>m\<^sub>e\<^sub>n\<^sub>t element_ptr setter v \<rightarrow>\<^sub>h h' \<Longrightarrow> preserved (get_M\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t document_ptr getter) h h'"

Output: by(auto simp add: ElementMonad.put_M_defs get_M_defs preserved_def split: option.splits dest: get_heap_E)


Input: lemma decomps\<^sub>e\<^sub>s\<^sub>t_decomp_rm\<^sub>e\<^sub>s\<^sub>t_empty: "D \<in> decomps\<^sub>e\<^sub>s\<^sub>t M N \<I> \<Longrightarrow> decomp_rm\<^sub>e\<^sub>s\<^sub>t D = []"

Output: by (induct D rule: decomps\<^sub>e\<^sub>s\<^sub>t.induct) (auto simp add: decomp_rm\<^sub>e\<^sub>s\<^sub>t_append)


Input:
lemma \<phi>_in_hom [intro]:
    assumes "C.ide f"
    shows "\<guillemotleft>\<phi> f : G f \<Rightarrow>\<^sub>D \<tau>\<^sub>0 (trg\<^sub>C f) \<star>\<^sub>D F f \<star>\<^sub>D \<sigma>\<^sub>0 (src\<^sub>C f)\<guillemotright>"

Output:
unfolding \<phi>_def
using assms
by (intro D.comp_in_homI' D.hseqI') auto


Input: lemma nonpos_Ints_subset_nonpos_Reals: "\<int>\<^sub>\<le>\<^sub>0 \<subseteq> \<real>\<^sub>\<le>\<^sub>0"

Output: by (metis nonpos_Ints_cases nonpos_Ints_nonpos nonpos_Ints_of_int nonpos_Reals_of_real_iff of_real_of_int_eq subsetI)


Input: lemma composition_conseq2ts: "(ts \<cdot>\<^sub>t\<^sub>s \<sigma>\<^sub>1) \<cdot>\<^sub>t\<^sub>s \<sigma>\<^sub>2 = ts \<cdot>\<^sub>t\<^sub>s (\<sigma>\<^sub>1 \<cdot> \<sigma>\<^sub>2)"

Output:
using composition_conseq2t
by auto


Input: lemma "               (\<sigma>\<^sub>1,\<sigma>\<^sub>1') \<Turnstile>      (X\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n2 .oclIsMaintained())"

Output: by(simp add: OclValid_def OclIsMaintained_def \<sigma>\<^sub>1_def \<sigma>\<^sub>1'_def X\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n2_def person2_def oid0_def oid1_def oid2_def oid3_def oid4_def oid5_def oid6_def oid_of_option_def oid_of_type\<^sub>P\<^sub>e\<^sub>r\<^sub>s\<^sub>o\<^sub>n_def)


Input:
lemma cf_smcf_cf_proj_snd[slicing_commute]:
  "\<pi>\<^sub>S\<^sub>M\<^sub>C\<^sub>.\<^sub>2 (cat_smc \<AA>) (cat_smc \<BB>) = cf_smcf (\<pi>\<^sub>C\<^sub>.\<^sub>2 \<AA> \<BB>)"

Output: unfolding cf_proj_snd_def smcf_proj_snd_def slicing_commute[symmetric] if_distrib ..


Input: lemma hoareQ_Seq_assoc: "\<turnstile>\<^sub>2\<^sub>' {P} A;; B;; C {Q} = (\<turnstile>\<^sub>2\<^sub>' {P} A;; (B;; C) {Q})"

Output: by(auto simp: hoare2o_valid_def hoareQ_sound_complete Seq_t_assoc)


Input:
lemma rt_fresher_def':
  "(rt\<^sub>1 \<sqsubseteq>\<^bsub>i\<^esub> rt\<^sub>2) = (nsqn\<^sub>r (the (rt\<^sub>1 i)) < nsqn\<^sub>r (the (rt\<^sub>2 i)) \<or>
                     nsqn\<^sub>r (the (rt\<^sub>1 i)) = nsqn\<^sub>r (the (rt\<^sub>2 i)) \<and> \<pi>\<^sub>5 (the (rt\<^sub>2 i)) \<le> \<pi>\<^sub>5 (the (rt\<^sub>1 i)))"

Output:
unfolding rt_fresher_def fresher_def
by (rule refl)


Input: lemma lang\<^sub>M\<^sub>2\<^sub>L_norm[simp]: "lang\<^sub>M\<^sub>2\<^sub>L n (norm \<phi>) = lang\<^sub>M\<^sub>2\<^sub>L n \<phi>"

Output:
unfolding lang\<^sub>M\<^sub>2\<^sub>L_def
by auto


Input: lemma wf_trm_subst_inv: "wf\<^sub>t\<^sub>r\<^sub>m (t \<cdot> \<delta>) \<Longrightarrow> wf\<^sub>t\<^sub>r\<^sub>m t"

Output:
unfolding wf\<^sub>t\<^sub>r\<^sub>m_def
by (induct t) auto


Input:
lemma cf_ntcf_comp_is_tm_ntcf'[cat_small_cs_intros]:
  assumes "\<HH> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>t\<^sub>m\<^bsub>\<alpha>\<^esub> \<CC>"
    and "\<NN> : \<FF> \<mapsto>\<^sub>C\<^sub>F\<^sub>.\<^sub>t\<^sub>m \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>t\<^sub>m\<^bsub>\<alpha>\<^esub> \<BB>"
    and "\<FF>' = \<HH> \<circ>\<^sub>C\<^sub>F \<FF>"
    and "\<GG>' = \<HH> \<circ>\<^sub>C\<^sub>F \<GG>"
  shows "\<HH> \<circ>\<^sub>C\<^sub>F\<^sub>-\<^sub>N\<^sub>T\<^sub>C\<^sub>F \<NN> : \<FF>' \<mapsto>\<^sub>C\<^sub>F\<^sub>.\<^sub>t\<^sub>m \<GG>' : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>t\<^sub>m\<^bsub>\<alpha>\<^esub> \<CC>"

Output:
using assms(1,2) unfolding assms(3,4)
by (rule cf_ntcf_comp_is_tm_ntcf)


Input: lemma indom_mI: \<open>fmlookup m x = Some y \<Longrightarrow> x \<in># dom_m m\<close>

Output: by (drule fmdomI) (auto simp: dom_m_def fmember.rep_eq)


Input:
lemma normalized_n_primitive_imp_not_disc_negated:
  "wf_disc_sel (disc,sel) C \<Longrightarrow> normalized_n_primitive (disc,sel) f m \<Longrightarrow> \<not> has_disc_negated disc False m"

Output:
apply(induction "(disc,sel)" f m rule: normalized_n_primitive.induct)
by(simp add: wf_disc_sel.simps split: if_split_asm)+


Input:
lemma root_hash_G_unfold:
  "root_hash_G rha rhb = G\<^sub>h \<circ> root_hash_F (root_hash_T rha) rhb \<circ> the_G\<^sub>m"

Output:
apply(rule ext) subgoal for x
by(cases x)(simp add: root_hash_G_def fun_eq_iff root_hash_F_def root_hash_T_def F\<^sub>m.map_comp T\<^sub>m.map_comp o_def T\<^sub>h.map_id id_def[symmetric]) done


Input:
lemma know2knows_s:
assumes "know A (sKS m)"
shows    "knows A [sE m]"

Output:
using assms
by (metis KS2Expression.simps(2) know1s)


Input:
lemma op_hnr[sepref_fr_rules]:
      assumes PURE: "CONSTRAINT (IS_PURE PRES_ZERO_UNIQUE) A"
      shows "(amtx_pointwise_unnop_fold_impl1 N M fi, RETURN \<circ> PR_CONST (mtx_pointwise_unop f)) \<in> (amtx_assn N M A)\<^sup>d \<rightarrow>\<^sub>a amtx_assn N M A"

Output:
unfolding PR_CONST_def
apply (rule hfref_weaken_pre'[OF _ amtx_pointwise_unnop_fold_impl1.refine[OF this_loc PURE,FCOMP opr_fold_impl_refine]])
by (simp add: amtx_assn_bounded[OF PURE])


Input: lemma det_row_minus: "det (upd_row M i (a - b)) = det (upd_row M i a) - det (upd_row M i b)"

Output: unfolding diff_conv_add_uminus det_row_add det_row_uminus ..


Input: lemma (in gram_schmidt_fs_Rn) det_M_1: "det (M m) = 1"

Output:
proof - have "det (M m) = prod_list (diag_mat (M m))"
by (rule det_lower_triangular[of m], auto simp: \<mu>.simps) also have "\<dots> = 1"
by (rule prod_list_neutral, auto simp: diag_mat_def \<mu>.simps) finally show ?thesis .
qed


Input: lemma enat_diff_cancel_left: "\<lbrakk> m \<le> x; m \<le> y \<rbrakk> \<Longrightarrow> x - m = y - m \<longleftrightarrow> x = (y :: enat)"

Output: by(cases x y m rule: enat.exhaust[case_product enat.exhaust[case_product enat.exhaust]])(simp_all, arith)


Input:
lemma minus_mult_distrib_mat[algebra_simps]: fixes A :: "'a :: ring mat"
  assumes m: "A \<in> carrier_mat nr n" "B \<in> carrier_mat nr n" "C \<in> carrier_mat n nc"
  shows "(A - B) * C = A * C - B * C"

Output:
unfolding minus_add_uminus_mat[OF m(1,2)] add_mult_distrib_mat[OF m(1) uminus_carrier_mat[OF m(2)] m(3)]
by (subst uminus_mult_left_mat, insert m, auto)


Input: lemma assert_D : "(\<sigma> \<Turnstile> (x \<leftarrow> assert\<^sub>S\<^sub>E P; M x)) \<Longrightarrow> P \<sigma> \<and> (\<sigma> \<Turnstile> (M True))"

Output: by(auto simp: bind_SE_def assert_SE_def valid_SE_def split: HOL.if_split_asm)


Input:
lemma slp_of_fa_code[code]:
  "slp_of_fa fa M slp = (let (M, slp', _) = slp_of_fa_rev fa M (rev slp) (length slp) in (M, rev slp'))"

Output:
using slp_of_fa_rev[of fa M "rev slp"]
by (auto split: prod.splits)


Input: lemma cfm:"f O m \<subseteq> m"

Output:
proof fix x::"'a\<times>'a" assume "x \<in> f O m" then obtain p q z where x:"x = (p,q)" and 1:"(p,z) \<in> f" and 2:"(z,q) \<in> m"
by auto from 1 obtain u where pu:"p\<parallel>u" and zu:"z\<parallel>u"
using f
by auto with 2 have "(p,q) \<in> m"
using M1 m
by blast thus "x\<in> m"
using x
by auto
qed


Input: lemma static_mthd_simp[simp]: "static (mthd m) = is_static m"

Output: by (cases m) (simp add: mthd_def member_is_static_simp)


Input:
lemma mat_det_12_mm_r [simp]:
  shows "mat_det_12 (A *\<^sub>m\<^sub>m M) (B *\<^sub>m\<^sub>m M) = mat_det M * mat_det_12 A B"

Output: by (cases M, cases A, cases B) (simp add: field_simps)


Input:
lemma lubmap_const_bottom[simp]:
  "(\<Squnion> k\<mapsto>v\<in>m. \<bottom>) = (\<bottom>::'a::Join_cpo)"

Output: by (cases "m = Map.empty") auto


Input:
lemma "\<Gamma>\<turnstile> {\<sigma>}
            \<acute>I :== \<acute>M;;
            ANNO \<tau>. \<lbrace>\<tau>. \<acute>I = \<^bsup>\<sigma>\<^esup>M\<rbrace>
                      \<acute>M :== \<acute>N;; \<acute>N :== \<acute>I
                    \<lbrace>\<acute>M = \<^bsup>\<tau>\<^esup>N \<and> \<acute>N = \<^bsup>\<tau>\<^esup>I\<rbrace>
            \<lbrace>\<acute>M = \<^bsup>\<sigma>\<^esup>N \<and> \<acute>N = \<^bsup>\<sigma>\<^esup>M\<rbrace>"

Output:
apply vcg
apply auto done


Input:
lemma matrix_inv_invertible:
  assumes "invertible M"
  shows "invertible (matrix_inv M)"

Output:
using \<open>invertible M\<close> and matrix_inv unfolding invertible_def [of "matrix_inv M"]
by auto


Input: lemma space_restrict_space: "space (restrict_space M \<Omega>) = \<Omega> \<inter> space M"

Output:
using sets.sets_into_space unfolding restrict_space_def
by (subst space_measure_of) auto


Input:
lemma rel_nondetT_unfold:
  "\<And>m m'. rel_nondetT M (NondetT m) m' \<longleftrightarrow> (\<exists>m''. m' = NondetT m'' \<and> M m m'')"
  "\<And>m m'. rel_nondetT M m (NondetT m') \<longleftrightarrow> (\<exists>m''. m = NondetT m'' \<and> M m'' m')"

Output:
subgoal for m m'
by(cases m'; simp) subgoal for m m'
by(cases m; simp) done


Input: lemma hypnat_le_add_diff_inverse [simp]: "\<And>m n::hypnat. n \<le> m \<Longrightarrow> n + (m - n) = m"

Output: by transfer (rule le_add_diff_inverse)


Input: lemma STA_add: \<open>A, n \<turnstile> branch \<Longrightarrow> A, m + n \<turnstile> branch\<close>

Output:
using STA_Suc
by (induct m) auto


Input:
lemma (in sigma_finite_measure) density_RN_deriv:
  "absolutely_continuous M N \<Longrightarrow> sets N = sets M \<Longrightarrow> density M (RN_deriv M N) = N"

Output: by (metis RN_derivI Radon_Nikodym)


Input:
lemma nn_integral_embed_measure':
  "inj_on f (space M) \<Longrightarrow> g \<in> borel_measurable (embed_measure M f) \<Longrightarrow>
  nn_integral (embed_measure M f) g = nn_integral M (\<lambda>x. g (f x))"

Output:
apply (subst embed_measure_eq_distr', simp)
apply (subst nn_integral_distr)
apply (simp_all add: measurable_embed_measure2') done


Input:
lemma density_cong: "f \<in> borel_measurable M \<Longrightarrow> f' \<in> borel_measurable M \<Longrightarrow>
  (AE x in M. f x = f' x) \<Longrightarrow> density M f = density M f'"

Output:
unfolding density_def
by (auto intro!: measure_of_eq nn_integral_cong_AE sets.space_closed)


Input: lemma fail_state_parametric [transfer_rule]: "(M ===> rel_stateT S M) fail_state fail_state"

Output:
unfolding fail_state_def
by transfer_prover


Input:
lemma monad_writer_readerT' [locale_witness]:
  "monad_writer return (bind :: ('a, 'm) bind) (tell :: ('w, 'm) tell)
  \<Longrightarrow> monad_writer return (bind :: ('a, ('r, 'm) envT) bind) (tell :: ('w, ('r, 'm) envT) tell)"

Output:
unfolding return_envT_def bind_envT_def tell_envT_def
by(rule monad_writer_envT)


Input: lemma fact_mono: "m \<le> n \<Longrightarrow> fact m \<le> (fact n :: 'a)"

Output: by (metis of_nat_fact of_nat_le_iff fact_mono_nat)


Input: lemma mtx_dflt_rl[sep_heap_rules]: "<emp> amtx_dflt N M k <is_amtx N M (op_amtx_dfltNxM N M k)>"

Output: by (sep_auto simp: amtx_dflt_def is_amtx_def)


Input: lemma matcheq_matchNone_not_matches: "matcheq_matchNone m \<Longrightarrow> \<not> matches \<gamma> m p"

Output: by(induction m rule: matcheq_matchNone.induct) auto


Input:
lemma None_measure_in_space_subprob_algebra [simp]:
  "None_measure M \<in> space (subprob_algebra M) \<longleftrightarrow> space M \<noteq> {}"

Output: by(simp add: space_subprob_algebra subprob_space_None_measure_iff)


Input:
lemma monad_prob_writerT' [locale_witness]:
  "monad_prob return (bind :: ('a \<times> 'w list, 'm) bind) (sample :: ('p, 'm) sample)
  \<Longrightarrow> monad_prob return (bind :: ('a, ('w, 'a, 'm) writerT) bind) (sample :: ('p, ('w, 'a, 'm) writerT) sample)"

Output:
unfolding return_writerT_def bind_writerT_def sample_writerT_def
by(rule monad_prob_writerT)


Input:
lemma unif_mono:
  assumes "(E, E') \<in> unif"
  shows "\<exists>\<sigma>. (E + M, E' + subst_mset \<sigma> M) \<in> unif"

Output:
using assms
by (auto simp: unif_UNIF1_conv intro: UNIF1_mono)


Input:
lemma less_power_add_imp_div_less [simp]:
  fixes i m n:: nat
  assumes "i < 2^(m+n)"
  shows "i div 2^n < 2^m"

Output:
using assms
by (simp add: less_mult_imp_div_less power_add)


Input: lemma bool_lists_card: "card {bl::bool list. length bl = m} = b^m"

Output:
using card_lists_length_eq[of "UNIV::bool set"]
by (simp add: b_val)


Input: lemma RSpan_contains_spanset_single : "m \<in> M \<Longrightarrow> m \<in> RSpan [m]"

Output:
using one_closed RSpan_single
by fastforce


Input: lemma phi_equiv_mapping_refl [simp]: "uninst_code.phi_equiv_mapping ph g m m"

Output:
unfolding uninst_code.phi_equiv_mapping_def
by simp


Input:
lemma pmatch_list_typerr:
  "length vs = length ps \<Longrightarrow> fold2(\<lambda>p v m. case m of
       Match env \<Rightarrow> pmatch_single cenv s p v env
        | m \<Rightarrow> m) Match_type_error ps vs Match_type_error = Match_type_error"

Output: by (induction ps vs rule:List.list_induct2') auto


Input: lemma ltake_ltake [simp]: "ltake n (ltake m xs) = ltake (min n m) xs"

Output: by(coinduction arbitrary: n m xs)(auto 4 4 simp add: enat_min_eq_0_iff ltl_ltake)


Input:
lemma put_env_parametric [transfer_rule]:
  "((S ===> M ===> M) ===> S ===> rel_envT R M ===> rel_envT R M) put_env put_env"

Output:
unfolding put_env_def
by transfer_prover


Input:
lemma compress_normalize_input_interfaces_hasdisc_negated:
    "\<not> has_disc_negated disc neg m \<Longrightarrow> (\<forall>a. \<not> disc (IIface a)) \<Longrightarrow> normalized_nnf_match m \<Longrightarrow> compress_normalize_input_interfaces m = Some m' \<Longrightarrow>
     normalized_nnf_match m' \<and> \<not> has_disc_negated disc neg m'"

Output:
unfolding compress_normalize_input_interfaces_def
using compress_normalize_primitive_hasdisc_negated[OF _ wf_disc_sel_common_primitive(5)]
by blast


Input:
theorem inverse_monoid_isomorphism:
  "monoid_isomorphism (restrict (inv_into M \<eta>) M') M' (\<cdot>') \<one>' M (\<cdot>) \<one>"

Output:
using commutes_with_composition commutes_with_unit surjective
by unfold_locales auto


Input:
lemma orbit_contains_rep:
  assumes m:"m \<in> M"
  shows "m \<in> orbit m"

Output:
unfolding orbit_def
using assms
by (metis equiv_class_self same_orbit_is_equiv)


Input:
lemma mat_inv_cnj:
  shows "mat_cnj (mat_inv M) = mat_inv (mat_cnj M)"

Output:
unfolding mat_cnj_def
by (cases M) auto


Input:
lemma a_star_redu_AndL1_elim:
  assumes a: "AndL1 (x).M y \<longrightarrow>\<^sub>a* R"
  shows "\<exists>M'. R = AndL1 (x).M' y \<and> M \<longrightarrow>\<^sub>a* M'"

Output:
using a
apply(induct set: rtranclp)
apply(auto)
apply(drule a_redu_AndL1_elim)
apply(auto simp add: alpha trm.inject) done


Input:
lemma replicate_pmf_distrib:
  "replicate_pmf (m + n) p =
     do {xs \<leftarrow> replicate_pmf m p; ys \<leftarrow> replicate_pmf n p; return_pmf (xs @ ys)}"

Output: by (induction m) (simp_all add: bind_return_pmf bind_return_pmf' bind_assoc_pmf)


Input:
lemma degree_aform_approx_bin:
  assumes "approx_bin p ivl X Y = Some Z"
  assumes "degree_aform (fst X) \<le> m"
  assumes "degree_aform (fst Y) \<le> m"
  shows "degree_aform (fst Z) \<le> m"

Output:
using assms
by (auto simp: approx_bin_def bind_eq_Some_conv Basis_list_real_def intro!: order_trans[OF degree_aform_independent_from] order_trans[OF degree_aform_of_ivl])


Input:
lemma map_add_right_dom_eq:
  "\<lbrakk> m\<^sub>0 ++ m\<^sub>1 = m\<^sub>0' ++ m\<^sub>1'; dom m\<^sub>1 = dom m\<^sub>1' \<rbrakk> \<Longrightarrow> m\<^sub>1 = m\<^sub>1'"

Output:
unfolding map_add_def
by (rule ext, rule ccontr, drule_tac x=x in fun_cong, clarsimp split: option.splits, drule sym, drule sym, force+)


Input:
lemma sip_not_ip':
  "paodv i \<TTurnstile> (recvmsg (\<lambda>m. not_Pkt m \<longrightarrow> msg_sender m \<noteq> i) \<rightarrow>) onl \<Gamma>\<^sub>A\<^sub>O\<^sub>D\<^sub>V (\<lambda>(\<xi>, _). sip \<xi> \<noteq> ip \<xi>)"

Output: by (inv_cterms inv add: onl_invariant_sterms [OF aodv_wf received_msg_inv] onl_invariant_sterms [OF aodv_wf ip_constant [THEN invariant_restrict_inD]] simp add: clear_locals_sip_not_ip') clarsimp+


Input: lemma sets_K[measurable_cong]: "x \<in> space M \<Longrightarrow> sets (K x) = sets M"

Output:
using K unfolding prob_algebra_def unfolding measurable_restrict_space2_iff
by (auto dest: subprob_measurableD)


Input:
lemma normalize_src_ips_normalized_n_primitive: "normalized_nnf_match m \<Longrightarrow>
      \<forall>m' \<in> set (normalize_src_ips m). normalized_src_ips m'"

Output:
unfolding normalize_src_ips_def unfolding normalized_src_ips_def2
apply(rule normalize_primitive_extract_normalizes_n_primitive[OF _ wf_disc_sel_common_primitive(3)])
by(simp_all add: ipt_iprange_compress_normalized_IpAddrNetmask)


Input:
lemma (in carrier) compl_open_closed:
  assumes mopen: "m open"
  shows "(carrier - m) closed"

Output:
proof (rule closedI) from mopen have "m \<subseteq> carrier"
by auto hence "carrier - (carrier - m) = m"
by (simp add: double_diff) thus "carrier - (carrier - m) open"
using mopen
by simp
qed


Input: lemma M_self_inverse: "M ** M = mat 1"

Output:
unfolding M_def and matrix_matrix_mult_def and mat_def and vector_def
by (simp add: sum_3 vec_eq_iff forall_3)


Input:
lemma cr_envT_stateT_return [cr_envT_stateT_transfer]:
  notes [transfer_rule] = cr_envT_stateT_transfer shows
  "((cr_prod1 s A ===> M) ===> A ===> cr_envT_stateT s M) return_env return_state"

Output:
unfolding return_env_def return_state_def
by transfer_prover


Input:
lemma (in state_space) shows "\<Gamma>\<turnstile> \<lbrace>True\<rbrace>
  \<acute>N \<ggreater> n. \<acute>N :== \<acute>N + 1 \<ggreater>
  \<acute>M \<ggreater> m. \<acute>M :== \<acute>M + 1 \<ggreater>
  \<acute>R :== n + m
  \<lbrace>\<acute>R = \<acute>N + \<acute>M - 2\<rbrace>"

Output:
apply vcg
apply simp done


Input:
lemma None_set_Int2:
  assumes "B \<in> None_sets M" "A \<in> sets M" shows "B \<inter> A \<in> None_sets M"

Output:
using assms
by (subst Int_commute) (rule None_set_Int1)


Input:
lemma order_finite_set_obtain_foundation:
  fixes   t :: "_ :: order"
  assumes "finite M"
    and   "t \<in> M"
  obtains s where "s \<in> M" "s \<le> t" "\<forall>u\<in>M. \<not> u < s"

Output:
using assms order_finite_set_exists_foundation
by blast


Input: lemma replicate_mset_lt_iff_lt[simp]: "replicate_mset m x < replicate_mset n x \<longleftrightarrow> m < n"

Output: by (induct n m rule: diff_induct) (auto intro: subset_mset.gr_zeroI gr_zeroI)


Input:
lemma fmeasurable_Int_fmeasurable:
   "\<lbrakk>S \<in> fmeasurable M; T \<in> sets M\<rbrakk> \<Longrightarrow> (S \<inter> T) \<in> fmeasurable M"

Output: by (meson fmeasurableD fmeasurableI2 inf_le1 sets.Int)


Input:
lemma fmrestrict_set_add_distrib[simp]:
  "fmrestrict_set A (m ++\<^sub>f n) = fmrestrict_set A m ++\<^sub>f fmrestrict_set A n"

Output:
unfolding fmfilter_alt_defs
by simp


Input: lemma mod_0_div_mult_cancel: "(n mod (m::nat) = 0) = (n div m * m = n)"

Output:
apply (insert eq_diff_left_iff[OF mod_le_dividend le0, of n m])
apply (simp add: mult.commute minus_mod_eq_mult_div [symmetric]) done


Input:
lemma word_of_nat_less_iff:
  \<open>word_of_nat m < (word_of_nat n :: 'a::len word) \<longleftrightarrow> take_bit LENGTH('a) m < take_bit LENGTH('a) n\<close>

Output: by transfer (simp add: take_bit_of_nat)


Input:
lemma poly_shift_times_monom_ge:
  "n \<ge> m \<Longrightarrow> poly_shift n (monom c m * p) = smult c (poly_shift (n - m) p)"

Output: by (intro poly_eqI) (auto simp: coeff_monom_mult coeff_poly_shift)


Input: lemma rel_pmf_return_pmf2: "rel_pmf R M (return_pmf x) \<longleftrightarrow> (\<forall>a\<in>M. R a x)"

Output: by (subst pmf.rel_flip[symmetric]) (simp add: rel_pmf_return_pmf1)


Input: lemma fmeasurableI2: "A \<in> fmeasurable M \<Longrightarrow> B \<subseteq> A \<Longrightarrow> B \<in> sets M \<Longrightarrow> B \<in> fmeasurable M"

Output:
using emeasure_mono[of B A M]
by (auto simp: fmeasurable_def)


Input:
lemma gt_0_lt_mult_gt_1_hmset:
  fixes m n :: hmultiset
  assumes "m > 0" and "n > 1"
  shows "m < m * n"

Output:
using assms
by (metis mult.right_neutral mult_less_cancel1_hmset)


Input:
lemma monad_optionT' [locale_witness]:
  "monad return (bind :: ('a option, 'm) bind)
  \<Longrightarrow> monad return (bind :: ('a, ('a, 'm) optionT) bind)"

Output:
unfolding return_optionT_def bind_optionT_def
by(rule monad_optionT)


Input: lemma hypnat_le_add_diff_inverse2 [simp]: "\<And>m n::hypnat. n \<le> m \<Longrightarrow> (m - n) + n = m"

Output: by transfer (rule le_add_diff_inverse2)


Input: lemma fmlookup_filter[simp]: "fmlookup (fmfilter P m) x = (if P x then fmlookup m x else None)"

Output: by transfer' (auto simp: map_filter_def)


Input:
lemma measurable_count_space_eq2_countable:
  fixes f :: "'a => 'c::countable"
  shows "f \<in> measurable M (count_space A) \<longleftrightarrow> (f \<in> space M \<rightarrow> A \<and> (\<forall>a\<in>A. f -` {a} \<inter> space M \<in> sets M))"

Output: by (intro measurable_count_space_eq_countable countableI_type)


Input:
lemma exists_upto_of_nat:
  "exists_upto p (of_nat n) as \<longleftrightarrow> (\<exists>m<n. p (as !! m))"

Output:
including integer.lifting
by (simp, transfer) (metis nat_int nat_less_iff of_nat_0_le_iff)


Input: lemma coeff_Const: "MPoly_Type.coeff (Const p) m = (p when m = 0)"

Output: by transfer' (auto simp: Const\<^sub>0_def lookup_single)


Input: lemma space_eq_univ [simp]: "space M = UNIV"

Output:
using M_is_borel[THEN sets_eq_imp_space_eq]
by simp


Input: lemma path2_nontriv[elim]: "\<lbrakk>g \<turnstile> n-ns\<rightarrow>m; n \<noteq> m\<rbrakk> \<Longrightarrow> length ns > 1"

Output: by (metis hd_Cons_tl last_appendR last_snoc length_greater_0_conv length_tl path2_def path_not_Nil zero_less_diff)


Input:
lemma AE_E3:
  assumes "AE x in M. P x"
  obtains N where "\<And>x. x \<in> space M - N \<Longrightarrow> P x" "N \<in> None_sets M"

Output:
using assms unfolding eventually_ae_filter
by auto


Input:
lemma cart_product_add_1_filter2: "{#m \<in># (M \<times># (add_mset b N)) . P m #} =
    {#m \<in># (M \<times># N) . P m #} + {#m \<in># (M \<times>#  {#b#}) . P m #}"

Output:
unfolding add_mset_add_single [of b N] Sigma_mset_plus_distrib1
by (metis Times_insert_left Times_mset_single_right add_mset_add_single filter_union_mset)


Input: lemma \<omega>_sum_replicate [simp]: "\<omega>_sum (replicate m a) = \<omega> \<up> a * ord_of_nat m"

Output: by (induction m) (auto simp: mult_succ simp flip: replicate_append_same)


Input:
lemma helperX1_Empty: "matches \<gamma> m' Empty p \<Longrightarrow>
         approximating_bigstep_fun \<gamma> p (map ((\<lambda>m. Rule m Empty) \<circ> MatchAnd m') m2' @ rs2) Undecided =
         approximating_bigstep_fun \<gamma> p rs2 Undecided"

Output: by(induction m2')(simp_all split: action.split)


Input:
lemma size_Diff_submset:
  "M \<subseteq># M' \<Longrightarrow> size (M' - M) = size M' - size(M::'a multiset)"

Output: by (metis add_diff_cancel_left' size_union mset_subset_eq_exists_conv)


Input:
lemma (in monoid) nat_pow_pow:
  "x \<in> carrier G ==> (x [^] n) [^] m = x [^] (n * m::nat)"

Output: by (induct m) (simp, simp add: nat_pow_mult add.commute)


Input:
lemma eout_knows_nonKS_s:
 assumes h1:"m \<notin> specSecrets A"
         and h2:"eout A (sE m)"
         and h3:"eoutKnowsECorrect A (sE m)"
   shows "knows A [sE m]"

Output:
using assms
by (metis Expression.distinct(1) Expression.inject(2) eoutKnowsECorrect_def)


Input:
lemma hm_delete_rule:
  "<is_hashmap m ht> hm_delete k ht <is_hashmap (m |` (-{k}))>"

Output:
unfolding is_hashmap_def[of m]
by (sep_auto heap add: hm_delete_rule')


Input:
lemma distinct_set_mset_eq:
  assumes "distinct_mset M" "distinct_mset N" "set_mset M = set_mset N"
  shows "M = N"

Output:
using assms distinct_mset_set_mset_ident
by fastforce


Input:
lemma fct_gen_subalgebra_eq_sets:
  assumes "sets M = sets P"
  shows "fct_gen_subalgebra M N X = fct_gen_subalgebra P N X"

Output:
proof - have "space M = space P"
using sets_eq_imp_space_eq assms
by auto thus ?thesis unfolding fct_gen_subalgebra_def gen_subalgebra_def
by simp
qed


Input:
lemma abc_list_crsp_simp4[simp]: "\<lbrakk>abc_list_crsp lma lmb; \<not> m < length lma; \<not> m < length lmb\<rbrakk> \<Longrightarrow>
  abc_list_crsp (lma @ 0 \<up> (m - length lma) @ [n]) (lmb @ 0 \<up> (m - length lmb) @ [n])"

Output: by(auto simp: abc_list_crsp_def list_update_append replicate_merge_anywhere)


Input:
lemma canonical_empty_zone_spec:
  assumes "canonical M n"
  shows "[M]\<^bsub>v,n\<^esub> = {} \<longleftrightarrow> (\<exists>i\<le>n. M i i < \<one>)"

Output:
using canonical_empty_zone[of n v M, OF _ _ assms] clock_numbering
by auto


Input:
lemma forget:
  shows "x\<sharp>M \<Longrightarrow> M{x:=<c>.P} = M"
  and   "c\<sharp>M \<Longrightarrow> M{c:=(x).P} = M"

Output:
apply(nominal_induct M avoiding: x c P rule: trm.strong_induct)
apply(auto simp add: fresh_atm abs_fresh abs_supp fin_supp) done


Input:
lemma ask_option_parametric [transfer_rule]:
  "(((R ===> M) ===> M) ===> (R ===> rel_optionT M) ===> rel_optionT M) ask_option ask_option"

Output:
unfolding ask_option_def
by transfer_prover


Input:
lemma filter_set_insert[simp]: "filter_set m (insert x A) t = (let m' = filter_set m A t in
  case Mapping.lookup m' x of Some u \<Rightarrow> if t = u then Mapping.delete x m' else m' | _ \<Rightarrow> m')"

Output:
unfolding filter_set_def
by transfer (auto simp: fun_eq_iff Let_def Map_To_Mapping.map_apply_def split: option.splits)


Input:
lemma fold_mset_insort[simp]: "fold (\<lambda>x M. M + mset (f x)) (insort x xs) M =
  fold (\<lambda>x M. M + mset (f x)) xs (mset (f x) + M)"

Output: by (induct xs arbitrary: M) (auto simp: ac_simps)


Input:
lemma matrix_set_list:
 assumes "mat nr nc M"
     and "length v = k"
     and " x \<in> set M"
 shows "\<exists>ys.\<exists>zs.(ys@x#zs = M)"

Output:
using assms set_def in_set_conv_decomp
by metis


Input: lemma smap_union_empty1[simp]: "{}. \<union>. m = m"

Output: by(rule ext, auto simp add:smap_union_def smap_empty_def)


Input:
lemma pause_writer_parametric [transfer_rule]:
  "((Out ===> (In ===> M) ===> M) ===> Out ===> (In ===> rel_writerT W A M) ===> rel_writerT W A M)
   pause_writer pause_writer"

Output:
unfolding pause_writer_def
by transfer_prover


Input:
lemma VRMWWrite:
  "\<lbrakk>cond (\<theta>(t\<mapsto>m a));
    \<theta>' = \<theta>(t\<mapsto>ret (m a) (f(\<theta>(t\<mapsto>m a))));
    m' = m(a:= f(\<theta>(t\<mapsto>m a)));
    ghst = (\<D>, \<O>, \<R>, \<S>);
   ghst' = (False,\<O> \<union> A - R, \<R>, \<S> \<oplus>\<^bsub>W\<^esub> R \<ominus>\<^bsub>A\<^esub> L)\<rbrakk>
   \<Longrightarrow>
   (RMW a t (D,f) cond ret A L R W# is, \<theta>, x, m, ghst) \<rightarrow>\<^sub>v (is, \<theta>',x, m' , ghst')"

Output: apply (simp add: virtual_memop_step.RMWWrite) done


Input:
lemma (in Module) mHom_eq:"\<lbrakk>R module N; f \<in> mHom R M N; g \<in> mHom R M N;
                            \<forall>m\<in>carrier M. f m = g m\<rbrakk> \<Longrightarrow> f = g"

Output:
apply (simp add:mHom_def aHom_def)
apply (erule conjE)+
apply (rule funcset_eq, assumption+) done


Input:
lemma congruence_congruence_inv [simp]:
  assumes "mat_det M \<noteq> 0"
  shows "congruence M (congruence (mat_inv M) H) = H"

Output:
using assms congruence_congruence[of M "mat_inv M" H]
using mat_inv_l[of M] mat_eye_l mat_eye_r unfolding congruence_def
by (simp del: eye_def)


Input:
lemma set_nn_integral_mono:
  assumes "\<And>x. x \<in> space M \<inter> A \<Longrightarrow> f x \<le> g x"
  shows   "set_nn_integral M A f \<le> set_nn_integral M A g"

Output:
using assms
by (intro nn_integral_mono) (auto simp: indicator_def)


Input:
lemma wm_to_state_works_for_wf_wm_closed:
    "wf_world_model M \<Longrightarrow> fmla\<in>close_world M \<Longrightarrow> close_eq (wm_to_state M) \<Turnstile> fmla"

Output:
apply (cases fmla rule: wf_fmla_atom.cases)
by (auto simp: wf_world_model_def close_eq_def wm_to_state_def close_world_def)


Input:
lemma word_diff_less:
  fixes n :: "'a :: len word"
  shows "\<lbrakk>0 < n; 0 < m; n \<le> m\<rbrakk> \<Longrightarrow> m - n < m"

Output:
apply (subst word_less_nat_alt)
apply (subst unat_sub)
apply assumption
apply (rule diff_less)
apply (simp_all add: word_less_nat_alt) done


Input:
lemma sees_methods_idemp:
  assumes "P \<turnstile> C sees_methods Mm" and "Mm M = Some(m,D)"
  shows "\<exists>Mm'. (P \<turnstile> D sees_methods Mm') \<and> Mm' M = Some(m,D)"

Output:
using assms
by(induct arbitrary: m D)(fastforce dest: Methods.intros)+


Input:
lemma sets_stream_space_cong[measurable_cong]:
  "sets M = sets N \<Longrightarrow> sets (stream_space M) = sets (stream_space N)"

Output:
using sets_eq_imp_space_eq[of M N]
by (simp add: stream_space_def vimage_algebra_def cong: sets_PiM_cong)


Input:
lemma map_filter_finite[intro]:
  assumes "finite (dom m)"
  shows "finite (dom (map_filter P m))"

Output:
proof - have "dom (map_filter P m) = Set.filter P (dom m)" unfolding map_filter_def Set.filter_def dom_def
by auto then show ?thesis
using assms
by (simp add: Set.filter_def)
qed


Input:
lemma sequence_parametric [transfer_rule]:
  "((M ===> (A ===> M) ===> M) ===> list_all2 M ===> (list_all2 A ===> M) ===> M) monad_base.sequence monad_base.sequence"

Output:
unfolding monad_base.sequence_def[abs_def]
by transfer_prover


Input:
lemma (in finite_measure) finite_measure_Union:
  assumes sets: "A \<in> sets M" "B \<in> sets M" and "A \<inter> B = {}"
  shows "measure M (A \<union> B) = measure M A + measure M B"

Output:
using measure_Union[OF _ _ assms]
by simp


Input:
lemma ldropn_inf_llist [simp]:
  "ldropn n (inf_llist f) = inf_llist (\<lambda>m. f (m + n))"

Output:
unfolding inf_llist_def ldropn_lmap ldropn_iterates
by(simp add: iterates_conv_inf_llist o_def)


Input:
lemma lead_monom_geI [intro]:
  assumes "coeff p m \<noteq> 0"
  shows   "m \<le> lead_monom p"

Output:
using assms
by (auto simp: lead_monom_def coeff_def in_keys_iff)


Input:
lemma Inf_between_alt:
  "Inf_between N M = {\<iota> \<in> Inf. \<iota> \<in> Inf_from (N \<union> M) \<and> set (prems_of \<iota>) \<inter> M \<noteq> {}}"

Output:
unfolding Inf_from_def Inf_between_def
by auto


Input:
lemma (in cpx_sq_mat) proj_measurement_proj:
  assumes "proj_measurement p M"
and "i < p"
shows "projector (meas_outcome_prj (M i))"

Output:
using assms unfolding proj_measurement_def
by simp


Input:
lemma invariant_iff:
  "invariant M \<longleftrightarrow> (\<Union>x\<in>M. flow0 x ` (existence_ivl0 x)) \<subseteq>  M"

Output:
unfolding invariant_iff_pos_and_neg_invariant positively_invariant_iff negatively_invariant_iff
by (metis (mono_tags) SUP_le_iff invariant_def invariant_iff_pos_and_neg_invariant negatively_invariant_iff positively_invariant_iff trapped_iff_on_existence_ivl0)


Input:
lemma p_collinear_p_isometry_pt [simp]:
  shows "p_collinear (p_isometry_pt M ` A) \<longleftrightarrow> p_collinear A"

Output:
proof- have *: "\<forall> M A. ((\<lambda>x. moebius_pt M (conjugate x)) ` A = moebius_pt M ` (conjugate ` A))"
by auto show ?thesis
by transfer (auto simp add: unit_disc_fix_f_def *)
qed


Input:
lemma emeasure_mono:
  "a \<subseteq> b \<Longrightarrow> b \<in> sets M \<Longrightarrow> emeasure M a \<le> emeasure M b"

Output: by (metis zero_le sets.additive_increasing emeasure_additive emeasure_notin_sets emeasure_positive increasingD)


Input: lemma density_None_measure[simp]: "density (None_measure M) f = None_measure M"

Output:
proof (intro measure_eqI) fix A show "emeasure (density (None_measure M) f) A = emeasure (None_measure M) A"
by (simp add: density_def) (simp only: None_measure_def[symmetric] emeasure_None_measure)
qed simp


Input:
lemma (in finite_measure) finite_measure_eq_AE:
  assumes iff: "AE x in M. x \<in> A \<longleftrightarrow> x \<in> B"
  assumes A: "A \<in> sets M" and B: "B \<in> sets M"
  shows "measure M A = measure M B"

Output:
using assms emeasure_eq_AE[OF assms]
by (simp add: emeasure_eq_measure)


Input:
lemma timpl_closure_set_mono:
  assumes "M \<subseteq> M'" "TI \<subseteq> TI'"
  shows "timpl_closure_set M TI \<subseteq> timpl_closure_set M' TI'"

Output:
using assms(1) timpl_closure_mono[OF assms(2)] unfolding timpl_closure_set_def
by fast


Input:
lemma prob_space_restrict_space:
  "S \<in> sets M \<Longrightarrow> emeasure M S = 1 \<Longrightarrow> prob_space (restrict_space M S)"

Output: by (intro prob_spaceI) (simp add: emeasure_restrict_space space_restrict_space)


Input:
lemma pairwise_imp_mult:
  assumes "N \<noteq> {#}" and "\<forall>x \<in> set_mset M. \<exists>y \<in> set_mset N. (x, y) \<in> r"
  shows "(M, N) \<in> mult r"

Output:
using assms one_step_implies_mult[of _ _ _ "{#}"]
by auto


Input: lemma (in -) rwof_leof_init: "m \<le>\<^sub>n SPEC (rwof m c f)"

Output:
apply rule
using rwof.init
apply (fastforce simp: nofail_RES_conv) done


Input:
lemma markedElementIsMarkedTrue:
  shows "(m \<in> set (markedElements M)) = ((m, True) \<in> set M)"

Output: by (induct M) (auto split: if_split_asm)


Input: lemma VDM_lowerm: "\<lbrakk> \<Turnstile>\<^sub>n c:A; m \<le> n \<rbrakk> \<Longrightarrow> \<Turnstile>\<^sub>m c:A"

Output:
apply (simp add: VDM_validn_def, clarsimp)
apply (erule_tac x="ma" in allE, simp) done


Input:
lemma l3_dy_payload_refines_dy_fake_msg:
  "M \<in> payload \<Longrightarrow>
   {R23s \<inter> UNIV \<times> l3_inv5} l2_dy_fake_msg M, l3_dy M {>R23s}"

Output:
apply (auto simp add: PO_rhoare_defs R23s_defs)
apply (auto simp add: l3_defs l2_dy_fake_msg_def dest: l3_inv5D) done


Input: lemma sets_tree_sigma_eq: "sets (tree_sigma M) = sigma_sets (trees (space M)) (trees_cyl ` trees (sets M))"

Output:
unfolding tree_sigma_def
by (rule sets_measure_of) (rule trees_cyl_sets_in_space)


Input:
lemma less_log_of_power:
  assumes "b ^ n < m" "1 < b"
  shows "n < log b m"

Output:
proof - have "0 < m"
by (metis assms less_trans zero_less_power zero_less_one) thus ?thesis
using assms
by (simp add: less_log_iff powr_realpow)
qed


Input:
lemma init_fin_silent_moves_RunningI:
  assumes "silent_moves t (x, m) (x', m')"
  shows "\<tau>trsys.silent_moves (init_fin t) init_fin_\<tau>move ((Running, x), m) ((Running, x'), m')"

Output:
using assms
by(induct rule: rtranclp_induct2)(auto elim: rtranclp.rtrancl_into_rtrancl intro: init_fin_silent_move_RunningI)


Input: lemma hmsetmset_le[simp]: "hmsetmset M \<le> hmsetmset N \<longleftrightarrow> M \<le> N"

Output:
unfolding le_less hmsetmset_less
by (metis hmultiset.collapse)


Input:
lemma decode_exp_shift:
  assumes "aligned\<^sub>d e M"
  shows "decode 0 M = base ^ e * decode e M"

Output:
using assms
by (induct e) (auto simp: decode_exp_shift_Suc dest: aligned\<^sub>d_mono_exp_Suc)


Input:
lemma mulex_on_add_mset:
  assumes "mulex_on P A M N" and "m \<in> A"
  shows "mulex_on P A (add_mset m M) (add_mset m N)"

Output:
unfolding add_mset_add_single[of m M] add_mset_add_single[of m N]
apply (rule mulex_on_union')
using assms
by auto


Input:
lemma legendre_aux_set_eq:
  assumes "prime p" "x \<ge> 1"
  shows   "{m. m > 0 \<and> real (p ^ m) \<le> x} = {0<..nat \<lfloor>log (real p) x\<rfloor>}"

Output:
using prime_gt_1_nat[OF assms(1)] assms
by (auto simp: le_nat_iff le_log_iff le_floor_iff powr_realpow)


Input: lemma (in finite_measure) emeasure_finite[simp, intro]: "emeasure M A \<noteq> top"

Output:
using finite_emeasure_space emeasure_space[of M A]
by (auto simp: top_unique)


Input:
lemma qmpt_I:
  assumes "sigma_finite_measure M"
          "T \<in> measurable M M"
          "\<And>A. A \<in> sets M \<Longrightarrow> ((T-`A \<inter> space M) \<in> None_sets M) \<longleftrightarrow> (A \<in> None_sets M)"
  shows "qmpt M T"

Output:
unfolding qmpt_def qmpt_axioms_def quasi_measure_preserving_def
by (auto simp add: assms)


Input: lemma nonsat_push_\<Delta>: "nonsat_push_precond f l (u,v) \<Longrightarrow> \<Delta> = excess f u"

Output:
unfolding \<Delta>_def nonsat_push_precond_def
by auto


Input: lemma add_strict_mono: "\<lbrakk>\<alpha> < \<beta>; \<gamma> < \<delta>; Ord \<alpha>; Ord \<beta>; Ord \<gamma>; Ord \<delta>\<rbrakk> \<Longrightarrow> \<alpha>+\<gamma> < \<beta>+\<delta>"

Output: by (metis order.strict_implies_order add_less_cancel_left add_right_mono le_less_trans)


Input:
lemma typing_ctxt_correct1:
  shows "\<Gamma>, \<Delta> \<turnstile>\<^sub>T (ctxt_subst E r) : T  \<Longrightarrow> \<exists>U. (\<Gamma>, \<Delta> \<turnstile>\<^sub>T r : U \<and> \<Gamma>, \<Delta> \<turnstile>\<^sub>c\<^sub>t\<^sub>x\<^sub>t E : T \<Leftarrow> U)"

Output: by(induction E arbitrary: \<Gamma> \<Delta> T r; force)


Input:
lemma at_least_delta:
  assumes "x \<le> \<delta>"
  assumes "t_stop \<le> x"
  shows "ego.q x = ego2.s (x - \<delta>)"

Output:
using assms ego2.t_stop_nonneg unfolding t_stop_def ego2.s_def less_eq_real_def
by auto


Input:
theorem wls_subst_Op_simp[simp]:
assumes "wls (asSort ys) Y"
 and "wlsInp delta inp" and "wlsBinp delta binp"
shows
"((Op delta inp binp) #[Y / y]_ys) =
 Op delta (inp %[Y / y]_ys) (binp %%[Y / y]_ys)"

Output:
using assms unfolding subst_def substInp_def substAbs_def substBinp_def
by auto


Input:
lemma run_subseteq_reach:
  assumes "range w \<subseteq> \<Sigma>"
  shows "range (run \<delta> q\<^sub>0 w) \<subseteq> reach \<Sigma> \<delta> q\<^sub>0"
    and "range (run\<^sub>t \<delta> q\<^sub>0 w) \<subseteq> reach\<^sub>t \<Sigma> \<delta> q\<^sub>0"

Output:
using assms unfolding reach_def reach\<^sub>t_def
by blast+


Input:
lemma rem_implicit_pres_ops_in\<delta>D: "op \<in> set (ast_problem.ast\<delta> (rem_implicit_pres_ops prob))
        \<Longrightarrow> (\<exists>op'. op' \<in> set (ast_problem.ast\<delta> prob) \<and> op = rem_implicit_pres op')"

Output: by (cases prob) (force simp: ast_problem.ast\<delta>_def)


Input:
lemma scc_ce_distinct:
  "(C,E) \<in> sc \<Gamma> G \<Delta> D \<Longrightarrow> set C \<inter> set E = {}"

Output: by(induction \<Gamma> G \<Delta> D arbitrary: C E rule: sc.induct) (fastforce split: if_splits)+


Input: lemma lookup_action_Some_in_\<delta>: "lookup_action op = Some ast_op \<Longrightarrow> ast_op \<in> set ast\<delta>"

Output:
using lookup_operator_works_1 lookup_Some_in\<delta>
by fastforce


Input:
lemma unwind_toI[intro?]:
assumes
"\<And> s vl s1 vl1.
   \<lbrakk>reachNT s; reach s1; \<Delta> s vl s1 vl1\<rbrakk>
   \<Longrightarrow>
   vl \<noteq> [] \<and> exit s (hd vl)
   \<or>
   iaction (disjAll \<Delta>s) s vl s1 vl1
   \<or>
   (vl \<noteq> [] \<or> vl1 = []) \<and> reaction (disjAll \<Delta>s) s vl s1 vl1"
shows "unwind_to \<Delta> \<Delta>s"

Output:
using assms unfolding unwind_to_def
by auto


Input:
lemma subst_d_b_u_fresh:
  fixes x::u and b::b and \<Gamma>::\<Delta> and bv::bv
  assumes "atom x \<sharp> \<Gamma>"
  shows  "atom x \<sharp> \<Gamma>[bv::=b]\<^sub>\<Delta>\<^sub>b"

Output:
using subst_b_fresh_u_cls subst_b_\<Delta>_def assms
by metis


Input:
lemma \<delta>_states_cart:
  "q \<in> \<delta>_states (\<delta>_prod \<delta>1 \<delta>2) \<Longrightarrow> q \<in> \<delta>_states \<delta>1 \<times> \<delta>_states \<delta>2"

Output: by (unfold \<delta>_states_def \<delta>_prod_def) (force split: ta_rule.split simp add: set_zip)


Input: lemma subst_apply_fv_unfold': "fv (t \<cdot> \<delta>) = (\<Union>v \<in> fv t. fv (\<delta> v))"

Output:
using subst_apply_fv_unfold
by simp


Input:
lemma
  shows BotL_canonical[intro!]: "\<bottom>,\<Gamma>\<Rightarrow>\<Delta>"
    and Ax_canonical[intro!]: "Atom k,\<Gamma> \<Rightarrow> Atom k,\<Delta>"

Output: by (meson SCp.intros union_single_eq_member)+


Input:
lemma IntegralE:
  assumes "Integral (a, b) f k" and "0 < e"
  obtains \<delta> where "gauge {a..b} \<delta>" and "\<forall>D. fine \<delta> (a, b) D \<longrightarrow> \<bar>rsum D f - k\<bar> < e"

Output:
using assms unfolding Integral_def
by auto


Input:
lemma alpha_alphaInp:
"(qOp delta qinp qbinp #= qOp delta' qinp' qbinp') =
 (delta = delta' \<and> qinp %= qinp' \<and> qbinp %%= qbinp')"

Output:
unfolding alphaInp_def alphaBinp_def
by auto


Input: lemma MittenTauschA: "\<Delta>@\<DD>#\<Gamma> \<Rightarrow> \<Theta> \<Longrightarrow> \<DD>#\<Delta>@\<Gamma> \<Rightarrow> \<Theta>"

Output: by(induction \<Delta> arbitrary: \<Gamma> rule: List.rev_induct) (simp_all add: VertauschungA)


Input: lemma "y \<noteq> 0 \<Longrightarrow> x * y div y = (x::nat)"

Output: nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry


Input: lemma "\<lbrakk>x \<noteq> 0; y \<noteq> 0\<rbrakk> \<Longrightarrow> x * y \<ge> (y::nat)"

Output: nitpick [unary_ints, expect = none] nitpick [binary_ints, expect = none] sorry


Input: lemma "occurs a xs = occurs b (replace a b xs)"

Output: quickcheck[random, expect = counterexample] quickcheck[exhaustive, expect = counterexample] \<comment> \<open>Wrong. Precondition needed.\<close> oops


Input: theorem "map g (map f xs) = map (g o f) xs"

Output: quickcheck[random, expect = no_counterexample] quickcheck[exhaustive, size = 3, expect = no_counterexample] oops


Input:
lemma "Suc (occurs a (del1 a xs)) = occurs a xs"
  \<comment> \<open>Wrong. Precondition needed.\<close>

Output: quickcheck[random, expect = counterexample] quickcheck[exhaustive, expect = counterexample] oops


Input:
lemma sorted_merge [simp]:
  assumes "sorted (map key xs)" and "sorted (map key ys)"
  shows "sorted (map key (merge xs ys))"

Output:
using assms
by (induct xs ys rule: merge.induct) (auto)


Input: lemma transf_res_is_rev: "sorted (rev ns) \<Longrightarrow> n > hd ns  \<Longrightarrow> sorted (rev ((transf n ( ns))))"

Output: by (induct ns) (auto simp add:transf_def sorted_wrt_append)


Input: lemma distinct_sorted: "sorted xs \<Longrightarrow> distinct xs"

Output: by (induct xs) (auto simp add: sorted_wrt_append sorted_sorted_wrt)


Input:
lemma
  shows sorted_runs: "\<forall>x\<in>set (runs xs). sorted x"
    and sorted_asc: "ascP f \<Longrightarrow> sorted (f []) \<Longrightarrow> \<forall>x\<in>set (f []). x \<le> a \<Longrightarrow> \<forall>x\<in>set (asc a f ys). sorted x"
    and sorted_desc: "sorted xs \<Longrightarrow> \<forall>x\<in>set xs. a \<le> x \<Longrightarrow> \<forall>x\<in>set (desc a xs ys). sorted x"

Output: by (induct xs and a f ys and a xs ys rule: runs_asc_desc.induct) (auto simp: sorted_append not_less dest: order_trans, fastforce)


Input:
lemma obs_consistent_behaviours:
  "\<lbrakk> obs_consistent R pi Sa Sc; bc \<in> beh Sc; ba \<in> beh Sa; (ba, bc) \<in> seq_lift R\<rbrakk>
  \<Longrightarrow> map pi (map (obs Sc) bc) = map (obs Sa) ba"

Output: by (erule seq_lift.induct) (auto simp add: obs_consistent_def)


Input:
lemma run_one_step_basic_set_local_result:
  assumes "run_one_step d i (s,vs,ves,$Set_local x15) = (s', vs', res)"
  shows "(\<exists>r. res = RSNormal r) \<or> (\<exists>e. res = RSCrash e)"

Output:
using assms
by (cases ves; cases "x15 < length vs") auto


Input: lemma round_down_float[simp]: "round_down prec x \<in> float"

Output:
unfolding round_down_def
by (auto intro!: times_float simp flip: of_int_minus)


Input:
lemma Chernoff:
  shows "Chernoff_on X linear_cf"

Output:
using %invisible Rf_mono_on range Rf_mono_on_iia_on[of X linear_cf, symmetric] Chernoff_on_iia_on
by blast


Input: lemma implode_select: "String.implode ''select'' = STR ''select''"

Output: by (metis Literal.rep_eq String.implode_explode_eq zero_literal.rep_eq)


Input:
theorem mbisim_simulation2:
  "\<lbrakk> mbisim s1 s2; r2.redT s2 tl2 s2'; \<not> m\<tau>move2 s2 tl2 s2' \<rbrakk>
  \<Longrightarrow> \<exists>s1' s1'' tl1. r1.mthr.silent_moves s1 s1' \<and> r1.redT s1' tl1 s1'' \<and> \<not> m\<tau>move1 s1' tl1 s1'' \<and>
                    mbisim s1'' s2' \<and> mta_bisim tl1 tl2"

Output: using FWdelay_bisimulation_obs.mbisim_simulation1[OF FWdelay_bisimulation_obs_flip] unfolding flip_simps .


Input: lemma sum_integral_diff_series_convergent: "convergent sum_integral_diff_series"

Output:
using sum_integral_diff_series_Bseq sum_integral_diff_series_monoseq
by (blast intro!: Bseq_monoseq_convergent)


Input:
lemma sub_branch_nominals:
  \<open>branch_nominals (sub_branch f branch) = f ` branch_nominals branch\<close>

Output:
unfolding branch_nominals_def sub_branch_def
by (induct branch) (auto simp: sub_block_nominals)


Input: lemma mod_ring_mult_integer: "(mod_ring_rel_integer ===> mod_ring_rel_integer ===> mod_ring_rel_integer) (mult_p_integer pp) ((*))"

Output:
using urel_integer_mult mod_ring_mult unfolding mod_ring_rel_integer_def rel_fun_def
by blast


Input: lemma  (in graph) init_loop_1_a[simp]: "\<Turnstile> Init {| Q1_a |} Loop"

Output:
apply (unfold hoare_demonic Init_def Q1_a_def Loop_def)
by auto


Input: lemma clearjunk_delete: "clearjunk (delete x al) = delete x (clearjunk al)"

Output: by (induct al rule: clearjunk.induct) (auto simp add: delete_idem delete_twist)


Input: lemma at_map_compl_pres: "at_map \<circ> uminus = uminus \<circ> at_map"

Output:
unfolding fun_eq_iff
by (simp add: Abs_atoms_inverse at_map_def atom_map_compl_pres uminus_atoms.abs_eq)


Input:
lemma split_head_repeat[simp]:
  "Oc # list1 = Bk \<up> j @ list2 \<longleftrightarrow> j = 0 \<and> Oc # list1 = list2"
  "Bk # list1 = Oc \<up> j @ list2 \<longleftrightarrow> j = 0 \<and> Bk # list1 = list2"
  "Bk \<up> j @ list2 = Oc # list1 \<longleftrightarrow> j = 0 \<and> Oc # list1 = list2"
  "Oc \<up> j @ list2 = Bk # list1 \<longleftrightarrow> j = 0 \<and> Bk # list1 = list2"

Output: by(cases j;force)+