Input:
lemma array_rel_sv[relator_props]:
  shows "single_valued R \<Longrightarrow> single_valued (\<langle>R\<rangle>array_rel)"

Output:
unfolding array_rel_alt
apply (intro relator_props )
apply (auto intro: single_valuedI) done


Input:
lemma (in Module) mHom_mHom:"\<lbrakk>R module N; g \<in> mHom R (mdl M (carrier M)) N\<rbrakk>
       \<Longrightarrow> g \<in> mHom R M N"

Output:
apply (rule mHom_test, assumption)
apply (rule conjI)
apply (simp add:mHom_def aHom_def mdl_def)
apply (simp add:mHom_def aHom_def mdl_def) done


Input:
lemma list_update_le_cong:
  "\<lbrakk> i<size xs; xs [\<sqsubseteq>\<^bsub>r\<^esub>] ys; x \<sqsubseteq>\<^sub>r y \<rbrakk> \<Longrightarrow> xs[i:=x] [\<sqsubseteq>\<^bsub>r\<^esub>] ys[i:=y]"

Output:
apply (unfold unfold_lesub_list)
apply (unfold Listn.le_def)
apply (simp add: list_all2_update_cong) done


Input:
lemma givenBy_DiffI:
     "[| A \<in> givenBy v;  B \<in> givenBy v |] ==> A-B \<in> givenBy v"

Output:
apply (simp (no_asm_use) add: givenBy_eq_Collect)
apply safe
apply (rule_tac x = "%z. R z & ~ Q z" for R Q in exI) unfolding set_diff_eq
apply auto done


Input: lemma asprod_distrib2:"\<lbrakk>0 < i; 0 < j\<rbrakk> \<Longrightarrow> (i + j) *\<^sub>a x = (i *\<^sub>a x) + (j *\<^sub>a x)"

Output: by (cut_tac mem_ant[of "x"], erule disjE, simp, erule disjE, erule exE, simp add:asprod_mult, simp add: distrib_right a_zpz, simp)


Input:
lemma emeasure_CI':
  "finite J \<Longrightarrow> X \<in> sets (PiM J M) \<Longrightarrow> CI J X = C 0 (up_to J) (\<lambda>_. undefined) (PF.emb {0..<up_to J} J X)"

Output:
unfolding CI_def
using up_to[of J]
by (rule emeasure_distr_restrict) (auto simp: sets_C)


Input:
lemma sets_PiM_cong[measurable_cong]:
  assumes "I = J" "\<And>i. i \<in> J \<Longrightarrow> sets (M i) = sets (N i)" shows "sets (PiM I M) = sets (PiM J N)"

Output:
using assms sets_eq_imp_space_eq[OF assms(2)]
by (simp add: sets_PiM_single cong: PiE_cong conj_cong)


Input:
lemma lift_subst_lt:
    "i < j + 1 \<Longrightarrow> lift (t<s/j>) i = (lift t i)<lift s i / j + 1>"

Output: by (induct t arbitrary: i j s) (auto simp: subst_Var lift_lift)


Input: lemma le_succ_iff: "Ord i \<Longrightarrow> Ord j \<Longrightarrow> succ i \<le> succ j \<longleftrightarrow> i \<le> j"

Output: by (metis Ord_linear_le Ord_succ le_succE order_antisym)


Input:
lemma subst_tm_commute2 [simp]:
  "atom j \<sharp> t \<Longrightarrow> atom i \<sharp> u \<Longrightarrow> i \<noteq> j \<Longrightarrow> subst j u (subst i t tm) = subst i t (subst j u tm)"

Output: by (induct tm rule: tm.induct) auto


Input:
lemma make_first_column_positive_works:
  assumes "A\<in>carrier_mat m n" and i: "i<m" and "0<n"
  shows "make_first_column_positive A $$ (i,0) \<ge> 0"
  and "j<n \<Longrightarrow> A $$ (i,0) < 0 \<Longrightarrow> (make_first_column_positive A) $$ (i,j) = - A $$ (i,j)"
  and "j<n \<Longrightarrow> A $$ (i,0) \<ge> 0 \<Longrightarrow> (make_first_column_positive A) $$ (i,j) = A $$ (i,j)"

Output:
using assms
by auto


Input:
lemma effective_matrix_match_condn_1:
 assumes "(matrix_match A1 A2 B1 B2) "
 shows "\<forall>i j.((i<(row_length A1)*(row_length B1))
             \<and>(j<(length A2)*(length B2))
              \<longrightarrow>   ((A1 \<circ>  A2)\<otimes>(B1 \<circ> B2))!j!i
                        =  f
                            (scalar_product
                                  (row A1 (i div (row_length B1)))
                                  (col A2  (j div (length B2))))
                            (scalar_product
                                  (row B1 (i mod (row_length B1)))
                                  (col B2 (j mod (length B2)))))"

Output:
using assms matrix_match_condn_1 unfolding matrix_match_def
by auto


Input:
lemma pp_total_linorder_matrix:
  fixes f :: "('a::finite,'b::non_trivial_linorder_stone_relation_algebra_expansion) square"
  shows "matrix_bounded_idempotent_semiring.total (\<ominus>\<ominus>f) \<longleftrightarrow> (\<forall>i . \<exists>j . f (i,j) \<noteq> bot)"

Output:
using matrix_stone_relation_algebra.pp_total pp_total_linorder_matrix_1 pp_total_linorder_matrix_2
by auto


Input: lemma kth_obs_le_iff: assumes \<open>is_kth_obs \<pi> k i\<close> \<open>is_kth_obs \<pi> l j\<close>  shows \<open>k < l \<longleftrightarrow> i < j\<close>

Output: by (metis assms kth_obs_unique kth_obs_mono not_less_iff_gr_or_eq)


Input:
lemma nth_append_take_drop_is_nth_conv:
 assumes "i \<le> length xs" and "j \<le> length xs" and "i \<noteq> j"
 shows "(take j xs @ y # drop (Suc j) xs)!i = xs!i"

Output:
proof - from assms have "i < j \<or> i > j"
by auto thus ?thesis
using assms
by (auto simp: nth_append_take_is_nth_conv nth_append_drop_is_nth_conv)
qed


Input:
lemma outside_of_col_range_is_0:
  assumes "i < dim_row A" and "j \<ge> dim_col A"
  shows "coeff ((matrix_to_lpolies A)!i) j = 0"

Output:
using outside_list_coeff0[of "col A i" j]
by (metis assms(1) assms(2) index_row(2) length_rows matrix_to_lpolies.simps nth_map nth_rows outside_list_coeff0)


Input:
lemma eliminate_entries_i: assumes
  vs: "\<And> j. j < dim_row B' \<Longrightarrow> R (vs (integer_of_nat j)) (vs' j)"
  and i: "i < dim_row B'"
  and B: "mat_rel R B B'"
  shows "mat_rel R (eliminate_entries_i ops vs B i j)
    (eliminate_entries vs' B' i j)"

Output:
unfolding eliminate_entries_i_def eliminate_entries_gen_zero[OF B i]
by (rule eliminate_entries_gen_transfer, insert assms, auto simp: plus times minus)


Input: lemma Disjoint_fresh_iff [simp]: "a \<sharp> Disjoint t u \<longleftrightarrow> a \<sharp> t \<and> a \<sharp> u"

Output:
proof - obtain j::name where j: "atom j \<sharp> (a,t,u)"
by (rule obtain_fresh) thus ?thesis
by (auto simp: Disjoint.simps [of j])
qed


Input:
lemma interchange_columns_code [code abstract]:
  "vec_nth (interchange_columns_row A n m i) = (%j.  if j = n then A $ i $ m else if j = m then A $ i $ n else A $ i $ j)"

Output:
unfolding interchange_columns_row_def
by auto


Input:
lemma ordLeq_Sigma_cong:
assumes "bij_betw f I J" and
        "\<forall>j \<in> J. p j =o r j"
shows "|SIGMA i : I. Field(p(f i))| =o |SIGMA j : J. Field(r j)|"

Output:
using assms card_of_cong card_of_Sigma_cong [of f I J "\<lambda> j. Field(p j)" "\<lambda> j. Field(r j)"]
by blast


Input: lemma \<J>_0_0_subset_Gen: "\<J> 0 0 \<subseteq> Gen (\<P> 0 0)"

Output:
apply (simp only: \<J>.simps)
apply (rule_tac thmD5)
apply (rule Init_subset_Gen)
by auto


Input:
lemma V_constotal_2I:
  assumes "f = j # a @ [k] \<odot> 0\<^sup>\<infinity>"
    and "j \<ge> 2"
    and "\<forall>i<length a. a ! i \<le> 1"
    and "k \<ge> 2"
    and "\<phi> j = j # a \<odot> \<up>\<^sup>\<infinity>"
    and "\<phi> k = f"
  shows "f \<in> V_constotal_2"

Output:
using assms V_constotal_2_def
by blast


Input:
lemma (in Ring) mprod_expR_mem:"\<lbrakk> e \<in> {j. j \<le> n} \<rightarrow> {j. (0::nat) \<le> j};
       f \<in> {j. j \<le> n} \<rightarrow> carrier R\<rbrakk>   \<Longrightarrow>  mprod_expR R e f n \<in> carrier R"

Output: apply (simp add:mprod_expR_memTr) done


Input:
lemma mat_eq_iff: "(x = y) = (dim_row x = dim_row y \<and> dim_col x = dim_col y \<and>
  (\<forall> i j. i < dim_row y \<longrightarrow> j < dim_col y \<longrightarrow> x $$ (i,j) = y $$ (i,j)))" (is "?l = ?r")

Output:
proof assume ?r show ?l
by (rule eq_matI, insert \<open>?r\<close>, auto)
qed simp


Input:
lemma mk_poly2_pre:
  fixes A :: "'a :: comm_semiring_1 mat"
  assumes i: "i < dim_row A"
  shows "mk_poly2 A $ i = (\<Sum>j'<dim_col A. monom (A $$ (i, dim_col A - Suc j')) j')"

Output:
unfolding mk_poly2_def
apply(subst mk_poly2_col)
using i
by auto


Input:
lemma insort_insert_sorted:
  assumes "l<j"
  assumes "insort_insert_post l j a a' i'"
  assumes "ran_sorted a l j"
  shows "ran_sorted a' l (j + 1)"

Output:
using assms unfolding insort_insert_post_def Let_def
apply auto subgoal
by (smt atLeastAtMost_iff ran_sorted_alt) subgoal unfolding ran_sorted_alt Ball_def
apply auto
by smt done


Input:
lemma tabulate2_nth:
  assumes i: "i<nr" and j: "j<nc"
  shows "(tabulate2 nr nc f) !! i !! j = f i j"

Output:
unfolding tabulate2_def
using i j nth_map
by auto


Input:
lemma succ_smallest:
assumes "(i,j) \<in> r" and "i \<noteq> j"
shows "(succ i, j) \<in> r"

Output:
unfolding succ_def
apply(rule suc_least)
using assms unfolding Field_def
by auto


Input:
lemma (in Ring) prod_n_principal_ideal:"\<lbrakk>e \<in> {j. j\<le>n} \<rightarrow> {j. (0::nat)\<le>j};
f \<in> {j. j\<le>n} \<rightarrow> carrier R; \<forall>k\<le> n. J k = (Rxa R (f k))\<^bsup>\<diamondsuit>R (e k)\<^esup>\<rbrakk> \<Longrightarrow>
                 ideal_n_prod R n J = Rxa R (mprod_expR R e f n)"

Output: apply (simp add:prod_n_principal_idealTr[of e n f J]) done


Input:
lemma fst_splitAt_upt:
 "j \<le> i \<Longrightarrow> i < k \<Longrightarrow> fst(splitAt i [j..<k]) = [j..<i]"

Output:
using splitAt_take[where ls = "[j..<k]" and i="i-j"]
apply (simp del:splitAt_take) done


Input:
lemma Extend_commute_safe[simp]:
  "\<lbrakk>j \<le> i; LEQ ord i (#\<^sub>V \<AA>)\<rbrakk> \<Longrightarrow>
    Extend ord j (Extend ord i \<AA> P1) P2 = Extend ord (Suc i) (Extend ord j \<AA> P2) P1"

Output: by (transfer, force simp del: insert_nth_take_drop simp: replicate_add[symmetric] split: order.splits)


Input:
lemma all_positions_drop_length_take: "\<lbrakk>i \<le> length w; i \<le> length x;
  \<forall>j<i. x ! j = w ! (length w + j - i)\<rbrakk>
    \<Longrightarrow> drop (length w - i) w = take i x"

Output: by (cases "i = length x") (auto intro: nth_equalityI)


Input: lemma not_sdom_not_dom: "\<not>strict_dom i j \<Longrightarrow> i \<noteq> j \<Longrightarrow> \<not>dom i j"

Output: by (unfold strict_dom_def) (auto simp add:dom_def)


Input:
lemma index_mat_swapcols[simp]:
  "i < dim_row A \<Longrightarrow> j < dim_col A \<Longrightarrow> swapcols k l A $$ (i,j) = (if k = j then A $$ (i,l) else
    if l = j then A $$ (i,k) else A $$ (i,j))"
  "dim_row (swapcols k l A) = dim_row A" "dim_col (swapcols k l A) = dim_col A"

Output:
unfolding mat_swapcols_def
by auto


Input:
lemma point_linorder_matrix_unique:
  fixes f :: "('a::finite,'b::non_trivial_linorder_stone_relation_algebra_expansion) square"
  shows "matrix_stone_relation_algebra.point f \<longleftrightarrow> (\<exists>!i . \<forall>j . f (i,j) = top \<and> (\<forall>k . i \<noteq> k \<longrightarrow> f (k,j) = bot))"

Output:
apply (unfold vector_linorder_matrix bijective_linorder_matrix)
apply (rule iffI)
apply (metis bot_not_top)
by metis


Input: lemma slide_inj:"i < j \<Longrightarrow> inj_on (slide i) {k. k \<le> (j - i)}"

Output:
apply (simp add:inj_on_def, (rule allI)+)
apply (rule impI, rule allI, rule impI, rule impI)
apply (simp add:slide_def) done


Input: lemma elts_vcard_VSigma_eqpoll: "elts (vcard (vtimes i j)) \<approx> elts i \<times> elts j"

Output:
proof - have "elts (vtimes i j) \<approx> elts i \<times> elts j"
by (simp add: elts_VSigma) then show ?thesis
using cardinal_eqpoll eqpoll_trans
by blast
qed


Input:
lemma multiplicity_prime:
  assumes p: "prime (i :: nat)" and ji: "j \<noteq> i"
  shows "multiplicity j i = 0"

Output:
using assms
by (metis dvd_refl prime_nat_iff multiplicity_eq_zero_iff multiplicity_unit_left multiplicity_zero)


Input:
lemma Semaphores_mutex:
 "\<parallel>- \<lbrace>i\<noteq>j\<rbrace>
  \<acute>out:=True ,,
  COBEGIN \<lbrace>i\<noteq>j\<rbrace>
       WHILE True INV \<lbrace>i\<noteq>j\<rbrace>
       DO \<lbrace>i\<noteq>j\<rbrace> AWAIT \<acute>out THEN  \<acute>out:=False,, \<acute>who:=i END;;
          \<lbrace>\<not>\<acute>out \<and> \<acute>who=i \<and> i\<noteq>j\<rbrace> \<acute>out:=True OD
       \<lbrace>False\<rbrace>
  \<parallel>
       \<lbrace>i\<noteq>j\<rbrace>
       WHILE True INV \<lbrace>i\<noteq>j\<rbrace>
       DO \<lbrace>i\<noteq>j\<rbrace> AWAIT \<acute>out THEN  \<acute>out:=False,,\<acute>who:=j END;;
          \<lbrace>\<not>\<acute>out \<and> \<acute>who=j \<and> i\<noteq>j\<rbrace> \<acute>out:=True OD
       \<lbrace>False\<rbrace>
  COEND
  \<lbrace>False\<rbrace>"

Output:
apply oghoare \<comment> \<open>38 vc\<close>
apply auto done


Input: lemma enum_strict_mono: "i \<le> n \<Longrightarrow> j \<le> n \<Longrightarrow> enum i < enum j \<longleftrightarrow> i < j"

Output:
using enum_mono[of i j] enum_inj[of i j]
by (auto simp: le_less)


Input:
lemma comp_transpos_1:"\<lbrakk>i \<le> n; j \<le> n; i \<noteq> j; k \<le> n\<rbrakk> \<Longrightarrow>
                           (transpos i j) ((transpos i j) k) = k"

