[STATEMENT]
lemma sum_rationals_common_divisor':
  fixes f g :: "'a \<Rightarrow> int"
  assumes "finite A"
  assumes "\<And>x. x \<in> A \<Longrightarrow> g x \<noteq> 0" and "(\<And>x. x \<in> A \<Longrightarrow> g x dvd d)" and "d \<noteq> 0"
  shows   "\<exists>c. (\<Sum>x\<in>A. f x / g x) = real_of_int c / real_of_int d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
define d' where "d' = (LCM x\<in>A. g x)"
[PROOF STATE]
proof (state)
this:
d' = Lcm (g ` A)

goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
have "d' dvd d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d' dvd d
[PROOF STEP]
unfolding d'_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lcm (g ` A) dvd d
[PROOF STEP]
using assms(3)
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> g ?x dvd d

goal (1 subgoal):
 1. Lcm (g ` A) dvd d
[PROOF STEP]
by (auto simp: Lcm_dvd_iff)
[PROOF STATE]
proof (state)
this:
d' dvd d

goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
d' dvd d
[PROOF STEP]
obtain e where e: "d = d' * e"
[PROOF STATE]
proof (prove)
using this:
d' dvd d

goal (1 subgoal):
 1. (\<And>e. d = d' * e \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
d = d' * e

goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
have "\<exists>c. (\<Sum>x\<in>A. f x / g x) = real_of_int c / (LCM x\<in>A. g x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int (Lcm (g ` A))
[PROOF STEP]
by (rule sum_rationals_common_divisor) fact+
[PROOF STATE]
proof (state)
this:
\<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int (Lcm (g ` A))

goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int (Lcm (g ` A))
[PROOF STEP]
obtain c where c: "(\<Sum>x\<in>A. f x / g x) = real_of_int c / real_of_int d'"
[PROOF STATE]
proof (prove)
using this:
\<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int (Lcm (g ` A))

goal (1 subgoal):
 1. (\<And>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding d'_def
[PROOF STATE]
proof (prove)
using this:
\<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int (Lcm (g ` A))

