[STATEMENT]
lemma "fill_l4_protocol_raw TCP [Neg (Dst (IpAddrNetmask (ipv4addr_of_dotdecimal (127, 0, 0, 0)) 8)), Pos (Src_Ports (L4Ports 0 [(22,22)]))] =
          [Neg (Dst (IpAddrNetmask 0x7F000000 8)), Pos (Src_Ports (L4Ports 6 [(0x16, 0x16)]))]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fill_l4_protocol_raw TCP [Neg (Dst (IpAddrNetmask (ipv4addr_of_dotdecimal (127, 0, 0, 0)) 8)), Pos (Src_Ports (L4Ports 0 [(22, 22)]))] = [Neg (Dst (IpAddrNetmask 2130706432 8)), Pos (Src_Ports (L4Ports 6 [(22, 22)]))]
[PROOF STEP]
by eval


[STATEMENT]
lemma size_cnf_formula15: "sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m
[PROOF STEP]
have "sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> sum_list (map size_cnf (cnf_formula14 n m)) + 3 * n * m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> sum_list (map size_cnf (cnf_formula14 n m)) + 3 * n * m
[PROOF STEP]
unfolding cnf_encoder.formula15_def Let_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (map size_cnf (List.maps (\<lambda>i. List.maps (\<lambda>j. if cs i j \<and> cns i j then [] else [cnf_encodeGammaCond (Gamma i j) (Epsilon i) (cs i j) (cns i j)]) [0..<m]) [0..<n] @ cnf_formula14 n m)) \<le> sum_list (map size_cnf (cnf_formula14 n m)) + 3 * n * m
[PROOF STEP]
apply (simp add: size_list_conv_sum_list List.maps_def map_concat o_def length_concat sum_list_triv sum_list_concat algebra_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>x\<leftarrow>[0..<n]. \<Sum>xa\<leftarrow>[0..<m]. sum_list (map size_cnf (if cs x xa \<and> cns x xa then [] else [cnf_encodeGammaCond (Gamma x xa) (Epsilon x) (cs x xa) (cns x xa)]))) \<le> m * (n * 3)
[PROOF STEP]
apply (rule le_trans, rule sum_list_mono_const[OF _ refl], rule sum_list_mono_const[OF _ refl, of _ _ 3])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. \<lbrakk>x \<in> set [0..<n]; xa \<in> set [0..<m]\<rbrakk> \<Longrightarrow> sum_list (map size_cnf (if cs x xa \<and> cns x xa then [] else [cnf_encodeGammaCond (Gamma x xa) (Epsilon x) (cs x xa) (cns x xa)])) \<le> 3
 2. length [0..<n] * (length [0..<m] * 3) \<le> m * (n * 3)
[PROOF STEP]
by (auto simp: size_cnf_encodeGammaCond)
[PROOF STATE]
proof (state)
this:
sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> sum_list (map size_cnf (cnf_formula14 n m)) + 3 * n * m

goal (1 subgoal):
 1. sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> sum_list (map size_cnf (cnf_formula14 n m)) + 3 * n * m

goal (1 subgoal):
 1. sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m
[PROOF STEP]
have "\<dots> \<le> (2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42)) + 3 * n * m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list (map size_cnf (cnf_formula14 n m)) + 3 * n * m \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m
[PROOF STEP]
by (rule add_right_mono[OF size_cnf_formula14])
[PROOF STATE]
proof (state)
this:
sum_list (map size_cnf (cnf_formula14 n m)) + 3 * n * m \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m

goal (1 subgoal):
 1. sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m

goal (1 subgoal):
 1. sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
sum_list (map size_cnf (cnf_formula15 cs cns n m)) \<le> 2 * m + 4 * n + m * (26 * n - 42) + n * (26 * m - 42) + 3 * n * m

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eoutKnowsECorrect_L1:
assumes "eoutKnowsECorrect C e"
       and "eout  C e"
shows "(\<exists> k. e = (kE k) \<and> (k \<in> specKeys C)) \<or>
            (\<exists> s. e = (sE s) \<and> (s \<in> specSecrets C)) \<or>
            (knows C [e])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>k. e = kE k \<and> k \<in> specKeys C) \<or> (\<exists>s. e = sE s \<and> s \<in> specSecrets C) \<or> knows C [e]
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
eoutKnowsECorrect C e
eout C e

goal (1 subgoal):
 1. (\<exists>k. e = kE k \<and> k \<in> specKeys C) \<or> (\<exists>s. e = sE s \<and> s \<in> specSecrets C) \<or> knows C [e]
[PROOF STEP]
by (metis eoutKnowsECorrect_def)


[STATEMENT]
lemma is_aligned_no_overflow'':
  "\<lbrakk>is_aligned x n; x + 2 ^ n \<noteq> 0\<rbrakk> \<Longrightarrow> x \<le> x + 2 ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>is_aligned x n; x + 2 ^ n \<noteq> 0\<rbrakk> \<Longrightarrow> x \<le> x + 2 ^ n