Output:
apply (frule comp_transpos [of "i" "n" "j"], assumption+)
apply (simp add:compose_def) done


Input:
lemma vector_matrix_mult_code [code abstract]:
  "vec_nth (x v* A) = (%j. (\<Sum>i\<in>UNIV. A $ i $ j * x $ i))"

Output:
unfolding vector_matrix_mult_def
by fastforce


Input:
lemma canonical_D:
  assumes
    "cycle_free_up_to m k n" "canonical_subs n {0..k} m" "i \<le> n" "j \<le> n" "k \<le> n"
  shows "D m i j k = m i j"

Output:
using assms
apply -
apply (rule D_eqI2)
apply (assumption | simp; fail)+ subgoal
by (auto intro: canonical_subs_len)
apply clarsimp
by (rule exI[where x = "[]"]) auto


Input:
lemma Sup_upto_llist_Suc[simp]:
  "Sup_upto_llist Xs (enat (Suc j)) =
   Sup_upto_llist Xs (enat j) \<union> (if enat (Suc j) < llength Xs then lnth Xs (Suc j) else {})"

Output:
unfolding Sup_upto_llist_def image_def
by (auto intro: le_SucI elim: le_SucE)


Input:
lemma subst_fm_commute [simp]:
  "atom j \<sharp> A \<Longrightarrow> (A(i::=t))(j::=u) = A(i ::= subst j u t)"

Output: by (nominal_induct A avoiding: i j t u rule: fm.strong_induct) (auto simp: fresh_at_base)


Input:
lemma matrix_to_iarray_cofactor[code_unfold]:
  "(cofactor A i j) = cofactor_iarrays (matrix_to_iarray A) (to_nat i) (to_nat j)"

Output:
unfolding o_def cofactor_iarrays_def cofactor_def cofactorM_def unfolding matrix_to_iarray_minorM[symmetric] unfolding matrix_to_iarray_det_euclidean_ring[symmetric]
by simp


Input:
lemma arcs_set_elem1:
  assumes "j \<noteq> k" "k \<in> set (i # xs)"
  shows "\<exists> l. (k, l) \<in> set (arcs i j xs)"

Output:
using assms
by (induction xs arbitrary: i) auto


Input:
theorem order_finite_chain:
  assumes chX: "long_ch_by_ord f X"
      and finiteX: "finite X"
      and ordered_nats: "0 \<le> (i::nat) \<and> i < j \<and> j < l \<and> l < card X"
  shows "[[(f i) (f j) (f l)]]"

Output: by (metis chX long_ch_by_ord_def ordered_nats ordering_ord_ijk)


Input:
lemma (in ring) indexed_pmult_index_free:
  assumes "index_free P j" and "i \<noteq> j" shows "index_free (P \<Otimes> i) j"

Output:
using assms unfolding index_free_def indexed_pmult_def
by (metis insert_DiffM insert_noteq_member)


Input: lemma fin_stut_after_last: assumes H: "fin s" shows "\<forall>j \<ge> last s. s j = s (last s)"

Output:
proof (clarify) fix j assume j: "j \<ge> last s" from H obtain i where "\<forall>j \<ge> i. s j = s i" (is "?P i")
by (auto simp: fin_def) hence "?P (last s)" unfolding last_def
by (rule LeastI) with j show "s j = s (last s)"
by blast
qed


Input:
lemma prod_algebraE:
  assumes A: "A \<in> prod_algebra I M"
  obtains J E where "A = prod_emb I M J (\<Pi>\<^sub>E j\<in>J. E j)"
    "finite J" "J \<noteq> {} \<or> I = {}" "J \<subseteq> I" "\<And>i. i \<in> J \<Longrightarrow> E i \<in> sets (M i)"

Output:
using A
by (auto simp: prod_algebra_def)


Input:
lemma stake_suffix_drop:
  "stake i (\<sigma> |\<^sub>s j) = drop j (stake (i + j) \<sigma>)"

Output: by (metis append_eq_conv_conj length_stake semiring_normalization_rules(24) stake_add)


Input:
lemma unless_untilI:
  assumes "Q (\<sigma> |\<^sub>s j)"
  assumes "\<And>i. i < j \<Longrightarrow> P (\<sigma> |\<^sub>s i)"
  shows "(P \<W> Q) \<sigma>"

Output:
unfolding defs
using assms
by blast


Input:
lemma chain_imp_relpow:
  assumes "chain r S" shows "(S i, S (i + j)) \<in> r^^j"

Output:
proof (induct "i + j" arbitrary: j) case (Suc n) thus ?case
using assms
by (cases j) auto
qed simp


Input:
lemma adjust_idx_i:
  "adjust_idx i j \<noteq> i"

Output:
unfolding adjust_idx_def
by (cases "j < i", auto)


Input:
lemma chainp_imp_relpowp:
  assumes "chainp P S" shows "(P^^j) (S i) (S (i + j))"

Output:
proof (induct "i + j" arbitrary: j) case (Suc n) thus ?case
using assms
by (cases j) auto
qed simp


Input:
lemma inv\<^sub>2I:
  assumes "lb T A j" "j \<le> n"
          "\<forall>T' A'. lb T' A' j \<longrightarrow> makespan T \<le> 3 / 2 * makespan T'"
          "\<forall>x > j. T x = 0"
          "j \<le> m \<Longrightarrow> makespan T = Max\<^sub>0 (t ` {1..j})"
  shows "inv\<^sub>2 T A j"

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


Input:
lemma AbstFormP_subst [simp]:
     "(AbstFormP v i x x')(j::=t) = AbstFormP (subst j t v) (subst j t i) (subst j t x) (subst j t x')"

Output:
proof - obtain s::name and k::name where "atom s \<sharp> (v,i,x,x',t,j,k)" "atom k \<sharp> (v,i,x,x',t,j)"
by (metis obtain_fresh) thus ?thesis
by (auto simp: AbstFormP.simps [of s _ _ _ _ k])
qed


Input:
lemma iter_bf_heap_unfold[code]:
  "iter_bf_heap n w t mem = (\<lambda> (i, j).
    (if i \<le> n \<and> j \<le> n
     then do {
            bf\<^sub>h'_impl n w t mem i j;
            iter_bf_heap n w t mem (if j < n then (i, j + 1) else (i + 1, 0))
          }
     else Heap_Monad.return ()))"

Output:
unfolding iter_bf_heap_def
by (rule ext) (safe, simp add: iter_heap_unfold)


Input: lemma Gen_subset_\<J>_0_0: "Gen (\<P> 0 0) \<subseteq> \<J> 0 0"

Output:
apply (subst \<P>_0_0_Gen)
apply auto
using Gen_subset_\<J>_0_0_helper
by blast


Input:
lemma lower_triangular_index:
  assumes "lower_triangular A" "i<j" "i < dim_row A" "j < dim_col A"
  shows "A $$ (i,j) = 0"

Output:
using assms unfolding lower_triangular_def
by auto


Input:
lemma streamValue8:
assumes "\<forall>j\<le>d. str (t + i + k + d + Suc j) = x"
       and "str (t + i + k + d) = x"
shows "\<forall> j\<le> Suc d. str (t + i + k + d + j) = x"

Output:
using assms streamValue7
by metis


Input:
lemma linsD:
  assumes "\<pi> \<in> lins G"
  shows "(distinct \<pi>)"
    and "(set \<pi> = (fset G^V) <+> (set G^E))"
    and "(\<forall>i j v e. i < length \<pi> \<and> j < length \<pi>
     \<and> \<pi>!i = Inl v \<and> \<pi>!j = Inr e \<and> v |\<in>| fst3 e \<longrightarrow> i<j)"
    and "(\<forall>j k w e. j < length \<pi> \<and> k < length \<pi>
     \<and> \<pi>!j = Inr e \<and> \<pi>!k = Inl w \<and> w |\<in>| thd3 e \<longrightarrow> j<k)"

Output:
using assms
apply -
apply (unfold lins_def Collect_iff)
apply (elim conjE, assumption)+ done


Input:
lemma zmult_zless_mono2:
  fixes i j k::int
  assumes a: "i < j" "0 < k"
  shows "k * i < k * j"

Output:
using a
by (drule_tac zero_le_imp_eq_int) (auto simp add: zmult_zless_mono2_lemma)


Input: lemma a_fixpoint: "ad x = x \<Longrightarrow> (\<forall>y. y = 0)"

Output:
proof - assume a1: "ad x = x" { fix aa :: 'a have "aa = 0"
using a1
by (metis (no_types) a_mul_d ans_d_def local.annil local.ans3 local.join.sup.idem local.mult_1_left) } then show ?thesis
by blast
qed


Input:
lemma red_external_aggr_read_mem_typeable:
  "\<lbrakk> (ta, va, h') \<in> red_external_aggr P t a M vs h; ReadMem ad al v \<in> set \<lbrace>ta\<rbrace>\<^bsub>o\<^esub> \<rbrakk>
  \<Longrightarrow> \<exists>T'. P,h \<turnstile> ad@al : T'"

Output: by(auto simp add: red_external_aggr_def split_beta split: if_split_asm dest: heap_clone_read_typeable)


Input:
lemma red_New_type_match:
  "\<lbrakk> h.red' P t e s ta e' s'; NewHeapElem ad CTn \<in> set \<lbrace>ta\<rbrace>\<^bsub>o\<^esub>; typeof_addr ad \<noteq> None \<rbrakk>
  \<Longrightarrow> typeof_addr ad = \<lfloor>CTn\<rfloor>"
  and reds_New_type_match:
  "\<lbrakk> h.reds' P t es s ta es' s'; NewHeapElem ad CTn \<in> set \<lbrace>ta\<rbrace>\<^bsub>o\<^esub>; typeof_addr ad \<noteq> None \<rbrakk>
  \<Longrightarrow> typeof_addr ad = \<lfloor>CTn\<rfloor>"

Output: by(induct rule: h.red_reds.inducts)(auto dest: allocate_typeof_addr_SomeD red_external_New_type_match)


Input: lemma a_very_costrict'': "ad x = 1 \<longleftrightarrow> x = 0"

Output: by (metis add_commute local.add_zerol local.antisym local.apd1 local.apd3 local.join.bot_least local.mult_1_right local.phl_skip)


Input:
lemma mono_ccINF:
  "countable I \<Longrightarrow> f (INF i \<in> I. A i) \<le> (INF x \<in> I. f (A x))"

Output: by (intro countable_complete_lattice_class.ccINF_greatest monoD[OF \<open>mono f\<close>] ccINF_lower)


Input:
lemma inner_eucl_of_list:
  fixes i::"'a::executable_euclidean_space"
  assumes i: "i \<in> Basis"
  assumes l: "length xs = DIM('a)"
  shows "i \<bullet> eucl_of_list xs = xs ! (index Basis_list i)"

Output:
using eucl_of_list_inner[OF assms]
by (auto simp: inner_commute)


Input:
lemma right_ideal_minus:
  assumes "right_ideal I"
  and "a\<in>I" and "b\<in>I"
  shows "a - b \<in> I"

Output: by (metis assms(1) assms(2) assms(3) diff_minus_eq_add minus_minus right_ideal_def subgroup_def)


Input:
lemma index_set_closed_in:
  assumes "index_set I" and "i \<in> I" and "\<forall>x. eval r_phi [i, x] = eval r_phi [j, x]"
  shows "j \<in> I"

Output:
using index_set_def assms
by simp


Input:
lemma DirProds_finite_comm_group_iff:
  assumes "finite I"
  shows "finite_comm_group (DirProds G I) \<longleftrightarrow> (\<forall>i\<in>I. finite_comm_group (G i))"

Output:
using DirProds_finite_group_iff[OF assms] DirProds_comm_group_iff unfolding finite_comm_group_def
by fast


Input: lemma B_theorem_3_b: "\<Theta> i * f i = ff (lead_coeff (H i))"

Output:
using arg_cong[OF fundamental_theorem_eq_6[folded H_def, OF i], of lead_coeff] unfolding f[of i] lead_coeff_smult
by simp


Input: lemma poly_of_pm_prod: "poly_of_pm x (prod f I) = (\<Prod>i\<in>I. poly_of_pm x (f i))"

Output: by (induct I rule: infinite_finite_induct) (simp_all add: poly_of_pm_times)


Input:
lemma (in sigma_algebra) sets_Collect_countable_Ex1:
  "(\<And>i :: 'i :: countable. {x \<in> \<Omega>. P i x} \<in> M) \<Longrightarrow> {x \<in> \<Omega>. \<exists>!i. P i x} \<in> M"

Output:
using sets_Collect_countable_Ex1'[of "UNIV :: 'i set"]
by simp


Input:
lemma continuous_on_blinfunI1:
  "continuous_on X f"
  if "\<And>i. i \<in> Basis \<Longrightarrow> continuous_on X (\<lambda>x. blinfun_apply (f x) i)"

Output:
using that
by (auto simp: continuous_on_def intro: tendsto_componentwise1)


Input:
lemma skip_im_Tr2_1:"\<lbrakk>i \<in> {i. i \<le> (Suc n)}; i \<le> x\<rbrakk> \<Longrightarrow>
                             skip i x = Suc x"

Output:
apply (case_tac "i = 0")
apply (simp add:skip_def)
apply (simp, rule skip_im_Tr2, assumption+, simp+) done


Input:
lemma array_shr_rule[sep_heap_rules]:
  "< src \<mapsto>\<^sub>a lsrc  >
    array_shr src i k
    <\<lambda>_. src \<mapsto>\<^sub>a (take (i+k) lsrc @ take (length lsrc - (i+k)) (drop i lsrc))
    >"

Output:
unfolding array_shr_def
by sep_auto


Input:
lemma isom_gch_units_1:"\<lbrakk>Ugp E; Gchain n g; Gchain n h; \<exists>f. Gch_bridge n g h f\<rbrakk>
 \<Longrightarrow>  card {i. i \<le> n \<and> g i \<cong> E} = card {i. i \<le> n \<and> h i \<cong> E}"

Output:
apply (auto del:equalityI)
apply (simp add:isom_gch_units) done


Input: lemma fi_state: "i < m \<Longrightarrow> fi_state state = fs ! i"

Output:
using get_nth_i[OF to_list_repr(1)] unfolding state
by auto


Input:
lemma wt_BinOpInstr:
  "P \<turnstile> T1\<guillemotleft>bop\<guillemotright>T2 :: T \<Longrightarrow> \<turnstile> [BinOpInstr bop],[] [::] [ty\<^sub>i' (T2 # T1 # ST) E A, ty\<^sub>i' (T # ST) E A]"

