[STATEMENT]
lemma ortho_lin_indpt: assumes W: "W \<subseteq> carrier_vec n"
  and X: "X \<subseteq> carrier_vec n"
  and ortho: "\<And> w x. w \<in> W \<Longrightarrow> x \<in> X \<Longrightarrow> x \<bullet> w = 0"
  and linW: "lin_indpt W"
  and linX: "lin_indpt X"
shows "lin_indpt (W \<union> X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lin_indpt (W \<union> X)
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
assume "\<not>?thesis"
[PROOF STATE]
proof (state)
this:
\<not> lin_indpt (W \<union> X)

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
\<not> lin_indpt (W \<union> X)
[PROOF STEP]
obtain c where zerocomb:"lincomb c (W \<union> X) = 0\<^sub>v n"
    and notallz: "\<exists>v \<in> (W \<union> X). c v \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<not> lin_indpt (W \<union> X)

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>lincomb c (W \<union> X) = 0\<^sub>v n; \<exists>v\<in>W \<union> X. c v \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms fin_dim fin_dim_li_fin finite_lin_indpt2 infinite_Un le_sup_iff
[PROOF STATE]
proof (prove)
using this:
\<not> lin_indpt (W \<union> X)
W \<subseteq> carrier_vec n
X \<subseteq> carrier_vec n
\<lbrakk>?w3 \<in> W; ?x3 \<in> X\<rbrakk> \<Longrightarrow> ?x3 \<bullet> ?w3 = (0::'a)
lin_indpt W
lin_indpt X
fin_dim
\<lbrakk>fin_dim; lin_indpt ?A; ?A \<subseteq> carrier_vec n\<rbrakk> \<Longrightarrow> finite ?A
\<lbrakk>finite ?A; ?A \<subseteq> carrier_vec n; \<And>a. \<lbrakk>True; lincomb a ?A = 0\<^sub>v n\<rbrakk> \<Longrightarrow> \<forall>v\<in>?A. a v = (0::'a)\<rbrakk> \<Longrightarrow> lin_indpt ?A
infinite (?S \<union> ?T) = (infinite ?S \<or> infinite ?T)
(sup ?x ?y \<le> ?z) = (?x \<le> ?z \<and> ?y \<le> ?z)

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>lincomb c (W \<union> X) = 0\<^sub>v n; \<exists>v\<in>W \<union> X. c v \<noteq> (0::'a)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
lincomb c (W \<union> X) = 0\<^sub>v n
\<exists>v\<in>W \<union> X. c v \<noteq> (0::'a)

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
have zero_nin_W: "0\<^sub>v n \<notin> W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0\<^sub>v n \<notin> W
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
W \<subseteq> carrier_vec n
X \<subseteq> carrier_vec n
\<lbrakk>?w3 \<in> W; ?x3 \<in> X\<rbrakk> \<Longrightarrow> ?x3 \<bullet> ?w3 = (0::'a)
lin_indpt W
lin_indpt X

goal (1 subgoal):
 1. 0\<^sub>v n \<notin> W
[PROOF STEP]
by (metis vs_zero_lin_dep)
[PROOF STATE]
proof (state)
this:
0\<^sub>v n \<notin> W

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
have WXinters: "W \<inter> X = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. W \<inter> X = {}
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. W \<inter> X \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
assume "\<not>?thesis"
[PROOF STATE]
proof (state)
this:
W \<inter> X \<noteq> {}

goal (1 subgoal):
 1. W \<inter> X \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
W \<inter> X \<noteq> {}
[PROOF STEP]
obtain v where v: "v\<in> W \<inter> X"
[PROOF STATE]
proof (prove)
using this:
W \<inter> X \<noteq> {}

goal (1 subgoal):
 1. (\<And>v. v \<in> W \<inter> X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
v \<in> W \<inter> X

goal (1 subgoal):
 1. W \<inter> X \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
hence "v\<bullet>v=0"
[PROOF STATE]
proof (prove)
using this:
v \<in> W \<inter> X

goal (1 subgoal):
 1. v \<bullet> v = (0::'a)
[PROOF STEP]
using ortho
[PROOF STATE]
proof (prove)
using this:
v \<in> W \<inter> X
\<lbrakk>?w3 \<in> W; ?x3 \<in> X\<rbrakk> \<Longrightarrow> ?x3 \<bullet> ?w3 = (0::'a)

goal (1 subgoal):
 1. v \<bullet> v = (0::'a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
v \<bullet> v = (0::'a)

goal (1 subgoal):
 1. W \<inter> X \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
v \<bullet> v = (0::'a)

goal (1 subgoal):
 1. W \<inter> X \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
have "v \<in> carrier_vec n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<in> carrier_vec n
[PROOF STEP]
using assms v
[PROOF STATE]
proof (prove)
using this:
W \<subseteq> carrier_vec n
X \<subseteq> carrier_vec n
\<lbrakk>?w3 \<in> W; ?x3 \<in> X\<rbrakk> \<Longrightarrow> ?x3 \<bullet> ?w3 = (0::'a)
lin_indpt W
lin_indpt X
v \<in> W \<inter> X

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

goal (1 subgoal):
 1. W \<inter> X \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
v \<bullet> v = (0::'a)
v \<in> carrier_vec n
[PROOF STEP]
have "v=0\<^sub>v n"
[PROOF STATE]
proof (prove)
using this:
v \<bullet> v = (0::'a)
v \<in> carrier_vec n

goal (1 subgoal):
 1. v = 0\<^sub>v n
[PROOF STEP]
using sq_norm_vec_as_cscalar_prod[of v]
[PROOF STATE]
proof (prove)
using this:
v \<bullet> v = (0::'a)
v \<in> carrier_vec n
\<parallel>v\<parallel>\<^sup>2 = v \<bullet>c v

goal (1 subgoal):
 1. v = 0\<^sub>v n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
v = 0\<^sub>v n

goal (1 subgoal):
 1. W \<inter> X \<noteq> {} \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
v = 0\<^sub>v n
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
v = 0\<^sub>v n

goal (1 subgoal):
 1. False
[PROOF STEP]
using zero_nin_W v
[PROOF STATE]
proof (prove)
using this:
v = 0\<^sub>v n
0\<^sub>v n \<notin> W
v \<in> W \<inter> X

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
W \<inter> X = {}

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
have finX: "finite X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite X
[PROOF STEP]
using X linX
[PROOF STATE]
proof (prove)
using this:
X \<subseteq> carrier_vec n
lin_indpt X

goal (1 subgoal):
 1. finite X
[PROOF STEP]
by (simp add: fin_dim_li_fin)
[PROOF STATE]
proof (state)
this:
finite X

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
have finW: "finite W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite W
[PROOF STEP]
using W linW
[PROOF STATE]
proof (prove)
using this:
W \<subseteq> carrier_vec n
lin_indpt W

goal (1 subgoal):
 1. finite W
[PROOF STEP]
by (simp add: fin_dim_li_fin)
[PROOF STATE]
proof (state)
this:
finite W

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
have split: "lincomb c (W \<union> X) = lincomb c X + lincomb c W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lincomb c (W \<union> X) = lincomb c X + lincomb c W
[PROOF STEP]
using lincomb_union[OF W X WXinters finW finX]
[PROOF STATE]
proof (prove)
using this:
?a \<in> W \<union> X \<rightarrow> UNIV \<Longrightarrow> lincomb ?a (W \<union> X) = lincomb ?a W + lincomb ?a X

goal (1 subgoal):
 1. lincomb c (W \<union> X) = lincomb c X + lincomb c W
[PROOF STEP]
by (simp add: M.add.m_comm W X)
[PROOF STATE]
proof (state)
this:
lincomb c (W \<union> X) = lincomb c X + lincomb c W

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
hence "lincomb c X + lincomb c W  \<in> span X"
[PROOF STATE]
proof (prove)
using this:
lincomb c (W \<union> X) = lincomb c X + lincomb c W

goal (1 subgoal):
 1. lincomb c X + lincomb c W \<in> local.span X
[PROOF STEP]
using zerocomb
[PROOF STATE]
proof (prove)
using this:
lincomb c (W \<union> X) = lincomb c X + lincomb c W
lincomb c (W \<union> X) = 0\<^sub>v n

goal (1 subgoal):
 1. lincomb c X + lincomb c W \<in> local.span X
[PROOF STEP]
using local.span_zero
[PROOF STATE]
proof (prove)
using this:
lincomb c (W \<union> X) = lincomb c X + lincomb c W
lincomb c (W \<union> X) = 0\<^sub>v n
0\<^sub>v n \<in> local.span ?U

goal (1 subgoal):
 1. lincomb c X + lincomb c W \<in> local.span X
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
lincomb c X + lincomb c W \<in> local.span X

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
hence z1: "lincomb c W = 0\<^sub>v n"
[PROOF STATE]
proof (prove)
using this:
lincomb c X + lincomb c W \<in> local.span X

goal (1 subgoal):
 1. lincomb c W = 0\<^sub>v n
[PROOF STEP]
using ortho_sum_in_span[OF W X ortho]
[PROOF STATE]
proof (prove)
using this:
lincomb c X + lincomb c W \<in> local.span X
\<lbrakk>\<And>w x. \<lbrakk>w \<in> W; x \<in> X\<rbrakk> \<Longrightarrow> w \<in> W; \<And>w x. \<lbrakk>w \<in> W; x \<in> X\<rbrakk> \<Longrightarrow> x \<in> X; lincomb ?l1.0 X + lincomb ?l2.0 W \<in> local.span X\<rbrakk> \<Longrightarrow> lincomb ?l2.0 W = 0\<^sub>v n

goal (1 subgoal):
 1. lincomb c W = 0\<^sub>v n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lincomb c W = 0\<^sub>v n

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
hence z2: "lincomb c X = 0\<^sub>v n"
[PROOF STATE]
proof (prove)
using this:
lincomb c W = 0\<^sub>v n

goal (1 subgoal):
 1. lincomb c X = 0\<^sub>v n
[PROOF STEP]
using split zerocomb X
[PROOF STATE]
proof (prove)
using this:
lincomb c W = 0\<^sub>v n
lincomb c (W \<union> X) = lincomb c X + lincomb c W
lincomb c (W \<union> X) = 0\<^sub>v n
X \<subseteq> carrier_vec n

goal (1 subgoal):
 1. lincomb c X = 0\<^sub>v n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lincomb c X = 0\<^sub>v n

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
have or: "(\<exists>v \<in> W. c v \<noteq> 0) \<or> (\<exists> v\<in> X. c v \<noteq> 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>v\<in>W. c v \<noteq> (0::'a)) \<or> (\<exists>v\<in>X. c v \<noteq> (0::'a))
[PROOF STEP]
using notallz
[PROOF STATE]
proof (prove)
using this:
\<exists>v\<in>W \<union> X. c v \<noteq> (0::'a)

goal (1 subgoal):
 1. (\<exists>v\<in>W. c v \<noteq> (0::'a)) \<or> (\<exists>v\<in>X. c v \<noteq> (0::'a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<exists>v\<in>W. c v \<noteq> (0::'a)) \<or> (\<exists>v\<in>X. c v \<noteq> (0::'a))

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
have ex1: "\<exists>v \<in> W. c v \<noteq> 0 \<Longrightarrow> False"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>v\<in>W. c v \<noteq> (0::'a) \<Longrightarrow> False
[PROOF STEP]
using linW
[PROOF STATE]
proof (prove)
using this:
lin_indpt W

goal (1 subgoal):
 1. \<exists>v\<in>W. c v \<noteq> (0::'a) \<Longrightarrow> False
[PROOF STEP]
using finW lin_dep_def z1
[PROOF STATE]
proof (prove)
using this:
lin_indpt W
finite W
lin_dep ?S = (\<exists>A a v. finite A \<and> A \<subseteq> ?S \<and> True \<and> lincomb a A = 0\<^sub>v n \<and> v \<in> A \<and> a v \<noteq> (0::'a))
lincomb c W = 0\<^sub>v n

goal (1 subgoal):
 1. \<exists>v\<in>W. c v \<noteq> (0::'a) \<Longrightarrow> False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>v\<in>W. c v \<noteq> (0::'a) \<Longrightarrow> False

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
have ex2: "\<exists> v\<in> X. c v \<noteq> 0 \<Longrightarrow> False"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>v\<in>X. c v \<noteq> (0::'a) \<Longrightarrow> False
[PROOF STEP]
using linX
[PROOF STATE]
proof (prove)
using this:
lin_indpt X

goal (1 subgoal):
 1. \<exists>v\<in>X. c v \<noteq> (0::'a) \<Longrightarrow> False
[PROOF STEP]
using finX lin_dep_def z2
[PROOF STATE]
proof (prove)
using this:
lin_indpt X
finite X
lin_dep ?S = (\<exists>A a v. finite A \<and> A \<subseteq> ?S \<and> True \<and> lincomb a A = 0\<^sub>v n \<and> v \<in> A \<and> a v \<noteq> (0::'a))
lincomb c X = 0\<^sub>v n

goal (1 subgoal):
 1. \<exists>v\<in>X. c v \<noteq> (0::'a) \<Longrightarrow> False
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>v\<in>X. c v \<noteq> (0::'a) \<Longrightarrow> False

goal (1 subgoal):
 1. \<not> lin_indpt (W \<union> X) \<Longrightarrow> False
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. False
[PROOF STEP]
using ex1 ex2 or
[PROOF STATE]
proof (prove)
using this:
\<exists>v\<in>W. c v \<noteq> (0::'a) \<Longrightarrow> False
\<exists>v\<in>X. c v \<noteq> (0::'a) \<Longrightarrow> False
(\<exists>v\<in>W. c v \<noteq> (0::'a)) \<or> (\<exists>v\<in>X. c v \<noteq> (0::'a))

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma transversal_segment_reverse:
  assumes "transversal_segment x y"
  shows "transversal_segment y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. transversal_segment y x
[PROOF STEP]
unfolding transversal_segment_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<noteq> x \<and> {y--x} \<subseteq> X \<and> (\<forall>z\<in>{y--x}. f z \<bullet> rot (y - x) \<noteq> 0)
[PROOF STEP]
by (metis (no_types, opaque_lifting) add.left_neutral add_uminus_conv_diff assms closed_segment_commute inner_diff_left inner_zero_left nrm_reverse transversal_segment_def)


[STATEMENT]
lemma extract_matrix_flatten_matrix_cong:
  assumes "\<And>x. x < dim_row A * dim_col A \<Longrightarrow> f x = flatten_matrix A x"
  shows "extract_matrix f (dim_row A) (dim_col A) = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. extract_matrix f (dim_row A) (dim_col A) = A
[PROOF STEP]
unfolding extract_matrix_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat (dim_row A) (dim_col A) (\<lambda>(i, j). f (i * dim_col A + j)) = A
[PROOF STEP]
by (metis assms extract_matrix_cong extract_matrix_def extract_matrix_flatten_matrix)


[STATEMENT]
lemma path_seg_butlast:
  "p\<noteq>[] \<Longrightarrow> path_seg p 0 (length p - Suc 0) = \<Union>(set (butlast p))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<noteq> [] \<Longrightarrow> path_seg p 0 (length p - Suc 0) = \<Union> (set (butlast p))
[PROOF STEP]
apply (cases p rule: rev_cases, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>ys y. \<lbrakk>p \<noteq> []; p = ys @ [y]\<rbrakk> \<Longrightarrow> path_seg p 0 (length p - Suc 0) = \<Union> (set (butlast p))
[PROOF STEP]
apply (fastforce simp: path_seg_def nth_append in_set_conv_nth)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma add_env_semantics [simp]: \<open>\<lparr>E, F\<rparr> ((t \<Zsemi> s) n) = (\<lparr>E, F\<rparr> t \<Zsemi> \<lambda>m. \<lparr>E, F\<rparr> (s m)) n\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lparr>E, F\<rparr> ((t \<Zsemi> s) n) = (\<lparr>E, F\<rparr> t \<Zsemi> \<lambda>m. \<lparr>E, F\<rparr> (s m)) n
[PROOF STEP]
by (induct n) simp_all


[STATEMENT]
lemma continuous_closed_imp_quotient_map:
  assumes "continuous_map X X' f" and om: "closed_map X X' f" and feq: "f ` (topspace X) = topspace X'"
  shows "quotient_map X X' f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. quotient_map X X' f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. quotient_map X X' f
[PROOF STEP]
have "f ` {x \<in> topspace X. f x \<in> U} = U" if "U \<subseteq> topspace X'" for U
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` {x \<in> topspace X. f x \<in> U} = U
[PROOF STEP]
using that feq
[PROOF STATE]
proof (prove)
using this:
U \<subseteq> topspace X'
f ` topspace X = topspace X'

goal (1 subgoal):
 1. f ` {x \<in> topspace X. f x \<in> U} = U
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?U \<subseteq> topspace X' \<Longrightarrow> f ` {x \<in> topspace X. f x \<in> ?U} = ?U

goal (1 subgoal):
 1. quotient_map X X' f
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
continuous_map X X' f
closed_map X X' f
f ` topspace X = topspace X'
?U \<subseteq> topspace X' \<Longrightarrow> f ` {x \<in> topspace X. f x \<in> ?U} = ?U
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
continuous_map X X' f
closed_map X X' f
f ` topspace X = topspace X'
?U \<subseteq> topspace X' \<Longrightarrow> f ` {x \<in> topspace X. f x \<in> ?U} = ?U

goal (1 subgoal):
 1. quotient_map X X' f
[PROOF STEP]
unfolding quotient_map_closedin closed_map_def continuous_map_closedin
[PROOF STATE]
proof (prove)
using this:
(\<forall>x\<in>topspace X. f x \<in> topspace X') \<and> (\<forall>C. closedin X' C \<longrightarrow> closedin X {x \<in> topspace X. f x \<in> C})
\<forall>U. closedin X U \<longrightarrow> closedin X' (f ` U)
f ` topspace X = topspace X'
?U \<subseteq> topspace X' \<Longrightarrow> f ` {x \<in> topspace X. f x \<in> ?U} = ?U

goal (1 subgoal):
 1. f ` topspace X = topspace X' \<and> (\<forall>U\<subseteq>topspace X'. closedin X {x \<in> topspace X. f x \<in> U} = closedin X' U)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
quotient_map X X' f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_fps_expansion_cmult_left [fps_expansion_intros]:
  fixes c :: "'a :: {banach, real_normed_div_algebra, comm_ring_1}"
  assumes "f has_fps_expansion F"
  shows   "(\<lambda>x. c * f x) has_fps_expansion fps_const c * F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
[PROOF STEP]
proof (cases "c = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. c = (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
 2. c \<noteq> (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
c \<noteq> (0::'a)

goal (2 subgoals):
 1. c = (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
 2. c \<noteq> (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
f has_fps_expansion F
[PROOF STEP]
have "eventually (\<lambda>z. z \<in> eball 0 (fps_conv_radius F)) (nhds 0)"
[PROOF STATE]
proof (prove)
using this:
f has_fps_expansion F

goal (1 subgoal):
 1. \<forall>\<^sub>F z in nhds (0::'b). z \<in> eball (0::'b) (fps_conv_radius F)
[PROOF STEP]
by (intro eventually_nhds_in_open) (auto simp: has_fps_expansion_def zero_ereal_def)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F z in nhds (0::?'b1). z \<in> eball (0::?'b1) (fps_conv_radius F)

goal (2 subgoals):
 1. c = (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
 2. c \<noteq> (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F z in nhds (0::?'b1). z \<in> eball (0::?'b1) (fps_conv_radius F)

goal (2 subgoals):
 1. c = (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
 2. c \<noteq> (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
f has_fps_expansion F
[PROOF STEP]
have "eventually (\<lambda>z. eval_fps F z = f z) (nhds 0)"
[PROOF STATE]
proof (prove)
using this:
f has_fps_expansion F

goal (1 subgoal):
 1. \<forall>\<^sub>F z in nhds (0::'a). eval_fps F z = f z
[PROOF STEP]
by (auto simp: has_fps_expansion_def)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F z in nhds (0::'a). eval_fps F z = f z

goal (2 subgoals):
 1. c = (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
 2. c \<noteq> (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F z in nhds (0::?'b1). z \<in> eball (0::?'b1) (fps_conv_radius F)
\<forall>\<^sub>F z in nhds (0::'a). eval_fps F z = f z
[PROOF STEP]
have "eventually (\<lambda>z. eval_fps (fps_const c * F) z = c * f z) (nhds 0)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F z in nhds (0::?'b1). z \<in> eball (0::?'b1) (fps_conv_radius F)
\<forall>\<^sub>F z in nhds (0::'a). eval_fps F z = f z

goal (1 subgoal):
 1. \<forall>\<^sub>F z in nhds (0::'a). eval_fps (fps_const c * F) z = c * f z
[PROOF STEP]
by eventually_elim (simp_all add: eval_fps_mult)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F z in nhds (0::'a). eval_fps (fps_const c * F) z = c * f z

goal (2 subgoals):
 1. c = (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
 2. c \<noteq> (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
[PROOF STEP]
with assms and False
[PROOF STATE]
proof (chain)
picking this:
f has_fps_expansion F
c \<noteq> (0::'a)
\<forall>\<^sub>F z in nhds (0::'a). eval_fps (fps_const c * F) z = c * f z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
f has_fps_expansion F
c \<noteq> (0::'a)
\<forall>\<^sub>F z in nhds (0::'a). eval_fps (fps_const c * F) z = c * f z

goal (1 subgoal):
 1. (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
[PROOF STEP]
by (auto simp: has_fps_expansion_def fps_conv_radius_cmult_left)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. c * f x) has_fps_expansion fps_const c * F

goal (1 subgoal):
 1. c = (0::'a) \<Longrightarrow> (\<lambda>x. c * f x) has_fps_expansion fps_const c * F
[PROOF STEP]
qed auto


[STATEMENT]
lemma Inf_notin_open:
  assumes A: "open A"
    and bnd: "\<forall>a\<in>A. x < a"
  shows "Inf A \<notin> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf A \<notin> A
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Inf A \<in> A \<Longrightarrow> False
[PROOF STEP]
assume "Inf A \<in> A"
[PROOF STATE]
proof (state)
this:
Inf A \<in> A

goal (1 subgoal):
 1. Inf A \<in> A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Inf A \<in> A
[PROOF STEP]
obtain b where "b < Inf A" "{b <.. Inf A} \<subseteq> A"
[PROOF STATE]
proof (prove)
using this:
Inf A \<in> A

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b < Inf A; {b<..Inf A} \<subseteq> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using open_left[of A "Inf A" x] assms
[PROOF STATE]
proof (prove)
using this:
Inf A \<in> A
\<lbrakk>open A; Inf A \<in> A; x < Inf A\<rbrakk> \<Longrightarrow> \<exists>b<Inf A. {b<..Inf A} \<subseteq> A
open A
\<forall>a\<in>A. x < a

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b < Inf A; {b<..Inf A} \<subseteq> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
b < Inf A
{b<..Inf A} \<subseteq> A

goal (1 subgoal):
 1. Inf A \<in> A \<Longrightarrow> False
[PROOF STEP]
with dense[of b "Inf A"]
[PROOF STATE]
proof (chain)
picking this:
b < Inf A \<Longrightarrow> \<exists>z>b. z < Inf A
b < Inf A
{b<..Inf A} \<subseteq> A
[PROOF STEP]
obtain c where "c < Inf A" "c \<in> A"
[PROOF STATE]
proof (prove)
using this:
b < Inf A \<Longrightarrow> \<exists>z>b. z < Inf A
b < Inf A
{b<..Inf A} \<subseteq> A

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>c < Inf A; c \<in> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: subset_eq)
[PROOF STATE]
proof (state)
this:
c < Inf A
c \<in> A

goal (1 subgoal):
 1. Inf A \<in> A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
c < Inf A
c \<in> A
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
c < Inf A
c \<in> A

goal (1 subgoal):
 1. False
[PROOF STEP]
using cInf_lower[OF \<open>c \<in> A\<close>] bnd
[PROOF STATE]
proof (prove)
using this:
c < Inf A
c \<in> A
bdd_below A \<Longrightarrow> Inf A \<le> c
\<forall>a\<in>A. x < a

goal (1 subgoal):
 1. False
[PROOF STEP]
by (metis not_le less_imp_le bdd_belowI)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sin_of_real: "sin (of_real x) = of_real (sin x)"
  for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sin (of_real x) = of_real (sin x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sin (of_real x) = of_real (sin x)
[PROOF STEP]
have "(\<lambda>n. of_real (sin_coeff n *\<^sub>R  x^n)) = (\<lambda>n. sin_coeff n *\<^sub>R  (of_real x)^n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) = (\<lambda>n. sin_coeff n *\<^sub>R of_real x ^ n)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. of_real (sin_coeff n *\<^sub>R x ^ n) = sin_coeff n *\<^sub>R of_real x ^ n
[PROOF STEP]
show "of_real (sin_coeff n *\<^sub>R  x^n) = sin_coeff n *\<^sub>R of_real x^n" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_real (sin_coeff n *\<^sub>R x ^ n) = sin_coeff n *\<^sub>R of_real x ^ n
[PROOF STEP]
by (simp add: scaleR_conv_of_real)
[PROOF STATE]
proof (state)
this:
of_real (sin_coeff ?n1 *\<^sub>R x ^ ?n1) = sin_coeff ?n1 *\<^sub>R of_real x ^ ?n1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) = (\<lambda>n. sin_coeff n *\<^sub>R of_real x ^ n)

goal (1 subgoal):
 1. sin (of_real x) = of_real (sin x)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) = (\<lambda>n. sin_coeff n *\<^sub>R of_real x ^ n)

goal (1 subgoal):
 1. sin (of_real x) = of_real (sin x)
[PROOF STEP]
have "\<dots> sums (sin (of_real x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. sin_coeff n *\<^sub>R of_real x ^ n) sums sin (of_real x)
[PROOF STEP]
by (rule sin_converges)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. sin_coeff n *\<^sub>R of_real x ^ n) sums sin (of_real x)

goal (1 subgoal):
 1. sin (of_real x) = of_real (sin x)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) sums sin (of_real x)
[PROOF STEP]
have "(\<lambda>n. of_real (sin_coeff n *\<^sub>R x^n)) sums (sin (of_real x))"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) sums sin (of_real x)

goal (1 subgoal):
 1. (\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) sums sin (of_real x)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) sums sin (of_real x)

goal (1 subgoal):
 1. sin (of_real x) = of_real (sin x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) sums sin (of_real x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) sums sin (of_real x)

goal (1 subgoal):
 1. sin (of_real x) = of_real (sin x)
[PROOF STEP]
using sums_unique2 sums_of_real [OF sin_converges]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. of_real (sin_coeff n *\<^sub>R x ^ n)) sums sin (of_real x)
\<lbrakk>?f sums ?a; ?f sums ?b\<rbrakk> \<Longrightarrow> ?a = ?b
(\<lambda>n. of_real (sin_coeff n *\<^sub>R ?x1 ^ n)) sums of_real (sin ?x1)

goal (1 subgoal):
 1. sin (of_real x) = of_real (sin x)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
sin (of_real x) = of_real (sin x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma col_add[simp]:
  "A \<in> carrier_mat nr nc \<Longrightarrow> B \<in> carrier_mat nr nc \<Longrightarrow> j < nc
  \<Longrightarrow> col (A + B) j = col A j + col B j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<in> carrier_mat nr nc; B \<in> carrier_mat nr nc; j < nc\<rbrakk> \<Longrightarrow> col (A + B) j = col A j + col B j
[PROOF STEP]
by (rule eq_vecI, auto)


[STATEMENT]
lemma plus_cont: "f \<in> bfun \<Longrightarrow> g \<in> bfun \<Longrightarrow> (\<lambda>x. f x + g x) \<in> bfun" for f g::"'a \<Rightarrow> 'b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> bfun; g \<in> bfun\<rbrakk> \<Longrightarrow> (\<lambda>x. f x + g x) \<in> bfun
[PROOF STEP]
by (auto simp: bfun_def bounded_plus_comp)


[STATEMENT]
lemma fdomain_mono:
  assumes "r \<subseteq>\<^sub>\<circ> s"
  shows "\<D>\<^sub>\<bullet> r \<subseteq>\<^sub>\<circ> \<D>\<^sub>\<bullet> s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<bullet> r \<subseteq>\<^sub>\<circ> \<D>\<^sub>\<bullet> s
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
r \<subseteq>\<^sub>\<circ> s

goal (1 subgoal):
 1. \<D>\<^sub>\<bullet> r \<subseteq>\<^sub>\<circ> \<D>\<^sub>\<bullet> s
[PROOF STEP]
by blast


[STATEMENT]
lemma complement_part: "\<not> O x y \<Longrightarrow> P x (\<midarrow>y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> O x y \<Longrightarrow> P x (\<midarrow> y)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> O x y \<Longrightarrow> P x (\<midarrow> y)
[PROOF STEP]
assume "\<not> O x y"
[PROOF STATE]
proof (state)
this:
\<not> O x y

goal (1 subgoal):
 1. \<not> O x y \<Longrightarrow> P x (\<midarrow> y)
[PROOF STEP]
hence "\<exists>z. \<not> O z y"
[PROOF STATE]
proof (prove)
using this:
\<not> O x y

goal (1 subgoal):
 1. \<exists>z. \<not> O z y
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>z. \<not> O z y

goal (1 subgoal):
 1. \<not> O x y \<Longrightarrow> P x (\<midarrow> y)
[PROOF STEP]
hence "\<forall>w. P w (\<midarrow>y) \<longleftrightarrow> \<not> O w y"
[PROOF STATE]
proof (prove)
using this:
\<exists>z. \<not> O z y

goal (1 subgoal):
 1. \<forall>w. P w (\<midarrow> y) = (\<not> O w y)
[PROOF STEP]
by (rule complement_character)
[PROOF STATE]
proof (state)
this:
\<forall>w. P w (\<midarrow> y) = (\<not> O w y)

goal (1 subgoal):
 1. \<not> O x y \<Longrightarrow> P x (\<midarrow> y)
[PROOF STEP]
hence "P x (\<midarrow>y) \<longleftrightarrow> \<not> O x y"
[PROOF STATE]
proof (prove)
using this:
\<forall>w. P w (\<midarrow> y) = (\<not> O w y)

goal (1 subgoal):
 1. P x (\<midarrow> y) = (\<not> O x y)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
P x (\<midarrow> y) = (\<not> O x y)

goal (1 subgoal):
 1. \<not> O x y \<Longrightarrow> P x (\<midarrow> y)
[PROOF STEP]
thus "P x (\<midarrow>y)"
[PROOF STATE]
proof (prove)
using this:
P x (\<midarrow> y) = (\<not> O x y)

goal (1 subgoal):
 1. P x (\<midarrow> y)
[PROOF STEP]
using \<open>\<not> O x y\<close>
[PROOF STATE]
proof (prove)
using this:
P x (\<midarrow> y) = (\<not> O x y)
\<not> O x y

goal (1 subgoal):
 1. P x (\<midarrow> y)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
P x (\<midarrow> y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma card_length: "card (set xs) \<le> length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (set xs) \<le> length xs
[PROOF STEP]
by (induct xs) (auto simp add: card_insert_if)


[STATEMENT]
lemma satisfies_bounds_iff:
  "v \<Turnstile>\<^sub>b (lb, ub) \<longleftrightarrow> (\<forall> x. v x \<ge>\<^sub>l\<^sub>b lb x \<and> v x \<le>\<^sub>u\<^sub>b ub x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<Turnstile>\<^sub>b (lb, ub) = (\<forall>x. v x \<ge>\<^sub>l\<^sub>b lb x \<and> v x \<le>\<^sub>u\<^sub>b ub x)
[PROOF STEP]
by (auto simp add: satisfies_bounds.simps)


[STATEMENT]
lemma (in module) finite_lin_indpt2:
  fixes A
  assumes A_fin: "finite A" and AinC: "A\<subseteq>carrier M" and
    lc0: "\<And>a. a\<in> (A\<rightarrow>carrier R) \<Longrightarrow> (lincomb a A = \<zero>\<^bsub>M\<^esub>) \<Longrightarrow> (\<forall> v\<in>A. a v= \<zero>\<^bsub>R\<^esub>)"
  shows "lin_indpt A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lin_indpt A
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> lin_indpt A \<Longrightarrow> False
[PROOF STEP]
assume "\<not>lin_indpt A"
[PROOF STATE]
proof (state)
this:
\<not> lin_indpt A

goal (1 subgoal):
 1. \<not> lin_indpt A \<Longrightarrow> False
[PROOF STEP]
from A_fin AinC this
[PROOF STATE]
proof (chain)
picking this:
finite A
A \<subseteq> carrier M
\<not> lin_indpt A
[PROOF STEP]
obtain a v where av:
    "(a\<in> (A\<rightarrow>carrier R)) \<and> (lincomb a A = \<zero>\<^bsub>M\<^esub>) \<and> (v\<in>A) \<and> (a v\<noteq> \<zero>\<^bsub>R\<^esub>)"
[PROOF STATE]
proof (prove)
using this:
finite A
A \<subseteq> carrier M
\<not> lin_indpt A

goal (1 subgoal):
 1. (\<And>a v. a \<in> A \<rightarrow> carrier R \<and> lincomb a A = \<zero>\<^bsub>M\<^esub> \<and> v \<in> A \<and> a v \<noteq> \<zero> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis finite_lin_dep)
[PROOF STATE]
proof (state)
this:
a \<in> A \<rightarrow> carrier R \<and> lincomb a A = \<zero>\<^bsub>M\<^esub> \<and> v \<in> A \<and> a v \<noteq> \<zero>

goal (1 subgoal):
 1. \<not> lin_indpt A \<Longrightarrow> False
[PROOF STEP]
from av lc0
[PROOF STATE]
proof (chain)
picking this:
a \<in> A \<rightarrow> carrier R \<and> lincomb a A = \<zero>\<^bsub>M\<^esub> \<and> v \<in> A \<and> a v \<noteq> \<zero>
\<lbrakk>?a \<in> A \<rightarrow> carrier R; lincomb ?a A = \<zero>\<^bsub>M\<^esub>\<rbrakk> \<Longrightarrow> \<forall>v\<in>A. ?a v = \<zero>
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
a \<in> A \<rightarrow> carrier R \<and> lincomb a A = \<zero>\<^bsub>M\<^esub> \<and> v \<in> A \<and> a v \<noteq> \<zero>
\<lbrakk>?a \<in> A \<rightarrow> carrier R; lincomb ?a A = \<zero>\<^bsub>M\<^esub>\<rbrakk> \<Longrightarrow> \<forall>v\<in>A. ?a v = \<zero>

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma frange_small[simp]: "small {b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. small {b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. small {b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
have ss: "{b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r} \<subseteq> (\<lambda>x. x\<lparr>1\<^sub>\<nat>\<rparr>) ` elts r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r} \<subseteq> (\<lambda>x. x\<lparr>1\<^sub>\<nat>\<rparr>) ` elts r
[PROOF STEP]
using image_iff
[PROOF STATE]
proof (prove)
using this:
(?z \<in> ?f ` ?A) = (\<exists>x\<in>?A. ?z = ?f x)

goal (1 subgoal):
 1. {b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r} \<subseteq> (\<lambda>x. x\<lparr>1\<^sub>\<nat>\<rparr>) ` elts r
[PROOF STEP]
by (fastforce simp: nat_omega_simps)
[PROOF STATE]
proof (state)
this:
{b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r} \<subseteq> (\<lambda>x. x\<lparr>1\<^sub>\<nat>\<rparr>) ` elts r

goal (1 subgoal):
 1. small {b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
have small: "small ((\<lambda>x. x\<lparr>1\<^sub>\<nat>\<rparr>) ` elts r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. small ((\<lambda>x. x\<lparr>1\<^sub>\<nat>\<rparr>) ` elts r)
[PROOF STEP]
by (rule replacement) simp
[PROOF STATE]
proof (state)
this:
small ((\<lambda>x. x\<lparr>1\<^sub>\<nat>\<rparr>) ` elts r)

goal (1 subgoal):
 1. small {b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. small {b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}
[PROOF STEP]
by (rule smaller_than_small, rule small, rule ss)
[PROOF STATE]
proof (state)
this:
small {b. \<exists>a. [a, b]\<^sub>\<circ> \<in>\<^sub>\<circ> r}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma behead_isnpolyh:
  assumes "isnpolyh p n"
  shows "isnpolyh (behead p) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isnpolyh (behead p) n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
isnpolyh p n

goal (1 subgoal):
 1. isnpolyh (behead p) n
[PROOF STEP]
by (induct p rule: behead.induct) (auto simp add: Let_def isnpolyh_mono)


[STATEMENT]
lemma powser_sums_if:
  "(\<lambda>n. (if n = m then (1 :: 'a::{ring_1,topological_space}) else 0) * z^n) sums z^m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (if n = m then 1::'a else (0::'a)) * z ^ n) sums z ^ m
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. (if n = m then 1::'a else (0::'a)) * z ^ n) sums z ^ m
[PROOF STEP]
have "(\<lambda>n. (if n = m then 1 else 0) * z^n) = (\<lambda>n. if n = m then z^n else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (if n = m then 1::'a else (0::'a)) * z ^ n) = (\<lambda>n. if n = m then z ^ n else (0::'a))
[PROOF STEP]
by (intro ext) auto
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (if n = m then 1::'a else (0::'a)) * z ^ n) = (\<lambda>n. if n = m then z ^ n else (0::'a))

goal (1 subgoal):
 1. (\<lambda>n. (if n = m then 1::'a else (0::'a)) * z ^ n) sums z ^ m
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. (if n = m then 1::'a else (0::'a)) * z ^ n) = (\<lambda>n. if n = m then z ^ n else (0::'a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. (if n = m then 1::'a else (0::'a)) * z ^ n) = (\<lambda>n. if n = m then z ^ n else (0::'a))

goal (1 subgoal):
 1. (\<lambda>n. (if n = m then 1::'a else (0::'a)) * z ^ n) sums z ^ m
[PROOF STEP]
by (simp add: sums_single)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (if n = m then 1::'a else (0::'a)) * z ^ n) sums z ^ m

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Gamma_seriesI':
  assumes "f \<longlonglongrightarrow> rGamma z"
  assumes "(\<lambda>n. g n * f n) \<longlonglongrightarrow> 1"
  assumes "z \<notin> \<int>\<^sub>\<le>\<^sub>0"
  shows   "g \<longlonglongrightarrow> Gamma z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g \<longlonglongrightarrow> Gamma z
[PROOF STEP]
proof (rule Lim_transform_eventually)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?f \<longlonglongrightarrow> Gamma z
 2. \<forall>\<^sub>F x in sequentially. ?f x = g x
[PROOF STEP]
have "1/2 > (0::real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < 1 / 2
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 < 1 / 2

goal (2 subgoals):
 1. ?f \<longlonglongrightarrow> Gamma z
 2. \<forall>\<^sub>F x in sequentially. ?f x = g x
[PROOF STEP]
from tendstoD[OF assms(2), OF this]
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in sequentially. dist (g x * f x) (1::'a) < 1 / 2
[PROOF STEP]
show "eventually (\<lambda>n. g n * f n / f n = g n) sequentially"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in sequentially. dist (g x * f x) (1::'a) < 1 / 2

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. g n * f n / f n = g n
[PROOF STEP]
by (force elim!: eventually_mono simp: dist_real_def)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. g n * f n / f n = g n

goal (1 subgoal):
 1. (\<lambda>n. g n * f n / f n) \<longlonglongrightarrow> Gamma z
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
f \<longlonglongrightarrow> rGamma z
(\<lambda>n. g n * f n) \<longlonglongrightarrow> (1::'a)
z \<notin> \<int>\<^sub>\<le>\<^sub>0
[PROOF STEP]
have "(\<lambda>n. g n * f n / f n) \<longlonglongrightarrow> 1 / rGamma z"
[PROOF STATE]
proof (prove)
using this:
f \<longlonglongrightarrow> rGamma z
(\<lambda>n. g n * f n) \<longlonglongrightarrow> (1::'a)
z \<notin> \<int>\<^sub>\<le>\<^sub>0

goal (1 subgoal):
 1. (\<lambda>n. g n * f n / f n) \<longlonglongrightarrow> (1::'a) / rGamma z
[PROOF STEP]
by (intro tendsto_divide assms) (simp_all add: rGamma_eq_zero_iff)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. g n * f n / f n) \<longlonglongrightarrow> (1::'a) / rGamma z

goal (1 subgoal):
 1. (\<lambda>n. g n * f n / f n) \<longlonglongrightarrow> Gamma z
[PROOF STEP]
thus "(\<lambda>n. g n * f n / f n) \<longlonglongrightarrow> Gamma z"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. g n * f n / f n) \<longlonglongrightarrow> (1::'a) / rGamma z

goal (1 subgoal):
 1. (\<lambda>n. g n * f n / f n) \<longlonglongrightarrow> Gamma z
[PROOF STEP]
by (simp add: Gamma_def divide_inverse)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. g n * f n / f n) \<longlonglongrightarrow> Gamma z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma non_sym_dist_pairs'_elems_non_refl :
  assumes "distinct xs"
  and     "(x,y) \<in> set (non_sym_dist_pairs' xs)"
shows "(y,x) \<notin> set (non_sym_dist_pairs' xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y, x) \<notin> set (non_sym_dist_pairs' xs)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
distinct xs
(x, y) \<in> set (non_sym_dist_pairs' xs)

goal (1 subgoal):
 1. (y, x) \<notin> set (non_sym_dist_pairs' xs)
[PROOF STEP]
proof (induction xs arbitrary: x y)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x y. \<lbrakk>distinct []; (x, y) \<in> set (non_sym_dist_pairs' [])\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' [])
 2. \<And>a xs x y. \<lbrakk>\<And>x y. \<lbrakk>distinct xs; (x, y) \<in> set (non_sym_dist_pairs' xs)\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' xs); distinct (a # xs); (x, y) \<in> set (non_sym_dist_pairs' (a # xs))\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (a # xs))
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
distinct []
(x, y) \<in> set (non_sym_dist_pairs' [])

goal (2 subgoals):
 1. \<And>x y. \<lbrakk>distinct []; (x, y) \<in> set (non_sym_dist_pairs' [])\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' [])
 2. \<And>a xs x y. \<lbrakk>\<And>x y. \<lbrakk>distinct xs; (x, y) \<in> set (non_sym_dist_pairs' xs)\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' xs); distinct (a # xs); (x, y) \<in> set (non_sym_dist_pairs' (a # xs))\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (a # xs))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
distinct []
(x, y) \<in> set (non_sym_dist_pairs' [])
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
distinct []
(x, y) \<in> set (non_sym_dist_pairs' [])

goal (1 subgoal):
 1. (y, x) \<notin> set (non_sym_dist_pairs' [])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(y, x) \<notin> set (non_sym_dist_pairs' [])

goal (1 subgoal):
 1. \<And>a xs x y. \<lbrakk>\<And>x y. \<lbrakk>distinct xs; (x, y) \<in> set (non_sym_dist_pairs' xs)\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' xs); distinct (a # xs); (x, y) \<in> set (non_sym_dist_pairs' (a # xs))\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (a # xs))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a xs x y. \<lbrakk>\<And>x y. \<lbrakk>distinct xs; (x, y) \<in> set (non_sym_dist_pairs' xs)\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' xs); distinct (a # xs); (x, y) \<in> set (non_sym_dist_pairs' (a # xs))\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (a # xs))
[PROOF STEP]
case (Cons z zs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>distinct zs; (?x, ?y) \<in> set (non_sym_dist_pairs' zs)\<rbrakk> \<Longrightarrow> (?y, ?x) \<notin> set (non_sym_dist_pairs' zs)
distinct (z # zs)
(x, y) \<in> set (non_sym_dist_pairs' (z # zs))

goal (1 subgoal):
 1. \<And>a xs x y. \<lbrakk>\<And>x y. \<lbrakk>distinct xs; (x, y) \<in> set (non_sym_dist_pairs' xs)\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' xs); distinct (a # xs); (x, y) \<in> set (non_sym_dist_pairs' (a # xs))\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (a # xs))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>distinct zs; (?x, ?y) \<in> set (non_sym_dist_pairs' zs)\<rbrakk> \<Longrightarrow> (?y, ?x) \<notin> set (non_sym_dist_pairs' zs)
distinct (z # zs)
(x, y) \<in> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
have "distinct zs"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>distinct zs; (?x, ?y) \<in> set (non_sym_dist_pairs' zs)\<rbrakk> \<Longrightarrow> (?y, ?x) \<notin> set (non_sym_dist_pairs' zs)
distinct (z # zs)
(x, y) \<in> set (non_sym_dist_pairs' (z # zs))

goal (1 subgoal):
 1. distinct zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
distinct zs

goal (1 subgoal):
 1. \<And>a xs x y. \<lbrakk>\<And>x y. \<lbrakk>distinct xs; (x, y) \<in> set (non_sym_dist_pairs' xs)\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' xs); distinct (a # xs); (x, y) \<in> set (non_sym_dist_pairs' (a # xs))\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (a # xs))
[PROOF STEP]
have "x \<noteq> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<noteq> y
[PROOF STEP]
using non_sym_dist_pairs'_elems_distinct[OF Cons.prems]
[PROOF STATE]
proof (prove)
using this:
x \<in> set (z # zs)
y \<in> set (z # zs)
x \<noteq> y

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

goal (1 subgoal):
 1. \<And>a xs x y. \<lbrakk>\<And>x y. \<lbrakk>distinct xs; (x, y) \<in> set (non_sym_dist_pairs' xs)\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' xs); distinct (a # xs); (x, y) \<in> set (non_sym_dist_pairs' (a # xs))\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (a # xs))
[PROOF STEP]
consider (a) "(x,y) \<in> set (map (Pair z) zs)" |
           (b) "(x,y) \<in> set (non_sym_dist_pairs' zs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> thesis; (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using \<open>(x,y) \<in> set (non_sym_dist_pairs' (z#zs))\<close>
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> set (non_sym_dist_pairs' (z # zs))

goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> thesis; (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
unfolding non_sym_dist_pairs'.simps
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> set (map (Pair z) zs @ non_sym_dist_pairs' zs)

goal (1 subgoal):
 1. \<lbrakk>(x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> thesis; (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>(x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> ?thesis; (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<And>a xs x y. \<lbrakk>\<And>x y. \<lbrakk>distinct xs; (x, y) \<in> set (non_sym_dist_pairs' xs)\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' xs); distinct (a # xs); (x, y) \<in> set (non_sym_dist_pairs' (a # xs))\<rbrakk> \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (a # xs))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>(x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> ?thesis; (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> ?thesis; (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
 2. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
case a
[PROOF STATE]
proof (state)
this:
(x, y) \<in> set (map (Pair z) zs)

goal (2 subgoals):
 1. (x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
 2. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x, y) \<in> set (map (Pair z) zs)
[PROOF STEP]
have "x = z"
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> set (map (Pair z) zs)

goal (1 subgoal):
 1. x = z
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x = z

goal (2 subgoals):
 1. (x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
 2. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x = z
[PROOF STEP]
have "(y,x) \<notin> set (map (Pair z) zs)"
[PROOF STATE]
proof (prove)
using this:
x = z

goal (1 subgoal):
 1. (y, x) \<notin> set (map (Pair z) zs)
[PROOF STEP]
using \<open>x \<noteq> y\<close>
[PROOF STATE]
proof (prove)
using this:
x = z
x \<noteq> y

goal (1 subgoal):
 1. (y, x) \<notin> set (map (Pair z) zs)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(y, x) \<notin> set (map (Pair z) zs)

goal (2 subgoals):
 1. (x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
 2. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(y, x) \<notin> set (map (Pair z) zs)

goal (2 subgoals):
 1. (x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
 2. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
have "x \<notin> set zs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<notin> set zs
[PROOF STEP]
using \<open>x = z\<close> \<open>distinct (z#zs)\<close>
[PROOF STATE]
proof (prove)
using this:
x = z
distinct (z # zs)

goal (1 subgoal):
 1. x \<notin> set zs
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<notin> set zs

goal (2 subgoals):
 1. (x, y) \<in> set (map (Pair z) zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
 2. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(y, x) \<notin> set (map (Pair z) zs)
x \<notin> set zs
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(y, x) \<notin> set (map (Pair z) zs)
x \<notin> set zs

goal (1 subgoal):
 1. (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
using \<open>distinct zs\<close> non_sym_dist_pairs'_elems_distinct(2)
[PROOF STATE]
proof (prove)
using this:
(y, x) \<notin> set (map (Pair z) zs)
x \<notin> set zs
distinct zs
\<lbrakk>distinct ?xs; (?x, ?y) \<in> set (non_sym_dist_pairs' ?xs)\<rbrakk> \<Longrightarrow> ?y \<in> set ?xs

goal (1 subgoal):
 1. (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(y, x) \<notin> set (non_sym_dist_pairs' (z # zs))

goal (1 subgoal):
 1. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
case b
[PROOF STATE]
proof (state)
this:
(x, y) \<in> set (non_sym_dist_pairs' zs)

goal (1 subgoal):
 1. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x, y) \<in> set (non_sym_dist_pairs' zs)
[PROOF STEP]
have "x \<noteq> z" and "y \<noteq> z"
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> set (non_sym_dist_pairs' zs)

goal (1 subgoal):
 1. x \<noteq> z &&& y \<noteq> z
[PROOF STEP]
using Cons.prems
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> set (non_sym_dist_pairs' zs)
distinct (z # zs)
(x, y) \<in> set (non_sym_dist_pairs' (z # zs))

goal (1 subgoal):
 1. x \<noteq> z &&& y \<noteq> z
[PROOF STEP]
unfolding non_sym_dist_pairs'.simps
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> set (non_sym_dist_pairs' zs)
distinct (z # zs)
(x, y) \<in> set (map (Pair z) zs @ non_sym_dist_pairs' zs)

goal (1 subgoal):
 1. x \<noteq> z &&& y \<noteq> z
[PROOF STEP]
by (meson distinct.simps(2) non_sym_dist_pairs'_elems_distinct(1,2))+
[PROOF STATE]
proof (state)
this:
x \<noteq> z
y \<noteq> z

goal (1 subgoal):
 1. (x, y) \<in> set (non_sym_dist_pairs' zs) \<Longrightarrow> (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> z
y \<noteq> z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<noteq> z
y \<noteq> z

goal (1 subgoal):
 1. (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
using Cons.IH[OF \<open>distinct zs\<close> b]
[PROOF STATE]
proof (prove)
using this:
x \<noteq> z
y \<noteq> z
(y, x) \<notin> set (non_sym_dist_pairs' zs)

goal (1 subgoal):
 1. (y, x) \<notin> set (non_sym_dist_pairs' (z # zs))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(y, x) \<notin> set (non_sym_dist_pairs' (z # zs))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(y, x) \<notin> set (non_sym_dist_pairs' (z # zs))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma vsubset_antisym:
  assumes "A \<subseteq>\<^sub>\<circ> B" and "B \<subseteq>\<^sub>\<circ> A"
  shows "A = B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A = B
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
A \<subseteq>\<^sub>\<circ> B
B \<subseteq>\<^sub>\<circ> A

goal (1 subgoal):
 1. A = B
[PROOF STEP]
by simp


[STATEMENT]
lemma real_transfer_operator_cdiv [intro, simp]:
  fixes c::real
  assumes "integrable M f"
  shows "AE x in M. real_transfer_operator (\<lambda>x. f x / c) x = real_transfer_operator f x / c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. real_transfer_operator (\<lambda>x. f x / c) x = real_transfer_operator f x / c
[PROOF STEP]
using real_transfer_operator_cmult[of _ "1/c", OF assms]
[PROOF STATE]
proof (prove)
using this:
AE x in M. real_transfer_operator (\<lambda>x. 1 / c * f x) x = 1 / c * real_transfer_operator f x

goal (1 subgoal):
 1. AE x in M. real_transfer_operator (\<lambda>x. f x / c) x = real_transfer_operator f x / c
[PROOF STEP]
by (auto simp add: divide_simps)


[STATEMENT]
lemma mod_prop1:"((a::nat) mod (b*c)) mod c = (a mod c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a mod (b * c) mod c = a mod c
[PROOF STEP]
proof(cases "c = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. c = 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
 2. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
c = 0

goal (2 subgoals):
 1. c = 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
 2. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
have "b*c = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b * c = 0
[PROOF STEP]
by (metis True mult_0_right)
[PROOF STATE]
proof (state)
this:
b * c = 0

goal (2 subgoals):
 1. c = 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
 2. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
b * c = 0
[PROOF STEP]
have "(a::nat) mod (b*c) = a"
[PROOF STATE]
proof (prove)
using this:
b * c = 0

goal (1 subgoal):
 1. a mod (b * c) = a
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a mod (b * c) = a

goal (2 subgoals):
 1. c = 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
 2. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a mod (b * c) = a
[PROOF STEP]
have "((a::nat) mod (b*c)) mod c = a mod c"
[PROOF STATE]
proof (prove)
using this:
a mod (b * c) = a

goal (1 subgoal):
 1. a mod (b * c) mod c = a mod c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a mod (b * c) mod c = a mod c

goal (2 subgoals):
 1. c = 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
 2. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a mod (b * c) mod c = a mod c
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a mod (b * c) mod c = a mod c

goal (1 subgoal):
 1. a mod (b * c) mod c = a mod c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a mod (b * c) mod c = a mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
c \<noteq> 0

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
let ?x = "(a::nat) mod (b*c)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
let ?z = "?x mod c"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
have "\<exists>m. a = m*(b*c) + ?x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>m. a = m * (b * c) + a mod (b * c)
[PROOF STEP]
by (metis div_mult_mod_eq)
[PROOF STATE]
proof (state)
this:
\<exists>m. a = m * (b * c) + a mod (b * c)

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>m. a = m * (b * c) + a mod (b * c)
[PROOF STEP]
obtain m1 where "a = m1*(b*c) + ?x"
[PROOF STATE]
proof (prove)
using this:
\<exists>m. a = m * (b * c) + a mod (b * c)

goal (1 subgoal):
 1. (\<And>m1. a = m1 * (b * c) + a mod (b * c) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a = m1 * (b * c) + a mod (b * c)

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a = m1 * (b * c) + a mod (b * c)
[PROOF STEP]
have "?x = (a - m1*(b*c))"
[PROOF STATE]
proof (prove)
using this:
a = m1 * (b * c) + a mod (b * c)

goal (1 subgoal):
 1. a mod (b * c) = a - m1 * (b * c)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a mod (b * c) = a - m1 * (b * c)

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a mod (b * c) = a - m1 * (b * c)
[PROOF STEP]
have "\<exists>m.( ?x = m*c + ?z)"
[PROOF STATE]
proof (prove)
using this:
a mod (b * c) = a - m1 * (b * c)

goal (1 subgoal):
 1. \<exists>m. a mod (b * c) = m * c + a mod (b * c) mod c
[PROOF STEP]
using mod_div_decomp
[PROOF STATE]
proof (prove)
using this:
a mod (b * c) = a - m1 * (b * c)
(\<And>q r. \<lbrakk>q = ?a div ?b; r = ?a mod ?b; ?a = q * ?b + r\<rbrakk> \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<exists>m. a mod (b * c) = m * c + a mod (b * c) mod c
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>m. a mod (b * c) = m * c + a mod (b * c) mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>m. a mod (b * c) = m * c + a mod (b * c) mod c
[PROOF STEP]
obtain m where "( ?x = m*c + ?z)"
[PROOF STATE]
proof (prove)
using this:
\<exists>m. a mod (b * c) = m * c + a mod (b * c) mod c

goal (1 subgoal):
 1. (\<And>m. a mod (b * c) = m * c + a mod (b * c) mod c \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a mod (b * c) = m * c + a mod (b * c) mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a mod (b * c) = m * c + a mod (b * c) mod c
[PROOF STEP]
have "(a - m1*(b*c)) = m*c + ?z"
[PROOF STATE]
proof (prove)
using this:
a mod (b * c) = m * c + a mod (b * c) mod c

goal (1 subgoal):
 1. a - m1 * (b * c) = m * c + a mod (b * c) mod c
[PROOF STEP]
using  \<open>a mod (b * c) = a - m1 * (b * c)\<close>
[PROOF STATE]
proof (prove)
using this:
a mod (b * c) = m * c + a mod (b * c) mod c
a mod (b * c) = a - m1 * (b * c)

goal (1 subgoal):
 1. a - m1 * (b * c) = m * c + a mod (b * c) mod c
[PROOF STEP]
by (metis)
[PROOF STATE]
proof (state)
this:
a - m1 * (b * c) = m * c + a mod (b * c) mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a - m1 * (b * c) = m * c + a mod (b * c) mod c
[PROOF STEP]
have "a = m1*b*c + m*c + ?z"
[PROOF STATE]
proof (prove)
using this:
a - m1 * (b * c) = m * c + a mod (b * c) mod c

goal (1 subgoal):
 1. a = m1 * b * c + m * c + a mod (b * c) mod c
[PROOF STEP]
using \<open>a = m1 * (b * c) + a mod (b * c)\<close> \<open>a mod (b * c)
        = m * c + a mod (b * c) mod c\<close>
[PROOF STATE]
proof (prove)
using this:
a - m1 * (b * c) = m * c + a mod (b * c) mod c
a = m1 * (b * c) + a mod (b * c)
a mod (b * c) = m * c + a mod (b * c) mod c

goal (1 subgoal):
 1. a = m1 * b * c + m * c + a mod (b * c) mod c
[PROOF STEP]
by (metis  ab_semigroup_add_class.add_ac(1)
        ab_semigroup_mult_class.mult_ac(1))
[PROOF STATE]
proof (state)
this:
a = m1 * b * c + m * c + a mod (b * c) mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a = m1 * b * c + m * c + a mod (b * c) mod c
[PROOF STEP]
have 1:"a = (m1*b + m)*c + ?z"
[PROOF STATE]
proof (prove)
using this:
a = m1 * b * c + m * c + a mod (b * c) mod c

goal (1 subgoal):
 1. a = (m1 * b + m) * c + a mod (b * c) mod c
[PROOF STEP]
by (metis add_mult_distrib2 mult.commute)
[PROOF STATE]
proof (state)
this:
a = (m1 * b + m) * c + a mod (b * c) mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
let ?y = "(a mod c)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
have "\<exists>n. a = n*(c) + ?y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>n. a = n * c + a mod c
[PROOF STEP]
by (metis "1" \<open>a mod (b * c) = m * c + a mod (b * c) mod c\<close> mod_mult_self3)
[PROOF STATE]
proof (state)
this:
\<exists>n. a = n * c + a mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>n. a = n * c + a mod c
[PROOF STEP]
obtain n where "a = n*(c) + ?y"
[PROOF STATE]
proof (prove)
using this:
\<exists>n. a = n * c + a mod c

goal (1 subgoal):
 1. (\<And>n. a = n * c + a mod c \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a = n * c + a mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
with 1
[PROOF STATE]
proof (chain)
picking this:
a = (m1 * b + m) * c + a mod (b * c) mod c
a = n * c + a mod c
[PROOF STEP]
have "(m1*b + m)*c + ?z = n*c + ?y"
[PROOF STATE]
proof (prove)
using this:
a = (m1 * b + m) * c + a mod (b * c) mod c
a = n * c + a mod c

goal (1 subgoal):
 1. (m1 * b + m) * c + a mod (b * c) mod c = n * c + a mod c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(m1 * b + m) * c + a mod (b * c) mod c = n * c + a mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(m1 * b + m) * c + a mod (b * c) mod c = n * c + a mod c
[PROOF STEP]
have "(m1*b + m)*c - (n*c) = ?y - ?z"
[PROOF STATE]
proof (prove)
using this:
(m1 * b + m) * c + a mod (b * c) mod c = n * c + a mod c

goal (1 subgoal):
 1. (m1 * b + m) * c - n * c = a mod c - a mod (b * c) mod c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(m1 * b + m) * c - n * c = a mod c - a mod (b * c) mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(m1 * b + m) * c - n * c = a mod c - a mod (b * c) mod c
[PROOF STEP]
have "(m1*b + m - n)*c = (?y - ?z)"
[PROOF STATE]
proof (prove)
using this:
(m1 * b + m) * c - n * c = a mod c - a mod (b * c) mod c

goal (1 subgoal):
 1. (m1 * b + m - n) * c = a mod c - a mod (b * c) mod c
[PROOF STEP]
by (metis diff_mult_distrib2 mult.commute)
[PROOF STATE]
proof (state)
this:
(m1 * b + m - n) * c = a mod c - a mod (b * c) mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(m1 * b + m - n) * c = a mod c - a mod (b * c) mod c
[PROOF STEP]
have "c dvd (?y - ?z)"
[PROOF STATE]
proof (prove)
using this:
(m1 * b + m - n) * c = a mod c - a mod (b * c) mod c

goal (1 subgoal):
 1. c dvd a mod c - a mod (b * c) mod c
[PROOF STEP]
by (metis dvd_triv_right)
[PROOF STATE]
proof (state)
this:
c dvd a mod c - a mod (b * c) mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
c dvd a mod c - a mod (b * c) mod c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
have "?y < c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a mod c < c
[PROOF STEP]
using mod_less_divisor False
[PROOF STATE]
proof (prove)
using this:
0 < ?n \<Longrightarrow> ?m mod ?n < ?n
c \<noteq> 0

goal (1 subgoal):
 1. a mod c < c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a mod c < c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
a mod c < c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
have "?z < c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a mod (b * c) mod c < c
[PROOF STEP]
using mod_less_divisor False
[PROOF STATE]
proof (prove)
using this:
0 < ?n \<Longrightarrow> ?m mod ?n < ?n
c \<noteq> 0

goal (1 subgoal):
 1. a mod (b * c) mod c < c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a mod (b * c) mod c < c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
a mod (b * c) mod c < c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
have "?y - ?z < c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a mod c - a mod (b * c) mod c < c
[PROOF STEP]
using calculation(2) less_imp_diff_less
[PROOF STATE]
proof (prove)
using this:
a mod c < c
?j < ?k \<Longrightarrow> ?j - ?n < ?k

goal (1 subgoal):
 1. a mod c - a mod (b * c) mod c < c
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a mod c - a mod (b * c) mod c < c

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
c dvd a mod c - a mod (b * c) mod c
a mod c < c
a mod (b * c) mod c < c
a mod c - a mod (b * c) mod c < c
[PROOF STEP]
have "?y - ?z = 0"
[PROOF STATE]
proof (prove)
using this:
c dvd a mod c - a mod (b * c) mod c
a mod c < c
a mod (b * c) mod c < c
a mod c - a mod (b * c) mod c < c

goal (1 subgoal):
 1. a mod c - a mod (b * c) mod c = 0
[PROOF STEP]
by (metis dvd_imp_mod_0 mod_less)
[PROOF STATE]
proof (state)
this:
a mod c - a mod (b * c) mod c = 0

goal (1 subgoal):
 1. c \<noteq> 0 \<Longrightarrow> a mod (b * c) mod c = a mod c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a mod c - a mod (b * c) mod c = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
a mod c - a mod (b * c) mod c = 0

goal (1 subgoal):
 1. a mod (b * c) mod c = a mod c
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
a mod c - a mod (b * c) mod c = 0
c \<noteq> 0

goal (1 subgoal):
 1. a mod (b * c) mod c = a mod c
[PROOF STEP]
by (metis "1" mod_add_right_eq mod_mult_self2 add.commute mult.commute)
[PROOF STATE]
proof (state)
this:
a mod (b * c) mod c = a mod c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma coplanar_perm_22:
  assumes "Coplanar A B C D"
  shows "Coplanar D C A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Coplanar D C A B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Coplanar D C A B
[PROOF STEP]
obtain X where P1: "(Col A B X \<and> Col C D X) \<or> (Col A C X \<and> Col B D X) \<or> (Col A D X \<and> Col B C X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using Coplanar_def assms
[PROOF STATE]
proof (prove)
using this:
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Coplanar A B C D

goal (1 subgoal):
 1. (\<And>X. Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar D C A B
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X

goal (1 subgoal):
 1. Coplanar D C A B
[PROOF STEP]
using Coplanar_def col_permutation_4
[PROOF STATE]
proof (prove)
using this:
Col A B X \<and> Col C D X \<or> Col A C X \<and> Col B D X \<or> Col A D X \<and> Col B C X
Coplanar ?A ?B ?C ?D \<equiv> \<exists>X. Col ?A ?B X \<and> Col ?C ?D X \<or> Col ?A ?C X \<and> Col ?B ?D X \<or> Col ?A ?D X \<and> Col ?B ?C X
Col ?A ?B ?C \<Longrightarrow> Col ?B ?A ?C

goal (1 subgoal):
 1. Coplanar D C A B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
Coplanar D C A B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in group_hom) hom_mult [simp]:
  "[| x \<in> carrier G; y \<in> carrier G |] ==> h (x \<otimes>\<^bsub>G\<^esub> y) = h x \<otimes>\<^bsub>H\<^esub> h y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> h (x \<otimes> y) = h x \<otimes>\<^bsub>H\<^esub> h y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> h (x \<otimes> y) = h x \<otimes>\<^bsub>H\<^esub> h y
[PROOF STEP]
assume "x \<in> carrier G" "y \<in> carrier G"
[PROOF STATE]
proof (state)
this:
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> h (x \<otimes> y) = h x \<otimes>\<^bsub>H\<^esub> h y
[PROOF STEP]
with homh [unfolded hom_def]
[PROOF STATE]
proof (chain)
picking this:
h \<in> {h \<in> carrier G \<rightarrow> carrier H. \<forall>x\<in>carrier G. \<forall>y\<in>carrier G. h (x \<otimes> y) = h x \<otimes>\<^bsub>H\<^esub> h y}
x \<in> carrier G
y \<in> carrier G
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
h \<in> {h \<in> carrier G \<rightarrow> carrier H. \<forall>x\<in>carrier G. \<forall>y\<in>carrier G. h (x \<otimes> y) = h x \<otimes>\<^bsub>H\<^esub> h y}
x \<in> carrier G
y \<in> carrier G

goal (1 subgoal):
 1. h (x \<otimes> y) = h x \<otimes>\<^bsub>H\<^esub> h y
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
h (x \<otimes> y) = h x \<otimes>\<^bsub>H\<^esub> h y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fml_equiv_subst: "fml_equiv \<phi> \<psi> \<Longrightarrow> P (fml_sem I \<phi>) \<Longrightarrow> P (fml_sem I \<psi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>fml_equiv \<phi> \<psi>; P (fml_sem I \<phi>)\<rbrakk> \<Longrightarrow> P (fml_sem I \<psi>)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>fml_equiv \<phi> \<psi>; P (fml_sem I \<phi>)\<rbrakk> \<Longrightarrow> P (fml_sem I \<psi>)
[PROOF STEP]
assume a1: "fml_equiv \<phi> \<psi>"
[PROOF STATE]
proof (state)
this:
fml_equiv \<phi> \<psi>

goal (1 subgoal):
 1. \<lbrakk>fml_equiv \<phi> \<psi>; P (fml_sem I \<phi>)\<rbrakk> \<Longrightarrow> P (fml_sem I \<psi>)
[PROOF STEP]
assume a2: "P (fml_sem I \<phi>)"
[PROOF STATE]
proof (state)
this:
P (fml_sem I \<phi>)

goal (1 subgoal):
 1. \<lbrakk>fml_equiv \<phi> \<psi>; P (fml_sem I \<phi>)\<rbrakk> \<Longrightarrow> P (fml_sem I \<psi>)
[PROOF STEP]
from a1
[PROOF STATE]
proof (chain)
picking this:
fml_equiv \<phi> \<psi>
[PROOF STEP]
have "fml_sem I \<phi> = fml_sem I \<psi>"
[PROOF STATE]
proof (prove)
using this:
fml_equiv \<phi> \<psi>

goal (1 subgoal):
 1. fml_sem I \<phi> = fml_sem I \<psi>
[PROOF STEP]
using fml_equiv_def
[PROOF STATE]
proof (prove)
using this:
fml_equiv \<phi> \<psi>
fml_equiv ?\<phi> ?\<psi> \<equiv> \<forall>I. fml_sem I ?\<phi> = fml_sem I ?\<psi>

goal (1 subgoal):
 1. fml_sem I \<phi> = fml_sem I \<psi>
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
fml_sem I \<phi> = fml_sem I \<psi>

goal (1 subgoal):
 1. \<lbrakk>fml_equiv \<phi> \<psi>; P (fml_sem I \<phi>)\<rbrakk> \<Longrightarrow> P (fml_sem I \<psi>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
fml_sem I \<phi> = fml_sem I \<psi>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
fml_sem I \<phi> = fml_sem I \<psi>

goal (1 subgoal):
 1. P (fml_sem I \<psi>)
[PROOF STEP]
using forw_subst a2
[PROOF STATE]
proof (prove)
using this:
fml_sem I \<phi> = fml_sem I \<psi>
\<lbrakk>?a = ?b; ?P ?b\<rbrakk> \<Longrightarrow> ?P ?a
P (fml_sem I \<phi>)

goal (1 subgoal):
 1. P (fml_sem I \<psi>)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P (fml_sem I \<psi>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma real_NSCauchy_NSconvergent:
  fixes X :: "nat \<Rightarrow> real"
  assumes "NSCauchy X" shows "NSconvergent X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NSconvergent X
[PROOF STEP]
unfolding NSconvergent_def NSLIMSEQ_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>L. \<forall>N\<in>HNatInfinite. (*f* X) N \<approx> hypreal_of_real L
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>L. \<forall>N\<in>HNatInfinite. (*f* X) N \<approx> hypreal_of_real L
[PROOF STEP]
have "( *f* X) whn \<in> HFinite"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (*f* X) whn \<in> HFinite
[PROOF STEP]
by (simp add: NSBseqD2 NSCauchy_NSBseq assms)
[PROOF STATE]
proof (state)
this:
(*f* X) whn \<in> HFinite

goal (1 subgoal):
 1. \<exists>L. \<forall>N\<in>HNatInfinite. (*f* X) N \<approx> hypreal_of_real L
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(*f* X) whn \<in> HFinite

goal (1 subgoal):
 1. \<exists>L. \<forall>N\<in>HNatInfinite. (*f* X) N \<approx> hypreal_of_real L
[PROOF STEP]
have "\<forall>N\<in>HNatInfinite. ( *f* X) whn \<approx> ( *f* X) N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>N\<in>HNatInfinite. (*f* X) whn \<approx> (*f* X) N
[PROOF STEP]
using HNatInfinite_whn NSCauchy_def assms
[PROOF STATE]
proof (prove)
using this:
whn \<in> HNatInfinite
NSCauchy ?X = (\<forall>M\<in>HNatInfinite. \<forall>N\<in>HNatInfinite. (*f* ?X) M \<approx> (*f* ?X) N)
NSCauchy X

goal (1 subgoal):
 1. \<forall>N\<in>HNatInfinite. (*f* X) whn \<approx> (*f* X) N
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>N\<in>HNatInfinite. (*f* X) whn \<approx> (*f* X) N

goal (1 subgoal):
 1. \<exists>L. \<forall>N\<in>HNatInfinite. (*f* X) N \<approx> hypreal_of_real L
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(*f* X) whn \<in> HFinite
\<forall>N\<in>HNatInfinite. (*f* X) whn \<approx> (*f* X) N
[PROOF STEP]
show "\<exists>L. \<forall>N\<in>HNatInfinite. ( *f* X) N \<approx> hypreal_of_real L"
[PROOF STATE]
proof (prove)
using this:
(*f* X) whn \<in> HFinite
\<forall>N\<in>HNatInfinite. (*f* X) whn \<approx> (*f* X) N

goal (1 subgoal):
 1. \<exists>L. \<forall>N\<in>HNatInfinite. (*f* X) N \<approx> hypreal_of_real L
[PROOF STEP]
by (force dest!: st_part_Ex simp add: SReal_iff intro: approx_trans3)
[PROOF STATE]
proof (state)
this:
\<exists>L. \<forall>N\<in>HNatInfinite. (*f* X) N \<approx> hypreal_of_real L

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma locally_path_connected_3:
  assumes "\<And>t x. \<lbrakk>openin (top_of_set S) t; x \<in> t\<rbrakk>
              \<Longrightarrow> openin (top_of_set S) (path_component_set t x)"
          "openin (top_of_set S) v" "x \<in> v"
   shows  "\<exists>u. openin (top_of_set S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>u. openin (top_of_set S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>u. openin (top_of_set S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v
[PROOF STEP]
have "path_component v x x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_component v x x
[PROOF STEP]
by (meson assms(3) path_component_refl)
[PROOF STATE]
proof (state)
this:
path_component v x x

goal (1 subgoal):
 1. \<exists>u. openin (top_of_set S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
path_component v x x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
path_component v x x

goal (1 subgoal):
 1. \<exists>u. openin (top_of_set S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v
[PROOF STEP]
by (metis assms mem_Collect_eq path_component_subset path_connected_path_component)
[PROOF STATE]
proof (state)
this:
\<exists>u. openin (top_of_set S) u \<and> path_connected u \<and> x \<in> u \<and> u \<subseteq> v

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma index_mono:
  fixes a b a0 b0 :: nat
  assumes a: "a < a0" and b: "b < b0"
  shows "a * b0 + b < a0 * b0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * b0 + b < a0 * b0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. a * b0 + b < a0 * b0
[PROOF STEP]
have "a * b0 + b < (Suc a) * b0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a * b0 + b < Suc a * b0
[PROOF STEP]
using b
[PROOF STATE]
proof (prove)
using this:
b < b0

goal (1 subgoal):
 1. a * b0 + b < Suc a * b0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a * b0 + b < Suc a * b0

goal (1 subgoal):
 1. a * b0 + b < a0 * b0
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
a * b0 + b < Suc a * b0

goal (1 subgoal):
 1. a * b0 + b < a0 * b0
[PROOF STEP]
have "\<dots> \<le> a0 * b0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc a * b0 \<le> a0 * b0
[PROOF STEP]
using a[THEN Suc_leI, THEN mult_le_mono1]
[PROOF STATE]
proof (prove)
using this:
Suc a * ?k \<le> a0 * ?k

goal (1 subgoal):
 1. Suc a * b0 \<le> a0 * b0
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Suc a * b0 \<le> a0 * b0

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

goal (1 subgoal):
 1. a * b0 + b < a0 * b0
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
a * b0 + b < a0 * b0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Inf_notin_open:
  assumes A: "open A"
    and bnd: "\<forall>a\<in>A. x < a"
  shows "Inf A \<notin> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf A \<notin> A
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Inf A \<in> A \<Longrightarrow> False
[PROOF STEP]
assume "Inf A \<in> A"
[PROOF STATE]
proof (state)
this:
Inf A \<in> A

goal (1 subgoal):
 1. Inf A \<in> A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Inf A \<in> A
[PROOF STEP]
obtain b where "b < Inf A" "{b <.. Inf A} \<subseteq> A"
[PROOF STATE]
proof (prove)
using this:
Inf A \<in> A

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b < Inf A; {b<..Inf A} \<subseteq> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using open_left[of A "Inf A" x] assms
[PROOF STATE]
proof (prove)
using this:
Inf A \<in> A
\<lbrakk>open A; Inf A \<in> A; x < Inf A\<rbrakk> \<Longrightarrow> \<exists>b<Inf A. {b<..Inf A} \<subseteq> A
open A
\<forall>a\<in>A. x < a

goal (1 subgoal):
 1. (\<And>b. \<lbrakk>b < Inf A; {b<..Inf A} \<subseteq> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
b < Inf A
{b<..Inf A} \<subseteq> A

goal (1 subgoal):
 1. Inf A \<in> A \<Longrightarrow> False
[PROOF STEP]
with dense[of b "Inf A"]
[PROOF STATE]
proof (chain)
picking this:
b < Inf A \<Longrightarrow> \<exists>z>b. z < Inf A
b < Inf A
{b<..Inf A} \<subseteq> A
[PROOF STEP]
obtain c where "c < Inf A" "c \<in> A"
[PROOF STATE]
proof (prove)
using this:
b < Inf A \<Longrightarrow> \<exists>z>b. z < Inf A
b < Inf A
{b<..Inf A} \<subseteq> A

goal (1 subgoal):
 1. (\<And>c. \<lbrakk>c < Inf A; c \<in> A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: subset_eq)
[PROOF STATE]
proof (state)
this:
c < Inf A
c \<in> A

goal (1 subgoal):
 1. Inf A \<in> A \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
c < Inf A
c \<in> A
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
c < Inf A
c \<in> A

goal (1 subgoal):
 1. False
[PROOF STEP]
using cInf_lower[OF \<open>c \<in> A\<close>] bnd
[PROOF STATE]
proof (prove)
using this:
c < Inf A
c \<in> A
bdd_below A \<Longrightarrow> Inf A \<le> c
\<forall>a\<in>A. x < a

goal (1 subgoal):
 1. False
[PROOF STEP]
by (metis not_le less_imp_le bdd_belowI)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in ring) subring_Inter:
  assumes "\<And>I. I \<in> S \<Longrightarrow> subring I R" and "S \<noteq> {}"
  shows "subring (\<Inter>S) R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subring (\<Inter> S) R
[PROOF STEP]
proof (rule subringI, auto simp add: assms subringE[of _ R])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<forall>X\<in>S. x \<in> X \<Longrightarrow> x \<in> carrier R
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<forall>X\<in>S. x \<in> X \<Longrightarrow> x \<in> carrier R
[PROOF STEP]
assume "\<forall>I \<in> S. x \<in> I"
[PROOF STATE]
proof (state)
this:
\<forall>I\<in>S. x \<in> I

goal (1 subgoal):
 1. \<And>x. \<forall>X\<in>S. x \<in> X \<Longrightarrow> x \<in> carrier R
[PROOF STEP]
thus "x \<in> carrier R"
[PROOF STATE]
proof (prove)
using this:
\<forall>I\<in>S. x \<in> I

goal (1 subgoal):
 1. x \<in> carrier R
[PROOF STEP]
using assms subringE(1)[of _ R]
[PROOF STATE]
proof (prove)
using this:
\<forall>I\<in>S. x \<in> I
?I \<in> S \<Longrightarrow> subring ?I R
S \<noteq> {}
subring ?H R \<Longrightarrow> ?H \<subseteq> carrier R

goal (1 subgoal):
 1. x \<in> carrier R
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
x \<in> carrier R

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma primitive_root_unity_explicit: fixes x :: complex
  shows "primitive_root_unity 1 x \<longleftrightarrow> x = 1"
    "primitive_root_unity 2 x \<longleftrightarrow> x = -1"
    "primitive_root_unity 3 x \<longleftrightarrow> (x \<in> {Complex (-1/2) (sqrt 3 / 2), Complex (-1/2) (- sqrt 3 / 2)})"
    "primitive_root_unity 4 x \<longleftrightarrow> (x \<in> {\<i>, - \<i>})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) &&& primitive_root_unity 2 x = (x = - 1)) &&& primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) &&& primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
proof (atomize(full), goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:

goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:

goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
fix P :: "nat \<Rightarrow> bool"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
have *: "{1 ..< 2 :: nat} = {1}" "{1 ..< 3 :: nat} = {1,2}" "{1 ..< 4 :: nat} = {1,2,3}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {1..<2} = {1} &&& {1..<3} = {1, 2} &&& {1..<4} = {1, 2, 3}
[PROOF STEP]
by code_simp+
[PROOF STATE]
proof (state)
this:
{1..<2} = {1}
{1..<3} = {1, 2}
{1..<4} = {1, 2, 3}

goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
have "(\<forall>i\<in> {1 ..< 2}. P i) = P 1" "(\<forall>i\<in> {1 ..< 3}. P i) \<longleftrightarrow> P 1 \<and> P 2"
      "(\<forall>i\<in> {1 ..< 4}. P i) \<longleftrightarrow> P 1 \<and> P 2 \<and> P 3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>i\<in>{1..<2}. P i) = P 1 &&& (\<forall>i\<in>{1..<3}. P i) = (P 1 \<and> P 2) &&& (\<forall>i\<in>{1..<4}. P i) = (P 1 \<and> P 2 \<and> P 3)
[PROOF STEP]
unfolding *
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>i\<in>{1}. P i) = P 1 &&& (\<forall>i\<in>{1, 2}. P i) = (P 1 \<and> P 2) &&& (\<forall>i\<in>{1, 2, 3}. P i) = (P 1 \<and> P 2 \<and> P 3)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<forall>i\<in>{1..<2}. P i) = P 1
(\<forall>i\<in>{1..<3}. P i) = (P 1 \<and> P 2)
(\<forall>i\<in>{1..<4}. P i) = (P 1 \<and> P 2 \<and> P 3)

goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
(\<forall>i\<in>{1..<2}. ?P2 i) = ?P2 1
(\<forall>i\<in>{1..<3}. ?P2 i) = (?P2 1 \<and> ?P2 2)
(\<forall>i\<in>{1..<4}. ?P2 i) = (?P2 1 \<and> ?P2 2 \<and> ?P2 3)

goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
note * = this
[PROOF STATE]
proof (state)
this:
(\<forall>i\<in>{1..<2}. ?P2 i) = ?P2 1
(\<forall>i\<in>{1..<3}. ?P2 i) = (?P2 1 \<and> ?P2 2)
(\<forall>i\<in>{1..<4}. ?P2 i) = (?P2 1 \<and> ?P2 2 \<and> ?P2 3)

goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
unfolding primitive_root_unity_simple_computation root_unity_explicit *
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((if 1 = 0 then False else x = 1 \<and> (\<forall>i\<in>{1..<1}. x ^ i \<noteq> 1)) = (x = 1) \<and> (if 2 = 0 then False else x \<in> {1, - 1} \<and> x \<noteq> 1) = (x = - 1)) \<and> (if 3 = 0 then False else x \<in> {1, Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)} \<and> x \<noteq> 1 \<and> x \<notin> {1, - 1}) = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> (if 4 = 0 then False else x \<in> {1, - 1, \<i>, - \<i>} \<and> x \<noteq> 1 \<and> x \<notin> {1, - 1} \<and> x \<notin> {1, Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) = (x \<in> {\<i>, - \<i>})
[PROOF STEP]
by (auto simp: complex_eq_iff)
[PROOF STATE]
proof (state)
this:
(primitive_root_unity 1 x = (x = 1) \<and> primitive_root_unity 2 x = (x = - 1)) \<and> primitive_root_unity 3 x = (x \<in> {Complex (- 1 / 2) (sqrt 3 / 2), Complex (- 1 / 2) (- sqrt 3 / 2)}) \<and> primitive_root_unity 4 x = (x \<in> {\<i>, - \<i>})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma invfun_mem:"\<lbrakk> f \<in> A \<rightarrow> B; inj_on f A; surj_to f A B; b \<in> B \<rbrakk>
                      \<Longrightarrow>  (invfun A B f) b \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; inj_on f A; surj_to f A B; b \<in> B\<rbrakk> \<Longrightarrow> (f\<inverse>\<^bsub>B,A\<^esub>) b \<in> A
[PROOF STEP]
apply (simp add:invfun_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; inj_on f A; surj_to f A B; b \<in> B\<rbrakk> \<Longrightarrow> (SOME x. x \<in> A \<and> f x = b) \<in> A
[PROOF STEP]
apply (simp add:surj_to_def image_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; inj_on f A; {y. \<exists>x\<in>A. y = f x} = B; b \<in> B\<rbrakk> \<Longrightarrow> (SOME x. x \<in> A \<and> f x = b) \<in> A
[PROOF STEP]
apply (frule sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; inj_on f A; {y. \<exists>x\<in>A. y = f x} = B; b \<in> B; B = {y. \<exists>x\<in>A. y = f x}\<rbrakk> \<Longrightarrow> (SOME x. x \<in> A \<and> f x = b) \<in> A
[PROOF STEP]
apply (thin_tac "{y. \<exists>x\<in>A. y = f x} = B")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; inj_on f A; b \<in> B; B = {y. \<exists>x\<in>A. y = f x}\<rbrakk> \<Longrightarrow> (SOME x. x \<in> A \<and> f x = b) \<in> A
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> {y. \<exists>x\<in>A. y = f x}; inj_on f A; \<exists>x\<in>A. b = f x; B = {y. \<exists>x\<in>A. y = f x}\<rbrakk> \<Longrightarrow> (SOME x. x \<in> A \<and> f x = b) \<in> A
[PROOF STEP]
apply (thin_tac "B = {y. \<exists>x\<in>A. y = f x}")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> {y. \<exists>x\<in>A. y = f x}; inj_on f A; \<exists>x\<in>A. b = f x\<rbrakk> \<Longrightarrow> (SOME x. x \<in> A \<and> f x = b) \<in> A
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>f \<in> A \<rightarrow> {y. \<exists>x\<in>A. y = f x}; inj_on f A; x \<in> A; b = f x\<rbrakk> \<Longrightarrow> (SOME xa. xa \<in> A \<and> f xa = f x) \<in> A
[PROOF STEP]
apply (rule someI2_ex)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>f \<in> A \<rightarrow> {y. \<exists>x\<in>A. y = f x}; inj_on f A; x \<in> A; b = f x\<rbrakk> \<Longrightarrow> \<exists>a. a \<in> A \<and> f a = f x
 2. \<And>x xa. \<lbrakk>f \<in> A \<rightarrow> {y. \<exists>x\<in>A. y = f x}; inj_on f A; x \<in> A; b = f x; xa \<in> A \<and> f xa = f x\<rbrakk> \<Longrightarrow> xa \<in> A
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x xa. \<lbrakk>f \<in> A \<rightarrow> {y. \<exists>x\<in>A. y = f x}; inj_on f A; x \<in> A; b = f x; xa \<in> A \<and> f xa = f x\<rbrakk> \<Longrightarrow> xa \<in> A
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma residue_simple_pole:
  assumes "isolated_singularity_at f z0"
  assumes "is_pole f z0" "zorder f z0 = - 1"
  shows   "residue f z0 = zor_poly f z0 z0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. residue f z0 = zor_poly f z0 z0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
isolated_singularity_at f z0
is_pole f z0
zorder f z0 = - 1

goal (1 subgoal):
 1. residue f z0 = zor_poly f z0 z0
[PROOF STEP]
by (subst residue_pole_order) simp_all


[STATEMENT]
lemma akiyama_tanigawa_row_Suc [code]:
  "akiyama_tanigawa_row (Suc n) l u =
     akiyama_tanigawa_step_aux (Suc l) (akiyama_tanigawa_row n l (Suc u))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. akiyama_tanigawa_row (Suc n) l u = akiyama_tanigawa_step_aux (Suc l) (akiyama_tanigawa_row n l (Suc u))
[PROOF STEP]
by (rule nth_equalityI) (auto simp: nth_akiyama_tanigawa_row
                             nth_akiyama_tanigawa_step_aux akiyama_tanigawa_def)


[STATEMENT]
lemma sim_fD:
  "\<lbrakk> (u, v) \<in> relations M a; sim M M' f \<rbrakk>
     \<Longrightarrow> (f u, f v) \<in> relations M' a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(u, v) \<in> relations M a; sim M M' f\<rbrakk> \<Longrightarrow> (f u, f v) \<in> relations M' a
[PROOF STEP]
unfolding sim_def sim_f_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(u, v) \<in> relations M a; sim_range M M' f \<and> sim_val M M' f \<and> (\<forall>a u v. (u, v) \<in> relations M a \<longrightarrow> (f u, f v) \<in> relations M' a) \<and> sim_r M M' f\<rbrakk> \<Longrightarrow> (f u, f v) \<in> relations M' a
[PROOF STEP]
by blast


[STATEMENT]
lemma DERIV_ln: "0 < x \<Longrightarrow> DERIV ln x :> inverse x"
  for x :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> (ln has_real_derivative inverse x) (at x)
[PROOF STEP]
by (rule DERIV_inverse_function [where f=exp and a=0 and b="x+1"])
    (auto intro: DERIV_cong [OF DERIV_exp exp_ln] isCont_ln)


[STATEMENT]
lemma dg_prod_3_Dom_vdomain[dg_cs_simps]:
  "\<D>\<^sub>\<circ> ((\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Dom\<rparr>) = (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> ((\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Dom\<rparr>) = (\<AA> \<times>\<^sub>D\<^sub>G\<^sub>3 \<BB> \<times>\<^sub>D\<^sub>G\<^sub>3 \<CC>)\<lparr>Arr\<rparr>
[PROOF STEP]
unfolding dg_prod_3_def dg_prod_components
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (\<lambda>f\<in>\<^sub>\<circ>\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>3\<^sub>\<nat>. (if i = []\<^sub>\<circ> \<Rightarrow> \<AA> | i = 1\<^sub>\<nat> \<Rightarrow> \<BB> | otherwise \<Rightarrow> \<CC>)\<lparr>Arr\<rparr>. \<lambda>i\<in>\<^sub>\<circ>3\<^sub>\<nat>. (if i = []\<^sub>\<circ> \<Rightarrow> \<AA> | i = 1\<^sub>\<nat> \<Rightarrow> \<BB> | otherwise \<Rightarrow> \<CC>)\<lparr>Dom\<rparr>\<lparr>f\<lparr>i\<rparr>\<rparr>) = (\<Prod>\<^sub>\<circ>i\<in>\<^sub>\<circ>3\<^sub>\<nat>. (if i = []\<^sub>\<circ> \<Rightarrow> \<AA> | i = 1\<^sub>\<nat> \<Rightarrow> \<BB> | otherwise \<Rightarrow> \<CC>)\<lparr>Arr\<rparr>)
[PROOF STEP]
by simp