[PROOF STEP]
apply (frule is_aligned_no_overflow')
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>is_aligned x n; x + 2 ^ n \<noteq> 0; x \<le> x + (2 ^ n - 1)\<rbrakk> \<Longrightarrow> x \<le> x + 2 ^ n
[PROOF STEP]
apply (erule order_trans)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>is_aligned x n; x + 2 ^ n \<noteq> 0\<rbrakk> \<Longrightarrow> x + (2 ^ n - 1) \<le> x + 2 ^ n
[PROOF STEP]
apply (simp add: field_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>is_aligned x n; x + 2 ^ n \<noteq> 0\<rbrakk> \<Longrightarrow> x + 2 ^ n - 1 \<le> x + 2 ^ n
[PROOF STEP]
apply (erule word_sub_1_le)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma "x \<le> 42 \<Longrightarrow> x \<le> 89"
  for x :: "8 word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<le> 42 \<Longrightarrow> x \<le> 89
[PROOF STEP]
apply word_bitwise
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> bit x 7 \<and> \<not> bit x 6 \<and> (bit x 5 \<longrightarrow> \<not> bit x 4 \<and> (bit x 3 \<longrightarrow> \<not> bit x 2 \<and> (bit x 1 \<longrightarrow> \<not> bit x 0))) \<Longrightarrow> \<not> bit x 7 \<and> (bit x 6 \<longrightarrow> \<not> bit x 5 \<and> (bit x 3 \<longrightarrow> bit x 4 \<longrightarrow> \<not> bit x 2 \<and> \<not> bit x 1))
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma DERIV_neg_imp_decreasing:
  fixes a b :: real and f :: "real \<Rightarrow> real"
  assumes "a < b"
    and der: "\<And>x. \<lbrakk>a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> \<exists>y. DERIV f x :> y \<and> y < 0"
  shows "f a > f b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f b < f a
[PROOF STEP]
by (metis less_le_not_le DERIV_atLeastAtMost_imp_continuous_on DERIV_neg_imp_decreasing_open [OF \<open>a < b\<close>] der)


[STATEMENT]
lemma UN_set_partition_by:
  "sum_list ys = length xs \<Longrightarrow> (\<Union>zs \<in> set (partition_by xs ys). \<Union>x \<in> set zs. f x) = (\<Union>x \<in> set xs. f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum_list ys = length xs \<Longrightarrow> (\<Union>zs\<in>set (partition_by xs ys). \<Union> (f ` set zs)) = \<Union> (f ` set xs)
[PROOF STEP]
by (induct ys arbitrary: xs) (simp_all, metis UN_Un append_take_drop_id set_append)


[STATEMENT]
lemma disjoint_alt_simp1: "A-B = A \<longleftrightarrow> A\<inter>B = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A - B = A) = (A \<inter> B = {})
[PROOF STEP]
by auto


[STATEMENT]
lemma (in Order) S_inductive_sup_mem:"\<lbrakk>S_inductive_set D; Chain D X\<rbrakk> \<Longrightarrow>
                             Sup D X \<in> carrier D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S_inductive_set D; Chain D X\<rbrakk> \<Longrightarrow> Algebra2.Sup D X \<in> carrier D
[PROOF STEP]
apply (frule_tac  X = X in S_inductive_sup, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S_inductive_set D; Chain D X; minimum_elem D (upper_bounds D X) (Algebra2.Sup D X)\<rbrakk> \<Longrightarrow> Algebra2.Sup D X \<in> carrier D
[PROOF STEP]
apply (simp add:minimum_elem_def, (erule conjE)+,
       simp add:upper_bounds_def, simp add:upper_bound_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma is_image_spec_col_cong:
  assumes "P P' ReflectL A B" and
    "Col A B X"
  shows "Cong P X P' X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Cong P X P' X
[PROOF STEP]
by (metis Col_def Reflect_def assms(1) assms(2) between_trivial col__refl cong_reflexivity is_image_col_cong l10_6_uniqueness_spec)


[STATEMENT]
lemma INF_seq_distrib: "(\<Sqinter>c\<in>C. f c) ; d = (\<Sqinter>c\<in>C. f c ; d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sqinter> (f ` C) ; d = (\<Sqinter>c::'b\<in>C. f c ; d)
variables:
d :: 'a
C :: 'b set
f :: 'b \<Rightarrow> 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
'b :: type
[PROOF STEP]
using Inf_seq_distrib
[PROOF STATE]
proof (prove)
using this:
\<Sqinter> (?C::'a::refinement_lattice set) ; (?d::'a::refinement_lattice) = (\<Sqinter>c::'a::refinement_lattice\<in>?C. c ; ?d)

goal (1 subgoal):
 1. \<Sqinter> (f ` C) ; d = (\<Sqinter>c::'b\<in>C. f c ; d)
variables:
d :: 'a
C :: 'b set
f :: 'b \<Rightarrow> 'a
(;) :: 'a \<Rightarrow> 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
'b :: type
[PROOF STEP]
by (auto simp add: image_comp)


[STATEMENT]
lemma \<a>_nonempty:
  assumes "valid_decomp X ps" and "standard_decomp k ps" and "ps\<^sub>+ \<noteq> []"
  shows "\<a> ps = Min (poly_deg ` fst ` set (ps\<^sub>+))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<a> ps = Min (poly_deg ` fst ` set (ps\<^sub>+))
[PROOF STEP]
using fin_X assms(1) _ assms(3)
[PROOF STATE]
proof (prove)
using this:
finite X
valid_decomp X ps
PROP ?psi \<Longrightarrow> PROP ?psi
ps\<^sub>+ \<noteq> []

goal (1 subgoal):
 1. \<a> ps = Min (poly_deg ` fst ` set (ps\<^sub>+))
[PROOF STEP]
proof (rule standard_decomp_nonempty_unique)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. standard_decomp (\<a> ps) ps
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
standard_decomp k ps
[PROOF STEP]
show "standard_decomp (\<a> ps) ps"
[PROOF STATE]
proof (prove)
using this:
standard_decomp k ps

goal (1 subgoal):
 1. standard_decomp (\<a> ps) ps
[PROOF STEP]
by (rule \<a>)
[PROOF STATE]
proof (state)
this:
standard_decomp (\<a> ps) ps

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma enn_decreasing_sum_le_set_nn_integral:
  fixes f :: "real \<Rightarrow> ennreal"
  assumes decreasing: "\<And>x y. 0 \<le> x \<Longrightarrow> x \<le> y \<Longrightarrow> f y \<le> f x"
  shows "(\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
have "(\<Sum>n. (f (Suc n))) =
          (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. (f (Suc n)) \<partial>lborel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) = (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (Suc n))\<partial>lborel)
[PROOF STEP]
by (subst nn_integral_cmult_indicator) auto
[PROOF STATE]
proof (state)
this:
(\<Sum>n. f (real (Suc n))) = (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (Suc n))\<partial>lborel)

goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>n. f (real (Suc n))) = (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (Suc n))\<partial>lborel)

goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
have "nat \<lceil>x\<rceil> = Suc n" if "x \<in> {real n<..real (Suc n)}" for x n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nat \<lceil>x\<rceil> = Suc n
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<in> {real n<..real (Suc n)}

goal (1 subgoal):
 1. nat \<lceil>x\<rceil> = Suc n
[PROOF STEP]
by (auto simp: nat_eq_iff ceiling_eq_iff)
[PROOF STATE]
proof (state)
this:
?x \<in> {real ?n<..real (Suc ?n)} \<Longrightarrow> nat \<lceil>?x\<rceil> = Suc ?n

goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
hence "(\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. (f (Suc n)) \<partial>lborel) =
          (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. (f (real (nat \<lceil>x\<rceil>))) \<partial>lborel)"
[PROOF STATE]
proof (prove)
using this:
?x \<in> {real ?n<..real (Suc ?n)} \<Longrightarrow> nat \<lceil>?x\<rceil> = Suc ?n

goal (1 subgoal):
 1. (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (Suc n))\<partial>lborel) = (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (nat \<lceil>x\<rceil>))\<partial>lborel)
[PROOF STEP]
by (intro suminf_cong nn_integral_cong) (auto simp: indicator_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (Suc n))\<partial>lborel) = (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (nat \<lceil>x\<rceil>))\<partial>lborel)

goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (Suc n))\<partial>lborel) = (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (nat \<lceil>x\<rceil>))\<partial>lborel)

goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
have "\<dots> = (\<integral>\<^sup>+x\<in>(\<Union>i. {real i<..real (Suc i)}). (f (nat \<lceil>x::real\<rceil>)) \<partial>lborel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (nat \<lceil>x\<rceil>))\<partial>lborel) = \<integral>\<^sup>+x\<in>(\<Union>i. {real i<..real (Suc i)}). f (real (nat \<lceil>x\<rceil>))\<partial>lborel
[PROOF STEP]
by (subst nn_integral_disjoint_family)
       (auto simp: disjoint_family_on_def)
[PROOF STATE]
proof (state)
this:
(\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (nat \<lceil>x\<rceil>))\<partial>lborel) = \<integral>\<^sup>+x\<in>(\<Union>i. {real i<..real (Suc i)}). f (real (nat \<lceil>x\<rceil>))\<partial>lborel

goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>n. \<integral>\<^sup>+x\<in>{real n<..real (Suc n)}. f (real (nat \<lceil>x\<rceil>))\<partial>lborel) = \<integral>\<^sup>+x\<in>(\<Union>i. {real i<..real (Suc i)}). f (real (nat \<lceil>x\<rceil>))\<partial>lborel

goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
have "\<dots> \<le> (\<integral>\<^sup>+x\<in>{0..}. (f x) \<partial>lborel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+x\<in>(\<Union>i. {real i<..real (Suc i)}). f (real (nat \<lceil>x\<rceil>))\<partial>lborel \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
by (intro nn_integral_mono) (auto simp: indicator_def intro!: decreasing)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+x\<in>(\<Union>i. {real i<..real (Suc i)}). f (real (nat \<lceil>x\<rceil>))\<partial>lborel \<le> set_nn_integral lborel {0..} f

goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f

goal (1 subgoal):
 1. (\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>n. f (real (Suc n))) \<le> set_nn_integral lborel {0..} f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Infinitesimal_hcnj_iff [simp]:
  "(hcnj z \<in> Infinitesimal) \<longleftrightarrow> (z \<in> Infinitesimal)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (hcnj z \<in> Infinitesimal) = (z \<in> Infinitesimal)
[PROOF STEP]
by (simp add: Infinitesimal_hcmod_iff)


[STATEMENT]
lemma z_in_interval: "\<lbrakk>z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r\<rbrakk> \<Longrightarrow> z \<in> intY1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z \<in> P; \<forall>y\<in>Y. (y, z) \<in> induced P r\<rbrakk> \<Longrightarrow> z \<in> intY1
[PROOF STEP]
unfolding intY1_def P_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z \<in> fix f A; \<forall>y\<in>Y. (y, z) \<in> induced (fix f A) r\<rbrakk> \<Longrightarrow> z \<in> interval r (lub Y cl) (Top cl)
[PROOF STEP]
by (meson Top_prop Y_subset_A fix_subset in_mono indE intervalI lub_least)


[STATEMENT]
lemma bitNOT_integer_code [code]:
  fixes i :: integer shows
  "NOT i = - i - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NOT i = - i - 1
[PROOF STEP]
by transfer (simp add: not_int_def)


[STATEMENT]
lemma RM_1_b[PLM]:
    "(\<And>v.[\<chi> in v] \<Longrightarrow> [\<phi> \<^bold>\<rightarrow> \<psi> in v]) \<Longrightarrow> ([\<^bold>\<box>\<chi> in v] \<Longrightarrow> [\<^bold>\<box>\<phi> \<^bold>\<rightarrow> \<^bold>\<box>\<psi> in v])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>v. [\<chi> in v] \<Longrightarrow> [\<phi> \<^bold>\<rightarrow> \<psi> in v]; [\<^bold>\<box>\<chi> in v]\<rbrakk> \<Longrightarrow> [\<^bold>\<box>\<phi> \<^bold>\<rightarrow> \<^bold>\<box>\<psi> in v]
[PROOF STEP]
using RN_2 qml_1[axiom_instance] vdash_properties_10
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>v. [?\<psi> in v] \<Longrightarrow> [?\<phi> in v]; [\<^bold>\<box>?\<psi> in ?v]\<rbrakk> \<Longrightarrow> [\<^bold>\<box>?\<phi> in ?v]
[\<^bold>\<box>(?\<phi>1 \<^bold>\<rightarrow> ?\<psi>1) \<^bold>\<rightarrow> (\<^bold>\<box>?\<phi>1 \<^bold>\<rightarrow> \<^bold>\<box>?\<psi>1) in ?v]
\<lbrakk>[?\<phi> \<^bold>\<rightarrow> ?\<psi> in ?v]; [?\<phi> in ?v]\<rbrakk> \<Longrightarrow> [?\<psi> in ?v]

goal (1 subgoal):
 1. \<lbrakk>\<And>v. [\<chi> in v] \<Longrightarrow> [\<phi> \<^bold>\<rightarrow> \<psi> in v]; [\<^bold>\<box>\<chi> in v]\<rbrakk> \<Longrightarrow> [\<^bold>\<box>\<phi> \<^bold>\<rightarrow> \<^bold>\<box>\<psi> in v]
[PROOF STEP]
by blast


[STATEMENT]
theorem data_refinement_choice2:
  "mono D \<Longrightarrow> DataRefinement S1 D D' S2 \<Longrightarrow> DataRefinement S1' D D' S2' \<Longrightarrow>
     DataRefinement (S1 \<sqinter> S1') D D' (S2 \<sqinter> S2')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>mono D; DataRefinement S1 D D' S2; DataRefinement S1' D D' S2'\<rbrakk> \<Longrightarrow> DataRefinement (S1 \<sqinter> S1') D D' (S2 \<sqinter> S2')
[PROOF STEP]
apply (simp add: DataRefinement_def inf_fun_def le_fun_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> \<forall>x. D (S1 x \<sqinter> S1' x) \<sqsubseteq> S2 (D' x) \<and> D (S1 x \<sqinter> S1' x) \<sqsubseteq> S2' (D' x)
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1 x \<sqinter> S1' x) \<sqsubseteq> S2 (D' x)
 2. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1 x \<sqinter> S1' x) \<sqsubseteq> S2' (D' x)
[PROOF STEP]
apply (rule_tac y = "D (S1 x)" in order_trans)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1 x \<sqinter> S1' x) \<sqsubseteq> D (S1 x)
 2. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1 x) \<sqsubseteq> S2 (D' x)
 3. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1 x \<sqinter> S1' x) \<sqsubseteq> S2' (D' x)
[PROOF STEP]
apply (drule_tac x = "S1 x \<sqinter> S1' x" and y = "S1 x" in monoD)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x. \<lbrakk>\<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> S1 x \<sqinter> S1' x \<sqsubseteq> S1 x
 2. \<And>x. \<lbrakk>\<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x); D (S1 x \<sqinter> S1' x) \<sqsubseteq> D (S1 x)\<rbrakk> \<Longrightarrow> D (S1 x \<sqinter> S1' x) \<sqsubseteq> D (S1 x)
 3. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1 x) \<sqsubseteq> S2 (D' x)
 4. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1 x \<sqinter> S1' x) \<sqsubseteq> S2' (D' x)
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1 x \<sqinter> S1' x) \<sqsubseteq> S2' (D' x)
[PROOF STEP]
apply (rule_tac y = "D (S1' x)" in order_trans)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1 x \<sqinter> S1' x) \<sqsubseteq> D (S1' x)
 2. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1' x) \<sqsubseteq> S2' (D' x)
[PROOF STEP]
apply (drule_tac x = "S1 x \<sqinter> S1' x" and y = "S1' x" in monoD)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x. \<lbrakk>\<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> S1 x \<sqinter> S1' x \<sqsubseteq> S1' x
 2. \<And>x. \<lbrakk>\<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x); D (S1 x \<sqinter> S1' x) \<sqsubseteq> D (S1' x)\<rbrakk> \<Longrightarrow> D (S1 x \<sqinter> S1' x) \<sqsubseteq> D (S1' x)
 3. \<And>x. \<lbrakk>mono D; \<forall>x. D (S1 x) \<sqsubseteq> S2 (D' x); \<forall>x. D (S1' x) \<sqsubseteq> S2' (D' x)\<rbrakk> \<Longrightarrow> D (S1' x) \<sqsubseteq> S2' (D' x)
[PROOF STEP]
by simp_all


[STATEMENT]
lemma int_shiftl_One_numeral [simp]:
  "push_bit (numeral w) (1::int) = push_bit (pred_numeral w) 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. push_bit (numeral w) 1 = push_bit (pred_numeral w) 2
[PROOF STEP]
using int_shiftl_numeral [of Num.One w]
[PROOF STATE]
proof (prove)
using this:
push_bit Numeral1 (numeral w) = push_bit (pred_numeral num.One) (numeral (num.Bit0 w))
push_bit Numeral1 (- numeral w) = push_bit (pred_numeral num.One) (- numeral (num.Bit0 w))

goal (1 subgoal):
 1. push_bit (numeral w) 1 = push_bit (pred_numeral w) 2
[PROOF STEP]
by (simp only: numeral_eq_Suc push_bit_Suc) simp


[STATEMENT]
lemma map_prs2 [quot_preserve]:
  shows "((abs_fset ---> rep_fset) ---> (map rep_fset \<circ> rep_fset) ---> abs_fset \<circ> map abs_fset) map = (id ---> rep_fset ---> abs_fset) map"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((abs_fset ---> rep_fset) ---> (map rep_fset \<circ> rep_fset) ---> abs_fset \<circ> map abs_fset) map = (id ---> rep_fset ---> abs_fset) map
[PROOF STEP]
by (auto simp add: fun_eq_iff)
     (simp only: map_map[symmetric] map_prs_aux[OF Quotient3_fset Quotient3_fset])


[STATEMENT]
lemma sqrt_rat_code[code]: "sqrt_rat x = (case quotient_of x of (z,n) \<Rightarrow> (case sqrt_int n of
    [] \<Rightarrow> []
  | sn # xs \<Rightarrow> map (\<lambda> sz. of_int sz / of_int sn) (sqrt_int z)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt_rat x = (case quotient_of x of (z, n) \<Rightarrow> case sqrt_int n of [] \<Rightarrow> [] | sn # xs \<Rightarrow> map (\<lambda>sz. rat_of_int sz / rat_of_int sn) (sqrt_int z))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sqrt_rat x = (case quotient_of x of (z, n) \<Rightarrow> case sqrt_int n of [] \<Rightarrow> [] | sn # xs \<Rightarrow> map (\<lambda>sz. rat_of_int sz / rat_of_int sn) (sqrt_int z))
[PROOF STEP]
obtain z n where q: "quotient_of x = (z,n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>z n. quotient_of x = (z, n) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
quotient_of x = (z, n)

goal (1 subgoal):
 1. sqrt_rat x = (case quotient_of x of (z, n) \<Rightarrow> case sqrt_int n of [] \<Rightarrow> [] | sn # xs \<Rightarrow> map (\<lambda>sz. rat_of_int sz / rat_of_int sn) (sqrt_int z))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt_rat x = (case quotient_of x of (z, n) \<Rightarrow> case sqrt_int n of [] \<Rightarrow> [] | sn # xs \<Rightarrow> map (\<lambda>sz. rat_of_int sz / rat_of_int sn) (sqrt_int z))
[PROOF STEP]
unfolding sqrt_rat_def root_rat_def q split sqrt_int_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. concat (map (\<lambda>rb. map (\<lambda>ra. rat_of_int ra / rat_of_int rb) (root_int 2 z)) (take 1 (root_int 2 n))) = (case root_int 2 n of [] \<Rightarrow> [] | sn # xs \<Rightarrow> map (\<lambda>sz. rat_of_int sz / rat_of_int sn) (root_int 2 z))
[PROOF STEP]
by (cases "root_int 2 n", auto)
[PROOF STATE]
proof (state)
this:
sqrt_rat x = (case quotient_of x of (z, n) \<Rightarrow> case sqrt_int n of [] \<Rightarrow> [] | sn # xs \<Rightarrow> map (\<lambda>sz. rat_of_int sz / rat_of_int sn) (sqrt_int z))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma less_eSuc_iff: "a < eSuc b \<longleftrightarrow> (a \<le> b \<and> a \<noteq> \<infinity>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a < eSuc b) = (a \<le> b \<and> a \<noteq> \<infinity>)
[PROOF STEP]
by (cases a) auto


[STATEMENT]
lemma (in domain) roots_mem_iff_is_root:
  assumes "p \<in> carrier (poly_ring R)" shows "x \<in># roots p \<longleftrightarrow> is_root p x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in># roots p) = is_root p x
[PROOF STEP]
using alg_mult_eq_count_roots[OF assms] count_greater_zero_iff
[PROOF STATE]
proof (prove)
using this:
alg_mult p = count (roots p)
(0 < count ?M ?x) = (?x \<in># ?M)

goal (1 subgoal):
 1. (x \<in># roots p) = is_root p x
[PROOF STEP]
unfolding roots_def sym[OF alg_mult_gt_zero_iff_is_root[OF assms]]
[PROOF STATE]
proof (prove)
using this:
alg_mult p = count (Abs_multiset (alg_mult p))
(0 < count ?M ?x) = (?x \<in># ?M)

goal (1 subgoal):
 1. (x \<in># Abs_multiset (alg_mult p)) = (0 < alg_mult p x)
[PROOF STEP]
by metis


[STATEMENT]
lemma erf_remainder_integral_aux_bound:
  assumes "x > 0"
  shows   "norm (integral {x..x + real m} (\<lambda>t. exp (-t\<^sup>2) / t ^ (2*n))) \<le> exp (-x\<^sup>2) / x ^ (2*n+1)"
    and   "integral {x..x + real m} (\<lambda>t. exp (-t\<^sup>2) / t ^ (2*n)) \<le> exp (-x\<^sup>2) / x ^ (2*n+1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1) &&& integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
 2. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
have "norm (integral {x..x + real m} (\<lambda>t. exp (-t\<^sup>2) / t ^ (2*n))) \<le>
          integral {x..x + real m} (\<lambda>t. exp (-x*t) / x ^ (2*n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> integral {x..x + real m} (\<lambda>t. exp (- x * t) / x ^ (2 * n))
[PROOF STEP]
proof (intro integral_norm_bound_integral ballI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) integrable_on {x..x + real m}
 2. (\<lambda>t. exp (- x * t) / x ^ (2 * n)) integrable_on {x..x + real m}
 3. \<And>xa. xa \<in> {x..x + real m} \<Longrightarrow> norm (exp (- xa\<^sup>2) / xa ^ (2 * n)) \<le> exp (- x * xa) / x ^ (2 * n)
[PROOF STEP]
fix t
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) integrable_on {x..x + real m}
 2. (\<lambda>t. exp (- x * t) / x ^ (2 * n)) integrable_on {x..x + real m}
 3. \<And>xa. xa \<in> {x..x + real m} \<Longrightarrow> norm (exp (- xa\<^sup>2) / xa ^ (2 * n)) \<le> exp (- x * xa) / x ^ (2 * n)
[PROOF STEP]
assume t: "t \<in> {x..x + real m}"
[PROOF STATE]
proof (state)
this:
t \<in> {x..x + real m}

goal (3 subgoals):
 1. (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) integrable_on {x..x + real m}
 2. (\<lambda>t. exp (- x * t) / x ^ (2 * n)) integrable_on {x..x + real m}
 3. \<And>xa. xa \<in> {x..x + real m} \<Longrightarrow> norm (exp (- xa\<^sup>2) / xa ^ (2 * n)) \<le> exp (- x * xa) / x ^ (2 * n)
[PROOF STEP]
from t
[PROOF STATE]
proof (chain)
picking this:
t \<in> {x..x + real m}
[PROOF STEP]
have "norm (exp (-t\<^sup>2) / t ^ (2*n)) = exp (-t\<^sup>2) / t ^ (2*n)"
[PROOF STATE]
proof (prove)
using this:
t \<in> {x..x + real m}

goal (1 subgoal):
 1. norm (exp (- t\<^sup>2) / t ^ (2 * n)) = exp (- t\<^sup>2) / t ^ (2 * n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
norm (exp (- t\<^sup>2) / t ^ (2 * n)) = exp (- t\<^sup>2) / t ^ (2 * n)

goal (3 subgoals):
 1. (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) integrable_on {x..x + real m}
 2. (\<lambda>t. exp (- x * t) / x ^ (2 * n)) integrable_on {x..x + real m}
 3. \<And>xa. xa \<in> {x..x + real m} \<Longrightarrow> norm (exp (- xa\<^sup>2) / xa ^ (2 * n)) \<le> exp (- x * xa) / x ^ (2 * n)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
norm (exp (- t\<^sup>2) / t ^ (2 * n)) = exp (- t\<^sup>2) / t ^ (2 * n)

goal (3 subgoals):
 1. (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) integrable_on {x..x + real m}
 2. (\<lambda>t. exp (- x * t) / x ^ (2 * n)) integrable_on {x..x + real m}
 3. \<And>xa. xa \<in> {x..x + real m} \<Longrightarrow> norm (exp (- xa\<^sup>2) / xa ^ (2 * n)) \<le> exp (- x * xa) / x ^ (2 * n)
[PROOF STEP]
have "\<dots> \<le> exp (-x*t) / x ^ (2*n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp (- t\<^sup>2) / t ^ (2 * n) \<le> exp (- x * t) / x ^ (2 * n)
[PROOF STEP]
using t assms
[PROOF STATE]
proof (prove)
using this:
t \<in> {x..x + real m}
0 < x

goal (1 subgoal):
 1. exp (- t\<^sup>2) / t ^ (2 * n) \<le> exp (- x * t) / x ^ (2 * n)
[PROOF STEP]
by (intro frac_le) (simp_all add: self_le_power power2_eq_square power_mono)
[PROOF STATE]
proof (state)
this:
exp (- t\<^sup>2) / t ^ (2 * n) \<le> exp (- x * t) / x ^ (2 * n)

goal (3 subgoals):
 1. (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) integrable_on {x..x + real m}
 2. (\<lambda>t. exp (- x * t) / x ^ (2 * n)) integrable_on {x..x + real m}
 3. \<And>xa. xa \<in> {x..x + real m} \<Longrightarrow> norm (exp (- xa\<^sup>2) / xa ^ (2 * n)) \<le> exp (- x * xa) / x ^ (2 * n)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
norm (exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x * t) / x ^ (2 * n)
[PROOF STEP]
show "norm (exp (-t\<^sup>2) / t ^ (2*n)) \<le> \<dots>"
[PROOF STATE]
proof (prove)
using this:
norm (exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x * t) / x ^ (2 * n)

goal (1 subgoal):
 1. norm (exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x * t) / x ^ (2 * n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
norm (exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x * t) / x ^ (2 * n)

goal (2 subgoals):
 1. (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) integrable_on {x..x + real m}
 2. (\<lambda>t. exp (- x * t) / x ^ (2 * n)) integrable_on {x..x + real m}
[PROOF STEP]
qed (insert assms, auto intro!: continuous_intros integrable_continuous_real)
[PROOF STATE]
proof (state)
this:
norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> integral {x..x + real m} (\<lambda>t. exp (- x * t) / x ^ (2 * n))

goal (2 subgoals):
 1. norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
 2. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> integral {x..x + real m} (\<lambda>t. exp (- x * t) / x ^ (2 * n))

goal (2 subgoals):
 1. norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
 2. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
have "\<dots> = -exp (-x*(x + real m)) / x ^ (2*n+1) - (-exp (-x*x) / x ^ (2*n+1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral {x..x + real m} (\<lambda>t. exp (- x * t) / x ^ (2 * n)) = - exp (- x * (x + real m)) / x ^ (2 * n + 1) - - exp (- x * x) / x ^ (2 * n + 1)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. integral {x..x + real m} (\<lambda>t. exp (- x * t) / x ^ (2 * n)) = - exp (- x * (x + real m)) / x ^ (2 * n + 1) - - exp (- x * x) / x ^ (2 * n + 1)
[PROOF STEP]
by (intro integral_unique fundamental_theorem_of_calculus)
       (auto simp: has_real_derivative_iff_has_vector_derivative [symmetric]
             intro!: derivative_eq_intros)
[PROOF STATE]
proof (state)
this:
integral {x..x + real m} (\<lambda>t. exp (- x * t) / x ^ (2 * n)) = - exp (- x * (x + real m)) / x ^ (2 * n + 1) - - exp (- x * x) / x ^ (2 * n + 1)

goal (2 subgoals):
 1. norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
 2. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
integral {x..x + real m} (\<lambda>t. exp (- x * t) / x ^ (2 * n)) = - exp (- x * (x + real m)) / x ^ (2 * n + 1) - - exp (- x * x) / x ^ (2 * n + 1)

goal (2 subgoals):
 1. norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
 2. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
have "\<dots> \<le> exp (-x\<^sup>2) / x ^ (2*n+1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - exp (- x * (x + real m)) / x ^ (2 * n + 1) - - exp (- x * x) / x ^ (2 * n + 1) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < x

goal (1 subgoal):
 1. - exp (- x * (x + real m)) / x ^ (2 * n + 1) - - exp (- x * x) / x ^ (2 * n + 1) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
by (simp add: power2_eq_square)
[PROOF STATE]
proof (state)
this:
- exp (- x * (x + real m)) / x ^ (2 * n + 1) - - exp (- x * x) / x ^ (2 * n + 1) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)

goal (2 subgoals):
 1. norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
 2. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
show *: "norm (integral {x..x + real m} (\<lambda>t. exp (-t\<^sup>2) / t ^ (2*n))) \<le>
                      exp (-x\<^sup>2) / x ^ (2*n+1)"
[PROOF STATE]
proof (prove)
using this:
norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)

goal (1 subgoal):
 1. norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)

goal (1 subgoal):
 1. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
have "integral {x..x + real m} (\<lambda>t. exp (-t\<^sup>2) / t ^ (2*n)) \<le>
          norm (integral {x..x + real m} (\<lambda>t. exp (-t\<^sup>2) / t ^ (2*n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)))

goal (1 subgoal):
 1. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)))

goal (1 subgoal):
 1. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
note *
[PROOF STATE]
proof (state)
this:
norm (integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n))) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)

goal (1 subgoal):
 1. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
show "integral {x..x + real m} (\<lambda>t. exp (-t\<^sup>2) / t ^ (2*n)) \<le> exp (-x\<^sup>2) / x ^ (2*n+1)"
[PROOF STATE]
proof (prove)
using this:
integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)

goal (1 subgoal):
 1. integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
integral {x..x + real m} (\<lambda>t. exp (- t\<^sup>2) / t ^ (2 * n)) \<le> exp (- x\<^sup>2) / x ^ (2 * n + 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sums_suminf_ereal: "f sums x \<Longrightarrow> (\<Sum>i. ereal (f i)) = ereal x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f sums x \<Longrightarrow> (\<Sum>i. ereal (f i)) = ereal x
[PROOF STEP]
by (metis sums_ereal sums_unique)


[STATEMENT]
lemma add_right_mono: "\<lbrakk>\<alpha> \<le> \<beta>; Ord \<alpha>; Ord \<beta>; Ord \<gamma>\<rbrakk> \<Longrightarrow> \<alpha>+\<gamma> \<le> \<beta>+\<gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<alpha> \<le> \<beta>; Ord \<alpha>; Ord \<beta>; Ord \<gamma>\<rbrakk> \<Longrightarrow> \<alpha> + \<gamma> \<le> \<beta> + \<gamma>
[PROOF STEP]
by (metis add_le_cancel_left add.assoc add_le_left le_Ord_diff)


[STATEMENT]
lemma plus_1_eSuc:
  "1 + q = eSuc q"
  "q + 1 = eSuc q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 + q = eSuc q &&& q + 1 = eSuc q
[PROOF STEP]
by (simp_all add: eSuc_plus_1 ac_simps)


[STATEMENT]
lemma iprev_induct: "
  \<lbrakk> P (Max I); \<And>n. \<lbrakk> n \<in> I; P n \<rbrakk> \<Longrightarrow> P (iprev n I); finite I; n \<in> I \<rbrakk> \<Longrightarrow> P n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>P (Max I); \<And>n. \<lbrakk>n \<in> I; P n\<rbrakk> \<Longrightarrow> P (iprev n I); finite I; n \<in> I\<rbrakk> \<Longrightarrow> P n
[PROOF STEP]
apply (rule_tac f="\<lambda>n. I \<leftarrow> n" and I=I in image_nat_induct)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrakk>P (Max I); \<And>n. \<lbrakk>n \<in> I; P n\<rbrakk> \<Longrightarrow> P (iprev n I); finite I; n \<in> I\<rbrakk> \<Longrightarrow> P (I \<leftarrow> 0)
 2. \<And>na. \<lbrakk>P (Max I); \<And>n. \<lbrakk>n \<in> I; P n\<rbrakk> \<Longrightarrow> P (iprev n I); finite I; n \<in> I; P (I \<leftarrow> na)\<rbrakk> \<Longrightarrow> P (I \<leftarrow> Suc na)
 3. \<lbrakk>P (Max I); \<And>n. \<lbrakk>n \<in> I; P n\<rbrakk> \<Longrightarrow> P (iprev n I); finite I; n \<in> I\<rbrakk> \<Longrightarrow> surj_on (iprev_nth I) UNIV I
 4. \<lbrakk>P (Max I); \<And>n. \<lbrakk>n \<in> I; P n\<rbrakk> \<Longrightarrow> P (iprev n I); finite I; n \<in> I\<rbrakk> \<Longrightarrow> n \<in> I
[PROOF STEP]
apply (simp add: iprev_nth_closed[OF _ in_imp_not_empty] iprev_nth_surj_on)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma vproduct_vsingletonI:
  assumes "f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c" and "f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}"
  shows "f \<in>\<^sub>\<circ> (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>set{c}. A i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in>\<^sub>\<circ> vproduct (set {c}) A
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c
f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}

goal (1 subgoal):
 1. f \<in>\<^sub>\<circ> vproduct (set {c}) A
[PROOF STEP]
apply(intro vproductI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c; f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}\<rbrakk> \<Longrightarrow> vsv f
 2. \<lbrakk>f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c; f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}\<rbrakk> \<Longrightarrow> \<D>\<^sub>\<circ> f = set {c}
 3. \<lbrakk>f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c; f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}\<rbrakk> \<Longrightarrow> \<forall>i\<in>elts (set {c}). f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c; f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}\<rbrakk> \<Longrightarrow> vsv f
[PROOF STEP]
by (metis rel_vsingleton.vsv_axioms)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c; f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}\<rbrakk> \<Longrightarrow> \<D>\<^sub>\<circ> f = set {c}
 2. \<lbrakk>f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c; f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}\<rbrakk> \<Longrightarrow> \<forall>i\<in>elts (set {c}). f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c; f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}\<rbrakk> \<Longrightarrow> \<D>\<^sub>\<circ> f = set {c}
[PROOF STEP]
by (force intro!: vsubset_antisym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c; f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}\<rbrakk> \<Longrightarrow> \<forall>i\<in>elts (set {c}). f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f\<lparr>c\<rparr> \<in>\<^sub>\<circ> A c; f = set {\<langle>c, f\<lparr>c\<rparr>\<rangle>}\<rbrakk> \<Longrightarrow> \<forall>i\<in>elts (set {c}). f\<lparr>i\<rparr> \<in>\<^sub>\<circ> A i
[PROOF STEP]
by auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma fds_const_add [simp]: "fds_const (a + b :: 'a :: monoid_add) = fds_const a + fds_const b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_const (a + b) = fds_const a + fds_const b
[PROOF STEP]
by (simp add: fds_eq_iff fds_nth_const)


[STATEMENT]
lemma primepows_le_subset:
  assumes x: "x > 0" and l: "l > 0"
  shows   "{(p, i). prime p \<and> l \<le> i \<and> real (p ^ i) \<le> x} \<subseteq> {..nat \<lfloor>root l x\<rfloor>} \<times> {..nat \<lfloor>log 2 x\<rfloor>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(p, i). prime p \<and> l \<le> i \<and> real (p ^ i) \<le> x} \<subseteq> {..nat \<lfloor>root l x\<rfloor>} \<times> {..nat \<lfloor>log 2 x\<rfloor>}
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> a \<le> nat \<lfloor>root l x\<rfloor>
 2. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
fix p i :: nat
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> a \<le> nat \<lfloor>root l x\<rfloor>
 2. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
assume pi: "prime p" "i \<ge> l" "real (p ^ i) \<le> x"
[PROOF STATE]
proof (state)
this:
prime p
l \<le> i
real (p ^ i) \<le> x

goal (2 subgoals):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> a \<le> nat \<lfloor>root l x\<rfloor>
 2. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
have "real p ^ l \<le> real p ^ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real p ^ l \<le> real p ^ i
[PROOF STEP]
using pi x l
[PROOF STATE]
proof (prove)
using this:
prime p
l \<le> i
real (p ^ i) \<le> x
0 < x
0 < l

goal (1 subgoal):
 1. real p ^ l \<le> real p ^ i
[PROOF STEP]
by (intro power_increasing) (auto dest: prime_gt_0_nat)
[PROOF STATE]
proof (state)
this:
real p ^ l \<le> real p ^ i

goal (2 subgoals):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> a \<le> nat \<lfloor>root l x\<rfloor>
 2. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real p ^ l \<le> real p ^ i

goal (2 subgoals):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> a \<le> nat \<lfloor>root l x\<rfloor>
 2. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
have "\<dots> \<le> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real p ^ i \<le> x
[PROOF STEP]
using pi
[PROOF STATE]
proof (prove)
using this:
prime p
l \<le> i
real (p ^ i) \<le> x

goal (1 subgoal):
 1. real p ^ i \<le> x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real p ^ i \<le> x

goal (2 subgoals):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> a \<le> nat \<lfloor>root l x\<rfloor>
 2. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
real p ^ l \<le> x
[PROOF STEP]
have "root l (real p ^ l) \<le> root l x"
[PROOF STATE]
proof (prove)
using this:
real p ^ l \<le> x

goal (1 subgoal):
 1. root l (real p ^ l) \<le> root l x
[PROOF STEP]
using x pi l
[PROOF STATE]
proof (prove)
using this:
real p ^ l \<le> x
0 < x
prime p
l \<le> i
real (p ^ i) \<le> x
0 < l

goal (1 subgoal):
 1. root l (real p ^ l) \<le> root l x
[PROOF STEP]
by (subst real_root_le_iff) auto
[PROOF STATE]
proof (state)
this:
root l (real p ^ l) \<le> root l x

goal (2 subgoals):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> a \<le> nat \<lfloor>root l x\<rfloor>
 2. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
root l (real p ^ l) \<le> root l x

goal (2 subgoals):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> a \<le> nat \<lfloor>root l x\<rfloor>
 2. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
have "root l (real p ^ l) = real p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root l (real p ^ l) = real p
[PROOF STEP]
using pi l
[PROOF STATE]
proof (prove)
using this:
prime p
l \<le> i
real (p ^ i) \<le> x
0 < l

goal (1 subgoal):
 1. root l (real p ^ l) = real p
[PROOF STEP]
by (subst real_root_pos2) auto
[PROOF STATE]
proof (state)
this:
root l (real p ^ l) = real p

goal (2 subgoals):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> a \<le> nat \<lfloor>root l x\<rfloor>
 2. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
real p \<le> root l x
[PROOF STEP]
show "p \<le> nat \<lfloor>root l x\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
real p \<le> root l x

goal (1 subgoal):
 1. p \<le> nat \<lfloor>root l x\<rfloor>
[PROOF STEP]
using pi l x
[PROOF STATE]
proof (prove)
using this:
real p \<le> root l x
prime p
l \<le> i
real (p ^ i) \<le> x
0 < l
0 < x

goal (1 subgoal):
 1. p \<le> nat \<lfloor>root l x\<rfloor>
[PROOF STEP]
by (simp add: le_nat_iff' le_floor_iff)
[PROOF STATE]
proof (state)
this:
p \<le> nat \<lfloor>root l x\<rfloor>

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
from pi
[PROOF STATE]
proof (chain)
picking this:
prime p
l \<le> i
real (p ^ i) \<le> x
[PROOF STEP]
have "2 ^ i \<le> real p ^ i"
[PROOF STATE]
proof (prove)
using this:
prime p
l \<le> i
real (p ^ i) \<le> x

goal (1 subgoal):
 1. 2 ^ i \<le> real p ^ i
[PROOF STEP]
using l
[PROOF STATE]
proof (prove)
using this:
prime p
l \<le> i
real (p ^ i) \<le> x
0 < l

goal (1 subgoal):
 1. 2 ^ i \<le> real p ^ i
[PROOF STEP]
by (intro power_mono) (auto dest: prime_gt_1_nat)
[PROOF STATE]
proof (state)
this:
2 ^ i \<le> real p ^ i

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 ^ i \<le> real p ^ i

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
have "\<dots> \<le> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real p ^ i \<le> x
[PROOF STEP]
using pi
[PROOF STATE]
proof (prove)
using this:
prime p
l \<le> i
real (p ^ i) \<le> x

goal (1 subgoal):
 1. real p ^ i \<le> x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real p ^ i \<le> x

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>prime a; l \<le> b; real (a ^ b) \<le> x\<rbrakk> \<Longrightarrow> b \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
2 ^ i \<le> x
[PROOF STEP]
show "i \<le> nat \<lfloor>log 2 x\<rfloor>"
[PROOF STATE]
proof (prove)
using this:
2 ^ i \<le> x

goal (1 subgoal):
 1. i \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
using pi x
[PROOF STATE]
proof (prove)
using this:
2 ^ i \<le> x
prime p
l \<le> i
real (p ^ i) \<le> x
0 < x

goal (1 subgoal):
 1. i \<le> nat \<lfloor>log 2 x\<rfloor>
[PROOF STEP]
by (auto simp: le_nat_iff' le_floor_iff le_log_iff powr_realpow)
[PROOF STATE]
proof (state)
this:
i \<le> nat \<lfloor>log 2 x\<rfloor>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mult_scalar_MP_oalist [code]:
  "(MP_oalist xs) \<odot> (MP_oalist ys) =
      (if is_zero (MP_oalist xs) then
        MP_oalist (OAlist_empty_ntm (snd (list_of_oalist_ntm ys)))
      else
        let ct = OAlist_hd_ntm xs in
        monom_mult (snd ct) (fst ct) (MP_oalist ys) + (MP_oalist (OAlist_tl_ntm xs)) \<odot> (MP_oalist ys))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MP_oalist xs \<odot> MP_oalist ys = (if is_zero (MP_oalist xs) then MP_oalist (OAlist_empty_ntm (snd (list_of_oalist_ntm ys))) else let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
proof (split if_split, intro conjI impI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = MP_oalist (OAlist_empty_ntm (snd (list_of_oalist_ntm ys)))
 2. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
assume "is_zero (MP_oalist xs)"
[PROOF STATE]
proof (state)
this:
is_zero (MP_oalist xs)

goal (2 subgoals):
 1. is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = MP_oalist (OAlist_empty_ntm (snd (list_of_oalist_ntm ys)))
 2. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
thus "MP_oalist xs \<odot> MP_oalist ys = MP_oalist (OAlist_empty_ntm (snd (list_of_oalist_ntm ys)))"
[PROOF STATE]
proof (prove)
using this:
is_zero (MP_oalist xs)

goal (1 subgoal):
 1. MP_oalist xs \<odot> MP_oalist ys = MP_oalist (OAlist_empty_ntm (snd (list_of_oalist_ntm ys)))
[PROOF STEP]
by (simp add: is_zero_def)
[PROOF STATE]
proof (state)
this:
MP_oalist xs \<odot> MP_oalist ys = MP_oalist (OAlist_empty_ntm (snd (list_of_oalist_ntm ys)))

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
assume "\<not> is_zero (MP_oalist xs)"
[PROOF STATE]
proof (state)
this:
\<not> is_zero (MP_oalist xs)

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
hence *: "fst (list_of_oalist_ntm xs) \<noteq> []"
[PROOF STATE]
proof (prove)
using this:
\<not> is_zero (MP_oalist xs)

goal (1 subgoal):
 1. fst (list_of_oalist_ntm xs) \<noteq> []
[PROOF STEP]
by (simp add: is_zero_MP_oalist List.null_def)
[PROOF STATE]
proof (state)
this:
fst (list_of_oalist_ntm xs) \<noteq> []

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
define ct where "ct = OAlist_hd_ntm xs"
[PROOF STATE]
proof (state)
this:
ct = OAlist_hd_ntm xs

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
have eq: "except (MP_oalist xs) {fst ct} = MP_oalist (OAlist_tl_ntm xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. except (MP_oalist xs) {fst ct} = MP_oalist (OAlist_tl_ntm xs)
[PROOF STEP]
by (rule poly_mapping_eqI, simp add: lookup_except ct_def oa_ntm.lookup_tl')
[PROOF STATE]
proof (state)
this:
except (MP_oalist xs) {fst ct} = MP_oalist (OAlist_tl_ntm xs)

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
have "MP_oalist xs \<odot> MP_oalist ys =
          monom_mult (lookup (MP_oalist xs) (fst ct)) (fst ct) (MP_oalist ys) +
          except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MP_oalist xs \<odot> MP_oalist ys = monom_mult (lookup (MP_oalist xs) (fst ct)) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys
[PROOF STEP]
by (fact mult_scalar_rec_left)
[PROOF STATE]
proof (state)
this:
MP_oalist xs \<odot> MP_oalist ys = monom_mult (lookup (MP_oalist xs) (fst ct)) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
MP_oalist xs \<odot> MP_oalist ys = monom_mult (lookup (MP_oalist xs) (fst ct)) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
have "... = monom_mult (snd ct) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monom_mult (lookup (MP_oalist xs) (fst ct)) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys = monom_mult (snd ct) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
fst (list_of_oalist_ntm xs) \<noteq> []

goal (1 subgoal):
 1. monom_mult (lookup (MP_oalist xs) (fst ct)) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys = monom_mult (snd ct) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys
[PROOF STEP]
by (simp add: ct_def oa_ntm.snd_hd)
[PROOF STATE]
proof (state)
this:
monom_mult (lookup (MP_oalist xs) (fst ct)) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys = monom_mult (snd ct) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
monom_mult (lookup (MP_oalist xs) (fst ct)) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys = monom_mult (snd ct) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
have "... = monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monom_mult (snd ct) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys = monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys
[PROOF STEP]
by (simp only: eq)
[PROOF STATE]
proof (state)
this:
monom_mult (snd ct) (fst ct) (MP_oalist ys) + except (MP_oalist xs) {fst ct} \<odot> MP_oalist ys = monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys

goal (1 subgoal):
 1. \<not> is_zero (MP_oalist xs) \<Longrightarrow> MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
MP_oalist xs \<odot> MP_oalist ys = monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys
[PROOF STEP]
show "MP_oalist xs \<odot> MP_oalist ys =
                (let ct = OAlist_hd_ntm xs in
                  monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)"
[PROOF STATE]
proof (prove)
using this:
MP_oalist xs \<odot> MP_oalist ys = monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys

goal (1 subgoal):
 1. MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)
[PROOF STEP]
by (simp add: ct_def Let_def)
[PROOF STATE]
proof (state)
this:
MP_oalist xs \<odot> MP_oalist ys = (let ct = OAlist_hd_ntm xs in monom_mult (snd ct) (fst ct) (MP_oalist ys) + MP_oalist (OAlist_tl_ntm xs) \<odot> MP_oalist ys)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subspace_span [iff]: "subspace (span S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subspace (span S)
[PROOF STEP]
by (auto simp: subspace_def span_zero span_add span_scale)


[STATEMENT]
lemma rbt_comp_lookup: "rbt_comp_lookup = ord.rbt_lookup (lt_of_comp c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.rbt_comp_lookup = ord.rbt_lookup (lt_of_comp c)
[PROOF STEP]
proof (intro ext)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa. local.rbt_comp_lookup x xa = ord.rbt_lookup (lt_of_comp c) x xa
[PROOF STEP]
fix k and t :: "('a,'b)rbt"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xa. local.rbt_comp_lookup x xa = ord.rbt_lookup (lt_of_comp c) x xa
[PROOF STEP]
show "rbt_comp_lookup t k = ord.rbt_lookup (lt_of_comp c) t k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.rbt_comp_lookup t k = ord.rbt_lookup (lt_of_comp c) t k
[PROOF STEP]
by (induct t, unfold rbt_comp_lookup.simps ord.rbt_lookup.simps
      comparator.two_comparisons_into_case_order[OF c])
      (auto split: order.splits)
[PROOF STATE]
proof (state)
this:
local.rbt_comp_lookup t k = ord.rbt_lookup (lt_of_comp c) t k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Limit_ftimes_in_VsetI:
  assumes "Limit \<alpha>" and "A \<in>\<^sub>\<circ> Vset \<alpha>" and "B \<in>\<^sub>\<circ> Vset \<alpha>"
  shows "A \<times>\<^sub>\<bullet> B \<in>\<^sub>\<circ> Vset \<alpha>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<times>\<^sub>\<bullet> B \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
unfolding ftimes_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>2\<^sub>\<nat>. if i = []\<^sub>\<circ> \<Rightarrow> A | otherwise \<Rightarrow> B) \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
proof(rule Limit_vproduct_in_VsetI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. Limit \<alpha>
 2. 2\<^sub>\<nat> \<in>\<^sub>\<circ> Vset \<alpha>
 3. \<And>i. i \<in>\<^sub>\<circ> 2\<^sub>\<nat> \<Longrightarrow> (if i = []\<^sub>\<circ> \<Rightarrow> A | otherwise \<Rightarrow> B) \<in>\<^sub>\<circ> Vset \<alpha>
 4. vfinite (2\<^sub>\<nat>)
[PROOF STEP]
from assms(1)
[PROOF STATE]
proof (chain)
picking this:
Limit \<alpha>
[PROOF STEP]
show "2\<^sub>\<nat> \<in>\<^sub>\<circ> Vset \<alpha>"
[PROOF STATE]
proof (prove)
using this:
Limit \<alpha>

goal (1 subgoal):
 1. 2\<^sub>\<nat> \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
by (meson Limit_omega_in_VsetI)
[PROOF STATE]
proof (state)
this:
2\<^sub>\<nat> \<in>\<^sub>\<circ> Vset \<alpha>

goal (3 subgoals):
 1. Limit \<alpha>
 2. \<And>i. i \<in>\<^sub>\<circ> 2\<^sub>\<nat> \<Longrightarrow> (if i = []\<^sub>\<circ> \<Rightarrow> A | otherwise \<Rightarrow> B) \<in>\<^sub>\<circ> Vset \<alpha>
 3. vfinite (2\<^sub>\<nat>)
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. Limit \<alpha>
 2. \<And>i. i \<in>\<^sub>\<circ> 2\<^sub>\<nat> \<Longrightarrow> (if i = []\<^sub>\<circ> \<Rightarrow> A | otherwise \<Rightarrow> B) \<in>\<^sub>\<circ> Vset \<alpha>
 3. vfinite (2\<^sub>\<nat>)
[PROOF STEP]
assume "i \<in>\<^sub>\<circ> 2\<^sub>\<nat>"
[PROOF STATE]
proof (state)
this:
i \<in>\<^sub>\<circ> 2\<^sub>\<nat>

goal (3 subgoals):
 1. Limit \<alpha>
 2. \<And>i. i \<in>\<^sub>\<circ> 2\<^sub>\<nat> \<Longrightarrow> (if i = []\<^sub>\<circ> \<Rightarrow> A | otherwise \<Rightarrow> B) \<in>\<^sub>\<circ> Vset \<alpha>
 3. vfinite (2\<^sub>\<nat>)
[PROOF STEP]
with assms(2,3)
[PROOF STATE]
proof (chain)
picking this:
A \<in>\<^sub>\<circ> Vset \<alpha>
B \<in>\<^sub>\<circ> Vset \<alpha>
i \<in>\<^sub>\<circ> 2\<^sub>\<nat>
[PROOF STEP]
show "(i = 0 ? A : B) \<in>\<^sub>\<circ> Vset \<alpha>"
[PROOF STATE]
proof (prove)
using this:
A \<in>\<^sub>\<circ> Vset \<alpha>
B \<in>\<^sub>\<circ> Vset \<alpha>
i \<in>\<^sub>\<circ> 2\<^sub>\<nat>

goal (1 subgoal):
 1. (if i = []\<^sub>\<circ> \<Rightarrow> A | otherwise \<Rightarrow> B) \<in>\<^sub>\<circ> Vset \<alpha>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(if i = []\<^sub>\<circ> \<Rightarrow> A | otherwise \<Rightarrow> B) \<in>\<^sub>\<circ> Vset \<alpha>

goal (2 subgoals):
 1. Limit \<alpha>
 2. vfinite (2\<^sub>\<nat>)
[PROOF STEP]
qed (auto simp: assms(1))


[STATEMENT]
lemma GroupHomSetD_GroupHom :
  "T \<in> GroupHomSet G H \<Longrightarrow> GroupHom G T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T \<in> GroupHomSet G H \<Longrightarrow> GroupHom G T
[PROOF STEP]
unfolding GroupHomSet_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T \<in> {T. GroupHom G T} \<inter> {T. T ` G \<subseteq> H} \<Longrightarrow> GroupHom G T
[PROOF STEP]
by fast


[STATEMENT]
lemma Sup_less_comp: "(Sup_less P) w o S = Sup_less (\<lambda> w . ((P w) o S)) w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup_less P w \<circ> S = Sup_less (\<lambda>w. P w \<circ> S) w
[PROOF STEP]
apply (simp add: Sup_less_def fun_eq_iff, safe)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (SUP f\<in>{y. \<exists>v<w. \<forall>x. y x = P v x}. f (S x)) = (SUP f\<in>{y. \<exists>v<w. \<forall>x. y x = P v (S x)}. f x)
[PROOF STEP]
apply (subgoal_tac "((\<lambda>f. f (S x)) ` {y. \<exists>v<w. \<forall>x. y x = P v x}) = ((\<lambda>f. f x) ` {y. \<exists>v<w. \<forall>x. y x = P v (S x)})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. (\<lambda>f. f (S x)) ` {y. \<exists>v<w. \<forall>x. y x = P v x} = (\<lambda>f. f x) ` {y. \<exists>v<w. \<forall>x. y x = P v (S x)} \<Longrightarrow> (SUP f\<in>{y. \<exists>v<w. \<forall>x. y x = P v x}. f (S x)) = (SUP f\<in>{y. \<exists>v<w. \<forall>x. y x = P v (S x)}. f x)
 2. \<And>x. (\<lambda>f. f (S x)) ` {y. \<exists>v<w. \<forall>x. y x = P v x} = (\<lambda>f. f x) ` {y. \<exists>v<w. \<forall>x. y x = P v (S x)}
[PROOF STEP]
apply (auto cong del: SUP_cong_simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma rel_fun_assoc_weak: "((f :: 'a \<Rightarrow> 'b::weak_quantale) \<star> g) \<star> h = f \<star> (g \<star> h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<star> g) \<star> h = f \<star> (g \<star> h)
[PROOF STEP]
by (simp add: times_rel_fun_def fun_eq_iff bmod_assoc_weak[symmetric])


[STATEMENT]
lemma add_stack_eq:
 "\<lbrakk>\<forall>a \<in> {-m..<0}. ms' a = ms a; m = n\<rbrakk> \<Longrightarrow> add_stack m ms' = add_stack n ms"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>a\<in>{- int m..<0}. ms' a = ms a; m = n\<rbrakk> \<Longrightarrow> add_stack m ms' = add_stack n ms
[PROOF STEP]
by (induction m arbitrary: n, auto)


[STATEMENT]
lemma eq_union_or:
  "simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
  = simplicial_complex_induced_by_monotone_boolean_function n f
    \<union> simplicial_complex_induced_by_monotone_boolean_function n g"
  (is "?sc n (?bf_or n f g) = ?sc n f \<union> ?sc n g")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) = simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
 2. simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
show "?sc n f \<union> ?sc n g \<subseteq> ?sc n (?bf_or n f g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
fix \<sigma> :: "nat set"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
assume "\<sigma> \<in> (?sc n f \<union> ?sc n g)"
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
hence sigma: "\<sigma> \<in> ?sc n f \<or> \<sigma> \<in> ?sc n g"
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
have "f (simplicial_complex.bool_vec_from_simplice n \<sigma>)
           \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
proof (cases "\<sigma> \<in> ?sc n f")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
 2. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f

goal (2 subgoals):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
 2. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
from simplicial_complex.simplicial_complex_implies_true [OF True]
[PROOF STATE]
proof (chain)
picking this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
show "f (simplicial_complex.bool_vec_from_simplice n \<sigma>)
           \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f

goal (1 subgoal):
 1. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
hence sigmain: "\<sigma> \<in> ?sc n g"
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
using sigma
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<notin> simplicial_complex_induced_by_monotone_boolean_function n f \<Longrightarrow> f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
from simplicial_complex.simplicial_complex_implies_true [OF sigmain]
[PROOF STATE]
proof (chain)
picking this:
g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
show "f (simplicial_complex.bool_vec_from_simplice n \<sigma>)
           \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
thus "\<sigma> \<in> ?sc n (?bf_or n f g)"
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
using simplicial_complex_induced_by_monotone_boolean_function_def
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
simplicial_complex_induced_by_monotone_boolean_function ?n ?f = {y. \<exists>x. dim_vec x = ?n \<and> ?f x \<and> ceros_of_boolean_input x = y}

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
using bool_fun_or_def sigma
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
simplicial_complex_induced_by_monotone_boolean_function ?n ?f = {y. \<exists>x. dim_vec x = ?n \<and> ?f x \<and> ceros_of_boolean_input x = y}
bool_fun_or ?n ?f ?g \<equiv> \<lambda>x. ?f x \<or> ?g x
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
show "?sc n (?bf_or n f g) \<subseteq> ?sc n f \<union> ?sc n g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
fix \<sigma>::"nat set"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
assume sigma: "\<sigma> \<in> ?sc n (?bf_or n f g)"
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
hence "bool_fun_or n f g (simplicial_complex.bool_vec_from_simplice n \<sigma>)"
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal (1 subgoal):
 1. bool_fun_or n f g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
unfolding simplicial_complex.bool_vec_from_simplice_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g)

goal (1 subgoal):
 1. bool_fun_or n f g (vec n (\<lambda>i. i \<notin> \<sigma>))
[PROOF STEP]
unfolding simplicial_complex_induced_by_monotone_boolean_function_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> {y. \<exists>x. dim_vec x = n \<and> bool_fun_or n f g x \<and> ceros_of_boolean_input x = y}

goal (1 subgoal):
 1. bool_fun_or n f g (vec n (\<lambda>i. i \<notin> \<sigma>))
[PROOF STEP]
unfolding ceros_of_boolean_input_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> {y. \<exists>x. dim_vec x = n \<and> bool_fun_or n f g x \<and> {xa. xa < dim_vec x \<and> x $ xa = False} = y}

goal (1 subgoal):
 1. bool_fun_or n f g (vec n (\<lambda>i. i \<notin> \<sigma>))
[PROOF STEP]
by auto (smt (verit) dim_vec eq_vecI index_vec)+
[PROOF STATE]
proof (state)
this:
bool_fun_or n f g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
hence "(f (simplicial_complex.bool_vec_from_simplice n \<sigma>))
            \<or> (g (simplicial_complex.bool_vec_from_simplice n \<sigma>))"
[PROOF STATE]
proof (prove)
using this:
bool_fun_or n f g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
unfolding bool_fun_or_def
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
hence "\<sigma> \<in> ?sc n f \<or> \<sigma> \<in> ?sc n g"
[PROOF STATE]
proof (prove)
using this:
f (simplicial_complex.bool_vec_from_simplice n \<sigma>) \<or> g (simplicial_complex.bool_vec_from_simplice n \<sigma>)

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
by (smt (z3) sigma bool_fun_or_def mem_Collect_eq
            simplicial_complex_induced_by_monotone_boolean_function_def)
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<And>x. x \<in> simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<Longrightarrow> x \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
thus "\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f
          \<union> simplicial_complex_induced_by_monotone_boolean_function n g"
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<or> \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n g

goal (1 subgoal):
 1. \<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
simplicial_complex_induced_by_monotone_boolean_function n (bool_fun_or n f g) \<subseteq> simplicial_complex_induced_by_monotone_boolean_function n f \<union> simplicial_complex_induced_by_monotone_boolean_function n g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma measurable_lborel_component [measurable]:
assumes "k<n"
shows "(\<lambda>x. x k) \<in> borel_measurable (lborel_f n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x k) \<in> borel_measurable (lborel_f n)
[PROOF STEP]
unfolding lborel_f_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x k) \<in> borel_measurable (Pi\<^sub>M {..<n} (\<lambda>b. lborel))
[PROOF STEP]
using assms measurable_PiM_component_rev
[PROOF STATE]
proof (prove)
using this:
k < n
\<lbrakk>?i \<in> ?I; ?f \<in> ?M ?i \<rightarrow>\<^sub>M ?N\<rbrakk> \<Longrightarrow> (\<lambda>x. ?f (x ?i)) \<in> Pi\<^sub>M ?I ?M \<rightarrow>\<^sub>M ?N

goal (1 subgoal):
 1. (\<lambda>x. x k) \<in> borel_measurable (Pi\<^sub>M {..<n} (\<lambda>b. lborel))
[PROOF STEP]
by simp_all


[STATEMENT]
lemma generate_topology_Union:
  "(\<And>k. k \<in> I \<Longrightarrow> generate_topology S (K k)) \<Longrightarrow> generate_topology S (\<Union>k\<in>I. K k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>k. k \<in> I \<Longrightarrow> generate_topology S (K k)) \<Longrightarrow> generate_topology S (\<Union> (K ` I))
[PROOF STEP]
using generate_topology.UN [of "K ` I"]
[PROOF STATE]
proof (prove)
using this:
(\<And>k. k \<in> K ` I \<Longrightarrow> generate_topology ?S k) \<Longrightarrow> generate_topology ?S (\<Union> (K ` I))

goal (1 subgoal):
 1. (\<And>k. k \<in> I \<Longrightarrow> generate_topology S (K k)) \<Longrightarrow> generate_topology S (\<Union> (K ` I))
[PROOF STEP]
by auto


[STATEMENT]
lemma zle_imp_zless_or_eq:"(n::int) \<le> m \<Longrightarrow> n < m \<or> n = m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<le> m \<Longrightarrow> n < m \<or> n = m
[PROOF STEP]
by arith


[STATEMENT]
lemma mat_mult_assoc:
  assumes wf1: "mat nr n1 m1"
  and wf2: "mat n1 n2 m2"
  and wf3: "mat n2 nc m3"
  shows "mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)" (is "?m12_3 = ?m1_23")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
note wf = wf1 wf2 wf3
[PROOF STATE]
proof (state)
this:
mat nr n1 m1
mat n1 n2 m2
mat n2 nc m3

goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
let ?m12 = "mat_mult nr m1 m2"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
let ?m23 = "mat_mult n1 m2 m3"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
from wf
[PROOF STATE]
proof (chain)
picking this:
mat nr n1 m1
mat n1 n2 m2
mat n2 nc m3
[PROOF STEP]
have
    wf12: "mat nr n2 ?m12" and
    wf23: "mat n1 nc ?m23" and
    wf1_23: "mat nr nc ?m1_23" and
    wf12_3: "mat nr nc ?m12_3"
[PROOF STATE]
proof (prove)
using this:
mat nr n1 m1
mat n1 n2 m2
mat n2 nc m3

goal (1 subgoal):
 1. (mat nr n2 (mat_mult nr m1 m2) &&& mat n1 nc (mat_mult n1 m2 m3)) &&& mat nr nc (mat_mult nr m1 (mat_mult n1 m2 m3)) &&& mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
mat nr n2 (mat_mult nr m1 m2)
mat n1 nc (mat_mult n1 m2 m3)
mat nr nc (mat_mult nr m1 (mat_mult n1 m2 m3))
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)

goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)
[PROOF STEP]
proof (rule mat_col_eqI, unfold col_def)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr ?nc (mat_mult nr m1 (mat_mult n1 m2 m3))
 3. \<And>i. i < ?nc \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr ?nc (mat_mult nr m1 (mat_mult n1 m2 m3))
 3. \<And>i. i < ?nc \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
assume i: "i < nc"
[PROOF STATE]
proof (state)
this:
i < nc

goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr ?nc (mat_mult nr m1 (mat_mult n1 m2 m3))
 3. \<And>i. i < ?nc \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
with wf1_23 wf12_3 wf3
[PROOF STATE]
proof (chain)
picking this:
mat nr nc (mat_mult nr m1 (mat_mult n1 m2 m3))
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
mat n2 nc m3
i < nc
[PROOF STEP]
have len: "length (?m12_3 ! i) = length (?m1_23 ! i)" and ilen: "i < length m3"
[PROOF STATE]
proof (prove)
using this:
mat nr nc (mat_mult nr m1 (mat_mult n1 m2 m3))
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
mat n2 nc m3
i < nc

goal (1 subgoal):
 1. length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) = length (mat_mult nr m1 (mat_mult n1 m2 m3) ! i) &&& i < length m3
[PROOF STEP]
unfolding mat_def
[PROOF STATE]
proof (prove)
using this:
length (mat_mult nr m1 (mat_mult n1 m2 m3)) = nc \<and> Ball (set (mat_mult nr m1 (mat_mult n1 m2 m3))) (vec nr)
length (mat_mult nr (mat_mult nr m1 m2) m3) = nc \<and> Ball (set (mat_mult nr (mat_mult nr m1 m2) m3)) (vec nr)
length m3 = nc \<and> Ball (set m3) (vec n2)
i < nc

goal (1 subgoal):
 1. length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) = length (mat_mult nr m1 (mat_mult n1 m2 m3) ! i) &&& i < length m3
[PROOF STEP]
by (auto simp: vec_def)
[PROOF STATE]
proof (state)
this:
length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) = length (mat_mult nr m1 (mat_mult n1 m2 m3) ! i)
i < length m3

goal (3 subgoals):
 1. mat ?nr ?nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr ?nc (mat_mult nr m1 (mat_mult n1 m2 m3))
 3. \<And>i. i < ?nc \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
show "?m12_3 ! i = ?m1_23 ! i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i
[PROOF STEP]
proof (rule nth_equalityI[OF len])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>ia. ia < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i ! ia = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! ia
[PROOF STEP]
fix j
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>ia. ia < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i ! ia = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! ia
[PROOF STEP]
assume jlen: "j < length (?m12_3 ! i)"
[PROOF STATE]
proof (state)
this:
j < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i)

goal (1 subgoal):
 1. \<And>ia. ia < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i ! ia = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! ia
[PROOF STEP]
with wf12_3 i
[PROOF STATE]
proof (chain)
picking this:
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
i < nc
j < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i)
[PROOF STEP]
have j: "j < nr"
[PROOF STATE]
proof (prove)
using this:
mat nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
i < nc
j < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i)

goal (1 subgoal):
 1. j < nr
[PROOF STEP]
unfolding mat_def
[PROOF STATE]
proof (prove)
using this:
length (mat_mult nr (mat_mult nr m1 m2) m3) = nc \<and> Ball (set (mat_mult nr (mat_mult nr m1 m2) m3)) (vec nr)
i < nc
j < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i)

goal (1 subgoal):
 1. j < nr
[PROOF STEP]
by (auto simp: vec_def)
[PROOF STATE]
proof (state)
this:
j < nr

goal (1 subgoal):
 1. \<And>ia. ia < length (mat_mult nr (mat_mult nr m1 m2) m3 ! i) \<Longrightarrow> mat_mult nr (mat_mult nr m1 m2) m3 ! i ! ia = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! ia
[PROOF STEP]
show "?m12_3 ! i ! j = ?m1_23 ! i ! j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_mult nr (mat_mult nr m1 m2) m3 ! i ! j = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! j
[PROOF STEP]
by (unfold mat_mult_index[OF wf12 wf3 j i]
              mat_mult_index[OF wf1 wf23 j i]
              row_mat_mult_index[OF wf1 wf2 j]
              col_mat_mult_index[OF wf2 wf3 i]
              scalar_product_assoc[OF wf2 row[OF wf1 j] col[OF wf3 i]], simp)
[PROOF STATE]
proof (state)
this:
mat_mult nr (mat_mult nr m1 m2) m3 ! i ! j = mat_mult nr m1 (mat_mult n1 m2 m3) ! i ! j

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
mat_mult nr (mat_mult nr m1 m2) m3 ! i = mat_mult nr m1 (mat_mult n1 m2 m3) ! i

goal (2 subgoals):
 1. mat ?nr nc (mat_mult nr (mat_mult nr m1 m2) m3)
 2. mat ?nr nc (mat_mult nr m1 (mat_mult n1 m2 m3))
[PROOF STEP]
qed (insert wf, auto)
[PROOF STATE]
proof (state)
this:
mat_mult nr (mat_mult nr m1 m2) m3 = mat_mult nr m1 (mat_mult n1 m2 m3)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma value_eq_false: "(value_eq a b = false) = (\<exists>x y. a = Some x \<and> b = Some y \<and> x \<noteq> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (value_eq a b = false) = (\<exists>x y. a = Some x \<and> b = Some y \<and> x \<noteq> y)
[PROOF STEP]
by (cases a; cases b, auto)


[STATEMENT]
lemma mono_addRPD: "mono (addRPD r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono (\<lambda>S. insert r S \<union> (insert r S \<bind> RPD))
[PROOF STEP]
unfolding mono_def Set.bind_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. x \<subseteq> y \<longrightarrow> insert r x \<union> {xa. Bex (RPD ` insert r x) ((\<in>) xa)} \<subseteq> insert r y \<union> {x. Bex (RPD ` insert r y) ((\<in>) x)}
[PROOF STEP]
by auto


[STATEMENT]
lemma rank_1_proj_hermitian:
  shows "hermitian (rank_1_proj (v::complex Matrix.vec))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hermitian (rank_1_proj v)
[PROOF STEP]
using rank_1_proj_adjoint
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.adjoint (rank_1_proj ?v) = rank_1_proj ?v

goal (1 subgoal):
 1. hermitian (rank_1_proj v)
[PROOF STEP]
unfolding hermitian_def
[PROOF STATE]
proof (prove)
using this:
Complex_Matrix.adjoint (rank_1_proj ?v) = rank_1_proj ?v

goal (1 subgoal):
 1. Complex_Matrix.adjoint (rank_1_proj v) = rank_1_proj v
[PROOF STEP]
by simp


[STATEMENT]
lemma fcard_fminus1_le: "fcard (A |-| {|x|}) \<le> fcard A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fcard (A |-| {|x|}) \<le> fcard A
[PROOF STEP]
by transfer (rule card_Diff1_le)


[STATEMENT]
lemma recvcap_preserves_InvCapsNonneg:
  assumes "InvCapsNonneg c0"
    and   "next_recvcap' c0 c1 p t"
  shows   "InvCapsNonneg c1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. InvCapsNonneg c1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
InvCapsNonneg c0
next_recvcap' c0 c1 p t

goal (1 subgoal):
 1. InvCapsNonneg c1
[PROOF STEP]
unfolding InvCapsNonneg_def next_recvcap'_def
[PROOF STATE]
proof (prove)
using this:
\<forall>p t. 0 \<le> zcount (c_caps c0 p) t
(p, t) \<in># c_data_msg c0 \<and> c1 = c0\<lparr>c_caps := (c_caps c0)(p := c_caps c0 p + {#t#}\<^sub>z), c_data_msg := remove1_mset (p, t) (c_data_msg c0)\<rparr>

goal (1 subgoal):
 1. \<forall>p t. 0 \<le> zcount (c_caps c1 p) t
[PROOF STEP]
by simp


[STATEMENT]
lemma eventually_floor_less:
  fixes f :: "'a \<Rightarrow> 'b::{order_topology,floor_ceiling}"
  assumes f: "(f \<longlongrightarrow> l) F"
    and l: "l \<notin> \<int>"
  shows "\<forall>\<^sub>F x in F. of_int (floor l) < f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in F. of_int \<lfloor>l\<rfloor> < f x
[PROOF STEP]
by (intro order_tendstoD[OF f]) (metis Ints_of_int antisym_conv2 floor_correct l)


[STATEMENT]
lemma subset_replicate [intro?]: "set (replicate n x) \<subseteq> {x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (replicate n x) \<subseteq> {x}
[PROOF STEP]
by (induct n) auto