goal (1 subgoal):
 1. (\<And>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int (Lcm (g ` A)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d'

goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d'

goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
have "\<dots> = real_of_int (c * e) / real_of_int d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int c / real_of_int d' = real_of_int (c * e) / real_of_int d
[PROOF STEP]
using \<open>d \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
d \<noteq> 0

goal (1 subgoal):
 1. real_of_int c / real_of_int d' = real_of_int (c * e) / real_of_int d
[PROOF STEP]
by (simp add: e)
[PROOF STATE]
proof (state)
this:
real_of_int c / real_of_int d' = real_of_int (c * e) / real_of_int d

goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int (c * e) / real_of_int d
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int (c * e) / real_of_int d

goal (1 subgoal):
 1. \<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>c. (\<Sum>x\<in>A. real_of_int (f x) / real_of_int (g x)) = real_of_int c / real_of_int d

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma comp_min_basis_subset': "set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}
[PROOF STEP]
have "set (comp_min_basis xs) \<subseteq> set (filter (\<lambda>x. x \<noteq> 0) xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (comp_min_basis xs) \<subseteq> set (filter (\<lambda>x. x \<noteq> 0) xs)
[PROOF STEP]
unfolding comp_min_basis_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (filter_min (\<lambda>x y. lt x adds\<^sub>t lt y) (filter (\<lambda>x. x \<noteq> 0) xs)) \<subseteq> set (filter (\<lambda>x. x \<noteq> 0) xs)
[PROOF STEP]
by (rule filter_min_subset)
[PROOF STATE]
proof (state)
this:
set (comp_min_basis xs) \<subseteq> set (filter (\<lambda>x. x \<noteq> 0) xs)

goal (1 subgoal):
 1. set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
set (comp_min_basis xs) \<subseteq> set (filter (\<lambda>x. x \<noteq> 0) xs)

goal (1 subgoal):
 1. set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}
[PROOF STEP]
have "\<dots> = {x \<in> set xs. x \<noteq> 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (filter (\<lambda>x. x \<noteq> 0) xs) = {x \<in> set xs. x \<noteq> 0}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
set (filter (\<lambda>x. x \<noteq> 0) xs) = {x \<in> set xs. x \<noteq> 0}

goal (1 subgoal):
 1. set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}

goal (1 subgoal):
 1. set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
set (comp_min_basis xs) \<subseteq> {x \<in> set xs. x \<noteq> 0}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Sup_comp_fun:
  "\<Squnion>M \<circ> f = (\<Squnion>m\<in>M. m \<circ> f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> M \<circ> f = (\<Squnion>m\<in>M. m \<circ> f)
[PROOF STEP]
by (simp add: fun_eq_iff image_comp)


[STATEMENT]
lemma ltl_prop_equiv_true_implies_true:
  "x \<sim>\<^sub>P true\<^sub>n \<Longrightarrow> x \<longrightarrow>\<^sub>P y \<Longrightarrow> y \<sim>\<^sub>P true\<^sub>n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<sim>\<^sub>P true\<^sub>n; x \<longrightarrow>\<^sub>P y\<rbrakk> \<Longrightarrow> y \<sim>\<^sub>P true\<^sub>n
[PROOF STEP]
by (simp add: ltl_prop_equiv_def ltl_prop_implies_def)


[STATEMENT]
lemma extract_IPSets_length: "length (extract_IPSets rs) \<le> 2 * length rs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (extract_IPSets rs) \<le> 2 * length rs
[PROOF STEP]
apply(simp add: extract_IPSets_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (mergesort_remdups (extract_src_dst_ips rs [])) \<le> 2 * length rs
[PROOF STEP]
using extract_src_dst_ips_length mergesort_remdups_length
[PROOF STATE]
proof (prove)
using this:
length (extract_src_dst_ips ?rs ?acc) = 2 * length ?rs + length ?acc
length (mergesort_remdups ?as) \<le> length ?as

goal (1 subgoal):
 1. length (mergesort_remdups (extract_src_dst_ips rs [])) \<le> 2 * length rs
[PROOF STEP]
by (metis add.right_neutral list.size(3))


[STATEMENT]
lemma pred_mapping_alt: "pred_mapping Q P = (\<forall>p \<in> dom P. Q (the (P p)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pred_mapping Q P = (\<forall>p\<in>dom P. Q (the (P p)))
[PROOF STEP]
unfolding pred_mapping_def pred_fun_def option.pred_set dom_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. True \<longrightarrow> Ball (set_option (P x)) Q) = (\<forall>p\<in>{a. P a \<noteq> None}. Q (the (P p)))
[PROOF STEP]
by (force split: option.splits)


[STATEMENT]
lemma length_plus_list [rule_format, simp]:
  "\<forall>ys. length(xs +[f] ys) = min(length xs) (length ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>ys. length (xs +[f] ys) = min (length xs) (length ys)
[PROOF STEP]
apply (induct xs)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<forall>ys. length ([] +[f] ys) = min (length []) (length ys)
 2. \<And>a xs. \<forall>ys. length (xs +[f] ys) = min (length xs) (length ys) \<Longrightarrow> \<forall>ys. length (a # xs +[f] ys) = min (length (a # xs)) (length ys)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a xs. \<forall>ys. length (xs +[f] ys) = min (length xs) (length ys) \<Longrightarrow> \<forall>ys. length (a # xs +[f] ys) = min (length (a # xs)) (length ys)
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a xs ys. \<forall>ys. length (xs +[f] ys) = min (length xs) (length ys) \<Longrightarrow> length (a # xs +[f] ys) = min (length (a # xs)) (length ys)
[PROOF STEP]
apply (simp (no_asm_simp) split: list.split)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma sep_add_left_commute:
  assumes a: "a ## b" "b ## c" "a ## c"
  shows "b + (a + c) = a + (b + c)" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b + (a + c) = a + (b + c)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. b + (a + c) = a + (b + c)
[PROOF STEP]
have "?lhs = b + a + c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b + (a + c) = b + a + c
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
a ## b
b ## c
a ## c

goal (1 subgoal):
 1. b + (a + c) = b + a + c
[PROOF STEP]
by (simp add: sep_add_assoc[symmetric] sep_disj_commute)
[PROOF STATE]
proof (state)
this:
b + (a + c) = b + a + c

goal (1 subgoal):
 1. b + (a + c) = a + (b + c)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
b + (a + c) = b + a + c

goal (1 subgoal):
 1. b + (a + c) = a + (b + c)
[PROOF STEP]
have "... = a + b + c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b + a + c = a + b + c
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
a ## b
b ## c
a ## c

goal (1 subgoal):
 1. b + a + c = a + b + c
[PROOF STEP]
by (simp add: sep_add_commute sep_disj_commute)
[PROOF STATE]
proof (state)
this:
b + a + c = a + b + c

goal (1 subgoal):
 1. b + (a + c) = a + (b + c)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
b + a + c = a + b + c

goal (1 subgoal):
 1. b + (a + c) = a + (b + c)
[PROOF STEP]
have "... = ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a + b + c = a + (b + c)
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
a ## b
b ## c
a ## c

goal (1 subgoal):
 1. a + b + c = a + (b + c)
[PROOF STEP]
by (simp add: sep_add_assoc sep_disj_commute)
[PROOF STATE]
proof (state)
this:
a + b + c = a + (b + c)

goal (1 subgoal):
 1. b + (a + c) = a + (b + c)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
b + (a + c) = a + (b + c)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
b + (a + c) = a + (b + c)

goal (1 subgoal):
 1. b + (a + c) = a + (b + c)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
b + (a + c) = a + (b + c)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma delete_edges_as_filter:
    "delete_edges G l = \<lparr> nodesL = nodesL G,  edgesL = [x \<leftarrow> edgesL G. x \<notin> set l] \<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. FiniteListGraph.delete_edges G l = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set l) (edgesL G)\<rparr>
[PROOF STEP]
proof (induction l)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. FiniteListGraph.delete_edges G [] = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set []) (edgesL G)\<rparr>
 2. \<And>a l. FiniteListGraph.delete_edges G l = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set l) (edgesL G)\<rparr> \<Longrightarrow> FiniteListGraph.delete_edges G (a # l) = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set (a # l)) (edgesL G)\<rparr>
[PROOF STEP]
case (Cons f fs)
[PROOF STATE]
proof (state)
this:
FiniteListGraph.delete_edges G fs = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set fs) (edgesL G)\<rparr>

goal (2 subgoals):
 1. FiniteListGraph.delete_edges G [] = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set []) (edgesL G)\<rparr>
 2. \<And>a l. FiniteListGraph.delete_edges G l = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set l) (edgesL G)\<rparr> \<Longrightarrow> FiniteListGraph.delete_edges G (a # l) = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set (a # l)) (edgesL G)\<rparr>
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
FiniteListGraph.delete_edges G fs = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set fs) (edgesL G)\<rparr>

goal (1 subgoal):
 1. FiniteListGraph.delete_edges G (f # fs) = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set (f # fs)) (edgesL G)\<rparr>
[PROOF STEP]
apply (cases f)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>FiniteListGraph.delete_edges G fs = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set fs) (edgesL G)\<rparr>; f = (a, b)\<rbrakk> \<Longrightarrow> FiniteListGraph.delete_edges G (f # fs) = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set (f # fs)) (edgesL G)\<rparr>
[PROOF STEP]
apply (simp add: delete_edges_delete_edge_commute)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>FiniteListGraph.delete_edges G fs = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set fs) (edgesL G)\<rparr>; f = (a, b)\<rbrakk> \<Longrightarrow> FiniteListGraph.delete_edge a b \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set fs) (edgesL G)\<rparr> = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<noteq> (a, b) \<and> x \<notin> set fs) (edgesL G)\<rparr>
[PROOF STEP]
apply (simp add: delete_edge_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>FiniteListGraph.delete_edges G fs = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set fs) (edgesL G)\<rparr>; f = (a, b)\<rbrakk> \<Longrightarrow> filter (\<lambda>x. x \<notin> set fs \<and> (case x of (e1, e2) \<Rightarrow> e1 = a \<longrightarrow> e2 \<noteq> b)) (edgesL G) = filter (\<lambda>x. x \<noteq> (a, b) \<and> x \<notin> set fs) (edgesL G)
[PROOF STEP]
apply (metis (lifting, full_types) prod.exhaust case_prodI split_conv)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
FiniteListGraph.delete_edges G (f # fs) = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set (f # fs)) (edgesL G)\<rparr>

goal (1 subgoal):
 1. FiniteListGraph.delete_edges G [] = \<lparr>nodesL = nodesL G, edgesL = filter (\<lambda>x. x \<notin> set []) (edgesL G)\<rparr>
[PROOF STEP]
qed simp


[STATEMENT]
lemma WtFT_ge_0[simp]: "WtFT cl \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> WtFT cl
[PROOF STEP]
unfolding WtFT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> (\<Sum>n\<in>theFT cl. 1 / real (length cl))
[PROOF STEP]
by (rule sum_nonneg) simp


[STATEMENT]
lemma inj_on_map_lists: assumes "inj_on f A"
  shows "inj_on (map f) (lists A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (map f) (lists A)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> lists A; y \<in> lists A; map f x = map f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
fix xs ys
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> lists A; y \<in> lists A; map f x = map f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
assume "xs \<in> lists A" and "ys \<in> lists A" and "map f xs = map f ys"
[PROOF STATE]
proof (state)
this:
xs \<in> lists A
ys \<in> lists A
map f xs = map f ys

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> lists A; y \<in> lists A; map f x = map f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
have "x = y" if "x \<in> set xs" and "y \<in> set ys" and  "f x =  f y"  for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = y
[PROOF STEP]
using in_listsD[OF \<open>xs \<in> lists A\<close>, rule_format, OF \<open>x \<in> set xs\<close>]
          in_listsD[OF \<open>ys \<in> lists A\<close>, rule_format, OF \<open>y \<in> set ys\<close>]
         \<open>inj_on f A\<close>[unfolded inj_on_def, rule_format, OF _ _ \<open>f x =  f y\<close>]
[PROOF STATE]
proof (prove)
using this:
x \<in> A
y \<in> A
\<lbrakk>x \<in> A; y \<in> A\<rbrakk> \<Longrightarrow> x = y

goal (1 subgoal):
 1. x = y
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> set xs; ?y \<in> set ys; f ?x = f ?y\<rbrakk> \<Longrightarrow> ?x = ?y

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> lists A; y \<in> lists A; map f x = map f y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
from list.inj_map_strong[OF this  \<open>map f xs = map f ys\<close>]
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>\<And>z za. \<lbrakk>z \<in> set xs; za \<in> set ys; f z = f za\<rbrakk> \<Longrightarrow> z \<in> set xs; \<And>z za. \<lbrakk>z \<in> set xs; za \<in> set ys; f z = f za\<rbrakk> \<Longrightarrow> za \<in> set ys; \<And>z za. \<lbrakk>z \<in> set xs; za \<in> set ys; f z = f za\<rbrakk> \<Longrightarrow> f z = f za\<rbrakk> \<Longrightarrow> xs = ys
[PROOF STEP]
show "xs = ys"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>z za. \<lbrakk>z \<in> set xs; za \<in> set ys; f z = f za\<rbrakk> \<Longrightarrow> z \<in> set xs; \<And>z za. \<lbrakk>z \<in> set xs; za \<in> set ys; f z = f za\<rbrakk> \<Longrightarrow> za \<in> set ys; \<And>z za. \<lbrakk>z \<in> set xs; za \<in> set ys; f z = f za\<rbrakk> \<Longrightarrow> f z = f za\<rbrakk> \<Longrightarrow> xs = ys

goal (1 subgoal):
 1. xs = ys
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
xs = ys

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ocondition_False:
    "\<lbrakk> \<And>s. \<not> P s \<rbrakk> \<Longrightarrow> ocondition P L R = R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>s. \<not> P s) \<Longrightarrow> ocondition P L R = R
[PROOF STEP]
by (rule ext, clarsimp simp: ocondition_def)


[STATEMENT]
lemma bij_combine:
  assumes ABCD: "A \<subseteq> B" "C \<subseteq> D"
      and bijf: "bij_betw f A C"
      and bijg: "bij_betw g (B - A) (D - C)"
  obtains h
    where "bij_betw h B D"
      and "\<And>x. x \<in> A \<Longrightarrow> h x = f x"
      and "\<And>x. x \<in> B - A \<Longrightarrow> h x = g x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>h. \<lbrakk>bij_betw h B D; \<And>x. x \<in> A \<Longrightarrow> h x = f x; \<And>x. x \<in> B - A \<Longrightarrow> h x = g x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>h. \<lbrakk>bij_betw h B D; \<And>x. x \<in> A \<Longrightarrow> h x = f x; \<And>x. x \<in> B - A \<Longrightarrow> h x = g x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
let ?h = "\<lambda>x. if x \<in> A then f x else g x"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>h. \<lbrakk>bij_betw h B D; \<And>x. x \<in> A \<Longrightarrow> h x = f x; \<And>x. x \<in> B - A \<Longrightarrow> h x = g x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "inj_on ?h (A \<union> (B - A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>x. if x \<in> A then f x else g x) (A \<union> (B - A))
[PROOF STEP]
proof(rule inj_on_UnI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. inj_on (\<lambda>x. if x \<in> A then f x else g x) A
 2. inj_on (\<lambda>x. if x \<in> A then f x else g x) (B - A)
 3. (\<lambda>x. if x \<in> A then f x else g x) ` (A - (B - A)) \<inter> (\<lambda>x. if x \<in> A then f x else g x) ` (B - A - A) = {}
[PROOF STEP]
from bijf
[PROOF STATE]
proof (chain)
picking this:
bij_betw f A C
[PROOF STEP]
show "inj_on ?h A"
[PROOF STATE]
proof (prove)
using this:
bij_betw f A C

goal (1 subgoal):
 1. inj_on (\<lambda>x. if x \<in> A then f x else g x) A
[PROOF STEP]
by - (rule inj_onI, auto dest: inj_onD bij_betw_imp_inj_on)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x. if x \<in> A then f x else g x) A

goal (2 subgoals):
 1. inj_on (\<lambda>x. if x \<in> A then f x else g x) (B - A)
 2. (\<lambda>x. if x \<in> A then f x else g x) ` (A - (B - A)) \<inter> (\<lambda>x. if x \<in> A then f x else g x) ` (B - A - A) = {}
[PROOF STEP]
from bijg
[PROOF STATE]
proof (chain)
picking this:
bij_betw g (B - A) (D - C)
[PROOF STEP]
show "inj_on ?h (B - A)"
[PROOF STATE]
proof (prove)
using this:
bij_betw g (B - A) (D - C)

goal (1 subgoal):
 1. inj_on (\<lambda>x. if x \<in> A then f x else g x) (B - A)
[PROOF STEP]
by - (rule inj_onI, auto dest: inj_onD bij_betw_imp_inj_on)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x. if x \<in> A then f x else g x) (B - A)

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> A then f x else g x) ` (A - (B - A)) \<inter> (\<lambda>x. if x \<in> A then f x else g x) ` (B - A - A) = {}
[PROOF STEP]
from bijf bijg
[PROOF STATE]
proof (chain)
picking this:
bij_betw f A C
bij_betw g (B - A) (D - C)
[PROOF STEP]
show "?h ` (A - (B - A)) \<inter> ?h ` (B - A - A) = {}"
[PROOF STATE]
proof (prove)
using this:
bij_betw f A C
bij_betw g (B - A) (D - C)

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> A then f x else g x) ` (A - (B - A)) \<inter> (\<lambda>x. if x \<in> A then f x else g x) ` (B - A - A) = {}
[PROOF STEP]
by (simp, blast dest: bij_betw_onto)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> A then f x else g x) ` (A - (B - A)) \<inter> (\<lambda>x. if x \<in> A then f x else g x) ` (B - A - A) = {}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x. if x \<in> A then f x else g x) (A \<union> (B - A))

goal (1 subgoal):
 1. (\<And>h. \<lbrakk>bij_betw h B D; \<And>x. x \<in> A \<Longrightarrow> h x = f x; \<And>x. x \<in> B - A \<Longrightarrow> h x = g x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
with ABCD
[PROOF STATE]
proof (chain)
picking this:
A \<subseteq> B
C \<subseteq> D
inj_on (\<lambda>x. if x \<in> A then f x else g x) (A \<union> (B - A))
[PROOF STEP]
have "inj_on ?h B"
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> B
C \<subseteq> D
inj_on (\<lambda>x. if x \<in> A then f x else g x) (A \<union> (B - A))

goal (1 subgoal):
 1. inj_on (\<lambda>x. if x \<in> A then f x else g x) B
[PROOF STEP]
by (auto iff: Un_absorb1)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x. if x \<in> A then f x else g x) B

goal (1 subgoal):
 1. (\<And>h. \<lbrakk>bij_betw h B D; \<And>x. x \<in> A \<Longrightarrow> h x = f x; \<And>x. x \<in> B - A \<Longrightarrow> h x = g x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>x. if x \<in> A then f x else g x) B

goal (1 subgoal):
 1. (\<And>h. \<lbrakk>bij_betw h B D; \<And>x. x \<in> A \<Longrightarrow> h x = f x; \<And>x. x \<in> B - A \<Longrightarrow> h x = g x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "?h ` B = D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> A then f x else g x) ` B = D
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. if x \<in> A then f x else g x) ` B = D
[PROOF STEP]
from ABCD
[PROOF STATE]
proof (chain)
picking this:
A \<subseteq> B
C \<subseteq> D
[PROOF STEP]
have "?h ` B = f ` A \<union> g ` (B - A)"
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> B
C \<subseteq> D

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> A then f x else g x) ` B = f ` A \<union> g ` (B - A)
[PROOF STEP]
by (auto iff: image_Un Un_absorb1)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> A then f x else g x) ` B = f ` A \<union> g ` (B - A)

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> A then f x else g x) ` B = D
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> A then f x else g x) ` B = f ` A \<union> g ` (B - A)

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> A then f x else g x) ` B = D
[PROOF STEP]
from ABCD bijf bijg
[PROOF STATE]
proof (chain)
picking this:
A \<subseteq> B
C \<subseteq> D
bij_betw f A C
bij_betw g (B - A) (D - C)
[PROOF STEP]
have "\<dots> = D"
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> B
C \<subseteq> D
bij_betw f A C
bij_betw g (B - A) (D - C)

goal (1 subgoal):
 1. f ` A \<union> g ` (B - A) = D
[PROOF STEP]
by (blast dest: bij_betw_onto)
[PROOF STATE]
proof (state)
this:
f ` A \<union> g ` (B - A) = D

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> A then f x else g x) ` B = D
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. if x \<in> A then f x else g x) ` B = D
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. if x \<in> A then f x else g x) ` B = D

