[STATEMENT]
lemma hrabs_less_Infinitesimal: "e \<in> Infinitesimal \<Longrightarrow> \<bar>x\<bar> < e \<Longrightarrow> x \<in> Infinitesimal"
  for x :: hypreal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>e \<in> Infinitesimal; \<bar>x\<bar> < e\<rbrakk> \<Longrightarrow> x \<in> Infinitesimal
[PROOF STEP]
by (erule hnorm_less_Infinitesimal) simp


[STATEMENT]
lemma quot_Zero [simp]: "\<guillemotleft>Zero\<guillemotright> = Zero"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<guillemotleft>Zero\<guillemotright> = Zero
[PROOF STEP]
by (simp add: quot_tm_def)


[STATEMENT]
lemma par_strict_not_col_1:
  assumes "A B ParStrict C D"
  shows "\<not> Col A B C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Col A B C
[PROOF STEP]
using Col_perm ParStrict_def assms col_trivial_1
[PROOF STATE]
proof (prove)
using this:
Col ?A ?B ?C \<Longrightarrow> Col ?A ?B ?C \<and> Col ?A ?C ?B \<and> Col ?B ?A ?C \<and> Col ?B ?C ?A \<and> Col ?C ?A ?B \<and> Col ?C ?B ?A
?A ?B ParStrict ?C ?D \<equiv> Coplanar ?A ?B ?C ?D \<and> (\<nexists>X. Col X ?A ?B \<and> Col X ?C ?D)
A B ParStrict C D
Col ?A ?A ?B

goal (1 subgoal):
 1. \<not> Col A B C
[PROOF STEP]
by blast


[STATEMENT]
lemma (in gcd_condition_monoid) gcd_divides_r:
  assumes "a \<in> carrier G"  "b \<in> carrier G"
  shows "(somegcd G a b) divides b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. somegcd G a b divides b
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. somegcd G a b divides b
[PROOF STEP]
interpret weak_lower_semilattice "division_rel G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. weak_lower_semilattice (division_rel G)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. somegcd G a b divides b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. somegcd G a b divides b
[PROOF STEP]
by (metis assms gcd_isgcd isgcd_def)
[PROOF STATE]
proof (state)
this:
somegcd G a b divides b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in normal) oVeblen_oLimit_0:
"oVeblen F (oLimit f) 0 = oLimit (\<lambda>n. oVeblen F (f n) 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. oVeblen F (oLimit f) 0 = oLimit (\<lambda>n. oVeblen F (f n) 0)
[PROOF STEP]
by (rule continuousD[OF continuous_oVeblen_0])


[STATEMENT]
lemma of_bl_True [simp]: "(of_bl (True # xs) :: 'a::len word) = 2^length xs + of_bl xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_bl (True # xs) = 2 ^ length xs + of_bl xs
[PROOF STEP]
by (subst of_bl_append [where xs="[True]", simplified]) (simp add: word_1_bl)


[STATEMENT]
lemma affine_binop:
  assumes "degree_aforms [X, Y] \<le> k"
  shows "aform_val e (affine_binop X Y a b c d k) =
    a * aform_val e X + b * aform_val e Y + c + e k * d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aform_val e (affine_binop X Y a b c d k) = a * aform_val e X + b * aform_val e Y + c + e k * d
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
degree_aforms [X, Y] \<le> k

goal (1 subgoal):
 1. aform_val e (affine_binop X Y a b c d k) = a * aform_val e X + b * aform_val e Y + c + e k * d
[PROOF STEP]
by (auto simp: aform_val_def affine_binop_def degrees_def
      pdevs_val_msum_pdevs degree_add_pdevs_le pdevs_val_One_pdevs Basis_list_real_def
      algebra_simps)


[STATEMENT]
lemma L1_I:
  assumes "integrable M f"
  shows "f \<in> space\<^sub>N (\<LL> 1 M)"
        "Norm (\<LL> 1 M) f = (\<integral>x. \<bar>f x\<bar> \<partial>M)"
        "eNorm (\<LL> 1 M) f = (\<integral>x. \<bar>f x\<bar> \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> space\<^sub>N (\<LL> 1 M) &&& Norm (\<LL> 1 M) f = LINT x|M. \<bar>f x\<bar> &&& eNorm (\<LL> 1 M) f = ennreal (LINT x|M. \<bar>f x\<bar>)
[PROOF STEP]
unfolding one_ereal_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> space\<^sub>N (\<LL> 1 M) &&& Norm (\<LL> 1 M) f = LINT x|M. \<bar>f x\<bar> &&& eNorm (\<LL> 1 M) f = ennreal (LINT x|M. \<bar>f x\<bar>)
[PROOF STEP]
using Lp_I[of 1, OF _ borel_measurable_integrable[OF assms]] assms powr_to_1
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < 1; integrable M (\<lambda>x. \<bar>f x\<bar> powr 1)\<rbrakk> \<Longrightarrow> f \<in> space\<^sub>N (\<LL> (ennreal 1) M)
\<lbrakk>0 < 1; integrable M (\<lambda>x. \<bar>f x\<bar> powr 1)\<rbrakk> \<Longrightarrow> Norm (\<LL> (ennreal 1) M) f = (LINT x|M. \<bar>f x\<bar> powr 1) powr (1 / 1)
\<lbrakk>0 < 1; integrable M (\<lambda>x. \<bar>f x\<bar> powr 1)\<rbrakk> \<Longrightarrow> eNorm (\<LL> (ennreal 1) M) f = ennreal ((LINT x|M. \<bar>f x\<bar> powr 1) powr (1 / 1))
integrable M f
?z powr 1 = ?z

goal (1 subgoal):
 1. f \<in> space\<^sub>N (\<LL> 1 M) &&& Norm (\<LL> 1 M) f = LINT x|M. \<bar>f x\<bar> &&& eNorm (\<LL> 1 M) f = ennreal (LINT x|M. \<bar>f x\<bar>)
[PROOF STEP]
by auto


[STATEMENT]
lemma left_in_interval: "\<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> a \<in> interval r a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> a \<in> interval r a b
[PROOF STEP]
using interval_def interval_not_empty reflE
[PROOF STATE]
proof (prove)
using this:
interval ?r ?a ?b = {x. (?a, x) \<in> ?r \<and> (x, ?b) \<in> ?r}
interval r ?a ?b \<noteq> {} \<Longrightarrow> (?a, ?b) \<in> r
?x \<in> A \<Longrightarrow> (?x, ?x) \<in> r

goal (1 subgoal):
 1. \<lbrakk>a \<in> A; b \<in> A; interval r a b \<noteq> {}\<rbrakk> \<Longrightarrow> a \<in> interval r a b
[PROOF STEP]
by fastforce


[STATEMENT]
lemma lower_plus[simp]: "lower (plus A B) = plus (lower A) (lower B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lower (A + B) = lower A + lower B
[PROOF STEP]
by transfer auto


[STATEMENT]
lemma lt_word_bits_lt_pow:
  "sz < word_bits \<Longrightarrow> sz < 2 ^ word_bits"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sz < word_bits \<Longrightarrow> sz < 2 ^ word_bits
[PROOF STEP]
by (simp add: word_bits_conv)


[STATEMENT]
lemma  det_dependent_rows:
  fixes A:: "'a::{field}^'n^'n"
  assumes d: "vec.dependent (rows A)"
  shows "det A = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det A = (0::'a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. det A = (0::'a)
