Input:
lemma t_seq_pre_expression:
  "x \<in> While_program \<Longrightarrow> p \<in> Test_expression \<Longrightarrow> q \<in> Pre_expression \<Longrightarrow> tseq (-p) x (p\<star>x\<guillemotleft>q) (-p\<squnion>(x\<guillemotleft>(p\<star>x\<guillemotleft>q)*aL)) m \<in> Pre_expression"

Output:
using Pre_expression.pre_pre Pre_expression.test_pre Test_expression.neg_test While_program.while_prog aL_pre_expression tfun_def tfun_pre_expression tseq_pre_expression
by auto


Input: lemma rel_spmf_spmf_of_pmf [simp]: "rel_spmf R (spmf_of_pmf p) (spmf_of_pmf q) = rel_pmf R p q"

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


Input: lemma rw_rat_alt: "rw_rat = (\<lambda>p q. \<not> rw_rat_strict q p)"

Output: by (intro ext, auto simp: rw_rat_def rw_rat_strict_def Let_def)


Input:
lemma simE:
  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>[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 \<longmapsto>\<alpha> \<prec> P' \<and> (\<Psi>, P', Q') \<in> Rel"

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


Input:
lemma push_down_state_rank_tokens:
  "state_rank q n = Some i \<Longrightarrow> configuration q n \<noteq> {}"

Output: by (metis not_Some_eq state_rank.elims)


Input: lemma atomic1: "\<forall>w. \<exists>q. q w \<and> (\<forall>p. p w \<longrightarrow> q \<^bold>\<preceq> p)"

Output:
using the_sym_eq_trivial
by (metis (full_types))


Input:
lemma simIFresh[consumes 4, case_names cSim]:
  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   x   :: name
  and   C   :: "'d::fs_name"

  assumes Eqvt: "eqvt Rel"
  and     "x \<sharp> \<Psi>"
  and     "x \<sharp> P"
  and     "x \<sharp> Q"
  and     "\<And>\<alpha> Q'. \<lbrakk>\<Psi> \<rhd> Q \<longmapsto>\<alpha> \<prec> Q'; bn \<alpha> \<sharp>* P; bn \<alpha> \<sharp>* Q; bn \<alpha> \<sharp>* \<Psi>;
                    bn \<alpha> \<sharp>* subject \<alpha>; distinct(bn \<alpha>); bn \<alpha> \<sharp>* C; x \<sharp> \<alpha>; x \<sharp> Q'\<rbrakk> \<Longrightarrow>
                    \<exists>P'. \<Psi> \<rhd> P \<longmapsto>\<alpha> \<prec> P' \<and> (\<Psi>, P', Q') \<in> Rel"

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

Output:
using assms
by(rule_tac xvec="[x]" and C=C in simIChainFresh) auto


Input:
lemma (in Prim2) Prim_Invar2_ctd_Presentation_Loc_eq:
  "Prim_Invar2_ctd_Presentation_Loc w g r Q \<pi> \<longleftrightarrow> prim_invar2_ctd Q \<pi>"

Output: unfolding Prim_Invar2_ctd_Presentation_Loc_def ..


Input:
lemma det3_eq_zeroI:
  assumes "p = q + x *\<^sub>R (t - q)"
  shows "det3 q t p = 0"

Output:
unfolding assms
by (auto simp: det3_def' algebra_simps)


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

  assumes "P \<simeq> Q"

  shows "\<tau>.(P) \<simeq> \<tau>.(Q)"

Output:
using assms
by(blast intro: unfoldI Weak_Late_Step_Sim_Pres.tauPres dest: congruenceWeakBisim symetric)


Input:
lemma prod_impl_aux_alt_cava_reorder:
    "prod = (\<lparr>
      g_V = Collect (\<lambda>(q,s). q \<in> igba.V \<and> s \<in> sa.V),
      g_E = E_of_succ (\<lambda>(q,s).
        if igba.L q (sa.L s) then
          (\<lambda>(s,q). (q,s))`(LIST_SET_REV_TAG (succ_of_E (sa.E) s)
           \<times> (succ_of_E (igba.E) q))
        else
          {}
      ),
      g_V0 = igba.V0 \<times> sa.V0,
      igbg_num_acc = igba.num_acc,
      igbg_acc = \<lambda>(q,s). if s\<in>sa.V then igba.acc q else {}
    \<rparr>)"

Output:
unfolding prod_def
apply (auto simp: succ_of_E_def E_of_succ_def split: if_split_asm) done


Input: lemma resultant_sub: "resultant p q = resultant_sub (degree p) (degree q) p q"

Output:
unfolding resultant_def sylvester_mat_def resultant_sub_def
by auto


Input: lemma tl_queue_rep: "\<not>is_empty q \<Longrightarrow> linearize (tl_queue q) = tl (linearize q)"

Output: by transfer (auto simp: tl_append split: prod.splits list.splits elim!: tl_queue_t.elims)


Input: theorem hoare3_sound_complete: "\<Turnstile>\<^sub>3 {P}c{Q} \<longleftrightarrow> \<turnstile>\<^sub>3 {P}c{Q}"

Output:
using hoare3_complete hoare3_sound
by metis


Input:
lemma nn_integral_try_spmf:
  "nn_integral (measure_spmf (try_spmf p q)) f = nn_integral (measure_spmf p) f + nn_integral (measure_spmf q) f * pmf p None"

Output: by(simp add: nn_integral_measure_spmf spmf_try_spmf distrib_right nn_integral_add ennreal_mult mult.assoc nn_integral_cmult) (simp add: mult.commute)


Input:
lemma rule_cons_pre_mult:
  "-q\<lbrace>x\<rbrace>-r \<Longrightarrow> -p*-q\<lbrace>x\<rbrace>-r"

Output: by (metis tests_dual.sub_sup_closed rule_cons_pre tests_dual.upper_bound_right)


Input:
lemma pair_commute_spmf:
  "pair_spmf p q = map_spmf (\<lambda>(y, x). (x, y)) (pair_spmf q p)"

Output:
unfolding pair_spmf_alt_def
by(subst bind_commute_spmf)(simp add: map_spmf_conv_bind_spmf)


Input:
lemma Close1:
  fixes P  :: pi
  and   y  :: name
  and   P'' :: pi
  and   a  :: name
  and   x  :: name
  and   P' :: pi
  and   Q  :: pi
  and   Q' :: pi

  assumes PTrans: "P \<Longrightarrow>\<^sub>ly in P''\<rightarrow>a<x> \<prec> P'"
  and     QTrans: "Q \<Longrightarrow>\<^sub>l\<^sup>^a<\<nu>y> \<prec> Q'"
  and     xFreshP: "y \<sharp> P"
  and     xFreshQ: "y \<sharp> Q"

  shows "P \<parallel> Q \<Longrightarrow>\<^sub>l\<^sup>^\<tau> \<prec> <\<nu>y>(P' \<parallel> Q')"

Output:
using assms
by(auto intro: Weak_Late_Step_Semantics.Close1 simp add: weakTransition_def residual.inject)


Input:
lemma djf_simps:
  "djf f p T = T"
  "djf f p F = f p"
  "q \<noteq> T \<Longrightarrow> q \<noteq> F \<Longrightarrow> djf f p q = (let fp = f p in case fp of T \<Rightarrow> T | F \<Rightarrow> q | _ \<Rightarrow> Or (f p) q)"

Output: by (simp_all add: djf_def)


Input:
lemma matchPres:
  fixes P :: pi
  and   Q :: pi
  and   a :: name
  and   b :: name

  assumes "P \<simeq> Q"

  shows "[a\<frown>b]P \<simeq> [a\<frown>b]Q"

Output:
using assms
by(blast intro: unfoldI Weak_Late_Step_Sim_Pres.matchPres dest: unfoldE symetric)


Input:
theorem par_by_merge_commute:
  assumes "M is SymMerge"
  shows "P \<parallel>\<^bsub>M\<^esub> Q = Q \<parallel>\<^bsub>M\<^esub> P"

Output: by (metis Healthy_if assms par_by_merge_commute_swap)


Input:
lemma pcompose_mult: "pcompose (p * q) r = pcompose p r * pcompose q r"
  for p q r :: "'a::comm_semiring_0 poly"

Output: by (induct p arbitrary: q) (simp_all add: pcompose_add pcompose_smult pcompose_pCons algebra_simps)


Input: lemma validNF_conjD1: "\<lbrace> P \<rbrace> f \<lbrace> \<lambda>rv s. Q rv s \<and> Q' rv s \<rbrace>! \<Longrightarrow> \<lbrace> P \<rbrace> f \<lbrace> Q \<rbrace>!"

Output: by (fastforce simp: validNF_def valid_def no_fail_def)


Input:
lemma norm_pre_pure_iff[simp]:
  "<P*\<up>b> f <Q> \<longleftrightarrow> (b \<longrightarrow> <P> f <Q>)"

Output:
unfolding hoare_triple_def Let_def
by auto


Input: lemma deduct2: \<open>p # ps \<turnstile> q \<Longrightarrow> ps \<turnstile> p \<^bold>\<longrightarrow> q\<close>

Output: by (metis imply.simps(1-2) imply_append imply_swap_append)


Input:
lemma t_seq_test_seq:
  "q = --q \<Longrightarrow> test_seq (tseq (-p) x (p\<star>x\<guillemotleft>q) (-p\<squnion>(x\<guillemotleft>(p\<star>x\<guillemotleft>q)*aL)))"

Output:
using test_seq_def t_seq_test
by auto


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

  assumes "\<Psi> \<rhd> P \<approx> Q"

  shows "\<Psi> \<rhd> R \<parallel> P \<approx> R \<parallel> Q"

Output:
using assms
by(metis weakBisimParComm weakBisimParPres weakBisimTransitive)


Input:
lemma meld_correct:
    shows "to_mset (meld q q') = to_mset q + to_mset q'"

Output:
apply (unfold to_mset_def meld_def)
apply (simp_all add: BinomialHeapStruc.meld_correct) done


Input:
lemma rat_less_code [code]:
  "p < q \<longleftrightarrow> (let (a, c) = quotient_of p; (b, d) = quotient_of q in a * d < c * b)"

Output: by (cases p, cases q) (simp add: quotient_of_Fract mult.commute)


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

  shows "\<Psi> \<rhd> (P \<parallel> Q) \<parallel> R \<approx> P \<parallel> (Q \<parallel> R)"

Output: by(metis bisimParAssoc strongBisimWeakBisim)


Input:
lemma priority_Min:
  assumes "\<not> is_empty q"
  shows "priority q (min q) = Some (Min (the ` priority q ` set (values q)))"

Output:
using assms
by (auto simp add: min_def image_snd_alist_of Min_snd_alist_of priority_fst)


Input: lemma (in valid_graph) path_end:"ps\<noteq>[] \<Longrightarrow> is_path v ps v' \<Longrightarrow> v'=snd (snd(last ps))"

Output: by (induct ps arbitrary:v,auto)


Input:
lemma final_lemma4:
     "E\<noteq>{}
      ==> (\<Inter>v \<in> V. \<Inter>e \<in> E.
           {s. ((s \<in> reachable v) = ((root,v) \<in> REACHABLE))} \<inter> nmsg_eq 0 e)
          = final"

Output:
apply (rule subset_antisym)
apply (erule final_lemma2)
apply (unfold final_def Equality_def, blast) done


Input:
lemma Upd_eq_restr_stackD2:
  assumes "restr_stack V S' = Upd x # S"
  shows "x \<in> V"

Output:
using arg_cong[where f = upds, OF assms]
by auto


Input:
lemma frame_assign_in [frame]:
  "\<lbrakk> vwb_lens a; x \<subseteq>\<^sub>L a \<rbrakk> \<Longrightarrow> a:[x := v] = x := v"

Output: by (rel_auto, simp_all add: lens_get_put_quasi_commute lens_put_of_quotient)


Input:
lemma gtrace_infinite:
    assumes "grun A w V r v"
    shows "infinite (sset (gtrace r v))"

Output:
using assms
by (metis grun_elim gtrace_alt_def infinite_Ici sset_fromN sset_szip_finite)


Input: lemma fresh_quote_all [simp]: "finite V \<Longrightarrow> i \<sharp> quote_all p V \<longleftrightarrow> i \<sharp> V \<and> i \<sharp> p\<bullet>V"

Output: by (induct rule: finite_induct) (auto simp: fresh_finite_insert)


Input:
lemma isolate_variable_sparse_ne_zeroD:
  "isolate_variable_sparse mp v x \<noteq> 0 \<Longrightarrow> x \<le> MPoly_Type.degree mp v"

Output:
using isovar_greater_degree leI
by blast


Input:
lemma subst_fv:  assumes fv_e: "FV e \<subseteq> {x}" and fv_v: "FV v = {}"
  shows "FV (subst x v e) = {}"

Output:
using fv_e fv_v subst_fv_aux
by blast


Input:
lemma stutter_extend_edgesI_stutter:
    assumes "v \<in> V" "v \<notin> Domain E"
    shows "(v, v) \<in> stutter_extend_edges V E"

Output:
using assms unfolding stutter_extend_edges_def
by auto


Input:
lemma subprob_cexprD:
  assumes "subprob_cexpr V V' \<Gamma> e"
  shows "\<And>\<rho>. \<rho> \<in> space (state_measure V' \<Gamma>) \<Longrightarrow>
               (\<integral>\<^sup>+\<sigma>. extract_real (cexpr_sem (merge V V' (\<sigma>, \<rho>)) e) \<partial>state_measure V \<Gamma>) \<le> 1"

Output:
using assms unfolding subprob_cexpr_def
by simp


Input:
lemma extract_var_single':
assumes "v \<noteq> v'"
shows "extract_var (monom (Poly_Mapping.single v n) a) v' = monom (Poly_Mapping.single v n) (monom 0 a)"

Output:
unfolding extract_var_monom
using assms
by (metis add.right_neutral lookup_single_not_eq remove_key_sum single_zero)


Input: lemma subst_elimD''[dest]: "subst_elim \<sigma> v \<Longrightarrow> v \<notin> fv (\<sigma> w)"

Output: by (metis subst_elim_def subst_apply_term.simps(1))


Input:
lemma E4_R: "\<turnstile>\<^sub>3 {\<up>(v>0) ** $(2*v) ** pointsto ''x'' (int v) }
            ''x'' ::= Plus (V ''x'') (N (- 1))
           {\<up>(v>0) ** $(2*v-1) ** pointsto ''x'' (int v-1) }"

Output:
apply(rule pureI)
apply(rule strongAssign)
apply(rule symeval | frame_inference)+
by (simp add: sep_reorder_dollar )


Input:
lemma subst_cev_commute_full:
  fixes e::ce and w::v and v::v
  assumes "atom z \<sharp> v" and "atom x \<sharp> w" and "x \<noteq> z"
  shows "subst_cev (e[z::=w]\<^sub>c\<^sub>e\<^sub>v) x v  = subst_cev (e[x::=v]\<^sub>c\<^sub>e\<^sub>v) z w "

Output:
using assms
by(nominal_induct e rule: ce.strong_induct,simp+)


Input:
lemma ee:
  assumes "vector v"
      and "e \<le> v * -v\<^sup>T"
    shows "e * e = bot"

Output:
proof - have "e * v \<le> bot"
by (metis assms covector_vector_comp comp_associative mult_left_isotone mult_right_zero) thus ?thesis
by (metis assms(2) bot_unique comp_associative mult_right_isotone semiring.mult_not_zero)
qed


Input:
lemma subst_ev_commute_full:
  fixes e::e and w::v and v::v
  assumes "atom z \<sharp> v" and "atom x \<sharp> w" and "x \<noteq> z"
  shows "subst_ev  (e[z::=w]\<^sub>e\<^sub>v) x v = subst_ev  (e[x::=v]\<^sub>e\<^sub>v) z w"

Output:
using assms
by(nominal_induct e rule: e.strong_induct,simp+)


Input:
lemma rel_exp_simps [simp]:
  "rel_exp V (Var x) e' \<longleftrightarrow> (\<exists>y. e' = Var y \<and> V x y)"
  "rel_exp V (Const n) e' \<longleftrightarrow> e' = Const n"
  "rel_exp V (Plus e1 e2) e' \<longleftrightarrow> (\<exists>e1' e2'. e' = Plus e1' e2' \<and> rel_exp V e1 e1' \<and> rel_exp V e2 e2')"
  "rel_exp V (Div e1 e2) e' \<longleftrightarrow> (\<exists>e1' e2'. e' = Div e1' e2' \<and> rel_exp V e1 e1' \<and> rel_exp V e2 e2')"
  "rel_exp V e (Var y) \<longleftrightarrow> (\<exists>x. e = Var x \<and> V x y)"
  "rel_exp V e (Const n) \<longleftrightarrow> e = Const n"
  "rel_exp V e (Plus e1' e2') \<longleftrightarrow> (\<exists>e1 e2. e = Plus e1 e2 \<and> rel_exp V e1 e1' \<and> rel_exp V e2 e2')"
  "rel_exp V e (Div e1' e2') \<longleftrightarrow> (\<exists>e1 e2. e = Div e1 e2 \<and> rel_exp V e1 e1' \<and> rel_exp V e2 e2')"

Output: by(auto elim: exp.rel_cases)


Input:
lemma scalar_prod_minus_distrib: fixes v\<^sub>1 :: "'a :: ring vec"
  assumes v: "v\<^sub>1 \<in> carrier_vec n" "v\<^sub>2 \<in> carrier_vec n" "v\<^sub>3 \<in> carrier_vec n"
  shows "v\<^sub>1 \<bullet> (v\<^sub>2 - v\<^sub>3) = v\<^sub>1 \<bullet> v\<^sub>2 - v\<^sub>1 \<bullet> v\<^sub>3"

Output:
unfolding minus_add_uminus_vec[OF v(2-3)]
by (subst scalar_prod_add_distrib[OF v(1)], insert v, auto)


Input:
lemma find_fas_code_refine[refine]:
  fixes V :: "('vi\<times>'v) set"
  assumes "is_bounded_hashcode V eq bhc"
  assumes "(eq,(=)) \<in> V \<rightarrow> V \<rightarrow> bool_rel"
  assumes "is_valid_def_hm_size TYPE ('vi) sz"
  assumes 2: "(Gi, G) \<in> \<langle>Rm, V\<rangle>g_impl_rel_ext"
  shows "RETURN (find_fas_code eq bhc sz Gi) \<le> \<Down>(\<langle>V\<times>\<^sub>rV\<rangle>ahs_rel (prod_bhc bhc bhc)) (find_fas G)"

Output:
proof - note find_fas_code.refine[OF assms] also note find_fas_impl_refine finally show ?thesis .
qed


Input:
lemma switch_vchop2:
  "(v'=v1'--v2') \<and> (v=c>v') \<longrightarrow>
       (\<exists> v1 v2. (v1 =c> v1') \<and> (v2 =c> v2') \<and> (v=v1--v2))"

Output: by (metis (no_types, hide_lams) select_convs view.vchop_def view.switch_def)


Input:
lemma min_distI2:
    "\<lbrakk> conn v v' ; \<And>d. \<lbrakk> dist v d v'; \<And>d'. dist v d' v' \<Longrightarrow> d \<le> d' \<rbrakk> \<Longrightarrow> Q d \<rbrakk>
      \<Longrightarrow> Q (min_dist v v')"

Output:
unfolding min_dist_def
by (rule LeastI2_wellorder[where Q=Q and a="SOME d. dist v d v'"]) (auto simp: conn_def intro: someI)


Input:
lemma mds_consistent_preds_tyenv_update:
  "P' = P'' |` {v. stable \<S> v} \<Longrightarrow> v \<in> dom \<Gamma> \<Longrightarrow>
  mds_consistent mds \<Gamma> \<S> P \<Longrightarrow> mds_consistent mds (\<Gamma>(v \<mapsto> t)) \<S> P'"

Output:
apply(clarsimp simp: mds_consistent_def)
apply(auto simp: restrict_preds_to_vars_def add_pred_def split: if_splits) done


Input:
lemma cont_nec_fact2_4[PLM]:
    "[\<^bold>\<not>(WeaklyContingent (PLM.L)) in v]"

Output:
proof - { assume "[WeaklyContingent PLM.L in v]" hence "[Contingent PLM.L in v]" unfolding WeaklyContingent_def
using "\<^bold>&E"(1)
by blast } thus ?thesis
using thm_noncont_e_e_3 unfolding Contingent_def NonContingent_def
using modus_tollens_2 CP
by blast
qed


Input:
lemma in_eq_out_arc_ends: "(u, v) \<in> ((arc_to_ends G) ` (in_arcs G v)) \<longleftrightarrow>
    (v, u) \<in> ((arc_to_ends G) ` (out_arcs G v))"

Output:
using arc_to_ends_def in_in_arcs_conv in_out_arcs_conv
by (smt (z3) Pair_inject adj_in_verts(1) dominatesI image_iff out_in_arcs_reflexive_uniq)


Input:
lemma apx_empty_iff':
  assumes "Z \<in> V'" shows "Z = {} \<longleftrightarrow> Approx\<^sub>\<beta> Z = {}"

Output:
using apx_empty_iff assms unfolding V'_def
by force


Input: lemma selectlike_equal_cond: "(selectlike X \<nu> V = selectlike Y \<nu> V) = (\<forall>\<mu>. Uvariation \<mu> \<nu> (-V) \<longrightarrow> (\<mu>\<in>X) = (\<mu>\<in>Y))"

Output:
unfolding selectlike_def
using Uvariation_Vagree
by auto


Input:
lemma robdd_depends_on_varI :
  "robdd_\<alpha> b (a(v := True)) \<noteq> robdd_\<alpha> b (a(v := False)) \<Longrightarrow>
   robdd_depends_on_var v b"

Output:
unfolding robdd_depends_on_var_def
by auto


Input:
lemma typeof_i64:
  assumes "typeof v = T_i64"
  shows "\<exists>c. v = ConstInt64 c"

Output:
using assms unfolding typeof_def
by (cases v) auto


Input:
lemma moebius_translation_inv_translation [simp]:
  shows "moebius_pt (moebius_translation v) (moebius_pt (moebius_translation (-v)) z) = z"

Output:
using moebius_translation_inv[symmetric, of v]
by (simp del: moebius_translation_inv)


Input:
lemma lt_max_keys:
  assumes "v \<in> keys p"
  shows "v \<preceq>\<^sub>t lt p"

Output:
proof (rule lt_max) from assms show "lookup p v \<noteq> 0"
by (simp add: in_keys_iff)
qed


Input:
lemma tObsC_abs_tLast[simp]:
  "(u, v) \<in> tObsC_abs t \<Longrightarrow> envObsC (es v) = envObsC (es (tLast t))"

Output:
unfolding tObsC_abs_def tObsC_def
by (auto iff: o_def elim: tMap_tLast_inv)


Input:
lemma as_needed_asses_submap_exec_iii:
  fixes f g v
  shows "
    fmdom' (action_needed_asses a s)
    = {v \<in> fmdom' s. v \<in> fmdom' (fst a) \<and> fmlookup (fst a) v = fmlookup s v}"

Output:
unfolding action_needed_asses_def action_needed_vars_def
by (simp add: Set.filter_def fmfilter_alt_defs(4)) \<comment> \<open>NOTE added lemma.\<close>


Input: lemma list_of_vec_code[code]: "list_of_vec (vec_impl v) = list_of_vec_impl v"

Output: by (transfer, auto simp: mk_vec_def, case_tac b, auto intro: nth_equalityI)


Input:
lemma independent_explicit_finite_subsets:
  "independent A \<longleftrightarrow> (\<forall>S \<subseteq> A. finite S \<longrightarrow> (\<forall>u. (\<Sum>v\<in>S. u v *s v) = 0 \<longrightarrow> (\<forall>v\<in>S. u v = 0)))"

Output:
unfolding dependent_explicit [of A]
by (simp add: disj_not2)


Input:
lemma point_in_vector_sup:
  assumes "point p"
      and "vector v"
      and "regular v"
      and "p \<le> v \<squnion> w"
    shows "p \<le> v \<or> p \<le> w"

Output: by (metis assms inf.absorb1 shunting_var_p sup_commute point_in_vector_or_complement)


Input:
lemma state_qbit_norm_sq:
  assumes "v\<in> state_qbit n"
  shows "(cpx_vec_length v)\<^sup>2 = 1"

Output:
proof - have "cpx_vec_length v = 1"
using assms unfolding state_qbit_def
by simp thus ?thesis
by simp
qed


Input: lemma modified_view_valid: "isViewOn \<lparr>V = (V\<^bsub>\<V>\<^esub> \<union> N\<^bsub>\<V>\<^esub>), N = {}, C = C\<^bsub>\<V>\<^esub>\<rparr> E\<^bsub>SES\<^esub>"

Output:
using validVU unfolding isViewOn_def V_valid_def VC_disjoint_def VN_disjoint_def NC_disjoint_def
by auto


Input: lemma ground_ssubst_eq: "\<lbrakk>finite V; supp t = {}\<rbrakk> \<Longrightarrow> ssubst t V F = t"

Output: by (induct V rule: finite_induct) (auto simp: ssubst_insert fresh_def)


Input:
lemma Prf_flat_lang:
  assumes "\<turnstile> v : r" shows "flat v \<in> lang r"

Output:
using assms
by(induct v r rule: Prf.induct) (auto)


Input: lemma valid_abs_goal_1: "abs_ast_goal v \<noteq> None \<Longrightarrow> v \<in> set abs_ast_variable_section"

Output:
using wf_goal
by (auto simp add: abs_ast_goal_def dest!: map_of_SomeD)


Input:
lemma vec_norm_eq_cpx_vec_length:
  shows "vec_norm v = cpx_vec_length v"

Output:
using vec_norm_sq_cpx_vec_length_sq
by (metis cpx_vec_length_inner_prod inner_prod_csqrt power2_csqrt vec_norm_def)


Input:
lemma  wfG_x_fresh_in_v_simple:
  fixes x::x and v :: v
  assumes "\<Theta>; \<B>; \<Gamma> \<turnstile> v \<Rightarrow> \<tau>" and "atom x \<sharp> \<Gamma>"
  shows "atom x \<sharp> v"

Output:
using wfV_x_fresh infer_v_wf assms
by metis


Input:
lemma endpow_list_apply_closed :
  "v \<in> V \<Longrightarrow> set (map (\<lambda>S. S v) (map endpow [0..<k])) \<subseteq> V"

Output:
using VEnd_endpow VectorSpaceEnd.endomorph
by fastforce


Input:
lemma map_ran_restrictA:
  "map_ran f (restrictA V \<Gamma>) = restrictA V (map_ran f \<Gamma>)"

Output: by (induction \<Gamma>) auto


Input:
lemma subst_t_b_eq:
  fixes x::x and v::v
  shows  "b_of (\<tau>[x::=v]\<^sub>\<tau>\<^sub>v) = b_of \<tau>"

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


Input:
lemma terminal_path_is_path:
  assumes "terminal_path v v' pth"
  shows "path v v' pth"

Output:
using assms
by induction (auto simp add: path_cons_simp)


Input:
lemma ltl_step_singleton:
"\<exists>t. possible_steps e n r (fst v) (snd v) = {|(aa, t)|} \<and> evaluate_outputs t (snd v) r  = b \<and> evaluate_updates t (snd v) r = c\<Longrightarrow>
ltl_step e (Some n) r v = (Some aa, b, c)"

Output:
apply (cases v)
by auto


Input:
lemma minGraphProps6:
  "minGraphProps g \<Longrightarrow> v : \<V> g \<Longrightarrow> f \<in> set (facesAt g v) \<Longrightarrow> v \<in> \<V> f"

Output: by(auto simp: facesAt_def facesAt_eq_def minGraphProps_def minGraphProps'_def faceListAt_len_def split:if_split_asm)


Input: lemma zipper_children_size_change [termination_simp]: "(a, b) \<in> set (zipper_children (p, v)) \<Longrightarrow> size b < size v"

Output: by(cases v)(clarsimp simp add: splits_iff Set.image_iff)


Input:
lemma restrict_IF_id: assumes o: "ifex_ordered (IF v t e)" assumes le: "v' < v"
  shows "restrict (IF v t e) v' val = (IF v t e)"

Output: using restrict_id[OF o, unfolded ifex_top_var.simps, OF refl le, of val] .


Input:
lemma vE_push: "\<lbrakk> (u,v)\<in>pE; u\<in>last p; v\<notin>\<Union>(set p); v\<notin>D \<rbrakk>
    \<Longrightarrow> vE (p @ [{v}]) D ((pE - {(u,v)}) \<union> E\<inter>{v}\<times>UNIV) = insert (u,v) lvE"

Output:
unfolding vE_def touched_def
using pE_E_from_p
by auto


Input:
lemma cbv_star_implies_eval:
  assumes a: "t \<longrightarrow>cbv* v" "val v"
  shows "t \<Down> v"

Output:
using a
by (induct) (auto simp add: eval_val cbv_star_eval dest: cbvs2)


Input:
lemma eqOn_map_sdrop[simp]:
"cpt V env \<pi>l \<Longrightarrow> cpt V env1 \<pi>l1 \<Longrightarrow>
 eqOn V env \<pi>l env1 \<pi>l1 \<Longrightarrow> eqOn V env (map (sdrop i) \<pi>l) env1 (map (sdrop i) \<pi>l1)"

Output:
unfolding eqOn_def cpt_def
by auto


Input:
lemma minGraphProps8:
  "minGraphProps g \<Longrightarrow> v : \<V> g \<Longrightarrow> distinct (normFaces (facesAt g v))"

Output: by(auto simp: facesAt_def minGraphProps_def minGraphProps'_def facesAt_distinct_def normFaces_def)


Input: lemma monitor_split: "ok \<phi> v \<Longrightarrow> k \<in> strategy v \<Longrightarrow> (i, v) \<in> M (splitter \<pi> k) \<longleftrightarrow> (i, v) \<in> M \<pi>"

Output:
unfolding splitter_pslice
by (rule sliceable_M) (auto simp: wf_tuple_def fvi_less_nfv intro!: mem_restrI[rotated 2, where y="map the v"])


Input: lemma restrict_def':" restrict v f c = lan v \<sqinter> f c"

Output:
using inf_commute restriction.restrict_def
by auto


Input:
lemma trnr\<^sub>\<eta>_eq:
    assumes "ide u" and "ide v"
    and "src v = trg g" and "src u = trg f"
    and "\<mu> \<in> hom (v \<star> g) u"
    shows "trnr\<^sub>\<eta> v \<mu> = (\<mu> \<star> f) \<cdot> (v \<star> \<eta>)"

Output:
using assms antipar trnr\<^sub>\<eta>_eq strict_assoc' comp_ide_arr [of "\<a>\<^sup>-\<^sup>1[v, g, f]" "v \<star> \<eta>"]
by force


Input:
lemma proj5_addpre:
  fixes v pre
  shows "\<pi>\<^sub>5(addpre v pre) = \<pi>\<^sub>5(v)"

Output:
unfolding addpre_def
by (cases v) simp


Input: lemma fin_succs: "\<forall>v \<in> set (g_V G). finite (succs v)"

Output: by (insert succ_is_subset_of_verts) (auto intro:rev_finite_subset)


Input:
lemma restr_stack_cong:
  "(\<And> x. x \<in> upds S \<Longrightarrow> x \<in> V \<longleftrightarrow> x \<in> V') \<Longrightarrow> restr_stack V S = restr_stack V' S"

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


Input:
lemma rel_state_intro:
  assumes
    "\<And> heap v heap'. P heap \<Longrightarrow> State_Monad.run_state f heap = (v, heap')
      \<Longrightarrow> \<exists> v'. R v v' \<and> execute g heap = Some (v', heap')"
    "\<And> heap v heap'. P heap \<Longrightarrow> State_Monad.run_state f heap = (v, heap') \<Longrightarrow> P heap'"
  shows "rel_state R f g"

Output:
unfolding rel_state_def
apply auto
apply (frule assms(1)[rotated])
apply (auto intro: assms(2)) done


Input:
lemma (in Finite_Graph) sum_outgoing_extend:
  assumes "\<And>v. \<lbrakk> v\<in>V; (u,v)\<notin>E \<rbrakk> \<Longrightarrow> g (u,v) = 0"
  shows "(\<Sum>e\<in>outgoing u. g e) = (\<Sum>v\<in>V. g (u,v))"

Output:
apply (subst sum_outgoing_pointwise)
apply (rule sum.mono_neutral_left)
using assms succ_ss_V
by auto


Input:
lemma type_aexpr_Load':
  "v \<in> dom \<Gamma> \<Longrightarrow> t = (the (\<Gamma> v)) \<Longrightarrow> type_aexpr \<Gamma> (Load v) t"

Output:
apply(insert type_aexpr[of \<Gamma> "Load v", simplified])
apply(simp add: to_total_def) done


Input: lemma C_normal_compR_rhs: "(nm, vs, v) \<in> compR \<Longrightarrow> C_normal\<^sub>M\<^sub>L v"

Output: by(auto simp: compR_def image_def Bex_def pure_R C_normal_ML_comp_open)


Input: lemma fresh_ssubst_dbtm: "\<lbrakk>atom i \<sharp> p\<bullet>V; V \<subseteq> Vs\<rbrakk> \<Longrightarrow> atom i \<sharp> ssubst (vquot_dbtm V t) V F"

Output: by (induct t rule: dbtm.induct) (auto simp: F_unfold fresh_image permute_set_eq_image)


Input:
lemma chamber_vertex_outside_facet_image:
  assumes "v\<notin>z" "domain.chamber (insert v z)"
  shows   "f v \<notin> f`z"

Output:
proof- from assms(1) have "insert v z - z = {v}"
by force with assms(2) show ?thesis
using codim_map
by fastforce
qed


Input:
lemma normB_S: assumes v: "v \<in> S"
  shows "norm1 (B *v v) \<noteq> 0"

Output:
proof - from zero_no_ev[OF v, unfolded rv_mult rv_0] show ?thesis
by auto
qed


Input:
lemma one_strongly_connected_iff_3:
  "one_strongly_connected x \<longleftrightarrow> x;1;x \<le> x\<^sup>T\<^sup>+"

Output: by (metis comp_assoc conv_contrav conv_invol conv_iso conv_one star_conv one_strongly_connected_iff_1)


Input:
lemma (in equivalence) closure_of_eq:
  assumes "A \<subseteq> carrier S" "x \<in> closure_of A"
  shows "\<lbrakk> x' \<in> carrier S; x .= x' \<rbrakk> \<Longrightarrow> x' \<in> closure_of A"

Output:
using assms elem_cong_l sym unfolding eq_closure_of_def
by blast


Input:
lemma star_below_Omega:
  "x\<^sup>\<star> \<le> x\<^sup>\<Omega>"

Output: by (metis Omega_induct mult_1_right order_refl star.circ_left_unfold)


Input:
lemma isCont_eq_Lb:
  fixes f :: "real \<Rightarrow> 'a::linorder_topology"
  shows "a \<le> b \<Longrightarrow> \<forall>x. a \<le> x \<and> x \<le> b \<longrightarrow> isCont f x \<Longrightarrow>
    \<exists>M. (\<forall>x. a \<le> x \<and> x \<le> b \<longrightarrow> M \<le> f x) \<and> (\<exists>x. a \<le> x \<and> x \<le> b \<and> f x = M)"

Output:
using continuous_attains_inf[of "{a..b}" f]
by (auto simp: continuous_at_imp_continuous_on Ball_def Bex_def)


Input:
lemma rel_inv_closed_glob_consistent:
  "(\<langle>c, mds', mem\<rangle>, \<langle>c', mds', mem'\<rangle>) \<in> rel_inv \<Longrightarrow>
       \<forall>x a b.
          A x = Some (a, b) \<longrightarrow>
          (mem x = a \<longrightarrow> mem' x \<noteq> b) \<longrightarrow> \<not> var_asm_not_written mds' x \<Longrightarrow>
       \<forall>x. dma mem [\<parallel>\<^sub>1 A] x \<noteq> dma mem x \<longrightarrow> \<not> var_asm_not_written mds' x \<Longrightarrow>
       \<forall>x. dma mem [\<parallel>\<^sub>1 A] x = Low \<and> (x \<in> mds' AsmNoReadOrWrite \<longrightarrow> x \<in> \<C>) \<longrightarrow>
           mem [\<parallel>\<^sub>1 A] x = mem' [\<parallel>\<^sub>2 A] x \<Longrightarrow>
       (\<langle>c, mds', mem [\<parallel>\<^sub>1 A]\<rangle>, \<langle>c', mds', mem' [\<parallel>\<^sub>2 A]\<rangle>) \<in> rel_inv"

Output:
apply(safe elim!: rel_inv.cases)
using rel_inv.intros dma_def
by simp+


Input:
lemma sort_key_msort_key_conv:
  "sort_key key = msort_key"

Output:
using msort_key_stable [of "key x" for x]
by (intro ext properties_for_sort_key mset_msort_key sorted_msort_key) (metis (mono_tags, lifting) filter_cong)


Input:
lemma cont_case_nat[simp]:
  "\<lbrakk>cont (\<lambda>x. f x); \<And>n. cont (\<lambda>x. g x n) \<rbrakk> \<Longrightarrow> cont (\<lambda>x. case_nat (f x) (g x) n)"

Output: by (cases n, simp_all)


Input: lemma euclidean_proj_space_def: "euclidean = map_topology Proj euclidean"

Output:
apply (auto simp: topology_eq_iff openin_map_topology) subgoal for x
by (induction x) auto subgoal for _ x
by (induction x) auto done


Input:
theorem wls_Abs_swap_fresh[simp]:
assumes "wls s X" and "fresh xs x' X"
shows "Abs xs x' (X #[x' \<and> x]_xs) = Abs xs x X"

Output:
using assms
by(simp add: Abs_swap_fresh)


Input: lemma power_eq_top_ennreal: "x ^ n = top \<longleftrightarrow> (n \<noteq> 0 \<and> (x::ennreal) = top)"

Output: by (cases x rule: ennreal_cases) (auto simp: ennreal_power top_power_ennreal)


Input: lemma INF_par_distrib: "X \<noteq> {} \<Longrightarrow> (\<Sqinter>x\<in>X. d x) \<parallel> c = (\<Sqinter>x\<in>X. d x \<parallel> c)"

Output:
using par_INF_distrib par_commute
by (metis (mono_tags, lifting) INF_cong)


Input:
lemma convert_new_thread_action_id:
  "convert_new_thread_action id = (id :: ('t, 'x, 'm) new_thread_action \<Rightarrow> ('t, 'x, 'm) new_thread_action)" (is ?thesis1)
  "convert_new_thread_action (\<lambda>x. x) = (id :: ('t, 'x, 'm) new_thread_action \<Rightarrow> ('t, 'x, 'm) new_thread_action)" (is ?thesis2)

Output:
proof - show ?thesis1
by(rule ext)(case_tac x, simp_all) thus ?thesis2
by(simp add: id_def)
qed


Input:
lemma blocking_on_CD_on:
  assumes "blocking_on ds X h X''"
  shows "X'' \<subseteq> CD_on ds (X \<union> X'')"

Output:
using assms unfolding blocking_on_def
by blast


Input: lemma Sup_dual_def_var: "\<partial> (\<Squnion>X) = \<Sqinter> (\<partial> ` X)"

Output:
using comp_eq_dest Sups_dual_def
by fastforce


Input: lemma Rep_mod: "Rep x mod n = Rep x"

Output:
apply (rule_tac x=x in type_definition.Abs_cases [OF type])
apply (simp add: type_definition.Abs_inverse [OF type]) done


Input:
lemma pred_option_conj [simp]:
  "pred_option (\<lambda>x. P x \<and> Q x) = (\<lambda>x. pred_option P x \<and> pred_option Q x)"

Output: by(auto simp add: pred_option_def)


Input: lemma dagger_unfoldl_eq [simp]: "1 + x \<cdot> x\<^sup>\<dagger> = x\<^sup>\<dagger>"

Output: by (metis dagger_prod_unfold mult_1_left mult_1_right)


Input:
lemma derangements_no_fixpoint:
  assumes "d \<in> derangements A" "x \<in> A"
  shows "d x \<noteq> x"

Output:
using assms
by (auto elim: derangementsE)


Input:
lemma akra_bazzi_term_imp_less':
  assumes "akra_bazzi_term x\<^sub>0 (Suc x\<^sub>1) b t" "x > x\<^sub>1"
  shows   "t x < x"

Output:
using assms unfolding akra_bazzi_term_def
by force


Input: lemma map_option_ap_conv[applicative_unfold]: "map_option f x = ap_option (pure f) x"

Output: by (cases x rule: option.exhaust) simp_all


Input: lemma ordinal_1_times [simp]: "oSuc 0 * x = (x::ordinal)"

Output: by (rule_tac a=x in oLimit_induct, simp_all)


Input:
theorem lfp_f_doctor_pessimal:
  assumes "x \<in> match (lfp_F ds)"
  shows "\<exists>y \<in> match XD_XH. (x, y) \<in> Pd (Xd x)"

Output:
using %invisible assms lfp_F_stable_pair_on[where ds=ds] \<open>stable_pair_on ds XD_XH\<close> stable_pair_on_CD_on stable_pair_on_Xd Cd_Xd mem_CD_on_Cd XD_XH_lfp_F(1) Cd_mono[where d="Xd x" and x=x and X="fst (lfp_F ds)" and Y="fst XD_XH"]
by (metis sup.absorb_iff2)


Input:
lemma omega_translate_2:
  "x\<^sup>\<omega> * bot \<squnion> x\<^sup>\<star> = x\<^sup>\<omega> \<squnion> x\<^sup>\<star>"

Output: by (metis mult_assoc omega_mult_star_2 star.circ_top top_left_bot)


Input: lemma pderiv_sum: "pderiv (\<Sum>x\<in>A. f x) = (\<Sum>x\<in>A. pderiv (f x))"

Output: by (induction A rule: infinite_finite_induct) (auto simp: pderiv_add)


Input:
lemma unit_factor_field [simp]:
  "unit_factor (x :: 'a :: {field,normalization_semidom}) = x"

Output: by (cases "is_unit x") (auto simp: is_unit_unit_factor dvd_field_iff)


Input: lemma algebraic_inverse: "algebraic x \<Longrightarrow> algebraic (inverse x)"

Output:
using algebraic_of_rat[of 0]
by (cases "x = 0", auto dest: algebraic_imp_represents_irreducible intro: algebraic_representsI represents_inverse)


Input:
lemma dflt_arity[sepref_monadify_arity]:
  "RETURN \<equiv> \<lambda>\<^sub>2x. SP RETURN$x"
  "RECT \<equiv> \<lambda>\<^sub>2B x. SP RECT$(\<lambda>\<^sub>2D x. B$(\<lambda>\<^sub>2x. RCALL$D$x)$x)$x"
  "case_list \<equiv> \<lambda>\<^sub>2fn fc l. SP case_list$fn$(\<lambda>\<^sub>2x xs. fc$x$xs)$l"
  "case_prod \<equiv> \<lambda>\<^sub>2fp p. SP case_prod$(\<lambda>\<^sub>2a b. fp$a$b)$p"
  "case_option \<equiv> \<lambda>\<^sub>2fn fs ov. SP case_option$fn$(\<lambda>\<^sub>2x. fs$x)$ov"
  "If \<equiv> \<lambda>\<^sub>2b t e. SP If$b$t$e"
  "Let \<equiv> \<lambda>\<^sub>2x f. SP Let$x$(\<lambda>\<^sub>2x. f$x)"

Output: by (simp_all only: SP_def APP_def PROTECT2_def RCALL_def)


Input:
lemma alw_coinduct[consumes 1, case_names alw stl]:
  "X x \<Longrightarrow> (\<And>x. X x \<Longrightarrow> \<phi> x) \<Longrightarrow> (\<And>x. X x \<Longrightarrow> \<not> alw \<phi> (stl x) \<Longrightarrow> X (stl x)) \<Longrightarrow> alw \<phi> x"

Output:
using alw.coinduct[of X x \<phi>]
by auto


Input:
theorem star_cases [case_names star_n, cases type: star]:
  obtains X where "x = star_n X"

Output: by (cases x) (auto simp: star_n_def star_def elim: quotientE)


Input:
lemma n_circ_left_unfold:
  "n(x\<^sup>\<circ>) = n(x * x\<^sup>\<circ>)"

Output: by (metis circ_n_L circ_plus_same n_mult n_mult_bot)


Input: lemma inj_def_var1: "is_inj x \<longleftrightarrow> -(1') ; x \<le> -x"

Output: by (metis conv_galois_2 double_compl galois_aux inf.commute is_inj_def)


Input:
lemma mapp_mapp:
  "(\<And>x. f x 0 = 0) \<Longrightarrow> Poly_Mapping.mapp f (Poly_Mapping.mapp g m) =
                          Poly_Mapping.mapp (\<lambda>x y. f x (g x y)) m"

Output: by transfer' (auto simp: fun_eq_iff lookup_mapp in_keys_iff)


Input: lemma lift_self_disjoint: "x \<sqinter> lift x u = 0"

Output: by (metis TC_sup_lift arg_subset_TC inf.absorb_iff2 inf_assoc inf_sup_aci(3) lift_0)


Input: lemma (in aGroup) ag_inv_inv:"x \<in> carrier A \<Longrightarrow> -\<^sub>a (-\<^sub>a x) = x"

Output: by (frule ag_l_inv1[of "x"], frule ag_mOp_closed[of "x"], rule ag_inv_unique[THEN sym, of "-\<^sub>a x" "x"], assumption+)


Input:
lemma foldli_image:
    "det_fold_set X (\<lambda>_. True) (\<lambda>x s. insert (f x) s) {}
      ((`) f)"

Output:
apply rule
using foldli_image_aux[where ?s0.0="{}"]
by simp


Input:
theorem TBtheorem5b_notPQ:
assumes "subcomponents PQ = {P,Q}"
       and "correctCompositionOut PQ"
       and "out_exprChannelSet P ChSetP E"
       and "out_exprChannelSet Q ChSetQ E"
       and "M = ChSetP \<union> ChSetQ"
       and "\<forall> (x ::chanID). ((x \<in> ChSetP) \<longrightarrow> (x \<in> (loc PQ)))"
       and "\<forall> (x ::chanID). ((x \<in> ChSetQ) \<longrightarrow> (x \<in> (loc PQ)))"
shows    "\<not> eoutM PQ M E"

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


Input:
lemma omega_circ:
  "x\<^sup>\<omega>\<^sup>\<circ> = 1 \<squnion> x\<^sup>\<omega>"

Output: by (metis order.antisym circ_left_unfold mult_left_sub_dist_sup_left mult_1_right omega_sub_vector)


Input:
lemma sturm_id_PR_prio2:
  "{x::real. x > a \<and> x \<le> b \<and> P x} =
       {x::real. x > a \<and> x \<le> b \<and> PR_TAG P x}"
  "{x::real. x \<ge> a \<and> x \<le> b \<and> P x} =
       {x::real. x \<ge> a \<and> x \<le> b \<and> PR_TAG P x}"
  "{x::real. x \<ge> a \<and> x < b \<and> P x} =
       {x::real. x \<ge> a \<and> x < b \<and> PR_TAG P x}"
  "{x::real. x > a \<and> x < b \<and> P x} =
       {x::real. x > a \<and> x < b \<and> PR_TAG P x}"
  "(\<forall>x::real. a < x \<and> x \<le> b \<longrightarrow> f x < g x) =
       (\<forall>x::real. a < x \<and> x \<le> b \<longrightarrow> PR_TAG (\<lambda>x. f x < g x) x)"
  "(\<forall>x::real. a \<le> x \<and> x \<le> b \<longrightarrow> f x < g x) =
       (\<forall>x::real. a \<le> x \<and> x \<le> b \<longrightarrow> PR_TAG (\<lambda>x. f x < g x) x)"
  "(\<forall>x::real. a < x \<and> x < b \<longrightarrow> f x < g x) =
       (\<forall>x::real. a < x \<and> x < b \<longrightarrow> PR_TAG (\<lambda>x. f x < g x) x)"
  "(\<forall>x::real. a \<le> x \<and> x < b \<longrightarrow> f x < g x) =
       (\<forall>x::real. a \<le> x \<and> x < b \<longrightarrow> PR_TAG (\<lambda>x. f x < g x) x)"
  "(\<forall>x::real. a < x \<and> x \<le> b \<longrightarrow> P x) =
       (\<forall>x::real. a < x \<and> x \<le> b \<longrightarrow> \<not>(PR_TAG (\<lambda>x. \<not>P x)) x)"
  "(\<forall>x::real. a \<le> x \<and> x \<le> b \<longrightarrow> P x) =
       (\<forall>x::real. a \<le> x \<and> x \<le> b \<longrightarrow> \<not>(PR_TAG (\<lambda>x. \<not>P x)) x)"
  "(\<forall>x::real. a \<le> x \<and> x < b \<longrightarrow> P x) =
       (\<forall>x::real. a \<le> x \<and> x < b \<longrightarrow> \<not>(PR_TAG (\<lambda>x. \<not>P x)) x)"
  "(\<forall>x::real. a < x \<and> x < b \<longrightarrow> P x) =
       (\<forall>x::real. a < x \<and> x < b \<longrightarrow> \<not>(PR_TAG (\<lambda>x. \<not>P x)) x)"

Output: by (simp_all add: PR_TAG_def)


Input: lemma homeomorphic_space_refl: "X homeomorphic_space X"

Output: by (meson homeomorphic_maps_id homeomorphic_space_def)


Input:
lemma is_Done_bind_resumption [simp]:
  "is_Done (x \<bind> f) \<longleftrightarrow> is_Done x \<and> (result x \<noteq> None \<longrightarrow> is_Done (f (the (result x))))"

Output: by(simp add: bind_resumption_def)


Input:
lemma strict_linear_asymmetric:
  "strict_linear x \<Longrightarrow> antisymmetric (-x)"

Output: by (metis conv_complement eq_refl p_dist_sup pp_one)


Input:
lemma (in pair_sigma_finite) AE_pair_iff:
  "{x\<in>space (M1 \<Otimes>\<^sub>M M2). P (fst x) (snd x)} \<in> sets (M1 \<Otimes>\<^sub>M M2) \<Longrightarrow>
    (AE x in M1. AE y in M2. P x y) \<longleftrightarrow> (AE x in (M1 \<Otimes>\<^sub>M M2). P (fst x) (snd x))"

Output:
using AE_pair[of "\<lambda>x. P (fst x) (snd x)"] AE_pair_measure[of "\<lambda>x. P (fst x) (snd x)"]
by auto


Input:
lemma limit_single_step:
  assumes "x \<in> f X"
  shows "x \<in> limit f X"

Output: by (metis assms elem_limit_simp funpower.simps(1) funpower.simps(2))


Input:
lemma foldli_ball:
    "det_fold_map X (\<lambda>x. x) (\<lambda>x _. P x) True (\<lambda>m. op_map_ball m P)"

Output:
apply rule
using foldli_ball_aux[where b=True]
by auto


Input:
lemma contact_reflexive:
  "contact x \<Longrightarrow> reflexive x"

Output:
using contact_def sup_right_divisibility
by auto


Input:
lemma ebind_refine':
  assumes "mi \<le>\<Down>\<^sub>E E R' m"
  assumes "\<And>xi x. \<lbrakk>(xi,x)\<in>R'; inres mi (Inr xi); inres m (Inr x); nofail mi; nofail m\<rbrakk> \<Longrightarrow> fi xi \<le>\<Down>\<^sub>E E R (f x)"
  shows "doE { xi \<leftarrow> mi; fi xi } \<le> \<Down>\<^sub>E E R (doE { x \<leftarrow> m; f x })"

Output:
using assms
by (simp add: pw_ele_iff refine_pw_simps) blast


Input:
lemma bind_gpv'_cong:
  "\<lbrakk> gpv = gpv'; \<And>x. x \<in> Some ` results'_gpv gpv' \<or> (\<not> colossless_gpv \<I>_full gpv \<and> x = None) \<Longrightarrow> f x = f' x \<rbrakk>
  \<Longrightarrow> bind_gpv' gpv f = bind_gpv' gpv' f'"

Output: by(auto elim: results'_gpv_catch_gpvE split: if_split_asm intro!: bind_gpv_cong[OF refl])


Input:
lemma infnorm_eq_1_2:
  fixes x :: "real^2"
  shows "infnorm x = 1 \<longleftrightarrow>
    \<bar>x$1\<bar> \<le> 1 \<and> \<bar>x$2\<bar> \<le> 1 \<and> (x$1 = -1 \<or> x$1 = 1 \<or> x$2 = -1 \<or> x$2 = 1)"

Output:
unfolding infnorm_2
by auto


Input:
lemma hn_bind[sepref_comb_rules]:
  assumes D1: "hn_refine \<Gamma> m' \<Gamma>1 Rh m"
  assumes D2:
    "\<And>x x'. bind_ref_tag x m \<Longrightarrow>
      hn_refine (\<Gamma>1 * hn_ctxt Rh x x') (f' x') (\<Gamma>2 x x') R (f x)"
  assumes IMP: "\<And>x x'. \<Gamma>2 x x' \<Longrightarrow>\<^sub>t \<Gamma>' * hn_ctxt Rx x x'"
  shows "hn_refine \<Gamma> (m'\<bind>f') \<Gamma>' R (Refine_Basic.bind$m$(\<lambda>\<^sub>2x. f x))"

Output:
using assms unfolding APP_def PROTECT2_def bind_ref_tag_def
by (rule hnr_bind)


Input: lemma g_nonneg': "eventually (\<lambda>x. g x \<ge> 0) at_top"

Output:
using g_nonneg
by (force simp: eventually_at_top_linorder)


Input: lemma le_mtx_norm: "m \<in> {\<parallel>A *\<^sub>V x\<parallel> |x. \<parallel>x\<parallel> = 1} \<Longrightarrow> m \<le> \<parallel>A\<parallel>"

Output:
using cSup_upper[of _ "{\<parallel>(to_vec A) *v x\<parallel> | x. \<parallel>x\<parallel> = 1}"]
by (simp add: op_norm_set_proptys(2) op_norm_def norm_sq_mtx_def sq_mtx_vec_mult.rep_eq)


Input:
lemma LIMSEQ_erf_remainder_integral:
  "x > 0 \<Longrightarrow> (\<lambda>m. integral {x..x + real m} (\<lambda>t. exp (-(t^2)) / t ^ (2*n))) \<longlonglongrightarrow>
                 erf_remainder_integral n x"

Output:
using convergent_erf_remainder_integral[of x]
by (simp add: convergent_LIMSEQ_iff erf_remainder_integral_def)


Input:
lemma gamma_deriv_at_within_gen:
  assumes a_leq_b: "a < b"  and
    x_within_bounds: "x \<in> s" and
    s_subset: "s \<subseteq> {a..b}" and
    gamma_differentiable: "\<forall>x \<in> s. \<gamma> differentiable at x"
  shows "vector_derivative \<gamma> (at x within ({a..b})) =  vector_derivative \<gamma> (at x)"

Output:
using Derivative.vector_derivative_at_within_ivl[of "\<gamma>" "vector_derivative \<gamma> (at x)" "x" "a" "b"] gamma_differentiable x_within_bounds a_leq_b s_subset
by (auto simp add: vector_derivative_works)


Input:
lemma uniformly_Cauchy_imp_Cauchy:
  "uniformly_Cauchy_on X f \<Longrightarrow> x \<in> X \<Longrightarrow> Cauchy (\<lambda>n. f n x)"

Output:
unfolding Cauchy_def uniformly_Cauchy_on_def
by fast


Input:
lemma fls_left_inverse_base_factor:
  fixes   x :: "'a::{ab_group_add,mult_zero}"
  assumes "x \<noteq> 0"
  shows   "fls_left_inverse (fls_base_factor f) x = fls_base_factor (fls_left_inverse f x)"

Output:
using assms fls_lr_inverse_zero(1)[of x] fls_lr_inverse_subdegree(1)[of x]
by (cases "f=0") auto


Input:
lemma uniformly_continuous_on_def:
  fixes f :: "'a::metric_space \<Rightarrow> 'b::metric_space"
  shows "uniformly_continuous_on s f \<longleftrightarrow>
    (\<forall>e>0. \<exists>d>0. \<forall>x\<in>s. \<forall>x'\<in>s. dist x' x < d \<longrightarrow> dist (f x') (f x) < e)"

Output:
unfolding uniformly_continuous_on_uniformity uniformity_dist filterlim_INF filterlim_principal eventually_inf_principal
by (force simp: Ball_def uniformity_dist[symmetric] eventually_uniformity_metric)


Input: lemma represents_self: "represents {x} (monomial 1 x) x"

Output:
proof - have sub: "keys (monomial (1::'a) x) \<subseteq> {x}"
by simp moreover have "rep (monomial (1::'a) x) = x"
by simp ultimately show ?thesis
by (rule representsI)
qed


Input: lemma (in hlde) cond_b [simp]: "cond_b a b x = cond_B x"

Output:
using max_y_impl
by (auto simp: cond_b_def cond_B_def) presburger+


Input:
lemma cGDERIV_scaleC:
  "\<lbrakk>DERIV f x :> df; cGDERIV g x :> dg\<rbrakk>
     \<Longrightarrow> cGDERIV (\<lambda>x. scaleC (f x) (g x)) x
      :> (scaleC (cnj (f x)) dg + scaleC (cnj df) (cnj (g x)))"

Output:
unfolding cgderiv_def has_field_derivative_def cinner_add_left cinner_scaleC_left
apply (rule has_derivative_subst)
apply (erule (1) has_derivative_scaleC)
by (simp add: ac_simps)


Input:
lemma sum_pow2_image_Suc:
  "finite X \<Longrightarrow> sum ((^) (2 :: nat)) (Suc ` X) = 2 * sum ((^) 2) X"

Output: by (induct X rule: finite_induct) (auto intro: trans[OF sum.insert])


Input:
theorem impossibility_of_doubling_the_cube:
  "x^3 = 2 \<Longrightarrow> (Point x 0) \<notin> constructible"

Output: by (metis abscissa.simps constructible_radical_sqrt impossibility_of_doubling_the_cube_lemma)


Input:
lemma cont2cont_case_lambda [simp, cont2cont]:
  assumes "\<And>a b c. cont (\<lambda>x. f x a b c)"
  shows "cont (\<lambda>x. case_lambda (f x) l)"

Output:
using assms
by (cases l) auto


Input: lemma at_map_Sup_pres_var: "at_map (\<Squnion>X) = (\<Squnion>(x::'a::complete_boolean_algebra_alt) \<in> X. (at_map x))"

Output:
using at_map_Sup_pres comp_eq_elim
by blast


Input:
lemma WHILET_refine[refine]:
  assumes R0: "(x,x')\<in>R"
  assumes COND_REF: "\<And>x x'. \<lbrakk> (x,x')\<in>R \<rbrakk> \<Longrightarrow> b x = b' x'"
  assumes STEP_REF:
    "\<And>x x'. \<lbrakk> (x,x')\<in>R; b x; b' x' \<rbrakk> \<Longrightarrow> f x \<le> \<Down>R (f' x')"
  shows "WHILET b f x \<le>\<Down>R (WHILET b' f' x')"

Output:
unfolding WHILET_def
apply (rule WHILEIT_refine)
using assms
by auto


Input: lemma valuate_sum: "((\<Sum>x\<in>A. f x) \<lbrace> v \<rbrace>) = (\<Sum>x\<in>A. ((f x) \<lbrace> v \<rbrace>))"

Output: by (induct A rule: infinite_finite_induct, auto simp: valuate_zero valuate_add)


Input: lemma wf_inst_eq_aux': "ty_term Q objT x = Some T \<Longrightarrow> objT (subst_term f x) \<noteq> None"

Output: by (cases x) (auto simp: wf_inst_eq_aux)


Input:
lemma star_plus_without_loops:
  "x\<^sup>\<star> \<sqinter> -1 = x\<^sup>+ \<sqinter> -1"

Output: by (metis maddux_3_13 star_left_unfold_equal)


Input:
lemma convergent_minus_iff:
  fixes X :: "nat \<Rightarrow> 'a::topological_group_add"
  shows "convergent X \<longleftrightarrow> convergent (\<lambda>n. - X n)"

Output:
unfolding convergent_def
by (force dest: tendsto_minus)


Input:
lemma word8_and_max_simp:
  \<open>x AND 0xFF = x\<close> for x :: \<open>8 word\<close>

Output:
using word_and_full_mask_simp [of x]
by (simp add: numeral_eq_Suc mask_Suc_exp)


Input: lemma even_square_cong_4_nat: "even (x::nat) \<Longrightarrow> [x ^ 2 = 0] (mod 4)"

Output:
using even_square_cong_4_int[of "int x"]
by (auto simp flip: cong_int_iff)


Input:
lemma prv_imp_neg_allWI:
  assumes "\<chi> \<in> fmla" "t \<in> trm" "x \<in> var"
    and "prv (neg (subst \<chi> t x))"
  shows "prv (neg (all x \<chi>))"

Output: by (metis all assms fls subst neg_def prv_all_inst prv_prv_imp_trans)


Input:
lemma arctan_upper_42:
  assumes "x \<le> 0" shows "arctan(x) \<le> arctan_upper_42 x"

Output:
apply (rule gen_upper_bound_decreasing [OF assms d_delta_arctan_upper_42])
apply (auto simp: diff_delta_arctan_upper_42_def arctan_upper_42_def) done


Input:
lemma transp_on_map':
  assumes "transp_on Q B"
    and "g ` A \<subseteq> B"
    and "h ` A \<subseteq> B"
    and "\<And>x. x \<in> A \<Longrightarrow> Q\<^sup>=\<^sup>= (h x) (g x)"
  shows "transp_on (\<lambda>x y. Q (g x) (h y)) A"

Output:
using assms unfolding transp_on_def
by auto (metis imageI subsetD)


Input: lemma hom_sum[hom_distribs]: "hom (sum f X) = (\<Sum>x \<in> X. hom (f x))"

Output: by (cases "finite X", induct rule:finite_induct; simp add: hom_distribs)


Input:
lemma swap_preserves_fresh_distinct:
assumes "good X" and
       "xs \<noteq> ys \<or> x \<notin> {y1,y2}"
shows "fresh xs x (X #[y1 \<and> y2]_ys) = fresh xs x X"

Output:
unfolding fresh_def[of _ _ X]
using assms
by(auto simp: fresh_swap_qFresh_qSwap qSwap_preserves_qFresh_distinct)


Input:
lemma bl2nat_simps[simp]: "bl2nat (Oc # Oc\<up>x) 0 = (2 * 2 ^ x - Suc 0)"
  "bl2nat (Bk\<up>x) n = 0"

Output: by(induct x;force simp: bl2nat.simps bl2nat_double exp_ind)+


Input:
lemma mWHILE_unfold: "m \<bind> WHILE cond step = do {
      x \<leftarrow> m;
      if cond x then step x \<bind> WHILE cond step
      else RETURN x
    }"

Output: by (subst WHILE_unfold[abs_def]) (rule refl)


Input: lemma inverse_inverse_ennreal[simp]: "inverse (inverse x::ennreal) = x"

Output: by (cases "0 < x"; cases x; auto simp: inverse_ennreal)


Input:
lemma blocking_on_imp_not_stable:
  assumes "blocking_on ds X h X''"
  shows "\<not>stable_on ds X"

Output:
unfolding stable_on_def stable_no_blocking_on_def
using assms
by blast


Input:
lemma real_divl_pos_less1_bound:
  assumes "0 < x" "x \<le> 1"
  shows "1 \<le> real_divl prec 1 x"

Output:
using assms
by (auto intro!: truncate_down_ge1 simp: real_divl_def)


Input:
lemma f_1_lemma_1: assumes "x \<in> S1"
  shows "P x (f_1 x)"

Output:
using assms P_lemma theI'[of "P x"] f_1_def
by presburger


Input: lemma iterates_above_le_f: "\<lbrakk> x \<in> iterates_above a; a \<in> Field leq \<rbrakk> \<Longrightarrow> (x, f x) \<in> leq"

Output: by(induction x rule: iterates_above.induct)(blast intro: increasing FieldI2 lub_in_Field)+


Input:
lemma in_set_spmf_extend_state_oracle [simp]:
  "x \<in> set_spmf (extend_state_oracle oracle s y) \<longleftrightarrow>
   fst (snd x) = fst s \<and> (fst x, snd (snd x)) \<in> set_spmf (oracle (snd s) y)"

Output: by(auto 4 4 simp add: extend_state_oracle_def split_beta intro: rev_image_eqI prod.expand)


Input: lemma (in ACeD) left_ident [simp]: "x \<in> D \<Longrightarrow> e \<cdot> x = x"

Output:
proof - assume "x \<in> D" then have "x \<cdot> e = x"
by (rule ident) with \<open>x \<in> D\<close> show ?thesis
by (simp add: commute)
qed


Input: lemma hom_prod_mset: "hom (prod_mset X) = prod_mset (image_mset hom X)"

Output: by (induct X, auto simp: hom_distribs)


Input:
lemma l8:
  "x \<le> --x \<sqinter> x"

Output: by (metis a_inf_complement_bot a_stone il_idempotent il_inf_left_unit il_inf_right_dist_sup il_less_eq il_unit_bot)


Input:
lemma lm068:
  assumes "x \<in> Domain (f||X)"
  shows "(f||X)``{x} = f``{x}"

Output:
using assms doubleRestriction restrictedRange Int_empty_right Int_iff Int_insert_right_if1 restrictedDomain
by metis


Input: lemma prim_root_power [elim]: assumes "x \<noteq> \<epsilon>" obtains i where "(\<rho> x)\<^sup>@(Suc i) = x"

Output:
using prim_rootD[OF primroot_is_primroot[OF \<open>x \<noteq> \<epsilon>\<close>], unfolded root_def] assms pow_zero[of "\<rho> x"] not0_implies_Suc
by metis


Input: lemma flip_signed_order2: "flip_signed (flip_signed x) = x"

Output:
using apsnd_conv[of "\<lambda>b. \<not>b" "fst x" "snd x"]
by simp


Input:
lemma continuous_le_on_closure:
  fixes a::real
  assumes f: "continuous_on (closure s) f"
      and x: "x \<in> closure(s)"
      and xlo: "\<And>x. x \<in> s ==> f(x) \<le> a"
    shows "f(x) \<le> a"

Output:
using image_closure_subset [OF f, where T=" {x. x \<le> a}" ] assms continuous_on_closed_Collect_le[of "UNIV" "\<lambda>x. x" "\<lambda>x. a"]
by auto


Input: lemma open_Collect_imp: "closed {x. P x} \<Longrightarrow> open {x. Q x} \<Longrightarrow> open {x. P x \<longrightarrow> Q x}"

Output:
unfolding imp_conv_disj
by (intro open_Collect_disj open_Collect_neg)


Input: lemma rectangle_eq [simp]: "is_rectangle x \<longleftrightarrow> x ; 1 ; x = x"

Output: by (metis conv_one dedekind eq_iff inf_top_left mult.assoc one_idem_mult is_rectangle_def)


Input: lemma surj_Proj: "surj Proj"

Output:
apply safe subgoal
by force subgoal for x
by (induct x) auto done


Input:
lemma rtranclp_normalize_poly_add_mset:
  \<open>normalize_poly_p\<^sup>*\<^sup>* A r \<Longrightarrow> normalize_poly_p\<^sup>*\<^sup>* (add_mset x A) (add_mset x r)\<close>

Output: by (induction rule: rtranclp_induct) (auto dest: normalize_poly_p.keep_coeff[of _ _ x])


Input: lemma fresh_prod3[nominal_prod_simps,ms_fresh]: "x \<sharp> (a,b,c) = (x \<sharp> a \<and> x \<sharp> b  \<and> x \<sharp> c)"

Output:
using fresh_def supp_Pair
by fastforce


Input:
lemma transitive_star:
  "x * x \<le> x \<Longrightarrow> x\<^sup>\<star> = 1 \<squnion> x"

Output: by (metis order.antisym star.circ_mult_increasing_2 star.circ_plus_same star_left_induct_mult star_left_unfold_equal)


Input:
lemma card_product_dependent:
  assumes "finite S"
  assumes "\<forall>x \<in> S. finite (T x)"
  shows "card {(x, y). x \<in> S \<and> y \<in> T x} = (\<Sum>x \<in> S. card (T x))"

Output:
using card_SigmaI[OF assms, symmetric]
by (auto intro!: arg_cong[where f=card] simp add: Sigma_def)


Input: lemma unadjoin_in_base [simp]: "x \<in> H \<Longrightarrow> unadjoin x = (x, 0)"

Output: by (intro unadjoin_unique') (auto intro!: subgroup_indicator_pos is_subgroup)


Input:
lemma has_vector_derivative_transform_at:
  assumes "0 < d"
    and "\<forall>x'. dist x' x < d \<longrightarrow> f x' = g x'"
    and "(f has_vector_derivative f') (at x)"
  shows "(g has_vector_derivative f') (at x)"

Output:
using assms unfolding has_vector_derivative_def
by (rule has_derivative_transform_at)


Input:
lemma zero_vector_left_zero:
  assumes "zero_vector x"
    shows "x * y = x * bot"

Output:
proof - have "x * y \<le> x * bot"
by (metis assms mult_isotone top.extremum vector_mult_closed zero_vector zero_vector_def) thus ?thesis
by (simp add: order.antisym mult_right_isotone)
qed


Input:
lemma Z_I_spectrum:
  shows "{Re x |x. x \<in> spectrum Z_I} \<subseteq> {- 1, 1}"

Output:
using unitary_hermitian_Re_spectrum Z_I_hermitian Z_I_unitary Z_I_carrier
by simp


Input:
lemma super_orientable_irreflexive:
  "super_orientable x \<Longrightarrow> irreflexive x"

Output:
using pseudo_complement super_orientable_irreflexive_inf
by blast


Input:
lemma poly_reflect_poly_nz:
  "x \<noteq> 0 \<Longrightarrow> poly (reflect_poly p) x = x ^ degree p * poly p (inverse x)"
  for x :: "'a::field"

Output: by (induct rule: pCons_induct) (simp_all add: field_simps reflect_poly_pCons' poly_monom)


Input:
lemma horiz_vector_helper_pos:
  fixes p:: "real poly"
  assumes nonzero: "p\<noteq>0"
  fixes qs:: "real poly list"
  assumes pairwise_rel_prime_1: "\<forall>q. ((List.member qs q) \<longrightarrow> (coprime p q))"
  fixes I:: "nat list"
  fixes sign:: "rat list"
  fixes x:: "real"
  assumes root_p: "x \<in> {x. poly p x = 0}"
  assumes sign_fix: "sign = consistent_sign_vec_copr qs x"
  assumes welldefined: "list_constr I (length qs)"
  shows "(poly (prod_list (retrieve_polys qs I)) x > 0) \<longleftrightarrow> (z I sign = 1)"

Output:
using horiz_vector_helper_pos_ind
using pairwise_rel_prime_1 nonzero root_p sign_fix welldefined
by blast


Input: lemma LIMSEQ_SUP: "incseq X \<Longrightarrow> X \<longlonglongrightarrow> (SUP i. X i :: 'a::{complete_linorder,linorder_topology})"

Output: by (intro increasing_tendsto) (auto simp: SUP_upper less_SUP_iff incseq_def eventually_sequentially intro: less_le_trans)


Input:
lemma many_strongly_connected_iff_3:
  "many_strongly_connected x \<longleftrightarrow> x \<le> x\<^sup>T\<^sup>\<star>"

Output: by (metis conv_invol many_strongly_connected_iff_1)


Input:
lemma singleton_sub_trivial_uniq:
      fixes   x X
      assumes "{x} \<subseteq> X" and "trivial X"
      shows   "x = the_elem X"

Output:
using assms unfolding trivial_def
by fast


Input:
lemma (in algebra) sets_Collect_imp:
  "{x\<in>\<Omega>. P x} \<in> M \<Longrightarrow> {x\<in>\<Omega>. Q x} \<in> M \<Longrightarrow> {x\<in>\<Omega>. Q x \<longrightarrow> P x} \<in> M"

Output:
unfolding imp_conv_disj
by (intro sets_Collect_disj sets_Collect_neg)


Input:
theorem thm_2_3_6_Dube:
  assumes "finite X" and "set fs \<subseteq> P[X]"
  shows "punit.is_Groebner_basis (set (punit.Macaulay_list
                                        (deg_shifts X (Dube (Suc (card X)) (maxdeg (set fs))) fs)))"

Output:
using assms Dube_is_GB_cofactor_bound
by (rule thm_2_3_6) (simp_all add: assms)


Input: lemma cnorm_eq_square: "norm x = a \<longleftrightarrow> 0 \<le> a \<and> cinner x x = complex_of_real (a\<^sup>2)"

Output: by (metis cdot_square_norm norm_ge_zero of_real_eq_iff power2_eq_iff_nonneg)


Input:
lemma mask_eq_ucast_eq:
  "\<lbrakk> x AND mask LENGTH('a) = (x :: ('c :: len word));
     LENGTH('a) \<le> LENGTH('b)\<rbrakk>
    \<Longrightarrow> ucast (ucast x :: ('a :: len word)) = (ucast x :: ('b :: len word))"

Output: by (metis ucast_and_mask ucast_id ucast_ucast_mask ucast_up_eq)


Input: lemma star_sqrt_HFinite: "\<lbrakk>x \<in> HFinite; 0 \<le> x\<rbrakk> \<Longrightarrow> ( *f* sqrt) x \<in> HFinite"

Output: by (metis HFinite_square_iff hypreal_sqrt_pow2_iff power2_eq_square)


Input: lemma proper_part_irreflexivity: "\<not> PP x x"

Output:
proof assume "PP x x" hence "\<not> PP x x"
by (rule proper_part_asymmetry) thus "False"
using `PP x x` ..
qed


Input:
lemma vwb_lens_iff_mwb_UNIV_src:
  "vwb_lens X \<longleftrightarrow> (mwb_lens X \<and> \<S>\<^bsub>X\<^esub> = UNIV)"

Output: by (meson mwb_UNIV_src_is_vwb_lens vwb_lens_def wb_lens.source_UNIV)


Input: lemma similar_adm: "adm (\<lambda>x. fst x \<triangleleft>\<triangleright> snd x)"

Output:
unfolding similar_def
by (intro adm_lemmas similar'_admI cont2cont)


Input:
lemma min_product_set_finite:
  "(\<And>x. x \<in> X \<Longrightarrow> finite x) \<Longrightarrow> finite (\<Otimes>\<^sub>m X)"

Output: by (cases "finite X", rotate_tac, induction X rule: finite_induct) (simp_all add: min_product_set_def, insert min_product_finite, blast)


Input:
lemma homeomorphic_map_involution:
   "\<lbrakk>continuous_map X X f; \<And>x. x \<in> topspace X \<Longrightarrow> f(f x) = x\<rbrakk> \<Longrightarrow> homeomorphic_map X X f"

Output:
using homeomorphic_maps_involution homeomorphic_maps_map
by blast


Input:
lemma expands_to_sin_ms_neg_exp:
  assumes "e < 0" "basis_wf basis" "(f expands_to MS (MSLCons (C, e) xs) g) basis"
  shows   "((\<lambda>x. sin (f x)) expands_to MS (sin_ms_aux' (MSLCons (C, e) xs)) (\<lambda>x. sin (g x))) basis"

Output:
using assms
by (auto simp: expands_to.simps snd_dominant_term_ms_aux_MSLCons o_def intro!: sin_ms_aux' elim: eventually_mono)


Input:
lemma no_better_than_nonepty:
  assumes "carrier \<noteq> {}"
  shows "\<And>x. x \<in> carrier \<Longrightarrow> (no_better_than x carrier relation) \<noteq> {}"

Output: by (metis (no_types, lifting) empty_iff mem_Collect_eq no_better_than_def refl_onD reflexivity)


Input: lemma minus_of_int: "f (gm x (of_int n)) = f x"

Output:
using plus_of_int[of x "of_int (-n)"]
by (simp add: minus_eq)


Input:
lemma mult_2_right [simp]:
  fixes x::V shows "x * set{0,1} = x+x"

Output: by (subst mult) (auto simp: Sup_V_insert plus_eq_lift)


Input:
lemma mcont2mcont_inf [cont_intro, simp]:
  "\<lbrakk> mcont lub ord Sup (\<le>) (\<lambda>x. f x);
    mcont lub ord Sup (\<le>) (\<lambda>x. g x) \<rbrakk>
  \<Longrightarrow> mcont lub ord Sup (\<le>) (\<lambda>x. f x \<sqinter> g x)"

Output: by(best intro: ccpo.mcont2mcont'[OF complete_lattice_ccpo] mcont_inf1 mcont_inf2 ccpo.mcont_const[OF complete_lattice_ccpo])


Input:
lemma domainOfGraph:
  "runiq(graph X f) & Domain(graph X f)=X"

Output:
unfolding graph_def
using rightUniqueRestrictedGraph
by fast


Input: lemma den_gt_0: "0 < x" if "x \<in> set_tree den"

Output:
proof - from that obtain p where "x = root (traverse_tree p den)"
by(blast dest: set_tree_pathD) with stern_brocot_denominator_non_zero[of p] show "0 < x"
by(simp add: den_conv split_beta)
qed


Input:
lemma(in padic_integers) ac_Zp_factors':
  assumes "x \<in> nonzero Zp"
  shows "x = [p] \<cdot> \<one> [^] ord_Zp x \<otimes> ac_Zp x"

Output:
using assms nonzero_memE
by (simp add: nonzero_closed nonzero_memE(2) ac_Zp_factors_x(2))


Input:
lemma NSCauchy_NSconvergent: "NSCauchy X \<Longrightarrow> NSconvergent X"
  for X :: "nat \<Rightarrow> 'a::banach"

Output:
using Cauchy_convergent NSCauchy_Cauchy convergent_NSconvergent_iff
by auto


Input:
lemma ivl_of_aform_err:
  fixes X
  assumes e: "e \<in> UNIV \<rightarrow> {-1 .. 1}"
  shows "x \<in> aform_err e X \<Longrightarrow> x \<in>\<^sub>r ivl_of_aform_err p X"

Output:
using Inf_Sup_aform_err[OF e, of X p]
by (auto simp: set_of_eq lower_ivl_of_aform_err upper_ivl_of_aform_err)


Input:
lemma cover_of_select_index_is_open:
  assumes "x \<in> U"
  shows "is_open (C (select_index x))"

Output:
using assms
by (simp add: are_open_subspaces select_index_belongs)


Input:
lemma "\<Theta>(\<lambda>x::real. 2 * x powr 3 + x * x^2/ln x + 42 * x powr 9 + 213 * x powr 5 - 4 * x powr 7) =
         \<Theta>(\<lambda>x::real. x ^ 3 + x / ln x * x powr (3/2) - 2*x powr 9)"

Output:
using [[landau_sum_limit = 5]]
by simp


Input:
lemma bij_is_maprop:
  assumes "is_bij x" and "is_map x"
  shows "x\<^sup>\<smile> ; x  = 1' \<and> x ; x\<^sup>\<smile> = 1'"

Output: by (metis assms is_bij_def eq_iff is_inj_def is_map_def is_p_fun_def is_sur_def is_total_def)


Input:
lemma test_d_fixpoint:
  "test x \<Longrightarrow> d x = x"

Output: by (metis antisym d1_eq d2 test_inf_idempotent test_inf_right_below)


Input: lemma test_compl_1 [simp]: "is_test x \<Longrightarrow> x + tc x = 1'"

Output: by (metis is_test_def local.aux4 local.inf.absorb_iff1 local.inf_commute tc_def)


Input: lemma nxt_many_calls[simp]: "nxt (many_calls x) x' = (if x' =  x then many_calls x else empty)"

Output: by transfer (force simp add: Cons_replicate_eq)


Input: lemma cos_pi_minus [simp]: "cos (pi - x) = - (cos x)"

Output: by (metis cos_minus cos_periodic_pi uminus_add_conv_diff)


Input: lemma isnormNum0[simp]: "isnormNum x \<Longrightarrow> INum x = (0::'a::field_char_0) \<longleftrightarrow> x = 0\<^sub>N"

Output:
unfolding INum_int(2)[symmetric]
by (rule isnormNum_unique) simp_all


Input:
lemma atomize_fBall:
    "(\<And>x. x |\<in>| A ==> P x) == Trueprop (fBall A (\<lambda>x. P x))"

Output:
apply (simp only: atomize_all atomize_imp)
apply (rule equal_intr_rule)
by (transfer, simp)+


Input:
lemma eventually_nonneg_ident_at_top [eventually_nonzero_simps]:
  "eventually_nonneg at_top (\<lambda>x. x)"

Output:
unfolding eventually_nonneg_def
by (rule eventually_ge_at_top)


Input:
lemma arctan_lower_13:
  assumes "x \<ge> 0"
    shows "arctan(x) \<ge> arctan_lower_13 x"

Output:
using arctan_upper_12 [of "-x"] assms
by (auto simp: arctan_upper_12_def arctan_minus)


Input: lemma is_pure_iff_pure_assn: "is_pure P = (\<forall>x x'. is_pure_assn (P x x'))"

Output:
unfolding is_pure_def is_pure_assn_def
by metis


Input: lemma Mem_refl_E [intro!]: "insert (x IN x) H \<turnstile> A"

Output: by (metis Disj_I1 Mem_Neg_refl anti_deduction thin0)


Input: lemma closure_Union: "closure (\<Union>X) = (\<Union>x\<in>X. closure x)" if "finite X"

Output:
using that
by (induction X) auto


Input:
lemma ereal_divide_same[simp]:
  fixes x :: ereal
  shows "x / x = (if \<bar>x\<bar> = \<infinity> \<or> x = 0 then 0 else 1)"

Output: by (cases x) (simp_all add: divide_real_def divide_ereal_def one_ereal_def)


Input: lemma returns_to_cong: "auto_ll_on_open.returns_to g Y A x = returns_to A x"

Output:
using returns_to_congI1 returns_to_congI2
by blast


Input: lemma Inf_inf: "\<forall>X. f(\<Sqinter> X) = \<Sqinter>{f x | x. x \<in> X} \<Longrightarrow> f (x \<sqinter> y) = f x \<sqinter> f y"

Output:
apply (erule_tac x="{x, y}" in allE)
by (force intro: Inf_eqI)


Input:
lemma sin_cos_squared_add [simp]: "(sin x)\<^sup>2 + (cos x)\<^sup>2 = 1"
  for x :: "'a::{real_normed_field,banach}"

Output:
using cos_add [of x "-x"]
by (simp add: power2_eq_square algebra_simps)


Input:
lemma isometry_preserves_infdist:
  "infdist (f x) (f`A) = infdist x A"
  if "isometry_on X f" "A \<subseteq> X" "x \<in> X"

Output:
using that
by (simp add: infdist_def image_comp isometry_on_def subset_iff)


Input:
lemma cos_differentiable_at: "(\<lambda>x. cos (f x::real)) differentiable at x within X"
  if "f differentiable at x within X"

Output:
using differentiable_def has_derivative_cos that
by blast


Input:
lemma a_strict:
  "a(x) = 1 \<longleftrightarrow> x \<le> Z"

Output: by (metis a_Z d_def d_strict order.refl tests_dual.sba_dual.double_negation)


Input:
lemma many_strongly_connected_iff_11_eq:
  assumes "is_inj x"
    shows "many_strongly_connected x \<longleftrightarrow> x\<^sup>\<star>;x\<^sup>T;x = x\<^sup>+"

Output:
using assms many_strongly_connected_iff_11 many_strongly_connected_implies_11_eq
by fastforce


Input: lemma rrsmultD1 : "x \<in> FH \<Longrightarrow> (r \<currency> f) x = f (x*r)"

Output:
using Ring1.rightreg_scalar_multD1[OF Ring1_FH] rrsmult
by simp


Input: lemma measure_count_space: "measure (count_space A) X = (if X \<subseteq> A then of_nat (card X) else 0)"

Output: by (cases "finite X") (auto simp: measure_notin_sets ennreal_of_nat_eq_real_of_nat measure_zero_top measure_eq_emeasure_eq_ennreal)


Input:
lemma toplevel_summands_flatten:
  "\<lbrakk>X \<noteq> {}; finite X; \<forall>x \<in> X. \<not>(\<exists>r s. x = Plus r s)\<rbrakk> \<Longrightarrow> toplevel_summands (flatten PLUS X) = X"

Output:
using toplevel_summands_PLUS_strong[of "sorted_list_of_set X"] unfolding list_all_iff
by fastforce


Input: lemma inf_compl: "x \<sqinter> -x = \<bottom>"

Output: by (metis dbl_neg sup_comm bot_eq towards_inf_compl inf_eq)


Input:
lemma Pd_singletons_for_ds_simps:
  shows "d \<in> ds \<Longrightarrow> Pd_singletons_for_ds X ds d = dX X d \<times> dX X d"
    and "d \<notin> ds \<Longrightarrow> Pd_singletons_for_ds X ds d = Pd d"

Output:
unfolding Pd_singletons_for_ds_def
by simp_all


Input:
lemma injectively_orientable_orientable:
  "injectively_orientable x \<Longrightarrow> orientable x"

Output:
using injectively_orientable_def orientable_def
by auto


Input: lemma snd_normalize_quot_nonzero [simp]: "snd (normalize_quot x) \<noteq> 0"

Output:
using unit_factor_snd_normalize_quot[of x]
by (auto simp del: unit_factor_snd_normalize_quot)


Input:
lemma myrule: assumes "case s of (s, n) \<Rightarrow> ($ (2 * x) \<and>* ''x'' \<hookrightarrow> int x) (s, n) \<and> lmaps_to_axpr' (Less (N 0) (V ''x'')) True s"
    and "symevalb ($ (2 * x) ** ''x'' \<hookrightarrow> int x) (Less (N 0) (V ''x'')) v"
    shows "(\<up>(v=True) ** $ (2 * x) ** ''x'' \<hookrightarrow> int x) s"

Output:
using assms unfolding symevalb_def lmaps_to_axpr'_def
by auto


Input: lemma norm_ge_zero [simp]: "0 \<le> norm x"

Output:
proof - have "0 = norm (x + -1 *\<^sub>R x)"
using scaleR_add_left[of 1 "-1" x] norm_scaleR[of 0 x]
by (simp add: scaleR_one) also have "\<dots> \<le> norm x + norm (-1 *\<^sub>R x)"
by (rule norm_triangle_ineq) finally show ?thesis
by simp
qed


Input:
lemma x_coord_bounds:
  assumes "(0::real) \<le> x" "x \<le> 1"
  shows "-1/2 \<le> x_coord x \<and> x_coord x \<le> 1/2"

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


Input: lemma cond_return_pmf [simp]: "cond_pmf (return_pmf x) A = return_pmf x" if "x \<in> A"

Output:
using that
by(intro pmf_eqI)(auto simp add: pmf_cond split: split_indicator)


Input:
lemma closed_map_eq:
   "\<lbrakk>closed_map X X' f; \<And>x. x \<in> topspace X \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> closed_map X X' g"

Output:
unfolding closed_map_def
by (metis image_cong closedin_subset subset_iff)


Input:
lemma ebind_Let_refine2[refine2]: "\<lbrakk>
    m' \<le>\<Down>\<^sub>E E R' (ERETURN x);
    \<And>x'. \<lbrakk>inres m' (Inr x'); (x',x)\<in>R'\<rbrakk> \<Longrightarrow> f' x' \<le> \<Down>\<^sub>E E R (f x)
  \<rbrakk> \<Longrightarrow> ebind m' (\<lambda>x'. f' x') \<le> \<Down>\<^sub>E E R (Let x (\<lambda>x. f x))"

Output:
apply (simp add: pw_ele_iff refine_pw_simps)
apply blast done


Input: lemma the_map_option_domA[simp]: "x \<in> domA \<Gamma> \<Longrightarrow> the (map_option f (map_of \<Gamma> x)) = f (the (map_of \<Gamma> x))"

Output: by (induction \<Gamma>) auto


Input:
lemma n_meet_L_top_below:
  "(n(x) \<sqinter> L) * top \<le> x"

Output:
using order.trans n_L_decreasing n_meet_L_top_below_n_L
by blast


Input: lemma approx_mult_SComplex1: "\<lbrakk>a \<in> SComplex; x \<approx> 0\<rbrakk> \<Longrightarrow> x*a \<approx> 0"

Output:
using SComplex_iff approx_mult_subst_star_of
by fastforce


Input: lemma s_eq_s_stop: "NO_MATCH t_stop x \<Longrightarrow> x \<ge> t_stop \<Longrightarrow> s x = s_stop"

Output:
using t_stop_nonneg
by (auto simp: s_def p_max_def)


Input:
lemma (in Order) S_inductive_sup_mem:"\<lbrakk>S_inductive_set D; Chain D X\<rbrakk> \<Longrightarrow>
                             Sup D X \<in> carrier D"

Output:
apply (frule_tac X = X in S_inductive_sup, assumption)
apply (simp add:minimum_elem_def, (erule conjE)+, simp add:upper_bounds_def, simp add:upper_bound_def) done


Input: lemma Union_Zero1: "H \<turnstile> UnionP Zero x x"

Output:
proof - obtain i::name where "atom i \<sharp> x"
by (metis obtain_fresh) hence "{} \<turnstile> UnionP Zero x x"
by (auto simp: UnionP.simps [of i] intro: Disj_I2) thus ?thesis
by (metis thin0)
qed


Input:
lemma p_fun_sur_id [simp]:
  assumes "is_p_fun x" and "is_sur x"
  shows "x\<^sup>\<smile> ; x = 1'"

Output: by (metis assms eq_iff is_p_fun_def is_sur_def)


Input:
lemma find_set_1:
  "find_set_precondition p x \<Longrightarrow> find_set_invariant p x x"

Output:
apply (unfold find_set_invariant_def)
using mult_left_isotone star.circ_reflexive find_set_precondition_def
by fastforce


Input: lemma mem_Rep_star_iff: "X \<in> Rep_star x \<longleftrightarrow> x = star_n X"

Output: by (cases x) (simp add: star_n_def)


Input:
lemma prime_not_unit' [simp]:
  "ASSUMPTION (prime x) \<Longrightarrow> \<not>is_unit x"

Output:
unfolding ASSUMPTION_def prime_def
by auto


Input: lemma tdev_eq_zero_iff: fixes X::"real pdevs" shows "tdev X = 0 \<longleftrightarrow> (\<forall>e. pdevs_val e X = 0)"

Output: by (force simp add: pdevs_val_sum tdev_def sum_nonneg_eq_0_iff dest!: spec[where x="\<lambda>i. if pdevs_apply X i \<ge> 0 then 1 else -1"] split: if_split_asm)


Input: lemma allB_atLeastLessThan_lower:  assumes \<open>(i::nat) \<le> j\<close> \<open>\<forall> x\<in>{i..<n}. P x\<close> shows \<open>\<forall> x\<in>{j..<n}. P x\<close>

Output:
proof fix x assume \<open>x\<in>{j..<n}\<close> hence \<open>x\<in>{i..<n}\<close>
using assms(1)
by simp thus \<open>P x\<close>
using assms(2)
by auto
qed


Input:
lemma retraction_maps_eq:
   "\<lbrakk>retraction_maps X Y f g; \<And>x. x \<in> topspace X \<Longrightarrow> f x = f' x; \<And>x. x \<in> topspace Y \<Longrightarrow> g x = g' x\<rbrakk>
        \<Longrightarrow> retraction_maps X Y f' g'"

Output:
unfolding retraction_maps_def
by (metis (no_types, lifting) continuous_map_def continuous_map_eq)


Input: lemma lead_monom_sum_le: "(\<And>x. x \<in> X \<Longrightarrow> lead_monom (h x) \<le> ub) \<Longrightarrow> lead_monom (sum h X) \<le> ub"

Output: by (induction X rule: infinite_finite_induct) (auto intro!: order.trans[OF lead_monom_add])


Input:
lemma
  "((\<lambda>x. ((a powr x - x * ln a) / (b powr x - x * ln b)) powr (1 / x ^ 2)) \<longlongrightarrow>
     exp ((ln a ^ 2 - ln b ^ 2) / 2)) (at 0)"

Output:
using ab
by (real_asymp simp: power2_eq_square)


Input: lemma nonpos_Reals_Real [dest]: "x \<in> \<real>\<^sub>\<le>\<^sub>0 \<Longrightarrow> x \<in> \<real>"

Output:
unfolding nonpos_Reals_def Reals_def
by blast


Input:
lemma cos_one_sin_zero:
  fixes x :: "'a::{real_normed_field,banach}"
  assumes "cos x = 1"
  shows "sin x = 0"

Output:
using sin_cos_squared_add [of x, unfolded assms]
by simp


Input: lemma cnj_x_x_geq0[simp]: "cnj x * x \<ge> 0"

Output:
proof (cases x) show "0 \<le> cnj x * x" if "x = Complex x1 x2" for x1 :: real and x2 :: real
using that
by (auto simp: complex_cnj complex_mult complex_of_real_def)
qed


Input:
lemma ex_inverse_of_nat_less:
  fixes x :: "'a::archimedean_field"
  assumes "0 < x"
  shows "\<exists>n>0. inverse (of_nat n) < x"

Output:
using reals_Archimedean [OF \<open>0 < x\<close>]
by auto


Input: lemma wf_dbfm_iff_is_fm: "wf_dbfm x \<longleftrightarrow> (\<exists>A::fm. x = trans_fm [] A)"

Output: by (metis wf_dbfm_imp_is_fm wf_dbfm_trans_fm)


Input:
lemma ideal_generated_singleton_dvd:
  assumes i: "ideal_generated S = ideal_generated {d}" and x: "x \<in> S"
  shows "d dvd x"

Output: by (metis i x finite.intros dvd_ideal_generated_singleton ideal_generated_in ideal_generated_singleton_subset)


Input:
lemma powr_nat_bounds_transfer_abs [eventuallized]:
  "\<forall>x. powr_nat (abs (f x)) (g x) \<le> u x \<longrightarrow> powr_nat (f x) (g x) \<ge> -u x"
  "\<forall>x. powr_nat (abs (f x)) (g x) \<le> u x \<longrightarrow> powr_nat (f x) (g x) \<le> u x"

Output:
using powr_nat_bounds_ge_neg
by blast+


Input:
lemma sub_mult_one_circ:
  "x * 1\<^sup>\<circ> \<le> 1\<^sup>\<circ> * x"

Output: by (metis L_split_sup sup_commute mult_1_right one_circ_mult_split)


Input: lemma sample_cong: "(\<And>x. x \<in> set_pmf p \<Longrightarrow> f x = g x) \<Longrightarrow> sample p f = sample q g" if "p = q"

Output: by(rule sample_parametric[where R="eq_onp (\<lambda>x. x \<in> set_pmf p)", THEN rel_funD, THEN rel_funD]) (simp_all add: bi_unique_def eq_onp_def rel_fun_def pmf.rel_refl_strong that)


Input:
lemma
  assumes f: "f \<in> borel_measurable (lebesgue_on S)" and S: "S \<in> sets lebesgue"
  shows integral_Dirichlet_kernel_mul_expand:
        "(LINT x|lebesgue_on S. Dirichlet_kernel n x * f x)
       = (LINT x|lebesgue_on S. sin((n+1/2) * x) * f x / (2 * sin(x/2)))" (is "?th1")
  and integrable_Dirichlet_kernel_mul_expand:
       "integrable (lebesgue_on S) (\<lambda>x. Dirichlet_kernel n x * f x)
    \<longleftrightarrow> integrable (lebesgue_on S) (\<lambda>x. sin((n+1/2) * x) * f x / (2 * sin(x/2)))" (is "?th2")

Output:
using inte_Dirichlet_kernel_mul_expand [OF assms]
by auto


Input: lemma quot_Exists_imp_Pf: "\<lbrakk>Pf \<lbrakk>\<guillemotleft>\<alpha> IMP \<beta>\<guillemotright>\<rbrakk>e; atom i \<sharp> \<beta>\<rbrakk> \<Longrightarrow> Pf \<lbrakk>\<guillemotleft>Ex i \<alpha> IMP \<beta>\<guillemotright>\<rbrakk>e"

Output: by (force simp: Pf_def Prf_def Exists_def quot_simps q_defs intro: BuildSeq_combine AbstForm_trans_fm_eq fresh_imp_VarNonOccForm)


Input:
lemma comp_iso_in_hom [intro]:
    assumes "\<guillemotleft>f : a \<cong> b\<guillemotright>" and "\<guillemotleft>g : b \<cong> c\<guillemotright>"
    shows "\<guillemotleft>g \<cdot> f : a \<cong> c\<guillemotright>"

Output:
using assms iso_in_hom_def
by auto


Input: lemma HR_quot_fm: fixes A::fm shows "HR \<lbrakk>\<guillemotleft>A\<guillemotright>\<rbrakk>e \<lbrakk>\<guillemotleft>\<guillemotleft>A\<guillemotright>\<guillemotright>\<rbrakk>e"

Output: by (metis HR_H HF_quot_coding_tm coding_tm_hf quot_fm_coding)


Input:
lemma implies_entails:
  "\<lbrakk> \<And>s. P s \<Longrightarrow> Q s \<rbrakk> \<Longrightarrow> \<guillemotleft>P\<guillemotright> \<tturnstile> \<guillemotleft>Q\<guillemotright>"

Output: by(rule entailsI, case_tac "P s", simp_all)


Input:
lemma rderivs_replicate_diff: "\<lbrakk>\<guillemotleft>rderivs (replicate i as) r\<guillemotright> = \<guillemotleft>rderivs (replicate j as) r\<guillemotright>; i > j\<rbrakk> \<Longrightarrow>
  \<guillemotleft>rderivs (replicate (i - j) as) (rderivs (replicate j as) r)\<guillemotright> = \<guillemotleft>rderivs (replicate j as) r\<guillemotright>"

Output:
unfolding rderivs_append[symmetric] replicate_add[symmetric]
by auto


Input:
lemma prod_in_hom [intro]:
    assumes "\<guillemotleft>f : a \<rightarrow> c\<guillemotright>" and "\<guillemotleft>g : b \<rightarrow> d\<guillemotright>"
    shows "\<guillemotleft>f \<otimes> g : a \<otimes> b \<rightarrow> c \<otimes> d\<guillemotright>"

Output:
using assms prod_def
by fastforce


Input:
lemma pre_import_composition:
  "-p*(-p*x*y\<guillemotleft>-q) = -p*(x\<guillemotleft>y\<guillemotleft>-q)"

Output: by (metis pre_closed pre_seq pre_import)


Input:
lemma eq_split_subst:
  assumes "vwb_lens x"
  shows "(P = Q) \<longleftrightarrow> (\<forall> v. P\<lbrakk>\<guillemotleft>v\<guillemotright>/x\<rbrakk> = Q\<lbrakk>\<guillemotleft>v\<guillemotright>/x\<rbrakk>)"

Output:
using assms
by (pred_auto, metis vwb_lens_wb wb_lens.source_stability)


Input:
lemma hcomp_in_hhom [intro]:
    assumes "\<guillemotleft>\<mu> : a \<rightarrow> b\<guillemotright>" and "\<guillemotleft>\<nu> : b \<rightarrow> c\<guillemotright>"
    shows "\<guillemotleft>\<nu> \<star> \<mu> : a \<rightarrow> c\<guillemotright>"

Output:
using assms hseq_char
by fastforce


Input:
lemma Extra_ax_imp_hfthm:
  assumes "x \<in> Extra_ax" obtains A where "x = \<lbrakk>\<guillemotleft>A\<guillemotright>\<rbrakk>e \<and> {} \<turnstile> A"

Output:
using assms unfolding Extra_ax_def
by (auto intro: eval_quot_fm_ignore hfthm.Extra)


Input:
lemma empty_graph_is_tree :
  assumes "edges g = {}"
  shows   "is_tree g"

Output:
using assms
by (auto simp add : is_tree_def subpath_def vertices_def)


Input:
lemma ToCT_simp [simp]:
    assumes "C.arr f" and "C.arr g" and "C.arr h"
    shows "ToCT (f, g, h) = T (f, T (g, h))"

Output:
using assms ToCT_def CCC.arr_char
by simp


Input:
lemma endpoints_shiftpath:
  assumes "pathfinish g = pathstart g"
    and "a \<in> {0 .. 1}"
  shows "pathfinish (shiftpath a g) = g a"
    and "pathstart (shiftpath a g) = g a"

Output:
using assms
by (auto intro!: pathfinish_shiftpath pathstart_shiftpath)


Input:
lemma (in gcd_condition_monoid) gcd_divides_l:
  assumes "a \<in> carrier G" "b \<in> carrier G"
  shows "(somegcd G a b) divides a"

Output:
proof - interpret weak_lower_semilattice "division_rel G"
by simp show ?thesis
by (metis assms gcd_isgcd isgcd_def)
qed


Input:
lemma lm013:
  assumes "a \<in> allAllocations N G" "finite G"
  shows "finite (Range a)"

Output:
using assms elementOfPartitionOfFiniteSetIsFinite
by (metis allocationReverseInjective)


Input:
lemma bij_betw_generator_carrier:
  "bij_betw (\<lambda>n :: nat. \<^bold>g [^] n) {..<order G} (carrier G)"

Output: by(simp add: bij_betw_def inj_on_generator carrier_conv_generator)


Input:
lemma (in factorial_monoid) wfactors_unique:
  assumes "wfactors G fs a"
    and "wfactors G fs' a"
    and "a \<in> carrier G"
    and "set fs \<subseteq> carrier G"
    and "set fs' \<subseteq> carrier G"
  shows "essentially_equal G fs fs'"

Output:
using assms
by (fast intro: ee_wfactorsI[of a a])


Input:
lemma zip_add_closed :
  "set as \<subseteq> G \<Longrightarrow> set bs \<subseteq> G \<Longrightarrow> set [a + b. (a,b)\<leftarrow>zip as bs] \<subseteq> G"

Output:
using add_closed
by (induct as bs rule: list_induct2') auto


Input:
lemma filterlim_cong':
  assumes "filterlim f F G"
  assumes "eventually (\<lambda>x. f x = g x) G"
  shows   "filterlim g F G"

Output:
using assms
by (subst filterlim_cong[OF refl refl, of _ f]) (auto elim: eventually_mono)


Input:
lemma ENF_offending_not_empty_imp_ENF_offending_subseteq_rhs:
    assumes "sinvar_all_edges_normal_form P" "set_offending_flows G nP \<noteq> {}"
    shows "{ {(e1,e2) \<in> edges G. \<not> P (nP e1) (nP e2)} } \<subseteq> set_offending_flows G nP"

Output:
using assms ENF_offending_set_P_representation
by blast


Input: lemma inv_Characters': "\<chi> \<in> characters G \<Longrightarrow> inv\<^bsub>Characters G\<^esub> \<chi> = inv_character \<chi>"

Output:
using character.inv_Characters[of G \<chi>]
by (simp add: characters_def)


Input:
lemma ord_gpv_the_gpvD:
  "ord_gpv f g \<Longrightarrow> ord_spmf (rel_generat (=) (=) (rel_fun (=) ord_gpv)) (the_gpv f) (the_gpv g)"

Output: by(erule ord_gpv.cases) simp


Input:
lemma  matrix_right_invertible:
  "linear f \<Longrightarrow> ((\<exists>B. matrix f ** B = mat 1) \<longleftrightarrow> (\<exists>g. linear g \<and> f \<circ> g = id))" for f::"real^'m \<Rightarrow> real^'n"

Output:
using matrix_right_invertible_gen[of f]
by (auto simp: linear_matrix_vector_mul_eq)


Input:
lemma act_inv_act [simp]:
  assumes "g \<in> carrier G"
  shows "b <o inv g <o g = b"

Output:
using \<open>g \<in> carrier G\<close> and act_act_inv [of "inv g"]
by simp


Input:
lemma gHom_mem:"\<lbrakk>Group F; Group G; f \<in> gHom F G ; x \<in> carrier F\<rbrakk> \<Longrightarrow>
                             (f x) \<in> carrier G"

Output:
apply (simp add:gHom_def, (erule conjE)+)
apply (simp add:Pi_def) done


Input:
lemma (in group) IDirProd_one_left:
  assumes "A \<subseteq> carrier G"
  shows "IDirProd G {\<one>} A = generate G A"

Output:
using IDirProd_one_right[of A] assms unfolding IDirProd_def
by force


Input:
lemma AbGroup_nth_subset_inner_dirsum :
  "\<lbrakk> \<forall>G \<in> set Gs. AbGroup G; add_independentS Gs; n < length Gs \<rbrakk>
        \<Longrightarrow> Gs!n \<subseteq> (\<Oplus>G\<leftarrow>Gs. G)"

Output:
using AbGroup_subset_inner_dirsum
by force


Input:
lemma hfref_weaken_pre_nofail:
    assumes "(f,g) \<in> [P]\<^sub>a R \<rightarrow> S"
    shows "(f,g) \<in> [\<lambda>x. nofail (g x) \<longrightarrow> P x]\<^sub>a R \<rightarrow> S"

Output:
using assms unfolding hfref_def hn_refine_def
by auto


Input:
lemma integrable_on_cong [cong]:
  assumes "\<And>x. x \<in> A \<Longrightarrow> f x = g x" "A = B"
  shows   "f integrable_on A \<longleftrightarrow> g integrable_on B"

Output:
using has_integral_cong[of A f g, OF assms(1)] assms(2)
by (auto simp: integrable_on_def)


Input:
lemma iter_spaceD:
  assumes "g \<in> iter_space"
  shows "g \<in> T \<rightarrow>\<^sub>C X" "apply_bcontfun g t0 = x0"

Output:
using assms iv_defined
by (auto simp add: iter_space_def mem_PiC_iff split: if_splits)


Input: lemma distinct_fresh_rename_idns: "finite G \<Longrightarrow> distinct (fresh_rename_idns n B insts G)"

Output:
using distinct_fresh_rename_ns
by (metis)


Input:
lemma rel_set_set_rel_eq[pred_set_conv]:
    "rel_set (\<lambda> x y. (x, y) \<in> A) = (\<lambda> f g. (f, g) \<in> \<langle>A\<rangle> set_rel)"

Output:
unfolding rel_set_def set_rel_def
by simp


Input:
lemma dvd_right_imp_subdegree_le:
  fixes   f g :: "'a::{comm_monoid_add,mult_zero} fps"
  assumes "\<exists>k. g = k * f" "g \<noteq> 0"
  shows   "subdegree f \<le> subdegree g"

Output:
using assms fps_mult_subdegree_ge
by fastforce


Input: lemma succ_tran_subseteq_nodes: "\<lbrakk> wf_graph G \<rbrakk> \<Longrightarrow> succ_tran G v \<subseteq> nodes G"

Output:
unfolding succ_tran_def
using tranclD2 wf_graph.E_wfD(2)
by fastforce


Input:
lemma minGraphProps10:
  "minGraphProps g \<Longrightarrow> (a, b) \<in> edges g \<Longrightarrow> (b, a) \<in> edges g"

Output:
apply (unfold minGraphProps_def edges_sym_def)
apply (elim conjE allE impE)
by simp+


Input:
lemma weight_join[simp]: "edges g\<^sub>1 \<inter> edges g\<^sub>2 = {}
  \<Longrightarrow> weight w (graph_join g\<^sub>1 g\<^sub>2) = weight w g\<^sub>1 + weight w g\<^sub>2"

Output:
unfolding weight_alt
by (auto simp: sum.union_disjoint image_Un)


Input: lemma bigo_plus_absorb_lemma2: "f \<in> O(g) \<Longrightarrow> O(g) \<le> f +o O(g)"

Output: by (metis (no_types) bigo_minus bigo_plus_absorb_lemma1 right_minus set_plus_mono set_plus_rearrange2 set_zero_plus subsetD subset_refl subset_trans)


Input:
lemma infsetsum_mono_neutral:
  fixes f g :: "'a \<Rightarrow> real"
  assumes "f abs_summable_on A" and "g abs_summable_on B"
  assumes "\<And>x. x \<in> A \<Longrightarrow> f x \<le> g x"
  assumes "\<And>x. x \<in> A - B \<Longrightarrow> f x \<le> 0"
  assumes "\<And>x. x \<in> B - A \<Longrightarrow> g x \<ge> 0"
  shows   "infsetsum f A \<le> infsetsum g B"

Output:
using assms unfolding infsetsum_altdef set_lebesgue_integral_def abs_summable_on_altdef set_integrable_def
by (intro Bochner_Integration.integral_mono) (auto simp: indicator_def)


Input: theorem LT6: "\<turnstile> \<diamond>F \<longrightarrow> (F \<leadsto> G) \<longrightarrow> \<diamond>G"

Output:
unfolding leadsto_def
using LT5[of "F" "G"]
by auto


Input:
lemma extending_Increasing:
     "extending (%G. reachable (extend h F\<squnion>G)) h F
                  (Increasing (func o f)) (Increasing func)"

Output:
apply (unfold extending_def)
apply (blast intro: project_Increasing_D) done


Input: lemma Entry_no_predecessor[simp]: "predecessors g (Entry g) = []"

Output:
using Entry_unreachable
by (auto simp:predecessors_def)


Input: lemma F_entails_\<G>_iff: "N1 \<TTurnstile>\<G>e N2 \<longleftrightarrow> \<Union> (\<G>_F ` N1) \<TTurnstile>e \<Union> (\<G>_F ` N2)"

Output:
unfolding F.entails_\<G>_def
by simp


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

Output:
unfolding \<F>\<G>_semantics
by auto


Input:
lemma has_laplace_add:
  assumes f: "(f has_laplace F) S"
  assumes g: "(g has_laplace G) S"
  shows "((\<lambda>x. f x + g x) has_laplace F + G) S"

Output:
apply (rule has_laplaceI)
using has_integral_add[OF has_laplaceD[OF f ] has_laplaceD[OF g]]
by (auto simp: algebra_simps)


Input: lemma bind'_cong : " f \<sigma> = g \<sigma> \<Longrightarrow>  (f ;- M )\<sigma> = (g ;- M )\<sigma>"

Output:
unfolding bind_SE'_def bind_SE_def
by simp


Input:
lemma (in group)
  assumes finite': "finite (carrier G)" "a \<in> carrier G"
  shows pow_ord_eq_ord_iff: "group.ord G (a [^] k) = ord a \<longleftrightarrow> coprime k (ord a)" (is "?L \<longleftrightarrow> ?R")

Output:
using assms ord_ge_1 [OF assms]
by (auto simp: div_eq_dividend_iff ord_pow_gen coprime_iff_gcd_eq_1 gcd.commute split: if_split_asm)


Input:
lemma solvable_condition:
  assumes "group_hom G H f" "group_hom H K g"
    and "g ` (carrier H) = carrier K" and "kernel H K g \<subseteq> f ` (carrier G)"
    and "solvable G" "solvable K" shows "solvable H"

Output:
using solvable_seq_condition[OF assms(1-2) _ assms(4) group.subgroup_self] assms(3,5-6) subgroup.subset[OF group_hom.img_is_subgroup[OF assms(1)]] group_hom.axioms(2)[OF assms(1)]
by (simp add: solvable_def)


Input:
lemma Join_Always_rel_le_giv:
     "[| Client \<squnion> G \<in> Increasing giv;  G \<in> preserves rel |]
      ==> Client \<squnion> G \<in> Always {s. rel s \<le> giv s}"

Output: by (force intro: AlwaysI Join_Stable_rel_le_giv)


Input:
lemma inverse_transformations_sym:
  assumes "inverse_transformations A B F G \<sigma> \<sigma>'"
  shows "inverse_transformations A B G F \<sigma>' \<sigma>"

Output:
using assms
by (simp add: category.inverse_arrows_sym inverse_transformations_axioms_def inverse_transformations_def)


Input:
lemma elems_all_maps_list:
  assumes "M \<in> set (all_maps_list G)" "distinct (snd G)"
  shows "\<Union>(sset M) = set (snd G)"

Output:
using assms
by (simp add: all_maps_list_def in_set_cyc_permutationss distincts_grouped_arcs union_grouped_out_arcs[symmetric]) (metis set_map)


Input:
lemma deriv_smult:
  assumes "a \<in> carrier R"
  assumes "b \<in> carrier R"
  assumes "g \<in> carrier P"
  shows "deriv (a \<odot>\<^bsub>P\<^esub> g) b = a \<otimes> (deriv g b)"

Output:
unfolding derivative_def taylor_expansion_def
using assms sub_smult X_plus_closed cfs_smult
by (simp add: sub_closed)


Input:
lemma FrameStatEqEqvt[eqvt]:
  fixes F :: "'b frame"
  and   G :: "'b frame"
  and   p :: "name prm"

  shows "(p \<bullet> (F \<simeq>\<^sub>F G)) = ((p \<bullet> F) \<simeq>\<^sub>F (p \<bullet> G))"

Output: by(simp add: FrameStatEq_def eqvts)


Input:
lemma is_K33_outer_step:
  assumes "is_K33_outer_inv G i blue"
  assumes "is_K33_inner_inv G i (ig_verts_cnt G) blue"
  shows "is_K33_outer_inv G (Suc i) blue"

Output:
using assms unfolding is_K33_outer_inv_def is_K33_inner_last
by (auto intro: less_SucI elim: less_SucE)


Input: lemma times_ms_aux_MSLNil_iff: "times_ms_aux F G = MSLNil \<longleftrightarrow> F = MSLNil \<or> G = MSLNil"

Output: by (subst times_ms_aux.code) (simp split: msllist.splits)


Input:
lemma (in monoid_cancel) assoc_unit_r [trans]:
  assumes aunit: "a \<in> Units G"
    and asc: "a \<sim> b"
    and bcarr: "b \<in> carrier G"
  shows "b \<in> Units G"

Output:
using aunit bcarr associated_sym[OF asc]
by (blast intro: assoc_unit_l)


Input:
lemma vcg1:
    assumes "(f, g) \<in> Id \<rightarrow> \<langle>Id\<rangle> nres_rel"
    shows "g x \<le> h x \<Longrightarrow> f x \<le> h x"

Output:
using order_trans nres_relD[OF assms[param_fo, OF IdI], THEN refine_IdD]
by this


Input: lemma resultant_swap: "resultant f g = (-1)^(degree f * degree g) * (resultant g f)"

Output:
unfolding coeff_subresultant_0_0_resultant[symmetric] unfolding arg_cong[OF subresultant_swap[of 0 f g], of "\<lambda> x. coeff x 0"] coeff_smult
by simp


Input:
lemma diffeomorphismD:
  assumes "diffeomorphism k S T f g"
  shows diffeomorphism_smoothD: "k-smooth_on S f" "k-smooth_on T g"
    and diffeomorphism_inverseD: "\<And>x. x \<in> S \<Longrightarrow> g (f x) = x" "\<And>y. y \<in> T \<Longrightarrow> f (g y) = y"
    and diffeomorphism_image_eq: "(f ` S = T)" "(g ` T = S)"

Output:
using assms
by (auto simp: diffeomorphism_def homeomorphism_def)


Input: lemma emp_ref: assumes "us \<in> lists \<langle>G\<rangle>\<^sub>+" and  "Ref G us = \<epsilon>" shows "us = \<epsilon>"

Output:
using emp_concat_emp[OF \<open>us \<in> lists \<langle>G\<rangle>\<^sub>+\<close>] ref[OF lists_drop_emp[OF assms(1)], unfolded \<open>Ref G us = \<epsilon>\<close> concat.simps(1),symmetric]
by blast


Input: lemma fls_integral_add [simp]: "fls_integral (f+g) = fls_integral f + fls_integral g"

Output: by (intro fls_eqI) (simp add: algebra_simps)


Input:
lemma mono_increasing_o:
     "mono g ==> increasing f \<subseteq> increasing (g o f)"

Output:
apply (unfold increasing_def stable_def constrains_def, auto)
apply (blast intro: monoD order_trans) done


Input:
lemma (in finite_group) non_trivial_group_ord_gr_1:
  assumes "carrier G \<noteq> {\<one>}"
  shows "\<exists>e \<in> carrier G. ord e > 1"

Output:
proof - from one_closed obtain e where e: "e \<noteq> \<one>" "e \<in> carrier G"
using assms carrier_not_empty
by blast thus ?thesis
using ord_eq_1[of e] le_neq_implies_less ord_ge_1
by fastforce
qed


Input:
lemma af\<^sub>G_sat_core_generalized:
  "Only_G \<G> \<Longrightarrow> i \<le> j \<Longrightarrow> \<G> \<Turnstile>\<^sub>P af\<^sub>G \<phi> (w [0 \<rightarrow> i]) \<Longrightarrow> \<G> \<Turnstile>\<^sub>P af\<^sub>G \<phi> (w [0 \<rightarrow> j])"

Output: by (metis af\<^sub>G_sat_core foldl_append subsequence_append le_add_diff_inverse)


Input:
lemma (in monoid) wfactors_prod_exists [intro, simp]:
  assumes "\<forall>a \<in> set as. irreducible G a" and "set as \<subseteq> carrier G"
  shows "\<exists>a. a \<in> carrier G \<and> wfactors G as a"

Output:
unfolding wfactors_def
using assms
by blast


Input: lemma fls_integral_sub [simp]: "fls_integral (f-g) = fls_integral f - fls_integral g"

Output: by (intro fls_eqI) (simp add: algebra_simps)


Input:
lemma frameEqFresh:
  fixes F :: "('a::fs_name) frame"
  and   G :: "'a frame"
  and   x :: name
  and   y :: name

  assumes "\<lparr>\<nu>x\<rparr>F = \<lparr>\<nu>y\<rparr>G"
  and     "x \<sharp> F"

  shows "y \<sharp> G"

Output:
using assms
by(auto simp add: frame.inject alpha fresh_left calc_atm)


Input:
lemma map_gpv'_sel [simp]:
  "the_gpv (map_gpv' f g h gpv) = map_spmf (map_generat f g (h ---> map_gpv' f g h)) (the_gpv gpv)"

Output: by(simp add: map_gpv'.sel spmf.map_comp o_def generat.map_comp map_fun_def[abs_def])


Input:
lemma (in subgroup) rcos_module:
  assumes "group G" "x \<in> carrier G" "x' \<in> carrier G"
  shows "(x' \<in> H #> x) = (x' \<otimes> inv x \<in> H)"

Output:
using rcos_module_rev rcos_module_imp assms
by blast


Input:
lemma cvm_fold_cong[fundef_cong]:
  assumes "cvm = cvm'"
  and "stepss = stepss'"
  and "\<And>x d. x \<in> set stepss \<Longrightarrow> g d x = g' d x"
  shows "cvm_fold g cvm stepss = cvm_fold g' cvm' stepss'"

Output:
unfolding cvm_fold_def
using assms
by (fastforce intro: foldl_cong split: prod.split)


Input:
lemma fls_divide_times2:
  fixes f g :: "'a::{comm_semiring_0,inverse,uminus} fls"
  shows "(f * g) / h = (f / h) * g"

Output:
using fls_divide_times[of g f h]
by (simp add: mult.commute)


Input: lemma map_le_antisym: "\<lbrakk> f \<subseteq>\<^sub>m g; g \<subseteq>\<^sub>m f \<rbrakk> \<Longrightarrow> f = g"

Output:
unfolding map_le_def
by (metis ext domIff)


Input:
lemma (in subgroup) elemrcos_carrier:
  assumes "group G" "a \<in> carrier G"
    and "a' \<in> H #> a"
  shows "a' \<in> carrier G"

Output: by (meson assms group.is_monoid monoid.r_coset_subset_G subset subsetCE)


Input:
lemma maintained_holds_subset_iff[simp]:
  assumes "graph G"
  shows "maintained (transl_rule (e\<^sub>L \<sqsubseteq> e\<^sub>R)) G \<longleftrightarrow> (:G:\<lbrakk>e\<^sub>L\<rbrakk> \<subseteq> :G:\<lbrakk>e\<^sub>R\<rbrakk>)"

Output:
using assms maintained_holds_iff sentence_iff prod.sel
by metis


Input:
lemma ex2:
     "\<forall>GG. finite GG & GG \<inter> X \<noteq> {} \<longrightarrow> OK GG (\<lambda>G. G) \<longrightarrow> (\<Squnion>G \<in> GG. G) \<in> X
      \<Longrightarrow> ex_prop X"

Output:
apply (unfold ex_prop_def, clarify)
apply (drule_tac x = "{F,G}" in spec)
apply (auto dest: ok_sym simp add: OK_iff_ok) done


Input:
lemma closed_Collect_le:
  fixes f g :: "'a :: topological_space \<Rightarrow> 'b::linorder_topology"
  assumes f: "continuous_on UNIV f"
    and g: "continuous_on UNIV g"
  shows "closed {x. f x \<le> g x}"

Output:
using open_Collect_less [OF g f]
by (simp add: closed_def Collect_neg_eq[symmetric] not_le)


Input:
lemma closed_Collect_eq_isCont:
  fixes f g :: "'a :: t2_space \<Rightarrow> 'b::t2_space"
  assumes f: "\<And>x. isCont f x" and g: "\<And>x. isCont g x"
  shows "closed {x. f x = g x}"

Output: by (intro closed_Collect_eq continuous_at_imp_continuous_on ballI assms)


Input:
lemma convergent_cong:
  assumes "eventually (\<lambda>x. f x = g x) sequentially"
  shows "convergent f \<longleftrightarrow> convergent g"

Output:
unfolding convergent_def
by (subst filterlim_cong[OF refl refl assms]) (rule refl)


Input:
lemma mu_commute_fixpoint_1:
  "isotone f \<Longrightarrow> has_least_fixpoint (f \<circ> g) \<Longrightarrow> f \<circ> g = g \<circ> f \<Longrightarrow> is_fixpoint f (\<mu> (f \<circ> g))"

Output: by (metis is_fixpoint_def mu_roll)


Input:
lemma poly_mapping_size_one [simp]:
  "poly_mapping_size f g 1 = g 0 + f 0 + g 1 + 1"

Output:
unfolding poly_mapping_size_def
by transfer simp


Input:
lemma Gromov_extension_isometry_composition:
  assumes "isometry f"
          "isometry g"
  shows "Gromov_extension (g o f) = Gromov_extension g o Gromov_extension f"

Output:
using Gromov_extension_isometry_on_composition[OF isometryD(1)[OF assms(1)] isometryD(1)[OF assms(2)]]
by simp


Input: lemma simple_path_imp_arc: "simple_path g \<Longrightarrow> pathfinish g \<noteq> pathstart g \<Longrightarrow> arc g"

Output:
using simple_path_cases
by auto


Input:
lemma A_FactGroup_def':
  fixes G (structure)
  shows "G A_Mod H \<equiv> \<lparr>carrier = a_rcosets\<^bsub>G\<^esub> H, mult = set_add G, one = H\<rparr>"

Output:
unfolding A_FactGroup_defs
by (fold A_RCOSETS_def set_add_def)


Input:
lemma expands_to_exp_neg:
  assumes "(f expands_to MS (MSLCons (C, e) xs) g) basis" "basis_wf basis" "e - 0 < 0"
  shows   "((\<lambda>x. exp (f x)) expands_to MS (powser_ms_aux' exp_series_stream (MSLCons (C, e) xs))
             (\<lambda>x. exp (g x))) basis"

Output:
using assms is_expansion_exp_neg[of C e xs g basis]
by (auto simp: expands_to.simps)


Input: lemma map_dual_func1: "map_dual (f \<circ> g) = map_dual f \<circ> map_dual g"

Output:
unfolding fun_eq_iff comp_def
by (metis dual.exhaust dual.map)


Input: lemma condensation_nodes_edges: "(condensation_edges g P) \<subseteq> (condensation_nodes g P \<times> condensation_nodes g P)"

Output:
unfolding condensation_edges_def condensation_nodes_def induced_phi_graph_def
by auto


Input:
lemma g_pre_additive:
  assumes "is_conjugation f g"
  shows "g (sup x y) \<le> z \<longleftrightarrow> sup (g x) (g y) \<le> z"

Output: by (metis assms is_conjugation_sym f_pre_additive)


Input:
lemma fls_divide_shift_numer_nonzero:
  fixes   f g :: "'a :: {comm_monoid_add,inverse,times,uminus} fls"
  assumes "f \<noteq> 0"
  shows   "fls_shift m f / g = fls_shift m (f/g)"

Output:
using assms fls_base_factor_to_fps_shift[of m f]
by (simp add: fls_divide_def algebra_simps)


Input: lemma CompI: "\<lbrakk>G\<turnstile>s \<midarrow>c1\<rightarrow> s1; G\<turnstile>s1 \<midarrow>c2\<rightarrow> s2\<rbrakk> \<Longrightarrow> G\<turnstile>s \<midarrow>c1;; c2\<rightarrow> s2"

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


Input:
theorem code_blue_dfs_correct':
  assumes G: "b_graph G" "finite ((g_E G)\<^sup>* `` g_V0 G)"
  assumes REL: "(Gi,G)\<in>bg_impl_rel_ext unit_rel Id"
  shows "case code_blue_dfs Gi of
      None \<Rightarrow> \<forall>prpl. \<not>b_graph.is_lasso_prpl G prpl
    | Some L \<Rightarrow> b_graph.is_lasso_prpl G L"

Output:
using code_blue_dfs_correct[OF G REL]
by simp


Input:
lemma stable_Join_Always2:
     "[| F \<in> invariant A;  G \<in> stable A |] ==> F\<squnion>G \<in> Always A"

Output:
apply (subst Join_commute)
apply (blast intro: stable_Join_Always1) done


Input: lemma map_le_iff_map_add_commute: "f \<subseteq>\<^sub>m f ++ g \<longleftrightarrow> f ++ g = g ++ f"

Output: by (fastforce simp: map_add_def map_le_def fun_eq_iff split: option.splits)


Input:
lemma nu_commute_greatest_fixpoint:
  "isotone f \<Longrightarrow> isotone g \<Longrightarrow> has_greatest_fixpoint f \<Longrightarrow> has_greatest_fixpoint g \<Longrightarrow> has_greatest_fixpoint (f \<circ> g) \<Longrightarrow> f \<circ> g = g \<circ> f \<Longrightarrow> \<nu> (f \<circ> g) = \<nu> f \<Longrightarrow> \<nu> f \<le> \<nu> g"

Output: by (metis greatest_fixpoint is_greatest_fixpoint_def nu_roll)


Input:
lemma cadjoint_univ_prop:
  fixes G :: "'b::chilbert_space \<Rightarrow> 'a::complex_inner"
  assumes a1: \<open>bounded_clinear G\<close>
  shows \<open>\<forall>x. \<forall>y. \<langle>cadjoint G x, y\<rangle> = \<langle>x, G y\<rangle>\<close>

Output:
using assms cadjoint_is_cadjoint is_cadjoint_def
by blast


Input: lemma chooseNext: "redundant g \<Longrightarrow> chooseNext g \<in> allVars g \<and> trivial g (chooseNext g)"

Output: by (drule chooseNext', auto simp: trivial_in_allVars)


Input:
lemma (in Vector_Spaces.linear) invertible_lf_intro[intro]:
  assumes "(g \<circ> f = id)"  and "(f \<circ> g = id)"
  shows "invertible_lf ((*a)) ((*b)) f"

Output:
using assms
by unfold_locales auto


Input: lemma (in Group) Gp_smult_nsg1:"\<lbrakk>G \<guillemotright> H; G \<triangleright> N\<rbrakk> \<Longrightarrow> Gp G (N \<diamondop>\<^bsub>G\<^esub> H) \<triangleright> N"

Output: apply (simp add:smult_commute_sg_nsg[THEN sym, of "H" "N"], simp only:Gp_smult_nsg) done


Input:
lemma must_have_one_False:
  "gval (fold gAnd G (Bc True)) s = False \<Longrightarrow>
   \<exists>g \<in> set G. gval g s = False"

Output:
using must_have_one_False_contra
by blast


Input:
lemma RDirProd_list_carrier:
  shows "carrier (RDirProd_list (G # Gs)) = (\<lambda>(x, xs). x # xs) ` (carrier G \<times> carrier (RDirProd_list Gs))"

Output:
unfolding RDirProd_list_carrier_def'
using DirProd_list_carrier .


Input:
lemma (in group) generate_idem'_right:
  assumes "A \<subseteq> carrier G" "B \<subseteq> carrier G"
  shows "generate G (A \<union> generate G B) = generate G (A \<union> B)"

Output:
using generate_idem'[OF assms(2) assms(1)]
by (simp add: sup_commute)


Input:
lemma (in wf_digraph) spanning_tree_imp_connected:
  assumes "spanning_tree H G"
  shows "connected G"

Output:
using assms
by (auto intro: connected_spanning_imp_connected)


Input:
lemma F_simp:
    assumes "D.arr g"
    shows "F g = initial_arrow_to_functor.the_ext C D G (Fo (D.dom g)) (\<eta>o (D.dom g))
                                                        (Fo (D.cod g)) (\<eta>o (D.cod g) \<cdot>\<^sub>D g)"

Output:
using assms F_def
by simp


Input:
lemma vimage2p_map_list_all2:
  "vimage2p (map f) (map g) (list_all2 A) = list_all2 (vimage2p f g A)"

Output: by(simp add: vimage2p_def list.rel_map)