Input:
lemma as_top_autoref[autoref_rules]:
  assumes "(l,l')\<in>\<langle>R\<rangle>as_rel"
  assumes "SIDE_PRECOND (l' \<noteq> [])"
  shows "(as_top l,(OP last ::: \<langle>R\<rangle>as_rel \<rightarrow> R)$l')\<in>R"

Output:
using assms
by (simp add: as_top_refine)


Input:
lemma (in lower_semilattice) meet_assoc:
  assumes L: "x \<in> carrier L"  "y \<in> carrier L"  "z \<in> carrier L"
  shows "(x \<sqinter> y) \<sqinter> z = x \<sqinter> (y \<sqinter> z)"

Output: using weak_meet_assoc L unfolding eq_is_equal .


Input: lemma neg_in_filterD: "Neg A \<in># {#L \<cdot>l \<rho>'. L \<in># mset D#} \<Longrightarrow> \<exists>A0. Neg A0 \<in># mset D \<and> A = A0 \<cdot>a \<rho>'"

Output:
unfolding subst_lit_def image_def
by (rule neg_in_map_literalD) simp


Input: lemma non_empty_projection_on_subset: "X \<subseteq> Y \<and> l\<^sub>1 \<upharpoonleft> Y = l\<^sub>2 \<upharpoonleft> Y \<Longrightarrow>  l\<^sub>1 \<upharpoonleft> X = l\<^sub>2 \<upharpoonleft> X"

Output: by (metis projection_subset_eq_from_superset_eq subset_Un_eq)


Input:
lemma fresh_distinct_list:
 assumes "atom ` S \<sharp>* l"
 shows "S \<inter> set l = {}"

Output:
using assms
by (metis disjoint_iff_not_equal fresh_list_elem fresh_star_def image_eqI not_self_fresh)


Input:
lemma while_mult_L:
  "(x * L) \<star> z = z \<squnion> x * L"

Output: by (metis sup_bot_right mult_left_zero while_denest_5 while_one_top while_productstar while_sumstar)


Input:
lemma arg_max_list_element:
  assumes "length l \<ge> 1" shows "arg_max_list f l \<in> set l"

Output: by (metis One_nat_def arg_max_list.simps arg_min_list_in assms le_imp_less_Suc less_irrefl list.size(3))


Input:
lemma ias_delete_abs1: "k<length l
    \<Longrightarrow> ias_of_list (l[k := False]) = ias_of_list l - {k}"

Output:
unfolding ias_of_list_def[abs_def]
by (auto simp: nth_list_update)


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

Output:
using LIM_fun_gt_zero[of f l c] LIM_fun_less_zero[of f l c]
by (auto simp: neq_iff)


Input: lemma ackloop_dom: "ackloop_dom l"

Output: by (induction l rule: acklist.induct) (auto simp: ackloop_dom_longer)


Input:
lemma pfa_length_rule[sep_heap_rules]: "
  <is_pfa c l a>
    pfa_length a
  <\<lambda>r. is_pfa c l a * \<up>(r=length l)>"

Output: by (sep_auto simp: pfa_length_def arl_length_def is_pfa_def)


Input:
lemma is_poincare_line_not_trough_zero_not_trough_infty [simp]:
  assumes "is_poincare_line l"
  assumes "0\<^sub>h \<notin> circline_set l"
  shows "\<infinity>\<^sub>h \<notin> circline_set l"

Output:
using assms
using is_poincare_line_inverse_point[OF assms(1), of "\<infinity>\<^sub>h"]
by auto


Input:
lemma append_sublist_1:
  assumes "subseq (l1 @ l2) l"
  shows "subseq l1 l \<and> subseq l2 l"

Output:
using assms sublist_append_back sublist_append_front sublist_trans
by blast \<comment> \<open>NOTE added lemma (eventually wasn't needed in the remaining
proofs).\<close>


Input: lemma invc_baldR: "\<lbrakk>invc l; invc2 r; color l = Black\<rbrakk> \<Longrightarrow> invc (baldR l a r)"

Output: by (induct l a r rule: baldR.induct) (simp_all add: invc_baliL)


Input:
lemma imp_graph_vars:
  assumes "(l, l') \<in> imp_graph cnf"
  shows "var l \<in> vars_of_cnf cnf"

Output:
using assms unfolding imp_graph_def vars_of_cnf_def
apply (clarsimp elim!: rev_bexI) subgoal for x
by(cases x)(auto split: uprod_split_asm if_split_asm) done


Input:
lemma list_length_hint3:
assumes "length l = Suc 0"
shows    "l \<noteq> []"

Output:
using assms
by (metis Zero_neq_Suc list.size(3))


Input:
lemma succ_imp_graph_correct:
  "finite cnf \<Longrightarrow> succ_imp_graph cnf l = {l'. (l, l') \<in> imp_graph cnf}"

Output: by(induction rule: finite_induct)(auto split: succs_of_clause_split simp add: succ_imp_graph_alt_def)


Input:
lemma type_l_nosupp[simp]:
  fixes x::x and l::l
  shows "atom x \<notin> supp (\<lbrace> z : b  |  [[z]\<^sup>v]\<^sup>c\<^sup>e ==  [[l]\<^sup>v]\<^sup>c\<^sup>e \<rbrace>)"

Output:
using supp_at_base supp_l_empty ce.supp(1) c.supp \<tau>.supp
by force


Input: lemma Idl_subset_eq_dvd: "Idl\<^bsub>\<Z>\<^esub> {k} \<subseteq> Idl\<^bsub>\<Z>\<^esub> {l} \<longleftrightarrow> l dvd k"

Output: by (subst int_Idl_subset_ideal) (auto simp: dvd_def int_Idl)


Input:
lemma INF_Lim:
  fixes X :: "nat \<Rightarrow> 'a::{complete_linorder,linorder_topology}"
  assumes dec: "decseq X"
    and l: "X \<longlonglongrightarrow> l"
  shows "(INF n. X n) = l"

Output:
using LIMSEQ_INF[OF dec] tendsto_unique[OF trivial_limit_sequentially l]
by simp


Input:
lemma se_succs_states :
  assumes "se c l c1"
  assumes "se c l c2"
  shows   "states c1 = states c2"

Output:
using assms se_mono_for_states_eq
by fast


Input: lemma set_set_lvars [simp]: "\<And> s. set_lvars l (set_lvars l' s) = set_lvars l s"

Output:
apply (simp (no_asm_simp) only: split_tupled_all)
apply (simp (no_asm)) done


Input: lemma invc_baldL: "\<lbrakk>invc2 l; invc r; color r = Black\<rbrakk> \<Longrightarrow> invc (baldL l a r)"

Output: by (induct l a r rule: baldL.induct) (auto simp: invc_baliR invc2I mkNode_def)


Input:
lemma bheight_baliR:
  "bheight l = bheight r \<Longrightarrow> bheight (baliR l a r) = Suc (bheight l)"

Output: by (induct l a r rule: baliR.induct) auto


Input: lemma dec_check_right_move_nonempty[simp]: "dec_check_right_move (as, am) (s, l, r) ires\<Longrightarrow> l \<noteq> []"

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


