[STATEMENT]
lemma Equiv_Exec_trans_ex: "
  \<lbrakk> Equiv_Exec
      m equiv_states12
      localState1 localState2 input_fun1 input_fun2 output_fun1 output_fun2
      trans_fun1 trans_fun2 k1 k2 c1 c2;
    Equiv_Exec
      m equiv_states23
      localState2 localState3 input_fun2 input_fun3 output_fun2 output_fun3
      trans_fun2 trans_fun3 k2 k3 c2 c3 \<rbrakk> \<Longrightarrow>
    \<exists>equiv_states13. Equiv_Exec
      m equiv_states13
      localState1 localState3 input_fun1 input_fun3 output_fun1 output_fun3
      trans_fun1 trans_fun3 k1 k3 c1 c3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Equiv_Exec m equiv_states12 localState1 localState2 input_fun1 input_fun2 output_fun1 output_fun2 trans_fun1 trans_fun2 k1 k2 c1 c2; Equiv_Exec m equiv_states23 localState2 localState3 input_fun2 input_fun3 output_fun2 output_fun3 trans_fun2 trans_fun3 k2 k3 c2 c3\<rbrakk> \<Longrightarrow> \<exists>equiv_states13. Equiv_Exec m equiv_states13 localState1 localState3 input_fun1 input_fun3 output_fun1 output_fun3 trans_fun1 trans_fun3 k1 k3 c1 c3
[PROOF STEP]
by (blast intro: Equiv_Exec_trans)


[STATEMENT]
lemma fermat_theorem_power_poly_R[simp]: "[:a:] [^]\<^bsub>R\<^esub> CARD('a) ^ n = [:a:]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [:a:] [^]\<^bsub>R\<^esub> CARD('a) ^ n = [:a:]
[PROOF STEP]
by (auto simp add: Missing_Polynomial.poly_const_pow mod_poly_less)


[STATEMENT]
lemma ereal_of_enat_mult:
  "ereal_of_enat (m * n) = ereal_of_enat m * ereal_of_enat n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal_of_enat (m * n) = ereal_of_enat m * ereal_of_enat n
[PROOF STEP]
by (cases m n rule: enat2_cases) auto


[STATEMENT]
lemma eval_ternary_idempotence_Not: "eval_ternary_Not (eval_ternary_Not a) = a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_ternary_Not (eval_ternary_Not a) = a
[PROOF STEP]
by (cases a) simp_all


[STATEMENT]
lemma inj_finite_image_eq_finite: "inj_on f Z ==> finite (f ` Z) = finite Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on f Z \<Longrightarrow> finite (f ` Z) = finite Z
[PROOF STEP]
by (blast intro: finite_imageD)


[STATEMENT]
lemma distributed_integrable_var:
  fixes X :: "'a \<Rightarrow> real"
  shows "distributed M lborel X (\<lambda>x. ennreal (f x)) \<Longrightarrow> (\<And>x. 0 \<le> f x) \<Longrightarrow>
    integrable lborel (\<lambda>x. f x * x) \<Longrightarrow> integrable M X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>distributed M lborel X (\<lambda>x. ennreal (f x)); \<And>x. 0 \<le> f x; integrable lborel (\<lambda>x. f x * x)\<rbrakk> \<Longrightarrow> integrable M X
[PROOF STEP]
using distributed_integrable[of M lborel X f "\<lambda>x. x"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>distributed M lborel X (\<lambda>x. ennreal (f x)); (\<lambda>x. x) \<in> borel_measurable lborel; \<And>x. x \<in> space lborel \<Longrightarrow> 0 \<le> f x\<rbrakk> \<Longrightarrow> integrable lborel (\<lambda>x. f x * x) = integrable M X

goal (1 subgoal):
 1. \<lbrakk>distributed M lborel X (\<lambda>x. ennreal (f x)); \<And>x. 0 \<le> f x; integrable lborel (\<lambda>x. f x * x)\<rbrakk> \<Longrightarrow> integrable M X
[PROOF STEP]
by simp


[STATEMENT]
lemma mat_of_cblinfun_compose:
  "mat_of_cblinfun (F o\<^sub>C\<^sub>L G) = mat_of_cblinfun F * mat_of_cblinfun G"
  for F::"'b::{basis_enum,complex_normed_vector} \<Rightarrow>\<^sub>C\<^sub>L 'c::{basis_enum,complex_normed_vector}"
    and G::"'a::{basis_enum,complex_normed_vector}  \<Rightarrow>\<^sub>C\<^sub>L 'b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_of_cblinfun (F o\<^sub>C\<^sub>L G) = mat_of_cblinfun F * mat_of_cblinfun G
[PROOF STEP]
by (smt (verit, del_insts) cblinfun_of_mat_inverse mat_carrier mat_of_cblinfun_def mat_of_cblinfun_inverse cblinfun_of_mat_times mult_carrier_mat)


[STATEMENT]
lemma drop_rev: "drop n (rev xs) = rev (take (length xs - n) xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. drop n (rev xs) = rev (take (length xs - n) xs)
[PROOF STEP]
by (cases "length xs < n") (auto simp: rev_take)


[STATEMENT]
lemma pmf_binomial[simp]: "pmf binomial_pmf k = (n choose k) * p^k * (1 - p)^(n - k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pmf local.binomial_pmf k = real (n choose k) * p ^ k * (1 - p) ^ (n - k)
[PROOF STEP]
by transfer rule


[STATEMENT]
lemma map_fun_parametric: "((A ===> A') ===> (B ===> B') ===> (A' ===> B) ===> (A ===> B')) (--->) (--->)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((A ===> A') ===> (B ===> B') ===> (A' ===> B) ===> A ===> B') (--->) (--->)
[PROOF STEP]
by(fact map_fun_parametric)


[STATEMENT]
lemma dim_eucl_tangent_space:
  "dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)" for a::"'a::euclidean_space"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
interpret finite_dimensional_real_vector_space_pair_on
    "UNIV::'a set"
    "manifold_eucl.tangent_space \<infinity> a"
    Basis "directional_derivative \<infinity> a ` Basis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_dimensional_real_vector_space_pair_on UNIV (manifold_eucl.tangent_space \<infinity> a) Basis (directional_derivative \<infinity> a ` Basis)
[PROOF STEP]
by unfold_locales (auto simp: independent_Basis)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
have "manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a) = manifold_eucl.tangent_space.dim \<infinity> a (range (directional_derivative \<infinity> a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a) = manifold_eucl.tangent_space.dim \<infinity> a (range (directional_derivative \<infinity> a))
[PROOF STEP]
by (simp add: surj_directional_derivative)
[PROOF STATE]
proof (state)
this:
manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a) = manifold_eucl.tangent_space.dim \<infinity> a (range (directional_derivative \<infinity> a))

goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a) = manifold_eucl.tangent_space.dim \<infinity> a (range (directional_derivative \<infinity> a))

goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
have "\<dots> = vs1.dim (UNIV::'a set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. manifold_eucl.tangent_space.dim \<infinity> a (range (directional_derivative \<infinity> a)) = vs1.dim UNIV
[PROOF STEP]
by (rule dim_image_eq)
       (auto simp: linear_on_directional_derivative inj_on_directional_derivative)
[PROOF STATE]
proof (state)
this:
manifold_eucl.tangent_space.dim \<infinity> a (range (directional_derivative \<infinity> a)) = vs1.dim UNIV

goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
manifold_eucl.tangent_space.dim \<infinity> a (range (directional_derivative \<infinity> a)) = vs1.dim UNIV

goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
have "\<dots> = DIM('a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vs1.dim UNIV = DIM('a)
[PROOF STEP]
by (simp add: vs1.dim_UNIV)
[PROOF STATE]
proof (state)
this:
vs1.dim UNIV = DIM('a)

goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
have *: "DIM('a) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)"
[PROOF STATE]
proof (prove)
using this:
manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a) = DIM('a)

goal (1 subgoal):
 1. DIM('a) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
DIM('a) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)

goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
DIM('a) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)

goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
have "\<dots> = dim (manifold_eucl.tangent_space \<infinity> a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a) = dim (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
using manifold_eucl.basis_subset _ independent_directional_derivative
[PROOF STATE]
proof (prove)
using this:
directional_derivative \<infinity> ?a ` Basis \<subseteq> manifold_eucl.tangent_space \<infinity> ?a
PROP ?psi \<Longrightarrow> PROP ?psi
?k \<noteq> 0 \<Longrightarrow> independent (directional_derivative ?k ?a ` Basis)

goal (1 subgoal):
 1. manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a) = dim (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
proof (rule dim_unique[symmetric])
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. manifold_eucl.tangent_space \<infinity> a \<subseteq> span (directional_derivative \<infinity> a ` Basis)
 2. \<infinity> \<noteq> 0
 3. card (directional_derivative \<infinity> a ` Basis) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
show "manifold_eucl.tangent_space \<infinity> a \<subseteq> span (directional_derivative \<infinity> a ` Basis)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. manifold_eucl.tangent_space \<infinity> a \<subseteq> span (directional_derivative \<infinity> a ` Basis)
[PROOF STEP]
by (simp add: span_directional_derivative)
[PROOF STATE]
proof (state)
this:
manifold_eucl.tangent_space \<infinity> a \<subseteq> span (directional_derivative \<infinity> a ` Basis)

goal (2 subgoals):
 1. \<infinity> \<noteq> 0
 2. card (directional_derivative \<infinity> a ` Basis) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
have "card (directional_derivative \<infinity> a ` Basis) = DIM('a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (directional_derivative \<infinity> a ` Basis) = DIM('a)
[PROOF STEP]
apply (rule card_image)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (directional_derivative \<infinity> a) Basis
[PROOF STEP]
by (rule inj_on_directional_derivative) simp
[PROOF STATE]
proof (state)
this:
card (directional_derivative \<infinity> a ` Basis) = DIM('a)

goal (2 subgoals):
 1. \<infinity> \<noteq> 0
 2. card (directional_derivative \<infinity> a ` Basis) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (directional_derivative \<infinity> a ` Basis) = DIM('a)

goal (2 subgoals):
 1. \<infinity> \<noteq> 0
 2. card (directional_derivative \<infinity> a ` Basis) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
note *
[PROOF STATE]
proof (state)
this:
DIM('a) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)

goal (2 subgoals):
 1. \<infinity> \<noteq> 0
 2. card (directional_derivative \<infinity> a ` Basis) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
card (directional_derivative \<infinity> a ` Basis) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
show "card (directional_derivative \<infinity> a ` Basis) =
      manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)"
[PROOF STATE]
proof (prove)
using this:
card (directional_derivative \<infinity> a ` Basis) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)

goal (1 subgoal):
 1. card (directional_derivative \<infinity> a ` Basis) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
card (directional_derivative \<infinity> a ` Basis) = manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a)

goal (1 subgoal):
 1. \<infinity> \<noteq> 0
[PROOF STEP]
qed simp
[PROOF STATE]
proof (state)
this:
manifold_eucl.tangent_space.dim \<infinity> a (manifold_eucl.tangent_space \<infinity> a) = dim (manifold_eucl.tangent_space \<infinity> a)

goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
DIM('a) = dim (manifold_eucl.tangent_space \<infinity> a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
DIM('a) = dim (manifold_eucl.tangent_space \<infinity> a)

goal (1 subgoal):
 1. dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
dim (manifold_eucl.tangent_space \<infinity> a) = DIM('a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma two_block_non_interfering_zeros_are_0:
  assumes "i < dim_row A"
    and "j \<ge> dim_col A"
    and "j < dim_col (two_block_non_interfering A B)"
  shows "(two_block_non_interfering A B)$$(i,j) = 0" "(two_block_non_interfering A B)$$(i,j) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. two_block_non_interfering A B $$ (i, j) = (0::'a) &&& two_block_non_interfering A B $$ (i, j) = (0::'a)
[PROOF STEP]
using four_block_mat_def assms two_block_non_interfering_dims[of A B]
[PROOF STATE]
proof (prove)
using this:
four_block_mat ?A ?B ?C ?D = (let nra = dim_row ?A; nrd = dim_row ?D; nca = dim_col ?A; ncd = dim_col ?D in mat (nra + nrd) (nca + ncd) (\<lambda>(i, j). if i < nra then if j < nca then ?A $$ (i, j) else ?B $$ (i, j - nca) else if j < nca then ?C $$ (i - nra, j) else ?D $$ (i - nra, j - nca)))
i < dim_row A
dim_col A \<le> j
j < dim_col (two_block_non_interfering A B)
dim_row (two_block_non_interfering A B) = dim_row A + dim_row B
dim_col (two_block_non_interfering A B) = dim_col A + dim_col B

goal (1 subgoal):
 1. two_block_non_interfering A B $$ (i, j) = (0::'a) &&& two_block_non_interfering A B $$ (i, j) = (0::'a)
[PROOF STEP]
by auto


[STATEMENT]
lemma star_rtc3: "1 + x \<cdot> x = x \<longleftrightarrow> x = x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((1::'a) + x \<cdot> x = x) = (x = x\<^sup>\<star>)
[PROOF STEP]
by (metis order_refl star_plus_one star_rtc2 star_trans_eq)


[STATEMENT]
lemma \<phi>_left_support':
  "x \<in> {real_of_int (i - 1) / 2^(l + 1) .. real_of_int i / 2^(l + 1)} \<Longrightarrow> \<phi> (l,i) x = 1 + x * 2^(l + 1) - real_of_int i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> {real_of_int (i - 1) / 2 ^ (l + 1)..real_of_int i / 2 ^ (l + 1)} \<Longrightarrow> \<phi> (l, i) x = 1 + x * 2 ^ (l + 1) - real_of_int i
[PROOF STEP]
by (auto simp: \<phi>_def field_simps split: split_max)


[STATEMENT]
lemma theFTOne_Int_theNFTBoth[simp]:
"theFTOne cl dl \<inter> theNFTBoth cl dl = {}"
and "theNFTBoth cl dl \<inter> theFTOne cl dl = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. theFTOne cl dl \<inter> theNFTBoth cl dl = {} &&& theNFTBoth cl dl \<inter> theFTOne cl dl = {}
[PROOF STEP]
unfolding theFTOne_def theNFTBoth_def theFT_def theNFT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({n. n < length cl \<and> finished (cl ! n)} \<union> {n. n < length dl \<and> finished (dl ! n)}) \<inter> ({n. n < length cl \<and> \<not> finished (cl ! n)} \<inter> {n. n < length dl \<and> \<not> finished (dl ! n)}) = {} &&& {n. n < length cl \<and> \<not> finished (cl ! n)} \<inter> {n. n < length dl \<and> \<not> finished (dl ! n)} \<inter> ({n. n < length cl \<and> finished (cl ! n)} \<union> {n. n < length dl \<and> finished (dl ! n)}) = {}
[PROOF STEP]
by auto


[STATEMENT]
lemma "dist x y + dist x z \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> dist x y + dist x z
[PROOF STEP]
by metric_eisbach


[STATEMENT]
lemma (in finite_measure) measure_eq_compl:
  assumes "s \<in> sets M" "t \<in> sets M"
  assumes "measure M (space M - s) = measure M (space M - t)"
  shows "measure M s = measure M t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure M s = Sigma_Algebra.measure M t
[PROOF STEP]
using assms finite_measure_compl
[PROOF STATE]
proof (prove)
using this:
s \<in> sets M
t \<in> sets M
Sigma_Algebra.measure M (space M - s) = Sigma_Algebra.measure M (space M - t)
?S \<in> sets M \<Longrightarrow> Sigma_Algebra.measure M (space M - ?S) = Sigma_Algebra.measure M (space M) - Sigma_Algebra.measure M ?S

goal (1 subgoal):
 1. Sigma_Algebra.measure M s = Sigma_Algebra.measure M t
[PROOF STEP]
by auto


[STATEMENT]
lemma prv_cnjI:
assumes phi: "\<phi> \<in> fmla" and chi: "\<chi> \<in> fmla"
shows "prv \<phi> \<Longrightarrow> prv \<chi> \<Longrightarrow> prv (cnj \<phi> \<chi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>prv \<phi>; prv \<chi>\<rbrakk> \<Longrightarrow> prv (cnj \<phi> \<chi>)
[PROOF STEP]
by (meson cnj prv_imp_cnjI prv_imp_mp imp phi chi)


[STATEMENT]
lemma smult_minus_left [simp]: "smult (- a) p = - smult a p"
  for a :: "'a::comm_ring"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. smult (- a) p = - smult a p
[PROOF STEP]
by (rule poly_eqI) simp


[STATEMENT]
lemma Diff_FP: "A - (FP F) = (UN act: Acts F. A - {s. act``{s} <= {s}})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A - FP F = (\<Union>act\<in>Acts F. A - {s. act `` {s} \<subseteq> {s}})
[PROOF STEP]
by (simp add: Diff_eq Compl_FP)


[STATEMENT]
lemma it_paths_Union: "it_paths t \<subseteq> insert [] (Union (((\<lambda> (i,t). ((#) i) ` it_paths t) ` set (List.enumerate (0::nat) (children t)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. it_paths t \<subseteq> insert [] (\<Union>(i, t)\<in>set (enumerate 0 (children t)). (#) i ` it_paths t)
[PROOF STEP]
apply (rule)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> it_paths t \<Longrightarrow> x \<in> insert [] (\<Union>(i, t)\<in>set (enumerate 0 (children t)). (#) i ` it_paths t)
[PROOF STEP]
apply (erule it_paths_cases)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x ta. \<lbrakk>t = ta; x = []\<rbrakk> \<Longrightarrow> x \<in> insert [] (\<Union>(i, t)\<in>set (enumerate 0 (children t)). (#) i ` it_paths t)
 2. \<And>x i ta t' is. \<lbrakk>t = ta; x = i # is; i < length (children ta); children ta ! i = t'; is \<in> it_paths t'\<rbrakk> \<Longrightarrow> x \<in> insert [] (\<Union>(i, t)\<in>set (enumerate 0 (children t)). (#) i ` it_paths t)
[PROOF STEP]
apply (auto intro!: bexI simp add: in_set_enumerate_eq)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma le_fininf_lproject_visible:
      assumes "u \<preceq>\<^sub>F\<^sub>I v"
      shows "lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
obtain w where 1: "w \<le>\<^sub>F\<^sub>I v" "u \<preceq>\<^sub>F w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>w. \<lbrakk>w \<le>\<^sub>F\<^sub>I v; u \<preceq>\<^sub>F w\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
u \<preceq>\<^sub>F\<^sub>I v

goal (1 subgoal):
 1. (\<And>w. \<lbrakk>w \<le>\<^sub>F\<^sub>I v; u \<preceq>\<^sub>F w\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by rule
[PROOF STATE]
proof (state)
this:
w \<le>\<^sub>F\<^sub>I v
u \<preceq>\<^sub>F w

goal (1 subgoal):
 1. lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
have "lproject visible (llist_of u) \<le> lproject visible (llist_of w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lproject visible (llist_of u) \<le> lproject visible (llist_of w)
[PROOF STEP]
using le_fin_lproject_visible 1(2)
[PROOF STATE]
proof (prove)
using this:
?u \<preceq>\<^sub>F ?v \<Longrightarrow> lproject visible (llist_of ?u) \<le> lproject visible (llist_of ?v)
u \<preceq>\<^sub>F w

goal (1 subgoal):
 1. lproject visible (llist_of u) \<le> lproject visible (llist_of w)
[PROOF STEP]
by this
[PROOF STATE]
proof (state)
this:
lproject visible (llist_of u) \<le> lproject visible (llist_of w)

goal (1 subgoal):
 1. lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
lproject visible (llist_of u) \<le> lproject visible (llist_of w)

goal (1 subgoal):
 1. lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
have "\<dots> \<le> lproject visible (llist_of_stream v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lproject visible (llist_of w) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
using 1(1)
[PROOF STATE]
proof (prove)
using this:
w \<le>\<^sub>F\<^sub>I v

goal (1 subgoal):
 1. lproject visible (llist_of w) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
lproject visible (llist_of w) \<le> lproject visible (llist_of_stream v)

goal (1 subgoal):
 1. lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)

goal (1 subgoal):
 1. lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)
[PROOF STEP]
by this
[PROOF STATE]
proof (state)
this:
lproject visible (llist_of u) \<le> lproject visible (llist_of_stream v)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma substEnv_psubstEnv_compose:
assumes "goodEnv rho" and "good Y" and "goodEnv rho'"
shows "((rho &[rho']) &[Y / y]_ys) = (rho &[(rho' &[Y / y]_ys)])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rho &[rho'] &[Y / y]_ys = rho &[rho' &[Y / y]_ys]
[PROOF STEP]
unfolding substEnv_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rho &[rho'] &[idEnv [y \<leftarrow> Y]_ys] = rho &[rho' &[idEnv [y \<leftarrow> Y]_ys]]
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
goodEnv rho
good Y
goodEnv rho'

goal (1 subgoal):
 1. rho &[rho'] &[idEnv [y \<leftarrow> Y]_ys] = rho &[rho' &[idEnv [y \<leftarrow> Y]_ys]]
[PROOF STEP]
by(simp add: psubstEnv_compose)


[STATEMENT]
lemma sum_less_suminf: "summable f \<Longrightarrow> (\<And>m. m\<ge>n \<Longrightarrow> 0 < f m) \<Longrightarrow> sum f {..<n} < suminf f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>summable f; \<And>m. n \<le> m \<Longrightarrow> (0::'a) < f m\<rbrakk> \<Longrightarrow> sum f {..<n} < suminf f
[PROOF STEP]
using sum_less_suminf2[of n n]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>summable f; \<And>m. n \<le> m \<Longrightarrow> (0::'a) \<le> f m; n \<le> n; (0::'a) < f n\<rbrakk> \<Longrightarrow> sum f {..<n} < suminf f

goal (1 subgoal):
 1. \<lbrakk>summable f; \<And>m. n \<le> m \<Longrightarrow> (0::'a) < f m\<rbrakk> \<Longrightarrow> sum f {..<n} < suminf f
[PROOF STEP]
by (simp add: less_imp_le)


[STATEMENT]
lemma dual_ex: "(\<exists>x. P (dual x)) = (\<exists>x'. P x')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x. P (dual x)) = (\<exists>x'. P x')
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<exists>x. P (dual x)) = (\<exists>x'. P x')
[PROOF STEP]
have "(\<forall>x. \<not> P (dual x)) = (\<forall>x'. \<not> P x')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. \<not> P (dual x)) = (\<forall>x'. \<not> P x')
[PROOF STEP]
by (rule dual_all)
[PROOF STATE]
proof (state)
this:
(\<forall>x. \<not> P (dual x)) = (\<forall>x'. \<not> P x')

goal (1 subgoal):
 1. (\<exists>x. P (dual x)) = (\<exists>x'. P x')
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<forall>x. \<not> P (dual x)) = (\<forall>x'. \<not> P x')

goal (1 subgoal):
 1. (\<exists>x. P (dual x)) = (\<exists>x'. P x')
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<exists>x. P (dual x)) = (\<exists>x'. P x')

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Liminf_least: "(\<And>P. eventually P F \<Longrightarrow> (INF x\<in>Collect P. f x) \<le> x) \<Longrightarrow> Liminf F f \<le> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>P. eventually P F \<Longrightarrow> Inf (f ` Collect P) \<le> x) \<Longrightarrow> Liminf F f \<le> x
[PROOF STEP]
by (auto intro!: SUP_least simp: Liminf_def)


[STATEMENT]
lemma iT_Plus_iWeakUntil_conv: "(P t1. t1 \<W> t2 (I \<oplus> k). Q t2) = (P (t1 + k). t1 \<W> t2 I. Q (t2 + k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P t1. t1 \<W> t2 I \<oplus> k. Q t2) = (P (t1 + k). t1 \<W> t2 I. Q (t2 + k))
[PROOF STEP]
by (simp add: iWeakUntil_iUntil_conv iT_Plus_iUntil_conv iT_Plus_iAll_conv)


[STATEMENT]
lemma dim_gen_eigenspace_order_char_poly: assumes jnf: "jordan_nf A n_as"
  shows "dim_gen_eigenspace A lam k \<le> order lam (char_poly A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_gen_eigenspace A lam k \<le> order lam (char_poly A)
[PROOF STEP]
unfolding jordan_nf_order[OF jnf]  dim_gen_eigenspace[OF jnf]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (map (min k) (map fst (filter (\<lambda>(n, e). e = lam) n_as))) \<le> sum_list (map fst (filter (\<lambda>na. snd na = lam) n_as))
[PROOF STEP]
by (induct n_as, auto)


[STATEMENT]
lemma size_braun_adds:
  "\<lbrakk> braun t; size t = n \<rbrakk> \<Longrightarrow> size(adds xs n t) = size t + length xs \<and> braun (adds xs n t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>braun t; size t = n\<rbrakk> \<Longrightarrow> size (adds xs n t) = size t + length xs \<and> braun (adds xs n t)
[PROOF STEP]
by(induction xs arbitrary: t n)(auto simp: braun_add_hi size_add_hi)


[STATEMENT]
lemma norm_power_int: "norm (power_int x n) = power_int (norm x) n"
  for x :: "'a::real_normed_div_algebra"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (x powi n) = norm x powi n
[PROOF STEP]
by (cases n rule: int_cases4) (auto simp: norm_power power_int_minus norm_inverse)


[STATEMENT]
lemma lscan_llength[simp]: "llength (lscan f w a) = eSuc (llength w)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
proof (cases "lfinite w")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. lfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
 2. linfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
linfinite w

goal (2 subgoals):
 1. lfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
 2. linfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
have 1: "llength (lscan f w a) = \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. llength (lscan f w a) = \<infinity>
[PROOF STEP]
using not_lfinite_llength False
[PROOF STATE]
proof (prove)
using this:
linfinite ?xs \<Longrightarrow> llength ?xs = \<infinity>
linfinite w

goal (1 subgoal):
 1. llength (lscan f w a) = \<infinity>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
llength (lscan f w a) = \<infinity>

goal (2 subgoals):
 1. lfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
 2. linfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
have 2: "llength w = \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. llength w = \<infinity>
[PROOF STEP]
using not_lfinite_llength False
[PROOF STATE]
proof (prove)
using this:
linfinite ?xs \<Longrightarrow> llength ?xs = \<infinity>
linfinite w

goal (1 subgoal):
 1. llength w = \<infinity>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
llength w = \<infinity>

goal (2 subgoals):
 1. lfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
 2. linfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
using 1 2
[PROOF STATE]
proof (prove)
using this:
llength (lscan f w a) = \<infinity>
llength w = \<infinity>

goal (1 subgoal):
 1. llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
llength (lscan f w a) = eSuc (llength w)

goal (1 subgoal):
 1. lfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. lfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
lfinite w

goal (1 subgoal):
 1. lfinite w \<Longrightarrow> llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
using True
[PROOF STATE]
proof (prove)
using this:
lfinite w

goal (1 subgoal):
 1. llength (lscan f w a) = eSuc (llength w)
[PROOF STEP]
by (induct arbitrary: a, auto)
[PROOF STATE]
proof (state)
this:
llength (lscan f w a) = eSuc (llength w)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Group) cmp_rfn0:"\<lbrakk>0 < r; 0 < s; compseries G r f; compseries G s g;
 i \<le> (r - 1); j \<le> (s - 1)\<rbrakk> \<Longrightarrow> G \<guillemotright> f (Suc i) \<diamondop>\<^bsub>G\<^esub> ((f i ) \<inter> (g j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < r; 0 < s; compseries G r f; compseries G s g; i \<le> r - 1; j \<le> s - 1\<rbrakk> \<Longrightarrow> G \<guillemotright> f (Suc i) \<diamondop> f i \<inter> g j
[PROOF STEP]
apply (rule ZassenhausTr2_1[of "f i" "f (Suc i)" "g j"], simp,
       rule compseriesTr0[of "r" "f" "i"], assumption+,
       frule_tac le_less_trans[of i "r - Suc 0" r], simp+)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>0 < r; 0 < s; compseries G r f; compseries G s g; i \<le> r - Suc 0; j \<le> s - Suc 0\<rbrakk> \<Longrightarrow> G \<guillemotright> f (Suc i)
 2. \<lbrakk>0 < r; 0 < s; compseries G r f; compseries G s g; i \<le> r - 1; j \<le> s - 1\<rbrakk> \<Longrightarrow> G \<guillemotright> g j
 3. \<lbrakk>0 < r; 0 < s; compseries G r f; compseries G s g; i \<le> r - 1; j \<le> s - 1\<rbrakk> \<Longrightarrow> \<natural>f i \<triangleright> f (Suc i)
[PROOF STEP]
apply (rule compseriesTr0[of "r" "f" "Suc i"], assumption+, arith)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>0 < r; 0 < s; compseries G r f; compseries G s g; i \<le> r - 1; j \<le> s - 1\<rbrakk> \<Longrightarrow> G \<guillemotright> g j
 2. \<lbrakk>0 < r; 0 < s; compseries G r f; compseries G s g; i \<le> r - 1; j \<le> s - 1\<rbrakk> \<Longrightarrow> \<natural>f i \<triangleright> f (Suc i)
[PROOF STEP]
apply(rule compseriesTr0[of "s" "g" "j"], assumption+, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < r; 0 < s; compseries G r f; compseries G s g; i \<le> r - 1; j \<le> s - 1\<rbrakk> \<Longrightarrow> \<natural>f i \<triangleright> f (Suc i)
[PROOF STEP]
apply (frule compseries_is_tW_cmpser[of "r" "f"], assumption+,
       simp add:tW_cmpser_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma MGU_Fun:
  assumes "MGU \<theta> (Fun f X) (Fun g Y)"
  shows "f = g" "length X = length Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f = g &&& length X = length Y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f = g
 2. length X = length Y
[PROOF STEP]
let ?F = "\<lambda>\<theta> X. map (\<lambda>x. x \<cdot> \<theta>) X"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f = g
 2. length X = length Y
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
MGU \<theta> (Fun f X) (Fun g Y)
[PROOF STEP]
have
    "\<lbrakk>f = g; ?F \<theta> X = ?F \<theta> Y; \<forall>\<theta>'. f = g \<and> ?F \<theta>' X = ?F \<theta>' Y \<longrightarrow> \<theta> \<preceq>\<^sub>\<circ> \<theta>'\<rbrakk> \<Longrightarrow> length X = length Y"
[PROOF STATE]
proof (prove)
using this:
MGU \<theta> (Fun f X) (Fun g Y)

goal (1 subgoal):
 1. \<lbrakk>f = g; X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta> = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>; \<forall>\<theta>'. f = g \<and> X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' \<longrightarrow> \<theta> \<preceq>\<^sub>\<circ> \<theta>'\<rbrakk> \<Longrightarrow> length X = length Y
[PROOF STEP]
using map_eq_imp_length_eq
[PROOF STATE]
proof (prove)
using this:
MGU \<theta> (Fun f X) (Fun g Y)
map ?f ?xs = map ?g ?ys \<Longrightarrow> length ?xs = length ?ys

goal (1 subgoal):
 1. \<lbrakk>f = g; X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta> = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>; \<forall>\<theta>'. f = g \<and> X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' \<longrightarrow> \<theta> \<preceq>\<^sub>\<circ> \<theta>'\<rbrakk> \<Longrightarrow> length X = length Y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>f = g; X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta> = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>; \<forall>\<theta>'. f = g \<and> X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' \<longrightarrow> \<theta> \<preceq>\<^sub>\<circ> \<theta>'\<rbrakk> \<Longrightarrow> length X = length Y

goal (2 subgoals):
 1. f = g
 2. length X = length Y
[PROOF STEP]
thus "f = g" "length X = length Y"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f = g; X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta> = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>; \<forall>\<theta>'. f = g \<and> X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' \<longrightarrow> \<theta> \<preceq>\<^sub>\<circ> \<theta>'\<rbrakk> \<Longrightarrow> length X = length Y

goal (1 subgoal):
 1. f = g &&& length X = length Y
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f = g; X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta> = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>; \<forall>\<theta>'. f = g \<and> X \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' = Y \<cdot>\<^sub>l\<^sub>i\<^sub>s\<^sub>t \<theta>' \<longrightarrow> \<theta> \<preceq>\<^sub>\<circ> \<theta>'\<rbrakk> \<Longrightarrow> length X = length Y
MGU \<theta> (Fun f X) (Fun g Y)

goal (1 subgoal):
 1. f = g &&& length X = length Y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f = g
length X = length Y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma trigonometric_set_mul_integrable:
   "f absolutely_integrable_on {-pi..pi} \<Longrightarrow> integrable (lebesgue_on {-pi..pi}) (\<lambda>x. trigonometric_set n x * f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f absolutely_integrable_on {- pi..pi} \<Longrightarrow> integrable (lebesgue_on {- pi..pi}) (\<lambda>x. trigonometric_set n x * f x)
[PROOF STEP]
using trigonometric_set_mul_absolutely_integrable
[PROOF STATE]
proof (prove)
using this:
?f absolutely_integrable_on {- pi..pi} \<Longrightarrow> (\<lambda>x. trigonometric_set ?n x * ?f x) absolutely_integrable_on {- pi..pi}

goal (1 subgoal):
 1. f absolutely_integrable_on {- pi..pi} \<Longrightarrow> integrable (lebesgue_on {- pi..pi}) (\<lambda>x. trigonometric_set n x * f x)
[PROOF STEP]
by (simp add: integrable_restrict_space set_integrable_def)


[STATEMENT]
lemma gt_or_eq_0: "0 < y \<or> 0 = y"
  for y :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < y \<or> 0 = y
[PROOF STEP]
by arith


[STATEMENT]
lemma normalize_field:
  "normalize (x :: 'a :: {normalization_semidom,field}) = (if x = 0 then 0 else 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. normalize x = (if x = (0::'a) then 0::'a else (1::'a))
[PROOF STEP]
by (auto simp: normalize_1_iff dvd_field_iff)


[STATEMENT]
lemma add_diff_assoc_enat: "z \<le> y \<Longrightarrow> x + (y - z) = x + y - (z::enat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<le> y \<Longrightarrow> x + (y - z) = x + y - z
[PROOF STEP]
by(cases x)(auto simp add: diff_enat_def split: enat.split)


[STATEMENT]
lemma iMin_in_idem: "n \<in> I \<Longrightarrow> min n (iMin I) = iMin I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<in> I \<Longrightarrow> min n (iMin I) = iMin I
[PROOF STEP]
by (simp add: iMin_le min_eqR)


[STATEMENT]
lemma sup_comp: "(x \<squnion> y) * z = (x * z) \<squnion> (y * z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<squnion> y) * z = x * z \<squnion> y * z
[PROOF STEP]
apply (subgoal_tac "((x ^ o \<sqinter> y ^ o) * z ^ o) ^ o = ((x ^ o * z ^ o) \<sqinter> (y ^ o * z ^ o)) ^ o")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. (x ^ o \<sqinter> y ^ o * z ^ o) ^ o = (x ^ o * z ^ o \<sqinter> (y ^ o * z ^ o)) ^ o \<Longrightarrow> (x \<squnion> y) * z = x * z \<squnion> y * z
 2. (x ^ o \<sqinter> y ^ o * z ^ o) ^ o = (x ^ o * z ^ o \<sqinter> (y ^ o * z ^ o)) ^ o
[PROOF STEP]
apply (simp add: dual_inf dual_comp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x ^ o \<sqinter> y ^ o * z ^ o) ^ o = (x ^ o * z ^ o \<sqinter> (y ^ o * z ^ o)) ^ o
[PROOF STEP]
by (simp add: inf_comp)


[STATEMENT]
lemma lossless_elgamal_adversary:
  "\<lbrakk> ind_cpa.lossless \<A>; 0 < order \<G> \<rbrakk>
  \<Longrightarrow> ddh.lossless (elgamal_adversary \<A>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>local.ind_cpa.lossless \<A>; 0 < order \<G>\<rbrakk> \<Longrightarrow> local.ddh.lossless (elgamal_adversary \<A>)
[PROOF STEP]
by(cases \<A>)(simp add: ddh.lossless_def ind_cpa.lossless_def Let_def split_def)


[STATEMENT]
lemma finite_cosets_H: "finite (rcosets\<^bsub>G\<^esub> H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (rcosets\<^bsub>G\<^esub> H)
[PROOF STEP]
using rcosets_part_G[OF H.is_subgroup]
[PROOF STATE]
proof (prove)
using this:
\<Union> (rcosets\<^bsub>G\<^esub> H) = carrier G

goal (1 subgoal):
 1. finite (rcosets\<^bsub>G\<^esub> H)
[PROOF STEP]
by (auto intro: finite_UnionD)


[STATEMENT]
lemma inf_sup_distrib2_lgroup: "(b \<squnion> c) \<sqinter> a = (b \<sqinter> a) \<squnion> (c \<sqinter> a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (b \<squnion> c) \<sqinter> a = b \<sqinter> a \<squnion> c \<sqinter> a
[PROOF STEP]
by (rule inf_sup_distrib2)


[STATEMENT]
lemma ex_disj_distr: "((\<^bold>\<exists>x. P x) \<or> (\<^bold>\<exists>x. Q x)) = (\<^bold>\<exists>x. (P x \<or> Q x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<^bold>\<exists>x. P x) \<or> (\<^bold>\<exists>x. Q x)) = (\<^bold>\<exists>x. P x \<or> Q x)
[PROOF STEP]
by (rule ext) blast


[STATEMENT]
lemma [code]:
  "divmod m n = map_prod nat_of_integer nat_of_integer (divmod m n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. divmod m n = map_prod nat_of_integer nat_of_integer (divmod m n)
[PROOF STEP]
by (simp only: prod_eq_iff divmod_def map_prod_def case_prod_beta fst_conv snd_conv; transfer)
    (simp_all only: nat_div_distrib nat_mod_distrib
        zero_le_numeral nat_numeral)


[STATEMENT]
lemma sum_less_suminf: "summable f \<Longrightarrow> (\<And>m. m\<ge>n \<Longrightarrow> 0 < f m) \<Longrightarrow> sum f {..<n} < suminf f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>summable f; \<And>m. n \<le> m \<Longrightarrow> (0::'a) < f m\<rbrakk> \<Longrightarrow> sum f {..<n} < suminf f
[PROOF STEP]
using sum_less_suminf2[of n n]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>summable f; \<And>m. n \<le> m \<Longrightarrow> (0::'a) \<le> f m; n \<le> n; (0::'a) < f n\<rbrakk> \<Longrightarrow> sum f {..<n} < suminf f

goal (1 subgoal):
 1. \<lbrakk>summable f; \<And>m. n \<le> m \<Longrightarrow> (0::'a) < f m\<rbrakk> \<Longrightarrow> sum f {..<n} < suminf f
[PROOF STEP]
by (simp add: less_imp_le)


[STATEMENT]
lemma random_serial_dictatorship_support:
  assumes "finite agents" "finite alts" "agents' \<subseteq> agents" "alts' \<noteq> {}" "alts' \<subseteq> alts"
  shows   "set_pmf (random_serial_dictatorship agents' alts' R) \<subseteq> alts'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_pmf (random_serial_dictatorship agents' alts' R) \<subseteq> alts'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. set_pmf (random_serial_dictatorship agents' alts' R) \<subseteq> alts'
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
finite agents
finite alts
agents' \<subseteq> agents
alts' \<noteq> {}
alts' \<subseteq> alts
[PROOF STEP]
have [simp]: "finite agents'"
[PROOF STATE]
proof (prove)
using this:
finite agents
finite alts
agents' \<subseteq> agents
alts' \<noteq> {}
alts' \<subseteq> alts

goal (1 subgoal):
 1. finite agents'
[PROOF STEP]
by (auto intro: finite_subset)
[PROOF STATE]
proof (state)
this:
finite agents'

goal (1 subgoal):
 1. set_pmf (random_serial_dictatorship agents' alts' R) \<subseteq> alts'
[PROOF STEP]
have A: "set_pmf (pmf_of_set (rsd_winners R alts' agents'')) \<subseteq> alts'"
    if "agents'' \<in> permutations_of_set agents'" for agents''
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_pmf (pmf_of_set (rsd_winners R alts' agents'')) \<subseteq> alts'
[PROOF STEP]
using that assms rsd_winners_wf[where alts' = alts' and agents' = agents'']
[PROOF STATE]
proof (prove)
using this:
agents'' \<in> permutations_of_set agents'
finite agents
finite alts
agents' \<subseteq> agents
alts' \<noteq> {}
alts' \<subseteq> alts
set agents'' \<subseteq> agents \<Longrightarrow> rsd_winners R alts' agents'' \<subseteq> alts'
\<lbrakk>finite alts; alts' \<noteq> {}; set agents'' \<subseteq> agents; alts' \<subseteq> alts\<rbrakk> \<Longrightarrow> rsd_winners R alts' agents'' \<noteq> {}
\<lbrakk>set agents'' \<subseteq> agents; finite alts; alts' \<subseteq> alts\<rbrakk> \<Longrightarrow> finite (rsd_winners R alts' agents'')

goal (1 subgoal):
 1. set_pmf (pmf_of_set (rsd_winners R alts' agents'')) \<subseteq> alts'
[PROOF STEP]
by (auto simp: permutations_of_set_def)
[PROOF STATE]
proof (state)
this:
?agents'' \<in> permutations_of_set agents' \<Longrightarrow> set_pmf (pmf_of_set (rsd_winners R alts' ?agents'')) \<subseteq> alts'

goal (1 subgoal):
 1. set_pmf (random_serial_dictatorship agents' alts' R) \<subseteq> alts'
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
finite agents
finite alts
agents' \<subseteq> agents
alts' \<noteq> {}
alts' \<subseteq> alts
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite agents
finite alts
agents' \<subseteq> agents
alts' \<noteq> {}
alts' \<subseteq> alts

goal (1 subgoal):
 1. set_pmf (random_serial_dictatorship agents' alts' R) \<subseteq> alts'
[PROOF STEP]
by (auto dest!: A simp add: random_serial_dictatorship_altdef)
[PROOF STATE]
proof (state)
this:
set_pmf (random_serial_dictatorship agents' alts' R) \<subseteq> alts'

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma p1_has_derivative:
  shows "((\<lambda>x. p1 (fst x) (snd x)) has_derivative p1d x) (at x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. p1 (fst x) (snd x)) has_derivative p1d x) (at x)
[PROOF STEP]
unfolding p1_def p1d_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. - (21 / 34) - 69 * fst x / 38 + 19 * (fst x)\<^sup>2 / 15 - 9 * fst x ^ 3 / 28 - 6 * fst x ^ 4 / 43 + 14 * snd x / 29 + 31 * fst x * snd x / 21 + 182 * (fst x)\<^sup>2 * snd x / 47 - 35 * fst x ^ 3 * snd x / 16 - 3 * (snd x)\<^sup>2 / 17 - 2 * fst x * (snd x)\<^sup>2 / 9 - 31 * (fst x)\<^sup>2 * (snd x)\<^sup>2 / 20 + snd x ^ 3 / 102 + fst x * snd x ^ 3 / 59) has_derivative (\<lambda>xa. 38 * (fst xa * fst x) / 15 - 69 * fst xa / 38 - 27 * (fst xa * (fst x)\<^sup>2) / 28 - 24 * (fst xa * fst x ^ 3) / 43 + 14 * snd xa / 29 + (651 * (fst x * snd xa) + 651 * (fst xa * snd x)) / 441 + (8554 * ((fst x)\<^sup>2 * snd xa) + 17108 * (fst xa * (fst x * snd x))) / 2209 - (560 * (fst x ^ 3 * snd xa) + 1680 * (fst xa * ((fst x)\<^sup>2 * snd x))) / 256 - 6 * (snd xa * snd x) / 17 - (36 * (fst x * (snd xa * snd x)) + 18 * (fst xa * (snd x)\<^sup>2)) / 81 - (1240 * ((fst x)\<^sup>2 * (snd xa * snd x)) + 1240 * (fst xa * (fst x * (snd x)\<^sup>2))) / 400 + snd xa * (snd x)\<^sup>2 / 34 + (177 * (fst x * (snd xa * (snd x)\<^sup>2)) + fst xa * snd x ^ 3 * 59) / 3481)) (at x)
[PROOF STEP]
by (auto intro!: continuous_intros derivative_eq_intros)


[STATEMENT]
lemma Red_F_Sup_subset_Red_F_Liminf:
  "chain (\<rhd>) Ns \<Longrightarrow> Red_F (Sup_llist Ns) \<subseteq> Red_F (Liminf_llist Ns)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. chain (\<rhd>) Ns \<Longrightarrow> Red_F (Sup_llist Ns) \<subseteq> Red_F (Liminf_llist Ns)
[PROOF STEP]
by (metis Liminf_llist_subset_Sup_llist Red_in_Sup Un_absorb1 calculus.Red_F_of_Red_F_subset
      calculus_axioms double_diff sup_ge2)


[STATEMENT]
lemma circline_set_moebius_circline_iff [simp]:
  shows "moebius_pt M z \<in> circline_set (moebius_circline M H) \<longleftrightarrow>
         z \<in> circline_set H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (moebius_pt M z \<in> circline_set (moebius_circline M H)) = (z \<in> circline_set H)
[PROOF STEP]
using moebius_pt_eq_I[of M z]
[PROOF STATE]
proof (prove)
using this:
moebius_pt M z = moebius_pt M ?z2.0 \<Longrightarrow> z = ?z2.0

goal (1 subgoal):
 1. (moebius_pt M z \<in> circline_set (moebius_circline M H)) = (z \<in> circline_set H)
[PROOF STEP]
by auto


[STATEMENT]
lemma synth_Un: "synth(G) \<union> synth(H) \<subseteq> synth(G \<union> H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. synth G \<union> synth H \<subseteq> synth (G \<union> H)
[PROOF STEP]
by (intro Un_least synth_mono Un_upper1 Un_upper2)


[STATEMENT]
lemma card_N: "(n::N) \<in> ns \<Longrightarrow> card (ns - {n}) < card ns"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<in> ns \<Longrightarrow> card (ns - {n}) < card ns
[PROOF STEP]
by (metis finite_N Diff_UNIV Diff_infinite_finite card_Diff1_less finite.emptyI)


[STATEMENT]
lemma res_c2: "residuated f \<Longrightarrow> x \<le> y \<Longrightarrow> residual f (f x) \<le> residual f (f y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>residuated f; x \<le> y\<rbrakk> \<Longrightarrow> residual f (f x) \<le> residual f (f y)
[PROOF STEP]
by (metis local.order.refl local.order_trans residual_galois)


[STATEMENT]
lemma (in Group) mult_closed:"\<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow>
           a \<cdot> b \<in> carrier G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier G; b \<in> carrier G\<rbrakk> \<Longrightarrow> a \<cdot> b \<in> carrier G
[PROOF STEP]
apply (cut_tac top_closed)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> carrier G; b \<in> carrier G; (\<cdot>) \<in> carrier G \<rightarrow> carrier G \<rightarrow> carrier G\<rbrakk> \<Longrightarrow> a \<cdot> b \<in> carrier G
[PROOF STEP]
apply (frule funcset_mem[of "(\<cdot>)" "carrier G" "carrier G \<rightarrow> carrier G" "a"],
       assumption+,
       frule funcset_mem[of "(\<cdot>) a" "carrier G" "carrier G" "b"],
       assumption+ )
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma content_eq_fold_coeffs [code]: "content p = fold_coeffs gcd p 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content p = fold_coeffs gcd p (0::'a)
[PROOF STEP]
by (simp add: content_def Gcd_fin.set_eq_fold fold_coeffs_def foldr_fold fun_eq_iff ac_simps)


[STATEMENT]
lemma singleton_example_2:
     "\<forall>x \<in> S. \<Union>S \<subseteq> x \<Longrightarrow> \<exists>z. S \<subseteq> {z}"
  \<comment> \<open>Variant of the problem above.\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>S. \<Union> S \<subseteq> x \<Longrightarrow> \<exists>z. S \<subseteq> {z}
[PROOF STEP]
by blast


[STATEMENT]
lemma map_dual_def_var [simp]: "(map_dual::('a \<Rightarrow> 'b) \<Rightarrow> 'a dual \<Rightarrow> 'b dual) f = \<partial> \<circ> f \<circ> \<partial>\<^sup>-"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_dual f = \<partial> \<circ> f \<circ> \<partial>\<^sup>-
[PROOF STEP]
unfolding fun_eq_iff comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. map_dual f x = \<partial> (f (\<partial>\<^sup>- x))
[PROOF STEP]
by (metis dual.map_sel dual_iff)


[STATEMENT]
lemma nonneg_dirichlet_series_lnD:
  assumes "nonneg_dirichlet_series (fds_ln l f)" "exp l = fds_nth f (Suc 0)"
  shows   "nonneg_dirichlet_series f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nonneg_dirichlet_series f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. nonneg_dirichlet_series f
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
nonneg_dirichlet_series (fds_ln l f)
exp l = fds_nth f (Suc 0)
[PROOF STEP]
have "nonneg_dirichlet_series (fds_exp (fds_ln l f))"
[PROOF STATE]
proof (prove)
using this:
nonneg_dirichlet_series (fds_ln l f)
exp l = fds_nth f (Suc 0)

goal (1 subgoal):
 1. nonneg_dirichlet_series (fds_exp (fds_ln l f))
[PROOF STEP]
by (intro nonneg_dirichlet_series.nonneg_exp)
[PROOF STATE]
proof (state)
this:
nonneg_dirichlet_series (fds_exp (fds_ln l f))

goal (1 subgoal):
 1. nonneg_dirichlet_series f
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
nonneg_dirichlet_series (fds_exp (fds_ln l f))

goal (1 subgoal):
 1. nonneg_dirichlet_series f
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
nonneg_dirichlet_series (fds_exp (fds_ln l f))
nonneg_dirichlet_series (fds_ln l f)
exp l = fds_nth f (Suc 0)

goal (1 subgoal):
 1. nonneg_dirichlet_series f
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
nonneg_dirichlet_series f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mapM_mono [partial_function_mono]:
  fixes C :: "'a \<Rightarrow> ('b \<Rightarrow> 'c option) \<Rightarrow> 'd option"
  assumes C: "\<And>y. mono_option (C y)"
  shows "mono_option (\<lambda>f. mapM (\<lambda>y. C y f) B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) B)
[PROOF STEP]
proof (induct B)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) [])
 2. \<And>a B. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) B) \<Longrightarrow> monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) (a # B))
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) [])
 2. \<And>a B. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) B) \<Longrightarrow> monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) (a # B))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) [])
[PROOF STEP]
unfolding mapM.simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monotone option.le_fun option_ord (\<lambda>f. Some [])
[PROOF STEP]
by (rule option.const_mono)
[PROOF STATE]
proof (state)
this:
monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) [])

