[STATEMENT]
lemma len_inf_elem:
  "(a, b) \<in> set (arcs i j xs) \<Longrightarrow> M a b = \<infinity> \<Longrightarrow> len M i j xs = \<infinity>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(a, b) \<in> set (arcs i j xs); M a b = \<infinity>\<rbrakk> \<Longrightarrow> len M i j xs = \<infinity>
[PROOF STEP]
apply (induction rule: arcs.induct)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>aa ba. \<lbrakk>(a, b) \<in> set (arcs aa ba []); M a b = \<infinity>\<rbrakk> \<Longrightarrow> len M aa ba [] = \<infinity>
 2. \<And>aa ba x xs. \<lbrakk>\<lbrakk>(a, b) \<in> set (arcs x ba xs); M a b = \<infinity>\<rbrakk> \<Longrightarrow> len M x ba xs = \<infinity>; (a, b) \<in> set (arcs aa ba (x # xs)); M a b = \<infinity>\<rbrakk> \<Longrightarrow> len M aa ba (x # xs) = \<infinity>
[PROOF STEP]
apply (auto simp: mult)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>aa ba x xs. \<lbrakk>len M x ba xs = \<infinity>; M a b = \<infinity>; (a, b) \<in> set (arcs x ba xs)\<rbrakk> \<Longrightarrow> dbm_add (M aa x) \<infinity> = \<infinity>
[PROOF STEP]
apply (rename_tac a' b' x xs)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a' b' x xs. \<lbrakk>len M x b' xs = \<infinity>; M a b = \<infinity>; (a, b) \<in> set (arcs x b' xs)\<rbrakk> \<Longrightarrow> dbm_add (M a' x) \<infinity> = \<infinity>
[PROOF STEP]
apply (case_tac "M a' x")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a' b' x xs x1. \<lbrakk>len M x b' xs = \<infinity>; M a b = \<infinity>; (a, b) \<in> set (arcs x b' xs); M a' x = Le x1\<rbrakk> \<Longrightarrow> dbm_add (M a' x) \<infinity> = \<infinity>
 2. \<And>a' b' x xs x2. \<lbrakk>len M x b' xs = \<infinity>; M a b = \<infinity>; (a, b) \<in> set (arcs x b' xs); M a' x = Lt x2\<rbrakk> \<Longrightarrow> dbm_add (M a' x) \<infinity> = \<infinity>
 3. \<And>a' b' x xs. \<lbrakk>len M x b' xs = \<infinity>; M a b = \<infinity>; (a, b) \<in> set (arcs x b' xs); M a' x = \<infinity>\<rbrakk> \<Longrightarrow> dbm_add (M a' x) \<infinity> = \<infinity>
[PROOF STEP]
by auto


[STATEMENT]
lemma homotopic_with_imp_subset1:
     "homotopic_with_canon P X Y f g \<Longrightarrow> f ` X \<subseteq> Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homotopic_with_canon P X Y f g \<Longrightarrow> f ` X \<subseteq> Y
[PROOF STEP]
by (simp add: homotopic_with_def image_subset_iff) (metis atLeastAtMost_iff order_refl zero_le_one)


[STATEMENT]
theorem MM6: "\<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)
[PROOF STEP]
have "\<turnstile> \<box>\<box>F \<or> \<box>\<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<box>\<box>F \<or> \<box>\<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)
[PROOF STEP]
by (rule MM5)
[PROOF STATE]
proof (state)
this:
\<turnstile> \<box>\<box>F \<or> \<box>\<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)

goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<turnstile> \<box>\<box>F \<or> \<box>\<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)

goal (1 subgoal):
 1. \<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<turnstile> \<box>F \<or> \<box>G \<longrightarrow> \<box>(\<box>F \<or> \<box>G)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma icard_insert_if: "icard (insert x A) = (if x \<in> A then icard A else eSuc (icard A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. icard (insert x A) = (if x \<in> A then icard A else eSuc (icard A))
[PROOF STEP]
apply (case_tac "x \<in> A")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. x \<in> A \<Longrightarrow> icard (insert x A) = (if x \<in> A then icard A else eSuc (icard A))
 2. x \<notin> A \<Longrightarrow> icard (insert x A) = (if x \<in> A then icard A else eSuc (icard A))
[PROOF STEP]
apply (simp add: insert_absorb)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> A \<Longrightarrow> icard (insert x A) = (if x \<in> A then icard A else eSuc (icard A))
[PROOF STEP]
apply (simp add: icard_insert_disjoint)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma "((x::real) * (1 + y) - x * (1 - y)) = (2 * x * y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * (1 + y) - x * (1 - y) = 2 * x * y
[PROOF STEP]
using [[z3_extensions]]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * (1 + y) - x * (1 - y) = 2 * x * y
[PROOF STEP]
by smt


[STATEMENT]
lemma minus_one_less: "x - 1 < (x::real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x - 1 < x
[PROOF STEP]
by simp


[STATEMENT]
lemma real_root_eq_powrat_inverse:
  assumes "n > 0" shows "root n x = x pow\<^sub>\<rat> (inverse (of_nat n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
proof (cases n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
 2. \<And>nat. n = Suc nat \<Longrightarrow> root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
 2. \<And>nat. n = Suc nat \<Longrightarrow> root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 0

goal (1 subgoal):
 1. root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
n = 0
0 < n

goal (1 subgoal):
 1. root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
case (Suc m)
[PROOF STATE]
proof (state)
this:
n = Suc m

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
assume nSuc: "n = Suc m"
[PROOF STATE]
proof (state)
this:
n = Suc m

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = Suc m
[PROOF STEP]
have "root (Suc m) x = root (nat (1 + int m)) x"
[PROOF STATE]
proof (prove)
using this:
n = Suc m

goal (1 subgoal):
 1. root (Suc m) x = root (nat (1 + int m)) x
[PROOF STEP]
by (metis nat_int of_nat_Suc)
[PROOF STATE]
proof (state)
this:
root (Suc m) x = root (nat (1 + int m)) x

goal (1 subgoal):
 1. \<And>nat. n = Suc nat \<Longrightarrow> root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
root (Suc m) x = root (nat (1 + int m)) x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
root (Suc m) x = root (nat (1 + int m)) x

goal (1 subgoal):
 1. root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)
[PROOF STEP]
by (auto simp add: nSuc powrat_def of_nat_rat
          zero_less_Fract_iff quotient_of_Fract)
[PROOF STATE]
proof (state)
this:
root n x = x pow\<^sub>\<rat> inverse (rat_of_nat n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem goedel_rosser_first_strong_ex:
"consistent \<Longrightarrow> \<exists> \<phi>. \<phi> \<in> fmla \<and> \<not> prv \<phi> \<and> \<not> prv (neg \<phi>) \<and> isTrue \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. consistent \<Longrightarrow> \<exists>\<phi>. \<phi> \<in> fmla \<and> \<not> prv \<phi> \<and> \<not> prv (neg \<phi>) \<and> isTrue \<phi>
[PROOF STEP]
using goedel_rosser_first_strong
[PROOF STATE]
proof (prove)
using this:
consistent \<Longrightarrow> \<not> prv \<phi>R \<and> \<not> prv (neg \<phi>R) \<and> isTrue \<phi>R

goal (1 subgoal):
 1. consistent \<Longrightarrow> \<exists>\<phi>. \<phi> \<in> fmla \<and> \<not> prv \<phi> \<and> \<not> prv (neg \<phi>) \<and> isTrue \<phi>
[PROOF STEP]
by (intro exI[of _ \<phi>R]) blast


[STATEMENT]
lemma passes_test_cases_of_test_suite :
  assumes "observable M"
  and     "observable I"
  and     "qM \<in> states M"
  and     "qI \<in> states I"
  and     "finite_tree t"
shows "list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) = passes_test_suite I qI (test_suite_from_io_tree M qM t)"
  (is "?P1 = ?P2")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) = passes_test_suite I qI (test_suite_from_io_tree M qM t)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_suite I qI (test_suite_from_io_tree M qM t)
 2. passes_test_suite I qI (test_suite_from_io_tree M qM t) \<Longrightarrow> list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