goal (1 subgoal):
 1. (\<lambda>x. if x \<in> A then f x else g x) ` B = D
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> A then f x else g x) ` B = D

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. if x \<in> A then f x else g x) ` B = D

goal (1 subgoal):
 1. (\<And>h. \<lbrakk>bij_betw h B D; \<And>x. x \<in> A \<Longrightarrow> h x = f x; \<And>x. x \<in> B - A \<Longrightarrow> h x = g x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
inj_on (\<lambda>x. if x \<in> A then f x else g x) B
(\<lambda>x. if x \<in> A then f x else g x) ` B = D
[PROOF STEP]
have "bij_betw ?h B D"
              and "\<And>x. x \<in> A \<Longrightarrow> ?h x = f x"
              and "\<And>x. x \<in> B - A \<Longrightarrow> ?h x = g x"
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>x. if x \<in> A then f x else g x) B
(\<lambda>x. if x \<in> A then f x else g x) ` B = D

goal (1 subgoal):
 1. bij_betw (\<lambda>x. if x \<in> A then f x else g x) B D &&& (\<And>x. x \<in> A \<Longrightarrow> (if x \<in> A then f x else g x) = f x) &&& (\<And>x. x \<in> B - A \<Longrightarrow> (if x \<in> A then f x else g x) = g x)
[PROOF STEP]
unfolding bij_betw_def
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>x. if x \<in> A then f x else g x) B
(\<lambda>x. if x \<in> A then f x else g x) ` B = D

goal (1 subgoal):
 1. inj_on (\<lambda>x. if x \<in> A then f x else g x) B \<and> (\<lambda>x. if x \<in> A then f x else g x) ` B = D &&& (\<And>x. x \<in> A \<Longrightarrow> (if x \<in> A then f x else g x) = f x) &&& (\<And>x. x \<in> B - A \<Longrightarrow> (if x \<in> A then f x else g x) = g x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
bij_betw (\<lambda>x. if x \<in> A then f x else g x) B D
?x \<in> A \<Longrightarrow> (if ?x \<in> A then f ?x else g ?x) = f ?x
?x \<in> B - A \<Longrightarrow> (if ?x \<in> A then f ?x else g ?x) = g ?x

goal (1 subgoal):
 1. (\<And>h. \<lbrakk>bij_betw h B D; \<And>x. x \<in> A \<Longrightarrow> h x = f x; \<And>x. x \<in> B - A \<Longrightarrow> h x = g x\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
thus thesis
[PROOF STATE]
proof (prove)
using this:
bij_betw (\<lambda>x. if x \<in> A then f x else g x) B D
?x \<in> A \<Longrightarrow> (if ?x \<in> A then f ?x else g ?x) = f ?x
?x \<in> B - A \<Longrightarrow> (if ?x \<in> A then f ?x else g ?x) = g ?x

goal (1 subgoal):
 1. thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma content_field_poly:
  fixes f :: "'a :: {field,semiring_gcd} poly"
  shows "content f = (if f = 0 then 0 else 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content f = (if f = 0 then 0::'a else (1::'a))
[PROOF STEP]
by(induct f, auto simp: dvd_field_iff is_unit_normalize)


[STATEMENT]
lemma imgTr11:"\<lbrakk>Group F; Group G; f \<in> gHom F G; F \<guillemotright> H\<rbrakk> \<Longrightarrow> G \<guillemotright> (f ` H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G; F \<guillemotright> H \<rbrakk> \<Longrightarrow> G \<guillemotright> f ` H
[PROOF STEP]
apply (frule gHom_func[of "F" "G" "f"], assumption+,
       frule Group.sg_subset[of "F" "H"], assumption+,
       frule image_sub[of "f" "carrier F" "carrier G" "H"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G; F \<guillemotright> H ; f \<in> carrier F \<rightarrow> carrier G; H \<subseteq> carrier F; f ` H \<subseteq> carrier G\<rbrakk> \<Longrightarrow> G \<guillemotright> f ` H
[PROOF STEP]
apply (rule Group.sg_condition[of "G" "f ` H"], assumption+,
       frule imgTr10[of "F" "G" "f" "H"], assumption+,
       rule nonempty, assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G; F \<guillemotright> H ; f \<in> carrier F \<rightarrow> carrier G; H \<subseteq> carrier F; f ` H \<subseteq> carrier G\<rbrakk> \<Longrightarrow> \<forall>a b. a \<in> f ` H \<and> b \<in> f ` H \<longrightarrow> a \<cdot>\<^bsub>G\<^esub> \<rho>\<^bsub>G\<^esub> b \<in> f ` H
