[STATEMENT]
lemma count_Sup_multiset_nonempty:
  \<open>count (Sup A) x = (SUP X\<in>A. count X x)\<close>
  if \<open>A \<noteq> {}\<close> \<open>subset_mset.bdd_above A\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. count (Sup A) x = (SUP X\<in>A. count X x)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
A \<noteq> {}
subset_mset.bdd_above A

goal (1 subgoal):
 1. count (Sup A) x = (SUP X\<in>A. count X x)
[PROOF STEP]
by (simp add: Sup_multiset_def Sup_multiset_in_multiset count_Abs_multiset)


[STATEMENT]
lemma shuffles_commutes: "shuffles xs ys = shuffles ys xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. shuffles xs ys = shuffles ys xs
[PROOF STEP]
by (induction xs ys rule: shuffles.induct) (simp_all add: Un_commute)


[STATEMENT]
lemma Float_pos_eq_mantissa_pos: "Float m e > 0 \<longleftrightarrow> m > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0 < Float m e) = (0 < m)
[PROOF STEP]
using powr_gt_zero[of 2 "e"]
[PROOF STATE]
proof (prove)
using this:
(0 < 2 powr real_of_int e) = (2 \<noteq> 0)

goal (1 subgoal):
 1. (0 < Float m e) = (0 < m)
[PROOF STEP]
by (auto simp add: zero_less_mult_iff zero_float_def simp del: powr_gt_zero dest: less_zeroE)


[STATEMENT]
lemma Qp_res_one:
  assumes "n > 0"
  shows  "Qp_res \<one> n = (1::int)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Qp_res \<one> n = 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. Qp_res \<one> n = 1
[PROOF STEP]
unfolding Qp_res_def to_Zp_one
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. \<one>\<^bsub>Z\<^sub>p\<^esub> n = 1
[PROOF STEP]
using residue_of_one(2)
[PROOF STATE]
proof (prove)
using this:
0 < n
0 < ?k \<Longrightarrow> \<one>\<^bsub>Z\<^sub>p\<^esub> ?k = 1

goal (1 subgoal):
 1. \<one>\<^bsub>Z\<^sub>p\<^esub> n = 1
[PROOF STEP]
by blast


[STATEMENT]
lemma empty_subseteq_qle[simp]: "{} \<subseteq>\<^sub>\<preceq> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {} \<subseteq>\<^sub>\<preceq> A
[PROOF STEP]
by (simp add: subseteq_qle_def)


[STATEMENT]
lemma \<Phi>_Fun_mapsto:
    assumes "D.ide y" and "\<guillemotleft>f : F y \<rightarrow>\<^sub>C x\<guillemotright>"
    shows "\<Phi>.FUN (y, x) \<in> HomC.set (F y, x) \<rightarrow> HomD.set (y, G x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Phi>.FUN (y, x) \<in> HomC.set (F y, x) \<rightarrow> HomD.set (y, G x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Phi>.FUN (y, x) \<in> HomC.set (F y, x) \<rightarrow> HomD.set (y, G x)