Input:
lemma unique_append: "unique l' \<Longrightarrow> unique l \<Longrightarrow>
    (\<forall>(x,y) \<in> set l. \<forall>(x',y') \<in> set l'. x' \<noteq> x) \<Longrightarrow> unique (l @ l')"

Output: by (induct l) (auto dest: fst_in_set_lemma)


Input:
lemma line_left_inter_1:
  assumes "P \<in> line_ext l" and "P \<notin> line_ext m"
  shows "line (inter l m) P = l"

Output: by (metis CollectD CollectI assms(1) assms(2) incidA_lAB incidB_lAB incid_inter_left incid_inter_right line_ext_def uniq_inter)


Input:
lemma not_call_simps [simp]:
  "\<And>l fg p.         not_call ({l}\<langle>fg\<rangle> p)"
  "\<And>l fa p.         not_call ({l}\<lbrakk>fa\<rbrakk> p)"
  "\<And>p1 p2.          not_call (p1 \<oplus> p2)"
  "\<And>l fip fmsg p q. not_call ({l}unicast(fip, fmsg).p \<triangleright> q)"
  "\<And>l fmsg p.       not_call ({l}broadcast(fmsg).p)"
  "\<And>l fips fmsg p.  not_call ({l}groupcast(fips, fmsg).p)"
  "\<And>l fmsg p.       not_call ({l}send(fmsg).p)"
  "\<And>l fdata p.      not_call ({l}deliver(fdata).p)"
  "\<And>l fmsg p.       not_call ({l}receive(fmsg).p)"
  "\<And>l pn.         \<not>(not_call (call(pn)))"

Output:
unfolding not_call_def
by auto


Input:
lemma invh_baldR_invc:
  "\<lbrakk> invh l;  invh r;  bheight l = bheight r + 1;  invc l \<rbrakk>
  \<Longrightarrow> invh (baldR l a r) \<and> bheight (baldR l a r) = bheight l"

Output: by(induct l a r rule: baldR.induct) (auto simp: invh_baliL bheight_baliL invh_paint bheight_paint_Red)


Input:
lemma DropToShift:
fixes
  l i list
assumes
  "l + i < length list"
shows
  "(drop l list) ! i = list ! (l + i)"

Output:
using assms
by (induct l, auto)


Input:
lemma bst_baliL:
  "\<lbrakk>bst l; bst r; \<forall>x\<in>set_tree l. x < a; \<forall>x\<in>set_tree r. a < x\<rbrakk>
   \<Longrightarrow> bst (baliL l a r)"

Output: by(cases "(l,a,r)" rule: baliL.cases) (auto simp: ball_Un)


Input:
lemma label_tree_simps [simp]:
  "label_tree (Leaf x) = pure Leaf \<diamondop> fresh"
  "label_tree (Node l r) = pure Node \<diamondop> label_tree l \<diamondop> label_tree r"

Output: by(simp_all add: label_tree_def)


Input:
lemma toTree_correct[simp]:
  "ft_invar (toTree l)"
  "toList (toTree l) = l"

Output:
apply (induct l)
apply (simp add: ft_invar_def)
apply simp
apply (simp add: toTree_def lcons_list lcons_inv)
apply (simp add: toTree_def lcons_list lcons_inv) done


Input:
lemma real_of_1_0:
  assumes "invariant_1 (p,l,r)"
  shows [simp]: "the_unique_root (p,l,r) = 0 \<longleftrightarrow> r = 0"
    and [dest]: "l = 0 \<Longrightarrow> r = 0"
    and [intro]: "r = 0 \<Longrightarrow> l = 0"

Output:
using assms
by (auto simp: sgn_0_0)


Input:
lemma size_rotateR[simp]:
  "l \<noteq> Leaf \<Longrightarrow> size(rotateR l a r) = size l + size r + 1"

Output: by(induction l a r rule: rotateR.induct) (auto simp: not_Leaf_if_not_single simp del: rot2.simps)


Input: lemma filter_eq_snocD: "filter P l = l'@[x] \<Longrightarrow> x\<in>set l \<and> P x"

Output:
proof - assume A: "filter P l = l'@[x]" hence "x\<in>set (filter P l)"
by simp thus ?thesis
by simp
qed


Input:
lemma plugInLinear :
  assumes lLength : "length L>var"
  assumes nonzero : "B\<noteq>0"
  assumes hb : "\<forall>v. insertion (nth_default 0 (list_update L var v)) b = B"
  assumes hc : "\<forall>v. insertion (nth_default 0 (list_update L var v)) c = C"
  shows "aEval (Eq(b*Var var + c)) (list_update L var (-C/B))"

Output: by(simp add: lLength insertion_add insertion_mult nonzero hb hc insertion_var)


Input:
theorem flit_of_hlit_hlit_of_flit [simp]:
  assumes "ground\<^sub>l l"
  shows "flit_of_hlit (hlit_of_flit l) = l"

Output:
using assms
by (cases l) auto


Input: lemma mem_imp_less_HMSet: "k \<in># L \<Longrightarrow> k < HMSet L"

Output: by (induct k arbitrary: L) (auto intro: ex_gt_imp_less_multiset)


Input: lemma nfoldli_map: "nfoldli (map f l) ctd g s = nfoldli l ctd (g o f) s"

Output:
apply (induction l arbitrary: s)
by (auto simp: pw_eq_iff refine_pw_simps)


Input: lemma extender_deeper: "F \<in> extender k S \<Longrightarrow> k \<le> l \<Longrightarrow> F \<in> extender l S"

Output:
using extender_Sucset le_Suc_eq
by(induction l) (auto simp del: extender.simps)


Input:
lemma lower_asymptotic_density_eq_upper:
  assumes "lower_asymptotic_density A = l" "upper_asymptotic_density A = l"
  shows "(\<lambda>n. card(A \<inter> {..<n})/n) \<longlonglongrightarrow> l"

Output:
apply (rule limsup_le_liminf_real)
using upper_asymptotic_density_in_01(1)[of A] lower_asymptotic_density_in_01(1)[of A] assms
by auto


Input:
lemma is_bal_r_bal:
  "is_bal l \<Longrightarrow> is_bal r \<Longrightarrow> height r = height l + 2 \<Longrightarrow> is_bal (r_bal\<^sub>0 n l r)"

Output: by (cases r) (auto, auto split: tree\<^sub>0.split) \<comment> \<open>separating the two auto's is just for speed\<close>


Input: lemma no_zero_height_Step_derivs: "(M,l,s,0,ll,t):Step \<Longrightarrow> False"

Output: by (insert no_zero_height_derivsAux2, fast)


Input: lemma finite_calls[simp]: "finite (calls l)" and "finite (callsC c)" "finite (callsV v)"

Output: by (induct rule: calls_callsC_callsV.induct, auto)


Input:
lemma mem_set_2:
assumes "a \<in> set l"
shows "a mem l"

Output:
using assms
by (metis (full_types) memS_def mem_memS_eq)


Input:
lemma the_cat_parallel_ObjE:
  assumes "a \<in>\<^sub>\<circ> \<up>\<up>\<^sub>C \<aa> \<bb> \<gg> \<ff>\<lparr>Obj\<rparr>"
  obtains "a = \<aa>" | "a = \<bb>"

Output:
using assms unfolding the_cat_parallel_components(1)
by fastforce


Input:
lemma (in is_cf_adjunction) cf_adjunction_counit_NTMap_vrange:
  "\<R>\<^sub>\<circ> (\<epsilon>\<^sub>C \<Phi>\<lparr>NTMap\<rparr>) \<subseteq>\<^sub>\<circ> \<DD>\<lparr>Arr\<rparr>"

Output: by ( rule is_cf_adjunction.cf_adjunction_unit_NTMap_vrange[ OF is_cf_adjunction_op, unfolded cf_adjunction_unit_NTMap_op cat_op_simps ] )


Input:
lemma (in is_cat_equalizer) cat_eq_Comp_eq:
  "\<gg> \<circ>\<^sub>A\<^bsub>\<CC>\<^esub> \<epsilon>\<lparr>NTMap\<rparr>\<lparr>\<aa>\<^sub>P\<^sub>L\<rparr> = \<ff> \<circ>\<^sub>A\<^bsub>\<CC>\<^esub> \<epsilon>\<lparr>NTMap\<rparr>\<lparr>\<aa>\<^sub>P\<^sub>L\<rparr>"
  "\<ff> \<circ>\<^sub>A\<^bsub>\<CC>\<^esub> \<epsilon>\<lparr>NTMap\<rparr>\<lparr>\<aa>\<^sub>P\<^sub>L\<rparr> = \<gg> \<circ>\<^sub>A\<^bsub>\<CC>\<^esub> \<epsilon>\<lparr>NTMap\<rparr>\<lparr>\<aa>\<^sub>P\<^sub>L\<rparr>"

Output:
unfolding cat_eq_2_eps_NTMap_app[symmetric]
by simp_all


Input:
lemma (in is_iso_ntcf) iso_ntcf_is_arr_isomorphism':
  assumes "a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>"
    and "A = \<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>"
    and "B = \<GG>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>"
  shows "\<NN>\<lparr>NTMap\<rparr>\<lparr>a\<rparr> : A \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<BB>\<^esub> B"

Output:
using assms
by (auto intro: cat_arrow_cs_intros)


Input:
lemma cf_lcomp_ObjMap_app[cat_cs_simps]:
  assumes "category \<alpha> \<CC>"
    and "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>"
    and "a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>"
    and "c \<in>\<^sub>\<circ> \<CC>\<lparr>Obj\<rparr>"
  shows "cf_lcomp \<CC> \<SS> \<FF>\<lparr>ObjMap\<rparr>\<lparr>a, c\<rparr>\<^sub>\<bullet> = \<SS>\<lparr>ObjMap\<rparr>\<lparr>\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>, c\<rparr>\<^sub>\<bullet>"

Output:
using assms unfolding cf_lcomp_def
by (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros cat_prod_cs_intros)


Input:
lemma cat_Set_components:
  shows "cat_Set \<alpha>\<lparr>Obj\<rparr> = Vset \<alpha>"
    and "cat_Set \<alpha>\<lparr>Arr\<rparr> = set {T. arr_Set \<alpha> T}"
    and "cat_Set \<alpha>\<lparr>Dom\<rparr> = (\<lambda>T\<in>\<^sub>\<circ>set {T. arr_Set \<alpha> T}. T\<lparr>ArrDom\<rparr>)"
    and "cat_Set \<alpha>\<lparr>Cod\<rparr> = (\<lambda>T\<in>\<^sub>\<circ>set {T. arr_Set \<alpha> T}. T\<lparr>ArrCod\<rparr>)"
    and "cat_Set \<alpha>\<lparr>Comp\<rparr> =
      (\<lambda>ST\<in>\<^sub>\<circ>composable_arrs (dg_Set \<alpha>). ST\<lparr>0\<rparr> \<circ>\<^sub>P\<^sub>a\<^sub>r ST\<lparr>1\<^sub>\<nat>\<rparr>)"
    and "cat_Set \<alpha>\<lparr>CId\<rparr> = VLambda (Vset \<alpha>) id_Set"

Output:
unfolding cat_Set_def dg_field_simps
by (simp_all add: nat_omega_simps)


Input:
lemma dghm_cn_cov_comp_ObjMap_vrange:
  assumes "\<GG> : \<BB> \<^sub>D\<^sub>G\<mapsto>\<mapsto>\<^bsub>\<alpha>\<^esub> \<CC>" and "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> \<BB>"
  shows "\<R>\<^sub>\<circ> ((\<GG> \<^sub>D\<^sub>G\<^sub>H\<^sub>M\<circ> \<FF>)\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<CC>\<lparr>Obj\<rparr>"

Output:
using assms
by ( cs_concl cs_simp: dghm_cn_comp_components cs_intro: is_dghm.dghm_ObjMap_vrange V_cs_intros )


Input:
lemma tm_ntcf_arrows_in_cf_arrows[cat_map_cs_intros]:
  assumes "\<NN> \<in>\<^sub>\<circ> tm_ntcf_arrows \<alpha> \<AA> \<BB>"
  shows "\<NN> \<in>\<^sub>\<circ> ntcf_arrows \<alpha> \<AA> \<BB>"

Output:
using assms tm_ntcf_arrows_vsubset_ntcf_arrows[of \<alpha> \<AA> \<BB>]
by blast


Input:
lemma \<Z>_tsE[elim]:
  assumes "\<Z>_ts \<alpha> \<SS>"
  obtains "\<Z>_vfsequence \<alpha> \<SS>"
    and "2\<^sub>\<nat> \<le> vcard \<SS>"
    and "\<And>A. A \<in>\<^sub>\<circ> \<SS>\<lparr>\<T>\<rparr> \<Longrightarrow> A \<subseteq>\<^sub>\<circ> \<SS>\<lparr>\<A>\<rparr>"
    and "\<SS>\<lparr>\<A>\<rparr> \<in>\<^sub>\<circ> \<SS>\<lparr>\<T>\<rparr>"
    and "\<And>A B. A \<in>\<^sub>\<circ> \<SS>\<lparr>\<T>\<rparr> \<Longrightarrow> B \<in>\<^sub>\<circ> \<SS>\<lparr>\<T>\<rparr> \<Longrightarrow> A \<inter>\<^sub>\<circ> B \<in>\<^sub>\<circ> \<SS>\<lparr>\<T>\<rparr>"
    and "\<And>X. X \<subseteq>\<^sub>\<circ> \<SS>\<lparr>\<T>\<rparr> \<Longrightarrow> \<Union>\<^sub>\<circ>X \<in>\<^sub>\<circ> \<SS>\<lparr>\<T>\<rparr>"

Output:
using assms
by auto


Input:
lemma cat_singleton_CId_app:
  assumes "set {\<langle>j, a\<rangle>} \<in>\<^sub>\<circ> (\<Prod>\<^sub>Ci\<in>\<^sub>\<circ>set {j}. \<CC>)\<lparr>Obj\<rparr>"
  shows "(\<Prod>\<^sub>Ci\<in>\<^sub>\<circ>set {j}. \<CC>)\<lparr>CId\<rparr>\<lparr>set {\<langle>j, a\<rangle>}\<rparr> = set {\<langle>j, \<CC>\<lparr>CId\<rparr>\<lparr>a\<rparr>\<rangle>}"

Output:
using assms unfolding cat_prod_components VLambda_vsingleton
by simp


Input:
lemma (in is_tm_functor) tm_cf_ntcf_id_is_tm_ntcf':
  assumes "\<FF>' = \<FF>" and "\<GG>' = \<FF>"
  shows "ntcf_id \<FF> : \<FF>' \<mapsto>\<^sub>C\<^sub>F\<^sub>.\<^sub>t\<^sub>m \<GG>': \<AA> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>t\<^sub>m\<^bsub>\<alpha>\<^esub> \<BB>"

Output:
unfolding assms(1,2)
by (rule tm_cf_ntcf_id_is_tm_ntcf)


Input:
lemma (in category) cat_cf_lcomp_Hom_ObjMap_vrange:
  assumes "\<FF> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<R>\<^sub>\<circ> (Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(\<FF>-,-)\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> cat_Set \<alpha>\<lparr>Obj\<rparr>"

Output:
using category_axioms assms unfolding cf_lcomp_Hom_def
by (intro cf_cn_cov_lcomp_ObjMap_vrange) (cs_concl cs_intro: cat_cs_intros)


Input:
lemma (in is_dghm) dghm_is_arr_HomCod:
  assumes "f : a \<mapsto>\<^bsub>\<AA>\<^esub> b"
  shows "\<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> \<in>\<^sub>\<circ> \<BB>\<lparr>Arr\<rparr>" "\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>" "\<FF>\<lparr>ObjMap\<rparr>\<lparr>b\<rparr> \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>"

Output:
using assms
by (cs_concl cs_simp: dg_cs_simps cs_intro: dg_cs_intros)+


Input:
lemma is_iso_functorD':
  assumes "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<alpha>\<^esub> \<BB>"
  shows "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>"
    and "v11 (\<FF>\<lparr>ObjMap\<rparr>)"
    and "v11 (\<FF>\<lparr>ArrMap\<rparr>)"
    and "\<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>) = \<BB>\<lparr>Obj\<rparr>"
    and "\<R>\<^sub>\<circ> (\<FF>\<lparr>ArrMap\<rparr>) = \<BB>\<lparr>Arr\<rparr>"

Output: by ( simp_all add: is_iso_functorD[OF assms(1)] is_iso_semifunctorD'(2-5)[ OF is_iso_functorD(2)[OF assms(1)], unfolded slicing_simps ] )


Input:
lemma LK_\<sigma>23_NTMap_app_0[cat_Kan_cs_simps]:
  assumes "a = 0"
  shows "LK_\<sigma>23 \<TT> \<eta>' \<FF>'\<lparr>NTMap\<rparr>\<lparr>a\<rparr> = \<eta>'\<lparr>NTMap\<rparr>\<lparr>0\<rparr>"

Output:
using assms unfolding LK_\<sigma>23_components cat_ordinal_cs_simps
by simp


Input:
lemma (in is_cat_obj_prod) is_cat_obj_coprod_op:
  "op_ntcf \<pi> : A >\<^sub>C\<^sub>F\<^sub>.\<^sub>\<Coprod> P : I \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> op_cat \<CC>"

Output:
using cf_discrete_vdomain_vsubset_Vset
by (intro is_cat_obj_coprodI) (cs_concl cs_simp: cat_op_simps cs_intro: cat_cs_intros cat_op_intros)


Input:
lemma (in is_functor) is_functor_axioms'[cat_cs_intros]:
  assumes "\<alpha>' = \<alpha>" and "\<AA>' = \<AA>" and "\<BB>' = \<BB>"
  shows "\<FF> : \<AA>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>'\<^esub> \<BB>'"

Output:
unfolding assms
by (rule is_functor_axioms)


Input:
lemma dghm_comp_ObjMap_vdomain[dg_cs_simps]:
  assumes "\<GG> : \<BB> \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> \<CC>" and "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> \<BB>"
  shows "\<D>\<^sub>\<circ> ((\<GG> \<circ>\<^sub>D\<^sub>G\<^sub>H\<^sub>M \<FF>)\<lparr>ObjMap\<rparr>) = \<AA>\<lparr>Obj\<rparr>"

Output:
using assms
by ( cs_concl cs_simp: dghm_comp_components dg_cs_simps V_cs_simps cs_intro: is_dghm.dghm_ObjMap_vrange )


Input: lemma category_cat_prod_3[cat_cs_intros]: "category \<alpha> (\<AA> \<times>\<^sub>C\<^sub>3 \<BB> \<times>\<^sub>C\<^sub>3 \<CC>)"

Output:
unfolding cat_prod_3_def
by (rule pcat_category_cat_prod)


Input:
lemma finite_semicategoryI'':
  assumes "tiny_semicategory \<alpha> \<CC>" and "vfinite (\<CC>\<lparr>Obj\<rparr>)" and "vfinite (\<CC>\<lparr>Arr\<rparr>)"
  shows "finite_semicategory \<alpha> \<CC>"

Output:
using assms
by (intro finite_semicategoryI') (auto intro: smc_cs_intros smc_small_cs_intros)


Input:
lemma cf_bcomp_Hom_ObjMap_app[cat_cs_simps]:
  assumes "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
    and "\<GG> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
    and "[a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> (op_cat \<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>"
  shows "Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(\<FF>-,\<GG>-)\<lparr>ObjMap\<rparr>\<lparr>a, b\<rparr>\<^sub>\<bullet> =
    Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(-,-)\<lparr>ObjMap\<rparr>\<lparr>\<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>, \<GG>\<lparr>ObjMap\<rparr>\<lparr>b\<rparr>\<rparr>\<^sub>\<bullet>"

Output:
using assms unfolding cf_bcomp_Hom_def
by (rule cf_cn_cov_bcomp_ObjMap_app)


Input:
lemma cat_obj_cf_comma_Cod_app[cat_comma_cs_simps]:
  assumes "F = [baf, b'a'f', gh]\<^sub>\<circ>" and "F \<in>\<^sub>\<circ> b \<down>\<^sub>C\<^sub>F \<FF>\<lparr>Arr\<rparr>"
  shows "b \<down>\<^sub>C\<^sub>F \<FF>\<lparr>Cod\<rparr>\<lparr>F\<rparr> = b'a'f'"

Output:
using assms(2) unfolding assms(1) cat_obj_cf_comma_def cat_comma_components
by (simp add: nat_omega_simps)


Input: lemma cf_proj_snd_HomDom: "\<pi>\<^sub>C\<^sub>.\<^sub>2 \<AA> \<BB>\<lparr>HomDom\<rparr> = \<AA> \<times>\<^sub>C \<BB>"

Output: unfolding cf_proj_snd_def cf_proj_components cat_prod_2_def ..


Input:
lemma (in digraph) dg_Dom_app_in_Obj:
  assumes "f \<in>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>"
  shows "\<CC>\<lparr>Dom\<rparr>\<lparr>f\<rparr> \<in>\<^sub>\<circ> \<CC>\<lparr>Obj\<rparr>"

Output:
using assms dg_Dom_vrange
by (auto simp: Dom.vsv_vimageI2)


Input:
lemma bnt_proj_snd_is_iso_ntcf_if_is_iso_ntcf'[cat_cs_intros]:
  assumes "category \<alpha> \<AA>"
    and "category \<alpha> \<BB>"
    and "\<NN> : \<SS> \<mapsto>\<^sub>C\<^sub>F\<^sub>.\<^sub>i\<^sub>s\<^sub>o \<SS>' : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
    and "\<FF> = \<SS>\<^bsub>\<AA>,\<BB>\<^esub>(a,-)\<^sub>C\<^sub>F"
    and "\<GG> = \<SS>'\<^bsub>\<AA>,\<BB>\<^esub>(a,-)\<^sub>C\<^sub>F"
    and "\<BB>' = \<BB>"
    and "a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>"
  shows "\<NN>\<^bsub>\<AA>,\<BB>\<^esub>(a,-)\<^sub>N\<^sub>T\<^sub>C\<^sub>F : \<FF> \<mapsto>\<^sub>C\<^sub>F\<^sub>.\<^sub>i\<^sub>s\<^sub>o \<GG> : \<BB>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"

Output:
unfolding assms(4-6)
by (rule bnt_proj_snd_is_iso_ntcf_if_is_iso_ntcf[OF assms(1-3,7)])


Input:
lemma helper_I2_proj_fst_proj_snd_iff:
  "(\<forall>j\<in>\<^sub>\<circ>2\<^sub>\<nat>. \<pi>'\<lparr>NTMap\<rparr>\<lparr>j\<rparr> = \<pi>\<lparr>NTMap\<rparr>\<lparr>j\<rparr> \<circ>\<^sub>A\<^bsub>\<CC>\<^esub> f') \<longleftrightarrow>
    (proj_fst \<pi>' = proj_fst \<pi> \<circ>\<^sub>A\<^bsub>\<CC>\<^esub> f' \<and> proj_snd \<pi>' = proj_snd \<pi> \<circ>\<^sub>A\<^bsub>\<CC>\<^esub> f')"

Output:
unfolding two
by auto


Input:
lemma vequalizerD[dest]:
  assumes "x \<in>\<^sub>\<circ> vequalizer X f g"
  shows "x \<in>\<^sub>\<circ> X" and "f\<lparr>ArrVal\<rparr>\<lparr>x\<rparr> = g\<lparr>ArrVal\<rparr>\<lparr>x\<rparr>"

Output:
using assms unfolding vequalizer_def
by auto


Input:
lemma smc_FUNCT_Comp:
  "smc_FUNCT \<alpha> \<AA> \<BB>\<lparr>Comp\<rparr> =
    (\<lambda>\<GG>\<FF>\<in>\<^sub>\<circ>composable_arrs (smc_FUNCT \<alpha> \<AA> \<BB>). \<GG>\<FF>\<lparr>0\<rparr> \<bullet>\<^sub>N\<^sub>T\<^sub>C\<^sub>F\<^bsub>\<AA>,\<BB>\<^esub> \<GG>\<FF>\<lparr>1\<^sub>\<nat>\<rparr>)"

Output: unfolding smc_FUNCT_components smc_FUNCT_composable_arrs_dg_FUNCT ..


Input:
lemma cat_1_components:
  shows "cat_1 \<aa> \<ff>\<lparr>Obj\<rparr> = set {\<aa>}"
    and "cat_1 \<aa> \<ff>\<lparr>Arr\<rparr> = set {\<ff>}"
    and "cat_1 \<aa> \<ff>\<lparr>Dom\<rparr> = set {\<langle>\<ff>, \<aa>\<rangle>}"
    and "cat_1 \<aa> \<ff>\<lparr>Cod\<rparr> = set {\<langle>\<ff>, \<aa>\<rangle>}"
    and "cat_1 \<aa> \<ff>\<lparr>Comp\<rparr> = set {\<langle>[\<ff>, \<ff>]\<^sub>\<circ>, \<ff>\<rangle>}"
    and "cat_1 \<aa> \<ff>\<lparr>CId\<rparr> = set {\<langle>\<aa>, \<ff>\<rangle>}"

Output:
unfolding cat_1_def dg_field_simps
by (simp_all add: nat_omega_simps)


Input:
lemma (in is_tm_functor) cf_obj_cf_comma_proj_is_tm_functor'[cat_comma_cs_intros]:
  assumes "b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>" and "\<AA>' = b \<down>\<^sub>C\<^sub>F \<FF>"
  shows "b \<^sub>O\<Sqinter>\<^sub>C\<^sub>F \<FF> : \<AA>' \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>t\<^sub>m\<^bsub>\<alpha>\<^esub> \<AA>"

Output:
using assms(1) unfolding assms(2)
by (rule cf_obj_cf_comma_proj_is_tm_functor)


Input:
lemma ntcf_const_components:
  shows "ntcf_const \<JJ> \<CC> f\<lparr>NTMap\<rparr> = vconst_on (\<JJ>\<lparr>Obj\<rparr>) f"
    and "ntcf_const \<JJ> \<CC> f\<lparr>NTDom\<rparr> = cf_const \<JJ> \<CC> (\<CC>\<lparr>Dom\<rparr>\<lparr>f\<rparr>)"
    and "ntcf_const \<JJ> \<CC> f\<lparr>NTCod\<rparr> = cf_const \<JJ> \<CC> (\<CC>\<lparr>Cod\<rparr>\<lparr>f\<rparr>)"
    and "ntcf_const \<JJ> \<CC> f\<lparr>NTDGDom\<rparr> = \<JJ>"
    and "ntcf_const \<JJ> \<CC> f\<lparr>NTDGCod\<rparr> = \<CC>"

Output:
unfolding ntcf_const_def nt_field_simps
by (auto simp: nat_omega_simps)


Input:
lemma the_cf_rKe_ObjMap_vrange:
  assumes "\<And>c. c \<in>\<^sub>\<circ> \<CC>\<lparr>Obj\<rparr> \<Longrightarrow> lim_Obj c\<lparr>UObj\<rparr> \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>"
  shows "\<R>\<^sub>\<circ> (the_cf_rKe \<alpha> \<TT> \<KK> lim_Obj\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>"

Output:
unfolding the_cf_rKe_components'[OF \<KK> \<TT>]
by (intro vrange_VLambda_vsubset assms)


Input:
lemma (in category) cat_cf_Hom_snd_ObjMap_vdomain[cat_cs_simps]:
  assumes "a \<in>\<^sub>\<circ> \<CC>\<lparr>Obj\<rparr>"
  shows "\<D>\<^sub>\<circ> (Hom\<^sub>O\<^sub>.\<^sub>C\<^bsub>\<alpha>\<^esub>\<CC>(a,-)\<lparr>ObjMap\<rparr>) = \<CC>\<lparr>Obj\<rparr>"

Output:
using category_axioms assms unfolding cf_Hom_snd_def
by (cs_concl cs_simp: cat_cs_simps cs_intro: cat_cs_intros cat_op_intros)


Input:
lemma frameImpResCommRight':
  fixes x    :: name
  and   xvec :: "name list"
  and   F    :: "'b frame"

  shows "\<lparr>\<nu>*xvec\<rparr>(\<lparr>\<nu>x\<rparr>F) \<hookrightarrow>\<^sub>F \<lparr>\<nu>x\<rparr>(\<lparr>\<nu>*xvec\<rparr>F)"

Output: by(induct xvec) (auto intro: frameImpResComm FrameStatImpTrans frameImpResPres)


Input:
lemma is_ntsmcfE':
  assumes "\<NN> : \<FF> \<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^sub>F \<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>"
  obtains "\<Z> \<alpha>"
    and "vfsequence \<NN>"
    and "\<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>"
    and "\<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>"
    and "vcard \<NN> = 5\<^sub>\<nat>"
    and "\<NN>\<lparr>NTDom\<rparr> = \<FF>"
    and "\<NN>\<lparr>NTCod\<rparr> = \<GG>"
    and "\<NN>\<lparr>NTDGDom\<rparr> = \<AA>"
    and "\<NN>\<lparr>NTDGCod\<rparr> = \<BB>"
    and "vsv (\<NN>\<lparr>NTMap\<rparr>)"
    and "\<D>\<^sub>\<circ> (\<NN>\<lparr>NTMap\<rparr>) = \<AA>\<lparr>Obj\<rparr>"
    and "\<And>a. a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr> \<Longrightarrow> \<NN>\<lparr>NTMap\<rparr>\<lparr>a\<rparr> : \<FF>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr> \<mapsto>\<^bsub>\<BB>\<^esub> \<GG>\<lparr>ObjMap\<rparr>\<lparr>a\<rparr>"
    and "\<And>a b f. f : a \<mapsto>\<^bsub>\<AA>\<^esub> b \<Longrightarrow>
      \<NN>\<lparr>NTMap\<rparr>\<lparr>b\<rparr> \<circ>\<^sub>A\<^bsub>\<BB>\<^esub> \<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> = \<GG>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr> \<circ>\<^sub>A\<^bsub>\<BB>\<^esub> \<NN>\<lparr>NTMap\<rparr>\<lparr>a\<rparr>"

Output:
using assms
by (simp add: is_ntsmcfD')


Input:
lemma bifunctor_flip_ArrMap_vsv[cat_cs_intros]:
  "vsv (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ArrMap\<rparr>)"

Output:
unfolding bifunctor_flip_components
by (rule fflip_vsv)


Input:
lemma (in is_iso_dghm) iso_dghm_Arr_HomDom_if_Arr_HomCod[elim]:
  assumes "g \<in>\<^sub>\<circ> \<BB>\<lparr>Arr\<rparr>"
  obtains f where "f \<in>\<^sub>\<circ> \<AA>\<lparr>Arr\<rparr>" and "g = \<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<rparr>"

Output:
using assms ArrMap.vrange_atD iso_dghm_ArrMap_vrange
by blast


Input:
lemma (in is_cat_obj_prod) cat_obj_prod_unique_cone':
  assumes "\<pi>' : P' <\<^sub>C\<^sub>F\<^sub>.\<^sub>c\<^sub>o\<^sub>n\<^sub>e :\<rightarrow>: I A \<CC> : :\<^sub>C I \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<exists>!f'. f' : P' \<mapsto>\<^bsub>\<CC>\<^esub> P \<and> (\<forall>j\<in>\<^sub>\<circ>I. \<pi>'\<lparr>NTMap\<rparr>\<lparr>j\<rparr> = \<pi>\<lparr>NTMap\<rparr>\<lparr>j\<rparr> \<circ>\<^sub>A\<^bsub>\<CC>\<^esub> f')"

Output: by ( rule cat_lim_unique_cone'[ OF assms, unfolded the_cat_discrete_components(1) ] )


Input:
lemma (in \<Z>)
  M\<alpha>_Rel_arrow_lr_is_cat_Rel_arr_isomorphism'[cat_Rel_par_set_cs_intros]:
  assumes "A \<in>\<^sub>\<circ> cat_Rel \<alpha>\<lparr>Obj\<rparr>"
    and "B \<in>\<^sub>\<circ> cat_Rel \<alpha>\<lparr>Obj\<rparr>"
    and "C \<in>\<^sub>\<circ> cat_Rel \<alpha>\<lparr>Obj\<rparr>"
    and "A' = (A \<times>\<^sub>\<circ> B) \<times>\<^sub>\<circ> C"
    and "B' = A \<times>\<^sub>\<circ> (B \<times>\<^sub>\<circ> C)"
    and "\<CC>' = cat_Rel \<alpha>"
  shows "M\<alpha>_Rel_arrow_lr A B C : A' \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<CC>'\<^esub> B'"

Output:
using assms(1-3) unfolding assms(4-6)
by (rule M\<alpha>_Rel_arrow_lr_is_cat_Rel_arr_isomorphism)


Input:
lemma bnt_proj_fst_components:
  shows "(\<NN>\<^bsub>\<AA>,\<BB>\<^esub>(-,b)\<^sub>N\<^sub>T\<^sub>C\<^sub>F)\<lparr>NTMap\<rparr> = (\<lambda>a\<in>\<^sub>\<circ>\<AA>\<lparr>Obj\<rparr>. \<NN>\<lparr>NTMap\<rparr>\<lparr>a, b\<rparr>\<^sub>\<bullet>)"
    and "(\<NN>\<^bsub>\<AA>,\<BB>\<^esub>(-,b)\<^sub>N\<^sub>T\<^sub>C\<^sub>F)\<lparr>NTDom\<rparr> = \<NN>\<lparr>NTDom\<rparr>\<^bsub>\<AA>,\<BB>\<^esub>(-,b)\<^sub>C\<^sub>F"
    and "(\<NN>\<^bsub>\<AA>,\<BB>\<^esub>(-,b)\<^sub>N\<^sub>T\<^sub>C\<^sub>F)\<lparr>NTCod\<rparr> = \<NN>\<lparr>NTCod\<rparr>\<^bsub>\<AA>,\<BB>\<^esub>(-,b)\<^sub>C\<^sub>F"
    and "(\<NN>\<^bsub>\<AA>,\<BB>\<^esub>(-,b)\<^sub>N\<^sub>T\<^sub>C\<^sub>F)\<lparr>NTDGDom\<rparr> = \<AA>"
    and "(\<NN>\<^bsub>\<AA>,\<BB>\<^esub>(-,b)\<^sub>N\<^sub>T\<^sub>C\<^sub>F)\<lparr>NTDGCod\<rparr> = \<NN>\<lparr>NTDGCod\<rparr>"

Output:
unfolding bnt_proj_fst_def nt_field_simps
by (simp_all add: nat_omega_simps)


Input:
lemma (in \<Z>) vsnd_arrow_is_cat_Par_arr'[cat_rel_Par_set_cs_intros]:
  assumes "A \<in>\<^sub>\<circ> cat_Par \<alpha>\<lparr>Obj\<rparr>"
    and "B \<in>\<^sub>\<circ> cat_Par \<alpha>\<lparr>Obj\<rparr>"
    and "AB = A \<times>\<^sub>\<circ> B"
    and "B' = B"
    and "\<CC>' = cat_Par \<alpha>"
  shows "vsnd_arrow A B : AB \<mapsto>\<^bsub>\<CC>'\<^esub> B'"

Output:
using assms(1-2) unfolding assms(3-5)
by (rule vsnd_arrow_is_cat_Par_arr)


Input:
lemma (in is_cat_lKe_preserves) is_cat_rKe_preserves_op'[cat_op_intros]:
  assumes "\<TT>' = op_cf \<TT>"
    and "\<FF>' = op_cf \<FF>"
    and "\<KK>' = op_cf \<KK>"
    and "\<HH>' = op_cf \<HH>"
    and "\<BB>' = op_cat \<BB>"
    and "\<AA>' = op_cat \<AA>"
    and "\<CC>' = op_cat \<CC>"
    and "\<DD>' = op_cat \<DD>"
  shows "op_ntcf \<eta> :
    \<FF>' \<circ>\<^sub>C\<^sub>F \<KK>' \<mapsto>\<^sub>C\<^sub>F\<^sub>.\<^sub>r\<^sub>K\<^sub>e\<^bsub>\<alpha>\<^esub> \<TT>' : \<BB>' \<mapsto>\<^sub>C \<CC>' \<mapsto>\<^sub>C (\<HH>' : \<AA>' \<mapsto>\<mapsto>\<^sub>C \<DD>')"

Output:
unfolding assms
by (rule is_cat_rKe_preserves_op)


Input: lemma dghm_proj_fst_HomDom: "\<pi>\<^sub>D\<^sub>G\<^sub>.\<^sub>1 \<AA> \<BB>\<lparr>HomDom\<rparr> = \<AA> \<times>\<^sub>D\<^sub>G \<BB>"

Output: unfolding dghm_proj_fst_def dghm_proj_components dg_prod_2_def ..


Input:
lemma \<KK>23_components:
  shows "\<KK>23\<lparr>ObjMap\<rparr> = (\<lambda>a\<in>\<^sub>\<circ>cat_ordinal (2\<^sub>\<nat>)\<lparr>Obj\<rparr>. if a = 0 then 0 else 2\<^sub>\<nat>)"
    and "\<KK>23\<lparr>ArrMap\<rparr> =
      (
        \<lambda>f\<in>\<^sub>\<circ>cat_ordinal (2\<^sub>\<nat>)\<lparr>Arr\<rparr>.
         if f = [0, 0]\<^sub>\<circ> \<Rightarrow> [0, 0]\<^sub>\<circ>
          | f = [0, 1\<^sub>\<nat>]\<^sub>\<circ> \<Rightarrow> [0, 2\<^sub>\<nat>]\<^sub>\<circ>
          | f = [1\<^sub>\<nat>, 1\<^sub>\<nat>]\<^sub>\<circ> \<Rightarrow> [2\<^sub>\<nat>, 2\<^sub>\<nat>]\<^sub>\<circ>
          | otherwise \<Rightarrow> 0
      )"
    and [cat_Kan_cs_simps]: "\<KK>23\<lparr>HomDom\<rparr> = cat_ordinal (2\<^sub>\<nat>)"
    and [cat_Kan_cs_simps]: "\<KK>23\<lparr>HomCod\<rparr> = cat_ordinal (3\<^sub>\<nat>)"

Output:
unfolding \<KK>23_def dghm_field_simps
by (simp_all add: nat_omega_simps)


Input:
lemma frameResComm':
  fixes x    :: name
  and   xvec :: "name list"
  and   F    :: "'b frame"

  shows "\<lparr>\<nu>x\<rparr>(\<lparr>\<nu>*xvec\<rparr>F) \<simeq>\<^sub>F \<lparr>\<nu>*xvec\<rparr>(\<lparr>\<nu>x\<rparr>F)"

Output: by(induct xvec) (auto intro: frameResComm FrameStatEqTrans frameResPres)


Input:
lemma is_right_inverseI:
  assumes "g : b \<mapsto>\<^bsub>\<CC>\<^esub> a" and "f : a \<mapsto>\<^bsub>\<CC>\<^esub> b" and "f \<circ>\<^sub>A\<^bsub>\<CC>\<^esub> g = \<CC>\<lparr>CId\<rparr>\<lparr>b\<rparr>"
  shows "is_right_inverse \<CC> g f"

Output:
using assms unfolding is_right_inverse_def
by auto


Input: lemma the_cat_discrete_Comp_vsv[cat_discrete_cs_intros]: "vsv (:\<^sub>C I\<lparr>Comp\<rparr>)"

Output:
unfolding the_cat_discrete_components
by simp


Input:
lemma (in \<Z>) cat_CAT_is_arr_isomorphism_iff[cat_CAT_simps]:
  "\<FF> : \<AA> \<mapsto>\<^sub>i\<^sub>s\<^sub>o\<^bsub>cat_CAT \<alpha>\<^esub> \<BB> \<longleftrightarrow> \<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^sub>.\<^sub>i\<^sub>s\<^sub>o\<^bsub>\<alpha>\<^esub> \<BB>"

Output:
using cat_CAT_is_arr_isomorphismI cat_CAT_is_arr_isomorphismD
by auto


Input:
lemma dghm_up_ArrMap_app_component[dg_cs_simps]:
  assumes "a \<in>\<^sub>\<circ> \<CC>\<lparr>Arr\<rparr>" and "i \<in>\<^sub>\<circ> I"
  shows "dghm_up I \<AA> \<CC> \<phi>\<lparr>ArrMap\<rparr>\<lparr>a\<rparr>\<lparr>i\<rparr> = \<phi> i\<lparr>ArrMap\<rparr>\<lparr>a\<rparr>"

Output:
using assms unfolding dghm_up_components
by simp


Input: lemma R_zero_one: "x \<le> Ref 0 1"

Output:
proof - have "H 0 x 1"
by (simp add: Hoare_def) thus ?thesis
by (rule R2)
qed


Input: theorem re_refine_aux2: "gen_dfs \<le>\<Down>(rel O \<langle>ES\<rangle>simple_state_rel) a.a.it_dfs"

Output:
proof - note re_refine_aux also note a.gen_dfs_refine finally show ?thesis
by (simp add: conc_fun_chain del: graph_restrict_simps)
qed


Input:
lemma fn_not_fst:
  shows "Fn x T A \<noteq> Fst P"

Output:
proof(transfer) fix x :: 'a and T A P show "\<not>PFn x T A \<approx> PFst P"
proof(rule classical) assume "\<not>\<not>PFn x T A \<approx> PFst P" hence False
using fnE
by fastforce thus ?thesis
by blast
qed
qed


Input: lemma NOT_elementaryCompDD_sA8:  "\<not> elementaryCompDD sA8"

Output:
proof - have "outSetCorelated data20 \<inter> outSetCorelated data21 = {}"
by (metis OUTfromV.simps(21) inf_bot_right outSetCorelatedEmpty1) thus ?thesis
by (simp add: elementaryCompDD_def)
qed


Input:
lemma msg_nonempty1:
  assumes h1:"msg (Suc 0) a"
         and h2:"a t = aa # l"
  shows "l = []"

Output:
proof - from h1 have "length (a t) \<le> Suc 0"
by (simp add: msg_def) from h2 and this show ?thesis
by auto
qed


Input: lemma exp_not_eq_zero [simp]: "exp x \<noteq> 0"

Output:
proof have "exp x * exp (- x) = 1"
by (simp add: exp_add_commuting[symmetric]) also assume "exp x = 0" finally show False
by simp
qed


Input: lemma unat_of_bl_128_16_le_helper: "unat ((of_bl:: bool list \<Rightarrow> 128 word) (to_bl (b::16 word))) \<le> 65535"

Output:
proof - from unat_of_bl_128_16_less_helper[of b] have "unat ((of_bl:: bool list \<Rightarrow> 128 word) (to_bl b)) < 65536"
by simp from Suc_leI[OF this] show ?thesis
by simp
qed


Input: lemma lim_h_minus_finite [simp]: "lim_h_minus e \<noteq> top"

Output:
proof - have "lim_h_minus e \<le> lim_h_plus e"
by(rule lim_h_minus_le_lim_h_plus) also have "\<dots> < top" unfolding less_top[symmetric]
by (rule lim_h_plus_finite) finally show ?thesis unfolding less_top[symmetric]
by simp
qed


Input:
lemma nonneg_dirichlet_series_lnD:
  assumes "nonneg_dirichlet_series (fds_ln l f)" "exp l = fds_nth f (Suc 0)"
  shows   "nonneg_dirichlet_series f"

Output:
proof - from assms have "nonneg_dirichlet_series (fds_exp (fds_ln l f))"
by (intro nonneg_dirichlet_series.nonneg_exp) thus ?thesis
using assms
by simp
qed


Input: lemma le_max3I2: "(n3::nat) \<le> max n1 (max n2 n3)"

Output:
proof - have "n3 \<le> max n2 n3"
by (rule max.cobounded2) also have "max n2 n3 \<le> max n1 (max n2 n3)"
by (rule max.cobounded2) finally show ?thesis .
qed


Input:
lemma acyclicLexLess:
  shows "acyclic lexLess"

Output:
proof (rule transIrreflexiveOrderingIsAcyclic) show "trans lexLess"
using translexLess . show "\<forall> x. (x, x) \<notin> lexLess"
using irreflexiveLexLess
by auto
qed


Input:
lemma complete_lattice_lattice [simp]:
  assumes "complete_lattice X"
  shows "lattice X"

Output:
proof - interpret c: complete_lattice X
by (simp add: assms) show ?thesis
by (unfold_locales)
qed


Input: lemma abundant220ex: "abundant_number 220"

Output:
proof- have "220 Amic 284"
using Amicable_Example_Pythagoras
by simp moreover have "(220::nat) < 284"
by simp ultimately show ?thesis
using Amicable_pair_abundant Amicable_pair_sym
by blast
qed


Input:
lemma in_Sup_multisetD:
  assumes "x \<in># Sup A"
  shows   "\<exists>X\<in>A. x \<in># X"

Output:
proof - have "subset_mset.bdd_above A"
by (rule ccontr) (insert assms, simp_all add: Sup_multiset_unbounded) with assms show ?thesis
by (simp add: in_Sup_multiset_iff)
qed


Input:
theorem robbins_is_boolean:
  "class.boolean_algebra minus uminus (\<sqinter>) (\<sqsubseteq>) (\<sqsubset>) (\<squnion>) \<bottom> \<top>"

Output:
proof - interpret huntington: huntington_algebra uminus "(\<sqinter>)" "(\<squnion>)" \<bottom> \<top>
by (fact robbins_is_huntington) show ?thesis
by (simp add: huntington.huntington_is_boolean)
qed


Input:
lemma notFinished_WtFT[simp]:
assumes "n < length cl" and "\<not> finished (cl ! n)"
shows "1 / length cl \<le> 1 - WtFT cl"

Output:
proof- have "0 < length cl"
using assms
by auto thus ?thesis unfolding WtFT_def
apply(intro sum_1[of "{..< length cl}"])
using assms
by auto
qed


Input: lemma open_ball [intro, simp]: "open (ball x e)"

Output:
proof - have "open (dist x -` {..<e})"
by (intro open_vimage open_lessThan continuous_intros) also have "dist x -` {..<e} = ball x e"
by auto finally show ?thesis .
qed


Input: lemma (in tiny_semicategory) tiny_smc_in_Vset: "\<CC> \<in>\<^sub>\<circ> Vset \<alpha>"

Output:
proof- note [smc_cs_intros] = tiny_smc_Obj_in_Vset tiny_smc_Arr_in_Vset tiny_smc_Dom_in_Vset tiny_smc_Cod_in_Vset tiny_smc_Comp_in_Vset show ?thesis
by (subst smc_def) (cs_concl cs_intro: smc_cs_intros V_cs_intros)
qed


Input: lemma l0e: "(e*c)/(f2*(e-1)) \<le> l0"

Output:
proof- have 0: "f2 * (l0 * min e c) \<le> e * (f2 * l0)"
by (simp add: min_def ac_simps mult_right_mono) from l0 show ?thesis
apply(simp add: field_simps)
using 0
by linarith
qed


Input:
theorem pi_series: "pi / 4 = (\<Sum>k. (-1)^k * 1 / real (k * 2 + 1))"
  (is "_ = ?SUM")

Output:
proof - have "pi / 4 = arctan 1"
using arctan_one
by auto also have "\<dots> = ?SUM"
using arctan_series[of 1]
by auto finally show ?thesis
by auto
qed


Input:
lemma "r\<lparr>xpos := n\<rparr> = r\<lparr>xpos := n'\<rparr>" if "n = n'"
  \<comment> \<open>elimination of abstract record equality (manual proof)\<close>

Output:
proof - let "?lhs = ?rhs" = ?thesis from that have "xpos ?lhs = xpos ?rhs"
by simp then show ?thesis
by simp
qed


Input: lemma nat_to_sch_at_2: "nat_to_sch 2 = Base_suc"

Output:
proof - have S1: "c_pair 1 0 = 2"
by (simp add: c_pair_def sf_def) have S2: "nat_to_sch (c_pair 1 0) = Base_suc"
by (rule loc_srj_0) from S1 S2 show ?thesis
by simp
qed


Input: lemma PO_m2_inv6_resp_ikk [iff]: "reach m2 \<subseteq> m2_inv7_ikk_resp"

Output:
proof - have "reach m2 \<subseteq> m1_inv2r_serv \<inter> m2_inv5_ikk_sv"
by simp also have "... \<subseteq> m2_inv7_ikk_resp"
by (blast intro!: m2_inv7_ikk_respI dest: m2_inv5_ikk_svD) finally show ?thesis .
qed


Input:
lemma finite_imp_card_less:
    assumes "finite A"
    shows "|A| <o \<AA>"

Output:
proof - have "finite (Field |A| )"
using assms
by simp thus ?thesis
using cardinal card_of_Well_order card_order_on_def finite_ordLess_infinite
by blast
qed


Input: lemma R_one_zero: "R 1 0 = 0"

Output:
proof - have "H 1 (R 1 0) 0"
by (simp add: R1) thus ?thesis
by (simp add: H_def join.le_bot)
qed


Input: lemma zero_matrix_def_nrows[simp]: "nrows 0 = 0"

Output:
proof - have a:"!! (x::nat). x <= 0 \<Longrightarrow> x = 0"
by (arith) show "nrows 0 = 0"
by (rule a, subst nrows_le, simp)
qed


Input: lemma many_reducible_to_via_refl: "many_reducible_to_via A A (\<lambda> x. x)"

Output:
proof - have "one_reducible_to_via A A (\<lambda> x. x)"
by (rule one_reducible_to_via_refl) then show ?thesis
by (rule one_reducibility_via_is_many)
qed


Input:
lemma ZX_is_gate [simp]:
  shows "gate 1 ZX"

Output:
proof show "dim_row ZX = 2 ^ 1"
using mat_of_cols_list_def
by simp show "square_mat ZX"
using mat_of_cols_list_def
by simp show "unitary ZX"
using unitary_def l_inv_of_ZX r_inv_of_ZX mat_of_cols_list_def
by auto
qed


Input: lemma vint_non_triviality: "0\<^sub>\<int> \<noteq> 1\<^sub>\<int>"

Output:
proof- have "0 \<noteq> (1::int)"
by simp from this[untransferred] show ?thesis .
qed


Input: lemma B_nonneg: "B \<ge> 0"

Output:
proof - have "0 \<le> norm (f t0 x0)"
by simp also from b_pos norm_f have "... \<le> B"
by (simp add: initial_time_in X_def) finally show ?thesis
by simp
qed


Input: lemma h_minus_mono: "h_minus i e \<le> h_minus (Suc i) e"

Output:
proof - have "h_minus i e + 0 \<le> h_minus (Suc i) e" unfolding h_minus.simps
by(rule add_mono; simp add: SUP_upper2) thus ?thesis
by simp
qed


Input: lemma conjugate_1[simp]: "(conjugate 1 :: 'a :: {conjugatable_ring, ring_1}) = 1"

Output:
proof- have "conjugate 1 * 1 = (conjugate 1 :: 'a)"
by simp also have "conjugate \<dots> = 1"
by simp finally show ?thesis
by (unfold conjugate_dist_mul, simp)
qed


Input: lemma finite_UNIV_tree: "finite (UNIV :: 'a tree set) \<longleftrightarrow> False"

Output:
proof - have "rangeIt Leaf (Node (undefined :: 'a) Leaf) \<subseteq> UNIV"
by simp from finite_subset[OF this] show ?thesis
by auto
qed


Input: lemma assumes s: "sigma_algebra a" shows sigma_algebra_UNIV: "UNIV \<in> a"

Output:
proof - from s have "{}\<in>a"
by (unfold sigma_algebra_def) blast with s show ?thesis
by (unfold sigma_algebra_def) auto
qed


Input:
theorem inversion_number_between_sorted_correct:
  "sorted_wrt less_eq xs \<Longrightarrow> sorted_wrt less_eq ys \<Longrightarrow>
     inversion_number_between_sorted xs ys = inversion_number_between xs ys"

Output: by (induction xs ys rule: inversion_number_between_sorted.induct) (simp_all add: inversion_number_between_Cons_Cons)


Input:
lemma pdevs_val_perm:
  assumes "xs <~~> ys"
  assumes mem: "e \<in> UNIV \<rightarrow> I"
  obtains e' where "e' \<in> UNIV \<rightarrow> I"
    "pdevs_val e (pdevs_of_list xs) = pdevs_val e' (pdevs_of_list ys)"

Output:
using assms
by (metis pdevs_val_perm_ex)


Input:
lemma hb_consistent_append_D1 [dest]:
  assumes "hb_consistent (xs @ ys)"
  shows   "hb_consistent xs"

Output:
using assms
by(induction ys arbitrary: xs rule: List.rev_induct) auto


Input:
lemma interleavings_set:
  assumes "interleavings xs ys zs"
  shows "set xs \<union> set ys = set zs"

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


Input: lemma linear_split_sm: "\<lbrakk>linear_split_help xs p ys = (ls,rs); sorted_less (separators (ys@xs)); \<forall>sep \<in> set (separators ys). p > sep\<rbrakk> \<Longrightarrow> \<forall>sep \<in> set (separators ls). p > sep"

Output:
apply(induction xs p ys rule: linear_split_help.induct)
apply(simp_all)
by (metis prod.inject)+


Input:
lemma list_succ_short:
  assumes "length xs < 2" shows "list_succ xs = id"

Output:
using assms
by (cases xs) (rename_tac [2] y ys, case_tac [2] ys, auto simp: list_succ_Nil list_succ_singleton)


Input:
lemma ldropWhile_Lazy_llist [code]:
  "ldropWhile P (Lazy_llist xs) =
   Lazy_llist (\<lambda>_. case xs () of None \<Rightarrow> None | Some (x, ys) \<Rightarrow> if P x then force (ldropWhile P ys) else Some (x, ys))"

Output: by(auto split: llist.split)


Input: lemma length_list_updates[simp]: "length (list_updates xs ys vs) = length vs"

Output: by (induction xs ys vs rule: list_updates.induct) simp_all


Input:
lemma
  shows length_runs: "length (runs xs) \<le> length xs"
    and length_asc: "ascP f \<Longrightarrow> length (asc a f ys) \<le> 1 + length ys"
    and length_desc: "length (desc a xs ys) \<le> 1 + length ys"

Output: by (induct xs and a f ys and a xs ys rule: runs_asc_desc.induct) auto


Input:
lemma bal_def2[code]:
"bal n xs =
  (if n=0 then (Leaf,xs) else
  (let m = n div 2;
       (l, ys) = bal m xs;
       (r, zs) = bal (n-1-m) (tl ys)
   in (Node l (hd ys) r, zs)))"

Output:
using val_cong[OF bal_tm.simps(1)]
by(simp only: bal_def val_simps)


Input: lemma edrop_mono: "xs \<le> ys \<Longrightarrow> edrop n xs \<le> edrop n ys"

Output:
using mono_edrop[of n xs]
by (auto simp add: less_eq_list_def prefix_def)


Input: lemma is_prefix'_correct: "is_prefix' xs ys \<le> ESPEC (\<lambda>_. False) (\<lambda>r. r \<longleftrightarrow> xs = take (length xs) ys)"

Output:
unfolding is_prefix'_def
apply refine_vcg
by auto


Input:
lemma lex_ext_stri_imp_nstri:
  assumes "fst (lex_ext f m xs ys)"
  shows "snd (lex_ext f m xs ys)"

Output:
using assms
by (auto simp: lex_ext_iff)


Input: lemma zip_with_map_right: "zip_with f xs (map g ys) = zip_with (\<lambda>x y. f x (g y)) xs ys"

Output:
using zip_with_map[of f "\<lambda>x. x" xs g ys]
by simp


Input: lemma eq_append_same1: "eq xs' ys' \<Longrightarrow> eq (xs @ xs') (xs @ ys')"

Output: by(induction rule: equivclp_induct)(auto intro: cancel1_append_same1 equivclp_into_equivclp)


Input:
lemma list_take_drop_imp_eq: "
  \<lbrakk> xs \<down> n = ys \<down> n;  xs \<up> n = ys \<up> n \<rbrakk> \<Longrightarrow> xs = ys"

Output:
apply (rule subst[OF append_take_drop_id[of n xs]])
apply (rule subst[OF append_take_drop_id[of n ys]])
apply simp done


Input:
lemma rotate1_map2:
  "length xs = length ys \<Longrightarrow>
    rotate1 (map2 f xs ys) = map2 f (rotate1 xs) (rotate1 ys)"

Output: by (cases xs; cases ys) auto


Input: lemma interleave_comm: "xs \<in> ys \<otimes> zs \<Longrightarrow> xs \<in> zs \<otimes> ys"

Output: by (induction rule: interleave_induct) (auto intro: interleave_intros)


Input:
lemma weight_append:
  "weight (xs @ a # ys) = weight (xs @ [a]) + weight (a # ys)"

Output: by (induction xs rule: weight.induct; simp add: add.assoc)


Input:
lemma lprefix_lmergeI:
  "\<lbrakk> lprefix xs xs'; lprefix ys ys' \<rbrakk>
  \<Longrightarrow> lprefix (lmerge xs ys) (lmerge xs' ys')"

Output: by(coinduction arbitrary: xs xs' ys ys')(fastforce simp add: lhd_lmerge ltl_lmerge dest: lprefix_lhdD lprefix_lNoneD simp add: not_lNone_conv split: if_split_asm)


Input:
lemma asSort_inj[simp]:
"(asSort xs = asSort ys) = (xs = ys)"

Output:
using varSortAsSort_inj_INNER unfolding inj_on_def
by auto


Input:
lemma c_merge_pairs:
  "c_merge_pairs xss \<le> length (concat xss)"

Output:
proof (induct xss rule: c_merge_pairs.induct) case (1 xs ys zss) then show ?case
using c_merge [of xs ys]
by simp
qed simp_all


Input:
lemma merge_conv_merge_it[code_unfold]:
  "merge f xs ys = merge_it f xs ys"

Output:
unfolding merge_it_def
using merge_conv_merge_it' rev.simps(1) append_Nil
by metis


Input:
lemma lexordp_eq_code[code]: "lexordp_eq xs ys \<longleftrightarrow> (case xs of [] \<Rightarrow> True
  | x # xs \<Rightarrow> (case ys of [] \<Rightarrow> False
    | y # ys \<Rightarrow> if x < y then True else if x > y then False else lexordp_eq xs ys))"

Output: by (subst lexordp_eq.simps) (auto split: list.split)


Input:
lemma widen_append1:
  "P \<turnstile> (xs @ ys) [\<le>] Ts = (\<exists>Ts1 Ts2. Ts = Ts1 @ Ts2 \<and> length xs = length Ts1 \<and> length ys = length Ts2 \<and> P \<turnstile> xs [\<le>] Ts1 \<and> P \<turnstile> ys [\<le>] Ts2)"

Output:
unfolding list_all2_append1
by fastforce


Input: lemma list_drop_eq_conv: "(xs = ys) = (\<forall>n. xs \<up> n = ys \<up> n)"

Output:
apply (rule iffI, simp)
apply (drule_tac x=0 in spec)
apply simp done


Input:
lemma linear_split_gr:
  "\<lbrakk>linear_split_help xs p ys = (ls,rs); sorted_less (separators (ys@xs)); \<forall>(sub,sep) \<in> set ys. p > sep\<rbrakk> \<Longrightarrow>
(case rs of [] \<Rightarrow> True | (_,sep)#_ \<Rightarrow> p \<le> sep)"

Output:
apply(cases rs)
by (auto simp add: some_child_sm)


Input: lemma butlast_append_Cons[simp]: "butlast (xs @ y # ys) = xs @ butlast (y # ys)"

Output:
using butlast_append[of xs "y # ys", simplified]
by simp


Input:
lemma ordered_insert_pairs_map [rewrite]:
  "map_of_alist (ordered_insert_pairs x v ys) = update_map (map_of_alist ys) x v"

Output: @proof @induct ys @qed


Input: lemma prog_configs_append: "\<And>ys. prog_configs (xs@ys) = prog_configs xs \<union> prog_configs ys"

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


Input:
lemma dropWhile_append:
  "dropWhile P (xs @ ys) = (if \<forall>x\<in>set xs. P x then dropWhile P ys else dropWhile P xs @ ys)"

Output:
using dropWhile_append1[of _ xs P ys] dropWhile_append2[of xs P ys]
by auto


Input: theorem app_eq: "app xs ys zs = (zs = xs @ ys)"

Output:
apply (rule iffI)
apply (erule app_eq2)
apply (erule app_eq1) done


Input: lemma zip_with_swap: "zip_with (\<lambda>x y. f y x) xs ys = zip_with f ys xs"

Output: by (induction f ys xs rule: zip_with.induct) simp_all


Input:
lemma lfinite_lrel_eq:
   "lrel R xs ys \<Longrightarrow> lfinite xs = lfinite ys"

Output:
using lfinite_lrel lfinite_lrel'
by blast+


Input:
lemma not_min_maxsimpchainI_betw:
  "\<lbrakk> maxsimpchain (x#ys@[y]); length ys < length xs \<rbrakk> \<Longrightarrow>
    \<not> min_maxsimpchain (x#xs@[y])"

Output:
using min_maxsimpchainD_min_betw not_less
by blast


Input:
lemma list_induct3_snoc_Conssnoc_Cons_pairwise
      [case_names Nil1 Nil2 Nil3 snoc_single_Cons snoc_Conssnoc_Cons]:
  assumes Nil1              : "\<And>ys zs. P [] ys zs"
  and     Nil2              : "\<And>xs zs. P xs [] zs"
  and     Nil3              : "\<And>xs ys. P xs ys []"
  and     snoc_single_Cons  : "\<And>xs x y z zs. P (xs@[x]) [y] (z#zs)"
  and     snoc_Conssnoc_Cons:
    "\<And>xs x y ys w z zs. P xs ys zs \<Longrightarrow> P xs (ys@[w]) (z#zs) \<Longrightarrow>
      P (xs@[x]) (y#ys) zs \<Longrightarrow> P (xs@[x]) (y#ys@[w]) (z#zs)"
  shows   "P xs ys zs"

Output:
using assms prod_list_induct3_snoc_Conssnoc_Cons_pairwise[of "\<lambda>(xs,ys,zs). P xs ys zs"]
by auto


Input: lemma lappend_assoc: "lappend (lappend xs ys) zs = lappend xs (lappend ys zs)"

Output: by(coinduction arbitrary: xs rule: llist.coinduct_strong) auto


Input:
lemma paths_lappendD2:
  assumes "lfinite xs"
  and "lappend xs ys \<in> paths graph"
  shows "ys \<in> paths graph"

Output:
using assms
by induct(fastforce elim: paths.cases intro: paths.intros)+


Input:
lemma traverse_list_app[simp]: "traverse_list f (xs @ ys) = do {
  xs \<leftarrow> traverse_list f xs;
  ys \<leftarrow> traverse_list f ys;
  return (xs @ ys)
}"

Output: by (induction xs) auto


Input: lemma those_eq_Some_lengthD: "those xs = Some ys \<Longrightarrow> length xs = length ys"

Output: by (induction xs arbitrary: ys) (auto split: option.splits)


Input:
lemma map_of_zip_is_Some:
  assumes "length xs = length ys"
  shows "x \<in> set xs \<longleftrightarrow> (\<exists>y. map_of (zip xs ys) x = Some y)"

Output:
using assms
by (induct rule: list_induct2) simp_all


Input:
lemma lprefix_antisym:
  "\<lbrakk> xs \<sqsubseteq> ys; ys \<sqsubseteq> xs \<rbrakk> \<Longrightarrow> xs = ys"

Output: by(coinduction arbitrary: xs ys)(auto simp add: not_lNone_conv lprefix_lNone)


Input: lemma start_remove_id[simp]: "x \<notin> set xs \<Longrightarrow> start_remove xs x ys = rev ys @ xs"

Output: by (induction xs arbitrary: ys) auto


Input:
lemma emb_Ball_lset_antimono:
  assumes "emb Xs Ys"
  shows "\<forall>Y \<in> lset Ys. x \<in> Y \<Longrightarrow> \<forall>X \<in> lset Xs. x \<in> X"

Output:
using emb_lset_mono[OF assms]
by blast


Input:
lemma transpose_aux_filter_tail:
  "concat (map (case_list [] (\<lambda>h t. [t])) xss) =
  map (\<lambda>xs. tl xs) (filter (\<lambda>ys. ys \<noteq> []) xss)"

Output: by (induct xss) (auto split: list.split)


Input: lemma lprefix_llength_le: "xs \<sqsubseteq> ys \<Longrightarrow> llength xs \<le> llength ys"

Output:
using monotone_llength
by(rule monotoneD)


Input: lemma szip_eq_scons[iff]: "szip xs ys = z ## zs \<longleftrightarrow> (shd xs, shd ys) = z \<and> szip (stl xs) (stl ys) = zs"

Output:
using szip.ctr stream.inject
by metis


Input:
lemma llist_all2_conj:
  "llist_all2 (\<lambda>x y. P x y \<and> Q x y) xs ys \<longleftrightarrow> llist_all2 P xs ys \<and> llist_all2 Q xs ys"

Output: by(auto simp add: llist_all2_conv_all_lnth)


Input:
lemma card_union_inter_fset:
  shows "card_fset xs + card_fset ys = card_fset (xs |\<union>| ys) + card_fset (xs |\<inter>| ys)"

Output:
unfolding card_fset union_fset inter_fset
by (rule card_Un_Int[OF finite_fset finite_fset])


Input: lemma mset_shuffles: "zs \<in> shuffles xs ys \<Longrightarrow> mset zs = mset xs + mset ys"

Output: by (induction xs ys arbitrary: zs rule: shuffles.induct) auto


Input:
lemma in_set_update_listD:
  assumes "y \<in> set (update_list n x ys)"
  shows "y = (n, x) \<or> (y \<in> set ys)"

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


Input:
lemma retract_cancel1:
  assumes "cancel1 ys (map f xs)"
  shows "\<exists>zs. eq xs zs \<and> ys = map f zs"

Output:
using retract_cancel1_aux[OF assms]
by(blast intro: symclpI)


Input: lemma eq_set_eq: "set xs = set ys" if "eq xs ys"

Output:
using that
by(induction)(auto dest!: cancel1_set_eq elim!: symclpE)


Input:
lemma msetext_huet_mono_strong:
  "(\<forall>y \<in> set ys. \<forall>x \<in> set xs. gt y x \<longrightarrow> gt' y x) \<Longrightarrow> msetext_huet gt ys xs \<Longrightarrow> msetext_huet gt' ys xs"

Output:
unfolding msetext_huet_def
by (metis less_le_trans mem_Collect_eq not_le not_less0 set_mset_mset[unfolded set_mset_def])


Input:
lemma ex_list_all2:
assumes "\<And>x. x \<in> set xs \<Longrightarrow> \<exists>y. f x y"
shows "\<exists> ys. list_all2 f xs ys"

Output:
using assms
apply(induct xs)
apply fastforce
by (metis set_simps insertCI list_all2_Cons)


Input:
lemma prefs_from_table_eqI:
  assumes "distinct (map fst xs)" "distinct (map fst ys)" "set xs = set ys"
  shows   "prefs_from_table xs = prefs_from_table ys"

Output:
proof - from assms have "map_of xs = map_of ys"
by (subst map_of_inject_set) simp_all thus ?thesis
by (simp add: prefs_from_table_def)
qed


Input:
lemma map_of_distinct_lookup:
  assumes "x \<notin> set(map fst xs)"
  "x \<notin> set (map fst ys)"
  shows "map_of (xs @ (x,y) # ys) x = Some y"

Output:
proof - have "map_of (xs @ (x,y) # ys) = (map_of (xs @ ys)) (x \<mapsto> y)"
using assms map_of_distinct_upd2
by simp thus ?thesis
by simp
qed


Input: lemma path_decomp: assumes "path (xs @ ys)" shows "path xs" "path ys"

Output:
using walk_decomp assms distinct_append
by blast+


Input:
lemma lprefix_imp_llexord:
  assumes "xs \<sqsubseteq> ys"
  shows "llexord r xs ys"

Output:
using assms
by(coinduct)(auto simp add: not_lNone_conv LCons_lprefix_conv)


Input:
lemma Cons_step1E [elim!]:
  assumes "step1 r ys (x # xs)"
    and "\<And>y. ys = y # xs \<Longrightarrow> r y x \<Longrightarrow> R"
    and "\<And>zs. ys = x # zs \<Longrightarrow> step1 r zs xs \<Longrightarrow> R"
  shows R

Output:
using assms
apply (cases ys)
apply (simp add: step1_def)
apply blast done


Input:
lemma map_of_sunion_with:
  "\<lbrakk> sorted (map fst xs); sorted (map fst ys) \<rbrakk>
  \<Longrightarrow> map_of (sunion_with f xs ys) k =
  (case map_of xs k of None \<Rightarrow> map_of ys k
  | Some v \<Rightarrow> case map_of ys k of None \<Rightarrow> Some v
              | Some w \<Rightarrow> Some (f k v w))"

Output: by(induct f xs ys rule: sunion_with.induct)(auto split: option.split dest: map_of_SomeD bspec)


Input: lemma szip_smap1: "szip (smap f xs) ys = smap (apfst f) (szip xs ys)"

Output: by(coinduction arbitrary: xs ys) auto


Input: lemma cancel_append_same2: "cancel (xs @ zs) (ys @ zs)" if "cancel xs ys"

Output:
using that
by induction(blast intro: rtranclp.rtrancl_into_rtrancl cancel1_append_same2)+


Input: lemma remove_cycles_id: "x \<notin> set xs \<Longrightarrow> remove_cycles xs x ys = rev ys @ xs"

Output: by (induction xs arbitrary: ys) auto


Input:
lemma strict_borderE[elim]:
  fixes xs ys :: "'a list"
  assumes "strict_border xs ys"
  obtains "border xs ys" and "length xs < length ys"

Output:
using assms unfolding strict_border_def
by blast


Input:
lemma binop_compose:
  "binop (\<lambda>x y. f (g x y)) z1 z2 xs ys = map (apsnd f) (binop g z1 z2 xs ys)"

Output: by (induct "\<lambda>x y. f (g x y)" z1 z2 xs ys rule: binop.induct) auto


Input:
lemma mul_ext_impl_cong[fundef_cong]:
  assumes "\<And>x x'. x \<in> set xs \<Longrightarrow> x' \<in> set ys \<Longrightarrow> f x x' = g x x'"
  shows "mul_ext_impl f xs ys = mul_ext_impl g xs ys"

Output:
using assms stri_mul_ext_map[of xs ys g f id] nstri_mul_ext_map[of xs ys g f id] stri_mul_ext_map[of xs ys f g id] nstri_mul_ext_map[of xs ys f g id]
by (auto simp: mul_ext_impl_sound mul_ext_def Let_def)


Input:
lemma rel_msetI:
  assumes "list_all2 R xs ys" "mset xs = A" "mset ys = B"
  shows   "rel_mset R A B"

Output:
using assms
by (auto simp: rel_mset_def)


Input:
lemma gcd_list_sub:
  assumes "set xs \<subseteq> set ys" shows "gcd_list ys dvd gcd_list xs"

Output: by (metis Gcd_fin.subset assms semiring_gcd_class.gcd_dvd1)


Input:
lemma eucl_of_list_inj: "length xs = DIM('a::executable_euclidean_space) \<Longrightarrow> length ys = DIM('a) \<Longrightarrow>
  (eucl_of_list xs::'a) = eucl_of_list (ys) \<Longrightarrow> xs = ys"

Output:
apply (auto intro!: nth_equalityI simp: euclidean_eq_iff[where 'a="'a"] eucl_of_list_inner)
using nth_Basis_list_in_Basis[where 'a="'a"]
by fastforce


Input:
lemma genPrefix_imp_nth:
    "i < length xs \<Longrightarrow> (xs, ys) \<in> genPrefix r \<Longrightarrow> (xs ! i, ys ! i) \<in> r"

Output:
apply (induct xs arbitrary: i ys)
apply auto
apply (case_tac i)
apply auto done


Input: lemma initial_segment_Cons [simp]: "initial_segment (x#xs) (y#ys) \<longleftrightarrow> x=y \<and> initial_segment xs ys"

Output: by (metis append_Cons initial_segment.simps list.inject)


Input:
lemma lrev_is_lrev_conv [iff]:
assumes fin: "xs \<in> UNIV\<^sup>\<star>" "ys \<in> UNIV\<^sup>\<star>"
  shows "(lrev xs = lrev ys) = (xs = ys)"
  (is "?L = ?R")

Output:
proof assume L: ?L hence "lrev (lrev xs) = lrev (lrev ys)"
by simp thus ?R
using fin
by simp
qed simp


Input:
lemma uv_edge_cases:
    obtains (par) "(u,v)\<in>E" "(v,u)\<notin>E"
          | (rev) "(v,u)\<in>E" "(u,v)\<notin>E"

Output:
using uv_cf_edge cfE_ss_invE no_parallel_edge
by blast


Input: lemma eq_shift: "w = u @- v \<longleftrightarrow> stake (length u) w = u \<and> sdrop (length u) w = v"

Output: by (induct u arbitrary: w) (force+)


Input:
lemma until_until_disj:
  assumes "(P \<U> Q \<U> R) \<sigma>"
  shows "((P \<^bold>\<or> Q) \<U> R) \<sigma>"

Output:
using assms unfolding defs
apply clarsimp
apply (metis (full_types) add_diff_inverse_nat nat_add_left_cancel_less) done


Input:
lemma learn_cons_wrt_goedel:
  assumes "goedel_numbering \<chi>" and "learn_cons \<psi> U s"
  shows "\<exists>t. learn_cons \<chi> U t"

Output:
using learn_cons_def assms learn_lim_extra_wrt_goedel[where ?extra="\<lambda>U f n h. \<forall>k\<le>n. h k = f k"]
by auto


Input:
lemma is_RB_inI2:
  assumes "is_syz_sig d u"
  shows "is_RB_in d rword G u"

Output:
unfolding is_RB_in_def Let_def
using assms
by blast


Input:
lemma c_ipurge_aux_append:
 "c_ipurge_aux I D U (xs @ [x]) = (if D x \<in> c_sources_aux I D U [x]
    then c_ipurge_aux I D (insert (D x) U) xs @ [x]
    else c_ipurge_aux I D U xs)"

Output: by (induction xs, simp_all add: c_sources_aux_append)


Input:
lemma path_component_intermediate_subset:
   "path_component_set u a \<subseteq> t \<and> t \<subseteq> u
        \<Longrightarrow> path_component_set t a = path_component_set u a"

Output: by (metis (no_types) path_component_mono path_component_path_component subset_antisym)


Input:
lemma isolated_other_da:
    assumes "u \<notin> {tail G a, head G a}" shows "u \<in> H.isolated_verts \<longleftrightarrow> u \<in> G.isolated_verts"

Output:
using assms
by (auto simp: pre_digraph.isolated_verts_def verts_H arcs_H tail_H out_arcs_def)


Input:
lemma
  assumes "u \<in> verts G" "set p \<subseteq> arcs G"
  shows awhd_in_verts: "awhd u p \<in> verts G"
    and awlast_in_verts: "awlast u p \<in> verts G"

Output:
using assms
by (auto elim: awalk_verts_in_verts)


Input: lemma finite_greaterThanAtMost_integer [iff]: "finite {l<..(u::integer)}"

Output: by (subst atLeastPlusOneAtMost_greaterThanAtMost_integer [THEN sym], simp)


Input: lemma eval_subst_tm: "\<lbrakk>subst i t u\<rbrakk>e = \<lbrakk>u\<rbrakk>(finfun_update e i \<lbrakk>t\<rbrakk>e)"

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


Input: lemma atU_add_mset[simp]: "atU U (add_mset c c2) = (atU_s U c \<or> atU U c2)"

Output:
unfolding add_mset_add_single[of c c2] atU_union
by auto


Input:
lemma "\<forall>u::'a \<times> 'b. \<exists>v::'c. \<forall>w::'d. \<exists>x::'e \<times> 'f.
       f u v w x = f u (g u w) w (h u)"

Output: nitpick [card = 1-2, dont_box, expect = genuine] oops


Input:
lemma open_neighbourhood_base_at:
   "(\<And>S. \<lbrakk>P S; x \<in> S\<rbrakk> \<Longrightarrow> openin X S)
        \<Longrightarrow> neighbourhood_base_at x P X \<longleftrightarrow> (\<forall>W. openin X W \<and> x \<in> W \<longrightarrow> (\<exists>U. P U \<and> x \<in> U \<and> U \<subseteq> W))"

Output:
unfolding neighbourhood_base_at_def
by (meson subsetD)


Input: lemma lsteps_comp_map: "lsteps zs (f \<circ> g) l u v = lsteps (map g zs) f l u v"

Output: by (induction zs "f \<circ> g" l u v rule: lsteps.induct) (auto simp add: lsteps.simps)


Input:
lemma cas_simp:
  assumes "es \<noteq> []"
  shows "cas u es v \<longleftrightarrow> tail G (hd es) = u \<and> cas (head G (hd es)) (tl es) v"

Output:
using assms
by (cases es) auto


Input:
lemma greaterThanLessThan_eq_iff:
  fixes r s t u::real
  shows "({r<..<s} = {t<..<u}) = (r \<ge> s \<and> u \<le> t \<or> r = t \<and> s = u)"

Output: by (metis cInf_greaterThanLessThan cSup_greaterThanLessThan greaterThanLessThan_empty_iff not_le)


Input: lemma edge_cap_positive: "(u,v)\<in>E \<Longrightarrow> c (u,v) > 0"

Output:
unfolding E_def
using cap_non_negative[THEN spec2, of u v]
by simp


Input:
lemma unit_disc_fix_preserve_poincare_collinear3 [simp]:
  assumes "unit_disc_fix M"
  shows "poincare_collinear {moebius_pt M u, moebius_pt M v, moebius_pt M w} \<longleftrightarrow>
         poincare_collinear {u, v, w}"

Output:
using assms unit_disc_fix_preserve_poincare_collinear_iff[of M "{u, v, w}"]
by simp


Input:
lemma max_repU2:
  assumes "w1 \<equiv>\<^sub>U y"
  assumes "w2 \<equiv>\<^sub>U x"
  shows "wmax w1 w2 \<equiv>\<^sub>U x"

Output:
using wmax_lemma assms repU_def
by (meson le_max_iff_disj)


Input:
lemma nth_factorization_lattice:
  fixes u and d
  defines "n \<equiv> degree u"
  assumes "i < n + d"
  shows "factorization_lattice u d m ! i =
    vec_of_poly_n (if i < d then u * monom 1 (d - Suc i) else monom m (n+d-Suc i)) (n+d)"

Output:
using assms
by (unfold factorization_lattice_def, auto simp: nth_append smult_monom Let_def not_less)


Input: lemma fi_map_Some: "(fi_map u = Some v) \<longleftrightarrow> u\<in>f`V \<and> fi u = v"

Output:
unfolding fi_map_def
by (auto split: if_split_asm)


Input:
lemma ord_strict_pE:
  assumes "p \<prec>\<^sub>p q"
  obtains v where "lookup p v = 0" and "lookup q v \<noteq> 0" and "\<And>u. v \<prec>\<^sub>t u \<Longrightarrow> lookup p u = lookup q u"

Output:
using assms unfolding ord_strict_p_def
by blast


Input:
lemma abs_Gromov_completion_in_Gromov_boundary [simp]:
  assumes "Gromov_converging_at_boundary u"
  shows "abs_Gromov_completion u \<in> Gromov_boundary"

Output:
using Gromov_completion_rel_to_const Gromov_converging_at_boundary_imp_not_constant' Gromov_converging_at_boundary_rel[OF assms] Quotient3_rel[OF Quotient3_Gromov_completion] assms not_in_Gromov_boundary to_Gromov_completion_def
by fastforce


Input:
lemma pot_comp_monotone:
  assumes "cmp u v = Lt \<Longrightarrow> cmp (splus t u) (splus t v) = Lt" and "pot_comp cmp u v = Lt"
  shows "pot_comp cmp (splus t u) (splus t v) = Lt"

Output:
using assms(2)
by (auto simp: pot_comp splus_term pprod.splus_def comparator_of_def deg_pp_plus split: order.splits if_splits intro: assms(1))


Input:
lemma adds_term_antisym:
  assumes "u adds\<^sub>t v" and "v adds\<^sub>t u"
  shows "u = v"

Output:
using assms unfolding adds_term_def
using adds_antisym
by (metis term_of_pair_pair)


Input:
lemma convexD:
  assumes "convex s" and "x \<in> s" and "y \<in> s" and "0 \<le> u" and "0 \<le> v" and "u + v = 1"
  shows "u *\<^sub>R x + v *\<^sub>R y \<in> s"

Output:
using assms unfolding convex_def
by fast


Input: lemma openin_Un[intro]: "openin U S \<Longrightarrow> openin U T \<Longrightarrow> openin U (S \<union> T)"

Output:
using openin_Union[of "{S,T}" U]
by auto


Input:
lemma sheaf_spec_extensional[simp]:
  "a \<in> \<O> U \<Longrightarrow> a \<in> extensional U"

Output:
unfolding sheaf_spec_def
by (simp add: PiE_iff Set_Theory.map_def)


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

Output:
apply (rule obtain_fresh [where x="(t, u)"])
apply (subst Subset.simps, auto) done


Input:
lemma lead_coeff_factor: assumes u: "u = v * (w :: 'a ::idom poly)"
  shows "smult (lead_coeff u) u = (smult (lead_coeff w) v) * (smult (lead_coeff v) w)"
  "lead_coeff (smult (lead_coeff w) v) = lead_coeff u" "lead_coeff (smult (lead_coeff v) w) = lead_coeff u"

Output:
unfolding u
by (auto simp: lead_coeff_mult lead_coeff_smult)


Input:
lemma Q'_init_eq:
  "Q' initQ init\<pi> r = (\<lambda>u. if (u,r)\<in>edges rg then enat (w {u,r}) else \<infinity>)"

Output:
apply (rule ext)
using reachable_edges_subset
apply (simp add: Q'_def Qinter_def upd_cond_def initQ_def init\<pi>_def)
by (auto simp: Prim.rg_def edges_sym' reachable_nodes_step'(2))


Input:
lemma unique_poincare_line_general:
  assumes in_disc: "u \<noteq> v" "u \<noteq> inversion v"
  assumes on_l: "u \<in> circline_set l" "v \<in> circline_set l" "is_poincare_line l"
  shows "l = poincare_line u v"

Output:
using assms
using unique_is_poincare_line_general[of u v l "poincare_line u v"] unfolding circline_set_def
by auto


Input: lemma c_fst_le_arg: "c_fst u \<le> u"

Output:
proof - have "c_fst u \<le> c_sum u"
by (rule c_fst_le_c_sum) moreover have "c_sum u \<le> u"
by (rule c_sum_le_arg) ultimately show ?thesis
by simp
qed


Input:
lemma VSeq_implies_HPar:
    shows "VSeq t u \<Longrightarrow> HPar t u"

Output:
using Src_Dom [of t] Src_Cod [of u] Trg_Dom [of t] Trg_Cod [of u]
by auto


Input:
lemma learn_lim_wrt_goedel:
  assumes "goedel_numbering \<chi>" and "learn_lim \<psi> U s"
  shows "\<exists>t. learn_lim \<chi> U t"

Output:
using assms learn_lim_extra_wrt_goedel[where ?extra="\<lambda>U f n h. True"]
by simp


Input:
lemma poincare_line_sym_general:
  assumes "u \<noteq> v" "u \<noteq> inversion v"
  shows "poincare_line u v = poincare_line v u"

Output:
using assms
using unique_poincare_line_general[of u v "poincare_line v u"]
by simp


Input:
lemma nat_term_compD2:
  assumes "nat_term_comp cmp" and "fst (rep_nat_term u) = fst (rep_nat_term v)" and "snd (rep_nat_term u) < snd (rep_nat_term v)"
  shows "cmp u v = Lt"

Output:
using assms unfolding nat_term_comp_def fst_conv snd_conv
by blast


Input:
lemma sinks_aux_sinks_aux_less:
 "sinks_aux I D U xs = U \<union> sinks_aux_less I D U xs"

Output: by (induction xs rule: rev_induct, simp_all)


Input:
lemma cond_assign_subst:
  "vwb_lens x \<Longrightarrow> (P \<triangleleft> utp_expr.var x =\<^sub>u v \<triangleright> Q) = (P\<lbrakk>v/x\<rbrakk> \<triangleleft> utp_expr.var x =\<^sub>u v \<triangleright> Q)"

Output:
apply (rel_simp)
using vwb_lens.put_eq
by force


Input:
lemma
  fixes l u :: real
  assumes [simp]: "l \<le> u"
  shows measure_lborel_Icc[simp]: "measure lborel {l .. u} = u - l"
    and measure_lborel_Ico[simp]: "measure lborel {l ..< u} = u - l"
    and measure_lborel_Ioc[simp]: "measure lborel {l <.. u} = u - l"
    and measure_lborel_Ioo[simp]: "measure lborel {l <..< u} = u - l"

Output: by (simp_all add: measure_def)


Input:
lemma bfs2_refine:
      assumes succ_impl: "\<And>ui u. \<lbrakk>(ui,u)\<in>Id; u\<in>V\<rbrakk>
        \<Longrightarrow> succ ui \<le> SPEC (\<lambda>l. (l,E``{u}) \<in> \<langle>Id\<rangle>list_set_rel)"
      shows "bfs2 succ src dst \<le> \<Down>Id (bfs src dst)"

Output:
unfolding bfs_def bfs2_def
apply (refine_vcg pre_bfs2_refine)
apply refine_dref_type
using assms
apply (vc_solve) done


Input:
lemma adds_term_trans [trans]:
  assumes "u adds\<^sub>t v" and "v adds\<^sub>t w"
  shows "u adds\<^sub>t w"

Output:
using assms unfolding adds_term_def
using adds_trans
by auto


Input:
lemma context_unique:
  assumes a1: "valid \<Gamma>"
  and     a2: "(x,T) \<in> set \<Gamma>"
  and     a3: "(x,U) \<in> set \<Gamma>"
  shows "T = U"

Output:
using a1 a2 a3
by (induct) (auto simp add: fresh_set fresh_prod fresh_atm)


Input:
lemma reachable_induce_ss:
    assumes "u \<rightarrow>\<^sup>*\<^bsub>G \<restriction> S\<^esub> v" "S \<subseteq> T" shows "u \<rightarrow>\<^sup>*\<^bsub>G \<restriction> T\<^esub> v"

Output:
using assms unfolding reachable_def
by induct (auto intro: dominates_induce_ss converse_rtrancl_on_into_rtrancl_on)


Input:
lemma add_scaleR_degen:
  fixes a b ::"'a::real_vector"
  assumes  "(u *\<^sub>R b + v *\<^sub>R a) = (u *\<^sub>R a + v *\<^sub>R b)"  "u \<noteq> v"
  shows "a=b"

Output: by (metis (no_types, hide_lams) add.commute add_diff_eq diff_add_cancel real_vector.scale_cancel_left real_vector.scale_left_diff_distrib assms)


Input:
lemma hermitian_decomp_sim:
  assumes "hermitian_decomp A B U"
  shows "similar_mat_wit A B U (Complex_Matrix.adjoint U)"

Output:
using assms unfolding hermitian_decomp_def
by simp


Input:
lemma poincare_collinear_doubleton [simp]:
  assumes "u \<in> unit_disc" "v \<in> unit_disc"
  shows "poincare_collinear {u, v}"

Output:
using assms
using ex_poincare_line_one_point[of u]
using ex_poincare_line_two_points[of u v]
by (cases "u = v") (simp_all add: poincare_collinear_def)


Input:
lemma path_mapI:
  assumes "path E u p v"
  shows "path (pairself f ` E) (f u) (map f p) (f v)"

Output:
using assms
apply induction
apply (simp)
apply (force simp: path_cons_conv) done


Input:
lemma berlekamp_basis_code[code]: "berlekamp_basis u =
  (map (poly_of_list o list_of_vec) (find_base_vectors (berlekamp_resulting_mat u)))"

Output: unfolding berlekamp_basis_def poly_of_list_def ..


Input:
lemma Abs_BetaE:
  assumes "Abs x s \<rightarrow>\<^sub>\<beta> t"
  obtains u where "t = Abs x u" and "s \<rightarrow>\<^sub>\<beta> u"

Output:
using assms
by (blast dest: Abs_BetaD)


Input: lemma usubstappf_pred2 [simp]: "SPreds \<sigma> p = Some r \<Longrightarrow> FVF(r)\<inter>U\<noteq>{} \<Longrightarrow> usubstappf \<sigma> U (Pred p \<theta>) = undeff"

Output: by (cases "usubstappt \<sigma> U \<theta>") (auto)


Input:
lemma suffix_conc_fst[simp]:
  assumes "n \<le> length u"
  shows "suffix n (u \<frown> v) = drop n u \<frown> v"

Output:
proof show "suffix n (u \<frown> v) i = (drop n u \<frown> v) i" for i
using assms
by (cases "n + i < length u") (auto simp: algebra_simps)
qed


Input:
lemma poincare_distance_sym:
  assumes "u \<in> unit_disc" and "v \<in> unit_disc"
  shows "poincare_distance u v = poincare_distance v u"

Output:
using assms
using poincare_distance_formula[OF assms(1) assms(2)]
using poincare_distance_formula[OF assms(2) assms(1)]
by (simp add: mult.commute norm_minus_commute)


Input:
lemma unfold_rsplit_case:
  assumes su: "(Some s, u) = wordinterval_CIDR_split1 rs"
  shows "(case wordinterval_CIDR_split1 rs of (None, u) \<Rightarrow> []
                                            | (Some s, u) \<Rightarrow> s # wordinterval_CIDR_split_prefixmatch u) = s # wordinterval_CIDR_split_prefixmatch u"

Output:
using su
by (metis option.simps(5) split_conv)


Input:
lemma face_of_eq:
    fixes S :: "'a::real_normed_vector set"
    assumes "T face_of S" "U face_of S" "(rel_interior T) \<inter> (rel_interior U) \<noteq> {}"
    shows "T = U"

Output:
using assms unfolding disjoint_iff_not_equal
by (metis IntI empty_iff face_of_imp_subset mem_rel_interior_ball subset_antisym subset_of_face_of)


Input:
lemma exact_decompI:
  "(\<And>h U. (h, U) \<in> set ps \<Longrightarrow> h \<in> P[X]) \<Longrightarrow> (\<And>h U. (h, U) \<in> set ps \<Longrightarrow> U \<subseteq> X) \<Longrightarrow>
    (\<And>h h' U U'. (h, U) \<in> set ps \<Longrightarrow> (h', U') \<in> set ps \<Longrightarrow> poly_deg h = poly_deg h' \<Longrightarrow>
            m < card U \<Longrightarrow> m < card U' \<Longrightarrow> (h, U) = (h', U')) \<Longrightarrow>
    exact_decomp m ps"

Output:
unfolding exact_decomp_def
by fastforce


Input:
lemma in_arcs_app_iso_eq':
  assumes "digraph_isomorphism hom" and "u \<in> verts (app_iso hom G)"
  shows "in_arcs (app_iso hom G) u = iso_arcs hom ` in_arcs G (iso_verts (inv_iso hom) u)"

Output:
using assms in_arcs_app_iso_eq[of hom "iso_verts (inv_iso hom) u"]
by auto


Input:
lemma u_fresh_xv[simp]:
  fixes u::u and x::x and v::v
  shows "atom u \<sharp>  (x,v)"

Output:
proof - have "atom u \<sharp> x"
using fresh_def
by fastforce moreover have "atom u \<sharp> v"
using fresh_def u_notin_supp_v
by metis ultimately show ?thesis
using fresh_prod2
by auto
qed


Input: lemma HDomain_Incl_sf [iff]: "Sigma_fm (HDomain_Incl t u)"

Output:
proof - obtain x::name and y::name and z::name where "atom x \<sharp> (t,u,y,z)" "atom y \<sharp> (t,u,z)" "atom z \<sharp> (t,u)"
by (metis obtain_fresh) thus ?thesis
by auto
qed


Input: lemma resp: "\<And>x. (\<lambda>u. R `` {u @ [x]}) respects R"

Output:
using riR
by (auto simp: congruent_def right_invariant_def intro!: equiv_class_eq [OF eqR])


Input:
lemma list_comb_cases[consumes 1]:
  assumes "t = list_comb f xs"
  obtains (head) "t = f" "xs = []"
        | (app) u v where "t = app u v"

Output:
using assms
by (metis list_comb_cases' left_right_simps(3))


Input:
lemma countably_compact_eq_compact:
  "countably_compact U \<longleftrightarrow> compact (U :: 'a :: second_countable_topology set)"

Output:
using countably_compact_imp_compact_second_countable compact_imp_countably_compact
by blast


Input:
lemma closedin_subtopology_refl [simp]:
   "closedin (subtopology U X) X \<longleftrightarrow> X \<subseteq> topspace U"

Output: by (metis closedin_def closedin_topspace inf.absorb_iff2 le_inf_iff topspace_subtopology)


Input:
lemma left_options_plus:
  "left_options (plus_game u v) =  zunion (zimage (\<lambda>g. plus_game g v) (left_options u)) (zimage (\<lambda>h. plus_game u h) (left_options v))"

Output: by (subst plus_game.simps, simp)


Input:
lemma prev_inI:
  assumes "u \<in> {a<..b}"
          "v \<in> A"
          "v < u"
          "{v<..<u} \<inter> A = {}"
  shows "prev_in A u = v"

Output:
using assms prev_in_basics[OF \<open>u \<in> {a<..b}\<close>]
by (meson disjoint_iff_not_equal greaterThanLessThan_iff less_linear)


Input:
lemma ipurge_ref_aux_less_last:
 "ipurge_ref_aux_less I D U (xs @ [x]) X =
   (if \<exists>v \<in> U \<union> sinks_aux_less I D U xs. (v, D x) \<in> I
    then ipurge_ref_aux_less I D U xs {x' \<in> X. (D x, D x') \<notin> I}
    else ipurge_ref_aux_less I D U xs X)"

Output: by (cases "\<exists>v \<in> U \<union> sinks_aux_less I D U xs. (v, D x) \<in> I", simp_all add: ipurge_ref_aux_less_def)


Input:
lemma inner_prod_with_itself_nonneg_reals_non0:
  assumes "u \<noteq> 0\<^sub>v (dim_vec u)"
  shows "\<langle>u|u\<rangle> \<noteq> 0"

Output:
using assms inner_prod_with_itself_Re_non0
by fastforce


Input:
lemma dlex_fun_plus_monotone:
  fixes s t u::"'a \<Rightarrow> 'b::{ordered_cancel_comm_monoid_add, ordered_ab_semigroup_add_imp_le}"
  assumes "finite (supp_fun s)" and "finite (supp_fun t)" and "finite (supp_fun u)" and "dlex_fun s t"
  shows "dlex_fun (s + u) (t + u)"

Output:
using lex_fun_plus_monotone[of s t u] assms unfolding dlex_fun_def
by (rule dord_fun_plus_monotone)


Input:
lemma szip_shift[simp]:
    assumes "length u = length s"
    shows "u @- v ||| s @- t = (u || s) @- (v ||| t)"

Output:
using assms
by (simp add: eq_shift stake_shift sdrop_shift)


Input: lemma prim_exp_eq: "primitive u \<Longrightarrow> r\<^sup>@k = u \<Longrightarrow> u = r"

Output:
using prim_exp_one power_one_right
by blast


Input:
lemma MarkGuardsI:
  assumes deriv: "\<Gamma>,\<Theta>\<turnstile>\<^sub>t\<^bsub>/{}\<^esub> P c Q,A"
  shows "\<Gamma>,\<Theta>\<turnstile>\<^sub>t\<^bsub>/{}\<^esub> P mark_guards f c Q,A"

Output:
apply (rule hoaret_complete')
apply (rule MarkGuardsI_sound)
apply (iprover intro: hoaret_sound [OF deriv]) done


Input:
lemma EndPhase1_HInv3_R:
  "\<lbrakk> EndPhase1 s s' t; HInv3_R s p q d; t\<noteq>p; t\<noteq> q \<rbrakk>
                      \<Longrightarrow> HInv3_R s' p q d"

Output: by(auto simp add: EndPhase1_def InitializePhase_def HInv3_R_def hasRead_def)


Input:
lemma weakenStatImpE:
  fixes \<Psi> :: 'b
  and   P :: "('a, 'b, 'c) psi"
  and   Rel :: "('b \<times> ('a, 'b, 'c) psi \<times> ('a, 'b, 'c) psi) set"
  and   Q   :: "('a, 'b, 'c) psi"
  and   \<Psi>' :: 'b

  assumes "\<Psi> \<rhd> P \<lessapprox>\<^sub>w<Rel> Q"

  obtains Q' where "\<Psi> \<rhd> Q \<Longrightarrow>\<^sup>^\<^sub>\<tau> Q'" and "insertAssertion(extractFrame P) \<Psi> \<hookrightarrow>\<^sub>F insertAssertion(extractFrame Q') \<Psi> " and "(\<Psi>, P, Q') \<in> Rel"

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


Input:
lemma (in encoding) combine_conditions_on_sets_and_pairs_of_relations:
  fixes Rel RelA RelB :: "(('procS, 'procT) Proc \<times>('procS, 'procT) Proc) set"
    and Cond          :: "(('procS, 'procT) Proc \<times>('procS, 'procT) Proc) set \<Rightarrow> bool"
    and CondA CondB   :: "(('procS, 'procT) Proc \<times>('procS, 'procT) Proc) \<Rightarrow> bool"
  assumes "\<forall>(P, Q) \<in> RelA. CondA (P, Q)"
      and "\<forall>(P, Q) \<in> RelB. CondB (P, Q)"
      and "Cond Rel \<and> Rel \<subseteq> RelA \<and> Rel \<subseteq> RelB"
  shows "Cond Rel \<and> (\<forall>(P, Q) \<in> Rel. CondA (P, Q)) \<and> (\<forall>(P, Q) \<in> Rel. CondB (P, Q))"

Output:
using assms
by blast


Input: lemma hom_dvd[intro,simp]: assumes "p dvd q" shows "hom p dvd hom q"

Output:
proof - from assms obtain r where "q = p * r" unfolding dvd_def
by auto from arg_cong[OF this, of hom] show ?thesis unfolding dvd_def
by (auto simp: hom_distribs)
qed


Input:
lemma partition_on_eq_implies_eq_carrier:
  assumes "partition_on A Q"
  assumes "partition_on B Q"
  shows "A = B"

Output:
using assms
by (fastforce elim: partition_onE)


Input:
lemma ent_pure_pre_iff_sng[simp]:
  "(\<up>b \<Longrightarrow>\<^sub>A Q) \<longleftrightarrow> (b \<longrightarrow> (emp \<Longrightarrow>\<^sub>A Q))"

Output:
using ent_pure_pre_iff[where P=emp]
by simp


Input:
lemma bangPres:
  fixes P :: pi
  and   Q :: pi

  assumes "P \<simeq>\<^sup>s Q"

  shows "!P \<simeq>\<^sup>s !Q"

Output:
using assms
by(auto simp add: weakCongruenceSubst_def intro: Weak_Early_Cong_Pres.bangPres)


Input:
lemma SKIP:
 "X \<rhd> Skip : Sec (Q p H) (EQ G q) (EQ G q)
                  (\<lambda> (s,t) . EQ G q s t)"

Output:
apply (rule VDMConseq, rule VDMSkip)
apply (simp add: Sec_def EQ_def Q_def) done


Input:
lemma sorted_wrt_dist_insort_key:
  "sorted_wrt_dist p ps \<Longrightarrow> sorted_wrt_dist p (insort_key (\<lambda>q. dist q p) q ps)"

Output: by (induction ps) (auto simp: sorted_wrt_dist_def set_insort_key)


Input:
lemma floor_divide_upper:
  fixes q :: "'a::floor_ceiling"
  shows "q > 0 \<Longrightarrow> p < (of_int \<lfloor>p / q\<rfloor> + 1) * q"

Output: by (meson floor_eq_iff pos_divide_less_eq)


Input:
lemma hoare_kcomp:
  assumes "P \<le> |G] R" "R \<le> |F] Q"
  shows "P \<le> |G ; F] Q"

Output:
apply(subst fbox_kcomp)
by (rule order.trans[OF assms(1)]) (rule fbox_iso[OF assms(2)]) \<comment> \<open> Conditional statement \<close>


Input: lemma content_dvd_contentI [intro]: "p dvd q \<Longrightarrow> content p dvd content q"

Output:
using const_poly_dvd_iff_dvd_content content_dvd dvd_trans
by blast


Input:
theorem TBtheorem4a_PQ:
assumes "(ine P E) \<or> (ine Q E)"
       and "subcomponents PQ = {P,Q}"
       and "correctCompositionIn PQ"
       and "\<exists> ch. (((ch \<in> (ins P)) \<or> (ch \<in> (ins Q) )) \<and>
                         (exprChannel ch E) \<and>  (ch \<notin> (loc PQ)))"
shows    "ine PQ E"

Output:
using assms
by (simp add: ine_def correctCompositionIn_def, auto)


Input:
lemma vcg_pre_imp:
  "\<lbrakk> \<And>s. P s \<Longrightarrow> Q s; \<lbrace>Q\<rbrace> c \<lbrace>R\<rbrace> \<rbrakk> \<Longrightarrow> \<lbrace>P\<rbrace> c \<lbrace>R\<rbrace>"

Output: by (cases c) (fastforce elim!: vcg_inv intro: vcg.intros)+


Input:
lemma trace_eq_simcl_bind1_scale: "trace_eq_simcl S (bind_spmf p f) (scale_spmf (weight_spmf p) q)"
  if "\<forall>x\<in>set_spmf p. trace_eq_simcl S (f x) q"

Output:
proof - have "trace_eq_simcl S (bind_spmf p f) (bind_spmf p (\<lambda>_. q))"
by(rule trace_eq_simcl_bind)(simp add: that) thus ?thesis
by(simp add: bind_spmf_const)
qed


Input:
lemma l9_10:
  assumes "\<not> Col A P Q"
  shows "\<exists> C. P Q TS A C"

Output: by (meson Col_perm assms mid_two_sides midpoint_existence symmetric_point_construction)


Input:
lemma prerun_valid_conjI:
  assumes "sys \<Turnstile>\<^bsub>pre\<^esub> P"
  assumes "sys \<Turnstile>\<^bsub>pre\<^esub> Q"
  shows "sys \<Turnstile>\<^bsub>pre\<^esub> P \<^bold>\<and> Q"

Output:
using assms unfolding prerun_valid_def always_def
by simp


Input:
lemma R1_comp2:
  assumes A: "P is R1 healthy"
  assumes B: "Q is R1 healthy"
  shows  "R1 (P;;Q) = ((R1 P);;Q)"

Output:
using A B
apply (subst R1_comp[simplified Healthy_def, symmetric])
apply (auto simp: fun_eq_iff rp_defs design_defs) done


Input: lemma fbox_seq_var: "p' \<le> |y] q \<Longrightarrow> p \<le> |x] p' \<Longrightarrow> p \<le> |x \<cdot> y] q"

Output:
proof - assume h1: "p \<le> |x] p'" and h2: "p' \<le> |y] q" hence "|x] p' \<le> |x] |y] q"
by (simp add: dka.dom_iso fbox_iso) thus ?thesis
by (metis h1 dual_order.trans fbox_seq)
qed


Input:
lemma tseq_test_seq:
  "p = --p \<Longrightarrow> q = --q \<Longrightarrow> r = --r \<Longrightarrow> test_seq (tseq p x q r)"

Output:
using test_seq_def tseq_test
by auto


Input:
lemma conjugate_exponent_ennreal_iff:
  assumes "p \<ge> (1::ennreal)"
  shows "q = conjugate_exponent p \<longleftrightarrow> (1/p + 1/q = 1)"

Output:
using conjugate_exponent_ennreal[OF assms]
by (auto, metis ennreal_add_diff_cancel_left ennreal_add_eq_top ennreal_top_neq_one one_divide_one_divide_ennreal)


Input: lemma uniqify_mset: "queue_invar q \<Longrightarrow> queue_to_multiset q = queue_to_multiset (uniqify q)"

Output:
apply (cases q)
apply simp
apply (simp add: ins_mset) done


Input:
lemma seq_comp_prop_2:
  assumes WS: "weakly_sequential P"
  shows "(xs @ [x], X) \<in> seq_comp_failures P Q \<Longrightarrow>
    (xs, {}) \<in> seq_comp_failures P Q"

Output: by (erule seq_comp_prop_2_aux [OF WS], simp)


Input: lemma test_huntington2: "test p \<Longrightarrow> test q \<Longrightarrow> !(p + q) + !(p + !q) = !p"

Output:
proof - assume a1: "test p" assume a2: "test q" have "p = !(!p)"
using a1 test_double_comp_var
by blast thus ?thesis
using a2
by (metis (full_types) n_huntington2 test_double_comp_var)
qed


Input:
lemma weakenSimE:
  fixes F   :: 'b
  and   P   :: "('a, 'b, 'c) psi"
  and   Rel :: "('b \<times> ('a, 'b, 'c) psi \<times> ('a, 'b, 'c) psi) set"
  and   Q   :: "('a, 'b, 'c) psi"

  assumes "\<Psi> \<rhd> P \<leadsto>\<^sub>w<Rel> Q"

  shows "\<And>\<alpha>  Q'. \<lbrakk>\<Psi> \<rhd> Q \<longmapsto>\<alpha> \<prec> Q'; bn \<alpha> \<sharp>* \<Psi>; bn \<alpha> \<sharp>* P\<rbrakk> \<Longrightarrow>
                   \<exists>P'. \<Psi> \<rhd> P \<Longrightarrow>\<alpha> \<prec> P' \<and> (\<Psi>, P', Q') \<in> Rel"

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


Input:
lemma bangExtLeft:
  fixes \<Psi> :: 'b
  and   P :: "('a, 'b, 'c) psi"

  assumes "guarded P"
  and     "\<And>\<Psi>' Q. (\<Psi>', Q, Q) \<in> Rel"

  shows "\<Psi> \<rhd> !P \<leadsto>[Rel] P \<parallel> !P"

Output:
using assms
by(auto simp add: simulation_def dest: Bang)


Input: lemma Legendre_prod_mset [simp]: "prime p \<Longrightarrow> Legendre (prod_mset M) p = (\<Prod>q\<in>#M. Legendre q p)"

Output: by (induction M) simp_all


Input:
lemma coprime_rat_poly_real_poly:
  assumes "coprime p (q::rat poly)"
  shows "coprime (real_of_rat_poly p) ((real_of_rat_poly q)::real poly)"

Output: by (metis assms gcd_dvd_1 of_rat_hom.map_poly_gcd of_rat_poly_hom.hom_dvd_1)


Input: lemma iff_qf[simp]: "qfree p \<Longrightarrow> qfree q \<Longrightarrow> qfree (iff p q)"

Output:
unfolding iff_def
by (cases "p = q") auto


Input:
theorem TBtheorem5b_PQ:
assumes "(eoutM P M E) \<or> (eoutM Q M E)"
       and "subcomponents PQ = {P,Q}"
       and "correctCompositionOut PQ"
       and "\<exists> ch. (((ch \<in> (out P)) \<or> (ch \<in> (out Q) )) \<and> (ch \<in> M)
                      \<and> (exprChannel ch E) \<and>  (ch \<notin> (loc PQ)))"
shows    "eoutM PQ M E"

Output:
using assms
by (simp add: eoutM_def correctCompositionOut_def, auto)


Input: lemma le_approx2T: "\<lbrakk> P\<sqsubseteq>Q; s \<notin> D P\<rbrakk> \<Longrightarrow>  s \<in> T Q = (s \<in> T P)"

Output: by(auto simp: le_approx2 T_F_spec[symmetric])


Input:
lemma fractrel_normalize_quot:
  "fractrel p p \<Longrightarrow> fractrel q q \<Longrightarrow>
     fractrel (normalize_quot p) (normalize_quot q) \<longleftrightarrow> fractrel p q"

Output: by (subst fractrel_normalize_quot_left fractrel_normalize_quot_right, simp)+ (rule refl)


Input: lemma map_spmf_eq_map_spmf_iff: "map_spmf f p = map_spmf g q \<longleftrightarrow> rel_spmf (\<lambda>x y. f x = g y) p q"

Output: by(simp add: spmf_rel_eq[symmetric] spmf_rel_map)


Input:
lemma propa_property2:
  fixes ss w qs q
  assumes step_bounded_pres: "\<forall>(q, \<tau>) \<in> set qs. q < size ss \<and> \<tau> \<in> A"
      and sorted_w:          "sorted (w ::nat list)"
      and subset_ss_A:       "set ss \<subseteq> A"
      and len_ss_n:          "length ss = n "
      and dist:              "distinct (map fst qs) "
      and q_nin:             "q \<notin> set(map fst qs) "
      and q_lt_len_ss:       "q < length ss "
    shows "(fst(propa f qs ss w))!q = ss!q"

Output:
using assms
apply (subgoal_tac "fst (propa f qs ss w) = merges f qs ss")
apply(simp add: merges_property2)
by (auto dest:decomp_propa)


Input:
lemma test_below_pre_test_mult:
  "-q \<le> -p\<guillemotleft>-p*-q"

Output: by (metis pre_test tests_dual.sba_dual.reflexive tests_dual.sba_dual.shunting tests_dual.sub_sup_closed)


Input:
lemma peek_and_forget1_Normal:
 "G,(A::'a triple set)\<turnstile>{Normal P} t\<succ> {Q::'a assn}
 \<Longrightarrow> G,A\<turnstile>{Normal (P \<and>. p)} t\<succ> {Q}"

Output:
apply (erule conseq1)
apply (simp (no_asm)) done


Input:
lemma elim:
  fixes P   :: pi
  and   Rel :: "(pi \<times> pi) set"
  and   Q   :: pi
  and   a   :: name
  and   x   :: name
  and   Q'  :: pi

  assumes "P \<leadsto>[Rel] Q"

  shows "Q \<longmapsto> a<\<nu>x> \<prec> Q' \<Longrightarrow> x \<sharp> P \<Longrightarrow> \<exists>P'. P \<longmapsto> a<\<nu>x> \<prec> P' \<and> (P', Q') \<in> Rel"
  and   "Q \<longmapsto> \<alpha> \<prec> Q' \<Longrightarrow> \<exists>P'. P \<longmapsto> \<alpha> \<prec> P' \<and> (P', Q') \<in> Rel"

Output:
using assms
by(simp add: strongSimEarly_def)+


Input:
lemma rat_to_normalized_int_poly_code[code]:
  "rat_to_normalized_int_poly p = (if p = 0 then (1,0) else case rat_to_int_poly p of (s,q)
    \<Rightarrow> let c = content q in (of_int c / of_int s, sdiv_poly q c))"

Output: unfolding Let_def rat_to_normalized_int_poly_def primitive_part_alt_def ..


Input:
lemma reflection_of_barbs_in_barbed_encoding:
  fixes Rel :: "(('procS, 'procT) Proc \<times> ('procS, 'procT) Proc) set"
    and P Q :: "('procS, 'procT) Proc"
    and a   :: "'barbs"
  assumes reflection: "rel_reflects_barbs Rel (STCalWB SWB TWB)"
      and rel:        "(P, Q) \<in> Rel"
      and barb:       "Q\<down>.a"
  shows "P\<down>.a"

Output:
using reflection rel barb
by (simp add: STCalWB_def)


Input:
lemma rule_cons_pre:
  "-p \<le> -q \<Longrightarrow> -q\<lbrace>x\<rbrace>-r \<Longrightarrow> -p\<lbrace>x\<rbrace>-r"

Output:
using rule_cons tests_dual.sba_dual.reflexive
by blast


Input: lemma imp_qf[simp]: "qfree p \<Longrightarrow> qfree q \<Longrightarrow> qfree (imp p q)"

Output:
using imp_def
by (cases "p = F \<or> q = T") (simp_all add: imp_def)


Input:
lemma EndPhase1_HInv3_nL:
  "\<lbrakk> EndPhase1 s s' t; \<not>HInv3_L s p q d; t\<noteq>p; t\<noteq> q \<rbrakk>
                    \<Longrightarrow> \<not>HInv3_L s' p q d"

Output: by(auto simp add: EndPhase1_def InitializePhase_def HInv3_L_def hasRead_def)


Input:
lemma maintain_invar2_first_step_presentation:
  assumes INV: "prim_invar2_init Q \<pi>"
  assumes UNS: "Q u = enat d"
  shows "prim_invar2_ctd (Q' Q \<pi> u) (\<pi>' Q \<pi> u)
       \<and> T_measure2 (Q' Q \<pi> u) (\<pi>' Q \<pi> u) < T_measure2 Q \<pi>"

Output:
using maintain_invar2_first_step assms
by blast


Input:
lemma sterms_cterms [elim]:
  assumes "p \<in> cterms \<Gamma>"
      and "q \<in> sterms \<Gamma> p"
      and "wellformed \<Gamma>"
    shows "q \<in> cterms \<Gamma>"

Output:
using assms
by - (cases p, auto)


Input:
lemma mult_poly_raw_simp[simp]:
  \<open>mult_poly_raw [] q = []\<close>
  \<open>mult_poly_raw (x # p) q = mult_poly_raw p q @ map (mult_monomials x) q\<close>

Output:
subgoal
by (auto simp: mult_poly_raw_def) subgoal
by (induction p) (auto simp: mult_poly_raw_def foldl_append_empty) done


Input:
lemma cond_hoare_r_wp:
  assumes "\<lbrace>p'\<rbrace>S\<lbrace>q\<rbrace>\<^sub>u" and "\<lbrace>p''\<rbrace>T\<lbrace>q\<rbrace>\<^sub>u"
  shows "\<lbrace>(b \<and> p') \<or> (\<not>b \<and> p'')\<rbrace>S \<triangleleft> b \<triangleright>\<^sub>r T\<lbrace>q\<rbrace>\<^sub>u"

Output:
using assms
by pred_simp


Input:
lemma bisimSubstBangPres:
  fixes \<Psi> :: 'b
  and   P :: "('a, 'b, 'c) psi"
  and   Q :: "('a, 'b, 'c) psi"

  assumes "\<Psi> \<rhd> P \<sim>\<^sub>s Q"
  and     "guarded P"
  and     "guarded Q"

  shows "\<Psi> \<rhd> !P \<sim>\<^sub>s !Q"

Output:
using assms
by(fastforce intro: closeSubstI closeSubstE bisimBangPres guardedSeqSubst)


Input:
lemma HT_generalize_penv:
  assumes "HT_mods Map.empty mods P c Q"
  shows "HT_mods \<pi> mods P c Q"

Output:
using assms unfolding HT_mods_def HT_def wp_def
apply auto
using big_step_mono_prog map_le_empty
by blast


Input: lemma mono_sync_FD[simp]: "\<lbrakk>P \<le> P'; Q \<le> Q'\<rbrakk> \<Longrightarrow> (P \<lbrakk> A \<rbrakk> Q) \<le> (P' \<lbrakk> A \<rbrakk> Q')"

Output:
using mono_sync_FD_oneside[of P P' A Q] mono_sync_FD_oneside[of Q Q' A P]
by (simp add: order_trans sync_commute)


Input: lemma ord_spmf_map_spmf2: "ord_spmf R p (map_spmf f q) = ord_spmf (\<lambda>x y. R x (f y)) p q"

Output: by(simp add: pmf.rel_map ord_option_map2)


Input: lemma SeqRule: "\<lbrakk> \<parallel>- p c1 r; \<parallel>- r c2 q \<rbrakk> \<Longrightarrow> \<parallel>- p (Seq c1 c2) q"

Output:
apply(rule Seq)
apply fast+ done


Input:
lemma sig_red_regular_rtrancl_lc:
  assumes "(sig_red (\<prec>\<^sub>t) top_tail F)\<^sup>*\<^sup>* p q"
  shows "lc q = lc p"

Output:
using assms
by (induct, auto dest: sig_red_regular_lc)


Input:
lemma pre_post_right_isotone:
  "-p \<le> -q \<Longrightarrow> -r\<stileturn>-p \<le> -r\<stileturn>-q"

Output:
using order_lesseq_imp pre_iso pre_post_galois
by blast


Input:
lemma ceiling_divide_upper:
  fixes q :: "'a::floor_ceiling"
  shows "q > 0 \<Longrightarrow> p \<le> of_int (ceiling (p / q)) * q"

Output: by (meson divide_le_eq le_of_int_ceiling)


Input:
lemma extend_indets_inject:
  assumes "extend_indets p = extend_indets (q::_ \<Rightarrow>\<^sub>0 _::comm_ring_1)"
  shows "p = q"

Output:
proof - from assms have "extend_indets (p - q) = 0"
by (simp add: extend_indets_minus) thus ?thesis
by simp
qed


Input:
lemma transitive:
  fixes P :: pi
  and   Q :: pi
  and   R :: pi

  assumes "P \<simeq>\<^sup>s Q"
  and     "Q \<simeq>\<^sup>s R"

  shows "P \<simeq>\<^sup>s R"

Output:
using assms
by(force simp add: congruenceSubst_def substClosed_def intro: Weak_Late_Cong.transitive)


Input:
lemma hoare_triple_preI:
  assumes "\<And>h. h\<Turnstile>P \<Longrightarrow> <P> c <Q>"
  shows "<P> c <Q>"

Output:
using assms unfolding hoare_triple_def
by auto


Input:
lemma tauStepChainPar2:
  fixes \<Psi>  :: 'b
  and   \<Psi>\<^sub>P :: 'b
  and   Q   :: "('a, 'b, 'c) psi"
  and   Q'  :: "('a, 'b, 'c) psi"
  and   P   :: "('a, 'b, 'c) psi"
  and   A\<^sub>P :: "name list"

  assumes "\<Psi> \<otimes> \<Psi>\<^sub>P \<rhd> Q \<Longrightarrow>\<^sub>\<tau> Q'"
  and     "extractFrame P = \<langle>A\<^sub>P, \<Psi>\<^sub>P\<rangle>"
  and     "A\<^sub>P \<sharp>* \<Psi>"
  and     "A\<^sub>P \<sharp>* Q"

  shows "\<Psi> \<rhd> P \<parallel> Q \<Longrightarrow>\<^sub>\<tau> P \<parallel> Q'"

Output:
using assms
by(induct rule: trancl.induct) (auto dest: Par2 trancl_into_trancl tauStepChainFreshChain)


Input: lemma butlast_split: "n < length q \<Longrightarrow> butlast q = (take n q)@(drop n (butlast q))"

Output: by (metis append_take_drop_id take_butlast)


Input:
lemma progressing_appendD2:
  assumes "progressing (p @ q)" shows "progressing q"

Output:
using assms unfolding progressing_def
by (metis append_assoc)


Input:
lemma rule_disj_pre:
 "-p\<lbrace>x\<rbrace>-r \<Longrightarrow> -q\<lbrace>x\<rbrace>-r \<Longrightarrow> -p\<squnion>-q\<lbrace>x\<rbrace>-r"

Output: by (metis rule_disj tests_dual.sba_dual.sup_idempotent)


Input: lemma rtrancl_last_touch: "\<lbrakk> (q,q')\<in>R\<^sup>*; q\<in>S; !!qt. \<lbrakk> qt\<in>S; (q,qt)\<in>R\<^sup>*; (qt,q')\<in>(R-UNIV\<times>S)\<^sup>* \<rbrakk> \<Longrightarrow> P \<rbrakk> \<Longrightarrow> P"

Output: by (erule rtrancl_last_visit') auto


Input: lemma hfref_mop_conv: "((g,mop P f) \<in> [Q]\<^sub>a R \<rightarrow> S) \<longleftrightarrow> (g,f) \<in> [\<lambda>x. P x \<and> Q x]\<^sub>a R \<rightarrow> S"

Output:
apply (simp add: hfref_to_ASSERT_conv)
apply (fo_rule arg_cong fun_cong)+
by (auto intro!: ext simp: pw_eq_iff refine_pw_simps)


Input:
lemma LemAnnoNoAbrupt:
assumes conseq:  "P \<subseteq>  {s. \<exists>Z. s\<in>P' Z \<and> (\<forall>t. t \<in> Q' Z \<longrightarrow> t \<in> Q)}"
assumes lem: "\<forall>Z. \<Gamma>,\<Theta> \<turnstile>\<^sub>t\<^bsub>/F\<^esub> (P' Z) c (Q' Z),{}"
shows "\<Gamma>,\<Theta>\<turnstile>\<^sub>t\<^bsub>/F\<^esub> P (lem x c) Q,{}"

Output:
apply (rule Lem [OF lem])
using conseq
by blast


Input:
lemma  LocalSecretsComposition_exprChannel_s:
assumes "exprChannel x (sE Secrets)"
       and "\<not> ine P (sE Secrets)"
       and "\<not> ine Q (sE Secrets)"
       and "\<not> (x \<notin> ins P \<and> x \<notin> ins Q)"
shows "False"

Output:
using assms
by (metis ine_ins_neg1)


Input:
lemma set_spmf_sample_set_excl [simp]:
  assumes "finite (Q - P)"
  shows "set_spmf (sample_set_excl Q P) = (Q - P)"

Output:
unfolding sample_set_excl_def
by (metis set_spmf_of_set assms)+


Input:
theorem TBtheorem5a_notP1:
assumes "eout P E"
       and "\<not> eout Q E"
       and "subcomponents PQ = {P,Q}"
       and "correctCompositionOut PQ"
       and "\<exists> ch. ((out_exprChannelSingle P ch E) \<and> (ch \<in> (loc PQ)))"
shows    "\<not> eout PQ E"

Output:
using assms
by (simp add: eout_def correctCompositionOut_def out_exprChannelSingle_def, auto)


Input:
lemma diff_prime_power_imp_coprime:
  assumes "p \<noteq> q" "Factorial_Ring.prime (p::nat)" "Factorial_Ring.prime q"
  shows "coprime (p ^ (n::nat)) (q ^ m)"

Output:
using assms
by (metis power_0 power_one_right prime_dvd_power prime_imp_power_coprime_nat prime_nat_iff prime_power_inj'')


Input: lemma nextl_eps: "q \<in> nextl Q u \<Longrightarrow> (q,q') \<in> eps M \<Longrightarrow> q' \<in> states M \<Longrightarrow> q' \<in> nextl Q u"

Output:
using rtrancl_into_rtrancl epsclo_nextl epsclo_eq_Image
by fastforce


Input:
lemma bisimStructCong:
  fixes P :: ccs
  and   Q :: ccs

  assumes "P \<equiv>\<^sub>s Q"

  shows "P \<sim> Q"

Output:
using assms
apply(nominal_induct rule: Struct_Cong.strong_induct)
by(auto intro: reflexive symmetric transitive parComm parAssoc parId sumComm sumAssoc sumId resNil scopeExt scopeExtSum resAct resComm bangUnfold)


Input:
lemma sumPres:
  fixes P :: pi
  and   Q :: pi
  and   R :: pi

  assumes "P \<sim>\<^sup>s Q"

  shows "P \<oplus> R \<sim>\<^sup>s Q \<oplus> R"

Output:
using assms
by(force simp add: substClosed_def intro: Strong_Late_Bisim_Pres.sumPres)


Input:
lemma col_transitivity_2:
  assumes "P \<noteq> Q" and
    "Col P Q A" and
    "Col P Q B"
  shows "Col Q A B"

Output: by (metis Tarski_neutral_dimensionless.col_transitivity_1 Tarski_neutral_dimensionless_axioms assms(1) assms(2) assms(3) not_col_permutation_4)


Input:
lemma (in ordered_term) mult_scalar_tail_rec_left:
  "p \<odot> q = monom_mult (punit.lc p) (punit.lt p) q + (punit.tail p) \<odot> q"

Output:
unfolding punit.lc_def punit.tail_alt
by (fact mult_scalar_rec_left)


Input:
lemma weakSimE:
  fixes P   :: ccs
  and   Rel :: "(ccs \<times> ccs) set"
  and   Q   :: ccs
  and   \<alpha>   :: act
  and   Q'  :: ccs

  assumes "P \<leadsto><Rel> Q"
  and     "Q \<longmapsto>\<alpha> \<prec> Q'"

  obtains P' where "P \<Longrightarrow>\<alpha> \<prec> P'" and "(P', Q') \<in> Rel"

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


Input:
lemma pmf_rel_map_restrict_relp:
  shows pmf_rel_map_restrict_relp1: "rel_pmf (R \<upharpoonleft> P \<otimes> Q) (map_pmf f p) = rel_pmf (R \<circ> f \<upharpoonleft> P \<circ> f \<otimes> Q) p"
  and pmf_rel_map_restrict_relp2: "rel_pmf (R \<upharpoonleft> P \<otimes> Q) p (map_pmf g q) = rel_pmf ((\<lambda>x. R x \<circ> g) \<upharpoonleft> P \<otimes> Q \<circ> g) p q"

Output: by(simp_all add: pmf.rel_map restrict_relp_def fun_eq_iff)


Input: lemma "ffilter p (ffilter q xs) = ffilter (\<lambda>x. q x \<and> p x) xs"

Output: using filter_filter [Transfer.transferred] .


Input:
lemma parSym:
  fixes P :: pi
  and   Q :: pi

  shows "P \<parallel> Q \<approx>\<^sup>s Q \<parallel> P"

Output:
proof - have "P \<parallel> Q \<sim>\<^sup>s Q \<parallel> P"
by(rule Strong_Late_Bisim_Subst_SC.parSym) thus ?thesis
by(rule strongBisimWeakBisim)
qed


Input:
lemma br'_inner_invar_imp_final:
  "\<lbrakk> q\<in>W; br'_inner_invar {r\<in>\<delta>. q\<in>set (rhsq r)} q (Q,W-{q},rcm) {} \<Sigma>' \<rbrakk>
     \<Longrightarrow> ((Q,W,rcm),\<Sigma>') \<in> br'_step \<delta>"

Output:
apply (unfold br'_inner_invar_def)
apply auto
apply (rule br'_step.intros)
apply assumption
apply auto done


Input:
lemma bind_spmf_cong:
  "\<lbrakk> p = q; \<And>x. x \<in> set_spmf q \<Longrightarrow> f x = g x \<rbrakk>
  \<Longrightarrow> bind_spmf p f = bind_spmf q g"

Output: by(auto simp add: bind_spmf_def in_set_spmf intro: bind_pmf_cong option.case_cong)