[PROOF STEP]
apply ((rule allI)+, rule impI, erule conjE,
       frule_tac u = b in imgTr9[of "F" "G" "f" "H"], assumption+,
       frule_tac u = a and v = "\<rho>\<^bsub>G\<^esub> b" in imgTr8[of "F" "G" "f"], assumption+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma finite_imageD2: "\<lbrakk> finite (f ` A); inj_on f (A - B); finite B \<rbrakk> \<Longrightarrow> finite A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite (f ` A); inj_on f (A - B); finite B\<rbrakk> \<Longrightarrow> finite A
[PROOF STEP]
by (metis Diff_subset finite_Diff2 image_mono inj_on_finite)


[STATEMENT]
lemma "((\<lambda>x::real. (exp (4*x*exp (-x) /
                    (1/exp x + 1/exp (2*x^2/(x+1)))) - exp x) / ((exp x)^4)) \<longlongrightarrow> 1) at_top "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. (exp (4 * x * exp (- x) / (1 / exp x + 1 / exp (2 * x\<^sup>2 / (x + 1)))) - exp x) / exp x ^ 4) \<longlongrightarrow> 1) at_top
[PROOF STEP]
by real_asymp


[STATEMENT]
lemma older_seniors_recursive_card:
  fixes x n
  defines "os \<equiv> older_seniors x n"
  assumes "os \<noteq> {}"
  shows "card os = Suc (card (older_seniors (Max os) n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card os = Suc (card (older_seniors (Max os) n))
[PROOF STEP]
by (metis older_seniors_recursive assms Un_empty_left Un_insert_left card_insert_disjoint older_seniors_finite older_seniors_not_self_referential_2)


[STATEMENT]
lemma param_glist_insert[param]:
    "(glist_insert, glist_insert) \<in> (R\<rightarrow>R\<rightarrow>Id) \<rightarrow> R \<rightarrow> \<langle>R\<rangle>list_rel \<rightarrow> \<langle>R\<rangle>list_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (glist_insert, glist_insert) \<in> (R \<rightarrow> R \<rightarrow> bool_rel) \<rightarrow> R \<rightarrow> \<langle>R\<rangle>list_rel \<rightarrow> \<langle>R\<rangle>list_rel
[PROOF STEP]
unfolding glist_insert_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>eq x xs. if glist_member eq x xs then xs else x # xs, \<lambda>eq x xs. if glist_member eq x xs then xs else x # xs) \<in> (R \<rightarrow> R \<rightarrow> bool_rel) \<rightarrow> R \<rightarrow> \<langle>R\<rangle>list_rel \<rightarrow> \<langle>R\<rangle>list_rel
[PROOF STEP]
by (parametricity)


[STATEMENT]
lemma nba_rel_converse[simp]: "(\<langle>L, S\<rangle> nba_rel)\<inverse> = \<langle>L\<inverse>, S\<inverse>\<rangle> nba_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<langle>L, S\<rangle>nba_rel)\<inverse> = \<langle>L\<inverse>, S\<inverse>\<rangle>nba_rel
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<langle>L, S\<rangle>nba_rel)\<inverse> = \<langle>L\<inverse>, S\<inverse>\<rangle>nba_rel
[PROOF STEP]
have 1: "\<langle>L\<rangle> set_rel = (\<langle>L\<inverse>\<rangle> set_rel)\<inverse>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>L\<rangle>set_rel = (\<langle>L\<inverse>\<rangle>set_rel)\<inverse>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<langle>L\<rangle>set_rel = (\<langle>L\<inverse>\<rangle>set_rel)\<inverse>

goal (1 subgoal):
 1. (\<langle>L, S\<rangle>nba_rel)\<inverse> = \<langle>L\<inverse>, S\<inverse>\<rangle>nba_rel
[PROOF STEP]
have 2: "\<langle>S\<rangle> set_rel = (\<langle>S\<inverse>\<rangle> set_rel)\<inverse>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>S\<rangle>set_rel = (\<langle>S\<inverse>\<rangle>set_rel)\<inverse>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<langle>S\<rangle>set_rel = (\<langle>S\<inverse>\<rangle>set_rel)\<inverse>

goal (1 subgoal):
 1. (\<langle>L, S\<rangle>nba_rel)\<inverse> = \<langle>L\<inverse>, S\<inverse>\<rangle>nba_rel
[PROOF STEP]
have 3: "L \<rightarrow> S \<rightarrow> \<langle>S\<rangle> set_rel = (L\<inverse> \<rightarrow> S\<inverse> \<rightarrow> \<langle>S\<inverse>\<rangle> set_rel)\<inverse>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L \<rightarrow> S \<rightarrow> \<langle>S\<rangle>set_rel = (L\<inverse> \<rightarrow> S\<inverse> \<rightarrow> \<langle>S\<inverse>\<rangle>set_rel)\<inverse>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
L \<rightarrow> S \<rightarrow> \<langle>S\<rangle>set_rel = (L\<inverse> \<rightarrow> S\<inverse> \<rightarrow> \<langle>S\<inverse>\<rangle>set_rel)\<inverse>

goal (1 subgoal):
 1. (\<langle>L, S\<rangle>nba_rel)\<inverse> = \<langle>L\<inverse>, S\<inverse>\<rangle>nba_rel
[PROOF STEP]
have 4: "S \<rightarrow> bool_rel = (S\<inverse> \<rightarrow> bool_rel)\<inverse>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S \<rightarrow> bool_rel = (S\<inverse> \<rightarrow> bool_rel)\<inverse>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
S \<rightarrow> bool_rel = (S\<inverse> \<rightarrow> bool_rel)\<inverse>

goal (1 subgoal):
 1. (\<langle>L, S\<rangle>nba_rel)\<inverse> = \<langle>L\<inverse>, S\<inverse>\<rangle>nba_rel
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<langle>L, S\<rangle>nba_rel)\<inverse> = \<langle>L\<inverse>, S\<inverse>\<rangle>nba_rel
[PROOF STEP]
unfolding nba_rel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(A\<^sub>1, A\<^sub>2). (alphabet A\<^sub>1, alphabet A\<^sub>2) \<in> \<langle>L\<rangle>set_rel \<and> (initial A\<^sub>1, initial A\<^sub>2) \<in> \<langle>S\<rangle>set_rel \<and> (transition A\<^sub>1, transition A\<^sub>2) \<in> L \<rightarrow> S \<rightarrow> \<langle>S\<rangle>set_rel \<and> (accepting A\<^sub>1, accepting A\<^sub>2) \<in> S \<rightarrow> bool_rel}\<inverse> = {(A\<^sub>1, A\<^sub>2). (alphabet A\<^sub>1, alphabet A\<^sub>2) \<in> \<langle>L\<inverse>\<rangle>set_rel \<and> (initial A\<^sub>1, initial A\<^sub>2) \<in> \<langle>S\<inverse>\<rangle>set_rel \<and> (transition A\<^sub>1, transition A\<^sub>2) \<in> L\<inverse> \<rightarrow> S\<inverse> \<rightarrow> \<langle>S\<inverse>\<rangle>set_rel \<and> (accepting A\<^sub>1, accepting A\<^sub>2) \<in> S\<inverse> \<rightarrow> bool_rel}
[PROOF STEP]
unfolding 3
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(A\<^sub>1, A\<^sub>2). (alphabet A\<^sub>1, alphabet A\<^sub>2) \<in> \<langle>L\<rangle>set_rel \<and> (initial A\<^sub>1, initial A\<^sub>2) \<in> \<langle>S\<rangle>set_rel \<and> (transition A\<^sub>1, transition A\<^sub>2) \<in> (L\<inverse> \<rightarrow> S\<inverse> \<rightarrow> \<langle>S\<inverse>\<rangle>set_rel)\<inverse> \<and> (accepting A\<^sub>1, accepting A\<^sub>2) \<in> S \<rightarrow> bool_rel}\<inverse> = {(A\<^sub>1, A\<^sub>2). (alphabet A\<^sub>1, alphabet A\<^sub>2) \<in> \<langle>L\<inverse>\<rangle>set_rel \<and> (initial A\<^sub>1, initial A\<^sub>2) \<in> \<langle>S\<inverse>\<rangle>set_rel \<and> (transition A\<^sub>1, transition A\<^sub>2) \<in> L\<inverse> \<rightarrow> S\<inverse> \<rightarrow> \<langle>S\<inverse>\<rangle>set_rel \<and> (accepting A\<^sub>1, accepting A\<^sub>2) \<in> S\<inverse> \<rightarrow> bool_rel}
[PROOF STEP]
unfolding 1 2 4
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(A\<^sub>1, A\<^sub>2). (alphabet A\<^sub>1, alphabet A\<^sub>2) \<in> (\<langle>L\<inverse>\<rangle>set_rel)\<inverse> \<and> (initial A\<^sub>1, initial A\<^sub>2) \<in> (\<langle>S\<inverse>\<rangle>set_rel)\<inverse> \<and> (transition A\<^sub>1, transition A\<^sub>2) \<in> (L\<inverse> \<rightarrow> S\<inverse> \<rightarrow> \<langle>S\<inverse>\<rangle>set_rel)\<inverse> \<and> (accepting A\<^sub>1, accepting A\<^sub>2) \<in> (S\<inverse> \<rightarrow> bool_rel)\<inverse>}\<inverse> = {(A\<^sub>1, A\<^sub>2). (alphabet A\<^sub>1, alphabet A\<^sub>2) \<in> \<langle>L\<inverse>\<rangle>set_rel \<and> (initial A\<^sub>1, initial A\<^sub>2) \<in> \<langle>S\<inverse>\<rangle>set_rel \<and> (transition A\<^sub>1, transition A\<^sub>2) \<in> L\<inverse> \<rightarrow> S\<inverse> \<rightarrow> \<langle>S\<inverse>\<rangle>set_rel \<and> (accepting A\<^sub>1, accepting A\<^sub>2) \<in> S\<inverse> \<rightarrow> bool_rel}
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(\<langle>L, S\<rangle>nba_rel)\<inverse> = \<langle>L\<inverse>, S\<inverse>\<rangle>nba_rel

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma starlike_imp_simply_connected:
  fixes S :: "'a::real_normed_vector set"
  shows "starlike S \<Longrightarrow> simply_connected S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. starlike S \<Longrightarrow> simply_connected S