have "list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) =
          {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) = {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)}
[PROOF STEP]
using sorted_list_of_maximal_sequences_in_tree_set[OF test_suite_from_io_tree_finite_tree[OF assms(1,3,5)]]
[PROOF STATE]
proof (prove)
using this:
list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) = {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)}

goal (1 subgoal):
 1. list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) = {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) = {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)}

goal (2 subgoals):
 1. list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_suite I qI (test_suite_from_io_tree M qM t)
 2. passes_test_suite I qI (test_suite_from_io_tree M qM t) \<Longrightarrow> list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
show "?P1 \<Longrightarrow> ?P2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_suite I qI (test_suite_from_io_tree M qM t)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_suite I qI (test_suite_from_io_tree M qM t)
[PROOF STEP]
assume ?P1
[PROOF STATE]
proof (state)
this:
list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))

goal (1 subgoal):
 1. list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_suite I qI (test_suite_from_io_tree M qM t)
[PROOF STEP]
show ?P2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. passes_test_suite I qI (test_suite_from_io_tree M qM t)
[PROOF STEP]
unfolding passes_test_suite_iff[OF assms(2,4)]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>iob\<in>Prefix_Tree.set (test_suite_from_io_tree M qM t). (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
fix iob
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
assume "iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)"
[PROOF STATE]
proof (state)
this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
[PROOF STEP]
obtain iob' where "iob@iob' \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))"
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. (\<And>iob'. iob @ iob' \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding sorted_list_of_maximal_sequences_in_tree_set[OF test_suite_from_io_tree_finite_tree[OF assms(1,3,5)]]
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. (\<And>iob'. iob @ iob' \<in> {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using test_suite_from_io_tree_finite_tree[OF assms(1,3,5)]
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
finite_tree (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. (\<And>iob'. iob @ iob' \<in> {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding finite_tree_iff
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
finite (Prefix_Tree.set (test_suite_from_io_tree M qM t))

goal (1 subgoal):
 1. (\<And>iob'. iob @ iob' \<in> {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using prefix_free_set_maximal_list_ob[of "set (test_suite_from_io_tree M qM t)"]
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
finite (Prefix_Tree.set (test_suite_from_io_tree M qM t))
\<lbrakk>finite (Prefix_Tree.set (test_suite_from_io_tree M qM t)); ?x \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t); \<And>x'. \<lbrakk>?x @ x' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t); \<nexists>y'. y' \<noteq> [] \<and> (?x @ x') @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>iob'. iob @ iob' \<in> {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
iob @ iob' \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))

goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
iob @ iob' \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
have "passes_test_case I qI (iob@iob')"
[PROOF STATE]
proof (prove)
using this:
iob @ iob' \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))

goal (1 subgoal):
 1. passes_test_case I qI (iob @ iob')
[PROOF STEP]
using \<open>?P1\<close>
[PROOF STATE]
proof (prove)
using this:
iob @ iob' \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))

goal (1 subgoal):
 1. passes_test_case I qI (iob @ iob')
[PROOF STEP]
by (metis in_set_conv_decomp_last list_all_append list_all_simps(1))
[PROOF STATE]
proof (state)
this:
passes_test_case I qI (iob @ iob')

goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
passes_test_case I qI (iob @ iob')
[PROOF STEP]
have "passes_test_case I qI iob"
[PROOF STATE]
proof (prove)
using this:
passes_test_case I qI (iob @ iob')

goal (1 subgoal):
 1. passes_test_case I qI iob
[PROOF STEP]
using passes_test_case_prefix[OF assms(2)]
[PROOF STATE]
proof (prove)
using this:
passes_test_case I qI (iob @ iob')
passes_test_case I ?q (?iob @ ?iob') \<Longrightarrow> passes_test_case I ?q ?iob

goal (1 subgoal):
 1. passes_test_case I qI iob
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
passes_test_case I qI iob

goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
passes_test_case I qI iob
[PROOF STEP]
have "map fst (takeWhile snd iob) \<in> LS I qI"
            and "(\<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI)"
[PROOF STATE]
proof (prove)
using this:
passes_test_case I qI iob

goal (1 subgoal):
 1. map fst (takeWhile snd iob) \<in> LS I qI &&& \<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI
[PROOF STEP]
unfolding passes_test_case_iff[OF assms(2,4)]
[PROOF STATE]
proof (prove)
using this:
map fst (takeWhile snd iob) \<in> LS I qI \<and> (\<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI)

goal (1 subgoal):
 1. map fst (takeWhile snd iob) \<in> LS I qI &&& \<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
map fst (takeWhile snd iob) \<in> LS I qI
\<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI

goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
have "list_all snd iob \<Longrightarrow> (map fst iob \<in> LS I qI)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all snd iob \<Longrightarrow> map fst iob \<in> LS I qI
[PROOF STEP]
using \<open>map fst (takeWhile snd iob) \<in> LS I qI\<close>
[PROOF STATE]
proof (prove)
using this:
map fst (takeWhile snd iob) \<in> LS I qI

goal (1 subgoal):
 1. list_all snd iob \<Longrightarrow> map fst iob \<in> LS I qI
[PROOF STEP]
by (metis in_set_conv_decomp_last list_all_append list_all_simps(1) takeWhile_eq_all_conv)
[PROOF STATE]
proof (state)
this:
list_all snd iob \<Longrightarrow> map fst iob \<in> LS I qI

goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
list_all snd iob \<Longrightarrow> map fst iob \<in> LS I qI

goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
have "(map fst iob \<in> LS I qI) \<Longrightarrow> list_all snd iob"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map fst iob \<in> LS I qI \<Longrightarrow> list_all snd iob
[PROOF STEP]
using \<open>(\<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI)\<close>
[PROOF STATE]
proof (prove)
using this:
\<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI

goal (1 subgoal):
 1. map fst iob \<in> LS I qI \<Longrightarrow> list_all snd iob
[PROOF STEP]
by (metis append_take_drop_id language_prefix map_append)
[PROOF STATE]
proof (state)
this:
map fst iob \<in> LS I qI \<Longrightarrow> list_all snd iob

goal (1 subgoal):
 1. \<And>iob. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t) \<Longrightarrow> (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
list_all snd iob \<Longrightarrow> map fst iob \<in> LS I qI
map fst iob \<in> LS I qI \<Longrightarrow> list_all snd iob
[PROOF STEP]
show "(map fst iob \<in> LS I qI) = list_all snd iob"
[PROOF STATE]
proof (prove)
using this:
list_all snd iob \<Longrightarrow> map fst iob \<in> LS I qI
map fst iob \<in> LS I qI \<Longrightarrow> list_all snd iob

goal (1 subgoal):
 1. (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(map fst iob \<in> LS I qI) = list_all snd iob

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
passes_test_suite I qI (test_suite_from_io_tree M qM t)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_suite I qI (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. passes_test_suite I qI (test_suite_from_io_tree M qM t) \<Longrightarrow> list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
show "?P2 \<Longrightarrow> ?P1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. passes_test_suite I qI (test_suite_from_io_tree M qM t) \<Longrightarrow> list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. passes_test_suite I qI (test_suite_from_io_tree M qM t) \<Longrightarrow> list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
assume ?P2
[PROOF STATE]
proof (state)
this:
passes_test_suite I qI (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. passes_test_suite I qI (test_suite_from_io_tree M qM t) \<Longrightarrow> list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
have "\<And> iob . iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI iob"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>iob. iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>iob. iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
fix iob
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>iob. iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
assume "iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))"
[PROOF STATE]
proof (state)
this:
iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))

goal (1 subgoal):
 1. \<And>iob. iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
have "iob \<in> set (test_suite_from_io_tree M qM t)"
[PROOF STATE]
proof (prove)
using this:
iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))

goal (1 subgoal):
 1. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
[PROOF STEP]
unfolding sorted_list_of_maximal_sequences_in_tree_set[OF test_suite_from_io_tree_finite_tree[OF assms(1,3,5)]]
[PROOF STATE]
proof (prove)
using this:
iob \<in> {y \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t). \<nexists>y'. y' \<noteq> [] \<and> y @ y' \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)}

goal (1 subgoal):
 1. iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. \<And>iob. iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
[PROOF STEP]
have *: "(map fst iob \<in> LS I qI) = list_all snd iob"
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
using \<open>?P2\<close>
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
passes_test_suite I qI (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
unfolding passes_test_suite_iff[OF assms(2,4)]
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
\<forall>iob\<in>Prefix_Tree.set (test_suite_from_io_tree M qM t). (map fst iob \<in> LS I qI) = list_all snd iob

goal (1 subgoal):
 1. (map fst iob \<in> LS I qI) = list_all snd iob
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(map fst iob \<in> LS I qI) = list_all snd iob

goal (1 subgoal):
 1. \<And>iob. iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
consider "iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM)" |
               "iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) `  {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> thesis; iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using \<open>iob \<in> set (test_suite_from_io_tree M qM t)\<close>
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. \<lbrakk>iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> thesis; iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
unfolding test_suite_from_io_tree_set[OF assms(1,3)]
[PROOF STATE]
proof (prove)
using this:
iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<union> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM}

goal (1 subgoal):
 1. \<lbrakk>iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> thesis; iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<lbrakk>iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> ?thesis; iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<And>iob. iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> ?thesis; iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
[PROOF STEP]
show "passes_test_case I qI iob"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> ?thesis; iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. passes_test_case I qI iob
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> passes_test_case I qI iob
 2. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM)

goal (2 subgoals):
 1. iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> passes_test_case I qI iob
 2. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM)
[PROOF STEP]
obtain io where "iob = map  (\<lambda>x. (x, True)) io"
[PROOF STATE]
proof (prove)
using this:
iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM)

goal (1 subgoal):
 1. (\<And>io. iob = map (\<lambda>x. (x, True)) io \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
iob = map (\<lambda>x. (x, True)) io

goal (2 subgoals):
 1. iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> passes_test_case I qI iob
 2. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
have "list_all snd iob"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all snd iob
[PROOF STEP]
unfolding \<open>iob = map  (\<lambda>x. (x, True)) io\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all snd (map (\<lambda>x. (x, True)) io)
[PROOF STEP]
by (induction io; auto)
[PROOF STATE]
proof (state)
this:
list_all snd iob

goal (2 subgoals):
 1. iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> passes_test_case I qI iob
 2. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
list_all snd iob
[PROOF STEP]
have "(takeWhile snd iob) = iob"
[PROOF STATE]
proof (prove)
using this:
list_all snd iob

goal (1 subgoal):
 1. takeWhile snd iob = iob
[PROOF STEP]
by (induction iob; auto)
[PROOF STATE]
proof (state)
this:
takeWhile snd iob = iob

goal (2 subgoals):
 1. iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> passes_test_case I qI iob
 2. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
have "map fst (takeWhile snd iob) \<in> LS I qI"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map fst (takeWhile snd iob) \<in> LS I qI
[PROOF STEP]
using * \<open>list_all snd iob\<close>
[PROOF STATE]
proof (prove)
using this:
(map fst iob \<in> LS I qI) = list_all snd iob
list_all snd iob

goal (1 subgoal):
 1. map fst (takeWhile snd iob) \<in> LS I qI
[PROOF STEP]
by (simp add: \<open>takeWhile snd iob = iob\<close>)
[PROOF STATE]
proof (state)
this:
map fst (takeWhile snd iob) \<in> LS I qI

goal (2 subgoals):
 1. iob \<in> map (\<lambda>x. (x, True)) ` (Prefix_Tree.set t \<inter> LS M qM) \<Longrightarrow> passes_test_case I qI iob
 2. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
map fst (takeWhile snd iob) \<in> LS I qI
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
map fst (takeWhile snd iob) \<in> LS I qI

goal (1 subgoal):
 1. passes_test_case I qI iob
[PROOF STEP]
unfolding passes_test_case_iff[OF assms(2,4)]
[PROOF STATE]
proof (prove)
using this:
map fst (takeWhile snd iob) \<in> LS I qI

goal (1 subgoal):
 1. map fst (takeWhile snd iob) \<in> LS I qI \<and> (\<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI)
[PROOF STEP]
using \<open>list_all snd iob\<close>
[PROOF STATE]
proof (prove)
using this:
map fst (takeWhile snd iob) \<in> LS I qI
list_all snd iob

goal (1 subgoal):
 1. map fst (takeWhile snd iob) \<in> LS I qI \<and> (\<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
passes_test_case I qI iob

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM}

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM}
[PROOF STEP]
obtain xs x where "iob = (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) (xs@[x])"
                           and "xs \<in> set t \<inter> LS M qM"
                           and "xs @ [x] \<in> Prefix_Tree.set t - LS M qM"
[PROOF STATE]
proof (prove)
using this:
iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM}

goal (1 subgoal):
 1. (\<And>xs x. \<lbrakk>iob = map (\<lambda>x. (x, True)) (butlast (xs @ [x])) @ [(last (xs @ [x]), False)]; xs \<in> Prefix_Tree.set t \<inter> LS M qM; xs @ [x] \<in> Prefix_Tree.set t - LS M qM\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
iob = map (\<lambda>x. (x, True)) (butlast (xs @ [x])) @ [(last (xs @ [x]), False)]
xs \<in> Prefix_Tree.set t \<inter> LS M qM
xs @ [x] \<in> Prefix_Tree.set t - LS M qM

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
iob = map (\<lambda>x. (x, True)) (butlast (xs @ [x])) @ [(last (xs @ [x]), False)]
xs \<in> Prefix_Tree.set t \<inter> LS M qM
xs @ [x] \<in> Prefix_Tree.set t - LS M qM
[PROOF STEP]
have **: "iob = (map (\<lambda>x. (x, True)) xs) @ [(x,False)]"
[PROOF STATE]
proof (prove)
using this:
iob = map (\<lambda>x. (x, True)) (butlast (xs @ [x])) @ [(last (xs @ [x]), False)]
xs \<in> Prefix_Tree.set t \<inter> LS M qM
xs @ [x] \<in> Prefix_Tree.set t - LS M qM

goal (1 subgoal):
 1. iob = map (\<lambda>x. (x, True)) xs @ [(x, False)]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
iob = map (\<lambda>x. (x, True)) xs @ [(x, False)]

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
have "isin (test_suite_from_io_tree M qM t) ((takeWhile snd iob)@(dropWhile snd iob))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isin (test_suite_from_io_tree M qM t) (takeWhile snd iob @ dropWhile snd iob)
[PROOF STEP]
using \<open>iob \<in> set (test_suite_from_io_tree M qM t)\<close>
[PROOF STATE]
proof (prove)
using this:
iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. isin (test_suite_from_io_tree M qM t) (takeWhile snd iob @ dropWhile snd iob)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
isin (test_suite_from_io_tree M qM t) (takeWhile snd iob @ dropWhile snd iob)

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
isin (test_suite_from_io_tree M qM t) (takeWhile snd iob @ dropWhile snd iob)
[PROOF STEP]
have "(takeWhile snd iob) \<in> set (test_suite_from_io_tree M qM t)"
[PROOF STATE]
proof (prove)
using this:
isin (test_suite_from_io_tree M qM t) (takeWhile snd iob @ dropWhile snd iob)

goal (1 subgoal):
 1. takeWhile snd iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
[PROOF STEP]
using isin_prefix[of "test_suite_from_io_tree M qM t" "takeWhile snd iob" "dropWhile snd iob"]
[PROOF STATE]
proof (prove)
using this:
isin (test_suite_from_io_tree M qM t) (takeWhile snd iob @ dropWhile snd iob)
isin (test_suite_from_io_tree M qM t) (takeWhile snd iob @ dropWhile snd iob) \<Longrightarrow> isin (test_suite_from_io_tree M qM t) (takeWhile snd iob)

goal (1 subgoal):
 1. takeWhile snd iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
takeWhile snd iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
takeWhile snd iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
[PROOF STEP]
have "(map fst (takeWhile snd iob) \<in> LS I qI) = list_all snd (takeWhile snd iob)"
[PROOF STATE]
proof (prove)
using this:
takeWhile snd iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. (map fst (takeWhile snd iob) \<in> LS I qI) = list_all snd (takeWhile snd iob)
[PROOF STEP]
using \<open>?P2\<close>
[PROOF STATE]
proof (prove)
using this:
takeWhile snd iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
passes_test_suite I qI (test_suite_from_io_tree M qM t)

goal (1 subgoal):
 1. (map fst (takeWhile snd iob) \<in> LS I qI) = list_all snd (takeWhile snd iob)
[PROOF STEP]
unfolding passes_test_suite_iff[OF assms(2,4)]
[PROOF STATE]
proof (prove)
using this:
takeWhile snd iob \<in> Prefix_Tree.set (test_suite_from_io_tree M qM t)
\<forall>iob\<in>Prefix_Tree.set (test_suite_from_io_tree M qM t). (map fst iob \<in> LS I qI) = list_all snd iob

goal (1 subgoal):
 1. (map fst (takeWhile snd iob) \<in> LS I qI) = list_all snd (takeWhile snd iob)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(map fst (takeWhile snd iob) \<in> LS I qI) = list_all snd (takeWhile snd iob)

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(map fst (takeWhile snd iob) \<in> LS I qI) = list_all snd (takeWhile snd iob)

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
have "list_all snd (takeWhile snd iob)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_all snd (takeWhile snd iob)
[PROOF STEP]
by (induction iob; auto)
[PROOF STATE]
proof (state)
this:
list_all snd (takeWhile snd iob)

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(map fst (takeWhile snd iob) \<in> LS I qI) = list_all snd (takeWhile snd iob)
list_all snd (takeWhile snd iob)
[PROOF STEP]
have "map fst (takeWhile snd iob) \<in> LS I qI"
[PROOF STATE]
proof (prove)
using this:
(map fst (takeWhile snd iob) \<in> LS I qI) = list_all snd (takeWhile snd iob)
list_all snd (takeWhile snd iob)

goal (1 subgoal):
 1. map fst (takeWhile snd iob) \<in> LS I qI
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
map fst (takeWhile snd iob) \<in> LS I qI

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
have "\<not> list_all snd iob"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> list_all snd iob
[PROOF STEP]
using **
[PROOF STATE]
proof (prove)
using this:
iob = map (\<lambda>x. (x, True)) xs @ [(x, False)]

goal (1 subgoal):
 1. \<not> list_all snd iob
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<not> list_all snd iob

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<not> list_all snd iob

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
have "(take (Suc (length (takeWhile snd iob))) iob) = iob"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. take (Suc (length (takeWhile snd iob))) iob = iob
[PROOF STEP]
unfolding \<open>iob = (map (\<lambda>x. (x, True)) xs) @ [(x,False)]\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. take (Suc (length (takeWhile snd (map (\<lambda>x. (x, True)) xs @ [(x, False)])))) (map (\<lambda>x. (x, True)) xs @ [(x, False)]) = map (\<lambda>x. (x, True)) xs @ [(x, False)]
[PROOF STEP]
by (induction xs; auto)
[PROOF STATE]
proof (state)
this:
take (Suc (length (takeWhile snd iob))) iob = iob

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<not> list_all snd iob
take (Suc (length (takeWhile snd iob))) iob = iob
[PROOF STEP]
have "map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI"
[PROOF STATE]
proof (prove)
using this:
\<not> list_all snd iob
take (Suc (length (takeWhile snd iob))) iob = iob

goal (1 subgoal):
 1. map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
\<not> list_all snd iob
take (Suc (length (takeWhile snd iob))) iob = iob
(map fst iob \<in> LS I qI) = list_all snd iob

goal (1 subgoal):
 1. map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI

goal (1 subgoal):
 1. iob \<in> (\<lambda>xs. map (\<lambda>x. (x, True)) (butlast xs) @ [(last xs, False)]) ` {xs @ [x] |xs x. xs \<in> Prefix_Tree.set t \<inter> LS M qM \<and> xs @ [x] \<in> Prefix_Tree.set t - LS M qM} \<Longrightarrow> passes_test_case I qI iob
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI

goal (1 subgoal):
 1. passes_test_case I qI iob
[PROOF STEP]
using \<open>map fst (takeWhile snd iob) \<in> LS I qI\<close>
[PROOF STATE]
proof (prove)
using this:
map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI
map fst (takeWhile snd iob) \<in> LS I qI

goal (1 subgoal):
 1. passes_test_case I qI iob
[PROOF STEP]
unfolding passes_test_case_iff[OF assms(2,4)]
[PROOF STATE]
proof (prove)
using this:
map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI
map fst (takeWhile snd iob) \<in> LS I qI

goal (1 subgoal):
 1. map fst (takeWhile snd iob) \<in> LS I qI \<and> (\<not> list_all snd iob \<longrightarrow> map fst (take (Suc (length (takeWhile snd iob))) iob) \<notin> LS I qI)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
passes_test_case I qI iob

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
passes_test_case I qI iob

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI ?iob

goal (1 subgoal):
 1. passes_test_suite I qI (test_suite_from_io_tree M qM t) \<Longrightarrow> list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI ?iob
[PROOF STEP]
show ?P1
[PROOF STATE]
proof (prove)
using this:
?iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI ?iob

goal (1 subgoal):
 1. list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
using Ball_set_list_all
[PROOF STATE]
proof (prove)
using this:
?iob \<in> list.set (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t)) \<Longrightarrow> passes_test_case I qI ?iob
Ball (list.set ?xs) ?P = list_all ?P ?xs

goal (1 subgoal):
 1. list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
passes_test_suite I qI (test_suite_from_io_tree M qM t) \<Longrightarrow> list_all (passes_test_case I qI) (sorted_list_of_maximal_sequences_in_tree (test_suite_from_io_tree M qM t))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bernoulli_pmf_1: "bernoulli_pmf 1 = return_pmf True"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bernoulli_pmf 1 = return_pmf True
[PROOF STEP]
by (rule pmf_eqI, simp add:indicator_def)


[STATEMENT]
lemma return_node_THE_call_node:
  "\<lbrakk>return_node n; valid_edge a; valid_edge a'; a' \<in> get_return_edges a;
  n = targetnode a'\<rbrakk>
  \<Longrightarrow> (THE n'. \<exists>a a'. valid_edge a \<and> n' = sourcenode a \<and> valid_edge a' \<and>
  a' \<in> get_return_edges a \<and> n = targetnode a') = sourcenode a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>return_node n; valid_edge a; valid_edge a'; a' \<in> get_return_edges a; n = targetnode a'\<rbrakk> \<Longrightarrow> (THE n'. \<exists>a a'. valid_edge a \<and> n' = sourcenode a \<and> valid_edge a' \<and> a' \<in> get_return_edges a \<and> n = targetnode a') = sourcenode a
[PROOF STEP]
by(fastforce intro!:the1_equality return_node_determines_call_node)


[STATEMENT]
lemma interpret_Half[simp]: "interpret_floatarith (Half x) xs = interpret_floatarith x xs / 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interpret_floatarith (Half x) xs = interpret_floatarith x xs / 2
[PROOF STEP]
by (auto simp: Half_def)


[STATEMENT]
lemma dist_tendsto_0_imp_tendsto: "(\<lambda>i. \<bar>f i - a\<bar> :: real) \<longlonglongrightarrow> 0 \<Longrightarrow> f \<longlonglongrightarrow> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. \<bar>f i - a\<bar>) \<longlonglongrightarrow> 0 \<Longrightarrow> f \<longlonglongrightarrow> a
[PROOF STEP]
using LIM_zero_cancel tendsto_rabs_zero_iff
[PROOF STATE]
proof (prove)
using this:
((\<lambda>x. ?f x - ?l) \<longlongrightarrow> (0::?'b)) ?F \<Longrightarrow> (?f \<longlongrightarrow> ?l) ?F
((\<lambda>x. \<bar>?f x\<bar>) \<longlongrightarrow> 0) ?F = (?f \<longlongrightarrow> 0) ?F

goal (1 subgoal):
 1. (\<lambda>i. \<bar>f i - a\<bar>) \<longlonglongrightarrow> 0 \<Longrightarrow> f \<longlonglongrightarrow> a
[PROOF STEP]
by blast


[STATEMENT]
lemma winding_number_homotopic_paths:
    assumes "homotopic_paths (-{z}) g h"
      shows "winding_number g z = winding_number h z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
have "path g" "path h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path g &&& path h
[PROOF STEP]
using homotopic_paths_imp_path [OF assms]
[PROOF STATE]
proof (prove)
using this:
path g \<and> path h

goal (1 subgoal):
 1. path g &&& path h
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
path g
path h

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
path g
path h

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
have pag: "z \<notin> path_image g" and pah: "z \<notin> path_image h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z \<notin> path_image g &&& z \<notin> path_image h
[PROOF STEP]
using homotopic_paths_imp_subset [OF assms]
[PROOF STATE]
proof (prove)
using this:
path_image g \<subseteq> - {z} \<and> path_image h \<subseteq> - {z}

goal (1 subgoal):
 1. z \<notin> path_image g &&& z \<notin> path_image h
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
z \<notin> path_image g
z \<notin> path_image h

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
path g
path h
z \<notin> path_image g
z \<notin> path_image h
[PROOF STEP]
obtain d e where "d > 0" "e > 0"
      and d: "\<And>p. \<lbrakk>path p; pathstart p = pathstart g; pathfinish p = pathfinish g; \<forall>t\<in>{0..1}. norm (p t - g t) < d\<rbrakk>
            \<Longrightarrow> homotopic_paths (-{z}) g p"
      and e: "\<And>q. \<lbrakk>path q; pathstart q = pathstart h; pathfinish q = pathfinish h; \<forall>t\<in>{0..1}. norm (q t - h t) < e\<rbrakk>
            \<Longrightarrow> homotopic_paths (-{z}) h q"
[PROOF STATE]
proof (prove)
using this:
path g
path h
z \<notin> path_image g
z \<notin> path_image h

goal (1 subgoal):
 1. (\<And>d e. \<lbrakk>0 < d; 0 < e; \<And>p. \<lbrakk>path p; pathstart p = pathstart g; pathfinish p = pathfinish g; \<forall>t\<in>{0..1}. cmod (p t - g t) < d\<rbrakk> \<Longrightarrow> homotopic_paths (- {z}) g p; \<And>q. \<lbrakk>path q; pathstart q = pathstart h; pathfinish q = pathfinish h; \<forall>t\<in>{0..1}. cmod (q t - h t) < e\<rbrakk> \<Longrightarrow> homotopic_paths (- {z}) h q\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using homotopic_nearby_paths [of g "-{z}"] homotopic_nearby_paths [of h "-{z}"]
[PROOF STATE]
proof (prove)
using this:
path g
path h
z \<notin> path_image g
z \<notin> path_image h
\<lbrakk>path g; open (- {z}); path_image g \<subseteq> - {z}\<rbrakk> \<Longrightarrow> \<exists>e>0. \<forall>h. path h \<and> pathstart h = pathstart g \<and> pathfinish h = pathfinish g \<and> (\<forall>t\<in>{0..1}. cmod (h t - g t) < e) \<longrightarrow> homotopic_paths (- {z}) g h
\<lbrakk>path h; open (- {z}); path_image h \<subseteq> - {z}\<rbrakk> \<Longrightarrow> \<exists>e>0. \<forall>ha. path ha \<and> pathstart ha = pathstart h \<and> pathfinish ha = pathfinish h \<and> (\<forall>t\<in>{0..1}. cmod (ha t - h t) < e) \<longrightarrow> homotopic_paths (- {z}) h ha

goal (1 subgoal):
 1. (\<And>d e. \<lbrakk>0 < d; 0 < e; \<And>p. \<lbrakk>path p; pathstart p = pathstart g; pathfinish p = pathfinish g; \<forall>t\<in>{0..1}. cmod (p t - g t) < d\<rbrakk> \<Longrightarrow> homotopic_paths (- {z}) g p; \<And>q. \<lbrakk>path q; pathstart q = pathstart h; pathfinish q = pathfinish h; \<forall>t\<in>{0..1}. cmod (q t - h t) < e\<rbrakk> \<Longrightarrow> homotopic_paths (- {z}) h q\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
0 < d
0 < e
\<lbrakk>path ?p; pathstart ?p = pathstart g; pathfinish ?p = pathfinish g; \<forall>t\<in>{0..1}. cmod (?p t - g t) < d\<rbrakk> \<Longrightarrow> homotopic_paths (- {z}) g ?p
\<lbrakk>path ?q; pathstart ?q = pathstart h; pathfinish ?q = pathfinish h; \<forall>t\<in>{0..1}. cmod (?q t - h t) < e\<rbrakk> \<Longrightarrow> homotopic_paths (- {z}) h ?q

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
obtain p where p:
       "valid_path p" "z \<notin> path_image p"
       "pathstart p = pathstart g" "pathfinish p = pathfinish g"
       and gp_less:"\<forall>t\<in>{0..1}. cmod (g t - p t) < d"
       and pap: "contour_integral p (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number g z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>p. \<lbrakk>valid_path p; z \<notin> path_image p; pathstart p = pathstart g; pathfinish p = pathfinish g; \<forall>t\<in>{0..1}. cmod (g t - p t) < d; contour_integral p (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number g z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using winding_number [OF \<open>path g\<close> pag \<open>0 < d\<close>]
[PROOF STATE]
proof (prove)
using this:
\<exists>p. winding_number_prop g z d p (winding_number g z)

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>valid_path p; z \<notin> path_image p; pathstart p = pathstart g; pathfinish p = pathfinish g; \<forall>t\<in>{0..1}. cmod (g t - p t) < d; contour_integral p (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number g z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding winding_number_prop_def
[PROOF STATE]
proof (prove)
using this:
\<exists>p. valid_path p \<and> z \<notin> path_image p \<and> pathstart p = pathstart g \<and> pathfinish p = pathfinish g \<and> (\<forall>t\<in>{0..1}. cmod (g t - p t) < d) \<and> contour_integral p (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number g z

goal (1 subgoal):
 1. (\<And>p. \<lbrakk>valid_path p; z \<notin> path_image p; pathstart p = pathstart g; pathfinish p = pathfinish g; \<forall>t\<in>{0..1}. cmod (g t - p t) < d; contour_integral p (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number g z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
valid_path p
z \<notin> path_image p
pathstart p = pathstart g
pathfinish p = pathfinish g
\<forall>t\<in>{0..1}. cmod (g t - p t) < d
contour_integral p (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number g z

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
obtain q where q:
       "valid_path q" "z \<notin> path_image q"
       "pathstart q = pathstart h" "pathfinish q = pathfinish h"
       and hq_less: "\<forall>t\<in>{0..1}. cmod (h t - q t) < e"
       and paq:  "contour_integral q (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number h z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>q. \<lbrakk>valid_path q; z \<notin> path_image q; pathstart q = pathstart h; pathfinish q = pathfinish h; \<forall>t\<in>{0..1}. cmod (h t - q t) < e; contour_integral q (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number h z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using winding_number [OF \<open>path h\<close> pah \<open>0 < e\<close>]
[PROOF STATE]
proof (prove)
using this:
\<exists>p. winding_number_prop h z e p (winding_number h z)

goal (1 subgoal):
 1. (\<And>q. \<lbrakk>valid_path q; z \<notin> path_image q; pathstart q = pathstart h; pathfinish q = pathfinish h; \<forall>t\<in>{0..1}. cmod (h t - q t) < e; contour_integral q (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number h z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding winding_number_prop_def
[PROOF STATE]
proof (prove)
using this:
\<exists>p. valid_path p \<and> z \<notin> path_image p \<and> pathstart p = pathstart h \<and> pathfinish p = pathfinish h \<and> (\<forall>t\<in>{0..1}. cmod (h t - p t) < e) \<and> contour_integral p (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number h z

goal (1 subgoal):
 1. (\<And>q. \<lbrakk>valid_path q; z \<notin> path_image q; pathstart q = pathstart h; pathfinish q = pathfinish h; \<forall>t\<in>{0..1}. cmod (h t - q t) < e; contour_integral q (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number h z\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
valid_path q
z \<notin> path_image q
pathstart q = pathstart h
pathfinish q = pathfinish h
\<forall>t\<in>{0..1}. cmod (h t - q t) < e
contour_integral q (\<lambda>w. 1 / (w - z)) = complex_of_real (2 * pi) * \<i> * winding_number h z

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
have "homotopic_paths (- {z}) g p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homotopic_paths (- {z}) g p
[PROOF STEP]
by (simp add: d p valid_path_imp_path norm_minus_commute gp_less)
[PROOF STATE]
proof (state)
this:
homotopic_paths (- {z}) g p

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
homotopic_paths (- {z}) g p

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
have "homotopic_paths (- {z}) h q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homotopic_paths (- {z}) h q
[PROOF STEP]
by (simp add: e q valid_path_imp_path norm_minus_commute hq_less)
[PROOF STATE]
proof (state)
this:
homotopic_paths (- {z}) h q

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
homotopic_paths (- {z}) g p
homotopic_paths (- {z}) h q
[PROOF STEP]
have "homotopic_paths (- {z}) p q"
[PROOF STATE]
proof (prove)
using this:
homotopic_paths (- {z}) g p
homotopic_paths (- {z}) h q

goal (1 subgoal):
 1. homotopic_paths (- {z}) p q
[PROOF STEP]
by (blast intro: homotopic_paths_trans homotopic_paths_sym assms)
[PROOF STATE]
proof (state)
this:
homotopic_paths (- {z}) p q

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
homotopic_paths (- {z}) p q
[PROOF STEP]
have "contour_integral p (\<lambda>w. 1/(w - z)) = contour_integral q (\<lambda>w. 1/(w - z))"
[PROOF STATE]
proof (prove)
using this:
homotopic_paths (- {z}) p q

goal (1 subgoal):
 1. contour_integral p (\<lambda>w. 1 / (w - z)) = contour_integral q (\<lambda>w. 1 / (w - z))
[PROOF STEP]
by (rule Cauchy_theorem_homotopic_paths) (auto intro!: holomorphic_intros simp: p q)
[PROOF STATE]
proof (state)
this:
contour_integral p (\<lambda>w. 1 / (w - z)) = contour_integral q (\<lambda>w. 1 / (w - z))

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
contour_integral p (\<lambda>w. 1 / (w - z)) = contour_integral q (\<lambda>w. 1 / (w - z))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
contour_integral p (\<lambda>w. 1 / (w - z)) = contour_integral q (\<lambda>w. 1 / (w - z))

goal (1 subgoal):
 1. winding_number g z = winding_number h z
[PROOF STEP]
by (simp add: pap paq)
[PROOF STATE]
proof (state)
this:
winding_number g z = winding_number h z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ereal_open_affinity:
  fixes S :: "ereal set"
  assumes "open S"
    and m: "\<bar>m\<bar> \<noteq> \<infinity>" "m \<noteq> 0"
    and t: "\<bar>t\<bar> \<noteq> \<infinity>"
  shows "open ((\<lambda>x. m * x + t) ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
 2. \<not> ?P \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
assume "0 < m"
[PROOF STATE]
proof (state)
this:
0 < m

goal (2 subgoals):
 1. ?P \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
 2. \<not> ?P \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < m
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < m

goal (1 subgoal):
 1. open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
using ereal_open_affinity_pos[OF \<open>open S\<close> _ _ t, of m] m
[PROOF STATE]
proof (prove)
using this:
0 < m
\<lbrakk>m \<noteq> \<infinity>; 0 < m\<rbrakk> \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
\<bar>m\<bar> \<noteq> \<infinity>
m \<noteq> 0

goal (1 subgoal):
 1. open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
open ((\<lambda>x. m * x + t) ` S)

goal (1 subgoal):
 1. \<not> 0 < m \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> 0 < m \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
assume "\<not> 0 < m"
[PROOF STATE]
proof (state)
this:
\<not> 0 < m

goal (1 subgoal):
 1. \<not> 0 < m \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> 0 < m
[PROOF STEP]
have "0 < -m"
[PROOF STATE]
proof (prove)
using this:
\<not> 0 < m

goal (1 subgoal):
 1. 0 < - m
[PROOF STEP]
using \<open>m \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
\<not> 0 < m
m \<noteq> 0

goal (1 subgoal):
 1. 0 < - m
[PROOF STEP]
by (cases m) auto
[PROOF STATE]
proof (state)
this:
0 < - m

goal (1 subgoal):
 1. \<not> 0 < m \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < - m
[PROOF STEP]
have m: "-m \<noteq> \<infinity>" "0 < -m"
[PROOF STATE]
proof (prove)
using this:
0 < - m

goal (1 subgoal):
 1. - m \<noteq> \<infinity> &&& 0 < - m
[PROOF STEP]
using \<open>\<bar>m\<bar> \<noteq> \<infinity>\<close>
[PROOF STATE]
proof (prove)
using this:
0 < - m
\<bar>m\<bar> \<noteq> \<infinity>

goal (1 subgoal):
 1. - m \<noteq> \<infinity> &&& 0 < - m
[PROOF STEP]
by (auto simp: ereal_uminus_eq_reorder)
[PROOF STATE]
proof (state)
this:
- m \<noteq> \<infinity>
0 < - m

goal (1 subgoal):
 1. \<not> 0 < m \<Longrightarrow> open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
from ereal_open_affinity_pos[OF ereal_open_uminus[OF \<open>open S\<close>] m t]
[PROOF STATE]
proof (chain)
picking this:
open ((\<lambda>x. - m * x + t) ` uminus ` S)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
open ((\<lambda>x. - m * x + t) ` uminus ` S)

goal (1 subgoal):
 1. open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
unfolding image_image
[PROOF STATE]
proof (prove)
using this:
open ((\<lambda>x. - m * - x + t) ` S)

goal (1 subgoal):
 1. open ((\<lambda>x. m * x + t) ` S)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
open ((\<lambda>x. m * x + t) ` S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ereal_Inf:
  assumes *: "\<bar>INF a\<in>A. ereal a\<bar> \<noteq> \<infinity>"
  shows "ereal (Inf A) = (INF a\<in>A. ereal a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (Inf A) = Inf (ereal ` A)
[PROOF STEP]
proof (rule continuous_at_Inf_mono)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. mono ereal
 2. continuous (at_right (Inf A)) ereal
 3. A \<noteq> {}
 4. bdd_below A
[PROOF STEP]
obtain r where r: "ereal r = (INF a\<in>A. ereal a)" "A \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>r. \<lbrakk>ereal r = Inf (ereal ` A); A \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
\<bar>Inf (ereal ` A)\<bar> \<noteq> \<infinity>

goal (1 subgoal):
 1. (\<And>r. \<lbrakk>ereal r = Inf (ereal ` A); A \<noteq> {}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (force simp: top_ereal_def)
[PROOF STATE]
proof (state)
this:
ereal r = Inf (ereal ` A)
A \<noteq> {}

goal (4 subgoals):
 1. mono ereal
 2. continuous (at_right (Inf A)) ereal
 3. A \<noteq> {}
 4. bdd_below A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ereal r = Inf (ereal ` A)
A \<noteq> {}
[PROOF STEP]
show "bdd_below A" "A \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
ereal r = Inf (ereal ` A)
A \<noteq> {}

goal (1 subgoal):
 1. bdd_below A &&& A \<noteq> {}
[PROOF STEP]
by (auto intro!: INF_lower bdd_belowI[of _ r] simp flip: ereal_less_eq)
[PROOF STATE]
proof (state)
this:
bdd_below A
A \<noteq> {}

goal (2 subgoals):
 1. mono ereal
 2. continuous (at_right (Inf A)) ereal
[PROOF STEP]
qed (auto simp: mono_def continuous_at_imp_continuous_at_within continuous_at_ereal)


[STATEMENT]
lemma lowner_le_add:
  assumes "A \<in> carrier_mat n n" "B \<in> carrier_mat n n" "C \<in> carrier_mat n n" "D \<in> carrier_mat n n"
    and "A \<le>\<^sub>L B" "C \<le>\<^sub>L D"
  shows "A + C \<le>\<^sub>L B + D"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A + C \<le>\<^sub>L B + D
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A + C \<le>\<^sub>L B + D
[PROOF STEP]
have "B + D - (A + C) = B - A + (D - C) "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B + D - (A + C) = B - A + (D - C)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat n n
B \<in> carrier_mat n n
C \<in> carrier_mat n n
D \<in> carrier_mat n n
A \<le>\<^sub>L B
C \<le>\<^sub>L D

goal (1 subgoal):
 1. B + D - (A + C) = B - A + (D - C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
B + D - (A + C) = B - A + (D - C)

goal (1 subgoal):
 1. A + C \<le>\<^sub>L B + D
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
B + D - (A + C) = B - A + (D - C)
[PROOF STEP]
have "positive (B + D - (A + C))"
[PROOF STATE]
proof (prove)
using this:
B + D - (A + C) = B - A + (D - C)

goal (1 subgoal):
 1. positive (B + D - (A + C))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
B + D - (A + C) = B - A + (D - C)
A \<in> carrier_mat n n
B \<in> carrier_mat n n
C \<in> carrier_mat n n
D \<in> carrier_mat n n
A \<le>\<^sub>L B
C \<le>\<^sub>L D

goal (1 subgoal):
 1. positive (B + D - (A + C))
[PROOF STEP]
unfolding lowner_le_def
[PROOF STATE]
proof (prove)
using this:
B + D - (A + C) = B - A + (D - C)
A \<in> carrier_mat n n
B \<in> carrier_mat n n
C \<in> carrier_mat n n
D \<in> carrier_mat n n
dim_row A = dim_row B \<and> dim_col A = dim_col B \<and> positive (B - A)
dim_row C = dim_row D \<and> dim_col C = dim_col D \<and> positive (D - C)

goal (1 subgoal):
 1. positive (B + D - (A + C))
[PROOF STEP]
using positive_add
[PROOF STATE]
proof (prove)
using this:
B + D - (A + C) = B - A + (D - C)
A \<in> carrier_mat n n
B \<in> carrier_mat n n
C \<in> carrier_mat n n
D \<in> carrier_mat n n
dim_row A = dim_row B \<and> dim_col A = dim_col B \<and> positive (B - A)
dim_row C = dim_row D \<and> dim_col C = dim_col D \<and> positive (D - C)
\<lbrakk>positive ?A; positive ?B; ?A \<in> carrier_mat ?n ?n; ?B \<in> carrier_mat ?n ?n\<rbrakk> \<Longrightarrow> positive (?A + ?B)

goal (1 subgoal):
 1. positive (B + D - (A + C))
[PROOF STEP]
by (metis minus_carrier_mat)
[PROOF STATE]
proof (state)
this:
positive (B + D - (A + C))

goal (1 subgoal):
 1. A + C \<le>\<^sub>L B + D
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
positive (B + D - (A + C))
[PROOF STEP]
show "A + C \<le>\<^sub>L B + D"
[PROOF STATE]
proof (prove)
using this:
positive (B + D - (A + C))

goal (1 subgoal):
 1. A + C \<le>\<^sub>L B + D
[PROOF STEP]
unfolding lowner_le_def
[PROOF STATE]
proof (prove)
using this:
positive (B + D - (A + C))

goal (1 subgoal):
 1. dim_row (A + C) = dim_row (B + D) \<and> dim_col (A + C) = dim_col (B + D) \<and> positive (B + D - (A + C))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
positive (B + D - (A + C))
A \<in> carrier_mat n n
B \<in> carrier_mat n n
C \<in> carrier_mat n n
D \<in> carrier_mat n n
A \<le>\<^sub>L B
C \<le>\<^sub>L D

goal (1 subgoal):
 1. dim_row (A + C) = dim_row (B + D) \<and> dim_col (A + C) = dim_col (B + D) \<and> positive (B + D - (A + C))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
A + C \<le>\<^sub>L B + D

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma small_bounded_rank:  "small {x. rank x \<in> elts a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. small {x. rank x \<in> elts a}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. small {x. rank x \<in> elts a}
[PROOF STEP]
have "{x. rank x \<in> elts a} \<subseteq> {x. rank x \<sqsubset> a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. rank x \<in> elts a} \<subseteq> {x. rank x \<sqsubset> a}
[PROOF STEP]
using less_TC_iff
[PROOF STATE]
proof (prove)
using this:
(?x \<sqsubset> ?y) = (\<exists>z\<in>elts ?y. ?x \<sqsubseteq> z)

goal (1 subgoal):
 1. {x. rank x \<in> elts a} \<subseteq> {x. rank x \<sqsubset> a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{x. rank x \<in> elts a} \<subseteq> {x. rank x \<sqsubset> a}

goal (1 subgoal):
 1. small {x. rank x \<in> elts a}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{x. rank x \<in> elts a} \<subseteq> {x. rank x \<sqsubset> a}

goal (1 subgoal):
 1. small {x. rank x \<in> elts a}
[PROOF STEP]
have "\<dots> \<subseteq> elts (Vset a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. rank x \<sqsubset> a} \<subseteq> elts (Vset a)
[PROOF STEP]
using VsetI
[PROOF STATE]
proof (prove)
using this:
rank ?b \<sqsubset> ?i \<Longrightarrow> ?b \<in> elts (Vset ?i)

goal (1 subgoal):
 1. {x. rank x \<sqsubset> a} \<subseteq> elts (Vset a)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{x. rank x \<sqsubset> a} \<subseteq> elts (Vset a)

goal (1 subgoal):
 1. small {x. rank x \<in> elts a}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
{x. rank x \<in> elts a} \<subseteq> elts (Vset a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
{x. rank x \<in> elts a} \<subseteq> elts (Vset a)

goal (1 subgoal):
 1. small {x. rank x \<in> elts a}
[PROOF STEP]
using down
[PROOF STATE]
proof (prove)
using this:
{x. rank x \<in> elts a} \<subseteq> elts (Vset a)
?Y \<subseteq> elts ?x \<Longrightarrow> small ?Y

goal (1 subgoal):
 1. small {x. rank x \<in> elts a}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
small {x. rank x \<in> elts a}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fps_binomial_0 [simp]: "fps_binomial 0 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_binomial (0::'a) = 1
[PROOF STEP]
using fps_binomial_of_nat[of 0]
[PROOF STATE]
proof (prove)
using this:
fps_binomial (of_nat 0) = (1 + fps_X) ^ 0

goal (1 subgoal):
 1. fps_binomial (0::'a) = 1
[PROOF STEP]
by simp


[STATEMENT]
lemma one_element_vec_access [simp]: "\<And>i. i < n \<Longrightarrow> vec_index (one_element_vec n e) i = e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i < n \<Longrightarrow> one_element_vec n e $ i = e
[PROOF STEP]
unfolding one_element_vec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i < n \<Longrightarrow> vec n (\<lambda>i. e) $ i = e
[PROOF STEP]
by (auto)


[STATEMENT]
lemma symm_preorder_is_equivalence:
  fixes Rel :: "('a \<times> 'a) set"
  assumes "preorder Rel"
      and "sym Rel"
  shows "equivalence Rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equivalence Rel
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
preorder Rel
sym Rel

goal (1 subgoal):
 1. equivalence Rel
[PROOF STEP]
unfolding preorder_on_def equiv_def
[PROOF STATE]
proof (prove)
using this:
refl Rel \<and> trans Rel
sym Rel

goal (1 subgoal):
 1. refl Rel \<and> sym Rel \<and> trans Rel
[PROOF STEP]
by simp


[STATEMENT]
lemma dotprod_append:
  assumes "length a = length b"
  shows"(a @ x) \<bullet> (b @ y) = a \<bullet> b + x \<bullet> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a @ x) \<bullet> (b @ y) = a \<bullet> b + x \<bullet> y
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length a = length b

goal (1 subgoal):
 1. (a @ x) \<bullet> (b @ y) = a \<bullet> b + x \<bullet> y
[PROOF STEP]
by (induct a b rule: list_induct2) auto


[STATEMENT]
lemma circline_equation_cancel_z2:
  assumes "circline_equation A B C D z1 z2 " and "z2 \<noteq> 0"
  shows "circline_equation A B C D (z1/z2) 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. circline_equation A B C D (z1 / z2) 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
circline_equation A B C D z1 z2
z2 \<noteq> 0

goal (1 subgoal):
 1. circline_equation A B C D (z1 / z2) 1
[PROOF STEP]
by (simp add: field_simps)


[STATEMENT]
lemma dg_SemiCAT_is_arr_iff[dg_SemiCAT_simps]:
  "\<FF> : \<AA> \<mapsto>\<^bsub>dg_SemiCAT \<alpha>\<^esub> \<BB> \<longleftrightarrow> \<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<FF> : \<AA> \<mapsto>\<^bsub>dg_SemiCAT \<alpha>\<^esub> \<BB> = \<FF> : \<AA> \<mapsto>\<mapsto>\<^sub>S\<^sub>M\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>
[PROOF STEP]
by (auto intro: dg_SemiCAT_is_arrI dest: dg_SemiCAT_is_arrD)


[STATEMENT]
lemma tri_quad_le_degree: "tri g v + quad g v \<le> degree g v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tri g v + quad g v \<le> degree g v
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. tri g v + quad g v \<le> degree g v
[PROOF STEP]
let ?fins = "[f \<leftarrow> facesAt g v . final f]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. tri g v + quad g v \<le> degree g v
[PROOF STEP]
have "tri g v + quad g v =
        |[f \<leftarrow> ?fins . triangle f]| + |[f \<leftarrow> ?fins. |vertices f| = 4]|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tri g v + quad g v = |filter triangle (filter final (facesAt g v))| + |filter (\<lambda>f. |vertices f| = 4) (filter final (facesAt g v))|
[PROOF STEP]
by(simp add:tri_def quad_def)
[PROOF STATE]
proof (state)
this:
tri g v + quad g v = |filter triangle (filter final (facesAt g v))| + |filter (\<lambda>f. |vertices f| = 4) (filter final (facesAt g v))|

goal (1 subgoal):
 1. tri g v + quad g v \<le> degree g v
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
tri g v + quad g v = |filter triangle (filter final (facesAt g v))| + |filter (\<lambda>f. |vertices f| = 4) (filter final (facesAt g v))|

goal (1 subgoal):
 1. tri g v + quad g v \<le> degree g v
[PROOF STEP]
have "\<dots> \<le> |[f \<leftarrow> facesAt g v. final f]|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |filter triangle (filter final (facesAt g v))| + |filter (\<lambda>f. |vertices f| = 4) (filter final (facesAt g v))| \<le> |filter final (facesAt g v)|
[PROOF STEP]
by(rule length_disj_filter_le) simp
[PROOF STATE]
proof (state)
this:
|filter triangle (filter final (facesAt g v))| + |filter (\<lambda>f. |vertices f| = 4) (filter final (facesAt g v))| \<le> |filter final (facesAt g v)|

goal (1 subgoal):
 1. tri g v + quad g v \<le> degree g v
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
|filter triangle (filter final (facesAt g v))| + |filter (\<lambda>f. |vertices f| = 4) (filter final (facesAt g v))| \<le> |filter final (facesAt g v)|

goal (1 subgoal):
 1. tri g v + quad g v \<le> degree g v
[PROOF STEP]
have "\<dots> \<le> |facesAt g v|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |filter final (facesAt g v)| \<le> |facesAt g v|
[PROOF STEP]
by(rule length_filter_le)
[PROOF STATE]
proof (state)
this:
|filter final (facesAt g v)| \<le> |facesAt g v|

goal (1 subgoal):
 1. tri g v + quad g v \<le> degree g v
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
tri g v + quad g v \<le> |facesAt g v|
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
tri g v + quad g v \<le> |facesAt g v|

goal (1 subgoal):
 1. tri g v + quad g v \<le> degree g v
[PROOF STEP]
by(simp add:degree_def)
[PROOF STATE]
proof (state)
this:
tri g v + quad g v \<le> degree g v

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Module) submodule_pOp_closed:"\<lbrakk>submodule R M H; h \<in> H; k \<in> H\<rbrakk> \<Longrightarrow>
                  h \<plusminus> k \<in> H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>submodule R M H; h \<in> H; k \<in> H\<rbrakk> \<Longrightarrow> h \<plusminus> k \<in> H
[PROOF STEP]
apply (simp add:submodule_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<subseteq> carrier M \<and> M +> H \<and> (\<forall>a m. a \<in> carrier R \<and> m \<in> H \<longrightarrow> a \<cdot>\<^sub>s m \<in> H); h \<in> H; k \<in> H\<rbrakk> \<Longrightarrow> h \<plusminus> k \<in> H
[PROOF STEP]
apply (erule conjE)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>h \<in> H; k \<in> H; H \<subseteq> carrier M; M +> H; \<forall>a m. a \<in> carrier R \<and> m \<in> H \<longrightarrow> a \<cdot>\<^sub>s m \<in> H\<rbrakk> \<Longrightarrow> h \<plusminus> k \<in> H
[PROOF STEP]
apply (thin_tac "\<forall>a m. a \<in> carrier R \<and> m \<in> H \<longrightarrow> a \<cdot>\<^sub>s m \<in> H")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>h \<in> H; k \<in> H; H \<subseteq> carrier M; M +> H\<rbrakk> \<Longrightarrow> h \<plusminus> k \<in> H
[PROOF STEP]
apply (simp add:asubg_pOp_closed)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma card_of_UNIV[simp]:
"|A :: 'a set| \<le>o |UNIV :: 'a set|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |A| \<le>o |UNIV|
[PROOF STEP]
using card_of_mono1[of A]
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> ?B \<Longrightarrow> |A| \<le>o |?B|

goal (1 subgoal):
 1. |A| \<le>o |UNIV|
[PROOF STEP]
by simp


[STATEMENT]
lemma le_antisym_TC: "\<lbrakk>x \<sqsubset> y; y \<sqsubset> x\<rbrakk> \<Longrightarrow> x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<sqsubset> y; y \<sqsubset> x\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
using less_asym_TC
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<sqsubset> ?y; ?y \<sqsubset> ?x\<rbrakk> \<Longrightarrow> False

goal (1 subgoal):
 1. \<lbrakk>x \<sqsubset> y; y \<sqsubset> x\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
by blast


[STATEMENT]
lemma mat_of_col_dim_col_1: "(dim_col A = 1) = (A = mat_of_col (col A 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (dim_col A = 1) = (A = mat_of_col (col A 0))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. dim_col A = 1 \<Longrightarrow> A = mat_of_col (col A 0)
 2. A = mat_of_col (col A 0) \<Longrightarrow> dim_col A = 1
[PROOF STEP]
show "dim_col A = 1 \<Longrightarrow> A = mat_of_col (col A 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_col A = 1 \<Longrightarrow> A = mat_of_col (col A 0)
[PROOF STEP]
unfolding mat_of_col_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_col A = 1 \<Longrightarrow> A = (mat_of_row (col A 0))\<^sup>T
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
dim_col A = 1 \<Longrightarrow> A = mat_of_col (col A 0)

goal (1 subgoal):
 1. A = mat_of_col (col A 0) \<Longrightarrow> dim_col A = 1
[PROOF STEP]
show "A = mat_of_col (col A 0) \<Longrightarrow> dim_col A = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A = mat_of_col (col A 0) \<Longrightarrow> dim_col A = 1
[PROOF STEP]
by (metis mat_of_col_dim(2))
[PROOF STATE]
proof (state)
this:
A = mat_of_col (col A 0) \<Longrightarrow> dim_col A = 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma all1_matrix_dim: "dim_row (all1_matrix nr nc) = nr" "dim_col (all1_matrix nr nc) = nc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row (all1_matrix nr nc) = nr &&& dim_col (all1_matrix nr nc) = nc
[PROOF STEP]
by (simp_all add: all1_matrix_def)