[STATEMENT]
lemma tendsto_blinfun_of_matrix:
  assumes "\<And>i j. i \<in> Basis \<Longrightarrow> j \<in> Basis \<Longrightarrow> ((\<lambda>n. b n i j) \<longlongrightarrow> a i j) F"
  shows "((\<lambda>n. blinfun_of_matrix (b n)) \<longlongrightarrow> blinfun_of_matrix a) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>n. blinfun_of_matrix (b n)) \<longlongrightarrow> blinfun_of_matrix a) F
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>n. blinfun_of_matrix (b n)) \<longlongrightarrow> blinfun_of_matrix a) F
[PROOF STEP]
have "\<And>i j. i \<in> Basis \<Longrightarrow> j \<in> Basis \<Longrightarrow> Zfun (\<lambda>x. norm (b x i j - a i j)) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i \<in> Basis; j \<in> Basis\<rbrakk> \<Longrightarrow> Zfun (\<lambda>x. norm (b x i j - a i j)) F
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i \<in> Basis; ?j \<in> Basis\<rbrakk> \<Longrightarrow> ((\<lambda>n. b n ?i ?j) \<longlongrightarrow> a ?i ?j) F

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i \<in> Basis; j \<in> Basis\<rbrakk> \<Longrightarrow> Zfun (\<lambda>x. norm (b x i j - a i j)) F
[PROOF STEP]
unfolding tendsto_Zfun_iff Zfun_norm_iff
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i \<in> Basis; ?j \<in> Basis\<rbrakk> \<Longrightarrow> Zfun (\<lambda>x. b x ?i ?j - a ?i ?j) F

goal (1 subgoal):
 1. \<And>i j. \<lbrakk>i \<in> Basis; j \<in> Basis\<rbrakk> \<Longrightarrow> Zfun (\<lambda>x. b x i j - a i j) F
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<lbrakk>?i \<in> Basis; ?j \<in> Basis\<rbrakk> \<Longrightarrow> Zfun (\<lambda>x. norm (b x ?i ?j - a ?i ?j)) F

goal (1 subgoal):
 1. ((\<lambda>n. blinfun_of_matrix (b n)) \<longlongrightarrow> blinfun_of_matrix a) F
[PROOF STEP]
hence "Zfun (\<lambda>x. (\<Sum>i\<in>Basis. \<Sum>j\<in>Basis. \<bar>b x i j - a i j\<bar>)) F"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?i \<in> Basis; ?j \<in> Basis\<rbrakk> \<Longrightarrow> Zfun (\<lambda>x. norm (b x ?i ?j - a ?i ?j)) F

goal (1 subgoal):
 1. Zfun (\<lambda>x. \<Sum>i\<in>Basis. \<Sum>j\<in>Basis. \<bar>b x i j - a i j\<bar>) F
[PROOF STEP]
by (auto intro!: Zfun_sum)
[PROOF STATE]
proof (state)
this:
Zfun (\<lambda>x. \<Sum>i\<in>Basis. \<Sum>j\<in>Basis. \<bar>b x i j - a i j\<bar>) F

goal (1 subgoal):
 1. ((\<lambda>n. blinfun_of_matrix (b n)) \<longlongrightarrow> blinfun_of_matrix a) F
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
Zfun (\<lambda>x. \<Sum>i\<in>Basis. \<Sum>j\<in>Basis. \<bar>b x i j - a i j\<bar>) F

goal (1 subgoal):
 1. ((\<lambda>n. blinfun_of_matrix (b n)) \<longlongrightarrow> blinfun_of_matrix a) F
[PROOF STEP]
unfolding tendsto_Zfun_iff blinfun_of_matrix_minus
[PROOF STATE]
proof (prove)
using this:
Zfun (\<lambda>x. \<Sum>i\<in>Basis. \<Sum>j\<in>Basis. \<bar>b x i j - a i j\<bar>) F

goal (1 subgoal):
 1. Zfun (\<lambda>x. blinfun_of_matrix (b x - a)) F
[PROOF STEP]
by (rule Zfun_le) (auto intro!: order_trans[OF norm_blinfun_of_matrix])
[PROOF STATE]
proof (state)
this:
((\<lambda>n. blinfun_of_matrix (b n)) \<longlongrightarrow> blinfun_of_matrix a) F

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nat_cut_ge_infinite_not_empty: "infinite I \<Longrightarrow> I \<down>\<ge> (t::nat) \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite I \<Longrightarrow> I \<down>\<ge> t \<noteq> {}
[PROOF STEP]
by (drule infinite_nat_iff_unbounded_le[THEN iffD1], blast)


[STATEMENT]
lemma (in ring_hom_ring) hom_nat_pow:
  "x \<in> carrier R \<Longrightarrow> h (x [^] (n :: nat)) = (h x) [^]\<^bsub>S\<^esub> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> carrier R \<Longrightarrow> h (x [^] n) = h x [^]\<^bsub>S\<^esub> n
[PROOF STEP]
by (induct n) (auto)


[STATEMENT]
lemma path_minus: "path g \<Longrightarrow> path (\<lambda>t. - g t)" for g::"real\<Rightarrow>'a::real_normed_vector"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path g \<Longrightarrow> path (\<lambda>t. - g t)
[PROOF STEP]
unfolding path_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {0..1} g \<Longrightarrow> continuous_on {0..1} (\<lambda>t. - g t)
[PROOF STEP]
by (intro continuous_intros)


[STATEMENT]
lemma is_walk_rev: "is_walk xs \<longleftrightarrow> is_walk (rev xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_walk xs = is_walk (rev xs)
[PROOF STEP]
unfolding is_walk_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (set xs \<subseteq> V \<and> set (walk_edges xs) \<subseteq> E \<and> xs \<noteq> []) = (set (rev xs) \<subseteq> V \<and> set (walk_edges (rev xs)) \<subseteq> E \<and> rev xs \<noteq> [])
[PROOF STEP]
using walk_edges_rev
[PROOF STATE]
proof (prove)
using this:
rev (walk_edges ?xs) = walk_edges (rev ?xs)

goal (1 subgoal):
 1. (set xs \<subseteq> V \<and> set (walk_edges xs) \<subseteq> E \<and> xs \<noteq> []) = (set (rev xs) \<subseteq> V \<and> set (walk_edges (rev xs)) \<subseteq> E \<and> rev xs \<noteq> [])
[PROOF STEP]
by (metis rev_is_Nil_conv set_rev)


[STATEMENT]
lemma vector_smult_rneg: "(c::'a::ring) *s -x = -(c *s x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c *s - x = - (c *s x)
[PROOF STEP]
by vector


[STATEMENT]
lemma CCCD: assumes "NatTrans f" shows "CatCod (NTCod f) = CatCod (NTDom f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. CatCod (NTCod f) = CatCod (NTDom f)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. CatCod (NTCod f) = CatCod (NTDom f)
[PROOF STEP]
have "CatCod (NTCod f) = NTCatCod f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. CatCod (NTCod f) = NTCatCod f
[PROOF STEP]
by (simp add: NTCatCod_def)
[PROOF STATE]
proof (state)
this:
CatCod (NTCod f) = NTCatCod f

goal (1 subgoal):
 1. CatCod (NTCod f) = CatCod (NTDom f)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
CatCod (NTCod f) = NTCatCod f

goal (1 subgoal):
 1. CatCod (NTCod f) = CatCod (NTDom f)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
CatCod (NTCod f) = NTCatCod f
NatTrans f

goal (1 subgoal):
 1. CatCod (NTCod f) = CatCod (NTDom f)
[PROOF STEP]
by (simp add: NatTransP.NatTransFtorCod)
[PROOF STATE]
proof (state)
this:
CatCod (NTCod f) = CatCod (NTDom f)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma uminus_id_iff:
  shows "~\<^sub>h z = z \<longleftrightarrow> z = 0\<^sub>h \<or> z = \<infinity>\<^sub>h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (~\<^sub>h z = z) = (z = 0\<^sub>h \<or> z = \<infinity>\<^sub>h)
[PROOF STEP]
apply (transfer, transfer)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>z. z \<noteq> vec_zero \<Longrightarrow> (~\<^sub>v z \<approx>\<^sub>v z) = (z \<approx>\<^sub>v 0\<^sub>v \<or> z \<approx>\<^sub>v \<infinity>\<^sub>v)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a k. \<lbrakk>a \<noteq> 0; k \<noteq> 0; \<forall>k. k * a = 1 \<longrightarrow> k = 0; a = - (k * a)\<rbrakk> \<Longrightarrow> False
 2. \<And>a k. \<lbrakk>a \<noteq> 0; k \<noteq> 0; k * a = 1\<rbrakk> \<Longrightarrow> \<exists>k. k \<noteq> 0 \<and> a = - (k * a)