[PROOF STEP]
by (simp add: contractible_imp_simply_connected starlike_imp_contractible)


[STATEMENT]
lemma analytically_valid_y:
  assumes "analytically_valid s F i"
  shows "(\<lambda>x. integral UNIV (\<lambda>y. (partial_vector_derivative F i) (y, x) * (indicator s (y, x)))) \<in> borel_measurable lborel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. integral UNIV (\<lambda>y. partial_vector_derivative F i (y, x) * indicator s (y, x))) \<in> borel_measurable lborel
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. integral UNIV (\<lambda>y. partial_vector_derivative F i (y, x) * indicator s (y, x))) \<in> borel_measurable lborel
[PROOF STEP]
have "{(1::real, 0::real), (0, 1)} - {(1, 0)} = {(0::real,1::real)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {(1, 0), (0, 1)} - {(1, 0)} = {(0, 1)}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
{(1, 0), (0, 1)} - {(1, 0)} = {(0, 1)}

goal (1 subgoal):
 1. (\<lambda>x. integral UNIV (\<lambda>y. partial_vector_derivative F i (y, x) * indicator s (y, x))) \<in> borel_measurable lborel
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
analytically_valid s F i
{(1, 0), (0, 1)} - {(1, 0)} = {(0, 1)}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
analytically_valid s F i
{(1, 0), (0, 1)} - {(1, 0)} = {(0, 1)}

goal (1 subgoal):
 1. (\<lambda>x. integral UNIV (\<lambda>y. partial_vector_derivative F i (y, x) * indicator s (y, x))) \<in> borel_measurable lborel
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
analytically_valid s F i
{(1, 0), (0, 1)} - {(1, 0)} = {(0, 1)}
analytically_valid s F i

goal (1 subgoal):
 1. (\<lambda>x. integral UNIV (\<lambda>y. partial_vector_derivative F i (y, x) * indicator s (y, x))) \<in> borel_measurable lborel
[PROOF STEP]
by(simp add: real_pair_basis analytically_valid_def i_is_x_axis j_is_y_axis)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. integral UNIV (\<lambda>y. partial_vector_derivative F i (y, x) * indicator s (y, x))) \<in> borel_measurable lborel

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inv_blaschke:
  assumes "cmod a \<noteq> 1"
  shows "blaschke a + inv_blaschke a = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. blaschke a + inv_blaschke a = 0
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_comp (blaschke a) (blaschke (- a)) = id_moebius
[PROOF STEP]
apply (transfer, transfer)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. moebius_cmat_eq (moebius_comp_cmat (blaschke_cmat a) (blaschke_cmat (- a))) id_moebius_cmat
[PROOF STEP]
by auto (rule_tac x="1/(1 - a*cnj a)" in exI, simp)


[STATEMENT]
lemma integral_scale_measure:
  assumes "integrable M f" "r < \<top>"
  shows "integral\<^sup>L (scale_measure r M) f = enn2real r * integral\<^sup>L M f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L (scale_measure r M) f = enn2real r * integral\<^sup>L M f
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
integrable M f
r < \<top>

goal (1 subgoal):
 1. integral\<^sup>L (scale_measure r M) f = enn2real r * integral\<^sup>L M f
[PROOF STEP]
apply(subst (1 2) real_lebesgue_integral_def)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>integrable M f; r < \<top>\<rbrakk> \<Longrightarrow> integrable M f
 2. \<lbrakk>integrable M f; r < \<top>\<rbrakk> \<Longrightarrow> integrable (scale_measure r M) f
 3. \<lbrakk>integrable M f; r < \<top>\<rbrakk> \<Longrightarrow> enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>scale_measure r M) - enn2real (\<integral>\<^sup>+ x. ennreal (- f x) \<partial>scale_measure r M) = enn2real r * (enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M) - enn2real (\<integral>\<^sup>+ x. ennreal (- f x) \<partial>M))
[PROOF STEP]
apply(simp_all add: nn_integral_scale_measure ennreal_enn2real_if)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>integrable M f; r < \<top>\<rbrakk> \<Longrightarrow> enn2real (r * \<integral>\<^sup>+ x. ennreal (f x) \<partial>M) - enn2real (r * \<integral>\<^sup>+ x. ennreal (- f x) \<partial>M) = enn2real r * (enn2real (\<integral>\<^sup>+ x. ennreal (f x) \<partial>M) - enn2real (\<integral>\<^sup>+ x. ennreal (- f x) \<partial>M))
[PROOF STEP]
by(auto simp add: ennreal_mult_less_top ennreal_less_top_iff ennreal_mult_eq_top_iff enn2real_mult right_diff_distrib elim!: integrableE)


[STATEMENT]
lemma make_list_notP:
  "\<lbrakk>(\<forall>x \<in> set acc. \<not>P x) \<or> P (last acc)\<rbrakk>
    \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not>P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