[PROOF STEP]
have "S.arr (\<Phi> (y, x)) \<and> \<Phi>.DOM (y, x) = HomC.set (F y, x) \<and>
                                \<Phi>.COD (y, x) = HomD.set (y, G x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S.arr (\<Phi> (y, x)) \<and> \<Phi>.DOM (y, x) = HomC.set (F y, x) \<and> \<Phi>.COD (y, x) = HomD.set (y, G x)
[PROOF STEP]
using assms HomC.set_map HomD.set_map
[PROOF STATE]
proof (prove)
using this:
D.ide y
\<guillemotleft>f : F y \<rightarrow>\<^sub>C x\<guillemotright>
\<lbrakk>C.ide ?a; C.ide ?b\<rbrakk> \<Longrightarrow> S.set (HomC.map (?b, ?a)) = HomC.set (?b, ?a)
\<lbrakk>D.ide ?a; D.ide ?b\<rbrakk> \<Longrightarrow> S.set (HomD.map (?b, ?a)) = HomD.set (?b, ?a)

goal (1 subgoal):
 1. S.arr (\<Phi> (y, x)) \<and> \<Phi>.DOM (y, x) = HomC.set (F y, x) \<and> \<Phi>.COD (y, x) = HomD.set (y, G x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S.arr (\<Phi> (y, x)) \<and> \<Phi>.DOM (y, x) = HomC.set (F y, x) \<and> \<Phi>.COD (y, x) = HomD.set (y, G x)

goal (1 subgoal):
 1. \<Phi>.FUN (y, x) \<in> HomC.set (F y, x) \<rightarrow> HomD.set (y, G x)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
S.arr (\<Phi> (y, x)) \<and> \<Phi>.DOM (y, x) = HomC.set (F y, x) \<and> \<Phi>.COD (y, x) = HomD.set (y, G x)

goal (1 subgoal):
 1. \<Phi>.FUN (y, x) \<in> HomC.set (F y, x) \<rightarrow> HomD.set (y, G x)
[PROOF STEP]
using S.Fun_mapsto
[PROOF STATE]
proof (prove)
using this:
S.arr (\<Phi> (y, x)) \<and> \<Phi>.DOM (y, x) = HomC.set (F y, x) \<and> \<Phi>.COD (y, x) = HomD.set (y, G x)
S.arr ?f \<Longrightarrow> S.Fun ?f \<in> extensional (S.Dom ?f) \<inter> (S.Dom ?f \<rightarrow> S.Cod ?f)

goal (1 subgoal):
 1. \<Phi>.FUN (y, x) \<in> HomC.set (F y, x) \<rightarrow> HomD.set (y, G x)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<Phi>.FUN (y, x) \<in> HomC.set (F y, x) \<rightarrow> HomD.set (y, G x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma less_total: "x \<sqsubset> y | x = y | y \<sqsubset> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<sqsubset> y \<or> x = y \<or> y \<sqsubset> x
[PROOF STEP]
using total
[PROOF STATE]
proof (prove)
using this:
?x \<sqsubseteq> ?y \<or> ?y \<sqsubseteq> ?x

goal (1 subgoal):
 1. x \<sqsubset> y \<or> x = y \<or> y \<sqsubset> x
[PROOF STEP]
by (unfold less_def) blast


[STATEMENT]
lemma gauss_norm_smult:
  assumes "g \<in> carrier Q\<^sub>p_x"
  assumes "a \<in> carrier Q\<^sub>p"
  shows "gauss_norm (a \<odot>\<^bsub>Q\<^sub>p_x\<^esub> g) = val a + gauss_norm g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gauss_norm (a \<odot>\<^bsub>UP Q\<^sub>p\<^esub> g) = val a + gauss_norm g
[PROOF STEP]
using gauss_norm_smult_cfs[of g a] gauss_norm_coeff_norm[of g] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>g \<in> carrier (UP Q\<^sub>p); a \<in> carrier Q\<^sub>p; gauss_norm g = val (g ?k)\<rbrakk> \<Longrightarrow> gauss_norm (a \<odot>\<^bsub>UP Q\<^sub>p\<^esub> g) = val a + val (g ?k)
\<exists>n\<le>deg Q\<^sub>p g. gauss_norm g = val (g n)
g \<in> carrier (UP Q\<^sub>p)
a \<in> carrier Q\<^sub>p

goal (1 subgoal):
 1. gauss_norm (a \<odot>\<^bsub>UP Q\<^sub>p\<^esub> g) = val a + gauss_norm g
[PROOF STEP]
by metis


[STATEMENT]
lemma integrable_neg: "f integrable_on S \<Longrightarrow> (\<lambda>x. -f(x)) integrable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f integrable_on S \<Longrightarrow> (\<lambda>x. - f x) integrable_on S
[PROOF STEP]
unfolding integrable_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. (f has_integral y) S \<Longrightarrow> \<exists>y. ((\<lambda>x. - f x) has_integral y) S
[PROOF STEP]
by(auto intro: has_integral_neg)


[STATEMENT]
lemma (in topological_space) eventually_nhds:
  "eventually P (nhds a) \<longleftrightarrow> (\<exists>S. open S \<and> a \<in> S \<and> (\<forall>x\<in>S. P x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eventually P (nhds a) = (\<exists>S. open S \<and> a \<in> S \<and> (\<forall>x\<in>S. P x))
[PROOF STEP]
unfolding nhds_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eventually P (Inf (principal ` {S. open S \<and> a \<in> S})) = (\<exists>S. open S \<and> a \<in> S \<and> (\<forall>x\<in>S. P x))
[PROOF STEP]
by (subst eventually_INF_base) (auto simp: eventually_principal)


[STATEMENT]
lemma butterfly_scaleR_left[simp]: "butterfly (r *\<^sub>R \<psi>) \<phi> = r *\<^sub>C butterfly \<psi> \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. butterfly (r *\<^sub>R \<psi>) \<phi> = complex_of_real r *\<^sub>C butterfly \<psi> \<phi>
[PROOF STEP]
by (simp add: scaleR_scaleC)


[STATEMENT]
lemma ppos_mult:
  assumes "ppos a"
      and "ppos b"
    shows "ppos (pmult a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ppos (pmult a b)
[PROOF STEP]
using assms(1) assms(2) pmult.rep_eq ppos.rep_eq
[PROOF STATE]
proof (prove)
using this:
ppos a
ppos b
Rep_prat (pmult ?x ?xa) = Rep_prat ?x * Rep_prat ?xa
ppos ?x = (0 < Rep_prat ?x)

goal (1 subgoal):
 1. ppos (pmult a b)
[PROOF STEP]
by auto


[STATEMENT]
lemma map_graph_preserves_restricted[intro]:
  assumes "graph G"
  shows "graph (map_graph f G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. graph (map_graph f G)
[PROOF STEP]
proof(rule restrictI,standard)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> edges (map_graph f G) \<Longrightarrow> x \<in> {(l, v1, v2). v1 \<in> vertices (map_graph f G) \<and> v2 \<in> vertices (map_graph f G)}
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> edges (map_graph f G) \<Longrightarrow> x \<in> {(l, v1, v2). v1 \<in> vertices (map_graph f G) \<and> v2 \<in> vertices (map_graph f G)}
[PROOF STEP]
assume "x \<in> edges (map_graph f G)"
[PROOF STATE]
proof (state)
this:
x \<in> edges (map_graph f G)

goal (1 subgoal):
 1. \<And>x. x \<in> edges (map_graph f G) \<Longrightarrow> x \<in> {(l, v1, v2). v1 \<in> vertices (map_graph f G) \<and> v2 \<in> vertices (map_graph f G)}
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
graph G
x \<in> edges (map_graph f G)
[PROOF STEP]
show "x \<in> {(l, v1, v2). v1\<in>vertices (map_graph f G) \<and> v2\<in>vertices (map_graph f G)}"
[PROOF STATE]
proof (prove)
using this:
graph G
x \<in> edges (map_graph f G)

goal (1 subgoal):
 1. x \<in> {(l, v1, v2). v1 \<in> vertices (map_graph f G) \<and> v2 \<in> vertices (map_graph f G)}
[PROOF STEP]
by(cases x,auto simp:map_graph_def)
[PROOF STATE]
proof (state)
this:
x \<in> {(l, v1, v2). v1 \<in> vertices (map_graph f G) \<and> v2 \<in> vertices (map_graph f G)}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma primitive_irreducible_imp_degree:
 "primitive (p::'a::{semiring_gcd,idom} poly) \<Longrightarrow> irreducible p \<Longrightarrow> degree p > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>primitive p; irreducible p\<rbrakk> \<Longrightarrow> 0 < degree p
[PROOF STEP]
by (unfold irreducible_primitive_connect[symmetric], auto)


[STATEMENT]
lemma pm_of_idx_pm_uminus: "pm_of_idx_pm xs (- f) = - pm_of_idx_pm xs f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pm_of_idx_pm xs (- f) = - pm_of_idx_pm xs f
[PROOF STEP]
by (rule poly_mapping_eqI, simp add: lookup_pm_of_idx_pm when_def)


[STATEMENT]
lemma sum_Set [code]:
  "sum f (Set xs) = fold_keys (plus \<circ> f) xs 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum f (Set xs) = fold_keys ((+) \<circ> f) xs (0::'a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum f (Set xs) = fold_keys ((+) \<circ> f) xs (0::'a)
[PROOF STEP]
have "comp_fun_commute (\<lambda>x. (+) (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. comp_fun_commute (\<lambda>x. (+) (f x))
[PROOF STEP]
by standard (auto simp: ac_simps)
[PROOF STATE]
proof (state)
this:
comp_fun_commute (\<lambda>x. (+) (f x))

goal (1 subgoal):
 1. sum f (Set xs) = fold_keys ((+) \<circ> f) xs (0::'a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
comp_fun_commute (\<lambda>x. (+) (f x))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
comp_fun_commute (\<lambda>x. (+) (f x))

goal (1 subgoal):
 1. sum f (Set xs) = fold_keys ((+) \<circ> f) xs (0::'a)
[PROOF STEP]
by (auto simp add: sum.eq_fold finite_fold_fold_keys o_def)
[PROOF STATE]
proof (state)
this:
sum f (Set xs) = fold_keys ((+) \<circ> f) xs (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nat_cut_ge_card: "card (I \<down>\<ge> (t::nat)) \<le> card I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (I \<down>\<ge> t) \<le> card I
[PROOF STEP]
apply (case_tac "finite I")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. finite I \<Longrightarrow> card (I \<down>\<ge> t) \<le> card I
 2. infinite I \<Longrightarrow> card (I \<down>\<ge> t) \<le> card I
[PROOF STEP]
apply (simp add: cut_ge_card)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite I \<Longrightarrow> card (I \<down>\<ge> t) \<le> card I
[PROOF STEP]
apply (simp add: nat_cut_ge_finite_iff)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma max_flow:
  "NFlow c s t max_flow" (is ?thesis1)
  "\<not> (\<exists>p. NPreflow.isAugmentingPath c s t max_flow p)" (is ?thesis2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NFlow c s t max_flow &&& \<nexists>p. NPreflow.isAugmentingPath c s t max_flow p
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. NFlow c s t max_flow
 2. \<nexists>p. NPreflow.isAugmentingPath c s t max_flow p
[PROOF STEP]
have "NFlow c s t (\<lambda>_. 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NFlow c s t (\<lambda>_. 0::'capacity)
[PROOF STEP]
by unfold_locales(simp_all add: cap_non_negative)
[PROOF STATE]
proof (state)
this:
NFlow c s t (\<lambda>_. 0::'capacity)

goal (2 subgoals):
 1. NFlow c s t max_flow
 2. \<nexists>p. NPreflow.isAugmentingPath c s t max_flow p
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
NFlow c s t (\<lambda>_. 0::'capacity)

goal (2 subgoals):
 1. NFlow c s t max_flow
 2. \<nexists>p. NPreflow.isAugmentingPath c s t max_flow p
[PROOF STEP]
have "NFlow c s t (NFlow.augment_with_path c f (shortest_augmenting_path f))"
    if "NFlow c s t f" and "\<exists>p. NPreflow.isAugmentingPath c s t f p" for f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NFlow c s t (NFlow.augment_with_path c f (shortest_augmenting_path f))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. NFlow c s t (NFlow.augment_with_path c f (shortest_augmenting_path f))
[PROOF STEP]
interpret NFlow c s t f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NFlow c s t f
[PROOF STEP]
using that(1)
[PROOF STATE]
proof (prove)
using this:
NFlow c s t f

goal (1 subgoal):
 1. NFlow c s t f
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. NFlow c s t (augment_with_path (shortest_augmenting_path f))
[PROOF STEP]
interpret F: Flow c s t "NFlow.augment c f (NPreflow.augmentingFlow c f (shortest_augmenting_path f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Flow c s t (augment (augmentingFlow (shortest_augmenting_path f)))
[PROOF STEP]
by(intro augment_flow_presv augFlow_resFlow shortest_is_augmenting shortest_augmenting_path[OF that])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. NFlow c s t (augment_with_path (shortest_augmenting_path f))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NFlow c s t (augment_with_path (shortest_augmenting_path f))
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
NFlow c s t f
Ex isAugmentingPath

goal (1 subgoal):
 1. NFlow c s t (augment_with_path (shortest_augmenting_path f))
[PROOF STEP]
by(simp add: NFlow.augment_with_path_def)(unfold_locales)
[PROOF STATE]
proof (state)
this:
NFlow c s t (augment_with_path (shortest_augmenting_path f))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>NFlow c s t ?f; \<exists>p. NPreflow.isAugmentingPath c s t ?f p\<rbrakk> \<Longrightarrow> NFlow c s t (NFlow.augment_with_path c ?f (shortest_augmenting_path ?f))

goal (2 subgoals):
 1. NFlow c s t max_flow
 2. \<nexists>p. NPreflow.isAugmentingPath c s t max_flow p
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
NFlow c s t (\<lambda>_. 0::'capacity)
\<lbrakk>NFlow c s t ?f; \<exists>p. NPreflow.isAugmentingPath c s t ?f p\<rbrakk> \<Longrightarrow> NFlow c s t (NFlow.augment_with_path c ?f (shortest_augmenting_path ?f))
[PROOF STEP]
have "NFlow c s t max_flow \<and> \<not> (\<exists>p. NPreflow.isAugmentingPath c s t max_flow p)"
[PROOF STATE]
proof (prove)
using this:
NFlow c s t (\<lambda>_. 0::'capacity)
\<lbrakk>NFlow c s t ?f; \<exists>p. NPreflow.isAugmentingPath c s t ?f p\<rbrakk> \<Longrightarrow> NFlow c s t (NFlow.augment_with_path c ?f (shortest_augmenting_path ?f))

goal (1 subgoal):
 1. NFlow c s t max_flow \<and> (\<nexists>p. NPreflow.isAugmentingPath c s t max_flow p)
[PROOF STEP]
unfolding max_flow_def
[PROOF STATE]
proof (prove)
using this:
NFlow c s t (\<lambda>_. 0::'capacity)
\<lbrakk>NFlow c s t ?f; \<exists>p. NPreflow.isAugmentingPath c s t ?f p\<rbrakk> \<Longrightarrow> NFlow c s t (NFlow.augment_with_path c ?f (shortest_augmenting_path ?f))

goal (1 subgoal):
 1. NFlow c s t (while (\<lambda>f. Ex (NPreflow.isAugmentingPath c s t f)) (\<lambda>f. NFlow.augment_with_path c f (shortest_augmenting_path f)) (\<lambda>_. 0::'capacity)) \<and> (\<nexists>p. NPreflow.isAugmentingPath c s t (while (\<lambda>f. Ex (NPreflow.isAugmentingPath c s t f)) (\<lambda>f. NFlow.augment_with_path c f (shortest_augmenting_path f)) (\<lambda>_. 0::'capacity)) p)
[PROOF STEP]
by(rule while_rule[where P="NFlow c s t" and r="measure (\<lambda>f. ek_analysis_defs.ekMeasure (residualGraph c f) s t)"])
      (auto intro: shortest_augmenting_path NFlow.shortest_path_decr_ek_measure simp add: NFlow.augment_with_path_def)
[PROOF STATE]
proof (state)
this:
NFlow c s t max_flow \<and> (\<nexists>p. NPreflow.isAugmentingPath c s t max_flow p)

goal (2 subgoals):
 1. NFlow c s t max_flow
 2. \<nexists>p. NPreflow.isAugmentingPath c s t max_flow p
[PROOF STEP]
thus ?thesis1 ?thesis2
[PROOF STATE]
proof (prove)
using this:
NFlow c s t max_flow \<and> (\<nexists>p. NPreflow.isAugmentingPath c s t max_flow p)

goal (1 subgoal):
 1. NFlow c s t max_flow &&& \<nexists>p. NPreflow.isAugmentingPath c s t max_flow p
[PROOF STEP]
by simp_all
[PROOF STATE]
proof (state)
this:
NFlow c s t max_flow
\<nexists>p. NPreflow.isAugmentingPath c s t max_flow p

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma WHILEIT_unfold: "WHILEIT I b f x = (
  if (I x) then
    (if b x then bind (f x) (WHILEIT I b f) else return x)
  else top) "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. WHILEIT I b f x = (if I x then if b x then bind (f x) (WHILEIT I b f) else return x else top)
[PROOF STEP]
unfolding WHILEIT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. REC\<^sub>T (WHILEI_body bind return I b f) x = (if I x then if b x then bind (f x) (REC\<^sub>T (WHILEI_body bind return I b f)) else return x else top)
[PROOF STEP]
apply (subst RECT_unfold[OF WHILEI_body_trimono])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. WHILEI_body bind return I b f (REC\<^sub>T (WHILEI_body bind return I b f)) x = (if I x then if b x then bind (f x) (REC\<^sub>T (WHILEI_body bind return I b f)) else return x else top)
[PROOF STEP]
unfolding WHILEI_body_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if I x then if b x then bind (f x) (REC\<^sub>T (\<lambda>W s. if I s then if b s then bind (f s) W else return s else top)) else return x else top) = (if I x then if b x then bind (f x) (REC\<^sub>T (\<lambda>W s. if I s then if b s then bind (f s) W else return s else top)) else return x else top)
[PROOF STEP]
apply (rule refl)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma fps_exp_deriv[simp]: "fps_deriv (fps_exp a) = fps_const (a::'a::field_char_0) * fps_exp a"
  (is "?l = ?r")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_deriv (fps_exp a) = fps_const a * fps_exp a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. fps_deriv (fps_exp a) = fps_const a * fps_exp a
[PROOF STEP]
have "?l$n = ?r $ n" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_deriv (fps_exp a) $ n = (fps_const a * fps_exp a) $ n
[PROOF STEP]
using of_nat_neq_0
[PROOF STATE]
proof (prove)
using this:
of_nat (Suc ?n) \<noteq> (0::?'a)

goal (1 subgoal):
 1. fps_deriv (fps_exp a) $ n = (fps_const a * fps_exp a) $ n
[PROOF STEP]
by (auto simp add: fps_exp_def divide_simps)
[PROOF STATE]
proof (state)
this:
fps_deriv (fps_exp a) $ ?n = (fps_const a * fps_exp a) $ ?n

goal (1 subgoal):
 1. fps_deriv (fps_exp a) = fps_const a * fps_exp a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
fps_deriv (fps_exp a) $ ?n = (fps_const a * fps_exp a) $ ?n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
fps_deriv (fps_exp a) $ ?n = (fps_const a * fps_exp a) $ ?n

goal (1 subgoal):
 1. fps_deriv (fps_exp a) = fps_const a * fps_exp a
[PROOF STEP]
by (simp add: fps_eq_iff)
[PROOF STATE]
proof (state)
this:
fps_deriv (fps_exp a) = fps_const a * fps_exp a

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma toSet_splitU[simp]:
  "(x',b',c') \<in> toSet (\<Gamma>' @ (x, b, c) #\<^sub>\<Gamma> \<Gamma>) \<longleftrightarrow> (x',b',c') \<in> (toSet \<Gamma>' \<union> {(x, b, c)} \<union> toSet \<Gamma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x', b', c') \<in> toSet (\<Gamma>' @ (x, b, c) #\<^sub>\<Gamma> \<Gamma>)) = ((x', b', c') \<in> toSet \<Gamma>' \<union> {(x, b, c)} \<union> toSet \<Gamma>)
[PROOF STEP]
using append_g_toSetU toSet.simps
[PROOF STATE]
proof (prove)
using this:
toSet (?G1.0 @ ?G2.0) = toSet ?G1.0 \<union> toSet ?G2.0
toSet GNil = {}
toSet (?xbc #\<^sub>\<Gamma> ?G) = {?xbc} \<union> toSet ?G

goal (1 subgoal):
 1. ((x', b', c') \<in> toSet (\<Gamma>' @ (x, b, c) #\<^sub>\<Gamma> \<Gamma>)) = ((x', b', c') \<in> toSet \<Gamma>' \<union> {(x, b, c)} \<union> toSet \<Gamma>)
[PROOF STEP]
by auto


[STATEMENT]
lemma (in CLF) interval_is_sublattice:
     "[| a \<in> A; b \<in> A; interval r a b \<noteq> {} |]
        ==> interval r a b <<= cl"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> interval r a b <<= cl
[PROOF STEP]
apply (rule sublatticeI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> interval r a b \<subseteq> A
 2. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> \<in> CompleteLattice
[PROOF STEP]
apply (simp add: interval_subset)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> \<in> CompleteLattice
[PROOF STEP]
apply (rule CompleteLatticeI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> \<in> PartialOrder
 2. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> \<forall>S\<subseteq>pset \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr>. \<exists>L. isLub S \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> L
 3. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> \<forall>S\<subseteq>pset \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr>. \<exists>G. isGlb S \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> G
[PROOF STEP]
apply (simp add: intervalPO)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> \<forall>S\<subseteq>pset \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr>. \<exists>L. isLub S \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> L
 2. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> \<forall>S\<subseteq>pset \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr>. \<exists>G. isGlb S \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> G
[PROOF STEP]
apply (simp add: intv_CL_lub)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> \<forall>S\<subseteq>pset \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr>. \<exists>G. isGlb S \<lparr>pset = interval r a b, order = induced (interval r a b) r\<rparr> G
[PROOF STEP]
apply (simp add: intv_CL_glb)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma set_times_rearrange2: "a *o (b *o C) = (a * b) *o C"
  for a b :: "'a::semigroup_mult"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a *o (b *o C) = (a * b) *o C
[PROOF STEP]
by (auto simp add: elt_set_times_def mult.assoc)


[STATEMENT]
lemma sylvester_mat_const[simp]:
  fixes a :: "'a :: semiring_1"
  shows "sylvester_mat [:a:] q = a \<cdot>\<^sub>m 1\<^sub>m (degree q)"
    and "sylvester_mat p [:a:] = a \<cdot>\<^sub>m 1\<^sub>m (degree p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sylvester_mat [:a:] q = a \<cdot>\<^sub>m 1\<^sub>m (degree q) &&& sylvester_mat p [:a:] = a \<cdot>\<^sub>m 1\<^sub>m (degree p)
[PROOF STEP]
by(auto simp: sylvester_index_mat)


[STATEMENT]
lemma ereal_less_divide_iff: "0 < (c::ereal) \<Longrightarrow> c < \<infinity> \<Longrightarrow> a < b / c \<longleftrightarrow> a * c < b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < c; c < \<infinity>\<rbrakk> \<Longrightarrow> (a < b / c) = (a * c < b)
[PROOF STEP]
by (cases a b c rule: ereal3_cases) (auto simp: field_simps)


[STATEMENT]
lemma graph_more_rel_sv[relator_props]:
  "\<lbrakk>single_valued Rm; single_valued Rv; single_valued Rw\<rbrakk>
  \<Longrightarrow> single_valued (\<langle>Rm,Rv,Rw\<rangle>graph_more_rel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>single_valued Rm; single_valued Rv; single_valued Rw\<rbrakk> \<Longrightarrow> single_valued (\<langle>Rm, Rv, Rw\<rangle>graph_more_rel)
[PROOF STEP]
unfolding graph_more_rel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>single_valued Rm; single_valued Rv; single_valued Rw\<rbrakk> \<Longrightarrow> single_valued {(g, g'). (nodes g, nodes g') \<in> \<langle>Rv\<rangle>set_rel \<and> (edges g, edges g') \<in> \<langle>Rv \<times>\<^sub>r Rw \<times>\<^sub>r Rv\<rangle>set_rel \<and> (graph.more g, graph.more g') \<in> Rm}
[PROOF STEP]
apply (rule single_valuedI, clarsimp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y z. \<lbrakk>single_valued Rm; single_valued Rv; single_valued Rw; (nodes x, nodes y) \<in> \<langle>Rv\<rangle>set_rel; (nodes x, nodes z) \<in> \<langle>Rv\<rangle>set_rel; (edges x, edges y) \<in> \<langle>Rv \<times>\<^sub>r Rw \<times>\<^sub>r Rv\<rangle>set_rel; (graph.more x, graph.more y) \<in> Rm; (edges x, edges z) \<in> \<langle>Rv \<times>\<^sub>r Rw \<times>\<^sub>r Rv\<rangle>set_rel; (graph.more x, graph.more z) \<in> Rm\<rbrakk> \<Longrightarrow> y = z
[PROOF STEP]
apply (rule graph.equality)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x y z. \<lbrakk>single_valued Rm; single_valued Rv; single_valued Rw; (nodes x, nodes y) \<in> \<langle>Rv\<rangle>set_rel; (nodes x, nodes z) \<in> \<langle>Rv\<rangle>set_rel; (edges x, edges y) \<in> \<langle>Rv \<times>\<^sub>r Rw \<times>\<^sub>r Rv\<rangle>set_rel; (graph.more x, graph.more y) \<in> Rm; (edges x, edges z) \<in> \<langle>Rv \<times>\<^sub>r Rw \<times>\<^sub>r Rv\<rangle>set_rel; (graph.more x, graph.more z) \<in> Rm\<rbrakk> \<Longrightarrow> nodes y = nodes z
 2. \<And>x y z. \<lbrakk>single_valued Rm; single_valued Rv; single_valued Rw; (nodes x, nodes y) \<in> \<langle>Rv\<rangle>set_rel; (nodes x, nodes z) \<in> \<langle>Rv\<rangle>set_rel; (edges x, edges y) \<in> \<langle>Rv \<times>\<^sub>r Rw \<times>\<^sub>r Rv\<rangle>set_rel; (graph.more x, graph.more y) \<in> Rm; (edges x, edges z) \<in> \<langle>Rv \<times>\<^sub>r Rw \<times>\<^sub>r Rv\<rangle>set_rel; (graph.more x, graph.more z) \<in> Rm\<rbrakk> \<Longrightarrow> edges y = edges z
 3. \<And>x y z. \<lbrakk>single_valued Rm; single_valued Rv; single_valued Rw; (nodes x, nodes y) \<in> \<langle>Rv\<rangle>set_rel; (nodes x, nodes z) \<in> \<langle>Rv\<rangle>set_rel; (edges x, edges y) \<in> \<langle>Rv \<times>\<^sub>r Rw \<times>\<^sub>r Rv\<rangle>set_rel; (graph.more x, graph.more y) \<in> Rm; (edges x, edges z) \<in> \<langle>Rv \<times>\<^sub>r Rw \<times>\<^sub>r Rv\<rangle>set_rel; (graph.more x, graph.more z) \<in> Rm\<rbrakk> \<Longrightarrow> graph.more y = graph.more z
[PROOF STEP]
apply (erule (1) single_valuedD[rotated], tagged_solver)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in prob_space) prob_eq_AE:
  "(AE x in M. P x \<longleftrightarrow> Q x) \<Longrightarrow> {x\<in>space M. P x} \<in> events \<Longrightarrow> {x\<in>space M. Q x} \<in> events \<Longrightarrow> \<P>(x in M. P x) = \<P>(x in M. Q x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>AE x in M. P x = Q x; {x \<in> space M. P x} \<in> events; {x \<in> space M. Q x} \<in> events\<rbrakk> \<Longrightarrow> prob {x \<in> space M. P x} = prob {x \<in> space M. Q x}
[PROOF STEP]
by (rule finite_measure_eq_AE) auto


[STATEMENT]
lemma pcompose_1: "pcompose 1 p = 1"
  for p :: "'a::comm_semiring_1 poly"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<circ>\<^sub>p p = 1
[PROOF STEP]
by (auto simp: one_pCons pcompose_pCons)


[STATEMENT]
lemma times_real_alg: "(real_of x) * (real_of y) = real_of (x * y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of x * real_of y = real_of (x * y)
[PROOF STEP]
by (transfer, rule mult_3[symmetric])


[STATEMENT]
lemma star_bot_below_omega_bot:
  "x\<^sup>\<star> * bot \<le> x\<^sup>\<omega> * bot"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<star> * bot \<le> x\<^sup>\<omega> * bot
[PROOF STEP]
by (metis omega_unfold star_left_induct_equal sup_monoid.add_0_left mult_assoc)


[STATEMENT]
lemma parts_insert_subset: "insert X (parts H) \<subseteq> parts (insert X H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert X (parts H) \<subseteq> parts (insert X H)
[PROOF STEP]
by (blast intro: parts_mono [THEN [2] rev_subsetD])


[STATEMENT]
lemma Infinitesimal_scaleR2:
  assumes "x \<in> Infinitesimal" shows "a *\<^sub>R x \<in> Infinitesimal"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a *\<^sub>R x \<in> Infinitesimal
[PROOF STEP]
by (metis HFinite_star_of Infinitesimal_HFinite_mult2 Infinitesimal_hnorm_iff assms hnorm_scaleR hypreal_hnorm_def star_of_norm)


[STATEMENT]
lemma measure_of_subset: "M \<subseteq> Pow \<Omega> \<Longrightarrow> M' \<subseteq> M \<Longrightarrow> sets (measure_of \<Omega> M' \<mu>) \<subseteq> sets (measure_of \<Omega> M \<mu>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>M \<subseteq> Pow \<Omega>; M' \<subseteq> M\<rbrakk> \<Longrightarrow> sets (measure_of \<Omega> M' \<mu>) \<subseteq> sets (measure_of \<Omega> M \<mu>')
[PROOF STEP]
by (auto intro!: sigma_sets_subseteq)


[STATEMENT]
lemma tendsto_add_ereal_general [tendsto_intros]:
  fixes x y :: ereal
  assumes "\<not>((x=\<infinity> \<and> y=-\<infinity>) \<or> (x=-\<infinity> \<and> y=\<infinity>))"
      and f: "(f \<longlongrightarrow> x) F" and g: "(g \<longlongrightarrow> y) F"
  shows "((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
proof (cases x)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>r. x = ereal r \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
 2. x = \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
 3. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
case (real r)
[PROOF STATE]
proof (state)
this:
x = ereal r

goal (3 subgoals):
 1. \<And>r. x = ereal r \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
 2. x = \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
 3. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
apply (rule tendsto_add_ereal_general2)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<bar>x\<bar> \<noteq> \<infinity>
 2. (f \<longlongrightarrow> x) F
 3. (g \<longlongrightarrow> y) F
[PROOF STEP]
using real assms
[PROOF STATE]
proof (prove)
using this:
x = ereal r
\<not> (x = \<infinity> \<and> y = - \<infinity> \<or> x = - \<infinity> \<and> y = \<infinity>)
(f \<longlongrightarrow> x) F
(g \<longlongrightarrow> y) F

goal (3 subgoals):
 1. \<bar>x\<bar> \<noteq> \<infinity>
 2. (f \<longlongrightarrow> x) F
 3. (g \<longlongrightarrow> y) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F

goal (2 subgoals):
 1. x = \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
 2. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
 2. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
case (PInf)
[PROOF STATE]
proof (state)
this:
x = \<infinity>

goal (2 subgoals):
 1. x = \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
 2. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = \<infinity>
[PROOF STEP]
have "y \<noteq> -\<infinity>"
[PROOF STATE]
proof (prove)
using this:
x = \<infinity>

goal (1 subgoal):
 1. y \<noteq> - \<infinity>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x = \<infinity>
\<not> (x = \<infinity> \<and> y = - \<infinity> \<or> x = - \<infinity> \<and> y = \<infinity>)
(f \<longlongrightarrow> x) F
(g \<longlongrightarrow> y) F

goal (1 subgoal):
 1. y \<noteq> - \<infinity>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
y \<noteq> - \<infinity>

goal (2 subgoals):
 1. x = \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
 2. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<noteq> - \<infinity>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
y \<noteq> - \<infinity>

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
using tendsto_add_ereal_PInf PInf assms
[PROOF STATE]
proof (prove)
using this:
y \<noteq> - \<infinity>
\<lbrakk>?y \<noteq> - \<infinity>; (?f \<longlongrightarrow> \<infinity>) ?F; (?g \<longlongrightarrow> ?y) ?F\<rbrakk> \<Longrightarrow> ((\<lambda>x. ?f x + ?g x) \<longlongrightarrow> \<infinity>) ?F
x = \<infinity>
\<not> (x = \<infinity> \<and> y = - \<infinity> \<or> x = - \<infinity> \<and> y = \<infinity>)
(f \<longlongrightarrow> x) F
(g \<longlongrightarrow> y) F

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F

goal (1 subgoal):
 1. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
case (MInf)
[PROOF STATE]
proof (state)
this:
x = - \<infinity>

goal (1 subgoal):
 1. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = - \<infinity>
[PROOF STEP]
have "y \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
using this:
x = - \<infinity>

goal (1 subgoal):
 1. y \<noteq> \<infinity>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x = - \<infinity>
\<not> (x = \<infinity> \<and> y = - \<infinity> \<or> x = - \<infinity> \<and> y = \<infinity>)
(f \<longlongrightarrow> x) F
(g \<longlongrightarrow> y) F

goal (1 subgoal):
 1. y \<noteq> \<infinity>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
y \<noteq> \<infinity>

goal (1 subgoal):
 1. x = - \<infinity> \<Longrightarrow> ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
y \<noteq> \<infinity>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
y \<noteq> \<infinity>

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
using tendsto_add_ereal_MInf MInf f g
[PROOF STATE]
proof (prove)
using this:
y \<noteq> \<infinity>
\<lbrakk>?y \<noteq> \<infinity>; (?f \<longlongrightarrow> - \<infinity>) ?F; (?g \<longlongrightarrow> ?y) ?F\<rbrakk> \<Longrightarrow> ((\<lambda>x. ?f x + ?g x) \<longlongrightarrow> - \<infinity>) ?F
x = - \<infinity>
(f \<longlongrightarrow> x) F
(g \<longlongrightarrow> y) F

goal (1 subgoal):
 1. ((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F
[PROOF STEP]
by (metis ereal_MInfty_eq_plus)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. f x + g x) \<longlongrightarrow> x + y) F

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma var_le_union_iff:
  "\<lbrakk> x \<in> set Vars; a \<in> scene_space; b \<in> scene_space \<rbrakk> \<Longrightarrow> x \<le> a \<squnion>\<^sub>S b \<longleftrightarrow> (x \<le> a \<or> x \<le> b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> set Vars; a \<in> scene_space; b \<in> scene_space\<rbrakk> \<Longrightarrow> x \<subseteq>\<^sub>S a \<squnion>\<^sub>S b = (x \<subseteq>\<^sub>S a \<or> x \<subseteq>\<^sub>S b)
[PROOF STEP]
apply (rule iffI, simp add: var_le_union_choice)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> set Vars; a \<in> scene_space; b \<in> scene_space; x \<subseteq>\<^sub>S a \<or> x \<subseteq>\<^sub>S b\<rbrakk> \<Longrightarrow> x \<subseteq>\<^sub>S a \<squnion>\<^sub>S b
[PROOF STEP]
apply (auto)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>x \<in> set Vars; a \<in> scene_space; b \<in> scene_space; x \<subseteq>\<^sub>S a\<rbrakk> \<Longrightarrow> x \<subseteq>\<^sub>S a \<squnion>\<^sub>S b
 2. \<lbrakk>x \<in> set Vars; a \<in> scene_space; b \<in> scene_space; x \<subseteq>\<^sub>S b\<rbrakk> \<Longrightarrow> x \<subseteq>\<^sub>S a \<squnion>\<^sub>S b
[PROOF STEP]
apply (meson idem_scene_space scene_space_ub subscene_trans)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> set Vars; a \<in> scene_space; b \<in> scene_space; x \<subseteq>\<^sub>S b\<rbrakk> \<Longrightarrow> x \<subseteq>\<^sub>S a \<squnion>\<^sub>S b
[PROOF STEP]
apply (metis idem_scene_space scene_space_ub scene_union_commute subscene_trans)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in Ring) LSM_eq_linear_span:"\<lbrakk>R module M; T \<subseteq> carrier M\<rbrakk> \<Longrightarrow>
          (LSM\<^bsub>R\<^esub> M T) = linear_span R M (carrier R) T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; T \<subseteq> carrier M\<rbrakk> \<Longrightarrow> LSM\<^bsub>R\<^esub> M T = linear_span R M (carrier R) T
[PROOF STEP]
apply (cut_tac whole_ideal)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; T \<subseteq> carrier M; ideal R (carrier R)\<rbrakk> \<Longrightarrow> LSM\<^bsub>R\<^esub> M T = linear_span R M (carrier R) T
[PROOF STEP]
apply (rule equalityI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>R module M; T \<subseteq> carrier M; ideal R (carrier R)\<rbrakk> \<Longrightarrow> LSM\<^bsub>R\<^esub> M T \<subseteq> linear_span R M (carrier R) T
 2. \<lbrakk>R module M; T \<subseteq> carrier M; ideal R (carrier R)\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) T \<subseteq> LSM\<^bsub>R\<^esub> M T
[PROOF STEP]
apply (frule Module.linear_span_subModule[of M R "carrier R" T], assumption+)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>R module M; T \<subseteq> carrier M; ideal R (carrier R); submodule R M (linear_span R M (carrier R) T)\<rbrakk> \<Longrightarrow> LSM\<^bsub>R\<^esub> M T \<subseteq> linear_span R M (carrier R) T
 2. \<lbrakk>R module M; T \<subseteq> carrier M; ideal R (carrier R)\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) T \<subseteq> LSM\<^bsub>R\<^esub> M T
[PROOF STEP]
apply (rule LSM_sub_submodule[of M T "linear_span R M (carrier R) T"],
        assumption+, simp add:Module.l_span_cont_H[of M R T])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; T \<subseteq> carrier M; ideal R (carrier R)\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) T \<subseteq> LSM\<^bsub>R\<^esub> M T
[PROOF STEP]
apply (frule LSM_submodule[of M T], assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; T \<subseteq> carrier M; ideal R (carrier R); submodule R M (LSM\<^bsub>R\<^esub> M T)\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) T \<subseteq> LSM\<^bsub>R\<^esub> M T
[PROOF STEP]
apply (frule LSM_inc_T[of M T], assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; T \<subseteq> carrier M; ideal R (carrier R); submodule R M (LSM\<^bsub>R\<^esub> M T); T \<subseteq> LSM\<^bsub>R\<^esub> M T\<rbrakk> \<Longrightarrow> linear_span R M (carrier R) T \<subseteq> LSM\<^bsub>R\<^esub> M T
[PROOF STEP]
apply (rule Module.l_span_sub_submodule[of M R "carrier R" "LSM\<^bsub>R\<^esub> M T" T],
         assumption+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma summable_deriv_ln_Gamma:
  "z \<noteq> (0 :: 'a :: {real_normed_field,banach}) \<Longrightarrow>
     summable (\<lambda>n. inverse (of_nat (Suc n)) - inverse (z + of_nat (Suc n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<noteq> (0::'a) \<Longrightarrow> summable (\<lambda>n. inverse (of_nat (Suc n)) - inverse (z + of_nat (Suc n)))
[PROOF STEP]
unfolding summable_iff_convergent
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<noteq> (0::'a) \<Longrightarrow> convergent (\<lambda>n. \<Sum>n<n. inverse (of_nat (Suc n)) - inverse (z + of_nat (Suc n)))
[PROOF STEP]
by (rule uniformly_convergent_imp_convergent,
      rule uniformly_summable_deriv_ln_Gamma[of z "norm z/2"]) simp_all