Output: by(auto simp:ty\<^sub>i'_def wt_defs dest: WT_binop_WTrt_binop intro: list_all2_refl)


Input:
lemma cycle_free_up_to_loop_dest:
  "i \<le> n \<Longrightarrow> set xs \<subseteq> {0..k} \<Longrightarrow> cycle_free_up_to m k n \<Longrightarrow> len m i i xs \<ge> \<one>"

Output:
unfolding cycle_free_up_to_def
by auto


Input:
lemma tm_min_range:
  assumes "x \<in>\<^sub>i range_tm e t1"
  assumes "y \<in>\<^sub>i range_tm e t2"
    "num_params (tm_poly t1) \<le> length I"
    "num_params (tm_poly t2) \<le> length I"
    "develops_at_within e a I"
  shows "min x y \<in>\<^sub>i range_tm e (tm_min prec I a t1 t2)"

Output:
using assms
by (auto simp: Let_def tm_min.simps min_def intro: tm_union_range_left tm_union_range_right)


Input:
lemma take_cols_carrier_mat_strict:
  assumes "A \<in> carrier_mat nr nc"
  assumes "\<And>i. i \<in> set inds \<Longrightarrow> i < nc"
  shows "take_cols A inds \<in> carrier_mat nr (length inds)"

Output:
unfolding take_cols_def
using assms
by auto


Input: lemma "\<not> (\<exists> i :: rat. i * i = 2)"

Output:
proof - have "set (sqrt_rat 2) = {}"
by eval thus ?thesis
by simp
qed


Input:
lemma ListLenDrop:
fixes
  i la lb
assumes
  "i < length lb"
  "i \<ge> la"
shows
  "lb ! i \<in> set (drop la lb)"

Output:
using assms
by (metis Cons_nth_drop_Suc in_set_member member_rec(1) set_drop_subset_set_drop rev_subsetD)


Input:
lemma frequently_at_top_realE:
  fixes P::"nat \<Rightarrow> real \<Rightarrow> bool"
  assumes "\<forall>n. \<exists>\<^sub>F t in at_top. P n t"
  obtains s::"nat\<Rightarrow>real"
  where "\<And>i. P i (s i)" "filterlim s at_top at_top"

Output: by (metis assms frequently_at_top_at_topE[OF _ filterlim_real_sequentially])


Input:
lemma scalar_left_mono: assumes
  "u \<in> carrier_vec n" "v \<in> carrier_vec n" "w \<in> carrier_vec n"
  and "\<And> i. i < n \<Longrightarrow> u $ i \<ge> v $ i"
  and "\<And> i. i < n \<Longrightarrow> w $ i \<ge> (0 :: 'a :: ordered_semiring_0)"
  shows "u \<bullet> w \<ge> v \<bullet> w"

Output:
unfolding scalar_prod_def
by (intro sum_mono_ge times_left_mono, insert assms, auto)


Input: lemma "i \<noteq> i1 \<and> i \<noteq> i2 \<Longrightarrow> (f (i1 := v1, i2 := v2)) i = f i"

Output:
using fun_upd_same fun_upd_apply
by smt


Input:
lemma nop_instr_result: "(fst i) = nop_type NOP \<Longrightarrow>
  snd (nop_instr i s) = False"

Output:
apply (simp add: nop_instr_def)
by (simp add: returnOk_def return_def)


Input:
lemma complex_Taylor:
  assumes S: "convex S"
      and f: "\<And>i x. x \<in> S \<Longrightarrow> i \<le> n \<Longrightarrow> (f i has_field_derivative f (Suc i) x) (at x within S)"
      and B: "\<And>x. x \<in> S \<Longrightarrow> cmod (f (Suc n) x) \<le> B"
      and w: "w \<in> S"
      and z: "z \<in> S"
    shows "cmod(f 0 z - (\<Sum>i\<le>n. f i w * (z-w) ^ i / (fact i)))
          \<le> B * cmod(z - w)^(Suc n) / fact n"

Output:
using assms
by (rule field_Taylor)


Input:
lemma pdevs_apply_update_slist: "pdevs_apply (Pdevs (update_slist n x xs)) i =
  (if i = n then x else pdevs_apply (Pdevs xs) i)"

Output: by transfer (auto simp: Pdevs_raw_def)


Input:
lemma inext_le_mono_infin_rev: "
  \<lbrakk> inext a I \<le> inext b I; a \<in> I; b \<in> I; infinite I \<rbrakk> \<Longrightarrow> a \<le> b"

Output: by (metis inext_in_iff inext_le_mono_rev inext_mono2_infin_fin)


Input:
theorem eval_negation:
  "eval i (Neg' p) =
    (
      if eval i p = Det False then Det True else
      if eval i p = Det True then Det False else
      eval i p
    )"

Output: by (cases "eval i p") simp_all


Input:
lemma chain_boundary_sum:
   "chain_boundary p (sum g I) = sum (chain_boundary p \<circ> g) I"

Output: by (induction I rule: infinite_finite_induct) (simp_all add: chain_boundary_add)


Input:
lemma DirProds_one:
  assumes "x \<in> carrier (DirProds G I)"
  shows "(\<forall>i \<in> I. x i = \<one>\<^bsub>G i\<^esub>) \<longleftrightarrow> x = \<one>\<^bsub>DirProds G I\<^esub>"

Output:
using assms unfolding DirProds_def
by fastforce


Input:
lemma AbstrLevels_S6_A41:
  assumes "sS6 \<in> AbstrLevel i"
  shows "sA41 \<notin> AbstrLevel i"

Output:
using assms
by (induct i, simp add: AbstrLevel0, simp add: AbstrLevel1, simp add: AbstrLevel2, simp add: AbstrLevel3)


Input:
lemma comp_in_carr:
  assumes "x \<in> carrier (DirProds G I)" "i \<in> I"
  shows "x i \<in> carrier (G i)"

Output:
using assms unfolding DirProds_def
by auto


Input: lemma poly_of_pm_sum: "poly_of_pm x (sum f I) = (\<Sum>i\<in>I. poly_of_pm x (f i))"

Output: by (induct I rule: infinite_finite_induct) (simp_all add: poly_of_pm_plus)


Input:
lemma (in semiring_of_sets) generated_ring_INTER:
  "finite I \<Longrightarrow> I \<noteq> {} \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> A i \<in> generated_ring) \<Longrightarrow> \<Inter>(A ` I) \<in> generated_ring"

Output: by (intro generated_ring_Inter) auto


Input:
lemma measurable_component_singleton'[measurable_dest]:
  assumes f: "f \<in> measurable N (Pi\<^sub>M I M)"
  assumes g: "g \<in> measurable L N"
  assumes i: "i \<in> I"
  shows "(\<lambda>x. (f (g x)) i) \<in> measurable L (M i)"

Output: using measurable_compose[OF measurable_compose[OF g f] measurable_component_singleton, OF i] .


Input:
lemma iterate_rule_P:
    "\<lbrakk>
      invar S;
      I (\<alpha> S) \<sigma>0;
      !!x it \<sigma>. \<lbrakk> x \<in> it; it \<subseteq> \<alpha> S; I it \<sigma> \<rbrakk> \<Longrightarrow> I (it - {x}) (f x \<sigma>);
      !!\<sigma>. I {} \<sigma> \<Longrightarrow> P \<sigma>
    \<rbrakk> \<Longrightarrow> P (iteratei S (\<lambda>_. True) f \<sigma>0)"

Output:
apply (rule set_iterator_no_cond_rule_P [OF iteratei_correct, of S I \<sigma>0 f P])
apply simp_all done


Input:
lemma rt_strictly_fresherI [intro]:
  assumes "rt1 \<sqsubseteq>\<^bsub>i\<^esub> rt2"
      and "\<not>(rt1 \<approx>\<^bsub>i\<^esub> rt2)"
    shows "rt1 \<sqsubset>\<^bsub>i\<^esub> rt2"

Output:
unfolding rt_strictly_fresher_def
using assms ..


Input:
lemma plossless_swap_lassocr [plossless_intro]:
  "plossless_converter (\<I>1 \<oplus>\<^sub>\<I> (\<I>2 \<oplus>\<^sub>\<I> \<I>3)) (\<I>2 \<oplus>\<^sub>\<I> (\<I>1 \<oplus>\<^sub>\<I> \<I>3)) swap_lassocr"

Output:
unfolding swap_lassocr_def
by(rule plossless_intro WT_intro)+


Input: lemma DirProds_group_iff: "group (DirProds G I) \<longleftrightarrow> (\<forall>i\<in>I. group (G i))"

Output:
using DirProds_is_group DirProds_group_imp_groups
by metis


Input:
lemma prod_coprime_right:
  "coprime a (\<Prod>i\<in>A. f i)" if "\<And>i. i \<in> A \<Longrightarrow> coprime a (f i)"

Output:
using that prod_coprime_left [of A f a]
by (simp add: ac_simps)


Input:
theorem subst_lemma [simp]:
  \<open>eval e f g (subst a t i) = eval (e\<langle>i:evalt e f t\<rangle>) f g a\<close>

Output: by (induct a arbitrary: e i t) simp_all


Input: lemma delete_cnj_length[termination_simp]: "length (delete_cnj x i yjs) \<le> length yjs"

Output: by (induct x i yjs rule: delete_cnj.induct, auto)


Input: lemma matrix_vector_mul_diag_mat: "diag_mat f *v s = (\<chi> i. f i * s$i)"

Output:
unfolding diag_mat_def matrix_vector_mult_def
by simp


Input: lemma sumj_upd_C: "sumj I i (s(C := x)) = sumj I i s"

Output: by (induct I) (auto simp add: sum_upd_C [unfolded fun_upd_def])


Input:
lemma FOREACHoci_weaken:
  assumes IREF: "\<And>it \<sigma>. it\<subseteq>S \<Longrightarrow> I it \<sigma> \<Longrightarrow> I' it \<sigma>"
  shows "FOREACHoci RR I' S c f \<sigma>0 \<le> FOREACHoci RR I S c f \<sigma>0"

Output:
apply (rule FOREACHoci_refine_rcg[where \<alpha>=id and R=Id, simplified])
apply (auto intro: IREF) done


Input: lemma inext_nth_surj_on:"surj_on (\<lambda>n. I \<rightarrow> n) UNIV I"

Output:
apply (simp add: surj_on_conv)
by (insert inext_nth_surj_aux1[of I], blast)


Input:
lemma bisim_hidden_unmod: "\<lbrakk> bisim Vs e e' xs; hidden Vs i \<rbrakk> \<Longrightarrow> unmod e' i"
  and bisims_hidden_unmods: "\<lbrakk> bisims Vs es es' xs; hidden Vs i \<rbrakk> \<Longrightarrow> unmods es' i"

Output: by(induct rule: bisim_bisims.inducts)(auto intro: hidden_unmod hidden_unmods dest: hidden_inacc hidden_lengthD)


Input: lemma flatten_sum: "flatten (sum f I) = (\<Sum>i\<in>I. flatten (f i))"

Output: by (induct I rule: infinite_finite_induct) (simp_all add: flatten_plus)


Input:
lemma in_mset_imp_in_array:
  "x \<in># (arr_mset arr l r) \<longleftrightarrow> (\<exists>i. bounded l r i \<and> arr i = x)"

Output:
unfolding mset_ran_def
by fastforce


Input:
lemma less_length_cut_same_Inl:
  "\<lbrakk>(\<forall>x \<in> set I. case x of Inr P \<Rightarrow> finite P | _ \<Rightarrow> True); r < length I; I ! r = Inl p\<rbrakk> \<Longrightarrow>
  p < length (cut_same (any, replicate (length I) False) (stream_enc (w, I)))"

Output:
unfolding cut_same_def length_stake
by (erule LeastI2_ex[OF ex_Loop_stream_enc ccontr], auto simp: smap2_alt list_eq_iff_nth_eq add.commute dest!: add_diff_inverse split: sum.splits, metis)


Input:
lemma InstrElimNext:
 "\<lbrakk>(M, l, s, n, ll, t) \<in> Step;
   get_ins M l = Some I;
   I = const c \<or> I = dup \<or> I = pop \<or> I = swap \<or> I = load x \<or>
   I = store x \<or> I = binop f \<or> I = unop g \<or> I = new d \<or>
   I = getfield d F \<or> I = putfield d F \<or> I = checkcast d\<rbrakk>
  \<Longrightarrow> ll = l+1"

Output:
apply (drule eval_cases, simp_all)
apply clarsimp
apply clarsimp done


Input: lemma WHILEI_le_WHILEIT: "WHILEI I b f s \<le> WHILEIT I b f s"

Output:
unfolding WHILEI_def WHILEIT_def
by (rule REC_le_RECT)


Input: lemma skip_im_Tr1_2:"\<lbrakk> i \<le> (Suc n); x < i\<rbrakk> \<Longrightarrow>  skip i x = x"

Output: apply (rule skip_im_Tr1_1[of i n x], simp+) done


Input:
lemma plossless_parallel_converter [plossless_intro]:
  "\<lbrakk> plossless_converter \<I>1 \<I> conv1; plossless_converter \<I>2 \<I> conv2; \<I>1, \<I> \<turnstile>\<^sub>C conv1 \<surd>; \<I>2, \<I> \<turnstile>\<^sub>C conv2 \<surd> \<rbrakk>
  \<Longrightarrow> plossless_converter (\<I>1 \<oplus>\<^sub>\<I> \<I>2) \<I> (parallel_converter conv1 conv2)"

Output: by(coinduction arbitrary: conv1 conv2) (clarsimp; erule PlusE; drule (1) plossless_converterD; drule (1) WT_converterD'; fastforce)


Input: lemma enforce_\<I>_gpv_lift_spmf [simp]: "enforce_\<I>_gpv \<I> (lift_spmf p) = lift_spmf p"

Output: by(rule gpv.expand)(simp add: enforce_map_spmf spmf.map_comp o_def)


Input:
lemma mem_set_indexed_members:
  "(i,x) \<in> set (indexed_members s) \<longleftrightarrow> x |\<in>|\<^bsub>i\<^esub> s"

Output:
unfolding indexed_members_def indexed_fmember.simps
by (force simp add: set_zip)


Input: lemma i_set0_i_set_mem_conv: "(I \<in> i_set0) = (I \<in> i_set \<or> I = {})"

Output:
apply (simp add: i_set_i_set_ind_eq i_set0_i_set0_ind_eq)
apply (rule iffI)
apply (rule i_set0_ind.cases[of I])
apply blast+ done


Input: lemma lookup_single_bit[simp]: "lookup i ((single_bit n)::'a::len word list) \<longleftrightarrow> i = n"

Output:
apply (induction n arbitrary: i rule: single_bit.induct)
apply (subst single_bit.simps)
apply (auto simp: bin_nth_sc_gen) done


Input:
lemma sum_fun_mono:
  fixes f :: "nat \<Rightarrow> nat"
  shows "(\<And>i. i < n \<Longrightarrow> f i \<le> g i) \<Longrightarrow> sum f {..<n} \<le> sum g {..<n}"

Output: by (induct n) (auto simp add: lessThan_Suc add_le_mono)


Input:
theorem lift_subst_dummy:
  "\<not> freedb s i \<Longrightarrow> lift (s<dummy/i>) i = s"

Output: by (induct s arbitrary: i dummy) (simp_all add: not_less_eq if_not_P)


Input:
lemma Always_giv_le_allocGiv: "System \<in> Always (INT i: lessThan Nclients.
                       {s. (giv o sub i o client) s \<le> (sub i o allocGiv) s})"

Output:
apply auto
apply (erule System_Follows_allocGiv [THEN Follows_Bounded]) done


Input: lemma (in Ring) I_in_set_ar_cos:"ideal R I \<Longrightarrow> I \<in> set_ar_cos R I"

Output: apply (cut_tac ring_is_ag, frule ideal_asubg[of "I"], rule aGroup.unit_in_set_ar_cos, assumption+) done


Input: lemma matrix_mul_diag_diag: "diag_mat f ** diag_mat g = diag_mat (\<lambda>i. f i * g i)"

Output:
unfolding diag_mat_def matrix_matrix_mult_def vec_eq_iff
by simp


Input:
lemma plossless_map_converter:
  "plossless_converter \<I> \<I>' (map_converter f g h k conv)"
  if "plossless_converter (map_\<I> (inv_into UNIV f) (inv_into UNIV g) \<I>) (map_\<I> h k \<I>') conv" "inj f"

Output:
using that
by(coinduction arbitrary: conv)(auto dest!: plossless_converterD[where a="f _"])


Input:
lemma constraint_model_Value_term_is_Val':
  assumes \<A>_reach: "A \<in> reachable_constraints P"
    and \<I>: "welltyped_constraint_model I A"
    and P: "\<forall>T \<in> set P. admissible_transaction T"
    and x: "(TAtom Value, m) \<in> fv\<^sub>l\<^sub>s\<^sub>s\<^sub>t A"
  shows "\<exists>n. I (TAtom Value, m) = Fun (Val (n,False)) []"

Output:
using constraint_model_Value_term_is_Val[OF \<A>_reach \<I> P _ x]
by simp


Input:
lemma inext_le_mono_fin_rev: "
  \<lbrakk> inext a I \<le> inext b I; a \<in> I; b \<in> I; finite I; inext a I \<noteq> Max I\<rbrakk> \<Longrightarrow> a \<le> b"

Output: by (metis inext_in_iff inext_le_mono_rev inext_mono2_infin_fin)


Input:
lemma borel_measurable_vimage_halfspace_component_lt:
     "f \<in> borel_measurable (lebesgue_on S) \<longleftrightarrow>
      (\<forall>a i. i \<in> Basis \<longrightarrow> {x \<in> S. f x \<bullet> i < a} \<in> sets (lebesgue_on S))"

Output:
apply (rule trans [OF borel_measurable_iff_halfspace_less])
apply (fastforce simp add: space_restrict_space) done


Input: lemma singleton:"|i| = 1 \<longrightarrow> (\<exists>n. Rep_nat_int i = {n})"

Output:
using card_1_singletonE card'.rep_eq
by fastforce


Input:
lemma bdd_below_is_intervalI: "bdd_below I"
  if "is_interval I" "a \<le> b" "a \<notin> I" "b \<in> I" for I::"real set"

Output: by (meson bdd_below_def is_interval_1 le_cases that)


Input: lemma repeat_subst_trm [simp]: "subst i u (subst i t trm) = subst i (subst i u t) trm"

Output: by (induct trm rule: trm.induct) auto


Input:
lemma echelon_form_upt_row_condition1_explicit_neg:
  assumes "echelon_form_upt_row A k"
  and iA: "\<not> is_zero_row i A" and ia_i: "ia < i"
  and i: "to_nat i < k"
  shows "\<not> is_zero_row ia A"

Output:
proof - have "to_nat ia < k"
by (metis ia_i i less_trans to_nat_mono) thus ?thesis
using assms unfolding echelon_form_upt_row_def
by blast
qed


Input:
lemma Example1_list:
 "\<parallel>- \<lbrace>n < length \<acute>A\<rbrace>
   COBEGIN
     SCHEME [0\<le>i<n] \<lbrace>n < length \<acute>A\<rbrace> \<acute>A:=\<acute>A[i:=0] \<lbrace>\<acute>A!i=0\<rbrace>
   COEND
    \<lbrace>\<forall>i < n. \<acute>A!i = 0\<rbrace>"

Output:
apply oghoare
apply force+ done


Input:
lemma under_succ[simp]:
assumes "aboveS i \<noteq> {}"
shows "under (succ i) = insert (succ i) (under i)"

Output:
using less_succ[OF assms] unfolding under_def
by auto


Input: lemma bdd_above_is_intervalI: "bdd_above I" if "is_interval I" "a \<le> b" "a \<in> I" "b \<notin> I" for I::"real set"

Output: by (meson bdd_above_def is_interval_1 le_cases that)


Input:
lemma stream_enc_cut_same:
  assumes "(\<forall>x \<in> set I. case x of Inr P \<Rightarrow> finite P | _ \<Rightarrow> True)"
  shows "stream_enc (w, I) = cut_same (any, replicate (length I) False) (stream_enc (w, I)) @-
    sconst (any, replicate (length I) False)"

Output:
unfolding cut_same_def
by (rule trans[OF sym[OF stake_sdrop] arg_cong2[of _ _ _ _ "(@-)", OF refl]]) (rule LeastI_ex[OF ex_Loop_stream_enc[OF assms]])


Input: lemma PiE_eq_singleton: "(\<Pi>\<^sub>E i\<in>I. S i) = {\<lambda>i\<in>I. f i} \<longleftrightarrow> (\<forall>i\<in>I. S i = {f i})"

Output: by (metis (mono_tags, lifting) PiE_eq PiE_singleton insert_not_empty restrict_apply' restrict_extensional)


Input: lemma mat_row_first_nth[simp]: "i < n \<Longrightarrow> row (mat_row_first A n) i = row A i"

Output:
unfolding mat_row_first_def row_def
by fastforce


Input:
lemma colossless_obsf_converter [simp]:
  "colossless_converter (exception_\<I> \<I>) \<I>' (obsf_converter conv)"

Output: by(coinduction arbitrary: conv)(auto split: option.split_asm)


Input:
lemma Ipoly_num_params_cong: "Ipoly xs p = Ipoly ys p"
  if "\<And>i. i < num_params p \<Longrightarrow> xs ! i = ys ! i"

Output:
using that
by (induction p; auto)


Input:
lemma (in prob_space) indep_vars_compose2:
  assumes "indep_vars M' X I"
  assumes rv: "\<And>i. i \<in> I \<Longrightarrow> Y i \<in> measurable (M' i) (N i)"
  shows "indep_vars N (\<lambda>i x. Y i (X i x)) I"

Output:
using indep_vars_compose [OF assms]
by (simp add: comp_def)


Input: lemma integrable_integral[intro]: "f integrable_on i \<Longrightarrow> (f has_integral (integral i f)) i"

Output:
unfolding integrable_on_def integral_def
by (metis (mono_tags, lifting) someI_ex)


Input:
lemma lift_SD_iff':
  "p \<in> lotteries_on alts \<Longrightarrow> q \<in> lotteries_on alts \<Longrightarrow> i \<in> agents' \<Longrightarrow>
     p \<preceq>[SD(R' i)] q \<longleftrightarrow> i \<notin> agents \<or> p \<preceq>[SD(R i)] q"

Output: by (cases "i \<in> agents") (simp_all add: lift_SD_iff)


Input:
lemma sum_Basis_sum_nth_Basis_list:
  "(\<Sum>i\<in>Basis. f i) = (\<Sum>i<DIM('a::executable_euclidean_space). f ((Basis_list::'a list) ! i))"

Output:
apply (rule sum.reindex_cong[OF _ _ refl])
apply (auto intro!: inj_on_nth)
by (metis Basis_list image_iff in_Basis_index_Basis_list index_less_size_conv length_Basis_list lessThan_iff)


Input:
lemma finite_part[simp]:
assumes "finite I" and "part I P"
shows "finite P"

Output:
using assms finite_UnionD unfolding part_def
by auto


Input:
lemma SUP_ereal_add_right:
  fixes c :: ereal
  shows "I \<noteq> {} \<Longrightarrow> c \<noteq> -\<infinity> \<Longrightarrow> (SUP i\<in>I. c + f i) = c + (SUP i\<in>I. f i)"

Output:
using SUP_ereal_add_left[of I c f]
by (simp add: add.commute)


Input: lemma inext_nth_closed: "I \<noteq> {} \<Longrightarrow> I \<rightarrow> n \<in> I"

Output:
apply (induct n)
apply (simp add: iMinI_ex2)
apply (simp add: inext_closed) done


Input:
lemma fbox_whilei_break:
  "d p \<le> |y] i \<Longrightarrow> d i \<cdot> ad t \<le> d q \<Longrightarrow> d i \<cdot> d t \<le> |x] i \<Longrightarrow> d p \<le> |y \<cdot> (while t do x inv i)] q"

Output:
apply (rule fbox_seq_var[OF _ fbox_whilei])
using fbox_simp
by auto \<comment> \<open> Finite iteration \<close>


Input:
lemma OrdInd2H:
  assumes "H \<turnstile> A(i::= Zero)"
      and "H \<turnstile> All i (OrdP (Var i) IMP A IMP (A(i::= SUCC (Var i))))"
    shows "insert (OrdP (Var i)) H \<turnstile> A"

Output: by (metis assms thin1 Assume OrdInd2)


Input:
lemma path_seg_simps[simp]:
  "j\<le>i \<Longrightarrow> path_seg p i j = {}"
  "path_seg p i (Suc i) = p!i"

Output:
unfolding path_seg_def
apply auto []
apply (auto simp: le_less_Suc_eq) [] done


Input:
lemma (in cf_discrete) cf_discrete_is_functor_cf_CId_selector_is_arr:
  assumes "i \<in>\<^sub>\<circ> I"
  shows "\<CC>\<lparr>CId\<rparr>\<lparr>F i\<rparr> : F i \<mapsto>\<^bsub>\<CC>\<^esub> F i"

Output:
using assms
by (meson cat_CId_is_arr' cf_discreteD(2) cf_discrete_axioms)


Input:
lemma ell2_norm_uminus:
  assumes "has_ell2_norm x"
  shows \<open>has_ell2_norm (\<lambda>i. - x i)\<close> and \<open>ell2_norm (\<lambda>i. - x i) = ell2_norm x\<close>

Output:
using assms
by (auto simp: has_ell2_norm_def ell2_norm_def)


Input:
lemma (in ring) cgenideal_self:
  assumes icarr: "i \<in> carrier R"
  shows "i \<in> PIdl i"

Output:
unfolding cgenideal_def
proof simp from icarr have "i = \<one> \<otimes> i"
by simp with icarr show "\<exists>x. i = x \<otimes> i \<and> x \<in> carrier R"
by fast
qed


Input:
lemma (in ring_closed) coeff_pCons_closed [intro]:
  assumes "\<And>i. poly.coeff p i \<in> A" "x \<in> A"
  shows   "poly.coeff (pCons x p) i \<in> A"

Output:
unfolding poly_altdef
using assms
by (auto simp: coeff_pCons split: nat.splits)


Input:
lemma take_upt_idx:
  assumes i: "i < length ls"
  shows "take i ls = [ ls ! j . j \<leftarrow> [0..<i]]"

Output:
proof - have e: "0 + i \<le> i"
by auto show ?thesis
using take_upt[OF e] take_map map_nth
by (metis (hide_lams, no_types) add.left_neutral i nat_less_le take_upt)
qed


Input: lemma sq_mtx_vec_mult_diag_axis: "(\<d>\<i>\<a>\<g> i. f i) *\<^sub>V (axis i k) = axis i (f i * k)"

Output:
unfolding sq_mtx_diag_vec_mult axis_def
by auto


Input:
lemma atLeastLessThan_impl_correct:
  "atLeastLessThan_impl a b \<le> SPEC (\<lambda>r. r = {a..<b::nat})"

Output:
unfolding atLeastLessThan_impl_def
apply (refine_rcg refine_vcg WHILET_rule[where I = "\<lambda>(i,r). r = {a..<i} \<and> a\<le>i \<and> ((a<b \<longrightarrow> i\<le>b) \<and> (\<not>a<b \<longrightarrow> i=a))" and R = "measure (\<lambda>(i,_). b - i)" ])
by auto


Input:
lemma rt_strictly_fresherI [intro]:
  assumes "rt1 \<sqsubseteq>\<^bsub>i\<^esub> rt2"
      and "\<not>(rt1 \<approx>\<^bsub>i\<^esub> rt2)"
    shows "rt1 \<sqsubset>\<^bsub>i\<^esub> rt2"

Output:
unfolding rt_strictly_fresher_def
using assms ..


Input:
lemma eq_\<I>_restrict_converter:
  assumes "\<I>,\<I>' \<turnstile>\<^sub>C cnv \<surd>"
    and "outs_\<I> \<I> \<subseteq> A"
  shows "\<I>,\<I>' \<turnstile>\<^sub>C restrict_converter A \<I>' cnv \<sim> cnv"

Output:
using assms(1)
by(coinduction arbitrary: cnv) (use assms(2) in \<open>auto intro!: eq_\<I>_gpv_reflI eq_\<I>_restrict_gpv simp add: eq_onp_def dest: WT_converterD\<close>)


Input:
lemma EqButGH_eqButGH[simp]:
assumes "env p = i" and "env p' = i'"
shows "sem (EqButGH p p') env = eqButGH i i'"

Output:
using assms finite_EqButGH unfolding EqButGH_def eqButGH_def sem_Scon[OF finite_EqButGH] image_def
by simp (metis (hide_lams, no_types) EqOnUC_eqOnUC)


Input:
lemma proj_list_Cons:
  "proj i ((ln i,d)#D) = (ln i,d)#proj i D"
  "proj i ((\<star>,d)#D) = (\<star>,d)#proj i D"
  "i \<noteq> j \<Longrightarrow> proj i ((ln j,d)#D) = proj i D"

Output:
unfolding List.insert_def proj_def
by auto


Input:
lemma AbstrLevels_S1_A12:
  assumes "sS1 \<in> AbstrLevel i"
  shows "sA12 \<notin> AbstrLevel i"

Output:
using assms
by (induct i, simp add: AbstrLevel0, simp add: AbstrLevel1, simp add: AbstrLevel2, simp add: AbstrLevel3)


Input: lemma eq_\<I>_gpv_into_rel_gpv: "eq_\<I>_gpv A \<I>_full gpv gpv' \<Longrightarrow> rel_gpv A (=) gpv gpv'"

Output: by(coinduction arbitrary: gpv gpv') (drule eq_\<I>_gpvD, auto elim: spmf_rel_mono_strong generat.rel_mono_strong dest: eq_\<I>_generat_into_rel_generat )


Input:
lemma wt_Push:
  "\<lbrakk> size ST < mxs; typeof v = Some T \<rbrakk>
  \<Longrightarrow> \<turnstile> [Push v],[] [::] [ty\<^sub>i' ST E A, ty\<^sub>i' (T#ST) E A]"

Output: by(simp add: ty\<^sub>i'_def wt_defs)


Input: lemma p_boundsI': "(\<Sum>i<k. as!i * bs!i powr x) < 1 \<and> (\<Sum>i<k. as!i * bs!i powr y) > 1 \<Longrightarrow> p \<in> {y<..<x}"

Output: by (elim conjE, drule p_lessI, drule p_greaterI, simp)


Input:
lemma check'_cases:
  assumes "\<And> I. \<lbrakk>min_rvar_incdec dir s x\<^sub>i = Inl I; check' dir x\<^sub>i s = set_unsat I s\<rbrakk> \<Longrightarrow> P (set_unsat I s)"
  assumes "\<And> x\<^sub>j l\<^sub>i. \<lbrakk>min_rvar_incdec dir s x\<^sub>i = Inr x\<^sub>j;
           l\<^sub>i = the (LB dir s x\<^sub>i);
           check' dir x\<^sub>i s = pivot_and_update x\<^sub>i x\<^sub>j l\<^sub>i s\<rbrakk> \<Longrightarrow>
        P (pivot_and_update x\<^sub>i x\<^sub>j l\<^sub>i s)"
  shows "P (check' dir x\<^sub>i s)"

Output:
using assms unfolding check'_def
by (cases "min_rvar_incdec dir s x\<^sub>i", auto)


Input:
lemma
  iNextStrong_True: "(\<circle>\<^sub>S t t0 I. True) = (I \<down>> t0 \<noteq> {} \<and> t0 \<in> I)" and
  iNextWeak_False: "(\<not> (\<circle>\<^sub>W t t0 I. False)) = (I \<down>> t0 \<noteq> {} \<and> t0 \<in> I)"

Output: by (simp_all add: iTL_defs ex_in_conv inext_singleton_cut_greater_not_empty_iff)


Input:
lemma upper_asymptotic_density_finite_Union:
  assumes "finite I"
  shows "upper_asymptotic_density (\<Union>i\<in>I. A i) \<le> (\<Sum>i\<in>I. upper_asymptotic_density (A i))"

Output:
using assms
apply (induction I rule: finite_induct)
using order_trans[OF upper_asymptotic_density_union]
by auto


Input:
lemma (in TC2) wt_IfFalse:
  "\<lbrakk> 2 \<le> i; nat i < size \<tau>s + 2; P \<turnstile> ty\<^sub>i' ST E A \<le>' \<tau>s ! nat(i - 2) \<rbrakk>
  \<Longrightarrow> \<turnstile> [IfFalse i],[] [::] ty\<^sub>i' (Boolean # ST) E A # ty\<^sub>i' ST E A # \<tau>s"

Output: by(simp add: ty\<^sub>i'_def wt_defs eval_nat_numeral nat_diff_distrib)


Input:
lemma (in prob_space) indep_vars_cong:
  "I = J \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> X i = Y i) \<Longrightarrow> (\<And>i. i \<in> I \<Longrightarrow> M' i = N' i) \<Longrightarrow> indep_vars M' X I \<longleftrightarrow> indep_vars N' Y J"

Output:
unfolding indep_vars_def2
by (intro conj_cong indep_sets_cong) auto


Input:
lemma rref_condition2:
  assumes r: "reduced_row_echelon_form A"
  shows " (\<forall>i. \<not> (is_zero_row i A) \<longrightarrow> A $ i $ (LEAST k. A $ i $ k \<noteq> 0) = 1)"

Output:
using r unfolding reduced_row_echelon_form_def'
by simp


Input:
lemma CAS_\<tau>red1t_xt2:
  "\<tau>red1gt uf P t h (e, xs) (e', xs') \<Longrightarrow> \<tau>red1gt uf P t h (Val v\<bullet>compareAndSwap(D\<bullet>F, e, e3), xs) (Val v\<bullet>compareAndSwap(D\<bullet>F, e', e3), xs')"

Output: by(induct rule: tranclp_induct2)(auto intro: tranclp.trancl_into_trancl CAS1Red2)


Input:
lemma InstanceOf_\<tau>ExectI:
  "\<tau>Exec_movet ci P t e h s s' \<Longrightarrow> \<tau>Exec_movet ci P t (e instanceof T) h s s'"

Output: by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl InstanceOf_\<tau>execI)+


Input:
lemma NewArray_\<tau>ExectI:
  "\<tau>Exec_movet ci P t e h s s' \<Longrightarrow> \<tau>Exec_movet ci P t (newA T\<lfloor>e\<rceil>) h s s'"

Output: by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl NewArray_\<tau>execI)+


Input: lemma OclNotEmpty_infinite: "\<tau> \<Turnstile> \<delta> X \<Longrightarrow> \<not> finite (Rep_Bag_base X \<tau>) \<Longrightarrow> \<not> \<tau> \<Turnstile> \<delta> (X->notEmpty\<^sub>B\<^sub>a\<^sub>g())"

Output:
apply(simp add: OclNotEmpty_def)
apply(drule OclIsEmpty_infinite, simp)
by (metis OclNot_defargs OclNot_not foundation6 foundation9)


Input:
lemma \<tau>reds1t_map_Val_Throw:
  "\<tau>reds1gt uf P t h (map Val vs @ Throw a # es, xs) s' \<longleftrightarrow> False"
  (is "?lhs \<longleftrightarrow> ?rhs")

Output:
proof assume ?lhs thus ?rhs
by induct auto
qed auto


Input:
lemma b_of_subst_bv:
  "(b_of \<tau>)[x::=v]\<^sub>b\<^sub>b = b_of (\<tau>[x::=v]\<^sub>\<tau>\<^sub>b)"

Output:
proof - obtain z b c where *:"\<tau> = \<lbrace> z : b | c \<rbrace> \<and> atom z \<sharp> (x,v)"
using obtain_fresh_z
by metis thus ?thesis
using subst_tv.simps *
by auto
qed


Input:
lemma wt_Goto:
 "\<lbrakk> 0 \<le> int pc + i; nat (int pc + i) < size \<tau>s; size \<tau>s \<le> mpc;
    P \<turnstile> \<tau>s!pc \<le>' \<tau>s ! nat (int pc + i) \<rbrakk>
 \<Longrightarrow> P,T,mxs,mpc,[] \<turnstile> Goto i,pc :: \<tau>s"

Output: by(clarsimp simp add: TC2.wt_defs)


Input:
lemma \<tau>exec_movesE:
  assumes "\<tau>exec_moves ci P t es h (stk, loc, pc, xcp) s'"
  obtains "exec_moves ci P t es h (stk, loc, pc, xcp) \<epsilon> h s'" "\<tau>moves2 P h stk es pc xcp"

Output:
using assms
by(simp add: \<tau>exec_moves_def)


Input:
lemma hcomp_ide_cod [simp]:
  assumes "natural_transformation A B F G \<tau>"
  shows "(identity_functor.map B) o \<tau> = \<tau>"

Output:
proof - interpret \<tau>: natural_transformation A B F G \<tau>
using assms
by auto show "\<tau>.B.map o \<tau> = \<tau>"
using \<tau>.B.map_def \<tau>.is_extensional
by auto
qed


Input:
lemma AAss_\<tau>execI2:
  "\<tau>exec_move ci P t e' h (stk, loc, pc, xcp) (stk', loc', pc', xcp')
  \<Longrightarrow> \<tau>exec_move ci P t (e\<lfloor>e'\<rceil> := e'') h ((stk @ [v]), loc, (length (compE2 e) + pc), xcp) ((stk' @ [v]), loc', (length (compE2 e) + pc'), xcp')"

Output: by(blast elim: \<tau>exec_moveE intro: \<tau>exec_moveI \<tau>move2_\<tau>moves2.intros exec_move_AAssI2 \<tau>move2_stk_append)


Input:
lemma \<tau>reds0r_map_Val:
  "\<tau>reds0r extTA P t h (map Val vs, xs) s' \<longleftrightarrow> s' = (map Val vs, xs)"

Output:
proof assume "\<tau>reds0r extTA P t h (map Val vs, xs) s'" thus "s' = (map Val vs, xs)"
by induct auto
qed auto


Input:
lemma Cond_\<tau>execI3:
  "\<tau>exec_move ci P t e'' h (stk, loc, pc, xcp) (stk', loc', pc', xcp')
  \<Longrightarrow> \<tau>exec_move ci P t (if (e) e' else e'') h (stk, loc, Suc (Suc (length (compE2 e) + length (compE2 e') + pc)), xcp) (stk', loc', Suc (Suc (length (compE2 e) + length (compE2 e') + pc')), xcp')"

Output: by(blast elim: \<tau>exec_moveE intro: \<tau>exec_moveI \<tau>move2_\<tau>moves2.intros exec_move_CondI3)


Input:
lemma \<tau>Red0_conv [iff]:
  "\<tau>Red0 P t h (e, es) (e', es') = (P,t \<turnstile>0 \<langle>e/es, h\<rangle> -\<epsilon>\<rightarrow> \<langle>e'/es', h\<rangle> \<and> \<tau>Move0 P h (e, es))"

Output: by(simp add: \<tau>Red0_def)


Input:
lemma ALength_\<tau>ExecrI:
  "\<tau>Exec_mover ci P t e h s s' \<Longrightarrow> \<tau>Exec_mover ci P t (e\<bullet>length) h s s'"

Output: by(induct rule: rtranclp_induct)(blast intro: rtranclp.rtrancl_into_rtrancl ALength_\<tau>execI)+


Input:
lemma type_less_x_OclAny [elim!]:
  "\<tau> < OclAny \<Longrightarrow>
   (\<tau> = OclVoid \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = Boolean \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = Integer \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = UnlimitedNatural \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = Real \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = String \<Longrightarrow> P) \<Longrightarrow>
   (\<And>\<E>. \<tau> = Enum \<E> \<Longrightarrow> P) \<Longrightarrow>
   (\<And>\<C>. \<tau> = \<langle>\<C>\<rangle>\<^sub>\<T> \<Longrightarrow> P) \<Longrightarrow> P"

Output:
unfolding less_basic_type_def
by (induct rule: converse_tranclp_induct; auto)


Input:
lemma Sync_\<tau>red1r_xt:
  "\<tau>red1gr uf P t h (e, xs) (e', xs') \<Longrightarrow> \<tau>red1gr uf P t h (sync\<^bsub>V\<^esub> (e) e2, xs) (sync\<^bsub>V\<^esub> (e') e2, xs')"

Output: by(induct rule: rtranclp_induct2)(auto intro: rtranclp.rtrancl_into_rtrancl Synchronized1Red1 \<tau>move1Sync)


Input:
lemma instInp_0:
assumes \<tau>: "\<tau> \<in> ptrm (Suc 0)" and "t \<in> trm" and "FvarsT t = {}"
shows "instInp \<tau> t \<in> ptrm 0"

Output:
using assms
by (intro instInp) auto


Input:
lemma While_\<tau>ExectI1:
  "\<tau>Exec_movet ci P t c h s s' \<Longrightarrow> \<tau>Exec_movet ci P t (while (c) e) h s s'"

Output: by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl While_\<tau>execI1)+


Input:
lemma type_less_eq_x_Tuple_intro [intro]:
  "\<tau> = Tuple \<pi> \<Longrightarrow> subtuple (\<le>) \<pi> \<xi> \<Longrightarrow> \<tau> \<le> Tuple \<xi>"

Output:
using dual_order.strict_iff_order
by blast


Input:
lemma Block_\<tau>ExectI_None:
  "\<tau>Exec_movet ci P t e h s s' \<Longrightarrow> \<tau>Exec_movet ci P t {V:T=None; e} h s s'"

Output: by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl Block_\<tau>execI_None)+


Input: lemma \<tau>red1t_inj_\<tau>reds1t: "\<tau>red1gt uf P t h (e, xs) (e', xs') \<Longrightarrow> \<tau>reds1gt uf P t h (e # es, xs) (e' # es, xs')"

Output: by(induct rule: tranclp_induct2)(auto intro: tranclp.trancl_into_trancl List1Red1 \<tau>moves1Hd)


Input:
lemma Cond_\<tau>red1t_xt:
  "\<tau>red1gt uf P t h (e, xs) (e', xs') \<Longrightarrow> \<tau>red1gt uf P t h (if (e) e1 else e2, xs) (if (e') e1 else e2, xs')"

Output: by(induct rule: tranclp_induct2)(auto intro: tranclp.trancl_into_trancl Cond1Red \<tau>move1Cond)


Input:
lemma Cond_\<tau>ExectI1:
  "\<tau>Exec_movet ci P t e h s s' \<Longrightarrow> \<tau>Exec_movet ci P t (if (e) e1 else e2) h s s'"

Output: by(induct rule: tranclp_induct)(blast intro: tranclp.trancl_into_trancl Cond_\<tau>execI1)+


Input:
lemma proposition3_4:
assumes t: "trans r" and i: "irrefl r" and ld: "LD' r \<beta> \<alpha> \<sigma>1 \<sigma>2 \<sigma>3 \<tau>1 \<tau>2 \<tau>3"
shows "D r [\<beta>] [\<alpha>] (\<sigma>1@\<sigma>2@\<sigma>3) (\<tau>1@\<tau>2@\<tau>3)"

Output:
using proposition3_4_step[OF t i] ld unfolding LD'_def D[OF assms(1,2)] dl_def dm_def
by auto


Input:
lemma \<tau>red0t_dom_lcl:
  assumes wwf: "wwf_J_prog P"
  shows "\<tau>red0t extTA P t h (e, xs) (e', xs') \<Longrightarrow> dom xs' \<subseteq> dom xs \<union> fv e"

Output: by(rule \<tau>red0r_dom_lcl[OF wwf])(rule tranclp_into_rtranclp)


Input:
lemma \<tau>reds1t_1step:
  "\<lbrakk> uf,P,t \<turnstile>1 \<langle>es, (h, xs)\<rangle> [-\<epsilon>\<rightarrow>] \<langle>es', (h, xs')\<rangle>; \<tau>moves1 P h es \<rbrakk>
  \<Longrightarrow> \<tau>reds1gt uf P t h (es, xs) (es', xs')"

Output: by(blast intro: tranclp.r_into_trancl)


Input:
lemma Cond_\<tau>ExecrI3:
  "\<tau>Exec_mover ci P t e2  h (stk, loc ,pc, xcp) (stk', loc', pc', xcp') \<Longrightarrow>
   \<tau>Exec_mover ci P t (if (e) e1 else e2)  h (stk, loc, (Suc (Suc (length (compE2 e) + length (compE2 e1) + pc))), xcp)  (stk', loc', (Suc (Suc (length (compE2 e) + length (compE2 e1) + pc'))), xcp')"

Output: by(induct rule: \<tau>Execr_induct)(blast intro: rtranclp.rtrancl_into_rtrancl Cond_\<tau>execI3)+


Input:
lemma type_less_eq_x_OclAny [elim!]:
  "\<tau> \<le> OclAny \<Longrightarrow>
   (\<tau> = OclVoid \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = OclAny \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = Boolean \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = Integer \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = UnlimitedNatural \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = Real \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = String \<Longrightarrow> P) \<Longrightarrow>
   (\<And>\<E>. \<tau> = Enum \<E> \<Longrightarrow> P) \<Longrightarrow>
   (\<And>\<C>. \<tau> = \<langle>\<C>\<rangle>\<^sub>\<T> \<Longrightarrow> P) \<Longrightarrow> P"

Output: by (drule le_imp_less_or_eq; auto)


Input:
lemma ltl_\<tau>inf_step2\<tau>inf_step_table [simp]:
  "\<not> lNone tls \<Longrightarrow> ltl (\<tau>inf_step2\<tau>inf_step_table s tls) =
  (let (s', s'') = SOME (s', s''). s -\<tau>\<rightarrow>* s' \<and> s' -lhd tls\<rightarrow> s'' \<and> \<not> \<tau>move s' (lhd tls) s'' \<and> s'' -\<tau>-ltl tls\<rightarrow>* \<infinity>
  in \<tau>inf_step2\<tau>inf_step_table s'' (ltl tls))"

Output:
unfolding \<tau>inf_step2\<tau>inf_step_table_def Let_def
by(simp add: split_beta)


Input:
lemma down_cast_type':
assumes isOclAny: "\<tau> \<Turnstile> (X::OclAny) .oclIsTypeOf(OclAny)"
and     non_None: "\<tau> \<Turnstile> (\<delta> X)"
shows             "\<tau> \<Turnstile> not (\<upsilon> (X .oclAsType(Person)))"

Output: by(rule foundation15[THEN iffD1], simp add: down_cast_type[OF assms])


Input:
lemma \<tau>Exec_movet_\<tau>Exec_metht:
  "\<tau>Exec_movet ci P t e = \<tau>Exec_metht ci (compP2 P) (compE2 e) (compxE2 e 0 0) t"

Output: by(simp only: \<tau>exec_move_conv_\<tau>exec_meth)


Input:
lemma type_less_x_Integer [elim!]:
  "\<tau> < Integer \<Longrightarrow>
   (\<tau> = OclVoid \<Longrightarrow> P) \<Longrightarrow>
   (\<tau> = UnlimitedNatural \<Longrightarrow> P) \<Longrightarrow> P"

Output:
unfolding less_basic_type_def
by (induct rule: converse_tranclp_induct; auto)


Input:
lemma BinOp_\<tau>red0r_xt1:
  "\<tau>red0r extTA P t h (e1, xs) (e1', xs') \<Longrightarrow> \<tau>red0r extTA P t h (e1 \<guillemotleft>bop\<guillemotright> e2, xs) (e1' \<guillemotleft>bop\<guillemotright> e2, xs')"

Output: by(induct rule: rtranclp_induct2)(auto intro: rtranclp.rtrancl_into_rtrancl BinOpRed1)


Input:
lemma Cond_\<tau>ExecrI1:
  "\<tau>Exec_mover ci P t e h s s' \<Longrightarrow> \<tau>Exec_mover ci P t (if (e) e1 else e2) h s s'"

Output: by(induct rule: rtranclp_induct)(blast intro: rtranclp.rtrancl_into_rtrancl Cond_\<tau>execI1)+


Input:
lemma NewArray_\<tau>red0r_xt:
  "\<tau>red0r extTA P t h (e, xs) (e', xs') \<Longrightarrow> \<tau>red0r extTA P t h (newA T\<lfloor>e\<rceil>, xs) (newA T\<lfloor>e'\<rceil>, xs')"

Output: by(induct rule: rtranclp_induct2)(auto intro: rtranclp.rtrancl_into_rtrancl NewArrayRed)


Input:
lemma match_ex_table_eq_NoneI [simp]:
  "\<forall>x \<in> set xtab. \<not> matches_ex_entry P C pc x \<Longrightarrow>
  match_ex_table P C pc xtab = None"

Output:
using match_ex_table_app[where ?xt = "[]"]
by fastforce


Input:
lemma pred_gpv'_mono' [mono]:
  "pred_gpv' A C R gpv \<longrightarrow> pred_gpv' A' C' R gpv"
  if "\<And>x. A x \<longrightarrow> A' x" "\<And>x. C x \<longrightarrow> C' x"

Output:
using that unfolding pred_gpv'.simps
by auto


Input: lemma is_ground_cls_mono: "C \<subseteq># D \<Longrightarrow> is_ground_cls D \<Longrightarrow> is_ground_cls C"

Output:
unfolding is_ground_cls_def
by (metis set_mset_mono subsetD)


Input:
lemma subcls1D:
  "P \<turnstile> C \<prec>\<^sup>1 D \<Longrightarrow> \<exists>fs ms Bs. (class P C = Some (Bs,fs,ms)) \<and> (D \<in> baseClasses Bs)"

Output: by(auto elim: subcls1.cases)


Input: theorem iter_unfold: "c\<^sup>\<omega> = nil \<sqinter> c;c\<^sup>\<omega>"

Output:
using iter_def iter_step_mono lfp_unfold
by auto


Input:
lemma redundancy_and_semantics :
  assumes "redundant C S"
  assumes "validate_formula I S"
  shows "validate_clause I C"

Output: by (meson assms redundant_def subsumption_and_semantics tautologies_are_valid validate_formula.elims)


Input:
lemma rbt_comp_minus: assumes c: "comparator c"
  shows "rbt_comp_minus c = ord.rbt_minus (lt_of_comp c)"

Output: by (intro ext, unfold rbt_comp_minus_def ord.rbt_minus_def, auto simp: rbt_comp_simps[OF c])


Input:
lemma CConcEnd2[rule_format]:
  "x \<in> dom (C a) \<longrightarrow> C (list2FWpolicy (xs @ [a])) x = C a x"  (is "?P xs")

Output:
apply (rule_tac P = ?P in list2FWpolicy.induct)
by (auto simp:C.simps)


Input:
lemma hn_refine_nofailI:
  assumes "nofail a \<Longrightarrow> hn_refine \<Gamma> c \<Gamma>' R a"
  shows "hn_refine \<Gamma> c \<Gamma>' R a"

Output:
using assms
by (auto simp: hn_refine_def)


Input:
lemma wt_jvm_prog_impl_wt_instr:
  "\<lbrakk> wf_jvm_prog\<^bsub>\<Phi>\<^esub> P;
      P \<turnstile> C sees M:Ts \<rightarrow> T = \<lfloor>(mxs,mxl\<^sub>0,ins,xt)\<rfloor> in C; pc < size ins \<rbrakk>
  \<Longrightarrow> P,T,mxs,size ins,xt \<turnstile> ins!pc,pc :: \<Phi> C M"

Output:
apply (unfold wf_jvm_prog_phi_def)
apply (drule (1) sees_wf_mdecl)
apply (simp add: wf_mdecl_def wt_method_def) done


Input:
lemma class_wf:
  "\<lbrakk>class P C = Some c; wf_prog wf_md P\<rbrakk> \<Longrightarrow> wf_cdecl wf_md P (C,c)"

Output:
apply (unfold wf_prog_def class_def)
apply (fast dest: map_of_SomeD) done


Input:
lemma new_subc_put':
  \<open>new_term c s \<Longrightarrow> subc_term c s (substt t u m) = subc_term c s (substt t (subc_term c s u) m)\<close>
  \<open>new_term c s \<Longrightarrow> subc_list c s (substts l u m) = subc_list c s (substts l (subc_term c s u) m)\<close>

Output: by (induct t and l rule: subc_term.induct subc_list.induct) simp_all


Input:
lemma aform_err_leI:
  "y \<in> aform_err e (c, d)"
  if "y \<in> aform_err e (c, d')" "d' \<le> d"

Output:
using that
by (auto simp: aform_err_def)


Input:
lemma filterlim_int_sequentially [tendsto_intros]:
  "filterlim int at_top sequentially"

Output:
unfolding filterlim_at_top
proof fix C :: int show "eventually (\<lambda>n. int n \<ge> C) at_top"
using eventually_ge_at_top[of "nat \<lceil>C\<rceil>"]
by eventually_elim linarith
qed


Input:
lemma f2: "foo outs_gpv outs_gpv gpv gpv' C C' \<Longrightarrow>
       x \<in> set_spmf (the_gpv gpv) \<Longrightarrow> y \<in> set_spmf (the_gpv gpv') \<Longrightarrow>
       a \<in> generat_conts x \<Longrightarrow> b \<in> generat_conts y \<Longrightarrow> R' a' \<alpha> \<Longrightarrow> R' \<beta> b' \<Longrightarrow>
    foo outs_gpv outs_gpv (a a') (b b') C C'"

Output: by (fastforce elim: generat.set_cases intro: outs_gpv.Cont)


Input:
lemma identity_rules_mono:
  assumes "C\<^sub>1 \<subseteq> C\<^sub>2"
  shows "identity_rules C\<^sub>1 \<subseteq> identity_rules C\<^sub>2"

Output:
using assms unfolding identity_rules_def
by auto


Input: lemma compP2_has_method [simp]: "compP2 P \<turnstile> C has M \<longleftrightarrow> P \<turnstile> C has M"

Output: by(auto simp add: compP2_def compP_has_method)


Input:
lemma sees_field_decl_above:
  "P \<turnstile> C sees F:T in D \<Longrightarrow> P \<turnstile> C \<preceq>\<^sup>* D"

Output:
apply(auto simp:sees_field_def)
apply(blast intro: has_fields_decl_above map_of_SomeD map_of_remap_SomeD) done


Input:
lemma F_is_essentially_surjective:
    shows "essentially_surjective_functor D C F"

Output:
using GF.G_is_essentially_surjective
by simp


Input:
lemma poly_shift_times_monom:
  "poly_shift n (monom c n * p) = smult c p"

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


Input:
lemma correctCompositionKeys_subcomp1:
assumes "correctCompositionKeys C"
        and "x \<in> subcomponents C"
        and "xb \<in> specKeys C"
shows "\<exists> x \<in> subcomponents C. (xb \<in> specKeys x)"

Output:
using assms
by (simp add: correctCompositionKeys_def, auto)


Input:
lemma subseteq_guards_While:
  "\<exists>c''. c=While b c'' \<and> (c'' \<subseteq>\<^sub>g c')" if "c \<subseteq>\<^sub>g While b c'"

Output:
using that
by cases simp


Input:
lemma covering_space_locally_path_connected:
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
  assumes "locally path_connected C" "covering_space C p S"
  shows "locally path_connected S"

Output:
using assms covering_space_locally_path_connected_eq
by blast


Input:
lemma HomContraMor:
  assumes "LSCategory C" and "f \<in> Mor C"
  shows "(Hom\<^bsub>C\<^esub>[\<midarrow>,X]) ## f = HomC\<^bsub>C\<^esub>[f,X]"

Output: by(simp add: HomFtorContra_def HomFtorContra'_def MakeFtor_def assms OppositeCategory_def)


Input:
lemma gtrp_preserve:
  assumes A: "((s,c),w,(s',c'))\<in>trcl (gtrp T)"
  and INIT: "P (add_mset s c)"
  and PRES: "!!s c s' c' e. \<lbrakk>P (add_mset s c); ((s,c),e,(s',c'))\<in>T\<rbrakk>
                            \<Longrightarrow> P (add_mset s' c')"
  shows "P (add_mset s' c')"

Output:
proof - from gtr_preserve[OF gtrp2gtr[OF A], where P=P, OF INIT] PRES show "P (add_mset s' c')"
by blast
qed


Input: lemma HomFtorContraDom: "CatDom (Hom\<^bsub>C\<^esub>[\<midarrow>,X]) = Op C"

Output: by(simp add: HomFtorContra_def HomFtorContra'_def MakeFtor_def)


Input:
lemma modelAppendTautology:
assumes
  "model valuation F" "clauseTautology c"
  "vars valuation \<supseteq> vars F \<union> vars c"
shows
  "model valuation (F @ [c])"

Output:
using assms
using tautologyInTotalValuation[of "c" "valuation"]
by (auto simp add: formulaTrueAppend)


Input:
lemma find_closest_pair_eq_val_find_closest_pair_tm:
  "val (find_closest_pair_tm (c\<^sub>0, c\<^sub>1) ps) = find_closest_pair (c\<^sub>0, c\<^sub>1) ps"

Output: by (induction "(c\<^sub>0, c\<^sub>1)" ps arbitrary: c\<^sub>0 c\<^sub>1 rule: find_closest_pair.induct) (auto simp: Let_def find_closest_bf_eq_val_find_closest_bf_tm take_eq_val_take_tm)


Input:
lemma exec_Suc:
  "\<lbrakk> P \<turnstile> c \<rightarrow> c'; P \<turnstile> c' \<rightarrow>^n c'' \<rbrakk> \<Longrightarrow> P \<turnstile> c \<rightarrow>^(Suc n) c''"

Output: by (fastforce simp del: split_paired_Ex)


Input:
lemma essential_classD2:
  "essential_class C \<Longrightarrow> x \<in> C \<Longrightarrow> (x, y) \<in> acc \<Longrightarrow> y \<in> C"

Output:
unfolding essential_class_def
by auto


Input: lemma rassocl_inverse: "lassocr\<^sub>C \<odot> rassocl\<^sub>C = 1\<^sub>C"

Output:
unfolding rassocl\<^sub>C_def lassocr\<^sub>C_def
apply(simp add: comp_converter_map1_out comp_converter_map_converter2 comp_converter_id_right)
apply(subst map_converter_id_move_right)
apply(simp add: o_def id_def[symmetric]) done


Input:
lemma replace_in_g_dist:
  assumes "x' \<noteq> x"
  shows "replace_in_g ((x, b,c) #\<^sub>\<Gamma> G) x' c'' = ((x, b,c) #\<^sub>\<Gamma> (replace_in_g G x' c''))"

Output:
using replace_in_g.simps assms
by presburger


Input: lemma iter_isolate2: "c;c\<^sup>\<star>;d \<sqinter> c\<^sup>\<infinity> = c;c\<^sup>\<omega>;d"

Output: by (metis infiter_unfold iter_isolate seq_assoc seq_inf_distrib)


Input:
lemma (in object_model) attribute_closest:
  "attribute \<C> attr \<D> \<tau> \<Longrightarrow>
   owned_attribute \<D>' attr \<tau> \<Longrightarrow>
   \<C> \<le> \<D>' \<Longrightarrow> \<not> \<D>' < \<D>"

Output: by (meson attribute_not_closest.intros closest_attribute.cases unique_closest_attribute.cases)


Input:
lemma eventually_nonzero_const [eventually_nonzero_simps]:
  "eventually_nonzero F (\<lambda>_::_::linorder. c) \<longleftrightarrow> F = bot \<or> c \<noteq> 0"

Output:
unfolding eventually_nonzero_def
by (auto simp add: eventually_False)


Input: lemma pw_INF_nofail [refine_pw_simps]: "nofail (Inf (f ` C)) \<longleftrightarrow> (\<exists>x\<in>C. nofail (f x))"

Output:
using pw_Inf_nofail [of "f ` C"]
by simp


Input:
lemma eval_Fields_conv:
  "Predicate.eval (Fields_i_i_o P C) = (\<lambda>FDTs. P \<turnstile> C has_fields FDTs)"

Output: by(auto intro: Fields_i_i_oI elim: Fields_i_i_oE intro!: ext)


Input:
lemma system_components_to_blp:
      "(\<not> trusted SINVAR_BLPtrusted.default_node_properties \<longrightarrow>
       security_level (system_components_to_blp c) \<le> security_level SINVAR_BLPtrusted.default_node_properties)
       \<longleftrightarrow>
       c = SystemBoundaryOutput \<or> c = SystemBoundaryInputOutput"

Output: by(cases c)(simp_all add: SINVAR_BLPtrusted.default_node_properties_def)


Input:
lemma class_add_classes_above:
assumes ns: "\<not> is_class P C" and "\<not>P \<turnstile> D \<preceq>\<^sup>* C"
shows "classes_above (class_add P (C, cdec)) D = classes_above P D"

Output:
using assms
by(auto intro: class_add_subcls class_add_subcls_rev)


Input:
lemma
BisT_matchC_TMC_rev: "\<And> c d. c \<approx>T d \<Longrightarrow> matchC_TMC BisT d c"
and
BisT_matchT_TMT_rev: "\<And> c d. c \<approx>T d \<Longrightarrow> matchT_TMT d c"

Output:
using BisT_step BisT_sym unfolding sym_def
by blast+


Input:
lemma cons_cluster_has_ne_slices:
  assumes "is_cons_cluster C" and "p\<in>C"
    and "Sl \<in> slices p"
  shows "Sl \<noteq> {}"

Output:
using assms unfolding is_cons_cluster_def quorum_of_set_def quorum_of_def quorum_def
by (metis empty_iff inf_bot_left inf_bot_right subset_refl)


Input:
theorem closest_pair_dist:
  assumes "1 < length ps" "distinct ps" "(c\<^sub>0, c\<^sub>1) = closest_pair ps"
  shows "sparse (dist c\<^sub>0 c\<^sub>1) (set ps)"

Output:
using assms closest_pair_rec_dist[of "mergesort fst ps"] closest_pair_rec_c0_c1[of "mergesort fst ps"]
by (auto simp: sorted_fst_def mergesort closest_pair_simps split: prod.splits)


Input: lemma produces_imp_Max_literal: "produces C A \<Longrightarrow> A = atm_of (Max_mset C)"

Output:
using productive_imp_produces_Max_literal
by auto


Input: lemma mem_closed_if_AE_lebesgue: "closed C \<Longrightarrow> (AE x in lebesgue. x \<in> C) \<Longrightarrow> x \<in> C"

Output:
using mem_closed_if_AE_lebesgue_open[OF open_UNIV]
by simp


Input: lemma less_eq_Max_atms_of: "C \<noteq> {#} \<Longrightarrow> C \<le> D \<Longrightarrow> Max (atms_of C) \<le> Max (atms_of D)"

Output:
unfolding atms_of_def
by (metis Max_atm_of_set_mset_commute leq_imp_less_eq_atm_of less_eq_Max_lit less_eq_multiset_empty_right)


Input: lemma subcls1I: "\<lbrakk>class C = Some m; super m = D; C \<noteq> Object\<rbrakk> \<Longrightarrow> C\<prec>C1D"

Output:
apply (unfold subcls1_def)
apply auto done


Input: lemma producesD: "produces C A \<Longrightarrow> C \<in> N \<and> C \<noteq> {#} \<and> Pos A = Max_mset C \<and> \<not> interp C \<Turnstile> C \<and> S C = {#}"

Output:
unfolding production_unfold
by auto


Input:
lemma lcr_trans_l:
  assumes "locally_compatible_r R1 R2 (A + B) (C + D) (E + F)"
  shows "locally_compatible_r R1 R2 A C E"

Output:
using assms[unfolded locally_compatible_r_def, rule_format] unfolding locally_compatible_r_def
by auto


Input:
lemma not_subtypes_aux:
  assumes "CT \<turnstile> C <: Da"
  and "C \<noteq> Da"
  and "CT C = Some CDef"
  and "cSuper CDef = D"
  shows "CT \<turnstile> D <: Da"

Output:
using assms
by (induct rule:subtyping.induct) (auto intro:subtyping.intros)


Input:
lemma classes_above_has_field2:
 "\<lbrakk> classes_above P C \<inter> classes_changed P P' = {};
     P' \<turnstile> C has F,b:t in C' \<rbrakk>
  \<Longrightarrow> P \<turnstile> C has F,b:t in C'"

Output: by(auto intro: classes_above_has_field dest: classes_above_classes_changed_sym)


Input:
lemma poincare_map_in_planeI:
  assumes "returns_to (plane n c) x0"
  shows "poincare_map (plane n c) x0 \<bullet> n = c"

Output:
using poincare_map_returns[OF assms]
by fastforce


Input:
lemma collinear_inv_rotation:
  assumes "collinear (Ax, Ay) (Bx, By) (Cx, Cy)" and "c\<^sup>2 + s\<^sup>2 = 1"
  shows "collinear (Ax * c - Ay * s, Ay * c + Ax * s)
    (Bx * c - By * s, By * c + Bx * s) (Cx * c - Cy * s, Cy * c + Cx * s)"

Output:
using assms
by (algebra add: collinear_def split_def fst_conv snd_conv)


Input:
lemma lin_minus:
  assumes "locally_included R1 R2 A C"
  shows "locally_included R1 R2 (A - B) (C - D)"

Output:
using assms unfolding locally_included_def
by (meson in_diffD)


Input:
lemma (in PolynRg) pol_SOME_2:"p \<in> carrier R \<Longrightarrow>
         pol_coeff S (SOME c. cf_sol R S X p c) \<and>
           p = polyn_expr R X (fst (SOME c. cf_sol R S X p c))
                                      (SOME c. cf_sol R S X p c)"

Output:
apply (frule pol_SOME_1[of p])
apply (simp add:cf_sol_def) done


Input: lemma widen_Class_Class [iff]: "(G\<turnstile>Class C\<preceq> Class D) = (G\<turnstile>C\<preceq>C D)"

Output:
apply (rule iffI)
apply (ind_cases "G\<turnstile>Class C \<preceq> Class D")
apply (auto elim: widen.subcls) done


Input:
lemma Scheduler_L4:
assumes "Scheduler C activation"
       and "(t mod cycleLength C) mem (schedule C)"
shows "activation t = [t mod cycleLength C]"

Output:
using assms
by (simp add: Scheduler_def Let_def)


Input:
lemma stable_constrains_Un:
    "[| F \<in> stable C; F \<in> A co (C \<union> A') |] ==> F \<in> (C \<union> A) co (C \<union> A')"

Output: by (unfold stable_def constrains_def, blast)


Input:
lemma singleDSourceLoop:
  assumes "DAcc i C = {S}"
         and "DAcc i S = {C}"
  shows "\<forall> Z \<in> (AbstrLevel i). (Z \<noteq> S \<and> Z \<noteq> C \<longrightarrow> C \<notin> (Sources i Z))"

Output:
using assms
by (metis AccSigleLoop Acc_SourcesNOT empty_iff insert_iff)


Input:
lemma If_starD: "(IF b THEN c1 ELSE c2, s) \<rightarrow>* (c,t) \<Longrightarrow>
  c = IF b THEN c1 ELSE c2 \<or> (c1,s) \<rightarrow>* (c,t) \<or> (c2,s) \<rightarrow>* (c,t)"

Output: by(induction "IF b THEN c1 ELSE c2" s c t rule: star_induct) auto


Input:
lemma the_gpv_parametric':
  "(rel_gpv'' A C R ===> rel_spmf (rel_generat A C (R ===> rel_gpv'' A C R))) the_gpv the_gpv"

Output: by(rule rel_funI)(auto elim: rel_gpv''.cases)


Input:
lemma Goto_correct:
"\<lbrakk> wf_prog wt G;
  method (G,C) sig = Some (C,rT,maxs,maxl,ins,et);
  ins ! pc = Goto branch;
  wt_instr (ins!pc) G rT (phi C sig) maxs (length ins) et pc;
  Some state' = exec (G, None, hp, (stk,loc,C,sig,pc)#frs) ;
  G,phi \<turnstile>JVM (None, hp, (stk,loc,C,sig,pc)#frs)\<surd> \<rbrakk>
\<Longrightarrow> G,phi \<turnstile>JVM state'\<surd>"

Output:
apply (clarsimp simp add: defs2)
apply fast done


Input:
lemma has_bochner_integral_scaleR_left[intro]:
  "(c \<noteq> 0 \<Longrightarrow> has_bochner_integral M f x) \<Longrightarrow> has_bochner_integral M (\<lambda>x. f x *\<^sub>R c) (x *\<^sub>R c)"

Output: by (cases "c = 0") (auto simp add: has_bochner_integral_bounded_linear[OF bounded_linear_scaleR_left])


Input:
lemma wadjust_loop_on_left_moving_Bk_via_erase[simp]: "\<lbrakk>wadjust_loop_erase m rs (c, Bk # list); c \<noteq> []\<rbrakk> \<Longrightarrow>
                wadjust_loop_on_left_moving m rs (tl c, hd c # Bk # list)"

Output: apply(case_tac "hd c", simp_all add:wadjust_loop_on_left_moving.simps) done


Input:
lemma fields_rec_lemma: "[|class G C = Some (D,fs,ms); wf ((subcls1 G)\<inverse>)|] ==>
 fields (G,C) =
  map (\<lambda>(fn,ft). ((fn,C),ft)) fs @ (if C = Object then [] else fields (G,D))"

Output:
apply (unfold fields_def)
apply (simp split del: if_split)
apply (erule (1) class_rec_lemma [THEN trans])
apply auto done


Input: lemma CB_rel: "Fr_2 \<F> \<Longrightarrow> \<C> \<^bold>\<equiv> \<C>\<^sub>B \<B>"

Output:
using Br_fr_def Cl_br_def Cl_fr_def Fr_2_def unfolding equal_op_def conn
by auto


Input:
lemma (in ring) exists_core_chain:
  assumes "C \<in> Chains (relation_of (\<lesssim>) \<S>)" obtains C' where "C' \<subseteq> extensions" and "C = law_restrict ` C'"

Output:
using Chains_relation_of[OF assms]
by (meson subset_image_iff)


Input:
lemma (in PolynRg) low_deg_terms_zero1:"pol_coeff S c \<Longrightarrow>
  polyn_expr R X ((fst c) + j) (ext_cf S j c) =
                            (X^\<^bsup>R j\<^esup>) \<cdot>\<^sub>r (polyn_expr R X (fst c) c)"

Output: by (cases c) (simp add: low_deg_terms_zeroTr)


Input:
lemma CHECK_monadic_CHECK_refine[refine]:
    assumes "ci \<le> ESPEC (\<lambda>e'. (e',e)\<in>ER \<and> \<not>c) (\<lambda>r. r \<longleftrightarrow> c)"
    assumes "(ei,e)\<in>ER"
    shows "CHECK_monadic ci ei \<le>\<Down>\<^sub>E ER unit_rel (CHECK c e)"

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


Input:
lemma singular_relboundary_imp_chain:
   "singular_relboundary p X S c \<Longrightarrow> singular_chain p X c"

Output:
unfolding singular_relboundary singular_chain_subtopology
by (blast intro: singular_chain_add singular_chain_boundary_alt)


Input:
lemma if_eval_elim':
  "\<lbrakk> \<langle>If e c\<^sub>1 c\<^sub>2, mds, mem\<rangle> \<leadsto> \<langle>c', mds', mem'\<rangle> \<rbrakk> \<Longrightarrow>
  ((c' = c\<^sub>1 \<and> ev\<^sub>B mem e) \<or> (c' = c\<^sub>2 \<and> \<not> ev\<^sub>B mem e)) \<and> mds' = mds \<and> mem' = mem"

Output:
using if_eval_elim [where annos = "[]"]
by auto


Input: lemma widen_Class_Class: "G\<turnstile>Class C\<preceq> Class cm \<Longrightarrow> G\<turnstile>C\<preceq>\<^sub>C cm"

Output:
apply (ind_cases "G\<turnstile>Class C\<preceq> Class cm")
by auto


Input:
lemma synthetic_div_correct': "[:-c, 1:] * synthetic_div p c + [:poly p c:] = p"
  for c :: "'a::comm_ring_1"

Output:
using synthetic_div_correct [of p c]
by (simp add: algebra_simps)


Input:
lemma siso_Done[simp]:
"siso Done"

Output:
proof- { fix c :: "('test, 'atom, 'choice) cmd" assume "c = Done" hence "siso c"
apply induct
by auto } thus ?thesis
by blast
qed


Input:
lemma period_eq:
  assumes "C \<in> UNIV // communicating" "x \<in> C"
  shows "period C = Gcd (period_set x)"

Output:
unfolding period_def
using assms
by (rule_tac someI2[where a="Gcd (period_set x)"]) (auto intro!: Gcd_period_set_invariant irreducibleD)


Input:
lemma is_letter_code [code]:
  "is_letter c \<longleftrightarrow>
    CHR ''a'' \<le> c \<and> c \<le> CHR ''z'' \<or>
    CHR ''A'' \<le> c \<and> c \<le> CHR ''Z'' \<or>
    CHR ''0'' \<le> c \<and> c \<le> CHR ''9'' \<or>
    c \<in> set ''_&;:-''"

Output: by (cases c) (simp add: is_letter_def letters_def)


Input: lemma cet_cast_real_int: "\<Gamma> \<turnstile>\<^sub>c e : INTEG \<Longrightarrow> \<Gamma> \<turnstile>\<^sub>c \<langle>e\<rangle>\<^sub>c : REAL"

Output: by (intro cet_op[where t = INTEG]) simp_all


Input:
lemma eval_constraint_sat_eq: "wf_tuple n A x \<Longrightarrow> fv_trm t1 \<subseteq> A \<Longrightarrow> fv_trm t2 \<subseteq> A \<Longrightarrow>
  \<forall>i\<in>A. i < n \<Longrightarrow> eval_constraint (t1, p, c, t2) x =
    Formula.sat \<sigma> V (map the x) i (formula_of_constraint (t1, p, c, t2))"

Output: by (induction "(t1, p, c, t2)" rule: formula_of_constraint.induct) (simp_all add: meval_trm_eval_trm)


Input:
lemma (in flowgraph) ntr_mon_increasing_s:
  "(c,ee,c')\<in>ntr fg \<Longrightarrow> mon_c fg c \<subseteq> mon_c fg c'"

Output: by (erule gtrE) (auto dest: ntrs_mon_increasing_s simp add: mon_c_unconc)


Input:
lemma concls_of_inferences_between_eq_Bin_ord_resolve_rename:
  "concls_of (inference_system.inferences_between (ord_FO_\<Gamma> S) Q C) =
   Bin_ord_resolve_rename C C \<union> (\<Union>D \<in> Q. Bin_ord_resolve_rename C D \<union> Bin_ord_resolve_rename D C)"

Output: by (subst inferences_between_eq_UNION) (auto simp: image_Un image_UN concls_of_inferences_between_singleton_eq_Bin_ord_resolve_rename)


Input:
lemma Sbis_pres_discr_R:
assumes "discr c" and "c \<approx>s d"
shows "discr d"

Output:
using assms Sbis_pres_discr_L Sbis_sym
by blast


Input:
lemma expands_to_ln:
  fixes C L :: "'a :: multiseries"
  assumes trimmed: "trimmed_pos (MS (MSLCons (C, e) xs) g)" and basis: "basis_wf (b # basis)"
  assumes F: "(f expands_to MS (MSLCons (C, e) xs) g) (b # basis)"
  assumes L: "((\<lambda>x. ln (h x) + e * ln (b x)) expands_to L) basis"
  and h: "eval C = h"
  shows   "((\<lambda>x. ln (f x)) expands_to MS
             (MSLCons (L, 0) (times_ms_aux (scale_shift_ms_aux (inverse C, - e) xs)
               (powser_ms_aux' (ln_series_stream_aux False 1)
                 (scale_shift_ms_aux (inverse C, - e) xs)))) (\<lambda>x. ln (f x))) (b # basis)"

Output:
using is_expansion_aux_expands_to[OF F] assms
by (auto simp: expands_to.simps intro!: ln_ms_aux)


Input:
theorem c_has_periodic_orbit:
  obtains y where "c.periodic_orbit y" "c.flow0 y ` UNIV \<subseteq> trapC"

Output:
proof - from c.poincare_bendixson_applied[OF compact_trapC _ nonempty_trapC positively_invariant_trapC regular_trapC] show ?thesis
using that
by blast
qed


Input: lemma closed_ccpo: "closed A \<longleftrightarrow> (\<forall>C. chain C \<longrightarrow> C \<noteq> {} \<longrightarrow> C \<subseteq> A \<longrightarrow> Sup C \<in> A)"

Output:
unfolding closed_def open_ccpo
by auto


Input: lemma YFtorNTApp1: assumes "X \<in> Obj (NTCatDom (YFtorNT C f))" shows "(YFtorNT C f) $$ X = Hom\<^bsub>C\<^esub>[X,f]"

Output:
proof- have "(YFtorNT C f) $$ X = (YFtorNT' C f) $$ X"
using assms
by (simp add: MakeNTApp YFtorNT_def) thus ?thesis
by (simp add: YFtorNT'_def)
qed


Input: lemma interp_imp_INTERP: "C \<le> D \<Longrightarrow> interp D \<Turnstile> C \<Longrightarrow> INTERP \<Turnstile> C"

Output:
using INTERP_def interp_subseteq_INTERP interp_imp_general linear
by metis


Input:
lemma strip_while: fixes f :: "'a acom \<Rightarrow> 'a acom"
assumes "\<forall>C. strip (f C) = strip C" and "while_option P f C = Some C'"
shows "strip C' = strip C"

Output:
using while_option_rule[where P = "\<lambda>C'. strip C' = strip C", OF _ assms(2)]
by (metis assms(1))


Input: lemma nextElem_notin[simp]: "a \<notin> set as \<Longrightarrow> nextElem as c a = c"

Output: by(erule nextElem_append[where ys = "[]", simplified])


Input: theorem finite_char_subset: \<open>subset_closed C \<Longrightarrow> C \<subseteq> mk_finite_char C\<close>

Output:
unfolding mk_finite_char_def subset_closed_def
by blast


Input:
lemma no_step_final:
  assumes step: "\<Gamma> \<turnstile>(c,s) \<rightarrow> (c',s')"
  shows "final (c,s) \<Longrightarrow> P"

Output:
using step
by induct (auto simp add: final_def)


Input:
lemma chamber_facet_is_chamber_facet:
  "\<lbrakk> chamber C; chamber D; z\<lhd>C; z\<subseteq>D \<rbrakk> \<Longrightarrow> z\<lhd>D"

Output:
using finite_chamber finite_facetrel_card chamber_card[of C]
by (fastforce intro: facetrelI_cardSuc)


Input:
lemma stage:
  shows "Ifm bs (stage p d (e,c)) = (\<exists> j\<in>{1 .. c*d}. Ifm bs (\<sigma> p c (Add e (C j))))"

Output: by (unfold stage_def split_def ,simp only: evaldjf_ex simpfm) simp


Input:
lemma smult_cancel[simp]:
  fixes c :: "'a :: idom"
  shows "smult c f = smult c g \<longleftrightarrow> c = 0 \<or> f = g"

Output:
proof- have l: "smult c f = [:c:] * f"
by simp have r: "smult c g = [:c:] * g"
by simp show ?thesis unfolding l r mult_cancel_left
by simp
qed


Input:
lemma Scheduler_L3:
assumes "Scheduler C activation"
       and "(t mod cycleLength C) mem (schedule C)"
shows "activation t \<noteq> []"

Output:
using assms
by (simp add: Scheduler_def Let_def)


Input:
lemma Norm_cmult:
  "Norm N (c *\<^sub>R x) = abs c * Norm N x"

Output:
unfolding Norm_def unfolding eNorm_cmult
by (simp add: enn2real_mult)


Input: lemma init_config_implies_InvTempJustified: "init_config c \<Longrightarrow> InvTempJustified c"

Output:
unfolding init_config_def InvTempJustified_def
using justified_add_records[OF justified_empty]
by auto


Input: lemma continuous_inv_chart: "continuous (at x within X) (inv_chart c)" if "x \<in> codomain c"

Output:
apply (rule continuous_at_imp_continuous_within)
using continuous_on_codomain[of c] that at_within_codomain[OF that]
by (auto simp: continuous_on_eq_continuous_within)


Input: theorem SubstTermP_Const: "{ConstP c, TermP t} \<turnstile> SubstTermP \<guillemotleft>Var w\<guillemotright> t c c"

Output:
proof - obtain s::name and k::name where "atom s \<sharp> (c,t,w,k)" "atom k \<sharp> (c,t,w)"
by (metis obtain_fresh) thus ?thesis
by (auto simp: CTermP.simps [of k s c] SeqConstP_imp_SubstTermP)
qed


Input: lemma strip_step: "strip(step S C) = strip C"

Output: by (induction C arbitrary: S) (auto simp: step_def)


Input:
lemma leastI[intro]:
assumes "subgraph S (G:: ('l, 'c) labeled_graph)"
        "\<And> C :: ('l, 'x) labeled_graph. consequence_graph Rs C \<Longrightarrow> maintained (S,G) C"
      shows "least (t:: 'x itself) Rs S G"

Output:
using assms unfolding least_def
by auto


Input:
lemma DERIV_cdivide:
  "(f has_field_derivative D) (at x within s) \<Longrightarrow>
    ((\<lambda>x. f x / c) has_field_derivative D / c) (at x within s)"

Output:
using DERIV_cmult_right[of f D x s "1 / c"]
by simp


Input: lemma in_components_unions_complement: "c \<in> components s \<Longrightarrow> s - c = \<Union>(components s - {c})"

Output: by (metis complement_connected_component_unions components_def components_iff)


Input: lemma negligible_multc: "negligible (\<lambda>\<eta>. f \<eta> * c) \<longleftrightarrow> negligible f \<or> c = 0"

Output: by(subst mult.commute)(simp add: negligible_cmult)


Input:
lemma nhop_addpreRT [simp]:
    fixes rt pre ip dip
  assumes "dip \<in> kD rt"
    shows "nhop (the (addpreRT rt dip pre)) ip = nhop rt ip"

Output:
unfolding sqn_def addpreRT_def
using assms [THEN kD_Some]
by (clarsimp)


Input:
lemma rt_graph_not_dip_trans [dest]:
  "\<And>ip ip' \<sigma> dip. (ip, ip') \<in> (rt_graph \<sigma> dip)\<^sup>+ \<Longrightarrow> ip \<noteq> dip"

Output: by (erule converse_tranclE) auto


Input:
lemma nsqn_sqn_def:
  "\<And>rt dip. nsqn rt dip = (if flag rt dip = Some val \<or> sqn rt dip = 0
                            then sqn rt dip else sqn rt dip - 1)"

Output:
unfolding nsqn_def sqn_def
by (clarsimp split: option.split)


Input:
lemma vD_Some [dest]:
    fixes dip rt
  assumes "dip \<in> vD rt"
    shows "\<exists>dsn dsk hops nhip pre.
           \<sigma>\<^bsub>route\<^esub>(rt, dip) = Some (dsn, dsk, val, hops, nhip, pre)"

Output:
using assms unfolding vD_def
by simp


Input:
lemma rt_fresher_update_other [simp]:
  assumes inkD: "dip\<in>kD(rt)"
     and "dip \<noteq> ip"
   shows "rt \<sqsubseteq>\<^bsub>dip\<^esub> update rt ip r"

Output:
using assms unfolding update_def
by (clarsimp split: option.split) (fastforce)


Input:
lemma nhop_update [simp]: "\<And>rt dip dsn dsk flg hops sip.
  rt \<noteq> update rt dip (dsn, dsk, flg, hops, sip, {})
  \<Longrightarrow> the (nhop (update rt dip (dsn, dsk, flg, hops, sip, {})) dip) = sip"

Output:
unfolding update_def sqnf_def
by (clarsimp split: option.splits if_split_asm) auto


Input:
lemma rt_graph_vD [dest]:
  "\<And>ip ip' \<sigma> dip. (ip, ip') \<in> rt_graph \<sigma> dip \<Longrightarrow> dip \<in> vD(rt (\<sigma> ip))"

Output:
unfolding rt_graph_def vD_def
by auto


Input:
lemma sqnf_invalidate [simp]:
  "\<And>dip. sqnf (invalidate (rt \<xi>) (dests \<xi>)) dip = sqnf (rt \<xi>) dip"

Output:
unfolding sqnf_def invalidate_def
by (clarsimp split: option.split)


Input:
lemma val_nsqn_sqn [elim, simp]:
  assumes "ip\<in>kD(rt)"
      and "the (flag rt ip) = val"
    shows "nsqn rt ip = sqn rt ip"

Output:
using assms unfolding nsqn_sqn_def
by auto


Input:
lemma invalidate_other [simp]:
    fixes rt dests dip
  assumes "dip\<notin>dom(dests)"
    shows "invalidate rt dests dip = rt dip"

Output:
using assms unfolding invalidate_def
by (clarsimp split: option.split_asm)


Input:
lemma nsqn_quality_increases [elim]:
  assumes "i\<in>kD(rt \<xi>)"
      and "quality_increases \<xi> \<xi>'"
    shows "nsqn (rt \<xi>) i \<le> nsqn (rt \<xi>') i"

Output:
using assms
by (rule kD_nsqn_quality_increases [THEN conjunct2])


Input:
lemma rt_fresherE [elim]:
  assumes "rt1 \<sqsubseteq>\<^bsub>dip\<^esub> rt2"
      and "dip \<in> kD(rt1)"
      and "dip \<in> kD(rt2)"
      and "\<lbrakk> nsqn rt1 dip < nsqn rt2 dip \<rbrakk> \<Longrightarrow> P rt1 rt2 dip"
      and "\<lbrakk> nsqn rt1 dip = nsqn rt2 dip;
             the (dhops rt1 dip) \<ge> the (dhops rt2 dip) \<rbrakk> \<Longrightarrow> P rt1 rt2 dip"
    shows "P rt1 rt2 dip"

Output:
using assms(1) unfolding rt_fresher_def2 [OF assms(2-3)]
using assms(4-5)
by auto


Input:
lemma iD_nsqn_sqn [elim, simp]:
  assumes "ip\<in>iD(rt)"
    shows "nsqn rt ip = sqn rt ip - 1"

Output:
proof - from \<open>ip\<in>iD(rt)\<close> have "ip\<in>kD(rt)" and "the (flag rt ip) = inv"
by auto thus ?thesis ..
qed


Input:
lemma sqnf_update_another [simp]:
    fixes dip ip rt dsn dsk flag hops nhip pre
  assumes "ip \<noteq> dip"
    shows "sqnf (update rt dip (dsn, dsk, flag, hops, nhip, pre)) ip = sqnf rt ip"

Output:
using assms unfolding update_def sqnf_def
by (clarsimp split: option.splits) auto


Input:
lemma vD_or_iD [elim]:
    fixes ip rt
  assumes "ip\<in>kD(rt)"
      and "ip\<in>vD(rt) \<Longrightarrow> P rt ip"
      and "ip\<in>iD(rt) \<Longrightarrow> P rt ip"
    shows "P rt ip"

Output:
proof - from \<open>ip\<in>kD(rt)\<close> have "ip\<in>vD(rt) \<union> iD(rt)"
by (simp add: kD_is_vD_and_iD) thus ?thesis
by (auto elim: assms(2-3))
qed


Input:
lemma kD_addpreRT [simp]:
  fixes rt dip npre
  assumes "dip \<in> kD rt"
  shows "kD (the (addpreRT rt dip npre)) = kD rt"

Output:
unfolding kD_def addpreRT_def
using assms [THEN kD_Some]
by clarsimp blast


Input:
lemma update_kno_dsn_greater_zero:
  "\<And>rt dip ip dsn hops npre. 1 \<le> dsn \<Longrightarrow> 1 \<le> (sqn (update rt dip (dsn, kno, val, hops, ip, npre)) dip)"

Output:
unfolding update_def
by (clarsimp split: option.splits)


Input:
lemma nhop_update_another [simp]:
    fixes dip ip rt dsn dsk flag hops nhip
  assumes "ip \<noteq> dip"
    shows "nhop (update rt dip (dsn, dsk, flag, hops, nhip)) ip = nhop rt ip"

Output:
using assms unfolding update_def
by (clarsimp split: option.split)


Input:
lemma flag_update [simp]: "\<And>rt dip dsn flg hops sip.
  rt \<noteq> update rt dip (dsn, kno, flg, hops, sip, {})
  \<Longrightarrow> the (flag (update rt dip (dsn, kno, flg, hops, sip, {})) dip) = flg"

Output:
unfolding update_def
by (clarsimp split: option.split if_split_asm) auto


Input:
lemma rt_graph_not_dip_trans [dest]:
  "\<And>ip ip' \<sigma> dip. (ip, ip') \<in> (rt_graph \<sigma> dip)\<^sup>+ \<Longrightarrow> ip \<noteq> dip"

Output: by (erule converse_tranclE) auto


Input:
lemma nsqn_invalidate_other [simp]:
  assumes "dip\<in>kD(rt)"
      and "dip\<notin>dom dests"
    shows "nsqn (invalidate rt dests) dip = nsqn rt dip"

Output:
using assms
by (clarsimp simp add: kD_nsqn)


Input:
lemma invalidate_other [simp]:
    fixes rt dests dip
  assumes "dip\<notin>dom(dests)"
    shows "invalidate rt dests dip = rt dip"

Output:
using assms unfolding invalidate_def
by (clarsimp split: option.split_asm)


Input:
lemma sqn_update [simp]: "\<And>rt dip dsn flg hops sip.
  rt \<noteq> update rt dip (dsn, kno, flg, hops, sip, {})
  \<Longrightarrow> sqn (update rt dip (dsn, kno, flg, hops, sip, {})) dip = dsn"

Output:
unfolding update_def
by (clarsimp split: option.split if_split_asm) auto


Input:
lemma quality_increasesI [intro!]:
  assumes "\<And>dip. dip \<in> kD(rt \<xi>) \<Longrightarrow> dip \<in> kD(rt \<xi>')"
      and "\<And>dip. \<lbrakk> dip \<in> kD(rt \<xi>); dip \<in> kD(rt \<xi>') \<rbrakk> \<Longrightarrow> rt \<xi> \<sqsubseteq>\<^bsub>dip\<^esub> rt \<xi>'"
      and "\<And>dip. sqn (rt \<xi>) dip \<le> sqn (rt \<xi>') dip"
    shows "quality_increases \<xi> \<xi>'"

Output:
unfolding quality_increases_def
using assms
by clarsimp


Input:
lemma nsqn\<^sub>r_invalidate [simp]:
  assumes "dip\<in>kD(rt)"
      and "dip\<in>dom(dests)"
    shows "nsqn\<^sub>r (the (invalidate rt dests dip)) = the (dests dip) - 1"

Output:
using assms unfolding invalidate_def
by auto


Input:
lemma sqnf_update [simp]: "\<And>rt dip dsn dsk flg hops sip.
  rt \<noteq> update rt dip (dsn, dsk, flg, hops, sip)
  \<Longrightarrow> sqnf (update rt dip (dsn, dsk, flg, hops, sip)) dip = dsk"

Output:
unfolding update_def sqnf_def
by (clarsimp split: option.splits if_split_asm) auto


Input:
lemma sqn_invalidate_not_in_dests [simp]:
  fixes dests dip rt
  assumes "dip\<notin>dom(dests)"
  shows "sqn (invalidate rt dests) dip = sqn rt dip"

Output:
using assms unfolding sqn_def
by simp


Input:
lemma nsqn_quality_increases_dhops [elim]:
  assumes "i\<in>kD(rt \<xi>)"
      and "quality_increases \<xi> \<xi>'"
      and "nsqn (rt \<xi>) i = nsqn (rt \<xi>') i"
    shows "the (dhops (rt \<xi>) i) \<ge> the (dhops (rt \<xi>') i)"

Output:
using assms unfolding quality_increases_def
by (clarsimp) (drule(1) bspec, clarsimp simp: rt_fresher_def2)


Input:
lemma rt_graph_vD [dest]:
  "\<And>ip ip' \<sigma> dip. (ip, ip') \<in> rt_graph \<sigma> dip \<Longrightarrow> dip \<in> vD(rt (\<sigma> ip))"

Output:
unfolding rt_graph_def vD_def
by auto


Input:
lemma getNonWatchedUnfalsifiedLiteralNoneCharacterization:
fixes clause :: Clause and w1 :: Literal and w2 :: Literal and M :: LiteralTrail
assumes
  "getNonWatchedUnfalsifiedLiteral clause w1 w2 M = None"
shows
  "\<forall> l. l el clause \<and> l \<noteq> w1 \<and> l \<noteq> w2 \<longrightarrow> literalFalse l (elements M)"

Output:
using assms
by (induct clause) (auto split: if_split_asm)


Input:
lemma (in weak_partial_order) weak_complete_latticeI:
  assumes sup_exists:
    "!!A. [| A \<subseteq> carrier L |] ==> \<exists>s. least L s (Upper L A)"
    and inf_exists:
    "!!A. [| A \<subseteq> carrier L |] ==> \<exists>i. greatest L i (Lower L A)"
  shows "weak_complete_lattice L"

Output: by standard (auto intro: sup_exists inf_exists)


Input: lemma less_length_takeWhile_conv: "i < length (takeWhile P l) \<longleftrightarrow> (i<length l \<and> (\<forall>j\<le>i. P (l!j)))"

Output:
apply safe subgoal
using length_takeWhile_le less_le_trans
by blast subgoal
by (metis dual_order.strict_trans2 nth_mem set_takeWhileD takeWhile_nth) subgoal
by (meson less_le_trans not_le_imp_less nth_length_takeWhile) done


Input:
lemma sift_up_step:
  fixes heap::"int \<Rightarrow> int"
  assumes
    "is_heap_except_up (\<le>) heap l r x"
    "parent l x \<ge> l"
    "(heap x) \<le> (heap (parent l x))"
  shows "is_heap_except_up (\<le>) (swap heap (parent l x) x) l r (parent l x)"

Output:
using assms sift_up_step_aux1 sift_up_step_aux2 unfolding is_heap_except_up_def
by blast


Input:
lemma one_time_pad: "map_spmf ((\<oplus>) x) (spmf_of_set (carrier L)) = spmf_of_set (carrier L)"
  if "x \<in> carrier L"

Output:
apply(subst map_spmf_of_set_inj_on)
apply(rule inj_on_xor[OF that])
by(simp add: surj_xor that)


Input:
lemma LIM_fun_less_zero: "f \<midarrow>c\<rightarrow> l \<Longrightarrow> l < 0 \<Longrightarrow> \<exists>r. 0 < r \<and> (\<forall>x. x \<noteq> c \<and> \<bar>c - x\<bar> < r \<longrightarrow> f x < 0)"
  for f :: "real \<Rightarrow> real"

Output: by (drule LIM_D [where r="-l"]) force+


Input:
lemma satL_snvL_transE[simp]:
assumes wtL: "Ik.wtL l" and \<xi>: "I.wtE \<xi>"
and pL: "\<And> \<sigma>. infTp \<sigma> \<or> (\<forall> x \<in> nvL l. tpOfV x \<noteq> \<sigma>)" and "Ik.satL (transE \<xi>) l"
shows "I.satL \<xi> l"

Output:
using assms
by (cases l) auto


Input:
lemma
      heap_parent_le: "\<lbrakk>heap_invar l; valid l i; has_parent l i\<rbrakk>
        \<Longrightarrow> pparent l i \<le> prio_of l i"

Output:
unfolding heap_invar_def
by auto


Input:
lemma n_meet_L_0_below_0_meet_L:
  "(x \<sqinter> L) * bot \<le> x * bot \<sqinter> L"

Output: by (meson inf.boundedE inf.boundedI mult_right_sub_dist_inf_left zero_right_mult_decreasing)


Input:
lemma PrefixListHasTail:
fixes
  l1 :: "'a list" and
  l2 :: "'a list"
assumes
  "prefixList l1 l2"
shows
  "\<exists> l . l2 = l1 @ l \<and> l \<noteq> []"

Output:
using assms
by (induct rule: prefixList.induct, auto)


Input:
lemma min_satisfying_None:
  "min_satisfying P l = None \<longrightarrow>
    (\<forall> x \<in> set l. \<not> P x)"

Output:
unfolding min_satisfying_def Let_def
by (simp add: filter_empty_conv)


Input:
lemma Inf_aform_aform_of_ivl:
  assumes "l \<le> u"
  shows "Inf_aform (aform_of_ivl l u) = l"

Output:
using assms
by (auto simp: Inf_aform_def aform_of_ivl_def tdev_pdevs_of_ivl abs_diff_eq1 algebra_simps) (metis field_sum_of_halves scaleR_add_left scaleR_one)


Input: lemma tr_filter_empty [simp]: "tr_filter l {} = l"

Output: by (induct l) (auto simp: filter_chan_set_def)


Input: lemma invpst_baliR: "invpst l \<Longrightarrow> invpst r \<Longrightarrow> invpst (baliR l a r)"

Output: by (cases "(l,a,r)" rule: baliR.cases) auto


Input:
lemma emb_injective:
  assumes L: "J \<subseteq> L" "L \<subseteq> I" and X: "X \<in> sets (Pi\<^sub>M J M)" and Y: "Y \<in> sets (Pi\<^sub>M J M)"
  shows "emb L J X = emb L J Y \<Longrightarrow> X = Y"

Output: by (intro antisym emb_preserve_mono[OF L X Y] emb_preserve_mono[OF L Y X]) auto


Input: lemma left_gpv_Inl_transfer: "rel_gpv'' (=) (\<lambda>l r. l = Inl r) (\<lambda>l r. l = Inl r) (left_gpv gpv) gpv"

Output: by(coinduction arbitrary: gpv) (auto simp add: spmf_rel_map generat.rel_map del: rel_funI intro!: rel_spmf_reflI generat.rel_refl_strong rel_funI)


Input:
lemma foldli_bex_aux:
    "distinct (map fst l) \<Longrightarrow> foldli l (\<lambda>x. \<not>x) (\<lambda>x _. P x) b
    \<longleftrightarrow> b \<or> op_map_bex (map_of l) P"

Output:
apply (induct l arbitrary: b)
apply simp
apply (force simp: map_to_set_map_of image_def) done


Input:
lemma reps_\<S>[intro]:
  assumes "(l, R) \<in> \<S>"
  shows "reps (l, R) = (l, SOME u. u \<in> R)"

Output:
using assms unfolding reps_def
by auto


Input: lemma \<L>\<^sub>P_leftderives: "a \<in> \<L>\<^sub>P \<Longrightarrow> \<exists> b. leftderives [\<SS>] (a@b)"

Output: by (metis \<L>\<^sub>P_derives \<L>\<^sub>P_is_word derives_implies_leftderives_gen)


Input:
lemma gap_relabel_aux_refine:
  assumes [simp]: "C = card V" "l_invar l"
  shows "gap_relabel_aux C f l u \<le> gap_relabel f l u"

Output:
unfolding gap_relabel_aux_def gap_relabel_def relabel_def gap_relabel_effect_def l_get_def
apply (simp only: Let_def nres_monad_laws)
apply refine_vcg
by auto


Input:
lemma Lim_transform_within_set_eq:
  fixes a :: "'a::metric_space" and l :: "'b::metric_space"
  shows "eventually (\<lambda>x. x \<in> S \<longleftrightarrow> x \<in> T) (at a)
         \<Longrightarrow> ((f \<longlongrightarrow> l) (at a within S) \<longleftrightarrow> (f \<longlongrightarrow> l) (at a within T))"

Output: by (force intro: Lim_transform_within_set elim: eventually_mono)


Input: lemma length_compl_induct[case_names Nil Cons]: "\<lbrakk>P []; !! e l . \<lbrakk>!! ll . length ll <= length l \<Longrightarrow> P ll\<rbrakk> \<Longrightarrow> P (e#l)\<rbrakk> \<Longrightarrow> P l"

Output:
apply(induct_tac l rule: length_induct)
apply(case_tac "xs")
apply(auto) done


Input:
lemma dec_first_on_right_moving_Bk_nonempty[simp]:
  "dec_first_on_right_moving n (as, am) (s, l, Bk # xs) ires \<Longrightarrow> l \<noteq> []"

Output: apply(auto simp: dec_first_on_right_moving.simps split: if_splits) done


Input:
lemma bottom_weak_eq:
  "\<lbrakk> b \<in> carrier L; \<And> x. x \<in> carrier L \<Longrightarrow> b \<sqsubseteq> x \<rbrakk> \<Longrightarrow> b .= \<bottom>"

Output: by (metis bottom_closed bottom_lower weak_le_antisym)