proof(induction P acc xs rule: make_list_P.induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>P acc xs. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
case (1 P acc xs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>List.extract P xs = Some ?x2.0; (?x, ?y) = ?x2.0; (?xa, ?ya) = ?y; (\<forall>x\<in>set (combine_lists_P P ?xa (rev ?x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P ?xa (rev ?x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya = y # ys \<and> P y)
(\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc)

goal (1 subgoal):
 1. \<And>P acc xs. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>List.extract P xs = Some ?x2.0; (?x, ?y) = ?x2.0; (?xa, ?ya) = ?y; (\<forall>x\<in>set (combine_lists_P P ?xa (rev ?x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P ?xa (rev ?x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya = y # ys \<and> P y)
(\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>List.extract P xs = Some ?x2.0; (?x, ?y) = ?x2.0; (?xa, ?ya) = ?y; (\<forall>x\<in>set (combine_lists_P P ?xa (rev ?x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P ?xa (rev ?x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya = y # ys \<and> P y)
(\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc)

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
proof(cases "List.extract P xs")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc); List.extract P xs = None\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
 2. \<And>a. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc); List.extract P xs = Some a\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
case None
[PROOF STATE]
proof (state)
this:
List.extract P xs = None

goal (2 subgoals):
 1. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc); List.extract P xs = None\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
 2. \<And>a. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc); List.extract P xs = Some a\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
List.extract P xs = None
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
List.extract P xs = None

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
proof(cases "\<forall>x \<in> set acc. \<not>P x")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>List.extract P xs = None; \<forall>x\<in>set acc. \<not> P x\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
 2. \<lbrakk>List.extract P xs = None; \<not> (\<forall>x\<in>set acc. \<not> P x)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>set acc. \<not> P x

goal (2 subgoals):
 1. \<lbrakk>List.extract P xs = None; \<forall>x\<in>set acc. \<not> P x\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
 2. \<lbrakk>List.extract P xs = None; \<not> (\<forall>x\<in>set acc. \<not> P x)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
from None
[PROOF STATE]
proof (chain)
picking this:
List.extract P xs = None
[PROOF STEP]
have "\<forall>x \<in> set xs. \<not> P x"
[PROOF STATE]
proof (prove)
using this:
List.extract P xs = None

goal (1 subgoal):
 1. \<forall>x\<in>set xs. \<not> P x
[PROOF STEP]
by (simp add: extract_None_iff)
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>set xs. \<not> P x

goal (2 subgoals):
 1. \<lbrakk>List.extract P xs = None; \<forall>x\<in>set acc. \<not> P x\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
 2. \<lbrakk>List.extract P xs = None; \<not> (\<forall>x\<in>set acc. \<not> P x)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>set xs. \<not> P x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>set xs. \<not> P x

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
using True "1.prems" None
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>set xs. \<not> P x
\<forall>x\<in>set acc. \<not> P x
(\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc)
List.extract P xs = None

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)

goal (1 subgoal):
 1. \<lbrakk>List.extract P xs = None; \<not> (\<forall>x\<in>set acc. \<not> P x)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>List.extract P xs = None; \<not> (\<forall>x\<in>set acc. \<not> P x)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>x\<in>set acc. \<not> P x)

goal (1 subgoal):
 1. \<lbrakk>List.extract P xs = None; \<not> (\<forall>x\<in>set acc. \<not> P x)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>x\<in>set acc. \<not> P x)
[PROOF STEP]
have "acc \<noteq> []"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x\<in>set acc. \<not> P x)

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

goal (1 subgoal):
 1. \<lbrakk>List.extract P xs = None; \<not> (\<forall>x\<in>set acc. \<not> P x)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
acc \<noteq> []
[PROOF STEP]
have "make_list_P P acc xs = last acc # rev (butlast acc) @ xs"
[PROOF STATE]
proof (prove)
using this:
acc \<noteq> []

goal (1 subgoal):
 1. make_list_P P acc xs = last acc # rev (butlast acc) @ xs
[PROOF STEP]
using None
[PROOF STATE]
proof (prove)
using this:
acc \<noteq> []
List.extract P xs = None

goal (1 subgoal):
 1. make_list_P P acc xs = last acc # rev (butlast acc) @ xs
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
make_list_P P acc xs = last acc # rev (butlast acc) @ xs

goal (1 subgoal):
 1. \<lbrakk>List.extract P xs = None; \<not> (\<forall>x\<in>set acc. \<not> P x)\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
make_list_P P acc xs = last acc # rev (butlast acc) @ xs
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
make_list_P P acc xs = last acc # rev (butlast acc) @ xs

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
using False "1.prems"
[PROOF STATE]
proof (prove)
using this:
make_list_P P acc xs = last acc # rev (butlast acc) @ xs
\<not> (\<forall>x\<in>set acc. \<not> P x)
(\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc)

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)

goal (1 subgoal):
 1. \<And>a. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc); List.extract P xs = Some a\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc); List.extract P xs = Some a\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
case (Some a)
[PROOF STATE]
proof (state)
this:
List.extract P xs = Some a

goal (1 subgoal):
 1. \<And>a. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc); List.extract P xs = Some a\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
List.extract P xs = Some a
[PROOF STEP]
obtain as x bs where x_def[simp]: "a = (as,x,bs)"
[PROOF STATE]
proof (prove)
using this:
List.extract P xs = Some a

goal (1 subgoal):
 1. (\<And>as x bs. a = (as, x, bs) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by(cases a) auto
[PROOF STATE]
proof (state)
this:
a = (as, x, bs)

goal (1 subgoal):
 1. \<And>a. \<lbrakk>\<And>x2 x y xa ya. \<lbrakk>List.extract P xs = Some x2; (x, y) = x2; (xa, ya) = y; (\<forall>x\<in>set (combine_lists_P P xa (rev x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P xa (rev x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P xa (rev x @ acc)) ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P xa (rev x @ acc)) ya = y # ys \<and> P y); (\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc); List.extract P xs = Some a\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
proof(cases "\<forall>x \<in> set acc. \<not>P x")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>x\<in>set acc. \<not> P x \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
 2. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>set acc. \<not> P x

goal (2 subgoals):
 1. \<forall>x\<in>set acc. \<not> P x \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
 2. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>set acc. \<not> P x
[PROOF STEP]
have "\<forall>x \<in> set (rev as @ acc). \<not>P x"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>set acc. \<not> P x

goal (1 subgoal):
 1. \<forall>x\<in>set (rev as @ acc). \<not> P x
[PROOF STEP]
using Some
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>set acc. \<not> P x
List.extract P xs = Some a

goal (1 subgoal):
 1. \<forall>x\<in>set (rev as @ acc). \<not> P x
[PROOF STEP]
by (auto simp: extract_Some_iff)
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>set (rev as @ acc). \<not> P x

goal (2 subgoals):
 1. \<forall>x\<in>set acc. \<not> P x \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
 2. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>set (rev as @ acc). \<not> P x
[PROOF STEP]
have "(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x)
                \<or> P (last (combine_lists_P P x (rev as @ acc)))"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>set (rev as @ acc). \<not> P x

goal (1 subgoal):
 1. (\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))
[PROOF STEP]
using combine_lists_notP[of "rev as @ acc" P]
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>set (rev as @ acc). \<not> P x
\<forall>x\<in>set (rev as @ acc). \<not> P x \<Longrightarrow> (\<exists>x. combine_lists_P P ?y (rev as @ acc) = [x]) \<or> (\<forall>x\<in>set (combine_lists_P P ?y (rev as @ acc)). \<not> P x)

goal (1 subgoal):
 1. (\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))

goal (2 subgoals):
 1. \<forall>x\<in>set acc. \<not> P x \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
 2. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
using "1.IH" Some
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))
\<lbrakk>List.extract P xs = Some ?x2.0; (?x, ?y) = ?x2.0; (?xa, ?ya) = ?y; (\<forall>x\<in>set (combine_lists_P P ?xa (rev ?x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P ?xa (rev ?x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya = y # ys \<and> P y)
List.extract P xs = Some a

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>x\<in>set acc. \<not> P x)

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>x\<in>set acc. \<not> P x)
[PROOF STEP]
have "P (last acc) \<and> acc \<noteq> []"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x\<in>set acc. \<not> P x)

goal (1 subgoal):
 1. P (last acc) \<and> acc \<noteq> []
[PROOF STEP]
using "1.prems"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>x\<in>set acc. \<not> P x)
(\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc)

goal (1 subgoal):
 1. P (last acc) \<and> acc \<noteq> []
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P (last acc) \<and> acc \<noteq> []

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P (last acc) \<and> acc \<noteq> []
[PROOF STEP]
have "P (last (rev as @ acc))"
[PROOF STATE]
proof (prove)
using this:
P (last acc) \<and> acc \<noteq> []

goal (1 subgoal):
 1. P (last (rev as @ acc))
[PROOF STEP]
using "1.prems"
[PROOF STATE]
proof (prove)
using this:
P (last acc) \<and> acc \<noteq> []
(\<forall>x\<in>set acc. \<not> P x) \<or> P (last acc)

goal (1 subgoal):
 1. P (last (rev as @ acc))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P (last (rev as @ acc))

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
P (last (rev as @ acc))
[PROOF STEP]
have "(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x)
                \<or> P (last (combine_lists_P P x (rev as @ acc)))"
[PROOF STATE]
proof (prove)
using this:
P (last (rev as @ acc))

goal (1 subgoal):
 1. (\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))
[PROOF STEP]
using combine_lists_lastP[of P]
[PROOF STATE]
proof (prove)
using this:
P (last (rev as @ acc))
P (last ?xs) \<Longrightarrow> (\<exists>x. combine_lists_P P ?y ?xs = [x]) \<or> P (last (combine_lists_P P ?y ?xs))

goal (1 subgoal):
 1. (\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))