[PROOF STEP]
apply (erule_tac x="1/a" in allE, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a k. \<lbrakk>a \<noteq> 0; k \<noteq> 0; k * a = 1\<rbrakk> \<Longrightarrow> \<exists>k. k \<noteq> 0 \<and> a = - (k * a)
[PROOF STEP]
apply (rule_tac x="-1" in exI, simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma sum_language[simp]:
      assumes "alphabet\<^sub>1 A = alphabet\<^sub>2 B"
      shows "c.language (sum A B) = a.language A \<union> b.language B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. c.language (local.sum A B) = a.language A \<union> b.language B
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
alphabet\<^sub>1 A = alphabet\<^sub>2 B

goal (1 subgoal):
 1. c.language (local.sum A B) = a.language A \<union> b.language B
[PROOF STEP]
unfolding a.language_def b.language_def c.language_def
[PROOF STATE]
proof (prove)
using this:
alphabet\<^sub>1 A = alphabet\<^sub>2 B

goal (1 subgoal):
 1. {uu_. \<exists>w r p. uu_ = w \<and> length r = length w \<and> p \<in> initial\<^sub>3 (local.sum A B) \<and> c.path' (local.sum A B) (w || r) p \<and> test\<^sub>3 (condition\<^sub>3 (local.sum A B)) w r p} = {uu_. \<exists>w r p. uu_ = w \<and> length r = length w \<and> p \<in> initial\<^sub>1 A \<and> a.path' A (w || r) p \<and> test\<^sub>1 (condition\<^sub>1 A) w r p} \<union> {uu_. \<exists>w r p. uu_ = w \<and> length r = length w \<and> p \<in> initial\<^sub>2 B \<and> b.path' B (w || r) p \<and> test\<^sub>2 (condition\<^sub>2 B) w r p}
[PROOF STEP]
by (force intro: path_sum_a path_sum_b elim!: sum_path)


[STATEMENT]
lemma star_square:
  "x\<^sup>\<star> = (1 \<squnion> x) * (x * x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<star> = ((1::'a) \<squnion> x) * (x * x)\<^sup>\<star>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x\<^sup>\<star> = ((1::'a) \<squnion> x) * (x * x)\<^sup>\<star>
[PROOF STEP]
let ?f = "\<lambda>y . y * x \<squnion> 1"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x\<^sup>\<star> = ((1::'a) \<squnion> x) * (x * x)\<^sup>\<star>
[PROOF STEP]
have 1: "isotone ?f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isotone (\<lambda>y. y * x \<squnion> (1::'a))
[PROOF STEP]
by (metis sup_left_isotone isotone_def mult_left_isotone)
[PROOF STATE]
proof (state)
this:
isotone (\<lambda>y. y * x \<squnion> (1::'a))

goal (1 subgoal):
 1. x\<^sup>\<star> = ((1::'a) \<squnion> x) * (x * x)\<^sup>\<star>
[PROOF STEP]
have "?f \<circ> ?f = (\<lambda>y . y * (x * x) \<squnion> (1 \<squnion> x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>y. y * x \<squnion> (1::'a)) \<circ> (\<lambda>y. y * x \<squnion> (1::'a)) = (\<lambda>y. y * (x * x) \<squnion> ((1::'a) \<squnion> x))
[PROOF STEP]
by (simp add: sup_assoc sup_commute mult_assoc mult_right_dist_sup o_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>y. y * x \<squnion> (1::'a)) \<circ> (\<lambda>y. y * x \<squnion> (1::'a)) = (\<lambda>y. y * (x * x) \<squnion> ((1::'a) \<squnion> x))

goal (1 subgoal):
 1. x\<^sup>\<star> = ((1::'a) \<squnion> x) * (x * x)\<^sup>\<star>
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>y. y * x \<squnion> (1::'a)) \<circ> (\<lambda>y. y * x \<squnion> (1::'a)) = (\<lambda>y. y * (x * x) \<squnion> ((1::'a) \<squnion> x))

goal (1 subgoal):
 1. x\<^sup>\<star> = ((1::'a) \<squnion> x) * (x * x)\<^sup>\<star>
[PROOF STEP]
using 1
[PROOF STATE]
proof (prove)
using this:
(\<lambda>y. y * x \<squnion> (1::'a)) \<circ> (\<lambda>y. y * x \<squnion> (1::'a)) = (\<lambda>y. y * (x * x) \<squnion> ((1::'a) \<squnion> x))
isotone (\<lambda>y. y * x \<squnion> (1::'a))

goal (1 subgoal):
 1. x\<^sup>\<star> = ((1::'a) \<squnion> x) * (x * x)\<^sup>\<star>
[PROOF STEP]
by (metis mu_square mult_left_one star_back_loop_mu has_least_fixpoint_def star_back_loop_is_least_fixpoint)
[PROOF STATE]
proof (state)
this:
x\<^sup>\<star> = ((1::'a) \<squnion> x) * (x * x)\<^sup>\<star>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma is_trail_rev: "is_trail xs \<longleftrightarrow> is_trail (rev xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_trail xs = is_trail (rev xs)
[PROOF STEP]
unfolding is_trail_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (is_walk xs \<and> distinct (walk_edges xs)) = (is_walk (rev xs) \<and> distinct (walk_edges (rev xs)))
[PROOF STEP]
using is_walk_rev
[PROOF STATE]
proof (prove)
using this:
is_walk ?xs = is_walk (rev ?xs)

goal (1 subgoal):
 1. (is_walk xs \<and> distinct (walk_edges xs)) = (is_walk (rev xs) \<and> distinct (walk_edges (rev xs)))
[PROOF STEP]
by (metis distinct_rev walk_edges_rev)


[STATEMENT]
lemma C_slide: "(x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> (y \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> (y \<cdot> x)\<^sup>\<star>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> (y \<cdot> x)\<^sup>\<star>
[PROOF STEP]
have "(x \<cdot> y)\<^sup>\<star> \<cdot> x = x + x \<cdot> (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<cdot> y)\<^sup>\<star> \<cdot> x = x + x \<cdot> (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x
[PROOF STEP]
by (metis C12 mult_onel distrib_right')
[PROOF STATE]
proof (state)
this:
(x \<cdot> y)\<^sup>\<star> \<cdot> x = x + x \<cdot> (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x

goal (1 subgoal):
 1. (x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> (y \<cdot> x)\<^sup>\<star>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x \<cdot> y)\<^sup>\<star> \<cdot> x = x + x \<cdot> (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x

goal (1 subgoal):
 1. (x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> (y \<cdot> x)\<^sup>\<star>
[PROOF STEP]
have "... = x \<cdot> (1 + (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x + x \<cdot> (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x = x \<cdot> ((1::'a) + (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x)
[PROOF STEP]
by (metis distrib_left mult.assoc mult_oner)
[PROOF STATE]
proof (state)
this:
x + x \<cdot> (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x = x \<cdot> ((1::'a) + (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x)

goal (1 subgoal):
 1. (x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> (y \<cdot> x)\<^sup>\<star>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> ((1::'a) + (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> ((1::'a) + (y \<cdot> x)\<^sup>\<star> \<cdot> y \<cdot> x)

goal (1 subgoal):
 1. (x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> (y \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis C12 mult.assoc mult_onel mult_oner)
[PROOF STATE]
proof (state)
this:
(x \<cdot> y)\<^sup>\<star> \<cdot> x = x \<cdot> (y \<cdot> x)\<^sup>\<star>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma signed_take_bit_word_numeral [simp]:
  \<open>signed_take_bit (numeral n) (numeral k) =
    (word_of_int (signed_take_bit (numeral n) (take_bit LENGTH('a) (numeral k))) :: 'a::len word)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. signed_take_bit (numeral n) (numeral k) = word_of_int (signed_take_bit (numeral n) (take_bit LENGTH('a) (numeral k)))
[PROOF STEP]
by transfer rule


[STATEMENT]
lemma measurable_ident_sets:
  assumes eq: "sets M = sets M'" shows "(\<lambda>x. x) \<in> measurable M M'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. x) \<in> M \<rightarrow>\<^sub>M M'
[PROOF STEP]
using measurable_ident[of M]
[PROOF STATE]
proof (prove)
using this:
id \<in> M \<rightarrow>\<^sub>M M

goal (1 subgoal):
 1. (\<lambda>x. x) \<in> M \<rightarrow>\<^sub>M M'
[PROOF STEP]
unfolding id_def measurable_def eq sets_eq_imp_space_eq[OF eq]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. x) \<in> {f \<in> space M' \<rightarrow> space M'. \<forall>y\<in>sets M'. f -` y \<inter> space M' \<in> sets M'}

goal (1 subgoal):
 1. (\<lambda>x. x) \<in> {f \<in> space M' \<rightarrow> space M'. \<forall>y\<in>sets M'. f -` y \<inter> space M' \<in> sets M'}
[PROOF STEP]
.


[STATEMENT]
lemma midpoint_cong:
  assumes "B Midpoint A C"
  shows "Cong A B B C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Cong A B B C
[PROOF STEP]
using Midpoint_def assms
[PROOF STATE]
proof (prove)
using this:
?M Midpoint ?A ?B \<equiv> Bet ?A ?M ?B \<and> Cong ?A ?M ?M ?B
B Midpoint A C

goal (1 subgoal):
 1. Cong A B B C
[PROOF STEP]
by blast


[STATEMENT]
lemma matrix_to_iarray_QR_decomposition[code_unfold]:
  shows "matrix_to_iarray_pair (QR_decomposition A) =  QR_decomposition_iarrays (matrix_to_iarray A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_to_iarray_pair (QR_decomposition A) = QR_decomposition_iarrays (matrix_to_iarray A)
[PROOF STEP]
unfolding matrix_to_iarray_pair_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (matrix_to_iarray (fst (QR_decomposition A)), matrix_to_iarray (snd (QR_decomposition A))) = QR_decomposition_iarrays (matrix_to_iarray A)
[PROOF STEP]
unfolding matrix_to_iarray_fst_QR_decomposition
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fst (QR_decomposition_iarrays (matrix_to_iarray A)), matrix_to_iarray (snd (QR_decomposition A))) = QR_decomposition_iarrays (matrix_to_iarray A)
[PROOF STEP]
unfolding matrix_to_iarray_snd_QR_decomposition
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fst (QR_decomposition_iarrays (matrix_to_iarray A)), snd (QR_decomposition_iarrays (matrix_to_iarray A))) = QR_decomposition_iarrays (matrix_to_iarray A)
[PROOF STEP]
by simp


[STATEMENT]
lemma rstep_imp_C_s_r:
  assumes "(s, t) \<in> rstep \<R>"
  shows "\<exists>C \<sigma> l r. (l,r) \<in> \<R> \<and> s = C\<langle>l\<cdot>\<sigma>\<rangle> \<and> t = C\<langle>r\<cdot>\<sigma>\<rangle>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>C \<sigma> l r. (l, r) \<in> \<R> \<and> s = C\<langle>l \<cdot> \<sigma>\<rangle> \<and> t = C\<langle>r \<cdot> \<sigma>\<rangle>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(s, t) \<in> rstep \<R>

goal (1 subgoal):
 1. \<exists>C \<sigma> l r. (l, r) \<in> \<R> \<and> s = C\<langle>l \<cdot> \<sigma>\<rangle> \<and> t = C\<langle>r \<cdot> \<sigma>\<rangle>
[PROOF STEP]
by (metis rrstep.cases rstep.simps)


[STATEMENT]
lemma neighbourhood_base_at_mono:
   "\<lbrakk>neighbourhood_base_at x P X; \<And>S. \<lbrakk>P S; x \<in> S\<rbrakk> \<Longrightarrow> Q S\<rbrakk> \<Longrightarrow> neighbourhood_base_at x Q X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>neighbourhood_base_at x P X; \<And>S. \<lbrakk>P S; x \<in> S\<rbrakk> \<Longrightarrow> Q S\<rbrakk> \<Longrightarrow> neighbourhood_base_at x Q X
[PROOF STEP]
unfolding neighbourhood_base_at_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>W. openin X W \<and> x \<in> W \<longrightarrow> (\<exists>U V. openin X U \<and> P V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W); \<And>S. \<lbrakk>P S; x \<in> S\<rbrakk> \<Longrightarrow> Q S\<rbrakk> \<Longrightarrow> \<forall>W. openin X W \<and> x \<in> W \<longrightarrow> (\<exists>U V. openin X U \<and> Q V \<and> x \<in> U \<and> U \<subseteq> V \<and> V \<subseteq> W)
[PROOF STEP]
by (meson subset_eq)


[STATEMENT]
lemma path_Append:"\<lbrakk>n -as\<rightarrow>* n''; n'' -as'\<rightarrow>* n'\<rbrakk>
  \<Longrightarrow> n -as@as'\<rightarrow>* n'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n -as\<rightarrow>* n''; n'' -as'\<rightarrow>* n'\<rbrakk> \<Longrightarrow> n -as @ as'\<rightarrow>* n'
[PROOF STEP]
by(induct rule:path.induct,auto intro:Cons_path)


[STATEMENT]
lemma and_mask_arith:
  "w AND mask n = (w * 2^(size w - n)) div 2^(size w - n)"
  for w :: \<open>'a::len word\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. w AND mask n = w * 2 ^ (size w - n) div 2 ^ (size w - n)
[PROOF STEP]
by (rule bit_word_eqI)
    (auto simp add: bit_simps word_size simp flip: push_bit_eq_mult drop_bit_eq_div)


[STATEMENT]
lemma cbox_Pair_iff [iff]: "(x, y) \<in> cbox (a, c) (b, d) \<longleftrightarrow> x \<in> cbox a b \<and> y \<in> cbox c d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x, y) \<in> cbox (a, c) (b, d)) = (x \<in> cbox a b \<and> y \<in> cbox c d)
[PROOF STEP]
by (force simp: cbox_Pair_eq)


[STATEMENT]
lemma set_restriction_non_empty_imp: "
  \<lbrakk> set_restriction f; f A \<noteq> {} \<rbrakk> \<Longrightarrow> A \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>set_restriction f; f A \<noteq> {}\<rbrakk> \<Longrightarrow> A \<noteq> {}
[PROOF STEP]
unfolding set_restriction_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<exists>P. \<forall>A. f A = {x \<in> A. P x}; f A \<noteq> {}\<rbrakk> \<Longrightarrow> A \<noteq> {}
[PROOF STEP]
by blast


[STATEMENT]
lemma icard_glength: "icard (gset a) \<le> glength a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. icard (gset a) \<le> glength a
[PROOF STEP]
apply (unfold icard_def glength_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (if finite (gset a) then enat (card (gset a)) else \<infinity>) \<le> (case a of FL xs \<Rightarrow> enat (length xs) | IL f \<Rightarrow> \<infinity>)
[PROOF STEP]
apply (case_tac a)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x1. a = FL x1 \<Longrightarrow> (if finite (gset a) then enat (card (gset a)) else \<infinity>) \<le> (case a of FL xs \<Rightarrow> enat (length xs) | IL f \<Rightarrow> \<infinity>)
 2. \<And>x2. a = IL x2 \<Longrightarrow> (if finite (gset a) then enat (card (gset a)) else \<infinity>) \<le> (case a of FL xs \<Rightarrow> enat (length xs) | IL f \<Rightarrow> \<infinity>)
[PROOF STEP]
apply (simp add: card_length)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma contains_distinguishing_trace_code[code] :
  "contains_distinguishing_trace M (MPT t1) q1 q2 =
    (\<exists> (x,y) \<in> Mapping.keys t1.
      case h_obs M q1 x y of
        None \<Rightarrow> h_obs M q2 x y \<noteq> None |
        Some q1' \<Rightarrow> (case h_obs M q2 x y of
          None \<Rightarrow> True |
          Some q2' \<Rightarrow> contains_distinguishing_trace M (the (Mapping.lookup t1 (x,y))) q1' q2'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. contains_distinguishing_trace M (MPT t1) q1 q2 = (\<exists>(x, y)\<in>Mapping.keys t1. case FSM.h_obs M q1 x y of None \<Rightarrow> FSM.h_obs M q2 x y \<noteq> None | Some q1' \<Rightarrow> case FSM.h_obs M q2 x y of None \<Rightarrow> True | Some q2' \<Rightarrow> contains_distinguishing_trace M (the (Mapping.lookup t1 (x, y))) q1' q2')
[PROOF STEP]
unfolding intersection_is_distinguishing.simps MPT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. contains_distinguishing_trace M (PT (Mapping.lookup t1)) q1 q2 = (\<exists>(x, y)\<in>Mapping.keys t1. case FSM.h_obs M q1 x y of None \<Rightarrow> FSM.h_obs M q2 x y \<noteq> None | Some q1' \<Rightarrow> case FSM.h_obs M q2 x y of None \<Rightarrow> True | Some q2' \<Rightarrow> contains_distinguishing_trace M (the (Mapping.lookup t1 (x, y))) q1' q2')
[PROOF STEP]
by (simp add: keys_dom_lookup)


[STATEMENT]
lemma intersect_nodes_card:
    assumes "finite (DBA.nodes A)" "finite (DBA.nodes B)"
    shows "card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
have "card (DBA.nodes (intersect A B)) \<le>
      max 1 (length (dgba.accepting (intersect' A B))) * card (DGBA.nodes (intersect' A B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> max 1 (length (dgba.accepting (intersect' A B))) * card (DGBA.nodes (intersect' A B))
[PROOF STEP]
using degeneralize_nodes_card
[PROOF STATE]
proof (prove)
using this:
card (DBA.nodes (degeneralize ?A)) \<le> max 1 (length (dgba.accepting ?A)) * card (DGBA.nodes ?A)

goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> max 1 (length (dgba.accepting (intersect' A B))) * card (DGBA.nodes (intersect' A B))
[PROOF STEP]
by this
[PROOF STATE]
proof (state)
this:
card (DBA.nodes (intersect A B)) \<le> max 1 (length (dgba.accepting (intersect' A B))) * card (DGBA.nodes (intersect' A B))

goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
card (DBA.nodes (intersect A B)) \<le> max 1 (length (dgba.accepting (intersect' A B))) * card (DGBA.nodes (intersect' A B))

goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
have "length (dgba.accepting (intersect' A B)) = 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (dgba.accepting (intersect' A B)) = 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (dgba.accepting (intersect' A B)) = 2

goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
length (dgba.accepting (intersect' A B)) = 2

goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
have "card (DGBA.nodes (intersect' A B)) \<le> card (DBA.nodes A) * card (DBA.nodes B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (DGBA.nodes (intersect' A B)) \<le> card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
using intersect'_nodes_card assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite (DBA.nodes ?A); finite (DBA.nodes ?B)\<rbrakk> \<Longrightarrow> card (DGBA.nodes (intersect' ?A ?B)) \<le> card (DBA.nodes ?A) * card (DBA.nodes ?B)
finite (DBA.nodes A)
finite (DBA.nodes B)

goal (1 subgoal):
 1. card (DGBA.nodes (intersect' A B)) \<le> card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
by this
[PROOF STATE]
proof (state)
this:
card (DGBA.nodes (intersect' A B)) \<le> card (DBA.nodes A) * card (DBA.nodes B)

goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<And>x y. x \<le> y \<Longrightarrow> max 1 2 * x \<le> max 1 2 * y) \<Longrightarrow> card (DBA.nodes (intersect A B)) \<le> max 1 2 * (card (DBA.nodes A) * card (DBA.nodes B))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<And>x y. x \<le> y \<Longrightarrow> max 1 2 * x \<le> max 1 2 * y) \<Longrightarrow> card (DBA.nodes (intersect A B)) \<le> max 1 2 * (card (DBA.nodes A) * card (DBA.nodes B))

goal (1 subgoal):
 1. card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card (DBA.nodes (intersect A B)) \<le> 2 * card (DBA.nodes A) * card (DBA.nodes B)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hyp2_rep_abs_examples:
  shows "hyp2_rep (hyp2_abs 0) = 0" (is "hyp2_rep ?a = ?ca")
  and "hyp2_rep (hyp2_abs (vector [1/2,0])) = vector [1/2,0]"
  (is "hyp2_rep ?b = ?cb")
  and "hyp2_rep (hyp2_abs (vector [0,1/2])) = vector [0,1/2]"
  (is "hyp2_rep ?c = ?cc")
  and "hyp2_rep (hyp2_abs (vector [1/4,1/4])) = vector [1/4,1/4]"
  (is "hyp2_rep ?d = ?cd")
  and "hyp2_rep (hyp2_abs (vector [1/2,1/2])) = vector [1/2,1/2]"
  (is "hyp2_rep ?t = ?ct")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (hyp2_rep (hyp2_abs 0) = 0 &&& hyp2_rep (hyp2_abs (vector [1 / 2, 0])) = vector [1 / 2, 0]) &&& hyp2_rep (hyp2_abs (vector [0, 1 / 2])) = vector [0, 1 / 2] &&& hyp2_rep (hyp2_abs (vector [1 / 4, 1 / 4])) = vector [1 / 4, 1 / 4] &&& hyp2_rep (hyp2_abs (vector [1 / 2, 1 / 2])) = vector [1 / 2, 1 / 2]
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. hyp2_rep (hyp2_abs 0) = 0
 2. hyp2_rep (hyp2_abs (vector [1 / 2, 0])) = vector [1 / 2, 0]
 3. hyp2_rep (hyp2_abs (vector [0, 1 / 2])) = vector [0, 1 / 2]
 4. hyp2_rep (hyp2_abs (vector [1 / 4, 1 / 4])) = vector [1 / 4, 1 / 4]
 5. hyp2_rep (hyp2_abs (vector [1 / 2, 1 / 2])) = vector [1 / 2, 1 / 2]
[PROOF STEP]
have "norm ?ca < 1" and "norm ?cb < 1" and "norm ?cc < 1" and "norm ?cd < 1"
    and "norm ?ct < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (norm 0 < 1 &&& norm (vector [1 / 2, 0]) < 1) &&& norm (vector [0, 1 / 2]) < 1 &&& norm (vector [1 / 4, 1 / 4]) < 1 &&& norm (vector [1 / 2, 1 / 2]) < 1
[PROOF STEP]
by (unfold norm_vec_def L2_set_def) (simp_all add: sum_2 power2_eq_square)
[PROOF STATE]
proof (state)
this:
norm 0 < 1
norm (vector [1 / 2, 0]) < 1
norm (vector [0, 1 / 2]) < 1
norm (vector [1 / 4, 1 / 4]) < 1
norm (vector [1 / 2, 1 / 2]) < 1

goal (5 subgoals):
 1. hyp2_rep (hyp2_abs 0) = 0
 2. hyp2_rep (hyp2_abs (vector [1 / 2, 0])) = vector [1 / 2, 0]
 3. hyp2_rep (hyp2_abs (vector [0, 1 / 2])) = vector [0, 1 / 2]
 4. hyp2_rep (hyp2_abs (vector [1 / 4, 1 / 4])) = vector [1 / 4, 1 / 4]
 5. hyp2_rep (hyp2_abs (vector [1 / 2, 1 / 2])) = vector [1 / 2, 1 / 2]
[PROOF STEP]
thus "hyp2_rep ?a = ?ca" and "hyp2_rep ?b = ?cb" and "hyp2_rep ?c = ?cc"
    and "hyp2_rep ?d = ?cd" and "hyp2_rep ?t = ?ct"
[PROOF STATE]
proof (prove)
using this:
norm 0 < 1
norm (vector [1 / 2, 0]) < 1
norm (vector [0, 1 / 2]) < 1
norm (vector [1 / 4, 1 / 4]) < 1
norm (vector [1 / 2, 1 / 2]) < 1

goal (1 subgoal):
 1. (hyp2_rep (hyp2_abs 0) = 0 &&& hyp2_rep (hyp2_abs (vector [1 / 2, 0])) = vector [1 / 2, 0]) &&& hyp2_rep (hyp2_abs (vector [0, 1 / 2])) = vector [0, 1 / 2] &&& hyp2_rep (hyp2_abs (vector [1 / 4, 1 / 4])) = vector [1 / 4, 1 / 4] &&& hyp2_rep (hyp2_abs (vector [1 / 2, 1 / 2])) = vector [1 / 2, 1 / 2]
[PROOF STEP]
by (simp_all add: hyp2_rep_abs)
[PROOF STATE]
proof (state)
this:
hyp2_rep (hyp2_abs 0) = 0
hyp2_rep (hyp2_abs (vector [1 / 2, 0])) = vector [1 / 2, 0]
hyp2_rep (hyp2_abs (vector [0, 1 / 2])) = vector [0, 1 / 2]
hyp2_rep (hyp2_abs (vector [1 / 4, 1 / 4])) = vector [1 / 4, 1 / 4]
hyp2_rep (hyp2_abs (vector [1 / 2, 1 / 2])) = vector [1 / 2, 1 / 2]

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma one_le_Fract_iff: "0 < b \<Longrightarrow> 1 \<le> Fract a b \<longleftrightarrow> b \<le> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < b \<Longrightarrow> (1 \<le> Fract a b) = (b \<le> a)
[PROOF STEP]
by (auto simp add: One_fract_def mult_le_cancel_right)


[STATEMENT]
lemma neighborhoods_eq:"neighborhoods x = I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. neighborhoods x = I
[PROOF STEP]
unfolding index neighborhoods_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {U. is_open U \<and> x \<in> U} = {U. is_open U \<and> x \<in> U}
[PROOF STEP]
by simp


[STATEMENT]
lemma commutative_square_comp_arr:
    assumes "commutative_square f g h k" and "seq h l"
    shows "commutative_square f g (h \<cdot> l) (k \<cdot> l)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. commutative_square f g (h \<cdot> l) (k \<cdot> l)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
commutative_square f g h k
seq h l

goal (1 subgoal):
 1. commutative_square f g (h \<cdot> l) (k \<cdot> l)
[PROOF STEP]
apply (elim commutative_squareE, intro commutative_squareI, auto)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>arr f; arr g; arr h; arr k; cod f = cod g; local.dom h = local.dom k; local.dom f = cod h; local.dom g = cod k; f \<cdot> h = g \<cdot> k; seq h l\<rbrakk> \<Longrightarrow> f \<cdot> h \<cdot> l = g \<cdot> k \<cdot> l
[PROOF STEP]
using comp_assoc
[PROOF STATE]
proof (prove)
using this:
(?h \<cdot> ?g) \<cdot> ?f = ?h \<cdot> ?g \<cdot> ?f

goal (1 subgoal):
 1. \<lbrakk>arr f; arr g; arr h; arr k; cod f = cod g; local.dom h = local.dom k; local.dom f = cod h; local.dom g = cod k; f \<cdot> h = g \<cdot> k; seq h l\<rbrakk> \<Longrightarrow> f \<cdot> h \<cdot> l = g \<cdot> k \<cdot> l
[PROOF STEP]
by metis


[STATEMENT]
lemma piecewise_C1_differentiable_on_pair [simp, derivative_intros]:
  fixes f :: "real \<Rightarrow> 'a::euclidean_space" and g :: "real \<Rightarrow> 'b::euclidean_space"
  assumes "f piecewise_C1_differentiable_on S" "g piecewise_C1_differentiable_on S"
  shows "(\<lambda>x. (f x, g x)) piecewise_C1_differentiable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (f x, g x)) piecewise_C1_differentiable_on S
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
f piecewise_C1_differentiable_on S
g piecewise_C1_differentiable_on S

goal (1 subgoal):
 1. (\<lambda>x. (f x, g x)) piecewise_C1_differentiable_on S
[PROOF STEP]
unfolding piecewise_C1_differentiable_on_def
[PROOF STATE]
proof (prove)
using this:
continuous_on S f \<and> (\<exists>Sa. finite Sa \<and> f C1_differentiable_on S - Sa)
continuous_on S g \<and> (\<exists>Sa. finite Sa \<and> g C1_differentiable_on S - Sa)

goal (1 subgoal):
 1. continuous_on S (\<lambda>x. (f x, g x)) \<and> (\<exists>Sa. finite Sa \<and> (\<lambda>x. (f x, g x)) C1_differentiable_on S - Sa)
[PROOF STEP]
by (blast intro!: continuous_intros C1_differentiable_on_pair del: continuous_on_discrete
      intro: C1_differentiable_on_subset)


[STATEMENT]
lemma temp_dyn_up_real_arith:
  assumes "a > 0" and Thyps: "Tmin \<le> T" "T \<le> Tmax" "Tmax < (L::real)"
    and thyps: "0 \<le> t" "\<forall>\<tau>\<in>{0..t}. \<tau> \<le> - (ln ((L - Tmax) / (L - T)) / a) "
  shows "L - Tmax \<le> exp (-(a * t)) * (L - T)"
    and "L - exp (-(a * t)) * (L - T) \<le> Tmax"
    and "Tmin \<le> L - exp (-(a * t)) * (L - T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T) &&& L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax &&& Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
 2. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 3. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
have "0 \<le> t \<and> t \<le> - (ln ((L - Tmax) / (L - T)) / a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> t \<and> t \<le> - (ln ((L - Tmax) / (L - T)) / a)
[PROOF STEP]
using thyps
[PROOF STATE]
proof (prove)
using this:
0 \<le> t
\<forall>\<tau>\<in>{0..t}. \<tau> \<le> - (ln ((L - Tmax) / (L - T)) / a)

goal (1 subgoal):
 1. 0 \<le> t \<and> t \<le> - (ln ((L - Tmax) / (L - T)) / a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> t \<and> t \<le> - (ln ((L - Tmax) / (L - T)) / a)

goal (3 subgoals):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
 2. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 3. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
hence "ln ((L - Tmax) / (L - T)) \<le> - a * t \<and> - a * t \<le> 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> t \<and> t \<le> - (ln ((L - Tmax) / (L - T)) / a)

goal (1 subgoal):
 1. ln ((L - Tmax) / (L - T)) \<le> - a \<cdot> t \<and> - a \<cdot> t \<le> 0
[PROOF STEP]
using assms(1) divide_le_cancel
[PROOF STATE]
proof (prove)
using this:
0 \<le> t \<and> t \<le> - (ln ((L - Tmax) / (L - T)) / a)
0 < a
(?a / ?c \<le> ?b / ?c) = (((0::?'a) < ?c \<longrightarrow> ?a \<le> ?b) \<and> (?c < (0::?'a) \<longrightarrow> ?b \<le> ?a))

goal (1 subgoal):
 1. ln ((L - Tmax) / (L - T)) \<le> - a \<cdot> t \<and> - a \<cdot> t \<le> 0
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
ln ((L - Tmax) / (L - T)) \<le> - a \<cdot> t \<and> - a \<cdot> t \<le> 0

goal (3 subgoals):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
 2. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 3. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ln ((L - Tmax) / (L - T)) \<le> - a \<cdot> t \<and> - a \<cdot> t \<le> 0

goal (3 subgoals):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
 2. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 3. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
have "(L - Tmax) / (L - T) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < (L - Tmax) / (L - T)
[PROOF STEP]
using Thyps
[PROOF STATE]
proof (prove)
using this:
Tmin \<le> T
T \<le> Tmax
Tmax < L

goal (1 subgoal):
 1. 0 < (L - Tmax) / (L - T)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < (L - Tmax) / (L - T)

goal (3 subgoals):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
 2. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 3. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
ln ((L - Tmax) / (L - T)) \<le> - a \<cdot> t \<and> - a \<cdot> t \<le> 0
0 < (L - Tmax) / (L - T)
[PROOF STEP]
have "(L - Tmax) / (L - T) \<le> exp (-a * t) \<and> exp (-a * t) \<le> 1"
[PROOF STATE]
proof (prove)
using this:
ln ((L - Tmax) / (L - T)) \<le> - a \<cdot> t \<and> - a \<cdot> t \<le> 0
0 < (L - Tmax) / (L - T)

goal (1 subgoal):
 1. (L - Tmax) / (L - T) \<le> exp (- a \<cdot> t) \<and> exp (- a \<cdot> t) \<le> 1
[PROOF STEP]
using exp_ln exp_le_one_iff
[PROOF STATE]
proof (prove)
using this:
ln ((L - Tmax) / (L - T)) \<le> - a \<cdot> t \<and> - a \<cdot> t \<le> 0
0 < (L - Tmax) / (L - T)
0 < ?x \<Longrightarrow> exp (ln ?x) = ?x
(exp ?x \<le> 1) = (?x \<le> 0)

goal (1 subgoal):
 1. (L - Tmax) / (L - T) \<le> exp (- a \<cdot> t) \<and> exp (- a \<cdot> t) \<le> 1
[PROOF STEP]
by (metis exp_less_cancel_iff not_less)
[PROOF STATE]
proof (state)
this:
(L - Tmax) / (L - T) \<le> exp (- a \<cdot> t) \<and> exp (- a \<cdot> t) \<le> 1

goal (3 subgoals):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
 2. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 3. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(L - Tmax) / (L - T) \<le> exp (- a \<cdot> t) \<and> exp (- a \<cdot> t) \<le> 1

goal (3 subgoals):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
 2. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 3. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
have "L - T > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < L - T
[PROOF STEP]
using Thyps
[PROOF STATE]
proof (prove)
using this:
Tmin \<le> T
T \<le> Tmax
Tmax < L

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

goal (3 subgoals):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
 2. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 3. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(L - Tmax) / (L - T) \<le> exp (- a \<cdot> t) \<and> exp (- a \<cdot> t) \<le> 1
0 < L - T
[PROOF STEP]
have obs: "(L - Tmax) \<le> exp (-a * t) * (L - T) \<and> exp (-a * t) * (L - T) \<le> (L - T)"
[PROOF STATE]
proof (prove)
using this:
(L - Tmax) / (L - T) \<le> exp (- a \<cdot> t) \<and> exp (- a \<cdot> t) \<le> 1
0 < L - T

goal (1 subgoal):
 1. L - Tmax \<le> exp (- a \<cdot> t) \<cdot> (L - T) \<and> exp (- a \<cdot> t) \<cdot> (L - T) \<le> L - T
[PROOF STEP]
by (simp add: pos_divide_le_eq)
[PROOF STATE]
proof (state)
this:
L - Tmax \<le> exp (- a \<cdot> t) \<cdot> (L - T) \<and> exp (- a \<cdot> t) \<cdot> (L - T) \<le> L - T

goal (3 subgoals):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
 2. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 3. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
thus "(L - Tmax) \<le> exp (-(a * t)) * (L - T)"
[PROOF STATE]
proof (prove)
using this:
L - Tmax \<le> exp (- a \<cdot> t) \<cdot> (L - T) \<and> exp (- a \<cdot> t) \<cdot> (L - T) \<le> L - T

goal (1 subgoal):
 1. L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)

goal (2 subgoals):
 1. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
 2. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
thus "L - exp (-(a * t)) * (L - T) \<le> Tmax"
[PROOF STATE]
proof (prove)
using this:
L - Tmax \<le> exp (- (a \<cdot> t)) \<cdot> (L - T)

goal (1 subgoal):
 1. L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
L - exp (- (a \<cdot> t)) \<cdot> (L - T) \<le> Tmax

goal (1 subgoal):
 1. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
show "Tmin \<le> L - exp (-(a * t)) * (L - T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
using Thyps and obs
[PROOF STATE]
proof (prove)
using this:
Tmin \<le> T
T \<le> Tmax
Tmax < L
L - Tmax \<le> exp (- a \<cdot> t) \<cdot> (L - T) \<and> exp (- a \<cdot> t) \<cdot> (L - T) \<le> L - T

goal (1 subgoal):
 1. Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
Tmin \<le> L - exp (- (a \<cdot> t)) \<cdot> (L - T)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_update_with:
  "set (update_with v k f al) =
  (set al - {k} \<times> UNIV \<union> {(k, f (case lookup al k of None \<Rightarrow> v | Some v \<Rightarrow> v))})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Assoc_List.set (update_with v k f al) = Assoc_List.set al - {k} \<times> UNIV \<union> {(k, f (case lookup al k of None \<Rightarrow> v | Some v \<Rightarrow> v))}
[PROOF STEP]
by(simp add: set_def update_with_def Assoc_List_inverse set_update_with_aux lookup_def)


[STATEMENT]
lemma fin_dim_span:
assumes "finite A" "A \<subseteq> carrier V"
shows "vectorspace.fin_dim class_ring (vs (span A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vectorspace.fin_dim class_ring (vs (local.span A))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. vectorspace.fin_dim class_ring (vs (local.span A))
[PROOF STEP]
have "vectorspace class_ring (span_vs A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vectorspace class_ring (vs (local.span A))
[PROOF STEP]
using assms span_is_subspace subspace_def subspace_is_vs
[PROOF STATE]
proof (prove)
using this:
finite A
A \<subseteq> carrier V
?S \<subseteq> carrier_vec n \<Longrightarrow> subspace class_ring (local.span ?S) V
subspace ?K ?W ?V \<equiv> vectorspace ?K ?V \<and> LinearCombinations.submodule ?K ?W ?V
subspace class_ring ?W V \<Longrightarrow> vectorspace class_ring (vs ?W)

goal (1 subgoal):
 1. vectorspace class_ring (vs (local.span A))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
vectorspace class_ring (vs (local.span A))

goal (1 subgoal):
 1. vectorspace.fin_dim class_ring (vs (local.span A))
[PROOF STEP]
have "A \<subseteq> span A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> local.span A
[PROOF STEP]
using assms in_own_span
[PROOF STATE]
proof (prove)
using this:
finite A
A \<subseteq> carrier V
?S \<subseteq> carrier_vec n \<Longrightarrow> ?S \<subseteq> local.span ?S

goal (1 subgoal):
 1. A \<subseteq> local.span A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
A \<subseteq> local.span A

goal (1 subgoal):
 1. vectorspace.fin_dim class_ring (vs (local.span A))
[PROOF STEP]
have "submodule class_ring (span A) V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LinearCombinations.submodule class_ring (local.span A) V
[PROOF STEP]
using assms span_is_submodule
[PROOF STATE]
proof (prove)
using this:
finite A
A \<subseteq> carrier V
?S \<subseteq> carrier_vec n \<Longrightarrow> LinearCombinations.submodule class_ring (local.span ?S) V

goal (1 subgoal):
 1. LinearCombinations.submodule class_ring (local.span A) V
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
LinearCombinations.submodule class_ring (local.span A) V

goal (1 subgoal):
 1. vectorspace.fin_dim class_ring (vs (local.span A))
[PROOF STEP]
have "LinearCombinations.module.span class_ring (vs (span A)) A = carrier (vs (span A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LinearCombinations.module.span class_ring (vs (local.span A)) A = carrier (vs (local.span A))
[PROOF STEP]
using  span_li_not_depend(1)[OF \<open>A \<subseteq> span A\<close> \<open>submodule class_ring (span A) V\<close>]
[PROOF STATE]
proof (prove)
using this:
LinearCombinations.module.span class_ring (vs (local.span A)) A = local.span A

goal (1 subgoal):
 1. LinearCombinations.module.span class_ring (vs (local.span A)) A = carrier (vs (local.span A))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
LinearCombinations.module.span class_ring (vs (local.span A)) A = carrier (vs (local.span A))

goal (1 subgoal):
 1. vectorspace.fin_dim class_ring (vs (local.span A))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
LinearCombinations.module.span class_ring (vs (local.span A)) A = carrier (vs (local.span A))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
LinearCombinations.module.span class_ring (vs (local.span A)) A = carrier (vs (local.span A))

goal (1 subgoal):
 1. vectorspace.fin_dim class_ring (vs (local.span A))
[PROOF STEP]
unfolding vectorspace.fin_dim_def[OF \<open>vectorspace class_ring (span_vs A)\<close>]
[PROOF STATE]
proof (prove)
using this:
LinearCombinations.module.span class_ring (vs (local.span A)) A = carrier (vs (local.span A))

goal (1 subgoal):
 1. \<exists>Aa. finite Aa \<and> Aa \<subseteq> carrier (vs (local.span A)) \<and> LinearCombinations.module.span class_ring (vs (local.span A)) Aa = carrier (vs (local.span A))
[PROOF STEP]
using List.finite_set \<open>A \<subseteq> span A\<close> \<open>vectorspace class_ring (vs (span A))\<close>
    vec_vs vectorspace.carrier_vs_is_self[OF \<open>vectorspace class_ring (span_vs A)\<close>]
[PROOF STATE]
proof (prove)
using this:
LinearCombinations.module.span class_ring (vs (local.span A)) A = carrier (vs (local.span A))
finite (set ?xs)
A \<subseteq> local.span A
vectorspace class_ring (vs (local.span A))
vectorspace class_ring (module_vec TYPE(?'a) ?n)
carrier (vs (local.span A)\<lparr>carrier := ?W\<rparr>) = ?W

goal (1 subgoal):
 1. \<exists>Aa. finite Aa \<and> Aa \<subseteq> carrier (vs (local.span A)) \<and> LinearCombinations.module.span class_ring (vs (local.span A)) Aa = carrier (vs (local.span A))
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
LinearCombinations.module.span class_ring (vs (local.span A)) A = carrier (vs (local.span A))
finite (set ?xs)
A \<subseteq> local.span A
vectorspace class_ring (vs (local.span A))
vectorspace class_ring (module_vec TYPE(?'a) ?n)
carrier (vs (local.span A)\<lparr>carrier := ?W\<rparr>) = ?W
finite A

goal (1 subgoal):
 1. \<exists>Aa. finite Aa \<and> Aa \<subseteq> carrier (vs (local.span A)) \<and> LinearCombinations.module.span class_ring (vs (local.span A)) Aa = carrier (vs (local.span A))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
vectorspace.fin_dim class_ring (vs (local.span A))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pmf_Pi':
  assumes "finite A" "\<And>x. x \<notin> A \<Longrightarrow> f x = dflt"
  shows   "pmf (Pi_pmf A dflt p) f = (\<Prod>x\<in>A. pmf (p x) (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pmf (Pi_pmf.Pi_pmf A dflt p) f = (\<Prod>x\<in>A. pmf (p x) (f x))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A
?x \<notin> A \<Longrightarrow> f ?x = dflt

goal (1 subgoal):
 1. pmf (Pi_pmf.Pi_pmf A dflt p) f = (\<Prod>x\<in>A. pmf (p x) (f x))
[PROOF STEP]
by (subst pmf_Pi) auto


[STATEMENT]
lemma ZFfunCompAppDomCod:
  assumes "isZFfun f" and "isZFfun g" and "|dom|g = |cod|f"
  shows   "|dom| (f |o| g) = |dom| f \<and> |cod| (f |o| g) = |cod| g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |dom|f |o| g = |dom|f \<and> |cod|f |o| g = |cod|g
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. |dom|f |o| g = |dom|f \<and> |cod|f |o| g = |cod|g
[PROOF STEP]
have "f |o| g = ZFfun ( |dom| f) ( |cod| g) (\<lambda> x . g |@| (f |@| x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f |o| g = ZFfun (|dom|f) (|cod|g) (\<lambda>x. g |@| (f |@| x))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
isZFfun f
isZFfun g
|dom|g = |cod|f

goal (1 subgoal):
 1. f |o| g = ZFfun (|dom|f) (|cod|g) (\<lambda>x. g |@| (f |@| x))
[PROOF STEP]
by (simp add: ZFfunCompApp)
[PROOF STATE]
proof (state)
this:
f |o| g = ZFfun (|dom|f) (|cod|g) (\<lambda>x. g |@| (f |@| x))

goal (1 subgoal):
 1. |dom|f |o| g = |dom|f \<and> |cod|f |o| g = |cod|g
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
f |o| g = ZFfun (|dom|f) (|cod|g) (\<lambda>x. g |@| (f |@| x))

goal (1 subgoal):
 1. |dom|f |o| g = |dom|f \<and> |cod|f |o| g = |cod|g
[PROOF STEP]
by (simp add: ZFfunDom ZFfunCod)
[PROOF STATE]
proof (state)
this:
|dom|f |o| g = |dom|f \<and> |cod|f |o| g = |cod|g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lossless_map_spmf [simp]: "lossless_spmf (map_spmf f p) \<longleftrightarrow> lossless_spmf p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lossless_spmf (map_spmf f p) = lossless_spmf p
[PROOF STEP]
by(auto simp add: lossless_iff_pmf_None pmf_eq_0_set_pmf)


[STATEMENT]
lemma G'_finite_reachable:
    assumes "finite ((g_E G)\<^sup>* `` g_V0 G)"
    shows "finite ((g_E G')\<^sup>* `` g_V0 G')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite G'.reachable
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite G'.reachable
[PROOF STEP]
have "(g_E G')\<^sup>* `` g_V0 G' \<subseteq> f ` (E\<^sup>*``V0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. G'.reachable \<subseteq> f ` reachable
[PROOF STEP]
apply (clarsimp_all simp: G'_fields(2))
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x xb. \<lbrakk>(f xb, x) \<in> G'.E\<^sup>*; xb \<in> V0\<rbrakk> \<Longrightarrow> x \<in> f ` reachable
[PROOF STEP]
apply (drule rtrancl_E'_sim)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xb. xb \<in> V0 \<Longrightarrow> xb \<in> V
 2. \<And>x xb. \<lbrakk>xb \<in> V0; \<exists>v. x = f v \<and> v \<in> V \<and> (xb, v) \<in> E\<^sup>*\<rbrakk> \<Longrightarrow> x \<in> f ` reachable
[PROOF STEP]
using V0_ss
[PROOF STATE]
proof (prove)
using this:
V0 \<subseteq> V

goal (2 subgoals):
 1. \<And>x xb. xb \<in> V0 \<Longrightarrow> xb \<in> V
 2. \<And>x xb. \<lbrakk>xb \<in> V0; \<exists>v. x = f v \<and> v \<in> V \<and> (xb, v) \<in> E\<^sup>*\<rbrakk> \<Longrightarrow> x \<in> f ` reachable
[PROOF STEP]
apply auto []
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x xb. \<lbrakk>xb \<in> V0; \<exists>v. x = f v \<and> v \<in> V \<and> (xb, v) \<in> E\<^sup>*\<rbrakk> \<Longrightarrow> x \<in> f ` reachable
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
G'.reachable \<subseteq> f ` reachable

goal (1 subgoal):
 1. finite G'.reachable
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
G'.reachable \<subseteq> f ` reachable

goal (1 subgoal):
 1. finite G'.reachable
[PROOF STEP]
using finite_subset assms
[PROOF STATE]
proof (prove)
using this:
G'.reachable \<subseteq> f ` reachable
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A
finite reachable

goal (1 subgoal):
 1. finite G'.reachable
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite G'.reachable

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ins_trees: "t \<in> trees A \<Longrightarrow> (x,y) \<in> A \<Longrightarrow> ins x y t \<in> trees A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>t \<in> trees A; (x, y) \<in> A\<rbrakk> \<Longrightarrow> ins x y t \<in> trees A
[PROOF STEP]
by (induction x y t rule: ins.induct)
     (auto split: tree.splits simp: ins_neq_Leaf)


[STATEMENT]
lemma dims_tensor0[simp]: "dims (tensor0 d) = d"
and   vec_tensor0[simp]:  "vec (tensor0 d) = vec0 (prod_list d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dims (tensor0 d) = d &&& vec (tensor0 d) = vec0 (prod_list d)
[PROOF STEP]
unfolding tensor0_def vec0_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dims (tensor_from_vec d (replicate (prod_list d) (0::'a))) = d &&& vec (tensor_from_vec d (replicate (prod_list d) (0::'b))) = replicate (prod_list d) (0::'b)
[PROOF STEP]
by simp_all


[STATEMENT]
lemma padl_image:
  assumes "U \<subseteq> carrier_vec n" shows "padl m ` U \<subseteq> carrier_vec (m + n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (@\<^sub>v) (0\<^sub>v m) ` U \<subseteq> carrier_vec (m + n)
[PROOF STEP]
proof(rule subsetI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> (@\<^sub>v) (0\<^sub>v m) ` U \<Longrightarrow> x \<in> carrier_vec (m + n)
[PROOF STEP]
fix v
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> (@\<^sub>v) (0\<^sub>v m) ` U \<Longrightarrow> x \<in> carrier_vec (m + n)
[PROOF STEP]
assume "v : padl m ` U"
[PROOF STATE]
proof (state)
this:
v \<in> (@\<^sub>v) (0\<^sub>v m) ` U

goal (1 subgoal):
 1. \<And>x. x \<in> (@\<^sub>v) (0\<^sub>v m) ` U \<Longrightarrow> x \<in> carrier_vec (m + n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
v \<in> (@\<^sub>v) (0\<^sub>v m) ` U
[PROOF STEP]
obtain u where "u : U" and vmu: "v = padl m u"
[PROOF STATE]
proof (prove)
using this:
v \<in> (@\<^sub>v) (0\<^sub>v m) ` U

goal (1 subgoal):
 1. (\<And>u. \<lbrakk>u \<in> U; v = 0\<^sub>v m @\<^sub>v u\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u \<in> U
v = 0\<^sub>v m @\<^sub>v u

goal (1 subgoal):
 1. \<And>x. x \<in> (@\<^sub>v) (0\<^sub>v m) ` U \<Longrightarrow> x \<in> carrier_vec (m + n)
[PROOF STEP]
hence "u : carrier_vec n"
[PROOF STATE]
proof (prove)
using this:
u \<in> U
v = 0\<^sub>v m @\<^sub>v u

goal (1 subgoal):
 1. u \<in> carrier_vec n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
u \<in> U
v = 0\<^sub>v m @\<^sub>v u
U \<subseteq> carrier_vec n

goal (1 subgoal):
 1. u \<in> carrier_vec n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
u \<in> carrier_vec n

goal (1 subgoal):
 1. \<And>x. x \<in> (@\<^sub>v) (0\<^sub>v m) ` U \<Longrightarrow> x \<in> carrier_vec (m + n)
[PROOF STEP]
thus "v : carrier_vec (m + n)"
[PROOF STATE]
proof (prove)
using this:
u \<in> carrier_vec n

goal (1 subgoal):
 1. v \<in> carrier_vec (m + n)
[PROOF STEP]
unfolding vmu
[PROOF STATE]
proof (prove)
using this:
u \<in> carrier_vec n

goal (1 subgoal):
 1. 0\<^sub>v m @\<^sub>v u \<in> carrier_vec (m + n)
[PROOF STEP]
using zero_carrier_vec[of m] append_carrier_vec
[PROOF STATE]
proof (prove)
using this:
u \<in> carrier_vec n
0\<^sub>v m \<in> carrier_vec m
\<lbrakk>?v \<in> carrier_vec ?n1.0; ?w \<in> carrier_vec ?n2.0\<rbrakk> \<Longrightarrow> ?v @\<^sub>v ?w \<in> carrier_vec (?n1.0 + ?n2.0)

goal (1 subgoal):
 1. 0\<^sub>v m @\<^sub>v u \<in> carrier_vec (m + n)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
v \<in> carrier_vec (m + n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fine_rsum_const: "fine \<delta> (a,b) D \<Longrightarrow> rsum D (\<lambda>x. c) = (c * (b - a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fine \<delta> (a, b) D \<Longrightarrow> rsum D (\<lambda>x. c) = c * (b - a)
[PROOF STEP]
unfolding rsum_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fine \<delta> (a, b) D \<Longrightarrow> (\<Sum>(u, x, v)\<leftarrow>D. c * (v - u)) = c * (b - a)
[PROOF STEP]
by (induct set: fine, auto simp add: algebra_simps)


[STATEMENT]
lemma in_set_morph_len: assumes "a \<in> set w" shows "\<^bold>|f [a]\<^bold>| \<le> \<^bold>|f w\<^bold>|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<^bold>|f [a]\<^bold>| \<le> \<^bold>|f w\<^bold>|
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<^bold>|f [a]\<^bold>| \<le> \<^bold>|f w\<^bold>|
[PROOF STEP]
from split_listE[OF assms]
[PROOF STATE]
proof (chain)
picking this:
(\<And>p s. w = p \<cdot> [a] \<cdot> s \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
[PROOF STEP]
obtain p s where "w = p \<cdot> [a] \<cdot> s"
[PROOF STATE]
proof (prove)
using this:
(\<And>p s. w = p \<cdot> [a] \<cdot> s \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>p s. w = p \<cdot> [a] \<cdot> s \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
w = p \<cdot> [a] \<cdot> s

goal (1 subgoal):
 1. \<^bold>|f [a]\<^bold>| \<le> \<^bold>|f w\<^bold>|
[PROOF STEP]
from lenarg[OF arg_cong[of _ _ f, OF this], unfolded morph lenmorph]
[PROOF STATE]
proof (chain)
picking this:
\<^bold>|f w\<^bold>| = \<^bold>|f p\<^bold>| + (\<^bold>|f [a]\<^bold>| + \<^bold>|f s\<^bold>|)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<^bold>|f w\<^bold>| = \<^bold>|f p\<^bold>| + (\<^bold>|f [a]\<^bold>| + \<^bold>|f s\<^bold>|)

goal (1 subgoal):
 1. \<^bold>|f [a]\<^bold>| \<le> \<^bold>|f w\<^bold>|
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
\<^bold>|f [a]\<^bold>| \<le> \<^bold>|f w\<^bold>|

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ereal_Inf':
  assumes *: "bdd_below A" "A \<noteq> {}"
  shows "ereal (Inf A) = (INF a\<in>A. ereal a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ereal (Inf A) = Inf (ereal ` A)
[PROOF STEP]
proof (rule ereal_Inf)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>Inf (ereal ` A)\<bar> \<noteq> \<infinity>
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
bdd_below A
A \<noteq> {}
[PROOF STEP]
obtain l u where "x \<in> A \<Longrightarrow> l \<le> x" "u \<in> A" for x
[PROOF STATE]
proof (prove)
using this:
bdd_below A
A \<noteq> {}

goal (1 subgoal):
 1. (\<And>l u. \<lbrakk>\<And>x. x \<in> A \<Longrightarrow> l \<le> x; u \<in> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: bdd_below_def)
[PROOF STATE]
proof (state)
this:
?x \<in> A \<Longrightarrow> l \<le> ?x
u \<in> A

goal (1 subgoal):
 1. \<bar>Inf (ereal ` A)\<bar> \<noteq> \<infinity>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x \<in> A \<Longrightarrow> l \<le> ?x
u \<in> A
[PROOF STEP]
have "l \<le> (INF x\<in>A. ereal x)" "(INF x\<in>A. ereal x) \<le> u"
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> l \<le> ?x
u \<in> A

goal (1 subgoal):
 1. ereal l \<le> Inf (ereal ` A) &&& Inf (ereal ` A) \<le> ereal u
[PROOF STEP]
by (auto intro!: INF_greatest INF_lower)
[PROOF STATE]
proof (state)
this:
ereal l \<le> Inf (ereal ` A)
Inf (ereal ` A) \<le> ereal u

goal (1 subgoal):
 1. \<bar>Inf (ereal ` A)\<bar> \<noteq> \<infinity>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ereal l \<le> Inf (ereal ` A)
Inf (ereal ` A) \<le> ereal u
[PROOF STEP]
show "\<bar>INF a\<in>A. ereal a\<bar> \<noteq> \<infinity>"
[PROOF STATE]
proof (prove)
using this:
ereal l \<le> Inf (ereal ` A)
Inf (ereal ` A) \<le> ereal u

goal (1 subgoal):
 1. \<bar>Inf (ereal ` A)\<bar> \<noteq> \<infinity>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<bar>Inf (ereal ` A)\<bar> \<noteq> \<infinity>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inverse_arrow_unique:
     assumes "inverse_arrows f g" and "inverse_arrows f g'"
     shows "g = g'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g = g'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
inverse_arrows f g
inverse_arrows f g'

goal (1 subgoal):
 1. g = g'
[PROOF STEP]
apply (elim inverse_arrowsE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>ide (g \<cdot> f); ide (f \<cdot> g); ide (g' \<cdot> f); ide (f \<cdot> g')\<rbrakk> \<Longrightarrow> g = g'
[PROOF STEP]
by (metis comp_cod_arr ide_compE comp_assoc seqE)


[STATEMENT]
lemma P_upper_bound:
  assumes "x > 0"
  shows   "P x \<le> 1/(12*x^2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P x \<le> 1 / (12 * x\<^sup>2)
[PROOF STEP]
proof (rule tendsto_upperbound)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (?f \<longlongrightarrow> P x) ?F
 2. \<forall>\<^sub>F i in ?F. ?f i \<le> 1 / (12 * x\<^sup>2)
 3. ?F \<noteq> bot
[PROOF STEP]
show "eventually (\<lambda>n. p n x \<le> 1 / (12 * x^2)) at_top"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. p n x \<le> 1 / (12 * x\<^sup>2)
[PROOF STEP]
using eventually_gt_at_top[of 0]
[PROOF STATE]
proof (prove)
using this:
eventually ((<) (0::?'a1)) at_top

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. p n x \<le> 1 / (12 * x\<^sup>2)
[PROOF STEP]
by eventually_elim (use p_upper_bound[of x] assms in auto)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. p n x \<le> 1 / (12 * x\<^sup>2)

goal (2 subgoals):
 1. (\<lambda>n. p n x) \<longlonglongrightarrow> P x
 2. sequentially \<noteq> bot
[PROOF STEP]
show "(\<lambda>n. p n x) \<longlonglongrightarrow> P x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. p n x) \<longlonglongrightarrow> P x
[PROOF STEP]
by (simp add: assms p_LIMSEQ)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. p n x) \<longlonglongrightarrow> P x

goal (1 subgoal):
 1. sequentially \<noteq> bot
[PROOF STEP]
qed auto


[STATEMENT]
lemma linear_plus_1_le_power:
  fixes x :: real
  assumes x: "0 \<le> x"
  shows "real n * x + 1 \<le> (x + 1) ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real n * x + 1 \<le> (x + 1) ^ n
[PROOF STEP]
proof (induct n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. real 0 * x + 1 \<le> (x + 1) ^ 0
 2. \<And>n. real n * x + 1 \<le> (x + 1) ^ n \<Longrightarrow> real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. real 0 * x + 1 \<le> (x + 1) ^ 0
 2. \<And>n. real n * x + 1 \<le> (x + 1) ^ n \<Longrightarrow> real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real 0 * x + 1 \<le> (x + 1) ^ 0
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real 0 * x + 1 \<le> (x + 1) ^ 0

goal (1 subgoal):
 1. \<And>n. real n * x + 1 \<le> (x + 1) ^ n \<Longrightarrow> real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. real n * x + 1 \<le> (x + 1) ^ n \<Longrightarrow> real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
real n * x + 1 \<le> (x + 1) ^ n

goal (1 subgoal):
 1. \<And>n. real n * x + 1 \<le> (x + 1) ^ n \<Longrightarrow> real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
from x
[PROOF STATE]
proof (chain)
picking this:
0 \<le> x
[PROOF STEP]
have "real (Suc n) * x + 1 \<le> (x + 1) * (real n * x + 1)"
[PROOF STATE]
proof (prove)
using this:
0 \<le> x

goal (1 subgoal):
 1. real (Suc n) * x + 1 \<le> (x + 1) * (real n * x + 1)
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
real (Suc n) * x + 1 \<le> (x + 1) * (real n * x + 1)

goal (1 subgoal):
 1. \<And>n. real n * x + 1 \<le> (x + 1) ^ n \<Longrightarrow> real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real (Suc n) * x + 1 \<le> (x + 1) * (real n * x + 1)

goal (1 subgoal):
 1. \<And>n. real n * x + 1 \<le> (x + 1) ^ n \<Longrightarrow> real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
have "\<dots> \<le> (x + 1)^Suc n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x + 1) * (real n * x + 1) \<le> (x + 1) ^ Suc n
[PROOF STEP]
using Suc x
[PROOF STATE]
proof (prove)
using this:
real n * x + 1 \<le> (x + 1) ^ n
0 \<le> x

goal (1 subgoal):
 1. (x + 1) * (real n * x + 1) \<le> (x + 1) ^ Suc n
[PROOF STEP]
by (simp add: mult_left_mono)
[PROOF STATE]
proof (state)
this:
(x + 1) * (real n * x + 1) \<le> (x + 1) ^ Suc n

goal (1 subgoal):
 1. \<And>n. real n * x + 1 \<le> (x + 1) ^ n \<Longrightarrow> real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n

goal (1 subgoal):
 1. real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
real (Suc n) * x + 1 \<le> (x + 1) ^ Suc n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sum_disj_Union:
 "finite V \<Longrightarrow>
  (\<And>f. finite (F f)) \<Longrightarrow>
  separating V F \<Longrightarrow>
  (\<Sum>v\<in>V. \<Sum>f\<in>(F v). (w f::nat)) = (\<Sum>f\<in>(\<Union>v\<in>V. F v). w f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite V; \<And>f. finite (F f); separating V F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))
[PROOF STEP]
proof (induct  rule: finite_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>\<And>f. finite (F f); separating {} F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>{}. sum w (F v)) = sum w (\<Union> (F ` {}))
 2. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
case empty
[PROOF STATE]
proof (state)
this:
finite (F ?f)
separating {} F

goal (2 subgoals):
 1. \<lbrakk>\<And>f. finite (F f); separating {} F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>{}. sum w (F v)) = sum w (\<Union> (F ` {}))
 2. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite (F ?f)
separating {} F
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
finite (F ?f)
separating {} F

goal (1 subgoal):
 1. (\<Sum>v\<in>{}. sum w (F v)) = sum w (\<Union> (F ` {}))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>v\<in>{}. sum w (F v)) = sum w (\<Union> (F ` {}))

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
case (insert a V)
[PROOF STATE]
proof (state)
this:
finite V
a \<notin> V
\<lbrakk>\<And>f. finite (F f); separating V F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))
finite (F ?f)
separating (insert a V) F

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
finite V
a \<notin> V
\<lbrakk>\<And>f. finite (F f); separating V F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))
finite (F ?f)
separating (insert a V) F
[PROOF STEP]
have s: "separating (insert a V) F"
[PROOF STATE]
proof (prove)
using this:
finite V
a \<notin> V
\<lbrakk>\<And>f. finite (F f); separating V F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))
finite (F ?f)
separating (insert a V) F

goal (1 subgoal):
 1. separating (insert a V) F
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
separating (insert a V) F

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
separating (insert a V) F
[PROOF STEP]
have "separating V F"
[PROOF STATE]
proof (prove)
using this:
separating (insert a V) F

goal (1 subgoal):
 1. separating V F
[PROOF STEP]
by (rule_tac separating_insert1)
[PROOF STATE]
proof (state)
this:
separating V F

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
with insert
[PROOF STATE]
proof (chain)
picking this:
finite V
a \<notin> V
\<lbrakk>\<And>f. finite (F f); separating V F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))
finite (F ?f)
separating (insert a V) F
separating V F
[PROOF STEP]
have IH: "(\<Sum>v\<in>V. \<Sum>f\<in>(F v). w f) = (\<Sum>f\<in>(\<Union>v\<in>V. F v). w f)"
[PROOF STATE]
proof (prove)
using this:
finite V
a \<notin> V
\<lbrakk>\<And>f. finite (F f); separating V F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))
finite (F ?f)
separating (insert a V) F
separating V F

goal (1 subgoal):
 1. (\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
have fin: "finite V" "a \<notin> V" "\<And>f. finite (F f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite V &&& a \<notin> V &&& (\<And>f. finite (F f))
[PROOF STEP]
by fact+
[PROOF STATE]
proof (state)
this:
finite V
a \<notin> V
finite (F ?f)

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite V
a \<notin> V
finite (F ?f)

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
from s
[PROOF STATE]
proof (chain)
picking this:
separating (insert a V) F
[PROOF STEP]
have "\<And>v. a \<notin> V \<Longrightarrow> v \<in> V \<Longrightarrow> F a \<inter> F v = {}"
[PROOF STATE]
proof (prove)
using this:
separating (insert a V) F

goal (1 subgoal):
 1. \<And>v. \<lbrakk>a \<notin> V; v \<in> V\<rbrakk> \<Longrightarrow> F a \<inter> F v = {}
[PROOF STEP]
by (simp add: separating_insert2)
[PROOF STATE]
proof (state)
this:
\<lbrakk>a \<notin> V; ?v \<in> V\<rbrakk> \<Longrightarrow> F a \<inter> F ?v = {}

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
with fin
[PROOF STATE]
proof (chain)
picking this:
finite V
a \<notin> V
finite (F ?f)
\<lbrakk>a \<notin> V; ?v \<in> V\<rbrakk> \<Longrightarrow> F a \<inter> F ?v = {}
[PROOF STEP]
have "(F a) \<inter> (\<Union>v\<in>V. F v) = {}"
[PROOF STATE]
proof (prove)
using this:
finite V
a \<notin> V
finite (F ?f)
\<lbrakk>a \<notin> V; ?v \<in> V\<rbrakk> \<Longrightarrow> F a \<inter> F ?v = {}

goal (1 subgoal):
 1. F a \<inter> \<Union> (F ` V) = {}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
F a \<inter> \<Union> (F ` V) = {}

goal (1 subgoal):
 1. \<And>x Fa. \<lbrakk>finite Fa; x \<notin> Fa; \<lbrakk>\<And>f. finite (F f); separating Fa F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>Fa. sum w (F v)) = sum w (\<Union> (F ` Fa)); \<And>f. finite (F f); separating (insert x Fa) F\<rbrakk> \<Longrightarrow> (\<Sum>v\<in>insert x Fa. sum w (F v)) = sum w (\<Union> (F ` insert x Fa))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))
finite V
a \<notin> V
finite (F ?f)
F a \<inter> \<Union> (F ` V) = {}
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(\<Sum>v\<in>V. sum w (F v)) = sum w (\<Union> (F ` V))
finite V
a \<notin> V
finite (F ?f)
F a \<inter> \<Union> (F ` V) = {}

goal (1 subgoal):
 1. (\<Sum>v\<in>insert a V. sum w (F v)) = sum w (\<Union> (F ` insert a V))
[PROOF STEP]
by (simp add: sum.union_disjoint)
[PROOF STATE]
proof (state)
this:
(\<Sum>v\<in>insert a V. sum w (F v)) = sum w (\<Union> (F ` insert a V))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma phi_inj_on:
  shows "inj_on \<phi> (G // K)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on \<phi> Partition
[PROOF STEP]
proof(intro inj_onI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> Partition; y \<in> Partition; \<phi> x = \<phi> y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
fix x y
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> Partition; y \<in> Partition; \<phi> x = \<phi> y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
assume "x \<in> G // K" and hy: "y \<in> G // K" and hxy: "\<phi> x = \<phi> y"
[PROOF STATE]
proof (state)
this:
x \<in> Partition
y \<in> Partition
\<phi> x = \<phi> y

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> Partition; y \<in> Partition; \<phi> x = \<phi> y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> Partition
y \<in> Partition
\<phi> x = \<phi> y
[PROOF STEP]
obtain a b where "x = a \<cdot>| K" and "y = b \<cdot>| K" and "a \<in> G" and "b \<in> G"
[PROOF STATE]
proof (prove)
using this:
x \<in> Partition
y \<in> Partition
\<phi> x = \<phi> y

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>x = a \<cdot>| K; y = b \<cdot>| K; a \<in> G; b \<in> G\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using representant_exists Left_Coset_Class_unit
[PROOF STATE]
proof (prove)
using this:
x \<in> Partition
y \<in> Partition
\<phi> x = \<phi> y
?A \<in> Partition \<Longrightarrow> \<exists>a\<in>G. a \<in> ?A \<and> ?A = Class a
?g \<in> G \<Longrightarrow> ?g \<cdot>| K = Class ?g

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>x = a \<cdot>| K; y = b \<cdot>| K; a \<in> G; b \<in> G\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
x = a \<cdot>| K
y = b \<cdot>| K
a \<in> G
b \<in> G

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> Partition; y \<in> Partition; \<phi> x = \<phi> y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = a \<cdot>| K
y = b \<cdot>| K
a \<in> G
b \<in> G
[PROOF STEP]
show "x = y"
[PROOF STATE]
proof (prove)
using this:
x = a \<cdot>| K
y = b \<cdot>| K
a \<in> G
b \<in> G

goal (1 subgoal):
 1. x = y
[PROOF STEP]
using hxy hy
[PROOF STATE]
proof (prove)
using this:
x = a \<cdot>| K
y = b \<cdot>| K
a \<in> G
b \<in> G
\<phi> x = \<phi> y
y \<in> Partition

goal (1 subgoal):
 1. x = y
[PROOF STEP]
by (metis phi_coset_mem phi_mem_coset_eq)
[PROOF STATE]
proof (state)
this:
x = y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma restrict_relE: "\<lbrakk> (x, y) \<in> restrict_rel A R; \<lbrakk> (x, y) \<in> R; x \<in> A; y \<in> A \<rbrakk> \<Longrightarrow> thesis \<rbrakk> \<Longrightarrow> thesis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> restrict_rel A R; \<lbrakk>(x, y) \<in> R; x \<in> A; y \<in> A\<rbrakk> \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by(simp add: restrict_rel_def)


[STATEMENT]
lemma square_free_m_smultI: assumes sf: "square_free_m f"
  and inv: "M (ci * c) = 1"
  shows "square_free_m (smult c f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. square_free_m (smult c f)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. square_free_m (smult c f)
[PROOF STEP]
have "square_free_m (smult ci (smult c f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. square_free_m (smult ci (smult c f))
[PROOF STEP]
proof (rule square_free_m_cong[OF sf], rule poly_eqI, unfold Mp_coeff coeff_smult)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. M (coeff f n) = M (ci * (c * coeff f n))
[PROOF STEP]
fix n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. M (coeff f n) = M (ci * (c * coeff f n))
[PROOF STEP]
have "M (ci * (c * coeff f n)) = M ( M (ci * c) * coeff f n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M (ci * (c * coeff f n)) = M (M (ci * c) * coeff f n)
[PROOF STEP]
by (simp add: ac_simps)
[PROOF STATE]
proof (state)
this:
M (ci * (c * coeff f n)) = M (M (ci * c) * coeff f n)

goal (1 subgoal):
 1. \<And>n. M (coeff f n) = M (ci * (c * coeff f n))
[PROOF STEP]
from this[unfolded inv]
[PROOF STATE]
proof (chain)
picking this:
M (ci * (c * coeff f n)) = M (1 * coeff f n)
[PROOF STEP]
show "M (coeff f n) = M (ci * (c * coeff f n))"
[PROOF STATE]
proof (prove)
using this:
M (ci * (c * coeff f n)) = M (1 * coeff f n)

goal (1 subgoal):
 1. M (coeff f n) = M (ci * (c * coeff f n))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
M (coeff f n) = M (ci * (c * coeff f n))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
square_free_m (smult ci (smult c f))

goal (1 subgoal):
 1. square_free_m (smult c f)
[PROOF STEP]
from square_free_m_smultD[OF this]
[PROOF STATE]
proof (chain)
picking this:
square_free_m (smult c f)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
square_free_m (smult c f)

goal (1 subgoal):
 1. square_free_m (smult c f)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
square_free_m (smult c f)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Nat_closed[simp, intro]: "a \<in> \<guillemotleft>\<nat>\<guillemotright> \<Longrightarrow> a \<in> U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> \<guillemotleft>\<nat>\<guillemotright> \<Longrightarrow> a \<in> U
[PROOF STEP]
using Nat_ss_UNIV
[PROOF STATE]
proof (prove)
using this:
\<guillemotleft>\<nat>\<guillemotright> \<subseteq> U

goal (1 subgoal):
 1. a \<in> \<guillemotleft>\<nat>\<guillemotright> \<Longrightarrow> a \<in> U
[PROOF STEP]
by blast


[STATEMENT]
theorem wls_psubstAbs_compose:
assumes "wlsAbs (us,s) A" and "wlsEnv rho" and "wlsEnv rho'"
shows "((A $[rho]) $[rho']) = (A $[(rho &[rho'])])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A $[rho] $[rho'] = A $[rho &[rho']]
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
wlsAbs (us, s) A
wlsEnv rho
wlsEnv rho'

goal (1 subgoal):
 1. A $[rho] $[rho'] = A $[rho &[rho']]
[PROOF STEP]
by(simp add: psubstAbs_compose)


[STATEMENT]
lemma normalize_field [simp]: "normalize (a :: 'a :: {field, semiring_gcd}) = (if a = 0 then 0 else 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. normalize a = (if a = (0::'a) then 0::'a else (1::'a))
[PROOF STEP]
using unit_factor_normalize
[PROOF STATE]
proof (prove)
using this:
?a \<noteq> (0::?'a) \<Longrightarrow> unit_factor (normalize ?a) = (1::?'a)

goal (1 subgoal):
 1. normalize a = (if a = (0::'a) then 0::'a else (1::'a))
[PROOF STEP]
by fastforce


[STATEMENT]
lemma left_adjoint_preserved_by_iso:
    assumes "is_left_adjoint f"
    and "\<guillemotleft>\<phi> : f \<Rightarrow> f'\<guillemotright>" and "iso \<phi>"
    shows "is_left_adjoint f'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_left_adjoint f'
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. is_left_adjoint f'
[PROOF STEP]
obtain g where g: "adjoint_pair f g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>g. adjoint_pair f g \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_left_adjoint f
\<guillemotleft>\<phi> : f \<Rightarrow> f'\<guillemotright>
local.iso \<phi>

goal (1 subgoal):
 1. (\<And>g. adjoint_pair f g \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
adjoint_pair f g

goal (1 subgoal):
 1. is_left_adjoint f'
[PROOF STEP]
have "adjoint_pair f' g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint_pair f' g
[PROOF STEP]
using assms g adjoint_pair_preserved_by_iso [of f g \<phi> f' g g]
              adjoint_pair_antipar [of f g]
[PROOF STATE]
proof (prove)
using this:
is_left_adjoint f
\<guillemotleft>\<phi> : f \<Rightarrow> f'\<guillemotright>
local.iso \<phi>
adjoint_pair f g
\<lbrakk>adjoint_pair f g; \<guillemotleft>\<phi> : f \<Rightarrow> f'\<guillemotright>; local.iso \<phi>; \<guillemotleft>g : g \<Rightarrow> g\<guillemotright>; local.iso g\<rbrakk> \<Longrightarrow> adjoint_pair f' g
adjoint_pair f g \<Longrightarrow> ide f
adjoint_pair f g \<Longrightarrow> ide g
adjoint_pair f g \<Longrightarrow> src f = trg g
adjoint_pair f g \<Longrightarrow> src g = trg f

goal (1 subgoal):
 1. adjoint_pair f' g
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
adjoint_pair f' g

goal (1 subgoal):
 1. is_left_adjoint f'
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
adjoint_pair f' g

goal (1 subgoal):
 1. is_left_adjoint f'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
is_left_adjoint f'

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma acc_point_cres:
  assumes "s \<in> closed_seqs Zp"
  shows "(acc_point s (Suc k)) = (const_res (Suc k) (res_seq s k))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. acc_point s (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. acc_point s (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
have "Suc k > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Suc k
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < Suc k

goal (1 subgoal):
 1. acc_point s (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
have "(res_seq s (Suc k)) = const_res_subseq (Suc k) (res_seq s k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. res_seq s (Suc k) = const_res_subseq (Suc k) (res_seq s k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
res_seq s (Suc k) = const_res_subseq (Suc k) (res_seq s k)

goal (1 subgoal):
 1. acc_point s (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
res_seq s (Suc k) = const_res_subseq (Suc k) (res_seq s k)
[PROOF STEP]
have "(const_res_subseq (Suc k) (res_seq s k)) 0 (Suc k) = const_res (Suc k)  (res_seq s k)"
[PROOF STATE]
proof (prove)
using this:
res_seq s (Suc k) = const_res_subseq (Suc k) (res_seq s k)

goal (1 subgoal):
 1. const_res_subseq (Suc k) (res_seq s k) 0 (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
using assms res_seq_res' padic_integers_axioms
[PROOF STATE]
proof (prove)
using this:
res_seq s (Suc k) = const_res_subseq (Suc k) (res_seq s k)
s \<in> carrier Zp\<^bsup>\<omega>\<^esup>
?s \<in> carrier Zp\<^bsup>\<omega>\<^esup> \<Longrightarrow> res_seq ?s (Suc ?k) ?n (Suc ?k) = const_res (Suc ?k) (res_seq ?s ?k)
padic_integers p

goal (1 subgoal):
 1. const_res_subseq (Suc k) (res_seq s k) 0 (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
const_res_subseq (Suc k) (res_seq s k) 0 (Suc k) = const_res (Suc k) (res_seq s k)

goal (1 subgoal):
 1. acc_point s (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
have "acc_point s (Suc k) = res_seq s (Suc k) 0 (Suc k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. acc_point s (Suc k) = res_seq s (Suc k) 0 (Suc k)
[PROOF STEP]
using acc_point_def
[PROOF STATE]
proof (prove)
using this:
acc_point ?s ?k = (if ?k = 0 then 0 else res_seq ?s ?k 0 ?k)

goal (1 subgoal):
 1. acc_point s (Suc k) = res_seq s (Suc k) 0 (Suc k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
acc_point s (Suc k) = res_seq s (Suc k) 0 (Suc k)

goal (1 subgoal):
 1. acc_point s (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
acc_point s (Suc k) = res_seq s (Suc k) 0 (Suc k)
[PROOF STEP]
have "acc_point s (Suc k) = (const_res_subseq (Suc k) (res_seq s k)) 0 (Suc k)"
[PROOF STATE]
proof (prove)
using this:
acc_point s (Suc k) = res_seq s (Suc k) 0 (Suc k)

goal (1 subgoal):
 1. acc_point s (Suc k) = const_res_subseq (Suc k) (res_seq s k) 0 (Suc k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
acc_point s (Suc k) = const_res_subseq (Suc k) (res_seq s k) 0 (Suc k)

goal (1 subgoal):
 1. acc_point s (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
acc_point s (Suc k) = const_res_subseq (Suc k) (res_seq s k) 0 (Suc k)

goal (1 subgoal):
 1. acc_point s (Suc k) = const_res (Suc k) (res_seq s k)
[PROOF STEP]
by (simp add: \<open>(const_res_subseq (Suc k) (res_seq s k)) 0 (Suc k) = const_res (Suc k) (res_seq s k)\<close>)
[PROOF STATE]
proof (state)
this:
acc_point s (Suc k) = const_res (Suc k) (res_seq s k)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma filter_map_splitE:
  assumes "filter P (map f xs) = ys @ zs"
  obtains us vs where "xs = us @ vs" and "filter P (map f us) = ys" and "filter P (map f vs) = zs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>us vs. \<lbrakk>xs = us @ vs; filter P (map f us) = ys; filter P (map f vs) = zs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
filter P (map f xs) = ys @ zs

goal (1 subgoal):
 1. (\<And>us vs. \<lbrakk>xs = us @ vs; filter P (map f us) = ys; filter P (map f vs) = zs\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (fastforce elim: filter_splitE map_splitE)


[STATEMENT]
lemma range_enum: "range (enum N) = N" and strict_mono_enum: "strict_mono (enum N)"
  if "infinite N" for N :: "nat set"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range (enum N) = N &&& strict_mono (enum N)
[PROOF STEP]
using enum_works [OF that]
[PROOF STATE]
proof (prove)
using this:
N = range (enum N) \<and> strict_mono (enum N)

goal (1 subgoal):
 1. range (enum N) = N &&& strict_mono (enum N)
[PROOF STEP]
by auto


[STATEMENT]
lemma match_abss'_Fun_param_subset:
  assumes "match_abss' (Fun f ts) (Fun g ss)  = Some \<delta>"
    and "(t,s) \<in> set (zip ts ss)"
    and "match_abss' t s = Some \<sigma>"
  shows "\<sigma> x \<subseteq> \<delta> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<sigma> x \<subseteq> \<delta> x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<sigma> x \<subseteq> \<delta> x
[PROOF STEP]
obtain \<theta> where \<theta>:
      "those (map2 match_abss' ts ss) = Some \<theta>"
      "\<delta> = fun_point_Union_list \<theta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<theta>. \<lbrakk>those (map2 match_abss' ts ss) = Some \<theta>; \<delta> = fun_point_Union_list \<theta>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using match_abss'_Fun_inv[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
f = g
length ts = length ss
\<exists>\<theta>. Some \<theta> = those (map2 match_abss' ts ss) \<and> \<delta> = fun_point_Union_list \<theta>
\<forall>(t, s)\<in>set (zip ts ss). \<exists>\<sigma>. match_abss' t s = Some \<sigma>

goal (1 subgoal):
 1. (\<And>\<theta>. \<lbrakk>those (map2 match_abss' ts ss) = Some \<theta>; \<delta> = fun_point_Union_list \<theta>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
those (map2 match_abss' ts ss) = Some \<theta>
\<delta> = fun_point_Union_list \<theta>

goal (1 subgoal):
 1. \<sigma> x \<subseteq> \<delta> x
[PROOF STEP]
have "\<sigma> \<in> set \<theta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<sigma> \<in> set \<theta>
[PROOF STEP]
using \<theta>(1) assms(2-) those_Some_iff[of "map2 match_abss' ts ss" \<theta>]
[PROOF STATE]
proof (prove)
using this:
those (map2 match_abss' ts ss) = Some \<theta>
(t, s) \<in> set (zip ts ss)
match_abss' t s = Some \<sigma>
(those (map2 match_abss' ts ss) = Some \<theta>) = ((\<forall>x'\<in>set (map2 match_abss' ts ss). \<exists>x. x' = Some x) \<and> \<theta> = map the (map2 match_abss' ts ss))

goal (1 subgoal):
 1. \<sigma> \<in> set \<theta>
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<sigma> \<in> set \<theta>

goal (1 subgoal):
 1. \<sigma> x \<subseteq> \<delta> x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> set \<theta>

goal (1 subgoal):
 1. \<sigma> x \<subseteq> \<delta> x
[PROOF STEP]
using \<theta>(2)
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> set \<theta>
\<delta> = fun_point_Union_list \<theta>

goal (1 subgoal):
 1. \<sigma> x \<subseteq> \<delta> x
[PROOF STEP]
unfolding fun_point_Union_list_def
[PROOF STATE]
proof (prove)
using this:
\<sigma> \<in> set \<theta>
\<delta> = (\<lambda>x. \<Union> (set (map (\<lambda>f. f x) \<theta>)))

goal (1 subgoal):
 1. \<sigma> x \<subseteq> \<delta> x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<sigma> x \<subseteq> \<delta> x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bij_int_encode: "bij int_encode"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij int_encode
[PROOF STEP]
by (rule bijI [OF inj_int_encode surj_int_encode])


[STATEMENT]
lemma inversion_involution [simp]:
  shows "inversion (inversion z) = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inversion (inversion z) = z
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inversion (inversion z) = z
[PROOF STEP]
have *: "conjugate \<circ> reciprocal = reciprocal \<circ> conjugate"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjugate \<circ> reciprocal = reciprocal \<circ> conjugate
[PROOF STEP]
using inversion_sym
[PROOF STATE]
proof (prove)
using this:
inversion = reciprocal \<circ> conjugate

goal (1 subgoal):
 1. conjugate \<circ> reciprocal = reciprocal \<circ> conjugate
[PROOF STEP]
by (simp add: inversion_def)
[PROOF STATE]
proof (state)
this:
conjugate \<circ> reciprocal = reciprocal \<circ> conjugate

goal (1 subgoal):
 1. inversion (inversion z) = z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inversion (inversion z) = z
[PROOF STEP]
unfolding inversion_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (conjugate \<circ> reciprocal) ((conjugate \<circ> reciprocal) z) = z
[PROOF STEP]
by (subst *) simp
[PROOF STATE]
proof (state)
this:
inversion (inversion z) = z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hindrance_into_hindrance_by:
  assumes "hindrance \<Gamma> f"
  shows "\<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
hindrance \<Gamma> f

goal (1 subgoal):
 1. \<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>a \<in> A \<Gamma>; a \<notin> \<E>\<^bsub>\<Gamma>\<^esub> (TER\<^bsub>\<Gamma>\<^esub> f); d_OUT f a < weight \<Gamma> a\<rbrakk> \<Longrightarrow> \<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>
[PROOF STEP]
case (hindrance a)
[PROOF STATE]
proof (state)
this:
a \<in> A \<Gamma>
a \<notin> \<E>\<^bsub>\<Gamma>\<^esub> (TER\<^bsub>\<Gamma>\<^esub> f)
d_OUT f a < weight \<Gamma> a

goal (1 subgoal):
 1. \<And>a. \<lbrakk>a \<in> A \<Gamma>; a \<notin> \<E>\<^bsub>\<Gamma>\<^esub> (TER\<^bsub>\<Gamma>\<^esub> f); d_OUT f a < weight \<Gamma> a\<rbrakk> \<Longrightarrow> \<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>
[PROOF STEP]
let ?\<epsilon> = "if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. \<lbrakk>a \<in> A \<Gamma>; a \<notin> \<E>\<^bsub>\<Gamma>\<^esub> (TER\<^bsub>\<Gamma>\<^esub> f); d_OUT f a < weight \<Gamma> a\<rbrakk> \<Longrightarrow> \<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>
[PROOF STEP]
from \<open>d_OUT f a < weight \<Gamma> a\<close>
[PROOF STATE]
proof (chain)
picking this:
d_OUT f a < weight \<Gamma> a
[PROOF STEP]
have "weight \<Gamma> a - d_OUT f a > 0" "weight \<Gamma> a \<noteq> \<top> \<Longrightarrow> weight \<Gamma> a - d_OUT f a < \<top>"
[PROOF STATE]
proof (prove)
using this:
d_OUT f a < weight \<Gamma> a

goal (1 subgoal):
 1. 0 < weight \<Gamma> a - d_OUT f a &&& (weight \<Gamma> a \<noteq> \<top> \<Longrightarrow> weight \<Gamma> a - d_OUT f a < \<top>)
[PROOF STEP]
by(simp_all add: diff_gr0_ennreal less_top diff_less_top_ennreal)
[PROOF STATE]
proof (state)
this:
0 < weight \<Gamma> a - d_OUT f a
weight \<Gamma> a \<noteq> \<top> \<Longrightarrow> weight \<Gamma> a - d_OUT f a < \<top>

goal (1 subgoal):
 1. \<And>a. \<lbrakk>a \<in> A \<Gamma>; a \<notin> \<E>\<^bsub>\<Gamma>\<^esub> (TER\<^bsub>\<Gamma>\<^esub> f); d_OUT f a < weight \<Gamma> a\<rbrakk> \<Longrightarrow> \<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>
[PROOF STEP]
from ennreal_mult_strict_left_mono[of 1 2, OF _ this]
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>1 < 2; weight \<Gamma> a \<noteq> \<top>\<rbrakk> \<Longrightarrow> (weight \<Gamma> a - d_OUT f a) * 1 < (weight \<Gamma> a - d_OUT f a) * 2
[PROOF STEP]
have "0 < ?\<epsilon>" and "?\<epsilon> < weight \<Gamma> a - d_OUT f a"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>1 < 2; weight \<Gamma> a \<noteq> \<top>\<rbrakk> \<Longrightarrow> (weight \<Gamma> a - d_OUT f a) * 1 < (weight \<Gamma> a - d_OUT f a) * 2

goal (1 subgoal):
 1. 0 < (if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2) &&& (if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2) < weight \<Gamma> a - d_OUT f a
[PROOF STEP]
using \<open>d_OUT f a < weight \<Gamma> a\<close>
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>1 < 2; weight \<Gamma> a \<noteq> \<top>\<rbrakk> \<Longrightarrow> (weight \<Gamma> a - d_OUT f a) * 1 < (weight \<Gamma> a - d_OUT f a) * 2
d_OUT f a < weight \<Gamma> a

goal (1 subgoal):
 1. 0 < (if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2) &&& (if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2) < weight \<Gamma> a - d_OUT f a
[PROOF STEP]
by(auto intro!: diff_gr0_ennreal simp: ennreal_zero_less_divide divide_less_ennreal)
[PROOF STATE]
proof (state)
this:
0 < (if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2)
(if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2) < weight \<Gamma> a - d_OUT f a

goal (1 subgoal):
 1. \<And>a. \<lbrakk>a \<in> A \<Gamma>; a \<notin> \<E>\<^bsub>\<Gamma>\<^esub> (TER\<^bsub>\<Gamma>\<^esub> f); d_OUT f a < weight \<Gamma> a\<rbrakk> \<Longrightarrow> \<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>
[PROOF STEP]
with hindrance
[PROOF STATE]
proof (chain)
picking this:
a \<in> A \<Gamma>
a \<notin> \<E>\<^bsub>\<Gamma>\<^esub> (TER\<^bsub>\<Gamma>\<^esub> f)
d_OUT f a < weight \<Gamma> a
0 < (if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2)
(if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2) < weight \<Gamma> a - d_OUT f a
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<Gamma>
a \<notin> \<E>\<^bsub>\<Gamma>\<^esub> (TER\<^bsub>\<Gamma>\<^esub> f)
d_OUT f a < weight \<Gamma> a
0 < (if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2)
(if weight \<Gamma> a = \<top> then 1 else (weight \<Gamma> a - d_OUT f a) / 2) < weight \<Gamma> a - d_OUT f a

goal (1 subgoal):
 1. \<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>
[PROOF STEP]
by(auto intro!: hindrance_by.intros)
[PROOF STATE]
proof (state)
this:
\<exists>\<epsilon>>0. hindrance_by \<Gamma> f \<epsilon>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Meet_equality [elim?]: "is_Inf A inf \<Longrightarrow> \<Sqinter>A = inf"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_Inf A inf \<Longrightarrow> \<Sqinter>A = inf
[PROOF STEP]
proof (unfold Meet_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. is_Inf A inf \<Longrightarrow> The (is_Inf A) = inf
[PROOF STEP]
assume "is_Inf A inf"
[PROOF STATE]
proof (state)
this:
is_Inf A inf

goal (1 subgoal):
 1. is_Inf A inf \<Longrightarrow> The (is_Inf A) = inf
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
is_Inf A inf
[PROOF STEP]
show "(THE inf. is_Inf A inf) = inf"
[PROOF STATE]
proof (prove)
using this:
is_Inf A inf

goal (1 subgoal):
 1. (THE inf. is_Inf A inf) = inf
[PROOF STEP]
by (rule the_equality) (rule is_Inf_uniq [OF _ \<open>is_Inf A inf\<close>])
[PROOF STATE]
proof (state)
this:
(THE inf. is_Inf A inf) = inf

goal:
No subgoals!
[PROOF STEP]
qed