goal (1 subgoal):
 1. \<And>a B. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) B) \<Longrightarrow> monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) (a # B))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a B. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) B) \<Longrightarrow> monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) (a # B))
[PROOF STEP]
case (Cons b B)
[PROOF STATE]
proof (state)
this:
monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) B)

goal (1 subgoal):
 1. \<And>a B. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) B) \<Longrightarrow> monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) (a # B))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) (b # B))
[PROOF STEP]
unfolding mapM.simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monotone option.le_fun option_ord (\<lambda>f. C b f \<bind> (\<lambda>y. mapM (\<lambda>y. C y f) B \<bind> (\<lambda>ys. Some (y # ys))))
[PROOF STEP]
by (rule bind_mono [OF C bind_mono [OF Cons option.const_mono]])
[PROOF STATE]
proof (state)
this:
monotone option.le_fun option_ord (\<lambda>f. mapM (\<lambda>y. C y f) (b # B))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma q_ballI:
  assumes "x \<in> carrier Q\<^sub>p"
  assumes "ac n (x \<ominus> c) = k"
  assumes "(ord (x \<ominus> c)) = m"
  shows "x \<in> q_ball n k m c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> q_ball n k m c
[PROOF STEP]
using assms q_ball_def
[PROOF STATE]
proof (prove)
using this:
x \<in> carrier Q\<^sub>p
ac n (x \<ominus> c) = k
ord (x \<ominus> c) = m
q_ball ?n ?k ?m ?c = {x \<in> carrier Q\<^sub>p. ac ?n (x \<ominus> ?c) = ?k \<and> ord (x \<ominus> ?c) = ?m}

goal (1 subgoal):
 1. x \<in> q_ball n k m c
[PROOF STEP]
by blast


[STATEMENT]
lemma max_of_list_elem: "x \<in> set xs \<Longrightarrow> x \<le> (max_of_list xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> set xs \<Longrightarrow> x \<le> max_of_list xs
[PROOF STEP]
by (induct xs, auto intro: max.cobounded1 simp: le_max_iff_disj max_of_list_def)


[STATEMENT]
lemma closed_segment_Reals:
    "\<lbrakk>x \<in> Reals; y \<in> Reals\<rbrakk> \<Longrightarrow> closed_segment x y = of_real ` closed_segment (Re x) (Re y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> \<real>; y \<in> \<real>\<rbrakk> \<Longrightarrow> closed_segment x y = complex_of_real ` closed_segment (Re x) (Re y)
[PROOF STEP]
by (metis closed_segment_of_real of_real_Re)


[STATEMENT]
lemma primepow_odd_mult:
  assumes "d > Suc 0"
  shows   "primepow_odd (aprimedivisor d * d) \<longleftrightarrow> primepow_even d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. primepow_odd (aprimedivisor d * d) = primepow_even d
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
Suc 0 < d

goal (1 subgoal):
 1. primepow_odd (aprimedivisor d * d) = primepow_even d
[PROOF STEP]
by (auto simp: primepow_odd_altdef primepow_even_altdef primepow_mult_aprimedivisorI
                   aprimedivisor_primepow prime_aprimedivisor' aprimedivisor_dvd'
                   prime_elem_multiplicity_mult_distrib prime_elem_aprimedivisor_nat
             dest!: primepow_multD)


[STATEMENT]
lemma disjoint_family_disjointed: "disjoint_family (disjointed A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjoint_family (disjointed A)
[PROOF STEP]
by (simp add: disjoint_family_on_def)
     (metis neq_iff Int_commute less_disjoint_disjointed)


[STATEMENT]
lemma REV_PLUS: "REV (PLUS xs) = PLUS (map REV xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. REV (PLUS xs) = PLUS (map REV xs)
[PROOF STEP]
by (induct xs rule: list_singleton_induct) auto


[STATEMENT]
lemma cblinfun_image_INF_leq[simp]:
  fixes U :: "'b::complex_normed_vector \<Rightarrow>\<^sub>C\<^sub>L 'c::cbanach"
    and V :: "'a \<Rightarrow> 'b ccsubspace"
  shows \<open>U *\<^sub>S (INF i. V i) \<le> (INF i. U *\<^sub>S (V i))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. U *\<^sub>S \<Sqinter> range V \<le> (\<Sqinter>i. U *\<^sub>S V i)
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>U V. \<lbrakk>bounded_clinear U; pred_fun \<top> closed_csubspace V\<rbrakk> \<Longrightarrow> closure (U ` \<Inter> (range V)) \<subseteq> (\<Inter>i. closure (U ` V i))
[PROOF STEP]
by (simp add: INT_greatest Inter_lower closure_mono image_mono)


[STATEMENT]
lemma modelAppendTautology:
assumes
  "model valuation F" "clauseTautology c"
  "vars valuation \<supseteq> vars F \<union> vars c"
shows
  "model valuation (F @ [c])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. model valuation (F @ [c])
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
model valuation F
clauseTautology c
vars F \<union> vars c \<subseteq> vars valuation

goal (1 subgoal):
 1. model valuation (F @ [c])
[PROOF STEP]
using tautologyInTotalValuation[of "c" "valuation"]
[PROOF STATE]
proof (prove)
using this:
model valuation F
clauseTautology c
vars F \<union> vars c \<subseteq> vars valuation
\<lbrakk>clauseTautology c; vars c \<subseteq> vars valuation\<rbrakk> \<Longrightarrow> clauseTrue c valuation

goal (1 subgoal):
 1. model valuation (F @ [c])
[PROOF STEP]
by (auto simp add: formulaTrueAppend)


[STATEMENT]
lemma set_rel_sv[relator_props]:
  "single_valued R \<Longrightarrow> single_valued (\<langle>R\<rangle>set_rel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. single_valued R \<Longrightarrow> single_valued (\<langle>R\<rangle>set_rel)
[PROOF STEP]
unfolding single_valued_def set_rel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. (x, y) \<in> R \<longrightarrow> (\<forall>z. (x, z) \<in> R \<longrightarrow> y = z) \<Longrightarrow> \<forall>x y. (x, y) \<in> {(A, B). (\<forall>x\<in>A. \<exists>y\<in>B. (x, y) \<in> R) \<and> (\<forall>y\<in>B. \<exists>x\<in>A. (x, y) \<in> R)} \<longrightarrow> (\<forall>z. (x, z) \<in> {(A, B). (\<forall>x\<in>A. \<exists>y\<in>B. (x, y) \<in> R) \<and> (\<forall>y\<in>B. \<exists>x\<in>A. (x, y) \<in> R)} \<longrightarrow> y = z)
[PROOF STEP]
by blast


[STATEMENT]
lemma LS_acyclic_code[code] :
  "LS_acyclic M q = image p_io (acyclic_paths_up_to_length M q (size M - 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LS_acyclic M q = p_io ` acyclic_paths_up_to_length M q (FSM.size M - 1)
[PROOF STEP]
unfolding acyclic_paths_set LS_acyclic_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {p_io p |p. path M q p \<and> distinct (visited_states q p)} = p_io ` {p. path M q p \<and> distinct (visited_states q p)}
[PROOF STEP]
by blast


[STATEMENT]
lemma array_get_set_iff: "i<array_length a \<Longrightarrow>
  array_get (array_set a i x) j = (if i=j then x else array_get a j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i < array_length a \<Longrightarrow> array_get (array_set a i x) j = (if i = j then x else array_get a j)
[PROOF STEP]
by (auto simp: array_get_array_set_other)


[STATEMENT]
lemma independent_insertI: "a \<notin> span S \<Longrightarrow> independent S \<Longrightarrow> independent (insert a S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<notin> span S; independent S\<rbrakk> \<Longrightarrow> independent (insert a S)
[PROOF STEP]
by (auto dest: dependent_insertD)


[STATEMENT]
lemma 06: \<open>\<turnstile> (p \<rightarrow> q) \<rightarrow> ((p \<rightarrow> r) \<rightarrow> s) \<rightarrow> (q \<rightarrow> r) \<rightarrow> s\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> (p \<rightarrow> q) \<rightarrow> ((p \<rightarrow> r) \<rightarrow> s) \<rightarrow> (q \<rightarrow> r) \<rightarrow> s
[PROOF STEP]
using MP 04 01
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<turnstile> ?p \<rightarrow> ?q; \<turnstile> ?p\<rbrakk> \<Longrightarrow> \<turnstile> ?q
\<turnstile> (((?q \<rightarrow> ?r) \<rightarrow> ?p \<rightarrow> ?r) \<rightarrow> ?s) \<rightarrow> (?p \<rightarrow> ?q) \<rightarrow> ?s
\<turnstile> (?p \<rightarrow> ?q) \<rightarrow> (?q \<rightarrow> ?r) \<rightarrow> ?p \<rightarrow> ?r

goal (1 subgoal):
 1. \<turnstile> (p \<rightarrow> q) \<rightarrow> ((p \<rightarrow> r) \<rightarrow> s) \<rightarrow> (q \<rightarrow> r) \<rightarrow> s
[PROOF STEP]
.


[STATEMENT]
lemma and_mask_wi: "word_of_int i AND mask n = word_of_int (take_bit n i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. word_of_int i AND mask n = word_of_int (take_bit n i)
[PROOF STEP]
by (simp add: take_bit_eq_mask of_int_and_eq of_int_mask_eq)


[STATEMENT]
lemma TOTAL_subseteq_LIM: "TOTAL \<subseteq> LIM"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. TOTAL \<subseteq> LIM
[PROOF STEP]
unfolding TOTAL_def Lim_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {U. \<exists>\<psi> s. learn_total \<psi> U s} \<subseteq> {U. \<exists>\<psi> s. learn_lim \<psi> U s}
[PROOF STEP]
using learn_total_def
[PROOF STATE]
proof (prove)
using this:
learn_total ?\<psi> ?U ?s \<equiv> learn_lim ?\<psi> ?U ?s \<and> (\<forall>f\<in>?U. \<forall>n. ?\<psi> (the (?s (f \<triangleright> n))) \<in> \<R>)

goal (1 subgoal):
 1. {U. \<exists>\<psi> s. learn_total \<psi> U s} \<subseteq> {U. \<exists>\<psi> s. learn_lim \<psi> U s}
[PROOF STEP]
by auto


[STATEMENT]
lemma mset_merge_pairs: "mset_heap (merge_pairs hs) = sum_mset(image_mset mset_heap(mset hs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mset_heap (merge_pairs hs) = \<Sum>\<^sub># (image_mset mset_heap (mset hs))
[PROOF STEP]
by(induction hs rule: merge_pairs.induct)(auto simp: mset_merge)


[STATEMENT]
lemma diff_union_swap_zmset: "add_zmset b (M - {#a#}\<^sub>z) = add_zmset b M - {#a#}\<^sub>z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. add_zmset b (M - {#a#}\<^sub>z) = add_zmset b M - {#a#}\<^sub>z
[PROOF STEP]
by (auto simp add: zmultiset_eq_iff)


[STATEMENT]
lemma all_final_except_mono [mono]:
  "(\<And>x. x \<in> A \<longrightarrow> x \<in> B) \<Longrightarrow> all_final_except ts A \<longrightarrow> all_final_except ts B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> A \<longrightarrow> x \<in> B) \<Longrightarrow> all_final_except ts A \<longrightarrow> all_final_except ts B
[PROOF STEP]
by(auto simp add: all_final_except_def)


[STATEMENT]
lemma zimage_iff: "zin y (zimage f A) = (\<exists>x. zin x A \<and> y = f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zin y (zimage f A) = (\<exists>x. zin x A \<and> y = f x)
[PROOF STEP]
by (auto simp add: zin_def Rep_zimage_eq)


[STATEMENT]
lemma InfCard_not_0[iff]: "\<not> InfCard 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> InfCard 0
[PROOF STEP]
by (simp add: InfCard_iff)


[STATEMENT]
lemma Keys_full_gb:
  "Keys (fst ` set (full_gb bs)) = (\<lambda>v. term_of_pair (0, component_of_term v)) ` Keys (fst ` set bs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Keys (fst ` set (full_gb bs)) = (\<lambda>v. term_of_pair (0::'a, component_of_term v)) ` Keys (fst ` set bs)
[PROOF STEP]
by (auto simp add: fst_set_full_gb Keys_def image_image)