goal (1 subgoal):
 1. \<not> (\<forall>x\<in>set acc. \<not> P x) \<Longrightarrow> (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
using "1.IH" Some
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>set (combine_lists_P P x (rev as @ acc)). \<not> P x) \<or> P (last (combine_lists_P P x (rev as @ acc)))
\<lbrakk>List.extract P xs = Some ?x2.0; (?x, ?y) = ?x2.0; (?xa, ?ya) = ?y; (\<forall>x\<in>set (combine_lists_P P ?xa (rev ?x @ acc)). \<not> P x) \<or> P (last (combine_lists_P P ?xa (rev ?x @ acc)))\<rbrakk> \<Longrightarrow> (\<forall>x\<in>set (make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya). \<not> P x) \<or> (\<exists>y ys. make_list_P P (combine_lists_P P ?xa (rev ?x @ acc)) ?ya = y # ys \<and> P y)
List.extract P xs = Some a

goal (1 subgoal):
 1. (\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<forall>x\<in>set (make_list_P P acc xs). \<not> P x) \<or> (\<exists>y ys. make_list_P P acc xs = y # ys \<and> P y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma traceOf_append_sstep: "traceOf s (al @ al1) = traceOf s al @ traceOf (snd (sstep s al)) al1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. traceOf s (al @ al1) = traceOf s al @ traceOf (snd (sstep s al)) al1
[PROOF STEP]
by (induction al arbitrary: s al1) (auto split: prod.splits)


[STATEMENT]
lemma llist_all2_same [simp]: "llist_all2 P xs xs \<longleftrightarrow> (\<forall>x\<in>lset xs. P x x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. llist_all2 P xs xs = (\<forall>x\<in>lset xs. P x x)
[PROOF STEP]
by(auto simp add: llist_all2_conv_all_lnth in_lset_conv_lnth Ball_def)


[STATEMENT]
lemma subspace_tangent_space: "subspace (tangent_space p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subspace (tangent_space p)
[PROOF STEP]
unfolding tangent_space_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subspace ({X. is_derivation X p} \<inter> Collect (extensional0 diff_fun_space))
[PROOF STEP]
by (simp add: subspace_inter subspace_is_derivation subspace_extensional0)


[STATEMENT]
lemma singleton_table_wf_tuple[simp]: "V = {i} \<Longrightarrow> x \<in> singleton_table n i z \<Longrightarrow> wf_tuple n V x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>V = {i}; x \<in> singleton_table n i z\<rbrakk> \<Longrightarrow> wf_tuple n V x
[PROOF STEP]
unfolding singleton_table_def wf_tuple_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>V = {i}; x \<in> {tabulate (\<lambda>j. if i = j then Some z else None) 0 n}\<rbrakk> \<Longrightarrow> length x = n \<and> (\<forall>i<n. (x ! i = None) = (i \<notin> V))
[PROOF STEP]
by simp


[STATEMENT]
lemma sequent_intuitonistic_semantics: "\<Turnstile> \<Gamma> \<Rightarrow> {#\<delta>#} \<longleftrightarrow> set_mset \<Gamma> \<TTurnstile> \<delta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Turnstile> \<Gamma> \<Rightarrow> \<delta>, {#} = set_mset \<Gamma> \<TTurnstile> \<delta>
[PROOF STEP]
unfolding sequent_semantics_def entailment_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>A. (\<forall>\<gamma>\<in>#\<Gamma>. A \<Turnstile> \<gamma>) \<longrightarrow> (\<exists>\<delta>\<in>#\<delta>, {#}. A \<Turnstile> \<delta>)) = (\<forall>\<A>. (\<forall>G\<in>#\<Gamma>. \<A> \<Turnstile> G) \<longrightarrow> \<A> \<Turnstile> \<delta>)
[PROOF STEP]
by simp


[STATEMENT]
lemma mult_map_poly_imp_map_poly:
  assumes "map_poly complex_of_real q = r * map_poly complex_of_real p"
          "p \<noteq> 0"
  shows "r = map_poly complex_of_real (map_poly Re r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
have h: "Im \<circ> (*) \<i> \<circ> complex_of_real = id"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Im \<circ> (*) \<i> \<circ> complex_of_real = id
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
Im \<circ> (*) \<i> \<circ> complex_of_real = id

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
have "map_poly complex_of_real q = r * map_poly complex_of_real p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly complex_of_real q = r * map_poly complex_of_real p
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
map_poly complex_of_real q = r * map_poly complex_of_real p
p \<noteq> 0

goal (1 subgoal):
 1. map_poly complex_of_real q = r * map_poly complex_of_real p
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
map_poly complex_of_real q = r * map_poly complex_of_real p

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
map_poly complex_of_real q = r * map_poly complex_of_real p

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
have "... = (map_poly of_real (map_poly Re r) +
                    smult \<i> (map_poly of_real (map_poly Im r))) *
                   map_poly complex_of_real p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r * map_poly complex_of_real p = (map_poly complex_of_real (map_poly Re r) + smult \<i> (map_poly complex_of_real (map_poly Im r))) * map_poly complex_of_real p
[PROOF STEP]
using complex_poly_eq
[PROOF STATE]
proof (prove)
using this:
?r = map_poly complex_of_real (map_poly Re ?r) + smult \<i> (map_poly complex_of_real (map_poly Im ?r))

goal (1 subgoal):
 1. r * map_poly complex_of_real p = (map_poly complex_of_real (map_poly Re r) + smult \<i> (map_poly complex_of_real (map_poly Im r))) * map_poly complex_of_real p
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
r * map_poly complex_of_real p = (map_poly complex_of_real (map_poly Re r) + smult \<i> (map_poly complex_of_real (map_poly Im r))) * map_poly complex_of_real p

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
r * map_poly complex_of_real p = (map_poly complex_of_real (map_poly Re r) + smult \<i> (map_poly complex_of_real (map_poly Im r))) * map_poly complex_of_real p

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
have "... = map_poly of_real (map_poly Re r * p) +
                   smult \<i> (map_poly of_real (map_poly Im r * p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (map_poly complex_of_real (map_poly Re r) + smult \<i> (map_poly complex_of_real (map_poly Im r))) * map_poly complex_of_real p = map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p))
[PROOF STEP]
by (simp add: mult_poly_add_left)
[PROOF STATE]
proof (state)
this:
(map_poly complex_of_real (map_poly Re r) + smult \<i> (map_poly complex_of_real (map_poly Im r))) * map_poly complex_of_real p = map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p))

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
map_poly complex_of_real q = map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p))
[PROOF STEP]
have "map_poly complex_of_real q =
                map_poly of_real (map_poly Re r * p) +
                smult \<i> (map_poly of_real (map_poly Im r * p))"
[PROOF STATE]
proof (prove)
using this:
map_poly complex_of_real q = map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p))

goal (1 subgoal):
 1. map_poly complex_of_real q = map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
map_poly complex_of_real q = map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p))

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
hence "0 = map_poly Im (map_poly of_real (map_poly Re r * p) +
             smult \<i> (map_poly of_real (map_poly Im r * p)))"
[PROOF STATE]
proof (prove)
using this:
map_poly complex_of_real q = map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p))

goal (1 subgoal):
 1. 0 = map_poly Im (map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p)))
[PROOF STEP]
by (auto simp: complex_poly_cong[symmetric] map_poly_Im_of_real)
[PROOF STATE]
proof (state)
this:
0 = map_poly Im (map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p)))

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
0 = map_poly Im (map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p)))

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
have "... = map_poly of_real (map_poly Im r * p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly Im (map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p))) = map_poly of_real (map_poly Im r * p)
[PROOF STEP]
apply (rule poly_eqI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. coeff (map_poly Im (map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p)))) n = coeff (map_poly of_real (map_poly Im r * p)) n
[PROOF STEP]
by (auto simp: coeff_map_poly coeff_mult)
[PROOF STATE]
proof (state)
this:
map_poly Im (map_poly complex_of_real (map_poly Re r * p) + smult \<i> (map_poly complex_of_real (map_poly Im r * p))) = map_poly of_real (map_poly Im r * p)

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
0 = map_poly of_real (map_poly Im r * p)
[PROOF STEP]
have "0 = map_poly complex_of_real (map_poly Im r) *
                    map_poly complex_of_real p"
[PROOF STATE]
proof (prove)
using this:
0 = map_poly of_real (map_poly Im r * p)

goal (1 subgoal):
 1. 0 = map_poly complex_of_real (map_poly Im r) * map_poly complex_of_real p
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 = map_poly complex_of_real (map_poly Im r) * map_poly complex_of_real p

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
hence "map_poly complex_of_real (map_poly Im r) = 0"
[PROOF STATE]
proof (prove)
using this:
0 = map_poly complex_of_real (map_poly Im r) * map_poly complex_of_real p

goal (1 subgoal):
 1. map_poly complex_of_real (map_poly Im r) = 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 = map_poly complex_of_real (map_poly Im r) * map_poly complex_of_real p
map_poly complex_of_real q = r * map_poly complex_of_real p
p \<noteq> 0

goal (1 subgoal):
 1. map_poly complex_of_real (map_poly Im r) = 0
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
map_poly complex_of_real (map_poly Im r) = 0

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
map_poly complex_of_real (map_poly Im r) = 0

goal (1 subgoal):
 1. r = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