[PROOF STEP]
let ?U = "UNIV :: 'n set"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. det A = (0::'a)
[PROOF STEP]
from d
[PROOF STATE]
proof (chain)
picking this:
vec.dependent (rows A)
[PROOF STEP]
obtain i where i: "row i A \<in> vec.span (rows A - {row i A})"
[PROOF STATE]
proof (prove)
using this:
vec.dependent (rows A)

goal (1 subgoal):
 1. (\<And>i. row i A \<in> vec.span (rows A - {row i A}) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding vec.dependent_def rows_def
[PROOF STATE]
proof (prove)
using this:
\<exists>a\<in>{row i A |i. i \<in> UNIV}. a \<in> vec.span ({row i A |i. i \<in> UNIV} - {a})

goal (1 subgoal):
 1. (\<And>i. row i A \<in> vec.span ({row i A |i. i \<in> UNIV} - {row i A}) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
row i A \<in> vec.span (rows A - {row i A})

goal (1 subgoal):
 1. det A = (0::'a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. det A = (0::'a)
[PROOF STEP]
proof (cases "\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A \<Longrightarrow> det A = (0::'a)
 2. \<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A) \<Longrightarrow> det A = (0::'a)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A

goal (2 subgoals):
 1. \<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A \<Longrightarrow> det A = (0::'a)
 2. \<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A) \<Longrightarrow> det A = (0::'a)
[PROOF STEP]
with i
[PROOF STATE]
proof (chain)
picking this:
row i A \<in> vec.span (rows A - {row i A})
\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A
[PROOF STEP]
have "vec.span (rows A - {row i A}) \<subseteq> vec.span {row j A |j. j \<noteq> i}"
[PROOF STATE]
proof (prove)
using this:
row i A \<in> vec.span (rows A - {row i A})
\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A

goal (1 subgoal):
 1. vec.span (rows A - {row i A}) \<subseteq> vec.span {row j A |j. j \<noteq> i}
[PROOF STEP]
by (auto simp: rows_def intro!: vec.span_mono)
[PROOF STATE]
proof (state)
this:
vec.span (rows A - {row i A}) \<subseteq> vec.span {row j A |j. j \<noteq> i}

goal (2 subgoals):
 1. \<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A \<Longrightarrow> det A = (0::'a)
 2. \<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A) \<Longrightarrow> det A = (0::'a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
vec.span (rows A - {row i A}) \<subseteq> vec.span {row j A |j. j \<noteq> i}
[PROOF STEP]
have "- row i A \<in> vec.span {row j A|j. j \<noteq> i}"
[PROOF STATE]
proof (prove)
using this:
vec.span (rows A - {row i A}) \<subseteq> vec.span {row j A |j. j \<noteq> i}

goal (1 subgoal):
 1. - row i A \<in> vec.span {row j A |j. j \<noteq> i}
[PROOF STEP]
by (meson i subsetCE vec.span_neg)
[PROOF STATE]
proof (state)
this:
- row i A \<in> vec.span {row j A |j. j \<noteq> i}

goal (2 subgoals):
 1. \<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A \<Longrightarrow> det A = (0::'a)
 2. \<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A) \<Longrightarrow> det A = (0::'a)
[PROOF STEP]
from det_row_span[OF this]
[PROOF STATE]
proof (chain)
picking this:
det (\<chi>k. if k = i then row i A + - row i A else row k A) = det A
[PROOF STEP]
have "det A = det (\<chi> k. if k = i then 0 *s 1 else row k A)"
[PROOF STATE]
proof (prove)
using this:
det (\<chi>k. if k = i then row i A + - row i A else row k A) = det A

goal (1 subgoal):
 1. det A = det (\<chi>k. if k = i then (0::'a) *s 1 else row k A)
[PROOF STEP]
unfolding right_minus vector_smult_lzero
[PROOF STATE]
proof (prove)
using this:
det (\<chi>k. if k = i then 0 else row k A) = det A

goal (1 subgoal):
 1. det A = det (\<chi>k. if k = i then 0 else row k A)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
det A = det (\<chi>k. if k = i then (0::'a) *s 1 else row k A)

goal (2 subgoals):
 1. \<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A \<Longrightarrow> det A = (0::'a)
 2. \<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A) \<Longrightarrow> det A = (0::'a)
[PROOF STEP]
with det_row_mul[of i 0 "\<lambda>i. 1"]
[PROOF STATE]
proof (chain)
picking this:
det (\<chi>ia. if ia = i then (0::?'b1) *s 1 else ?b ia) = (0::?'b1) * det (\<chi>ia. if ia = i then 1 else ?b ia)
det A = det (\<chi>k. if k = i then (0::'a) *s 1 else row k A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
det (\<chi>ia. if ia = i then (0::?'b1) *s 1 else ?b ia) = (0::?'b1) * det (\<chi>ia. if ia = i then 1 else ?b ia)
det A = det (\<chi>k. if k = i then (0::'a) *s 1 else row k A)

goal (1 subgoal):
 1. det A = (0::'a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
det A = (0::'a)

goal (1 subgoal):
 1. \<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A) \<Longrightarrow> det A = (0::'a)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A) \<Longrightarrow> det A = (0::'a)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A)

goal (1 subgoal):
 1. \<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A) \<Longrightarrow> det A = (0::'a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A)
[PROOF STEP]
obtain j k where jk: "j \<noteq> k" "row j A = row k A"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A)

goal (1 subgoal):
 1. (\<And>j k. \<lbrakk>j \<noteq> k; row j A = row k A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
j \<noteq> k
row j A = row k A

goal (1 subgoal):
 1. \<not> (\<forall>i j. i \<noteq> j \<longrightarrow> row i A \<noteq> row j A) \<Longrightarrow> det A = (0::'a)
[PROOF STEP]
from det_identical_rows[OF jk]
[PROOF STATE]
proof (chain)
picking this:
det A = (0::'a)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
det A = (0::'a)

goal (1 subgoal):
 1. det A = (0::'a)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
det A = (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
det A = (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma gbinomial_Beta:
  assumes "z + 1 \<notin> \<int>\<^sub>\<le>\<^sub>0"
  shows   "((z::'a::Gamma) gchoose n) = inverse ((z + 1) * Beta (z - of_nat n + 1) (of_nat n + 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z gchoose n = inverse ((z + (1::'a)) * Beta (z - of_nat n + (1::'a)) (of_nat n + (1::'a)))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. z gchoose n = inverse ((z + (1::'a)) * Beta (z - of_nat n + (1::'a)) (of_nat n + (1::'a)))
[PROOF STEP]
proof (induction n arbitrary: z)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>z. z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose 0 = inverse ((z + (1::'a)) * Beta (z - of_nat 0 + (1::'a)) (of_nat 0 + (1::'a)))
 2. \<And>n z. \<lbrakk>\<And>z. z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose n = inverse ((z + (1::'a)) * Beta (z - of_nat n + (1::'a)) (of_nat n + (1::'a))); z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0\<rbrakk> \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (2 subgoals):
 1. \<And>z. z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose 0 = inverse ((z + (1::'a)) * Beta (z - of_nat 0 + (1::'a)) (of_nat 0 + (1::'a)))
 2. \<And>n z. \<lbrakk>\<And>z. z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose n = inverse ((z + (1::'a)) * Beta (z - of_nat n + (1::'a)) (of_nat n + (1::'a))); z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0\<rbrakk> \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
hence "z + 2 \<notin> \<int>\<^sub>\<le>\<^sub>0"
[PROOF STATE]
proof (prove)
using this:
z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. z + (2::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0
[PROOF STEP]
using plus_one_in_nonpos_Ints_imp[of "z+1"]
[PROOF STATE]
proof (prove)
using this:
z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0
z + (1::'a) + (1::'a) \<in> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z + (1::'a) \<in> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. z + (2::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0
[PROOF STEP]
by (auto simp: add.commute)
[PROOF STATE]
proof (state)
this:
z + (2::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (2 subgoals):
 1. \<And>z. z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose 0 = inverse ((z + (1::'a)) * Beta (z - of_nat 0 + (1::'a)) (of_nat 0 + (1::'a)))
 2. \<And>n z. \<lbrakk>\<And>z. z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose n = inverse ((z + (1::'a)) * Beta (z - of_nat n + (1::'a)) (of_nat n + (1::'a))); z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0\<rbrakk> \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
with 0
[PROOF STATE]
proof (chain)
picking this:
z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0
z + (2::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0
z + (2::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. z gchoose 0 = inverse ((z + (1::'a)) * Beta (z - of_nat 0 + (1::'a)) (of_nat 0 + (1::'a)))
[PROOF STEP]
by (auto simp: Beta_def Gamma_eq_zero_iff Gamma_plus1 [symmetric] add.commute)
[PROOF STATE]
proof (state)
this:
z gchoose 0 = inverse ((z + (1::'a)) * Beta (z - of_nat 0 + (1::'a)) (of_nat 0 + (1::'a)))

goal (1 subgoal):
 1. \<And>n z. \<lbrakk>\<And>z. z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose n = inverse ((z + (1::'a)) * Beta (z - of_nat n + (1::'a)) (of_nat n + (1::'a))); z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0\<rbrakk> \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n z. \<lbrakk>\<And>z. z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose n = inverse ((z + (1::'a)) * Beta (z - of_nat n + (1::'a)) (of_nat n + (1::'a))); z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0\<rbrakk> \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
case (Suc n z)
[PROOF STATE]
proof (state)
this:
?z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> ?z gchoose n = inverse ((?z + (1::'a)) * Beta (?z - of_nat n + (1::'a)) (of_nat n + (1::'a)))
z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. \<And>n z. \<lbrakk>\<And>z. z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose n = inverse ((z + (1::'a)) * Beta (z - of_nat n + (1::'a)) (of_nat n + (1::'a))); z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0\<rbrakk> \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
proof (cases "z \<in> \<int>\<^sub>\<le>\<^sub>0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. z \<in> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
 2. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
z \<in> \<int>\<^sub>\<le>\<^sub>0

goal (2 subgoals):
 1. z \<in> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
 2. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
with Suc.prems
[PROOF STATE]
proof (chain)
picking this:
z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0
z \<in> \<int>\<^sub>\<le>\<^sub>0
[PROOF STEP]
have "z = 0"
[PROOF STATE]
proof (prove)
using this:
z + (1::'a) \<notin> \<int>\<^sub>\<le>\<^sub>0
z \<in> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. z = (0::'a)
[PROOF STEP]
by (auto elim!: nonpos_Ints_cases simp: algebra_simps one_plus_of_int_in_nonpos_Ints_iff)
[PROOF STATE]
proof (state)
this:
z = (0::'a)

goal (2 subgoals):
 1. z \<in> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
 2. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
proof (cases "n = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
 2. n \<noteq> 0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
 2. n \<noteq> 0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
with \<open>z = 0\<close>
[PROOF STATE]
proof (chain)
picking this:
z = (0::'a)
n = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
z = (0::'a)
n = 0

goal (1 subgoal):
 1. z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
by (simp add: Beta_def Gamma_eq_zero_iff Gamma_plus1 [symmetric])
[PROOF STATE]
proof (state)
this:
z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
n \<noteq> 0

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
with \<open>z = 0\<close>
[PROOF STATE]
proof (chain)
picking this:
z = (0::'a)
n \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
z = (0::'a)
n \<noteq> 0

goal (1 subgoal):
 1. z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
by (simp_all add: Beta_pole1 one_minus_of_nat_in_nonpos_Ints_iff)
[PROOF STATE]
proof (state)
this:
z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
z \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
have "(z gchoose (Suc n)) = ((z - 1 + 1) gchoose (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z gchoose Suc n = z - (1::'a) + (1::'a) gchoose Suc n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
z gchoose Suc n = z - (1::'a) + (1::'a) gchoose Suc n

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
z gchoose Suc n = z - (1::'a) + (1::'a) gchoose Suc n

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
have "\<dots> = (z - 1 gchoose n) * ((z - 1) + 1) / of_nat (Suc n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z - (1::'a) + (1::'a) gchoose Suc n = (z - (1::'a) gchoose n) * (z - (1::'a) + (1::'a)) / of_nat (Suc n)
[PROOF STEP]
by (subst gbinomial_factors) (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
z - (1::'a) + (1::'a) gchoose Suc n = (z - (1::'a) gchoose n) * (z - (1::'a) + (1::'a)) / of_nat (Suc n)

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
z - (1::'a) + (1::'a) gchoose Suc n = (z - (1::'a) gchoose n) * (z - (1::'a) + (1::'a)) / of_nat (Suc n)

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
from False
[PROOF STATE]
proof (chain)
picking this:
z \<notin> \<int>\<^sub>\<le>\<^sub>0
[PROOF STEP]
have "\<dots> = inverse (of_nat (Suc n) * Beta (z - of_nat n) (of_nat (Suc n)))"
      (is "_ = inverse ?x")
[PROOF STATE]
proof (prove)
using this:
z \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. (z - (1::'a) gchoose n) * (z - (1::'a) + (1::'a)) / of_nat (Suc n) = inverse (of_nat (Suc n) * Beta (z - of_nat n) (of_nat (Suc n)))
[PROOF STEP]
by (subst Suc.IH) (simp_all add: field_simps Beta_pole1)
[PROOF STATE]
proof (state)
this:
(z - (1::'a) gchoose n) * (z - (1::'a) + (1::'a)) / of_nat (Suc n) = inverse (of_nat (Suc n) * Beta (z - of_nat n) (of_nat (Suc n)))

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(z - (1::'a) gchoose n) * (z - (1::'a) + (1::'a)) / of_nat (Suc n) = inverse (of_nat (Suc n) * Beta (z - of_nat n) (of_nat (Suc n)))

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
have "of_nat (Suc n) \<notin> (\<int>\<^sub>\<le>\<^sub>0 :: 'a set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_nat (Suc n) \<notin> \<int>\<^sub>\<le>\<^sub>0
[PROOF STEP]
by (subst of_nat_in_nonpos_Ints_iff) simp_all
[PROOF STATE]
proof (state)
this:
of_nat (Suc n) \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
hence "?x = (z + 1) * Beta (z - of_nat (Suc n) + 1) (of_nat (Suc n) + 1)"
[PROOF STATE]
proof (prove)
using this:
of_nat (Suc n) \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. of_nat (Suc n) * Beta (z - of_nat n) (of_nat (Suc n)) = (z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a))
[PROOF STEP]
by (subst Beta_plus1_right [symmetric]) simp_all
[PROOF STATE]
proof (state)
this:
of_nat (Suc n) * Beta (z - of_nat n) (of_nat (Suc n)) = (z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a))

goal (1 subgoal):
 1. z \<notin> \<int>\<^sub>\<le>\<^sub>0 \<Longrightarrow> z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))

goal (1 subgoal):
 1. z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
z gchoose Suc n = inverse ((z + (1::'a)) * Beta (z - of_nat (Suc n) + (1::'a)) (of_nat (Suc n) + (1::'a)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma frac_neg: "frac (- x) = (if x \<in> \<int> then 0 else 1 - frac x)"
  for x :: "'a::floor_ceiling"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frac (- x) = (if x \<in> \<int> then 0::'a else (1::'a) - frac x)
[PROOF STEP]
apply (auto simp add: frac_unique_iff)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. x \<notin> \<int> \<Longrightarrow> - x - ((1::'a) - frac x) \<in> \<int>
 2. x \<notin> \<int> \<Longrightarrow> frac x \<le> (1::'a)
[PROOF STEP]
apply (simp add: frac_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> \<int> \<Longrightarrow> frac x \<le> (1::'a)
[PROOF STEP]
apply (meson frac_lt_1 less_iff_diff_less_0 not_le not_less_iff_gr_or_eq)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma "\<And>a r x y. dist x a + dist a y = r \<Longrightarrow> \<forall>z. r \<le> dist x z + dist z y \<Longrightarrow> dist x y = r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a r x y. \<lbrakk>dist x a + dist a y = r; \<forall>z. r \<le> dist x z + dist z y\<rbrakk> \<Longrightarrow> dist x y = r
[PROOF STEP]
by metric


[STATEMENT]
lemma nn_integral_cmult: "f \<in> borel_measurable M \<Longrightarrow> (\<integral>\<^sup>+ x. c * f x \<partial>M) = c * integral\<^sup>N M f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> borel_measurable M \<Longrightarrow> \<integral>\<^sup>+ x. c * f x \<partial>M = c * integral\<^sup>N M f
[PROOF STEP]
using nn_integral_linear[of f M "\<lambda>x. 0" c]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f \<in> borel_measurable M; (\<lambda>x. 0) \<in> borel_measurable M\<rbrakk> \<Longrightarrow> \<integral>\<^sup>+ x. c * f x + 0 \<partial>M = c * integral\<^sup>N M f + \<integral>\<^sup>+ x. 0 \<partial>M

goal (1 subgoal):
 1. f \<in> borel_measurable M \<Longrightarrow> \<integral>\<^sup>+ x. c * f x \<partial>M = c * integral\<^sup>N M f
[PROOF STEP]
by simp


[STATEMENT]
lemma trancl_image_by_rtrancl: "(E\<^sup>+)``Vi \<union> Vi = (E\<^sup>*)``Vi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. E\<^sup>+ `` Vi \<union> Vi = E\<^sup>* `` Vi
[PROOF STEP]
by (metis Image_Id Un_Image rtrancl_trancl_reflcl)


[STATEMENT]
lemma unit_disc_fix_preserves_poincare_on_line [simp]:
  assumes "unit_disc_fix M" and "p \<in> unit_disc" "a \<in> unit_disc" "b \<in> unit_disc"
  shows "poincare_on_line (moebius_pt M p) (moebius_pt M a) (moebius_pt M b) \<longleftrightarrow> poincare_on_line p a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poincare_on_line (moebius_pt M p) (moebius_pt M a) (moebius_pt M b) = poincare_on_line p a b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
unit_disc_fix M
p \<in> unit_disc
a \<in> unit_disc
b \<in> unit_disc

goal (1 subgoal):
 1. poincare_on_line (moebius_pt M p) (moebius_pt M a) (moebius_pt M b) = poincare_on_line p a b
[PROOF STEP]
unfolding poincare_on_line_def
[PROOF STATE]
proof (prove)
using this:
unit_disc_fix M
p \<in> unit_disc
a \<in> unit_disc
b \<in> unit_disc

goal (1 subgoal):
 1. poincare_collinear {moebius_pt M p, moebius_pt M a, moebius_pt M b} = poincare_collinear {p, a, b}
[PROOF STEP]
by auto


[STATEMENT]
lemma linorder_min_same1 [simp]:
  "(min y x = y) = (y \<le> (x::'a::linorder))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (min y x = y) = (y \<le> x)
[PROOF STEP]
by (auto simp: min_def linorder_not_less)


[STATEMENT]
lemma exp_complex_eqI: "\<bar>Im w - Im z\<bar> < 2*pi \<Longrightarrow> exp w = exp z \<Longrightarrow> w = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<bar>Im w - Im z\<bar> < 2 * pi; exp w = exp z\<rbrakk> \<Longrightarrow> w = z
[PROOF STEP]
by (auto simp: exp_eq abs_mult)


[STATEMENT]
lemma reparam_weak_eq_line_integrals_basis:
  assumes "reparam_weak \<gamma>1 \<gamma>2"
    "\<gamma>2 C1_differentiable_on {0..1}" (*To generalise this to valid_path we need a version of has_integral_substitution_strong that allows finite discontinuities*)
    "\<forall>b\<in>basis. continuous_on (path_image \<gamma>2) (\<lambda>x. F x \<bullet> b)"
    "finite basis"
  shows "line_integral F basis \<gamma>1 = line_integral F basis \<gamma>2"
    "line_integral_exists F basis \<gamma>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. line_integral F basis \<gamma>1 = line_integral F basis \<gamma>2 &&& line_integral_exists F basis \<gamma>1
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. line_integral F basis \<gamma>1 = line_integral F basis \<gamma>2
 2. line_integral_exists F basis \<gamma>1
[PROOF STEP]
show "line_integral_exists F basis \<gamma>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. line_integral_exists F basis \<gamma>1
[PROOF STEP]
using reparam_weak_eq_line_integrals(2)[OF assms(1) assms(2)] assms(3-4) line_integral_sum_basis(2)[OF assms(4)]
[PROOF STATE]
proof (prove)
using this:
continuous_on (path_image \<gamma>2) (\<lambda>x. ?F x \<bullet> ?b) \<Longrightarrow> line_integral_exists ?F {?b} \<gamma>1
\<forall>b\<in>basis. continuous_on (path_image \<gamma>2) (\<lambda>x. F x \<bullet> b)
finite basis
\<forall>b\<in>basis. line_integral_exists ?F {b} ?\<gamma> \<Longrightarrow> line_integral_exists ?F basis ?\<gamma>

goal (1 subgoal):
 1. line_integral_exists F basis \<gamma>1
[PROOF STEP]
by(simp add: subset_iff)
[PROOF STATE]
proof (state)
this:
line_integral_exists F basis \<gamma>1

goal (1 subgoal):
 1. line_integral F basis \<gamma>1 = line_integral F basis \<gamma>2
[PROOF STEP]
show "line_integral F basis \<gamma>1 = line_integral F basis \<gamma>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. line_integral F basis \<gamma>1 = line_integral F basis \<gamma>2
[PROOF STEP]
using reparam_weak_eq_line_integrals[OF assms(1) assms(2)] assms(3-4) line_integral_sum_basis(1)[OF assms(4)]
      line_integral_exists_smooth_one_base[OF assms(2)]
[PROOF STATE]
proof (prove)
using this:
continuous_on (path_image \<gamma>2) (\<lambda>x. ?F x \<bullet> ?b) \<Longrightarrow> line_integral ?F {?b} \<gamma>1 = line_integral ?F {?b} \<gamma>2
continuous_on (path_image \<gamma>2) (\<lambda>x. ?F x \<bullet> ?b) \<Longrightarrow> line_integral_exists ?F {?b} \<gamma>1
\<forall>b\<in>basis. continuous_on (path_image \<gamma>2) (\<lambda>x. F x \<bullet> b)
finite basis
\<forall>b\<in>basis. line_integral_exists ?F {b} ?\<gamma> \<Longrightarrow> line_integral ?F basis ?\<gamma> = (\<Sum>b\<in>basis. line_integral ?F {b} ?\<gamma>)
continuous_on (path_image \<gamma>2) (\<lambda>x. ?F x \<bullet> ?b) \<Longrightarrow> line_integral_exists ?F {?b} \<gamma>2

goal (1 subgoal):
 1. line_integral F basis \<gamma>1 = line_integral F basis \<gamma>2
[PROOF STEP]
by(simp add: subset_iff)
[PROOF STATE]
proof (state)
this:
line_integral F basis \<gamma>1 = line_integral F basis \<gamma>2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma One_rat_def: "1 = Fract 1 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 = Fract 1 1
[PROOF STEP]
by transfer simp


[STATEMENT]
lemma head_\<omega>_lt_imp_lt: "head_\<omega> m < head_\<omega> n \<Longrightarrow> m < n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. head_\<omega> m < head_\<omega> n \<Longrightarrow> m < n
[PROOF STEP]
unfolding head_\<omega>_def hmsetmset_less[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hmsetmset (if m = 0 then 0 else \<omega>^ (Max_mset (hmsetmset m))) < hmsetmset (if n = 0 then 0 else \<omega>^ (Max_mset (hmsetmset n))) \<Longrightarrow> hmsetmset m < hmsetmset n
[PROOF STEP]
by (rule all_lt_Max_imp_lt_mset, auto simp: zero_hmultiset_def split: if_splits)


[STATEMENT]
lemma lemma1: "Key (invKey K) \<in> analz H ==>
               analz (insert (Crypt K X) H) \<subseteq>
               insert (Crypt K X) (analz (insert X H))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Key (invKey K) \<in> analz H \<Longrightarrow> analz (insert (Crypt K X) H) \<subseteq> insert (Crypt K X) (analz (insert X H))
[PROOF STEP]
apply (rule subsetI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>Key (invKey K) \<in> analz H; x \<in> analz (insert (Crypt K X) H)\<rbrakk> \<Longrightarrow> x \<in> insert (Crypt K X) (analz (insert X H))
[PROOF STEP]
apply (erule_tac x = x in analz.induct, auto)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma frontier_Int_subset: "frontier(S \<inter> T) \<subseteq> frontier S \<union> frontier T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. frontier (S \<inter> T) \<subseteq> frontier S \<union> frontier T
[PROOF STEP]
by (auto simp: frontier_Int)


[STATEMENT]
lemma LessThan_induct:
     "(!!m::nat. F \<in> (A \<inter> f-`{m}) LeadsTo ((A \<inter> f-`(lessThan m)) \<union> B))
      ==> F \<in> A LeadsTo B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>m. F \<in> A \<inter> f -` {m} \<longmapsto>w A \<inter> f -` {..<m} \<union> B) \<Longrightarrow> F \<in> A \<longmapsto>w B
[PROOF STEP]
by (rule wf_less_than [THEN LeadsTo_wf_induct], auto)


[STATEMENT]
lemma (in cpx_sq_mat) make_pm_eigenvalues:
  assumes "A\<in> fc_mats"
  and "hermitian A"
and "i < proj_meas_size (make_pm A)"
shows "meas_outcome_val (proj_meas_outcomes (make_pm A) i) \<in> spectrum A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complex_of_real (meas_outcome_val (proj_meas_outcomes (make_pm A) i)) \<in> spectrum A
[PROOF STEP]
using spectrum_meas_outcome_val_eq[of A] assms make_pm_decomp
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>hermitian A; A \<in> fc_mats; make_pm A = (?p, ?M)\<rbrakk> \<Longrightarrow> spectrum A = (\<lambda>x. complex_of_real (meas_outcome_val (?M x))) ` {..<?p}
A \<in> fc_mats
hermitian A
i < proj_meas_size (make_pm A)
make_pm ?A = (proj_meas_size (make_pm ?A), proj_meas_outcomes (make_pm ?A))

goal (1 subgoal):
 1. complex_of_real (meas_outcome_val (proj_meas_outcomes (make_pm A) i)) \<in> spectrum A
[PROOF STEP]
by auto


[STATEMENT]
lemma zposs_aposss:"(0 < n) = (0 < (ant n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0 < n) = (0 < ant n)
[PROOF STEP]
apply (rule iffI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. 0 < n \<Longrightarrow> 0 < ant n
 2. 0 < ant n \<Longrightarrow> 0 < n
[PROOF STEP]
apply (unfold Zero_ant_def,
        subst aless[THEN sym, of "0" "n"], simp,
        subst aless[of "0" "n"], simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma "filterlim (\<lambda>x::real. ln x powr (1/x)) (at_right 1) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LIM x at_top. ln x powr (1 / x) :> at_right 1
[PROOF STEP]
by (real_asymp (verbose))


[STATEMENT]
lemma quadratic_ex_zero_iff:
  "(\<exists>x. a * x\<^sup>2 + b * x + c = 0) \<longleftrightarrow> (a \<noteq> 0 \<and> b\<^sup>2 - 4 * a * c \<ge> 0 \<or> a = 0 \<and> (b = 0 \<longrightarrow> c = 0))"
  for a b c::real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x. a * x\<^sup>2 + b * x + c = 0) = (a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c \<or> a = 0 \<and> (b = 0 \<longrightarrow> c = 0))
[PROOF STEP]
apply (cases "a = 0")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. a = 0 \<Longrightarrow> (\<exists>x. a * x\<^sup>2 + b * x + c = 0) = (a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c \<or> a = 0 \<and> (b = 0 \<longrightarrow> c = 0))
 2. a \<noteq> 0 \<Longrightarrow> (\<exists>x. a * x\<^sup>2 + b * x + c = 0) = (a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c \<or> a = 0 \<and> (b = 0 \<longrightarrow> c = 0))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a = 0 \<Longrightarrow> (\<exists>x. a * x\<^sup>2 + b * x + c = 0) = (a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c \<or> a = 0 \<and> (b = 0 \<longrightarrow> c = 0))
[PROOF STEP]
by (auto simp: intro: exI[where x="- c / b"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> 0 \<Longrightarrow> (\<exists>x. a * x\<^sup>2 + b * x + c = 0) = (a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c \<or> a = 0 \<and> (b = 0 \<longrightarrow> c = 0))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> 0 \<Longrightarrow> (\<exists>x. a * x\<^sup>2 + b * x + c = 0) = (a \<noteq> 0 \<and> 0 \<le> b\<^sup>2 - 4 * a * c \<or> a = 0 \<and> (b = 0 \<longrightarrow> c = 0))
[PROOF STEP]
by (subst quadratic_eq_zeroes_iff[OF refl refl refl]) auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma not_member: "\<not> member a (x\<oplus>y) \<Longrightarrow> \<not> member a x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> member a (x \<oplus> y) \<Longrightarrow> \<not> member a x
[PROOF STEP]
by auto


[STATEMENT]
lemma nat_of_times_sat [simp, code abstract]:
  "nat_of (x * y) = min (nat_of x * nat_of y) (LENGTH('a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nat_of (x * y) = min (nat_of x * nat_of y) LENGTH('a)
[PROOF STEP]
by (simp add: times_sat_def)


[STATEMENT]
lemma trivial_homomorphism_hom_boundary_inclusion:
  assumes "S = {} \<or> S retract_of_space X"
  shows "trivial_homomorphism
             (relative_homology_group p X S) (homology_group (p-1) (subtopology X S))
             (hom_boundary p X S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trivial_homomorphism (relative_homology_group p X S) (homology_group (p - 1) (subtopology X S)) (hom_boundary p X S)
[PROOF STEP]
apply (rule iffD1 [OF exact_seq_mon_eq_triviality inj_on_hom_induced_inclusion [OF assms]])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exact_seq ([?D2, homology_group (p - 1) (subtopology X S), relative_homology_group p X S, ?A2], [hom_induced (p - 1) (subtopology X S) {} X {} id, hom_boundary p X S, ?f2])
[PROOF STEP]
apply (rule exact_seq.intros)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. exact_seq ([homology_group (p - 1) (subtopology X S), relative_homology_group p X S, ?A2], [hom_boundary p X S, ?f2])
 2. Group.group ?D2
 3. hom_induced (p - 1) (subtopology X S) {} X {} id \<in> hom (homology_group (p - 1) (subtopology X S)) ?D2
 4. kernel (homology_group (p - 1) (subtopology X S)) ?D2 (hom_induced (p - 1) (subtopology X S) {} X {} id) = hom_boundary p X S ` carrier (relative_homology_group p X S)
[PROOF STEP]
apply (rule homology_exactness_axiom_1 [of p])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. Group.group ?D2
 2. hom_induced (p - 1) (subtopology X S) {} X {} id \<in> hom (homology_group (p - 1) (subtopology X S)) ?D2
 3. kernel (homology_group (p - 1) (subtopology X S)) ?D2 (hom_induced (p - 1) (subtopology X S) {} X {} id) = hom_boundary p X S ` carrier (relative_homology_group p X S)
[PROOF STEP]
using homology_exactness_axiom_2 [of p]
[PROOF STATE]
proof (prove)
using this:
exact_seq ([homology_group (p - 1) ?X, homology_group (p - 1) (subtopology ?X ?S), relative_homology_group p ?X ?S], [hom_induced (p - 1) (subtopology ?X ?S) {} ?X {} id, hom_boundary p ?X ?S])

goal (3 subgoals):
 1. Group.group ?D2
 2. hom_induced (p - 1) (subtopology X S) {} X {} id \<in> hom (homology_group (p - 1) (subtopology X S)) ?D2
 3. kernel (homology_group (p - 1) (subtopology X S)) ?D2 (hom_induced (p - 1) (subtopology X S) {} X {} id) = hom_boundary p X S ` carrier (relative_homology_group p X S)
[PROOF STEP]
by auto


[STATEMENT]
lemma (in is_functor) umap_fo_ArrVal_vdomain:
  assumes "u : \<FF>\<lparr>ObjMap\<rparr>\<lparr>r\<rparr> \<mapsto>\<^bsub>\<BB>\<^esub> c"
  shows "\<D>\<^sub>\<circ> (umap_fo \<FF> c r u d\<lparr>ArrVal\<rparr>) = Hom \<AA> d r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (umap_fo \<FF> c r u d\<lparr>ArrVal\<rparr>) = Hom \<AA> d r
[PROOF STEP]
unfolding umap_fo_components[OF assms]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (\<lambda>f'\<in>\<^sub>\<circ>Hom \<AA> d r. u \<circ>\<^sub>A\<^bsub>\<BB>\<^esub> \<FF>\<lparr>ArrMap\<rparr>\<lparr>f'\<rparr>) = Hom \<AA> d r
[PROOF STEP]
by simp


[STATEMENT]
lemma i_Exec_Stream_Init_Pre_Post1: "
  \<lbrakk> c_n = i_Exec_Comp_Stream_Init trans_fun input c n; x_n = input n \<rbrakk> \<Longrightarrow>
  (P1 x_n \<and> P2 c_n \<longrightarrow> Q (i_Exec_Comp_Stream_Init trans_fun input c (Suc n))) =
  (P1 x_n \<and> P2 c_n \<longrightarrow> Q (trans_fun x_n c_n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>c_n = i_Exec_Comp_Stream_Init trans_fun input c n; x_n = input n\<rbrakk> \<Longrightarrow> (P1 x_n \<and> P2 c_n \<longrightarrow> Q (i_Exec_Comp_Stream_Init trans_fun input c (Suc n))) = (P1 x_n \<and> P2 c_n \<longrightarrow> Q (trans_fun x_n c_n))
[PROOF STEP]
by (simp add: i_Exec_Stream_Init_nth_Suc_calc)


[STATEMENT]
lemma gbinomial_reduce_nat: "0 < k \<Longrightarrow> a gchoose k = (a - 1) gchoose (k - 1) + ((a - 1) gchoose k)"
  for a :: "'a::field_char_0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < k \<Longrightarrow> a gchoose k = a - (1::'a) gchoose (k - 1) + (a - (1::'a) gchoose k)
[PROOF STEP]
by (metis Suc_pred' diff_add_cancel gbinomial_Suc_Suc)


[STATEMENT]
lemma drop_eq_Nil [simp]: "drop n xs = [] \<longleftrightarrow> length xs \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (drop n xs = []) = (length xs \<le> n)
[PROOF STEP]
by (metis diff_is_0_eq drop_all length_drop list.size(3))


[STATEMENT]
lemma Mp_to_int_poly: "Mp (to_int_poly (f :: 'a mod_ring poly)) = to_int_poly f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Mp (to_int_poly f) = to_int_poly f
[PROOF STEP]
by (auto simp: poly_eq_iff Mp_coeff M_to_int_mod_ring)


[STATEMENT]
lemma index_states_integer_language :
  "L (index_states_integer M) = L M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L (index_states_integer M) = L M
[PROOF STEP]
using rename_states_isomorphism_language[of "integer_of_nat \<circ> assign_indices (states M)" M, OF assign_indices_integer_bij_betw]
[PROOF STATE]
proof (prove)
using this:
L (FSM.rename_states M (integer_of_nat \<circ> assign_indices (FSM.states M))) = L M

goal (1 subgoal):
 1. L (index_states_integer M) = L M
[PROOF STEP]
by auto


[STATEMENT]
lemma tl_replicate [simp]: "tl (replicate n x) = replicate (n - 1) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tl (replicate n x) = replicate (n - 1) x
[PROOF STEP]
by (induct n) auto


[STATEMENT]
lemma Lcm_int_eq [simp]:
  "(LCM n\<in>N. int n) = int (Lcm N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lcm (int ` N) = int (Lcm N)
[PROOF STEP]
by (simp add: Lcm_int_def image_image)


[STATEMENT]
lemma quot_Var: "\<guillemotleft>Var x\<guillemotright> = SUCC (ORD_OF (nat_of_name x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<guillemotleft>Var x\<guillemotright> = SUCC (ORD_OF (nat_of_name x))
[PROOF STEP]
by (simp add: quot_tm_def)


[STATEMENT]
theorem wls_vsubstAbs_eq_swapAbs:
assumes "wlsAbs (us,s) A" and "y1 = y2 \<or> freshAbs ys y1 A"
shows "(A $[y1 // y2]_ys) = (A $[y1 \<and> y2]_ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $[y1 // y2]_ys = A $[y1 \<and> y2]_ys
[PROOF STEP]
using assms vsubstAll_swapAll[of "Par [y1, y2] [] [] []" _ _ A]
[PROOF STATE]
proof (prove)
using this:
wlsAbs (us, s) A
y1 = y2 \<or> freshAbs ys y1 A
goodPar (Par [y1, y2] [] [] []) \<Longrightarrow> (good ?X \<longrightarrow> (\<forall>y1a y2a. {y1a, y2a} \<subseteq> varsOf (Par [y1, y2] [] [] []) \<and> fresh ?ys y1a ?X \<longrightarrow> ?X #[y1a // y2a]_?ys = ?X #[y1a \<and> y2a]_?ys)) \<and> (goodAbs A \<longrightarrow> (\<forall>y1a y2a. {y1a, y2a} \<subseteq> varsOf (Par [y1, y2] [] [] []) \<and> freshAbs ?ys y1a A \<longrightarrow> A $[y1a // y2a]_?ys = A $[y1a \<and> y2a]_?ys))

goal (1 subgoal):
 1. A $[y1 // y2]_ys = A $[y1 \<and> y2]_ys
[PROOF STEP]
unfolding goodPar_def
[PROOF STATE]
proof (prove)
using this:
wlsAbs (us, s) A
y1 = y2 \<or> freshAbs ys y1 A
Ball (termsOf (Par [y1, y2] [] [] [])) good \<and> Ball (absOf (Par [y1, y2] [] [] [])) goodAbs \<and> Ball (envsOf (Par [y1, y2] [] [] [])) goodEnv \<Longrightarrow> (good ?X \<longrightarrow> (\<forall>y1a y2a. {y1a, y2a} \<subseteq> varsOf (Par [y1, y2] [] [] []) \<and> fresh ?ys y1a ?X \<longrightarrow> ?X #[y1a // y2a]_?ys = ?X #[y1a \<and> y2a]_?ys)) \<and> (goodAbs A \<longrightarrow> (\<forall>y1a y2a. {y1a, y2a} \<subseteq> varsOf (Par [y1, y2] [] [] []) \<and> freshAbs ?ys y1a A \<longrightarrow> A $[y1a // y2a]_?ys = A $[y1a \<and> y2a]_?ys))

goal (1 subgoal):
 1. A $[y1 // y2]_ys = A $[y1 \<and> y2]_ys
[PROOF STEP]
by auto


[STATEMENT]
lemma from_nat_into_inj_infinite[simp]:
  "countable A \<Longrightarrow> infinite A \<Longrightarrow> from_nat_into A m = from_nat_into A n \<longleftrightarrow> m = n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>countable A; infinite A\<rbrakk> \<Longrightarrow> (from_nat_into A m = from_nat_into A n) = (m = n)
[PROOF STEP]
using image_to_nat_on[of A] from_nat_into_inj[of A m n]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>countable A; infinite A\<rbrakk> \<Longrightarrow> to_nat_on A ` A = UNIV
\<lbrakk>countable A; m \<in> to_nat_on A ` A; n \<in> to_nat_on A ` A\<rbrakk> \<Longrightarrow> (from_nat_into A m = from_nat_into A n) = (m = n)

goal (1 subgoal):
 1. \<lbrakk>countable A; infinite A\<rbrakk> \<Longrightarrow> (from_nat_into A m = from_nat_into A n) = (m = n)
[PROOF STEP]
by simp


[STATEMENT]
lemma "(\<forall>x. P a x \<or> (\<forall>y. P x y)) \<longrightarrow> (\<exists>x. \<forall>y. P x y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. P a x \<or> (\<forall>y. P x y)) \<longrightarrow> (\<exists>x. \<forall>y. P x y)
[PROOF STEP]
by blast


[STATEMENT]
lemma ChiRel_OneAncestor_notmem:
  "\<lbrakk> S \<noteq> T; (S,U) \<in> ChiRel A\<rbrakk> \<Longrightarrow> (T,U) \<notin> ChiRel A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S \<noteq> T; (S, U) \<in> ChiRel A\<rbrakk> \<Longrightarrow> (T, U) \<notin> ChiRel A
[PROOF STEP]
apply (unfold ChiRel_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S \<noteq> T; (S, U) \<in> {(S, S'). S \<in> HAStates A \<and> S' \<in> HAStates A \<and> S' \<in> Chi A S}\<rbrakk> \<Longrightarrow> (T, U) \<notin> {(S, S'). S \<in> HAStates A \<and> S' \<in> HAStates A \<and> S' \<in> Chi A S}
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S \<noteq> T; S \<in> HAStates A; U \<in> HAStates A; U \<in> Chi A S; T \<in> HAStates A; U \<in> Chi A T\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (simp only: Chi_range_disjoint)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma isOK_check_allm:
  "isOK (check_allm f xs) \<longleftrightarrow> (\<forall>x \<in> set xs. isOK (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isOK (try forallM f xs catch (\<lambda>x. Inl (snd x))) = (\<forall>x\<in>set xs. isOK (f x))
[PROOF STEP]
by simp


[STATEMENT]
lemma degree_m_eq: "coeff f (degree f) mod m \<noteq> 0 \<Longrightarrow> m > 1 \<Longrightarrow> degree_m f = degree f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>lead_coeff f mod m \<noteq> 0; 1 < m\<rbrakk> \<Longrightarrow> degree_m f = degree f
[PROOF STEP]
using degree_m_le[of f]
[PROOF STATE]
proof (prove)
using this:
degree_m f \<le> degree f

goal (1 subgoal):
 1. \<lbrakk>lead_coeff f mod m \<noteq> 0; 1 < m\<rbrakk> \<Longrightarrow> degree_m f = degree f
[PROOF STEP]
unfolding Mp_def
[PROOF STATE]
proof (prove)
using this:
degree (map_poly M f) \<le> degree f

goal (1 subgoal):
 1. \<lbrakk>lead_coeff f mod m \<noteq> 0; 1 < m\<rbrakk> \<Longrightarrow> degree (map_poly M f) = degree f
[PROOF STEP]
by (auto intro: degree_map_poly simp: Mp_def poly_mod.M_def)


[STATEMENT]
lemma "\<exists> y. x \<noteq> 0 \<longrightarrow> (x::(('a) mod_ring)) *  y = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. x \<noteq> 0 \<longrightarrow> x * y = 1
[PROOF STEP]
by (metis dvd_field_iff unit_dvdE)


[STATEMENT]
lemma upset_set_prop_var: "\<Up>X = (\<Union>x \<in> X. \<up>x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Up> X = \<Union> (\<up> ` X)
[PROOF STEP]
by (simp add: dual_ord.downset_set_prop_var dual_upset dual_upset_set)


[STATEMENT]
lemma single_addition_zero:"\<lbrakk>commute_bpp f (aug_pm_set z i {(a::'a)});
      assoc_bpp (aug_pm_set z i {a}) f; ipp_cond1 {a} i; ipp_cond2 z {a} i f;
      ipp_cond3 z i; inv_ipp z i f {a}; commute_bpp f (aug_pm_set z i {a});
      zeroA z i f {a} z\<rbrakk> \<Longrightarrow> 0\<Odot>a\<^bsub>f,i,z\<^esub> = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>commute_bpp f (aug_pm_set z i {a}); assoc_bpp (aug_pm_set z i {a}) f; ipp_cond1 {a} i; ipp_cond2 z {a} i f; ipp_cond3 z i; inv_ipp z i f {a}; commute_bpp f (aug_pm_set z i {a}); zeroA z i f {a} z\<rbrakk> \<Longrightarrow> 0\<Odot>a\<^bsub>f,i,z\<^esub> = z
[PROOF STEP]
apply (simp add:fg_elem_single_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma dyadics_iff:
   "(dyadics :: 'a::field_char_0 set) =
    Nats \<union> (\<Union>k m. {of_nat (4*m + 1) / 2^Suc k}) \<union> (\<Union>k m. {of_nat (4*m + 3) / 2^Suc k})"
           (is "_ = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dyadics = \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k})
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. dyadics \<subseteq> \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k})
 2. \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics
[PROOF STEP]
show "dyadics \<subseteq> ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dyadics \<subseteq> \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k})
[PROOF STEP]
unfolding dyadics_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>k m. {of_nat m / (2::'a) ^ k}) \<subseteq> \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k})
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x k m. \<lbrakk>k \<in> UNIV; m \<in> UNIV; of_nat m / (2::'a) ^ k \<notin> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}); of_nat m / (2::'a) ^ k \<notin> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k})\<rbrakk> \<Longrightarrow> of_nat m / (2::'a) ^ k \<in> \<nat>
[PROOF STEP]
apply (rule dyadic_413_cases, force+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
dyadics \<subseteq> \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k})

goal (1 subgoal):
 1. \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics
[PROOF STEP]
have "range of_nat \<subseteq> (\<Union>k m. {(of_nat m::'a) / 2 ^ k})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range of_nat \<subseteq> (\<Union>k m. {of_nat m / (2::'a) ^ k})
[PROOF STEP]
by clarsimp (metis divide_numeral_1 numeral_One power_0)
[PROOF STATE]
proof (state)
this:
range of_nat \<subseteq> (\<Union>k m. {of_nat m / (2::'a) ^ k})

goal (1 subgoal):
 1. \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
range of_nat \<subseteq> (\<Union>k m. {of_nat m / (2::'a) ^ k})

goal (1 subgoal):
 1. \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics
[PROOF STEP]
have "\<And>k m. \<exists>k' m'. ((1::'a) + 4 * of_nat m) / 2 ^ Suc k = of_nat m' / 2 ^ k'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>k m. \<exists>k' m'. ((1::'a) + (4::'a) * of_nat m) / (2::'a) ^ Suc k = of_nat m' / (2::'a) ^ k'
[PROOF STEP]
by (metis (no_types) of_nat_Suc of_nat_mult of_nat_numeral)
[PROOF STATE]
proof (state)
this:
\<exists>k' m'. ((1::'a) + (4::'a) * of_nat ?m) / (2::'a) ^ Suc ?k = of_nat m' / (2::'a) ^ k'

goal (1 subgoal):
 1. \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<exists>k' m'. ((1::'a) + (4::'a) * of_nat ?m) / (2::'a) ^ Suc ?k = of_nat m' / (2::'a) ^ k'

goal (1 subgoal):
 1. \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics
[PROOF STEP]
have "\<And>k m. \<exists>k' m'. (4 * of_nat m + (3::'a)) / 2 ^ Suc k = of_nat m' / 2 ^ k'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>k m. \<exists>k' m'. ((4::'a) * of_nat m + (3::'a)) / (2::'a) ^ Suc k = of_nat m' / (2::'a) ^ k'
[PROOF STEP]
by (metis of_nat_add of_nat_mult of_nat_numeral)
[PROOF STATE]
proof (state)
this:
\<exists>k' m'. ((4::'a) * of_nat ?m + (3::'a)) / (2::'a) ^ Suc ?k = of_nat m' / (2::'a) ^ k'

goal (1 subgoal):
 1. \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
range of_nat \<subseteq> (\<Union>k m. {of_nat m / (2::'a) ^ k})
\<exists>k' m'. ((1::'a) + (4::'a) * of_nat ?m) / (2::'a) ^ Suc ?k = of_nat m' / (2::'a) ^ k'
\<exists>k' m'. ((4::'a) * of_nat ?m + (3::'a)) / (2::'a) ^ Suc ?k = of_nat m' / (2::'a) ^ k'
[PROOF STEP]
show "?rhs \<subseteq> dyadics"
[PROOF STATE]
proof (prove)
using this:
range of_nat \<subseteq> (\<Union>k m. {of_nat m / (2::'a) ^ k})
\<exists>k' m'. ((1::'a) + (4::'a) * of_nat ?m) / (2::'a) ^ Suc ?k = of_nat m' / (2::'a) ^ k'
\<exists>k' m'. ((4::'a) * of_nat ?m + (3::'a)) / (2::'a) ^ Suc ?k = of_nat m' / (2::'a) ^ k'

goal (1 subgoal):
 1. \<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics
[PROOF STEP]
by (auto simp: dyadics_def Nats_def)
[PROOF STATE]
proof (state)
this:
\<nat> \<union> (\<Union>k m. {of_nat (4 * m + 1) / (2::'a) ^ Suc k}) \<union> (\<Union>k m. {of_nat (4 * m + 3) / (2::'a) ^ Suc k}) \<subseteq> dyadics

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "pred n = 0 \<Longrightarrow> n = 0 \<or> n = Suc 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pred n = 0 \<Longrightarrow> n = 0 \<or> n = Suc 0
[PROOF STEP]
by (erule pred0E) metis+


[STATEMENT]
lemma Jordan_curve_R2:
  fixes c :: "real \<Rightarrow> 'a"
  assumes "simple_path c" "pathfinish c = pathstart c"
  obtains inside outside where
    "inside \<noteq> {}" "open inside" "connected inside"
    "outside \<noteq> {}" "open outside" "connected outside"
    "bounded inside" "\<not> bounded outside"
    "inside \<inter> outside = {}"
    "inside \<union> outside = - path_image c"
    "frontier inside = path_image c"
    "frontier outside = path_image c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from simple_path_linear_image_eq[OF complex_of_linear]
[PROOF STATE]
proof (chain)
picking this:
inj complex_of \<Longrightarrow> simple_path (complex_of \<circ> ?g) = simple_path ?g
[PROOF STEP]
have a1:"simple_path (complex_of \<circ> c)"
[PROOF STATE]
proof (prove)
using this:
inj complex_of \<Longrightarrow> simple_path (complex_of \<circ> ?g) = simple_path ?g

goal (1 subgoal):
 1. simple_path (complex_of \<circ> c)
[PROOF STEP]
using assms(1) complex_of_bij
[PROOF STATE]
proof (prove)
using this:
inj complex_of \<Longrightarrow> simple_path (complex_of \<circ> ?g) = simple_path ?g
simple_path c
bij complex_of

goal (1 subgoal):
 1. simple_path (complex_of \<circ> c)
[PROOF STEP]
using bij_betw_imp_inj_on
[PROOF STATE]
proof (prove)
using this:
inj complex_of \<Longrightarrow> simple_path (complex_of \<circ> ?g) = simple_path ?g
simple_path c
bij complex_of
bij_betw ?f ?A ?B \<Longrightarrow> inj_on ?f ?A

goal (1 subgoal):
 1. simple_path (complex_of \<circ> c)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
simple_path (complex_of \<circ> c)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have a2:"pathfinish (complex_of \<circ> c) = pathstart (complex_of \<circ> c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pathfinish (complex_of \<circ> c) = pathstart (complex_of \<circ> c)
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
pathfinish c = pathstart c

goal (1 subgoal):
 1. pathfinish (complex_of \<circ> c) = pathstart (complex_of \<circ> c)
[PROOF STEP]
by (simp add:pathstart_compose pathfinish_compose)
[PROOF STATE]
proof (state)
this:
pathfinish (complex_of \<circ> c) = pathstart (complex_of \<circ> c)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from Jordan_curve[OF a1 a2]
[PROOF STATE]
proof (chain)
picking this:
(\<And>inner outer. \<lbrakk>inner \<noteq> {}; open inner; connected inner; outer \<noteq> {}; open outer; connected outer; bounded inner; \<not> bounded outer; inner \<inter> outer = {}; inner \<union> outer = - path_image (complex_of \<circ> c); frontier inner = path_image (complex_of \<circ> c); frontier outer = path_image (complex_of \<circ> c)\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
[PROOF STEP]
obtain inside outside where io:
    "inside \<noteq> {}" "open inside" "connected inside"
    "outside \<noteq> {}" "open outside" "connected outside"
    "bounded inside" "\<not> bounded outside" "inside \<inter> outside = {}"
    "inside \<union> outside = - path_image (complex_of \<circ> c)"
    "frontier inside = path_image (complex_of \<circ> c)"
    "frontier outside = path_image (complex_of \<circ> c)"
[PROOF STATE]
proof (prove)
using this:
(\<And>inner outer. \<lbrakk>inner \<noteq> {}; open inner; connected inner; outer \<noteq> {}; open outer; connected outer; bounded inner; \<not> bounded outer; inner \<inter> outer = {}; inner \<union> outer = - path_image (complex_of \<circ> c); frontier inner = path_image (complex_of \<circ> c); frontier outer = path_image (complex_of \<circ> c)\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image (complex_of \<circ> c); frontier inside = path_image (complex_of \<circ> c); frontier outside = path_image (complex_of \<circ> c)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
inside \<noteq> {}
open inside
connected inside
outside \<noteq> {}
open outside
connected outside
bounded inside
\<not> bounded outside
inside \<inter> outside = {}
inside \<union> outside = - path_image (complex_of \<circ> c)
frontier inside = path_image (complex_of \<circ> c)
frontier outside = path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
let ?rin = "real_of ` inside"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
let ?rout = "real_of ` outside"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have i: "inside = complex_of ` ?rin"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inside = complex_of ` real_of ` inside
[PROOF STEP]
using complex_of_real_of
[PROOF STATE]
proof (prove)
using this:
complex_of \<circ> real_of = id

goal (1 subgoal):
 1. inside = complex_of ` real_of ` inside
[PROOF STEP]
unfolding image_comp
[PROOF STATE]
proof (prove)
using this:
complex_of \<circ> real_of = id

goal (1 subgoal):
 1. inside = (complex_of \<circ> real_of) ` inside
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inside = complex_of ` real_of ` inside

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have o: "outside = complex_of ` ?rout"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outside = complex_of ` real_of ` outside
[PROOF STEP]
using complex_of_real_of
[PROOF STATE]
proof (prove)
using this:
complex_of \<circ> real_of = id

goal (1 subgoal):
 1. outside = complex_of ` real_of ` outside
[PROOF STEP]
unfolding image_comp
[PROOF STATE]
proof (prove)
using this:
complex_of \<circ> real_of = id

goal (1 subgoal):
 1. outside = (complex_of \<circ> real_of) ` outside
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
outside = complex_of ` real_of ` outside

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have c: "path_image(complex_of \<circ> c) = complex_of ` (path_image c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_image (complex_of \<circ> c) = complex_of ` path_image c
[PROOF STEP]
by (simp add: path_image_compose)
[PROOF STATE]
proof (state)
this:
path_image (complex_of \<circ> c) = complex_of ` path_image c

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "?rin \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of ` inside \<noteq> {}
[PROOF STEP]
using io
[PROOF STATE]
proof (prove)
using this:
inside \<noteq> {}
open inside
connected inside
outside \<noteq> {}
open outside
connected outside
bounded inside
\<not> bounded outside
inside \<inter> outside = {}
inside \<union> outside = - path_image (complex_of \<circ> c)
frontier inside = path_image (complex_of \<circ> c)
frontier outside = path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. real_of ` inside \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of ` inside \<noteq> {}

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
real_of ` inside \<noteq> {}

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from open_bijective_linear_image_eq[OF real_of_linear real_of_bij]
[PROOF STATE]
proof (chain)
picking this:
open (real_of ` ?A) = open ?A
[PROOF STEP]
have "open ?rin"
[PROOF STATE]
proof (prove)
using this:
open (real_of ` ?A) = open ?A

goal (1 subgoal):
 1. open (real_of ` inside)
[PROOF STEP]
using io
[PROOF STATE]
proof (prove)
using this:
open (real_of ` ?A) = open ?A
inside \<noteq> {}
open inside
connected inside
outside \<noteq> {}
open outside
connected outside
bounded inside
\<not> bounded outside
inside \<inter> outside = {}
inside \<union> outside = - path_image (complex_of \<circ> c)
frontier inside = path_image (complex_of \<circ> c)
frontier outside = path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. open (real_of ` inside)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
open (real_of ` inside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
open (real_of ` inside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from connected_linear_image[OF real_of_linear]
[PROOF STATE]
proof (chain)
picking this:
connected ?s \<Longrightarrow> connected (real_of ` ?s)
[PROOF STEP]
have "connected ?rin"
[PROOF STATE]
proof (prove)
using this:
connected ?s \<Longrightarrow> connected (real_of ` ?s)

goal (1 subgoal):
 1. connected (real_of ` inside)
[PROOF STEP]
using io
[PROOF STATE]
proof (prove)
using this:
connected ?s \<Longrightarrow> connected (real_of ` ?s)
inside \<noteq> {}
open inside
connected inside
outside \<noteq> {}
open outside
connected outside
bounded inside
\<not> bounded outside
inside \<inter> outside = {}
inside \<union> outside = - path_image (complex_of \<circ> c)
frontier inside = path_image (complex_of \<circ> c)
frontier outside = path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. connected (real_of ` inside)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
connected (real_of ` inside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
connected (real_of ` inside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "?rout \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of ` outside \<noteq> {}
[PROOF STEP]
using io
[PROOF STATE]
proof (prove)
using this:
inside \<noteq> {}
open inside
connected inside
outside \<noteq> {}
open outside
connected outside
bounded inside
\<not> bounded outside
inside \<inter> outside = {}
inside \<union> outside = - path_image (complex_of \<circ> c)
frontier inside = path_image (complex_of \<circ> c)
frontier outside = path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. real_of ` outside \<noteq> {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of ` outside \<noteq> {}

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
real_of ` outside \<noteq> {}

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from open_bijective_linear_image_eq[OF real_of_linear real_of_bij]
[PROOF STATE]
proof (chain)
picking this:
open (real_of ` ?A) = open ?A
[PROOF STEP]
have "open ?rout"
[PROOF STATE]
proof (prove)
using this:
open (real_of ` ?A) = open ?A

goal (1 subgoal):
 1. open (real_of ` outside)
[PROOF STEP]
using io
[PROOF STATE]
proof (prove)
using this:
open (real_of ` ?A) = open ?A
inside \<noteq> {}
open inside
connected inside
outside \<noteq> {}
open outside
connected outside
bounded inside
\<not> bounded outside
inside \<inter> outside = {}
inside \<union> outside = - path_image (complex_of \<circ> c)
frontier inside = path_image (complex_of \<circ> c)
frontier outside = path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. open (real_of ` outside)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
open (real_of ` outside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
open (real_of ` outside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from connected_linear_image[OF real_of_linear]
[PROOF STATE]
proof (chain)
picking this:
connected ?s \<Longrightarrow> connected (real_of ` ?s)
[PROOF STEP]
have "connected ?rout"
[PROOF STATE]
proof (prove)
using this:
connected ?s \<Longrightarrow> connected (real_of ` ?s)

goal (1 subgoal):
 1. connected (real_of ` outside)
[PROOF STEP]
using io
[PROOF STATE]
proof (prove)
using this:
connected ?s \<Longrightarrow> connected (real_of ` ?s)
inside \<noteq> {}
open inside
connected inside
outside \<noteq> {}
open outside
connected outside
bounded inside
\<not> bounded outside
inside \<inter> outside = {}
inside \<union> outside = - path_image (complex_of \<circ> c)
frontier inside = path_image (complex_of \<circ> c)
frontier outside = path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. connected (real_of ` outside)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
connected (real_of ` outside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
connected (real_of ` outside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from bounded_linear_image[OF io(7) real_of_bounded_linear]
[PROOF STATE]
proof (chain)
picking this:
bounded (real_of ` inside)
[PROOF STEP]
have "bounded ?rin"
[PROOF STATE]
proof (prove)
using this:
bounded (real_of ` inside)

goal (1 subgoal):
 1. bounded (real_of ` inside)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
bounded (real_of ` inside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
bounded (real_of ` inside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from bounded_linear_image[OF _ complex_of_bounded_linear]
[PROOF STATE]
proof (chain)
picking this:
bounded ?S \<Longrightarrow> bounded (complex_of ` ?S)
[PROOF STEP]
have "\<not> bounded ?rout"
[PROOF STATE]
proof (prove)
using this:
bounded ?S \<Longrightarrow> bounded (complex_of ` ?S)

goal (1 subgoal):
 1. \<not> bounded (real_of ` outside)
[PROOF STEP]
using io(8) o
[PROOF STATE]
proof (prove)
using this:
bounded ?S \<Longrightarrow> bounded (complex_of ` ?S)
\<not> bounded outside
outside = complex_of ` real_of ` outside

goal (1 subgoal):
 1. \<not> bounded (real_of ` outside)
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<not> bounded (real_of ` outside)

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from image_Int[OF real_of_inj]
[PROOF STATE]
proof (chain)
picking this:
real_of ` (?A \<inter> ?B) = real_of ` ?A \<inter> real_of ` ?B
[PROOF STEP]
have "?rin \<inter> ?rout = {}"
[PROOF STATE]
proof (prove)
using this:
real_of ` (?A \<inter> ?B) = real_of ` ?A \<inter> real_of ` ?B

goal (1 subgoal):
 1. real_of ` inside \<inter> real_of ` outside = {}
[PROOF STEP]
using io(9)
[PROOF STATE]
proof (prove)
using this:
real_of ` (?A \<inter> ?B) = real_of ` ?A \<inter> real_of ` ?B
inside \<inter> outside = {}

goal (1 subgoal):
 1. real_of ` inside \<inter> real_of ` outside = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real_of ` inside \<inter> real_of ` outside = {}

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
real_of ` inside \<inter> real_of ` outside = {}

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from bij_image_Compl_eq[OF complex_of_bij]
[PROOF STATE]
proof (chain)
picking this:
complex_of ` (- ?A) = - complex_of ` ?A
[PROOF STEP]
have "?rin \<union> ?rout = - path_image c"
[PROOF STATE]
proof (prove)
using this:
complex_of ` (- ?A) = - complex_of ` ?A

goal (1 subgoal):
 1. real_of ` inside \<union> real_of ` outside = - path_image c
[PROOF STEP]
using io(10)
[PROOF STATE]
proof (prove)
using this:
complex_of ` (- ?A) = - complex_of ` ?A
inside \<union> outside = - path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. real_of ` inside \<union> real_of ` outside = - path_image c
[PROOF STEP]
unfolding c
[PROOF STATE]
proof (prove)
using this:
complex_of ` (- ?A) = - complex_of ` ?A
inside \<union> outside = - complex_of ` path_image c

goal (1 subgoal):
 1. real_of ` inside \<union> real_of ` outside = - path_image c
[PROOF STEP]
by (metis id_apply image_Un image_comp image_cong image_ident real_of_complex_of)
[PROOF STATE]
proof (state)
this:
real_of ` inside \<union> real_of ` outside = - path_image c

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
real_of ` inside \<union> real_of ` outside = - path_image c

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from closure_injective_linear_image[OF real_of_linear real_of_inj]
[PROOF STATE]
proof (chain)
picking this:
real_of ` closure ?S = closure (real_of ` ?S)
[PROOF STEP]
have "frontier ?rin = path_image c"
[PROOF STATE]
proof (prove)
using this:
real_of ` closure ?S = closure (real_of ` ?S)

goal (1 subgoal):
 1. frontier (real_of ` inside) = path_image c
[PROOF STEP]
using io(11)
[PROOF STATE]
proof (prove)
using this:
real_of ` closure ?S = closure (real_of ` ?S)
frontier inside = path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. frontier (real_of ` inside) = path_image c
[PROOF STEP]
unfolding frontier_closures c
[PROOF STATE]
proof (prove)
using this:
real_of ` closure ?S = closure (real_of ` ?S)
closure inside \<inter> closure (- inside) = complex_of ` path_image c

goal (1 subgoal):
 1. closure (real_of ` inside) \<inter> closure (- real_of ` inside) = path_image c
[PROOF STEP]
by (metis \<open>\<And>B A. real_of ` (A \<inter> B) = real_of ` A \<inter> real_of ` B\<close> bij_image_Compl_eq c calculation(9) compl_sup double_compl io(10) real_of_bij)
[PROOF STATE]
proof (state)
this:
frontier (real_of ` inside) = path_image c

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
frontier (real_of ` inside) = path_image c

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from closure_injective_linear_image[OF real_of_linear real_of_inj]
[PROOF STATE]
proof (chain)
picking this:
real_of ` closure ?S = closure (real_of ` ?S)
[PROOF STEP]
have "frontier ?rout = path_image c"
[PROOF STATE]
proof (prove)
using this:
real_of ` closure ?S = closure (real_of ` ?S)

goal (1 subgoal):
 1. frontier (real_of ` outside) = path_image c
[PROOF STEP]
using io(12)
[PROOF STATE]
proof (prove)
using this:
real_of ` closure ?S = closure (real_of ` ?S)
frontier outside = path_image (complex_of \<circ> c)

goal (1 subgoal):
 1. frontier (real_of ` outside) = path_image c
[PROOF STEP]
unfolding frontier_closures c
[PROOF STATE]
proof (prove)
using this:
real_of ` closure ?S = closure (real_of ` ?S)
closure outside \<inter> closure (- outside) = complex_of ` path_image c

goal (1 subgoal):
 1. closure (real_of ` outside) \<inter> closure (- real_of ` outside) = path_image c
[PROOF STEP]
by (metis \<open>\<And>B A. real_of ` (A \<inter> B) = real_of ` A \<inter> real_of ` B\<close> bij_image_Compl_eq c calculation(10) frontier_closures io(11) real_of_bij)
[PROOF STATE]
proof (state)
this:
frontier (real_of ` outside) = path_image c

goal (1 subgoal):
 1. (\<And>inside outside. \<lbrakk>inside \<noteq> {}; open inside; connected inside; outside \<noteq> {}; open outside; connected outside; bounded inside; \<not> bounded outside; inside \<inter> outside = {}; inside \<union> outside = - path_image c; frontier inside = path_image c; frontier outside = path_image c\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
real_of ` inside \<noteq> {}
open (real_of ` inside)
connected (real_of ` inside)
real_of ` outside \<noteq> {}
open (real_of ` outside)
connected (real_of ` outside)
bounded (real_of ` inside)
real_of ` inside \<inter> real_of ` outside = {}
real_of ` inside \<union> real_of ` outside = - path_image c
frontier (real_of ` inside) = path_image c
frontier (real_of ` outside) = path_image c
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real_of ` inside \<noteq> {}
open (real_of ` inside)
connected (real_of ` inside)
real_of ` outside \<noteq> {}
open (real_of ` outside)
connected (real_of ` outside)
bounded (real_of ` inside)
real_of ` inside \<inter> real_of ` outside = {}
real_of ` inside \<union> real_of ` outside = - path_image c
frontier (real_of ` inside) = path_image c
frontier (real_of ` outside) = path_image c

goal (1 subgoal):
 1. thesis
[PROOF STEP]
by (meson \<open>\<not> bounded (real_of ` outside)\<close> that)
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem dfs_code3_correct:
  fixes succi and succ :: "'a::linorder \<Rightarrow> 'a set"
    and Rv :: "('ai\<times>'a) set"
  assumes V0: "(v0i,src)\<in>Rv"
  assumes VD: "(vdi,tgt)\<in>Rv"
  assumes SUCCI: "(succi,E)\<in>\<langle>Rv\<rangle>succg_rel"
  assumes CMP: "(cmpk, dflt_cmp (\<le>) (<))\<in>(Rv\<rightarrow>Rv\<rightarrow>Id)"
  assumes FIN: "finite (E\<^sup>*``{src})"
  shows "dfs_impl3 cmpk succi v0i vdi \<longleftrightarrow> (src,tgt)\<in>E\<^sup>*"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dfs_impl3 cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dfs_impl3 cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
note dfs_impl3.refine[OF CMP SUCCI VD V0, THEN nres_relD]
[PROOF STATE]
proof (state)
this:
RETURN (dfs_impl3 cmpk succi v0i vdi) \<le> \<Down> bool_rel (dfs E src tgt)

goal (1 subgoal):
 1. dfs_impl3 cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
RETURN (dfs_impl3 cmpk succi v0i vdi) \<le> \<Down> bool_rel (dfs E src tgt)

goal (1 subgoal):
 1. dfs_impl3 cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
note dfs_correct[OF FIN]
[PROOF STATE]
proof (state)
this:
dfs E src ?tgt \<le> SPEC (\<lambda>r. r = ((src, ?tgt) \<in> E\<^sup>*))

goal (1 subgoal):
 1. dfs_impl3 cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
RETURN (dfs_impl3 cmpk succi v0i vdi) \<le> SPEC (\<lambda>r. r = ((src, tgt) \<in> E\<^sup>*))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
RETURN (dfs_impl3 cmpk succi v0i vdi) \<le> SPEC (\<lambda>r. r = ((src, tgt) \<in> E\<^sup>*))

goal (1 subgoal):
 1. dfs_impl3 cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)
[PROOF STEP]
by (auto simp: split: dres.split)
[PROOF STATE]
proof (state)
this:
dfs_impl3 cmpk succi v0i vdi = ((src, tgt) \<in> E\<^sup>*)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem assign_valid: "valid assign_axiom"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid assign_axiom
[PROOF STEP]
unfolding  valid_def assign_axiom_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>I \<nu>. is_interp I \<longrightarrow> \<nu> \<in> fml_sem I ([[vid1 := $f fid1 local.empty]]$\<phi> vid1 (singleton (Var vid1)) \<leftrightarrow> $\<phi> vid1 (singleton ($f fid1 local.empty)))
[PROOF STEP]
by (simp add: assign_lem1)


[STATEMENT]
lemma star_subdist_var_3: "x\<^sup>\<star> \<cdot> y\<^sup>\<star> \<le> (x + y)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<star> \<cdot> y\<^sup>\<star> \<le> (x + y)\<^sup>\<star>
[PROOF STEP]
by (simp add: prod_star_closure star_iso)


[STATEMENT]
lemma aezfun_setspan_proj_sum_list_prod :
  "aezfun_setspan_proj A (\<Sum>(x,y)\<leftarrow>xys. f x y)
        = (\<Sum>(x,y)\<leftarrow>xys. aezfun_setspan_proj A (f x y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aezfun_setspan_proj A (\<Sum>(x, y)\<leftarrow>xys. f x y) = (\<Sum>(x, y)\<leftarrow>xys. aezfun_setspan_proj A (f x y))
[PROOF STEP]
using aezfun_setspan_proj_sum_list[of A "\<lambda>xy. case_prod f xy"]
        prod.case_distrib[of "aezfun_setspan_proj A" f]
[PROOF STATE]
proof (prove)
using this:
aezfun_setspan_proj A (\<Sum>x\<leftarrow>?xs. case x of (x, xa) \<Rightarrow> f x xa) = (\<Sum>x\<leftarrow>?xs. aezfun_setspan_proj A (case x of (x, xa) \<Rightarrow> f x xa))
aezfun_setspan_proj A (case ?prod of (x, xa) \<Rightarrow> f x xa) = (case ?prod of (x1, x2) \<Rightarrow> aezfun_setspan_proj A (f x1 x2))

goal (1 subgoal):
 1. aezfun_setspan_proj A (\<Sum>(x, y)\<leftarrow>xys. f x y) = (\<Sum>(x, y)\<leftarrow>xys. aezfun_setspan_proj A (f x y))
[PROOF STEP]
by    simp