apply (subst complex_poly_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_poly complex_of_real (map_poly Im r) = 0 \<Longrightarrow> map_poly complex_of_real (map_poly Re r) + smult \<i> (map_poly complex_of_real (map_poly Im r)) = map_poly complex_of_real (map_poly Re r)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
r = map_poly complex_of_real (map_poly Re r)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma spans_image: "V \<subseteq> m1.span B \<Longrightarrow> f ` V \<subseteq> m2.span (f ` B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V \<subseteq> m1.span B \<Longrightarrow> f ` V \<subseteq> m2.span (f ` B)
[PROOF STEP]
by (metis image_mono span_image)


[STATEMENT]
lemma solution_len_im_sing_less:
  assumes sol: "g s = h s" and set: "a \<in> set s" and less: "\<^bold>|g [a]\<^bold>| < \<^bold>|h [a]\<^bold>|"
  shows "\<^bold>|h [1-a]\<^bold>| < \<^bold>|g [1-a]\<^bold>|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<^bold>|h [1 - a]\<^bold>| < \<^bold>|g [1 - a]\<^bold>|
[PROOF STEP]
proof (intro not_le_imp_less notI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<^bold>|g [1 - a]\<^bold>| \<le> \<^bold>|h [1 - a]\<^bold>| \<Longrightarrow> False
[PROOF STEP]
assume "\<^bold>|g [1-a]\<^bold>| \<le> \<^bold>|h [1-a]\<^bold>|"
[PROOF STATE]
proof (state)
this:
\<^bold>|g [1 - a]\<^bold>| \<le> \<^bold>|h [1 - a]\<^bold>|

goal (1 subgoal):
 1. \<^bold>|g [1 - a]\<^bold>| \<le> \<^bold>|h [1 - a]\<^bold>| \<Longrightarrow> False
[PROOF STEP]
with less_imp_le[OF less]
[PROOF STATE]
proof (chain)
picking this:
\<^bold>|g [a]\<^bold>| \<le> \<^bold>|h [a]\<^bold>|
\<^bold>|g [1 - a]\<^bold>| \<le> \<^bold>|h [1 - a]\<^bold>|
[PROOF STEP]
have "\<^bold>|g [b]\<^bold>| \<le> \<^bold>|h [b]\<^bold>|" for b
[PROOF STATE]
proof (prove)
using this:
\<^bold>|g [a]\<^bold>| \<le> \<^bold>|h [a]\<^bold>|
\<^bold>|g [1 - a]\<^bold>| \<le> \<^bold>|h [1 - a]\<^bold>|

goal (1 subgoal):
 1. \<^bold>|g [b]\<^bold>| \<le> \<^bold>|h [b]\<^bold>|
[PROOF STEP]
by (fact bin_swap_induct)
[PROOF STATE]
proof (state)
this:
\<^bold>|g [?b]\<^bold>| \<le> \<^bold>|h [?b]\<^bold>|

goal (1 subgoal):
 1. \<^bold>|g [1 - a]\<^bold>| \<le> \<^bold>|h [1 - a]\<^bold>| \<Longrightarrow> False
[PROOF STEP]
from this set less
[PROOF STATE]
proof (chain)
picking this:
\<^bold>|g [?b]\<^bold>| \<le> \<^bold>|h [?b]\<^bold>|
a \<in> set s
\<^bold>|g [a]\<^bold>| < \<^bold>|h [a]\<^bold>|
[PROOF STEP]
have "\<^bold>|g s\<^bold>| < \<^bold>|h s\<^bold>|"
[PROOF STATE]
proof (prove)
using this:
\<^bold>|g [?b]\<^bold>| \<le> \<^bold>|h [?b]\<^bold>|
a \<in> set s
\<^bold>|g [a]\<^bold>| < \<^bold>|h [a]\<^bold>|

goal (1 subgoal):
 1. \<^bold>|g s\<^bold>| < \<^bold>|h s\<^bold>|
[PROOF STEP]
by (rule len_im_less[of s])
[PROOF STATE]
proof (state)
this:
\<^bold>|g s\<^bold>| < \<^bold>|h s\<^bold>|

goal (1 subgoal):
 1. \<^bold>|g [1 - a]\<^bold>| \<le> \<^bold>|h [1 - a]\<^bold>| \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<^bold>|g s\<^bold>| < \<^bold>|h s\<^bold>|
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<^bold>|g s\<^bold>| < \<^bold>|h s\<^bold>|

goal (1 subgoal):
 1. False
[PROOF STEP]
using lenarg[OF sol]
[PROOF STATE]
proof (prove)
using this:
\<^bold>|g s\<^bold>| < \<^bold>|h s\<^bold>|
\<^bold>|g s\<^bold>| = \<^bold>|h s\<^bold>|

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in algebra) lambda_system_Compl:
  fixes f:: "'a set \<Rightarrow> ennreal"
  assumes x: "x \<in> lambda_system \<Omega> M f"
  shows "\<Omega> - x \<in> lambda_system \<Omega> M f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Omega> - x \<in> lambda_system \<Omega> M f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Omega> - x \<in> lambda_system \<Omega> M f
[PROOF STEP]
have "x \<subseteq> \<Omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<subseteq> \<Omega>
[PROOF STEP]
by (metis sets_into_space lambda_system_sets x)
[PROOF STATE]
proof (state)
this:
x \<subseteq> \<Omega>

goal (1 subgoal):
 1. \<Omega> - x \<in> lambda_system \<Omega> M f
[PROOF STEP]
hence "\<Omega> - (\<Omega> - x) = x"
[PROOF STATE]
proof (prove)
using this:
x \<subseteq> \<Omega>

goal (1 subgoal):
 1. \<Omega> - (\<Omega> - x) = x
[PROOF STEP]
by (metis double_diff equalityE)
[PROOF STATE]
proof (state)
this:
\<Omega> - (\<Omega> - x) = x

goal (1 subgoal):
 1. \<Omega> - x \<in> lambda_system \<Omega> M f
[PROOF STEP]
with x
[PROOF STATE]
proof (chain)
picking this:
x \<in> lambda_system \<Omega> M f
\<Omega> - (\<Omega> - x) = x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<in> lambda_system \<Omega> M f
\<Omega> - (\<Omega> - x) = x

goal (1 subgoal):
 1. \<Omega> - x \<in> lambda_system \<Omega> M f
[PROOF STEP]
by (force simp add: lambda_system_def ac_simps)
[PROOF STATE]
proof (state)
this:
\<Omega> - x \<in> lambda_system \<Omega> M f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma diamond_left_dist_sup:
  "|x \<squnion> y>z = |x>z \<squnion> |y>z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. | x \<squnion> y > z = | x > z \<squnion> | y > z
[PROOF STEP]
by (simp add: d_dist_sup diamond_def mult_right_dist_sup)


[STATEMENT]
lemma mult_carrier_mat[simp]:
  "A \<in> carrier_mat nr n \<Longrightarrow> B \<in> carrier_mat n nc \<Longrightarrow> A * B \<in> carrier_mat nr nc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<in> carrier_mat nr n; B \<in> carrier_mat n nc\<rbrakk> \<Longrightarrow> A * B \<in> carrier_mat nr nc
[PROOF STEP]
unfolding carrier_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<in> {m. dim_row m = nr \<and> dim_col m = n}; B \<in> {m. dim_row m = n \<and> dim_col m = nc}\<rbrakk> \<Longrightarrow> A * B \<in> {m. dim_row m = nr \<and> dim_col m = nc}
[PROOF STEP]
by auto


[STATEMENT]
lemma sshiftr_numeral:
  \<open>(numeral k >>> numeral n :: 'a::len word) =
    word_of_int (signed_take_bit (LENGTH('a) - 1) (numeral k) >> numeral n)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. numeral k >>> numeral n = word_of_int (signed_take_bit (LENGTH('a) - 1) (numeral k) >> numeral n)
[PROOF STEP]
using signed_drop_bit_word_numeral [of n k]
[PROOF STATE]
proof (prove)
using this:
signed_drop_bit (numeral n) (numeral k) = word_of_int (drop_bit (numeral n) (signed_take_bit (LENGTH(?'a) - 1) (numeral k)))

goal (1 subgoal):
 1. numeral k >>> numeral n = word_of_int (signed_take_bit (LENGTH('a) - 1) (numeral k) >> numeral n)
[PROOF STEP]
by (simp add: sshiftr_def shiftr_def)


[STATEMENT]
lemma [simp]:
      assumes "invar_vebt t n" "\<forall>x\<in>set xs. x<2^n"
      shows "invar_vebt (foldl vebt_insert t xs) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invar_vebt (foldl vebt_insert t xs) n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
invar_vebt t n
\<forall>x\<in>set xs. x < 2 ^ n

goal (1 subgoal):
 1. invar_vebt (foldl vebt_insert t xs) n
[PROOF STEP]
apply (induction xs arbitrary: t)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>t. \<lbrakk>invar_vebt t n; \<forall>x\<in>set []. x < 2 ^ n\<rbrakk> \<Longrightarrow> invar_vebt (foldl vebt_insert t []) n
 2. \<And>a xs t. \<lbrakk>\<And>t. \<lbrakk>invar_vebt t n; \<forall>x\<in>set xs. x < 2 ^ n\<rbrakk> \<Longrightarrow> invar_vebt (foldl vebt_insert t xs) n; invar_vebt t n; \<forall>x\<in>set (a # xs). x < 2 ^ n\<rbrakk> \<Longrightarrow> invar_vebt (foldl vebt_insert t (a # xs)) n
[PROOF STEP]
by auto