[STATEMENT]
lemma lemma_2_4:
  assumes "infinite N" "k < 4"
  obtains M where "M \<in> [UU]\<^bsup>m\<^esup>" "\<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k" "\<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
obtain f:: "nat \<Rightarrow> nat" where "bij_betw f UNIV N" "strict_mono f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>f. \<lbrakk>bij_betw f UNIV N; strict_mono f\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
infinite N
k < 4

goal (1 subgoal):
 1. (\<And>f. \<lbrakk>bij_betw f UNIV N; strict_mono f\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (meson bij_enumerate enumerate_mono strict_monoI)
[PROOF STATE]
proof (state)
this:
bij_betw f UNIV N
strict_mono f

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bij_betw f UNIV N
strict_mono f
[PROOF STEP]
have iff[simp]: "f x = f y \<longleftrightarrow> x=y" "f x < f y \<longleftrightarrow> x<y" for x y
[PROOF STATE]
proof (prove)
using this:
bij_betw f UNIV N
strict_mono f

goal (1 subgoal):
 1. (f x = f y) = (x = y) &&& (f x < f y) = (x < y)
[PROOF STEP]
by (simp_all add: strict_mono_eq strict_mono_less)
[PROOF STATE]
proof (state)
this:
(f ?x = f ?y) = (?x = ?y)
(f ?x < f ?y) = (?x < ?y)

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have [simp]: "f x \<in> N" for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<in> N
[PROOF STEP]
using bij_betw_apply [OF \<open>bij_betw f UNIV N\<close>]
[PROOF STATE]
proof (prove)
using this:
?a \<in> UNIV \<Longrightarrow> f ?a \<in> N

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

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
define M0 where "M0 = (\<lambda>i. (f(2*i), f(Suc(2*i)))) ` {..<m}"
[PROOF STATE]
proof (state)
this:
M0 = (\<lambda>i. (f (2 * i), f (Suc (2 * i)))) ` {..<m}

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
define M1 where "M1 = (\<lambda>i. (f i, f(m+i))) ` {..<m}"
[PROOF STATE]
proof (state)
this:
M1 = (\<lambda>i. (f i, f (m + i))) ` {..<m}

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
define M2 where "M2 = (\<lambda>i. (f i, f(2*m-i))) ` {..<m}"
[PROOF STATE]
proof (state)
this:
M2 = (\<lambda>i. (f i, f (2 * m - i))) ` {..<m}

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
define M3 where "M3 = (\<lambda>i. (f 0, f (Suc i))) ` {..<m}"
[PROOF STATE]
proof (state)
this:
M3 = (\<lambda>i. (f 0, f (Suc i))) ` {..<m}

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
consider (0) "k=0" | (1) "k=1" | (2) "k=2" | (3) "k=3"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>k = 0 \<Longrightarrow> thesis; k = 1 \<Longrightarrow> thesis; k = 2 \<Longrightarrow> thesis; k = 3 \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
infinite N
k < 4

goal (1 subgoal):
 1. \<lbrakk>k = 0 \<Longrightarrow> thesis; k = 1 \<Longrightarrow> thesis; k = 2 \<Longrightarrow> thesis; k = 3 \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
\<lbrakk>k = 0 \<Longrightarrow> ?thesis; k = 1 \<Longrightarrow> ?thesis; k = 2 \<Longrightarrow> ?thesis; k = 3 \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>M \<in> [UU]\<^bsup>m\<^esup>; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> form u k; \<And>u. u \<in> [M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>k = 0 \<Longrightarrow> ?thesis; k = 1 \<Longrightarrow> ?thesis; k = 2 \<Longrightarrow> ?thesis; k = 3 \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
[PROOF STEP]
show thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>k = 0 \<Longrightarrow> ?thesis; k = 1 \<Longrightarrow> ?thesis; k = 2 \<Longrightarrow> ?thesis; k = 3 \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. k = 0 \<Longrightarrow> thesis
 2. k = 1 \<Longrightarrow> thesis
 3. k = 2 \<Longrightarrow> thesis
 4. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
k = 0

goal (4 subgoals):
 1. k = 0 \<Longrightarrow> thesis
 2. k = 1 \<Longrightarrow> thesis
 3. k = 2 \<Longrightarrow> thesis
 4. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?M \<in> [UU]\<^bsup>m\<^esup>
 2. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 3. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
have "inj_on (\<lambda>i. (f (2 * i), f (Suc (2 * i)))) {..<m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>i. (f (2 * i), f (Suc (2 * i)))) {..<m}
[PROOF STEP]
by (auto simp: inj_on_def)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>i. (f (2 * i), f (Suc (2 * i)))) {..<m}

goal (3 subgoals):
 1. ?M \<in> [UU]\<^bsup>m\<^esup>
 2. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 3. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inj_on (\<lambda>i. (f (2 * i), f (Suc (2 * i)))) {..<m}
[PROOF STEP]
show "M0 \<in> [UU]\<^bsup>m\<^esup>"
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>i. (f (2 * i), f (Suc (2 * i)))) {..<m}

goal (1 subgoal):
 1. M0 \<in> [UU]\<^bsup>m\<^esup>
[PROOF STEP]
by (simp add: M0_def nsets_def card_image UU_def image_subset_iff)
[PROOF STATE]
proof (state)
this:
M0 \<in> [UU]\<^bsup>m\<^esup>

goal (2 subgoals):
 1. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
fix u
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
assume u: "(u::(nat \<times> nat) set) \<in> [M0]\<^bsup>2\<^esup>"
[PROOF STATE]
proof (state)
this:
u \<in> [M0]\<^bsup>2\<^esup>

goal (2 subgoals):
 1. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u \<in> [M0]\<^bsup>2\<^esup>
[PROOF STEP]
obtain x y where "u = {x,y}" "x \<noteq> y" "x \<in> M0" "y \<in> M0"
[PROOF STATE]
proof (prove)
using this:
u \<in> [M0]\<^bsup>2\<^esup>

goal (1 subgoal):
 1. (\<And>x y. \<lbrakk>u = {x, y}; x \<noteq> y; x \<in> M0; y \<in> M0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: nsets_2_eq)
[PROOF STATE]
proof (state)
this:
u = {x, y}
x \<noteq> y
x \<in> M0
y \<in> M0

goal (2 subgoals):
 1. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u = {x, y}
x \<noteq> y
x \<in> M0
y \<in> M0
[PROOF STEP]
obtain i j where "i<j" "j<m" and ueq: "u = {(f(2*i), f(Suc(2*i))), (f(2*j), f(Suc(2*j)))}"
[PROOF STATE]
proof (prove)
using this:
u = {x, y}
x \<noteq> y
x \<in> M0
y \<in> M0

goal (1 subgoal):
 1. (\<And>i j. \<lbrakk>i < j; j < m; u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
apply (clarsimp simp: M0_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i ia. \<lbrakk>\<And>ib j. \<lbrakk>ib < j; j < m; {(f (2 * i), f (Suc (2 * i))), (f (2 * ia), f (Suc (2 * ia)))} = {(f (2 * ib), f (Suc (2 * ib))), (f (2 * j), f (Suc (2 * j)))}\<rbrakk> \<Longrightarrow> False; u = {(f (2 * i), f (Suc (2 * i))), (f (2 * ia), f (Suc (2 * ia)))}; x = (f (2 * i), f (Suc (2 * i))); i < m; y = (f (2 * ia), f (Suc (2 * ia))); ia < m; \<not> thesis\<rbrakk> \<Longrightarrow> i = ia
[PROOF STEP]
apply (metis (full_types) insert_commute less_linear)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
i < j
j < m
u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}

goal (2 subgoals):
 1. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
i < j
j < m
u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}

goal (2 subgoals):
 1. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
have "f (2 * i) \<le> f (2 * j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (2 * i) \<le> f (2 * j)
[PROOF STEP]
by (simp add: \<open>i<j\<close> less_imp_le_nat)
[PROOF STATE]
proof (state)
this:
f (2 * i) \<le> f (2 * j)

goal (2 subgoals):
 1. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
i < j
j < m
u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}
f (2 * i) \<le> f (2 * j)
[PROOF STEP]
show "form u k"
[PROOF STATE]
proof (prove)
using this:
i < j
j < m
u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}
f (2 * i) \<le> f (2 * j)

goal (1 subgoal):
 1. form u k
[PROOF STEP]
apply (simp add: 0 form_def form_split_def nsets_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}; f (2 * i) \<le> f (2 * j)\<rbrakk> \<Longrightarrow> \<exists>a b c d. {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))} = {(a, b), (c, d)} \<and> a \<le> c \<and> a < b \<and> b < c \<and> c < d
[PROOF STEP]
apply (rule_tac x="f (2 * i)" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}; f (2 * i) \<le> f (2 * j)\<rbrakk> \<Longrightarrow> \<exists>b c d. {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))} = {(f (2 * i), b), (c, d)} \<and> f (2 * i) \<le> c \<and> f (2 * i) < b \<and> b < c \<and> c < d
[PROOF STEP]
apply (rule_tac x="f (Suc (2 * i))" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}; f (2 * i) \<le> f (2 * j)\<rbrakk> \<Longrightarrow> \<exists>c d. {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))} = {(f (2 * i), f (Suc (2 * i))), (c, d)} \<and> f (2 * i) \<le> c \<and> f (2 * i) < f (Suc (2 * i)) \<and> f (Suc (2 * i)) < c \<and> c < d
[PROOF STEP]
apply (rule_tac x="f (2 * j)" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}; f (2 * i) \<le> f (2 * j)\<rbrakk> \<Longrightarrow> \<exists>d. {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))} = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), d)} \<and> f (2 * i) \<le> f (2 * j) \<and> f (2 * i) < f (Suc (2 * i)) \<and> f (Suc (2 * i)) < f (2 * j) \<and> f (2 * j) < d
[PROOF STEP]
apply (rule_tac x="f (Suc (2 * j))" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}; f (2 * i) \<le> f (2 * j)\<rbrakk> \<Longrightarrow> {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))} = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))} \<and> f (2 * i) \<le> f (2 * j) \<and> f (2 * i) < f (Suc (2 * i)) \<and> f (Suc (2 * i)) < f (2 * j) \<and> f (2 * j) < f (Suc (2 * j))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
form u k

goal (1 subgoal):
 1. \<And>u. u \<in> [M0]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
show "scheme u \<subseteq> N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. scheme u \<subseteq> N
[PROOF STEP]
using ueq
[PROOF STATE]
proof (prove)
using this:
u = {(f (2 * i), f (Suc (2 * i))), (f (2 * j), f (Suc (2 * j)))}

goal (1 subgoal):
 1. scheme u \<subseteq> N
[PROOF STEP]
by (auto simp: scheme_def)
[PROOF STATE]
proof (state)
this:
scheme u \<subseteq> N

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
thesis

goal (3 subgoals):
 1. k = 1 \<Longrightarrow> thesis
 2. k = 2 \<Longrightarrow> thesis
 3. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. k = 1 \<Longrightarrow> thesis
 2. k = 2 \<Longrightarrow> thesis
 3. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
k = 1

goal (3 subgoals):
 1. k = 1 \<Longrightarrow> thesis
 2. k = 2 \<Longrightarrow> thesis
 3. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?M \<in> [UU]\<^bsup>m\<^esup>
 2. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 3. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
have "inj_on (\<lambda>i. (f i, f(m+i))) {..<m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>i. (f i, f (m + i))) {..<m}
[PROOF STEP]
by (auto simp: inj_on_def)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>i. (f i, f (m + i))) {..<m}

goal (3 subgoals):
 1. ?M \<in> [UU]\<^bsup>m\<^esup>
 2. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 3. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inj_on (\<lambda>i. (f i, f (m + i))) {..<m}
[PROOF STEP]
show "M1 \<in> [UU]\<^bsup>m\<^esup>"
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>i. (f i, f (m + i))) {..<m}

goal (1 subgoal):
 1. M1 \<in> [UU]\<^bsup>m\<^esup>
[PROOF STEP]
by (simp add: M1_def nsets_def card_image UU_def image_subset_iff)
[PROOF STATE]
proof (state)
this:
M1 \<in> [UU]\<^bsup>m\<^esup>

goal (2 subgoals):
 1. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
fix u
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
assume u: "(u::(nat \<times> nat) set) \<in> [M1]\<^bsup>2\<^esup>"
[PROOF STATE]
proof (state)
this:
u \<in> [M1]\<^bsup>2\<^esup>

goal (2 subgoals):
 1. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u \<in> [M1]\<^bsup>2\<^esup>
[PROOF STEP]
obtain x y where "u = {x,y}" "x \<noteq> y" "x \<in> M1" "y \<in> M1"
[PROOF STATE]
proof (prove)
using this:
u \<in> [M1]\<^bsup>2\<^esup>

goal (1 subgoal):
 1. (\<And>x y. \<lbrakk>u = {x, y}; x \<noteq> y; x \<in> M1; y \<in> M1\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: nsets_2_eq)
[PROOF STATE]
proof (state)
this:
u = {x, y}
x \<noteq> y
x \<in> M1
y \<in> M1

goal (2 subgoals):
 1. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u = {x, y}
x \<noteq> y
x \<in> M1
y \<in> M1
[PROOF STEP]
obtain i j where "i<j" "j<m" and ueq: "u = {(f i, f(m+i)), (f j, f(m+j))}"
[PROOF STATE]
proof (prove)
using this:
u = {x, y}
x \<noteq> y
x \<in> M1
y \<in> M1

goal (1 subgoal):
 1. (\<And>i j. \<lbrakk>i < j; j < m; u = {(f i, f (m + i)), (f j, f (m + j))}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
apply (auto simp: M1_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>i ia. \<lbrakk>\<And>ib j. \<lbrakk>ib < j; j < m; {(f i, f (m + i)), (f ia, f (m + ia))} = {(f ib, f (m + ib)), (f j, f (m + j))}\<rbrakk> \<Longrightarrow> False; u = {(f i, f (m + i)), (f ia, f (m + ia))}; x = (f i, f (m + i)); i < m; y = (f ia, f (m + ia)); ia < m; \<not> thesis\<rbrakk> \<Longrightarrow> i = ia
 2. \<And>i ia. \<lbrakk>\<And>ib j. \<lbrakk>ib < j; j < m; {(f i, f (m + i)), (f ia, f (m + ia))} = {(f ib, f (m + ib)), (f j, f (m + j))}\<rbrakk> \<Longrightarrow> False; u = {(f i, f (m + i)), (f ia, f (m + ia))}; x = (f i, f (m + i)); i < m; y = (f ia, f (m + ia)); ia < m; \<not> thesis\<rbrakk> \<Longrightarrow> i = ia
[PROOF STEP]
apply (metis (full_types) insert_commute less_linear)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
i < j
j < m
u = {(f i, f (m + i)), (f j, f (m + j))}

goal (2 subgoals):
 1. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < j
j < m
u = {(f i, f (m + i)), (f j, f (m + j))}
[PROOF STEP]
show "form u k"
[PROOF STATE]
proof (prove)
using this:
i < j
j < m
u = {(f i, f (m + i)), (f j, f (m + j))}

goal (1 subgoal):
 1. form u k
[PROOF STEP]
apply (simp add: 1 form_def form_split_def nsets_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f i, f (m + i)), (f j, f (m + j))}\<rbrakk> \<Longrightarrow> \<exists>a b c d. {(f i, f (m + i)), (f j, f (m + j))} = {(a, b), (c, d)} \<and> a \<le> c \<and> a < c \<and> c < b \<and> b < d
[PROOF STEP]
by (metis iff(2) nat_add_left_cancel_less nat_less_le trans_less_add1)
[PROOF STATE]
proof (state)
this:
form u k

goal (1 subgoal):
 1. \<And>u. u \<in> [M1]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
show "scheme u \<subseteq> N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. scheme u \<subseteq> N
[PROOF STEP]
using ueq
[PROOF STATE]
proof (prove)
using this:
u = {(f i, f (m + i)), (f j, f (m + j))}

goal (1 subgoal):
 1. scheme u \<subseteq> N
[PROOF STEP]
by (auto simp: scheme_def)
[PROOF STATE]
proof (state)
this:
scheme u \<subseteq> N

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
thesis

goal (2 subgoals):
 1. k = 2 \<Longrightarrow> thesis
 2. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. k = 2 \<Longrightarrow> thesis
 2. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
k = 2

goal (2 subgoals):
 1. k = 2 \<Longrightarrow> thesis
 2. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?M \<in> [UU]\<^bsup>m\<^esup>
 2. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 3. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
have "inj_on (\<lambda>i. (f i, f(2*m-i))) {..<m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>i. (f i, f (2 * m - i))) {..<m}
[PROOF STEP]
by (auto simp: inj_on_def)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>i. (f i, f (2 * m - i))) {..<m}

goal (3 subgoals):
 1. ?M \<in> [UU]\<^bsup>m\<^esup>
 2. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 3. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inj_on (\<lambda>i. (f i, f (2 * m - i))) {..<m}
[PROOF STEP]
show "M2 \<in> [UU]\<^bsup>m\<^esup>"
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>i. (f i, f (2 * m - i))) {..<m}

goal (1 subgoal):
 1. M2 \<in> [UU]\<^bsup>m\<^esup>
[PROOF STEP]
by (auto simp: M2_def nsets_def card_image UU_def image_subset_iff)
[PROOF STATE]
proof (state)
this:
M2 \<in> [UU]\<^bsup>m\<^esup>

goal (2 subgoals):
 1. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
fix u
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
assume u: "(u::(nat \<times> nat) set) \<in> [M2]\<^bsup>2\<^esup>"
[PROOF STATE]
proof (state)
this:
u \<in> [M2]\<^bsup>2\<^esup>

goal (2 subgoals):
 1. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u \<in> [M2]\<^bsup>2\<^esup>
[PROOF STEP]
obtain x y where "u = {x,y}" "x \<noteq> y" "x \<in> M2" "y \<in> M2"
[PROOF STATE]
proof (prove)
using this:
u \<in> [M2]\<^bsup>2\<^esup>

goal (1 subgoal):
 1. (\<And>x y. \<lbrakk>u = {x, y}; x \<noteq> y; x \<in> M2; y \<in> M2\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: nsets_2_eq)
[PROOF STATE]
proof (state)
this:
u = {x, y}
x \<noteq> y
x \<in> M2
y \<in> M2

goal (2 subgoals):
 1. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u = {x, y}
x \<noteq> y
x \<in> M2
y \<in> M2
[PROOF STEP]
obtain i j where "i<j" "j<m" and ueq: "u = {(f i, f(2*m-i)), (f j, f(2*m-j))}"
[PROOF STATE]
proof (prove)
using this:
u = {x, y}
x \<noteq> y
x \<in> M2
y \<in> M2

goal (1 subgoal):
 1. (\<And>i j. \<lbrakk>i < j; j < m; u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
apply (auto simp: M2_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>i ia. \<lbrakk>\<And>ib j. \<lbrakk>ib < j; j < m; {(f i, f (2 * m - i)), (f ia, f (2 * m - ia))} = {(f ib, f (2 * m - ib)), (f j, f (2 * m - j))}\<rbrakk> \<Longrightarrow> False; u = {(f i, f (2 * m - i)), (f ia, f (2 * m - ia))}; x = (f i, f (2 * m - i)); i < m; y = (f ia, f (2 * m - ia)); ia < m; \<not> thesis\<rbrakk> \<Longrightarrow> i = ia
 2. \<And>i ia. \<lbrakk>\<And>ib j. \<lbrakk>ib < j; j < m; {(f i, f (2 * m - i)), (f ia, f (2 * m - ia))} = {(f ib, f (2 * m - ib)), (f j, f (2 * m - j))}\<rbrakk> \<Longrightarrow> False; u = {(f i, f (2 * m - i)), (f ia, f (2 * m - ia))}; x = (f i, f (2 * m - i)); i < m; y = (f ia, f (2 * m - ia)); ia < m; \<not> thesis\<rbrakk> \<Longrightarrow> 2 * m - i = 2 * m - ia
[PROOF STEP]
apply (metis (full_types) insert_commute less_linear)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
i < j
j < m
u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}

goal (2 subgoals):
 1. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < j
j < m
u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}
[PROOF STEP]
show "form u k"
[PROOF STATE]
proof (prove)
using this:
i < j
j < m
u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}

goal (1 subgoal):
 1. form u k
[PROOF STEP]
apply (simp add: 2 form_def form_split_def nsets_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}\<rbrakk> \<Longrightarrow> \<exists>a b c d. {(f i, f (2 * m - i)), (f j, f (2 * m - j))} = {(a, b), (c, d)} \<and> a \<le> c \<and> a < c \<and> c < d \<and> d < b
[PROOF STEP]
apply (rule_tac x="f i" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}\<rbrakk> \<Longrightarrow> \<exists>b c d. {(f i, f (2 * m - i)), (f j, f (2 * m - j))} = {(f i, b), (c, d)} \<and> f i \<le> c \<and> f i < c \<and> c < d \<and> d < b
[PROOF STEP]
apply (rule_tac x="f (2 * m - i)" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}\<rbrakk> \<Longrightarrow> \<exists>c d. {(f i, f (2 * m - i)), (f j, f (2 * m - j))} = {(f i, f (2 * m - i)), (c, d)} \<and> f i \<le> c \<and> f i < c \<and> c < d \<and> d < f (2 * m - i)
[PROOF STEP]
apply (rule_tac x="f j" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}\<rbrakk> \<Longrightarrow> \<exists>d. {(f i, f (2 * m - i)), (f j, f (2 * m - j))} = {(f i, f (2 * m - i)), (f j, d)} \<and> f i \<le> f j \<and> f i < f j \<and> f j < d \<and> d < f (2 * m - i)
[PROOF STEP]
apply (rule_tac x="f (2 * m - j)" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < j; j < m; u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}\<rbrakk> \<Longrightarrow> {(f i, f (2 * m - i)), (f j, f (2 * m - j))} = {(f i, f (2 * m - i)), (f j, f (2 * m - j))} \<and> f i \<le> f j \<and> f i < f j \<and> f j < f (2 * m - j) \<and> f (2 * m - j) < f (2 * m - i)
[PROOF STEP]
apply (auto simp: less_imp_le_nat)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
form u k

goal (1 subgoal):
 1. \<And>u. u \<in> [M2]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
show "scheme u \<subseteq> N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. scheme u \<subseteq> N
[PROOF STEP]
using ueq
[PROOF STATE]
proof (prove)
using this:
u = {(f i, f (2 * m - i)), (f j, f (2 * m - j))}

goal (1 subgoal):
 1. scheme u \<subseteq> N
[PROOF STEP]
by (auto simp: scheme_def)
[PROOF STATE]
proof (state)
this:
scheme u \<subseteq> N

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
thesis

goal (1 subgoal):
 1. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
case 3
[PROOF STATE]
proof (state)
this:
k = 3

goal (1 subgoal):
 1. k = 3 \<Longrightarrow> thesis
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. thesis
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. ?M \<in> [UU]\<^bsup>m\<^esup>
 2. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 3. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
have "inj_on (\<lambda>i. (f 0, f (Suc i))) {..<m}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>i. (f 0, f (Suc i))) {..<m}
[PROOF STEP]
by (auto simp: inj_on_def)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>i. (f 0, f (Suc i))) {..<m}

goal (3 subgoals):
 1. ?M \<in> [UU]\<^bsup>m\<^esup>
 2. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 3. \<And>u. u \<in> [?M]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inj_on (\<lambda>i. (f 0, f (Suc i))) {..<m}
[PROOF STEP]
show "M3 \<in> [UU]\<^bsup>m\<^esup>"
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>i. (f 0, f (Suc i))) {..<m}

goal (1 subgoal):
 1. M3 \<in> [UU]\<^bsup>m\<^esup>
[PROOF STEP]
by (auto simp: M3_def nsets_def card_image UU_def image_subset_iff)
[PROOF STATE]
proof (state)
this:
M3 \<in> [UU]\<^bsup>m\<^esup>

goal (2 subgoals):
 1. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
fix u
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
assume u: "(u::(nat \<times> nat) set) \<in> [M3]\<^bsup>2\<^esup>"
[PROOF STATE]
proof (state)
this:
u \<in> [M3]\<^bsup>2\<^esup>

goal (2 subgoals):
 1. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u \<in> [M3]\<^bsup>2\<^esup>
[PROOF STEP]
obtain x y where "u = {x,y}" "x \<noteq> y" "x \<in> M3" "y \<in> M3"
[PROOF STATE]
proof (prove)
using this:
u \<in> [M3]\<^bsup>2\<^esup>

goal (1 subgoal):
 1. (\<And>x y. \<lbrakk>u = {x, y}; x \<noteq> y; x \<in> M3; y \<in> M3\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: nsets_2_eq)
[PROOF STATE]
proof (state)
this:
u = {x, y}
x \<noteq> y
x \<in> M3
y \<in> M3

goal (2 subgoals):
 1. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u = {x, y}
x \<noteq> y
x \<in> M3
y \<in> M3
[PROOF STEP]
obtain i j where "i<j" "j<m" and ueq: "u = {(f 0, f(Suc i)), (f 0, f(Suc j))}"
[PROOF STATE]
proof (prove)
using this:
u = {x, y}
x \<noteq> y
x \<in> M3
y \<in> M3

goal (1 subgoal):
 1. (\<And>i j. \<lbrakk>i < j; j < m; u = {(f 0, f (Suc i)), (f 0, f (Suc j))}\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
apply (auto simp: M3_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i ia. \<lbrakk>\<And>ib j. \<lbrakk>ib < j; j < m; {(f 0, f (Suc i)), (f 0, f (Suc ia))} = {(f 0, f (Suc ib)), (f 0, f (Suc j))}\<rbrakk> \<Longrightarrow> False; u = {(f 0, f (Suc i)), (f 0, f (Suc ia))}; x = (f 0, f (Suc i)); i < m; y = (f 0, f (Suc ia)); ia < m; \<not> thesis\<rbrakk> \<Longrightarrow> i = ia
[PROOF STEP]
apply (metis (full_types) insert_commute less_linear)+
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
i < j
j < m
u = {(f 0, f (Suc i)), (f 0, f (Suc j))}

goal (2 subgoals):
 1. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> form u k
 2. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < j
j < m
u = {(f 0, f (Suc i)), (f 0, f (Suc j))}
[PROOF STEP]
show "form u k"
[PROOF STATE]
proof (prove)
using this:
i < j
j < m
u = {(f 0, f (Suc i)), (f 0, f (Suc j))}

goal (1 subgoal):
 1. form u k
[PROOF STEP]
by (fastforce simp: 3 form_def form_split_def nsets_def)
[PROOF STATE]
proof (state)
this:
form u k

goal (1 subgoal):
 1. \<And>u. u \<in> [M3]\<^bsup>2\<^esup> \<Longrightarrow> scheme u \<subseteq> N
[PROOF STEP]
show "scheme u \<subseteq> N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. scheme u \<subseteq> N
[PROOF STEP]
using ueq
[PROOF STATE]
proof (prove)
using this:
u = {(f 0, f (Suc i)), (f 0, f (Suc j))}

goal (1 subgoal):
 1. scheme u \<subseteq> N
[PROOF STEP]
by (auto simp: scheme_def)
[PROOF STATE]
proof (state)
this:
scheme u \<subseteq> N

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma last_message_hold_append: "
  last_message_hold (xs @ ys) =
  last_message_hold xs @ last_message_hold_init ys (last_message xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. last_message_hold (xs @ ys) = last_message_hold xs @ last_message_hold_init ys (last_message xs)
[PROOF STEP]
by (simp add: last_message_hold_def last_message_hold_init_append)


[STATEMENT]
lemma square_bound_lemma:
  fixes x :: real
  shows "x < (1 + x) * (1 + x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < (1 + x) * (1 + x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x < (1 + x) * (1 + x)
[PROOF STEP]
have "(x + 1/2)\<^sup>2 + 3/4 > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < (x + 1 / 2)\<^sup>2 + 3 / 4
[PROOF STEP]
using zero_le_power2[of "x+1/2"]
[PROOF STATE]
proof (prove)
using this:
0 \<le> (x + 1 / 2)\<^sup>2

goal (1 subgoal):
 1. 0 < (x + 1 / 2)\<^sup>2 + 3 / 4
[PROOF STEP]
by arith
[PROOF STATE]
proof (state)
this:
0 < (x + 1 / 2)\<^sup>2 + 3 / 4

goal (1 subgoal):
 1. x < (1 + x) * (1 + x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < (x + 1 / 2)\<^sup>2 + 3 / 4
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < (x + 1 / 2)\<^sup>2 + 3 / 4

goal (1 subgoal):
 1. x < (1 + x) * (1 + x)
[PROOF STEP]
by (simp add: field_simps power2_eq_square)
[PROOF STATE]
proof (state)
this:
x < (1 + x) * (1 + x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inner_Basis_scale2:
  "b1 \<in> S \<Longrightarrow> inner_Basis v (c *\<^sub>R b1) = c * inner_Basis v b1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. b1 \<in> S \<Longrightarrow> local.inner_Basis v (c *\<^sub>R b1) = c * local.inner_Basis v b1
[PROOF STEP]
by (auto simp: std_dual_def restrict0_def algebra_simps representation_add representation_scale
      B inner_Basis_def sum.distrib sum_distrib_left)


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

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


[STATEMENT]
lemma lcm_neg2 [simp]: "lcm a (-b) = lcm a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lcm a (- b) = lcm a b
[PROOF STEP]
by (rule sym, rule lcmI) (simp_all add: lcm_least lcm_eq_0_iff)


[STATEMENT]
lemma MPoly_monomial_power':
  \<open>MPoly (monomial 1 x') ^ (n+1) =  MPoly (monomial (1) (((\<lambda>x. x + x') ^^ n) x'))\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly (monomial (1::'a) x') ^ (n + 1) = MPoly (monomial (1::'a) (((\<lambda>x. x + x') ^^ n) x'))
[PROOF STEP]
by (induction n)
   (auto simp: times_mpoly.abs_eq mult_single ac_simps)


[STATEMENT]
lemma mem_hequiv_rel: \<open>a \<in> proj (hequiv_rel A H) b \<Longrightarrow> a \<in> A\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> proj (hequiv_rel A H) b \<Longrightarrow> a \<in> A
[PROOF STEP]
unfolding proj_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<in> hequiv_rel A H `` {b} \<Longrightarrow> a \<in> A
[PROOF STEP]
by blast


[STATEMENT]
lemma ord_of_nat_of_ord [simp]: "Ord x \<Longrightarrow> ord_of (nat_of_ord x) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ord x \<Longrightarrow> ord_of (nat_of_ord x) = x
[PROOF STEP]
apply (erule Ord_induct2, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>k. \<lbrakk>Ord k; ord_of (nat_of_ord k) = k\<rbrakk> \<Longrightarrow> ord_of (nat_of_ord (succ k)) = succ k
[PROOF STEP]
apply (metis nat_of_ord_ord_of ord_of.simps(2))
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma empty_correct: "\<alpha> empty = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> Impl_Uv_Set.empty = {}
[PROOF STEP]
by (simp add: \<alpha>_def empty_def)


[STATEMENT]
lemma elements_matI [intro]:
  "A \<in> carrier_mat nr nc \<Longrightarrow> i < nr \<Longrightarrow> j < nc \<Longrightarrow> a = A $$ (i,j) \<Longrightarrow> a \<in> elements_mat A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<in> carrier_mat nr nc; i < nr; j < nc; a = A $$ (i, j)\<rbrakk> \<Longrightarrow> a \<in> elements_mat A
[PROOF STEP]
unfolding elements_mat_def carrier_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<in> {m. dim_row m = nr \<and> dim_col m = nc}; i < nr; j < nc; a = A $$ (i, j)\<rbrakk> \<Longrightarrow> a \<in> set (concat (map (\<lambda>i. map (\<lambda>j. A $$ (i, j)) [0..<dim_col A]) [0..<dim_row A]))
[PROOF STEP]
by force


[STATEMENT]
lemma min_distI_eq:
  "\<lbrakk> dist v d v'; \<And>d'. dist v d' v' \<Longrightarrow> d \<le> d' \<rbrakk> \<Longrightarrow> min_dist v v' = d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>dist v d v'; \<And>d'. dist v d' v' \<Longrightarrow> d \<le> d'\<rbrakk> \<Longrightarrow> min_dist v v' = d
[PROOF STEP]
by (force intro: min_distI2 simp: connected_by_dist)


[STATEMENT]
lemma arg_less_sf_at_Suc_of_c_sum: "u < sf ((c_sum u) + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u < sf (c_sum u + 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. u < sf (c_sum u + 1)
[PROOF STEP]
have "u+1 \<le> sf(u+1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u + 1 \<le> sf (u + 1)
[PROOF STEP]
by (rule arg_le_sf)
[PROOF STATE]
proof (state)
this:
u + 1 \<le> sf (u + 1)

goal (1 subgoal):
 1. u < sf (c_sum u + 1)
[PROOF STEP]
hence "u < sf(u+1)"
[PROOF STATE]
proof (prove)
using this:
u + 1 \<le> sf (u + 1)

goal (1 subgoal):
 1. u < sf (u + 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
u < sf (u + 1)

goal (1 subgoal):
 1. u < sf (c_sum u + 1)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
u < sf (u + 1)

goal (1 subgoal):
 1. u < sf (c_sum u + 1)
[PROOF STEP]
by (unfold c_sum_def, rule LeastI)
[PROOF STATE]
proof (state)
this:
u < sf (c_sum u + 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fst_row_add_iterate_PA_eq_row_add:
  fixes A::"'a::{ring_1}^'n^'m::{mod_type}"
  assumes a_not_i: "a \<noteq> i"
  and n: "n<nrows A"
  and "to_nat a \<le> n"
  shows "fst (row_add_iterate_PA (P,A) n i j) $ a $ b = (row_add P a i (- A $ a $ j)) $ a $ b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (P, A) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
a \<noteq> i
n < nrows A
mod_type_class.to_nat a \<le> n

goal (1 subgoal):
 1. fst (row_add_iterate_PA (P, A) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
proof (induct n arbitrary: A P)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A P. \<lbrakk>a \<noteq> i; 0 < nrows A; mod_type_class.to_nat a \<le> 0\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) 0 i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
 2. \<And>n A P. \<lbrakk>\<And>A P. \<lbrakk>a \<noteq> i; n < nrows A; mod_type_class.to_nat a \<le> n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b; a \<noteq> i; Suc n < nrows A; mod_type_class.to_nat a \<le> Suc n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
a \<noteq> i
0 < nrows A
mod_type_class.to_nat a \<le> 0

goal (2 subgoals):
 1. \<And>A P. \<lbrakk>a \<noteq> i; 0 < nrows A; mod_type_class.to_nat a \<le> 0\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) 0 i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
 2. \<And>n A P. \<lbrakk>\<And>A P. \<lbrakk>a \<noteq> i; n < nrows A; mod_type_class.to_nat a \<le> n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b; a \<noteq> i; Suc n < nrows A; mod_type_class.to_nat a \<le> Suc n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (P, A) 0 i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
by (metis "0.prems"(3) a_not_i fst_conv le_0_eq row_add_iterate_PA.simps(1) to_nat_eq_0)
[PROOF STATE]
proof (state)
this:
fst (row_add_iterate_PA (P, A) 0 i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b

goal (1 subgoal):
 1. \<And>n A P. \<lbrakk>\<And>A P. \<lbrakk>a \<noteq> i; n < nrows A; mod_type_class.to_nat a \<le> n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b; a \<noteq> i; Suc n < nrows A; mod_type_class.to_nat a \<le> Suc n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n A P. \<lbrakk>\<And>A P. \<lbrakk>a \<noteq> i; n < nrows A; mod_type_class.to_nat a \<le> n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b; a \<noteq> i; Suc n < nrows A; mod_type_class.to_nat a \<le> Suc n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
\<lbrakk>a \<noteq> i; n < nrows ?A; mod_type_class.to_nat a \<le> n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (?P, ?A) n i j) $ a $ b = row_add ?P a i (- ?A $ a $ j) $ a $ b
a \<noteq> i
Suc n < nrows A
mod_type_class.to_nat a \<le> Suc n

goal (1 subgoal):
 1. \<And>n A P. \<lbrakk>\<And>A P. \<lbrakk>a \<noteq> i; n < nrows A; mod_type_class.to_nat a \<le> n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b; a \<noteq> i; Suc n < nrows A; mod_type_class.to_nat a \<le> Suc n\<rbrakk> \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
proof (cases " Suc n = to_nat i")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Suc n = mod_type_class.to_nat i \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
 2. Suc n \<noteq> mod_type_class.to_nat i \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
Suc n = mod_type_class.to_nat i

goal (2 subgoals):
 1. Suc n = mod_type_class.to_nat i \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
 2. Suc n \<noteq> mod_type_class.to_nat i \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
unfolding row_add_iterate_PA.simps if_P[OF True]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (P, A) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
proof (rule Suc.hyps[OF a_not_i])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n < nrows A
 2. mod_type_class.to_nat a \<le> n
[PROOF STEP]
show "n < nrows A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < nrows A
[PROOF STEP]
by (metis Suc.prems(2) Suc_lessD)
[PROOF STATE]
proof (state)
this:
n < nrows A

goal (1 subgoal):
 1. mod_type_class.to_nat a \<le> n
[PROOF STEP]
show "to_nat a \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_type_class.to_nat a \<le> n
[PROOF STEP]
by (metis Suc.prems(3) True a_not_i le_SucE to_nat_eq)
[PROOF STATE]
proof (state)
this:
mod_type_class.to_nat a \<le> n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b

goal (1 subgoal):
 1. Suc n \<noteq> mod_type_class.to_nat i \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Suc n \<noteq> mod_type_class.to_nat i \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
Suc n \<noteq> mod_type_class.to_nat i

goal (1 subgoal):
 1. Suc n \<noteq> mod_type_class.to_nat i \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
note Suc_n_not_i=False
[PROOF STATE]
proof (state)
this:
Suc n \<noteq> mod_type_class.to_nat i

goal (1 subgoal):
 1. Suc n \<noteq> mod_type_class.to_nat i \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
proof (cases "to_nat a = Suc n")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. mod_type_class.to_nat a = Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
 2. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
mod_type_class.to_nat a = Suc n

goal (2 subgoals):
 1. mod_type_class.to_nat a = Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
 2. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
show "fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
unfolding row_add_iterate_PA.simps if_not_P[OF False]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (row_add P (mod_type_class.from_nat (Suc n)) i (- A $ mod_type_class.from_nat (Suc n) $ j), row_add A (mod_type_class.from_nat (Suc n)) i (- A $ mod_type_class.from_nat (Suc n) $ j)) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
by (metis Suc_le_lessD True order_refl less_imp_le fst_row_add_iterate_PA_preserves_greater_than_n Suc.prems(2) to_nat_from_nat nrows_def)
[PROOF STATE]
proof (state)
this:
fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b

goal (1 subgoal):
 1. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
mod_type_class.to_nat a \<noteq> Suc n

goal (1 subgoal):
 1. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
define A' where "A' = row_add A (from_nat (Suc n)) i (- A $ from_nat (Suc n) $ j)"
[PROOF STATE]
proof (state)
this:
A' = row_add A (mod_type_class.from_nat (Suc n)) i (- A $ mod_type_class.from_nat (Suc n) $ j)

goal (1 subgoal):
 1. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
define P' where "P' = row_add P (from_nat (Suc n)) i (- A $ from_nat (Suc n) $ j)"
[PROOF STATE]
proof (state)
this:
P' = row_add P (mod_type_class.from_nat (Suc n)) i (- A $ mod_type_class.from_nat (Suc n) $ j)

goal (1 subgoal):
 1. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
have rw: "fst (row_add_iterate_PA (P',A') n i j) $ a $ b = row_add P' a i (- A' $ a $ j) $ a $ b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (P', A') n i j) $ a $ b = row_add P' a i (- A' $ a $ j) $ a $ b
[PROOF STEP]
proof (rule Suc.hyps)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. a \<noteq> i
 2. n < nrows A'
 3. mod_type_class.to_nat a \<le> n
[PROOF STEP]
show "a \<noteq> i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a \<noteq> i
[PROOF STEP]
using Suc.prems(1)
[PROOF STATE]
proof (prove)
using this:
a \<noteq> i

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

goal (2 subgoals):
 1. n < nrows A'
 2. mod_type_class.to_nat a \<le> n
[PROOF STEP]
show "n < nrows A'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < nrows A'
[PROOF STEP]
using Suc.prems(2)
[PROOF STATE]
proof (prove)
using this:
Suc n < nrows A

goal (1 subgoal):
 1. n < nrows A'
[PROOF STEP]
unfolding nrows_def
[PROOF STATE]
proof (prove)
using this:
Suc n < CARD('m)

goal (1 subgoal):
 1. n < CARD('m)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
n < nrows A'

goal (1 subgoal):
 1. mod_type_class.to_nat a \<le> n
[PROOF STEP]
show "to_nat a \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_type_class.to_nat a \<le> n
[PROOF STEP]
using False Suc.prems(3)
[PROOF STATE]
proof (prove)
using this:
mod_type_class.to_nat a \<noteq> Suc n
mod_type_class.to_nat a \<le> Suc n

goal (1 subgoal):
 1. mod_type_class.to_nat a \<le> n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
mod_type_class.to_nat a \<le> n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fst (row_add_iterate_PA (P', A') n i j) $ a $ b = row_add P' a i (- A' $ a $ j) $ a $ b

goal (1 subgoal):
 1. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
have rw1: "P' $ a $ b = P $ a $ b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P' $ a $ b = P $ a $ b
[PROOF STEP]
unfolding P'_def row_add_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<chi>ia ja. if ia = mod_type_class.from_nat (Suc n) then P $ mod_type_class.from_nat (Suc n) $ ja + - A $ mod_type_class.from_nat (Suc n) $ j * P $ i $ ja else P $ ia $ ja) $ a $ b = P $ a $ b
[PROOF STEP]
using False Suc.prems
[PROOF STATE]
proof (prove)
using this:
mod_type_class.to_nat a \<noteq> Suc n
a \<noteq> i
Suc n < nrows A
mod_type_class.to_nat a \<le> Suc n

goal (1 subgoal):
 1. (\<chi>ia ja. if ia = mod_type_class.from_nat (Suc n) then P $ mod_type_class.from_nat (Suc n) $ ja + - A $ mod_type_class.from_nat (Suc n) $ j * P $ i $ ja else P $ ia $ ja) $ a $ b = P $ a $ b
[PROOF STEP]
unfolding nrows_def
[PROOF STATE]
proof (prove)
using this:
mod_type_class.to_nat a \<noteq> Suc n
a \<noteq> i
Suc n < CARD('m)
mod_type_class.to_nat a \<le> Suc n

goal (1 subgoal):
 1. (\<chi>ia ja. if ia = mod_type_class.from_nat (Suc n) then P $ mod_type_class.from_nat (Suc n) $ ja + - A $ mod_type_class.from_nat (Suc n) $ j * P $ i $ ja else P $ ia $ ja) $ a $ b = P $ a $ b
[PROOF STEP]
by (auto simp add: to_nat_from_nat_id)
[PROOF STATE]
proof (state)
this:
P' $ a $ b = P $ a $ b

goal (1 subgoal):
 1. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
have rw2: "A' $ a $ j = A $ a $ j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A' $ a $ j = A $ a $ j
[PROOF STEP]
unfolding A'_def row_add_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<chi>ia ja. if ia = mod_type_class.from_nat (Suc n) then A $ mod_type_class.from_nat (Suc n) $ ja + - A $ mod_type_class.from_nat (Suc n) $ j * A $ i $ ja else A $ ia $ ja) $ a $ j = A $ a $ j
[PROOF STEP]
using False Suc.prems
[PROOF STATE]
proof (prove)
using this:
mod_type_class.to_nat a \<noteq> Suc n
a \<noteq> i
Suc n < nrows A
mod_type_class.to_nat a \<le> Suc n

goal (1 subgoal):
 1. (\<chi>ia ja. if ia = mod_type_class.from_nat (Suc n) then A $ mod_type_class.from_nat (Suc n) $ ja + - A $ mod_type_class.from_nat (Suc n) $ j * A $ i $ ja else A $ ia $ ja) $ a $ j = A $ a $ j
[PROOF STEP]
unfolding nrows_def
[PROOF STATE]
proof (prove)
using this:
mod_type_class.to_nat a \<noteq> Suc n
a \<noteq> i
Suc n < CARD('m)
mod_type_class.to_nat a \<le> Suc n

goal (1 subgoal):
 1. (\<chi>ia ja. if ia = mod_type_class.from_nat (Suc n) then A $ mod_type_class.from_nat (Suc n) $ ja + - A $ mod_type_class.from_nat (Suc n) $ j * A $ i $ ja else A $ ia $ ja) $ a $ j = A $ a $ j
[PROOF STEP]
by (auto simp add: to_nat_from_nat_id)
[PROOF STATE]
proof (state)
this:
A' $ a $ j = A $ a $ j

goal (1 subgoal):
 1. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
have rw3: "P' $ i $ b = P $ i $ b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P' $ i $ b = P $ i $ b
[PROOF STEP]
unfolding P'_def row_add_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<chi>ia ja. if ia = mod_type_class.from_nat (Suc n) then P $ mod_type_class.from_nat (Suc n) $ ja + - A $ mod_type_class.from_nat (Suc n) $ j * P $ i $ ja else P $ ia $ ja) $ i $ b = P $ i $ b
[PROOF STEP]
using False Suc.prems Suc_n_not_i
[PROOF STATE]
proof (prove)
using this:
mod_type_class.to_nat a \<noteq> Suc n
a \<noteq> i
Suc n < nrows A
mod_type_class.to_nat a \<le> Suc n
Suc n \<noteq> mod_type_class.to_nat i

goal (1 subgoal):
 1. (\<chi>ia ja. if ia = mod_type_class.from_nat (Suc n) then P $ mod_type_class.from_nat (Suc n) $ ja + - A $ mod_type_class.from_nat (Suc n) $ j * P $ i $ ja else P $ ia $ ja) $ i $ b = P $ i $ b
[PROOF STEP]
unfolding nrows_def
[PROOF STATE]
proof (prove)
using this:
mod_type_class.to_nat a \<noteq> Suc n
a \<noteq> i
Suc n < CARD('m)
mod_type_class.to_nat a \<le> Suc n
Suc n \<noteq> mod_type_class.to_nat i

goal (1 subgoal):
 1. (\<chi>ia ja. if ia = mod_type_class.from_nat (Suc n) then P $ mod_type_class.from_nat (Suc n) $ ja + - A $ mod_type_class.from_nat (Suc n) $ j * P $ i $ ja else P $ ia $ ja) $ i $ b = P $ i $ b
[PROOF STEP]
by (auto simp add: to_nat_from_nat_id)
[PROOF STATE]
proof (state)
this:
P' $ i $ b = P $ i $ b

goal (1 subgoal):
 1. mod_type_class.to_nat a \<noteq> Suc n \<Longrightarrow> fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
show "fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
unfolding row_add_iterate_PA.simps if_not_P[OF Suc_n_not_i]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (row_add_iterate_PA (row_add P (mod_type_class.from_nat (Suc n)) i (- A $ mod_type_class.from_nat (Suc n) $ j), row_add A (mod_type_class.from_nat (Suc n)) i (- A $ mod_type_class.from_nat (Suc n) $ j)) n i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
unfolding rw[unfolded P'_def A'_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row_add (row_add P (mod_type_class.from_nat (Suc n)) i (- A $ mod_type_class.from_nat (Suc n) $ j)) a i (- row_add A (mod_type_class.from_nat (Suc n)) i (- A $ mod_type_class.from_nat (Suc n) $ j) $ a $ j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
unfolding A'_def[symmetric] P'_def[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row_add P' a i (- A' $ a $ j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b
[PROOF STEP]
unfolding row_add_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<chi>ia ja. if ia = a then P' $ a $ ja + - A' $ a $ j * P' $ i $ ja else P' $ ia $ ja) $ a $ b = (\<chi>ia ja. if ia = a then P $ a $ ja + - A $ a $ j * P $ i $ ja else P $ ia $ ja) $ a $ b
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P' $ a $ b - A' $ a $ j * P' $ i $ b = P $ a $ b - A $ a $ j * P $ i $ b
[PROOF STEP]
unfolding rw1 rw2 rw3
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P $ a $ b - A $ a $ j * P $ i $ b = P $ a $ b - A $ a $ j * P $ i $ b
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fst (row_add_iterate_PA (P, A) (Suc n) i j) $ a $ b = row_add P a i (- A $ a $ j) $ a $ b

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma  P_ring_mult_closed:
  assumes "carrier_coeff P"
  assumes "carrier_coeff Q"
  shows  "carrier_coeff (P_ring_mult R P Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier_coeff (P \<Otimes>\<^sub>p Q)
[PROOF STEP]
unfolding carrier_coeff_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>m. (P \<Otimes>\<^sub>p Q) m \<in> carrier R
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m. (P \<Otimes>\<^sub>p Q) m \<in> carrier R
[PROOF STEP]
fix m
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>m. (P \<Otimes>\<^sub>p Q) m \<in> carrier R
[PROOF STEP]
have "(\<lambda>x. P x \<otimes> Q (m - x)) \<in> mset_factors m \<rightarrow> carrier R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. P x \<otimes> Q (m - x)) \<in> mset_factors m \<rightarrow> carrier R
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> mset_factors m \<Longrightarrow> P x \<otimes> Q (m - x) \<in> carrier R
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> mset_factors m \<Longrightarrow> P x \<otimes> Q (m - x) \<in> carrier R
[PROOF STEP]
assume "x \<in> mset_factors m"
[PROOF STATE]
proof (state)
this:
x \<in> mset_factors m

goal (1 subgoal):
 1. \<And>x. x \<in> mset_factors m \<Longrightarrow> P x \<otimes> Q (m - x) \<in> carrier R
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> mset_factors m
[PROOF STEP]
show "P x \<otimes> Q (m - x) \<in> carrier R"
[PROOF STATE]
proof (prove)
using this:
x \<in> mset_factors m

goal (1 subgoal):
 1. P x \<otimes> Q (m - x) \<in> carrier R
[PROOF STEP]
using assms  carrier_coeffE
[PROOF STATE]
proof (prove)
using this:
x \<in> mset_factors m
carrier_coeff P
carrier_coeff Q
carrier_coeff ?P \<Longrightarrow> ?P ?m \<in> carrier R

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

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<lambda>x. P x \<otimes> Q (m - x)) \<in> mset_factors m \<rightarrow> carrier R

goal (1 subgoal):
 1. \<And>m. (P \<Otimes>\<^sub>p Q) m \<in> carrier R
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. P x \<otimes> Q (m - x)) \<in> mset_factors m \<rightarrow> carrier R
[PROOF STEP]
show "(P \<Otimes>\<^sub>p Q) m \<in> carrier R"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. P x \<otimes> Q (m - x)) \<in> mset_factors m \<rightarrow> carrier R

goal (1 subgoal):
 1. (P \<Otimes>\<^sub>p Q) m \<in> carrier R
[PROOF STEP]
using assms finsum_closed[of "(\<lambda>x. (P x) \<otimes> (Q (m - x)))" "mset_factors m"]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. P x \<otimes> Q (m - x)) \<in> mset_factors m \<rightarrow> carrier R
carrier_coeff P
carrier_coeff Q
(\<lambda>x. P x \<otimes> Q (m - x)) \<in> mset_factors m \<rightarrow> carrier R \<Longrightarrow> (\<Oplus>x\<in>mset_factors m. P x \<otimes> Q (m - x)) \<in> carrier R

goal (1 subgoal):
 1. (P \<Otimes>\<^sub>p Q) m \<in> carrier R
[PROOF STEP]
unfolding carrier_coeff_def  P_ring_mult_def
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. P x \<otimes> Q (m - x)) \<in> mset_factors m \<rightarrow> carrier R
\<forall>m. P m \<in> carrier R
\<forall>m. Q m \<in> carrier R
(\<lambda>x. P x \<otimes> Q (m - x)) \<in> mset_factors m \<rightarrow> carrier R \<Longrightarrow> (\<Oplus>x\<in>mset_factors m. P x \<otimes> Q (m - x)) \<in> carrier R

goal (1 subgoal):
 1. (\<Oplus>x\<in>mset_factors m. P x \<otimes> Q (m - x)) \<in> carrier R
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(P \<Otimes>\<^sub>p Q) m \<in> carrier R

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lim_le: "convergent f \<Longrightarrow> (\<And>n. f n \<le> x) \<Longrightarrow> lim f \<le> x"
  for x :: "'a::linorder_topology"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>convergent f; \<And>n. f n \<le> x\<rbrakk> \<Longrightarrow> lim f \<le> x
[PROOF STEP]
using LIMSEQ_le_const2[of f "lim f" x]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f \<longlonglongrightarrow> lim f; \<exists>N. \<forall>n\<ge>N. f n \<le> x\<rbrakk> \<Longrightarrow> lim f \<le> x

goal (1 subgoal):
 1. \<lbrakk>convergent f; \<And>n. f n \<le> x\<rbrakk> \<Longrightarrow> lim f \<le> x
[PROOF STEP]
by (simp add: convergent_LIMSEQ_iff)


[STATEMENT]
lemma i_set0_cont_subset_i_set0: "i_set0_cont \<subseteq> i_set0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i_set0_cont \<subseteq> i_set0
[PROOF STEP]
apply (unfold i_set0_cont_def i_set0_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert {} i_set_cont \<subseteq> insert {} i_set
[PROOF STEP]
apply (rule insert_mono)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i_set_cont \<subseteq> i_set
[PROOF STEP]
apply (rule i_set_cont_subset_i_set)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma samp_uni_add_mult:
  assumes coprime: "coprime x (q::nat)"
    and xa: "xa < q"
    and ya: "ya < q"
    and map: "(y + x * xa) mod q = (y + x * ya) mod q"
  shows "xa = ya"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xa = ya
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. xa = ya
[PROOF STEP]
have "(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q
[PROOF STEP]
have "(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> [y + x*xa = y + x *ya] (mod q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> [y + x * xa = y + x * ya] (mod q)
[PROOF STEP]
using cong_def
[PROOF STATE]
proof (prove)
using this:
[?b = ?c] (mod ?a) = (?b mod ?a = ?c mod ?a)

goal (1 subgoal):
 1. (y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> [y + x * xa = y + x * ya] (mod q)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> [y + x * xa = y + x * ya] (mod q)

goal (1 subgoal):
 1. (y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> [y + x * xa = y + x * ya] (mod q)

goal (1 subgoal):
 1. (y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q
[PROOF STEP]
have "[y + x*xa = y + x *ya] (mod q) \<Longrightarrow> [xa = ya] (mod q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [y + x * xa = y + x * ya] (mod q) \<Longrightarrow> [xa = ya] (mod q)
[PROOF STEP]
by(simp add: cong_add_lcancel_nat)(simp add: coprime cong_mult_lcancel_nat)
[PROOF STATE]
proof (state)
this:
[y + x * xa = y + x * ya] (mod q) \<Longrightarrow> [xa = ya] (mod q)

goal (1 subgoal):
 1. (y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> [y + x * xa = y + x * ya] (mod q)
[y + x * xa = y + x * ya] (mod q) \<Longrightarrow> [xa = ya] (mod q)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> [y + x * xa = y + x * ya] (mod q)
[y + x * xa = y + x * ya] (mod q) \<Longrightarrow> [xa = ya] (mod q)

goal (1 subgoal):
 1. xa mod q = ya mod q
[PROOF STEP]
by(simp add: cong_def map)
[PROOF STATE]
proof (state)
this:
xa mod q = ya mod q

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q

goal (1 subgoal):
 1. xa = ya
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q

goal (1 subgoal):
 1. xa = ya
[PROOF STEP]
have "xa mod q = ya mod q \<Longrightarrow> xa = ya"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xa mod q = ya mod q \<Longrightarrow> xa = ya
[PROOF STEP]
by(simp add: xa ya)
[PROOF STATE]
proof (state)
this:
xa mod q = ya mod q \<Longrightarrow> xa = ya

goal (1 subgoal):
 1. xa = ya
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q
xa mod q = ya mod q \<Longrightarrow> xa = ya
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(y + x * xa) mod q = (y + x * ya) mod q \<Longrightarrow> xa mod q = ya mod q
xa mod q = ya mod q \<Longrightarrow> xa = ya

goal (1 subgoal):
 1. xa = ya
[PROOF STEP]
by(simp add: map)
[PROOF STATE]
proof (state)
this:
xa = ya

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eventually_open_cball:
  assumes "open X"
  assumes "x \<in> X"
  shows "eventually (\<lambda>e. cball x e \<subseteq> X) (at_right 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F e in at_right 0. cball x e \<subseteq> X
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>\<^sub>F e in at_right 0. cball x e \<subseteq> X
[PROOF STEP]
from open_contains_cball_eq[OF assms(1)] assms(2)
[PROOF STATE]
proof (chain)
picking this:
\<forall>x. (x \<in> X) = (\<exists>e>0. cball x e \<subseteq> X)
x \<in> X
[PROOF STEP]
obtain e where "e > 0" "cball x e \<subseteq> X"
[PROOF STATE]
proof (prove)
using this:
\<forall>x. (x \<in> X) = (\<exists>e>0. cball x e \<subseteq> X)
x \<in> X

goal (1 subgoal):
 1. (\<And>e. \<lbrakk>0 < e; cball x e \<subseteq> X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 < e
cball x e \<subseteq> X

goal (1 subgoal):
 1. \<forall>\<^sub>F e in at_right 0. cball x e \<subseteq> X
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < e
cball x e \<subseteq> X

goal (1 subgoal):
 1. \<forall>\<^sub>F e in at_right 0. cball x e \<subseteq> X
[PROOF STEP]
by (auto simp: eventually_at dist_real_def mem_cball intro!: exI[where x=e])
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F e in at_right 0. cball x e \<subseteq> X

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_iterator_linord_foldli_conv :
    "set_iterator_linord iti S \<longleftrightarrow>
     (\<exists>l0. distinct l0 \<and> S = set l0 \<and> sorted l0 \<and> iti = foldli l0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_iterator_linord iti S = (\<exists>l0. distinct l0 \<and> S = set l0 \<and> sorted l0 \<and> iti = foldli l0)
[PROOF STEP]
unfolding set_iterator_linord_def set_iterator_genord_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>l0. distinct l0 \<and> S = set l0 \<and> sorted l0 \<and> iti = foldli l0) = (\<exists>l0. distinct l0 \<and> S = set l0 \<and> sorted l0 \<and> iti = foldli l0)
[PROOF STEP]
by simp


[STATEMENT]
lemma sublist_dropWhile [simp, intro]: "sublist (dropWhile P xs) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sublist (dropWhile P xs) xs
[PROOF STEP]
by (rule suffix_imp_sublist[OF suffix_dropWhile])


[STATEMENT]
lemma (in group) subgroup_mult_id:
  assumes "subgroup H G"
  shows "H <#> H = H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H <#> H = H
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. H <#> H \<subseteq> H
 2. H \<subseteq> H <#> H
[PROOF STEP]
show "H <#> H \<subseteq> H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H <#> H \<subseteq> H
[PROOF STEP]
unfolding set_mult_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>h\<in>H. \<Union>k\<in>H. {h \<otimes> k}) \<subseteq> H
[PROOF STEP]
using subgroup.m_closed[OF assms]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> H; ?y \<in> H\<rbrakk> \<Longrightarrow> ?x \<otimes> ?y \<in> H

goal (1 subgoal):
 1. (\<Union>h\<in>H. \<Union>k\<in>H. {h \<otimes> k}) \<subseteq> H
[PROOF STEP]
by (simp add: UN_subset_iff)
[PROOF STATE]
proof (state)
this:
H <#> H \<subseteq> H

goal (1 subgoal):
 1. H \<subseteq> H <#> H
[PROOF STEP]
show "H \<subseteq> H <#> H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. H \<subseteq> H <#> H
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> H \<Longrightarrow> x \<in> H <#> H
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> H \<Longrightarrow> x \<in> H <#> H
[PROOF STEP]
assume x: "x \<in> H"
[PROOF STATE]
proof (state)
this:
x \<in> H

goal (1 subgoal):
 1. \<And>x. x \<in> H \<Longrightarrow> x \<in> H <#> H
[PROOF STEP]
thus "x \<in> H <#> H"
[PROOF STATE]
proof (prove)
using this:
x \<in> H

goal (1 subgoal):
 1. x \<in> H <#> H
[PROOF STEP]
unfolding set_mult_def
[PROOF STATE]
proof (prove)
using this:
x \<in> H

goal (1 subgoal):
 1. x \<in> (\<Union>h\<in>H. \<Union>k\<in>H. {h \<otimes> k})
[PROOF STEP]
using subgroup.m_closed[OF assms subgroup.one_closed[OF assms] x] subgroup.one_closed[OF assms]
[PROOF STATE]
proof (prove)
using this:
x \<in> H
\<one> \<otimes> x \<in> H
\<one> \<in> H

goal (1 subgoal):
 1. x \<in> (\<Union>h\<in>H. \<Union>k\<in>H. {h \<otimes> k})
[PROOF STEP]
using assms subgroup.mem_carrier
[PROOF STATE]
proof (prove)
using this:
x \<in> H
\<one> \<otimes> x \<in> H
\<one> \<in> H
subgroup H G
\<lbrakk>subgroup ?H ?G; ?x \<in> ?H\<rbrakk> \<Longrightarrow> ?x \<in> carrier ?G

goal (1 subgoal):
 1. x \<in> (\<Union>h\<in>H. \<Union>k\<in>H. {h \<otimes> k})
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
x \<in> H <#> H

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
H \<subseteq> H <#> H

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma omega_closed_oexp [intro]:
  assumes "\<alpha> \<in> elts \<omega>" "\<beta> \<in> elts \<omega>" shows "\<alpha>\<up>\<beta> \<in> elts \<omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> \<up> \<beta> \<in> elts \<omega>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<alpha> \<up> \<beta> \<in> elts \<omega>
[PROOF STEP]
obtain m n where "\<alpha> = ord_of_nat m" "\<beta> = ord_of_nat n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>m n. \<lbrakk>\<alpha> = ord_of_nat m; \<beta> = ord_of_nat n\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms elts_\<omega>
[PROOF STATE]
proof (prove)
using this:
\<alpha> \<in> elts \<omega>
\<beta> \<in> elts \<omega>
elts \<omega> = {\<alpha>. \<exists>n. \<alpha> = ord_of_nat n}

goal (1 subgoal):
 1. (\<And>m n. \<lbrakk>\<alpha> = ord_of_nat m; \<beta> = ord_of_nat n\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<alpha> = ord_of_nat m
\<beta> = ord_of_nat n

goal (1 subgoal):
 1. \<alpha> \<up> \<beta> \<in> elts \<omega>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<alpha> = ord_of_nat m
\<beta> = ord_of_nat n
[PROOF STEP]
have "\<alpha>\<up>\<beta> = ord_of_nat (m^n)"
[PROOF STATE]
proof (prove)
using this:
\<alpha> = ord_of_nat m
\<beta> = ord_of_nat n

goal (1 subgoal):
 1. \<alpha> \<up> \<beta> = ord_of_nat (m ^ n)
[PROOF STEP]
by (simp add: ord_of_nat_oexp)
[PROOF STATE]
proof (state)
this:
\<alpha> \<up> \<beta> = ord_of_nat (m ^ n)

goal (1 subgoal):
 1. \<alpha> \<up> \<beta> \<in> elts \<omega>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<alpha> \<up> \<beta> = ord_of_nat (m ^ n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<alpha> \<up> \<beta> = ord_of_nat (m ^ n)

goal (1 subgoal):
 1. \<alpha> \<up> \<beta> \<in> elts \<omega>
[PROOF STEP]
by (simp add: \<omega>_def)
[PROOF STATE]
proof (state)
this:
\<alpha> \<up> \<beta> \<in> elts \<omega>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma poly_pinfty_ge:
  fixes p :: "real poly"
  assumes "lead_coeff p > 0" "degree p \<noteq> 0"
  shows "\<exists>n. \<forall> x \<ge> n. poly p x \<ge> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>n. \<forall>x\<ge>n. b \<le> poly p x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>n. \<forall>x\<ge>n. b \<le> poly p x
[PROOF STEP]
let ?p = "p - [:b - lead_coeff p :]"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>n. \<forall>x\<ge>n. b \<le> poly p x
[PROOF STEP]
have id: "lead_coeff ?p = lead_coeff p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lead_coeff (p - [:b - lead_coeff p:]) = lead_coeff p
[PROOF STEP]
using assms(2)
[PROOF STATE]
proof (prove)
using this:
degree p \<noteq> 0

goal (1 subgoal):
 1. lead_coeff (p - [:b - lead_coeff p:]) = lead_coeff p
[PROOF STEP]
by (cases p, auto)
[PROOF STATE]
proof (state)
this:
lead_coeff (p - [:b - lead_coeff p:]) = lead_coeff p

goal (1 subgoal):
 1. \<exists>n. \<forall>x\<ge>n. b \<le> poly p x
[PROOF STEP]
with assms(1)
[PROOF STATE]
proof (chain)
picking this:
0 < lead_coeff p
lead_coeff (p - [:b - lead_coeff p:]) = lead_coeff p
[PROOF STEP]
have "lead_coeff ?p > 0"
[PROOF STATE]
proof (prove)
using this:
0 < lead_coeff p
lead_coeff (p - [:b - lead_coeff p:]) = lead_coeff p

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

goal (1 subgoal):
 1. \<exists>n. \<forall>x\<ge>n. b \<le> poly p x
[PROOF STEP]
from poly_pinfty_gt_lc[OF this, unfolded id]
[PROOF STATE]
proof (chain)
picking this:
\<exists>n. \<forall>x\<ge>n. lead_coeff p \<le> poly (p - [:b - lead_coeff p:]) x
[PROOF STEP]
obtain n
    where "\<And> x. x \<ge> n \<Longrightarrow> 0 \<le> poly p x - b"
[PROOF STATE]
proof (prove)
using this:
\<exists>n. \<forall>x\<ge>n. lead_coeff p \<le> poly (p - [:b - lead_coeff p:]) x

goal (1 subgoal):
 1. (\<And>n. (\<And>x. n \<le> x \<Longrightarrow> 0 \<le> poly p x - b) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
n \<le> ?x \<Longrightarrow> 0 \<le> poly p ?x - b

goal (1 subgoal):
 1. \<exists>n. \<forall>x\<ge>n. b \<le> poly p x
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
n \<le> ?x \<Longrightarrow> 0 \<le> poly p ?x - b

goal (1 subgoal):
 1. \<exists>n. \<forall>x\<ge>n. b \<le> poly p x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>n. \<forall>x\<ge>n. b \<le> poly p x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sorted_distinct_imp_sorted_wrt:
  assumes "sorted xs" and "distinct xs"
  shows "sorted_wrt (<) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted_wrt (<) xs
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
sorted xs
distinct xs

goal (1 subgoal):
 1. sorted_wrt (<) xs
[PROOF STEP]
by (induct xs, insert le_neq_trans, auto)


[STATEMENT]
lemma not_open_finite_fbint [simp]:
  assumes "finite (U :: fbint set)" "U \<noteq> {}"
  shows   "\<not>open U"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> open U
[PROOF STEP]
using open_fbint_imp_infinite assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>open ?U; ?U \<noteq> {}\<rbrakk> \<Longrightarrow> infinite ?U
finite U
U \<noteq> {}

goal (1 subgoal):
 1. \<not> open U
[PROOF STEP]
by blast


[STATEMENT]
lemma rotation_minus_pi_2_positive_y_axis [simp]:
  shows "(moebius_pt (moebius_rotation (-pi/2))) ` positive_y_axis = positive_x_axis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis = positive_x_axis
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x xa. xa \<in> positive_y_axis \<Longrightarrow> moebius_pt (moebius_rotation (- pi / 2)) xa \<in> positive_x_axis
 2. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
fix y
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x xa. xa \<in> positive_y_axis \<Longrightarrow> moebius_pt (moebius_rotation (- pi / 2)) xa \<in> positive_x_axis
 2. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
assume y: "y \<in> positive_y_axis"
[PROOF STATE]
proof (state)
this:
y \<in> positive_y_axis

goal (2 subgoals):
 1. \<And>x xa. xa \<in> positive_y_axis \<Longrightarrow> moebius_pt (moebius_rotation (- pi / 2)) xa \<in> positive_x_axis
 2. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
have *: "Re (a * \<i> / b) < 0 \<longleftrightarrow> Im (a / b) > 0" for a b
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Re (a * \<i> / b) < 0) = (0 < Im (a / b))
[PROOF STEP]
by (subst times_divide_eq_left [symmetric], subst mult.commute, subst Re_i_times) auto
[PROOF STATE]
proof (state)
this:
(Re (?a * \<i> / ?b) < 0) = (0 < Im (?a / ?b))

goal (2 subgoals):
 1. \<And>x xa. xa \<in> positive_y_axis \<Longrightarrow> moebius_pt (moebius_rotation (- pi / 2)) xa \<in> positive_x_axis
 2. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
from y *
[PROOF STATE]
proof (chain)
picking this:
y \<in> positive_y_axis
(Re (?a * \<i> / ?b) < 0) = (0 < Im (?a / ?b))
[PROOF STEP]
show "moebius_pt (moebius_rotation (-pi/2)) y \<in> positive_x_axis"
[PROOF STATE]
proof (prove)
using this:
y \<in> positive_y_axis
(Re (?a * \<i> / ?b) < 0) = (0 < Im (?a / ?b))

goal (1 subgoal):
 1. moebius_pt (moebius_rotation (- pi / 2)) y \<in> positive_x_axis
[PROOF STEP]
unfolding positive_y_axis_def positive_x_axis_def circline_set_def
[PROOF STATE]
proof (prove)
using this:
y \<in> {z \<in> Collect (on_circline y_axis). z \<noteq> \<infinity>\<^sub>h \<and> 0 < Im (to_complex z)}
(Re (?a * \<i> / ?b) < 0) = (0 < Im (?a / ?b))

goal (1 subgoal):
 1. moebius_pt (moebius_rotation (- pi / 2)) y \<in> {z \<in> Collect (on_circline x_axis). z \<noteq> \<infinity>\<^sub>h \<and> 0 < Re (to_complex z)}
[PROOF STEP]
unfolding moebius_rotation_def moebius_similarity_def
[PROOF STATE]
proof (prove)
using this:
y \<in> {z \<in> Collect (on_circline y_axis). z \<noteq> \<infinity>\<^sub>h \<and> 0 < Im (to_complex z)}
(Re (?a * \<i> / ?b) < 0) = (0 < Im (?a / ?b))

goal (1 subgoal):
 1. moebius_pt (mk_moebius (cis (- pi / 2)) 0 0 1) y \<in> {z \<in> Collect (on_circline x_axis). z \<noteq> \<infinity>\<^sub>h \<and> 0 < Re (to_complex z)}
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>on_circline y_axis y \<and> y \<noteq> \<infinity>\<^sub>h \<and> 0 < Im (to_complex y); \<And>a b. (Re (a * \<i> / b) < 0) = (0 < Im (a / b))\<rbrakk> \<Longrightarrow> on_circline x_axis (moebius_pt (mk_moebius (- \<i>) 0 0 1) y) \<and> moebius_pt (mk_moebius (- \<i>) 0 0 1) y \<noteq> \<infinity>\<^sub>h \<and> 0 < Re (to_complex (moebius_pt (mk_moebius (- \<i>) 0 0 1) y))
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>on_circline_clmat_hcoords y_axis_clmat y \<and> \<not> y \<approx> \<infinity>\<^sub>h\<^sub>c \<and> 0 < Im (to_complex_homo_coords y); \<And>a b. (Re (a * \<i> / b) < 0) = (0 < Im (a / b))\<rbrakk> \<Longrightarrow> on_circline_clmat_hcoords x_axis_clmat (moebius_pt_mmat_hcoords (mk_moebius_mat (- \<i>) 0 0 1) y) \<and> \<not> moebius_pt_mmat_hcoords (mk_moebius_mat (- \<i>) 0 0 1) y \<approx> \<infinity>\<^sub>h\<^sub>c \<and> 0 < Re (to_complex_homo_coords (moebius_pt_mmat_hcoords (mk_moebius_mat (- \<i>) 0 0 1) y))
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>y \<noteq> vec_zero; on_circline_cmat_cvec y_axis_cmat y \<and> \<not> y \<approx>\<^sub>v \<infinity>\<^sub>v \<and> 0 < Im (to_complex_cvec y); \<And>a b. (Re (a * \<i> / b) < 0) = (0 < Im (a / b))\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec x_axis_cmat (moebius_pt_cmat_cvec (mk_moebius_cmat (- \<i>) 0 0 1) y) \<and> \<not> moebius_pt_cmat_cvec (mk_moebius_cmat (- \<i>) 0 0 1) y \<approx>\<^sub>v \<infinity>\<^sub>v \<and> 0 < Re (to_complex_cvec (moebius_pt_cmat_cvec (mk_moebius_cmat (- \<i>) 0 0 1) y))
[PROOF STEP]
apply (auto simp add: vec_cnj_def field_simps add_eq_0_iff)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
moebius_pt (moebius_rotation (- pi / 2)) y \<in> positive_x_axis

goal (1 subgoal):
 1. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
assume x: "x \<in> positive_x_axis"
[PROOF STATE]
proof (state)
this:
x \<in> positive_x_axis

goal (1 subgoal):
 1. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
let ?y = "moebius_pt (moebius_rotation (pi/2)) x"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
have *: "Im (a * \<i> / b) > 0 \<longleftrightarrow> Re (a / b) > 0" for a b
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0 < Im (a * \<i> / b)) = (0 < Re (a / b))
[PROOF STEP]
by (subst times_divide_eq_left [symmetric], subst mult.commute, subst Im_i_times) auto
[PROOF STATE]
proof (state)
this:
(0 < Im (?a * \<i> / ?b)) = (0 < Re (?a / ?b))

goal (1 subgoal):
 1. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
hence "?y \<in> positive_y_axis"
[PROOF STATE]
proof (prove)
using this:
(0 < Im (?a * \<i> / ?b)) = (0 < Re (?a / ?b))

goal (1 subgoal):
 1. moebius_pt (moebius_rotation (pi / 2)) x \<in> positive_y_axis
[PROOF STEP]
using \<open>x \<in> positive_x_axis\<close>
[PROOF STATE]
proof (prove)
using this:
(0 < Im (?a * \<i> / ?b)) = (0 < Re (?a / ?b))
x \<in> positive_x_axis

goal (1 subgoal):
 1. moebius_pt (moebius_rotation (pi / 2)) x \<in> positive_y_axis
[PROOF STEP]
unfolding positive_x_axis_def positive_y_axis_def
[PROOF STATE]
proof (prove)
using this:
(0 < Im (?a * \<i> / ?b)) = (0 < Re (?a / ?b))
x \<in> {z \<in> circline_set x_axis. z \<noteq> \<infinity>\<^sub>h \<and> 0 < Re (to_complex z)}

goal (1 subgoal):
 1. moebius_pt (moebius_rotation (pi / 2)) x \<in> {z \<in> circline_set y_axis. z \<noteq> \<infinity>\<^sub>h \<and> 0 < Im (to_complex z)}
[PROOF STEP]
unfolding moebius_rotation_def moebius_similarity_def
[PROOF STATE]
proof (prove)
using this:
(0 < Im (?a * \<i> / ?b)) = (0 < Re (?a / ?b))
x \<in> {z \<in> circline_set x_axis. z \<noteq> \<infinity>\<^sub>h \<and> 0 < Re (to_complex z)}

goal (1 subgoal):
 1. moebius_pt (mk_moebius (cis (pi / 2)) 0 0 1) x \<in> {z \<in> circline_set y_axis. z \<noteq> \<infinity>\<^sub>h \<and> 0 < Im (to_complex z)}
[PROOF STEP]
unfolding circline_set_def
[PROOF STATE]
proof (prove)
using this:
(0 < Im (?a * \<i> / ?b)) = (0 < Re (?a / ?b))
x \<in> {z \<in> Collect (on_circline x_axis). z \<noteq> \<infinity>\<^sub>h \<and> 0 < Re (to_complex z)}

goal (1 subgoal):
 1. moebius_pt (mk_moebius (cis (pi / 2)) 0 0 1) x \<in> {z \<in> Collect (on_circline y_axis). z \<noteq> \<infinity>\<^sub>h \<and> 0 < Im (to_complex z)}
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>a b. (0 < Im (a * \<i> / b)) = (0 < Re (a / b)); on_circline x_axis x \<and> x \<noteq> \<infinity>\<^sub>h \<and> 0 < Re (to_complex x)\<rbrakk> \<Longrightarrow> on_circline y_axis (moebius_pt (mk_moebius \<i> 0 0 1) x) \<and> moebius_pt (mk_moebius \<i> 0 0 1) x \<noteq> \<infinity>\<^sub>h \<and> 0 < Im (to_complex (moebius_pt (mk_moebius \<i> 0 0 1) x))
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<And>a b. (0 < Im (a * \<i> / b)) = (0 < Re (a / b)); on_circline_clmat_hcoords x_axis_clmat x \<and> \<not> x \<approx> \<infinity>\<^sub>h\<^sub>c \<and> 0 < Re (to_complex_homo_coords x)\<rbrakk> \<Longrightarrow> on_circline_clmat_hcoords y_axis_clmat (moebius_pt_mmat_hcoords (mk_moebius_mat \<i> 0 0 1) x) \<and> \<not> moebius_pt_mmat_hcoords (mk_moebius_mat \<i> 0 0 1) x \<approx> \<infinity>\<^sub>h\<^sub>c \<and> 0 < Im (to_complex_homo_coords (moebius_pt_mmat_hcoords (mk_moebius_mat \<i> 0 0 1) x))
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<noteq> vec_zero; \<And>a b. (0 < Im (a * \<i> / b)) = (0 < Re (a / b)); on_circline_cmat_cvec x_axis_cmat x \<and> \<not> x \<approx>\<^sub>v \<infinity>\<^sub>v \<and> 0 < Re (to_complex_cvec x)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec y_axis_cmat (moebius_pt_cmat_cvec (mk_moebius_cmat \<i> 0 0 1) x) \<and> \<not> moebius_pt_cmat_cvec (mk_moebius_cmat \<i> 0 0 1) x \<approx>\<^sub>v \<infinity>\<^sub>v \<and> 0 < Im (to_complex_cvec (moebius_pt_cmat_cvec (mk_moebius_cmat \<i> 0 0 1) x))
[PROOF STEP]
apply (auto simp add: vec_cnj_def field_simps add_eq_0_iff)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
moebius_pt (moebius_rotation (pi / 2)) x \<in> positive_y_axis

goal (1 subgoal):
 1. \<And>x. x \<in> positive_x_axis \<Longrightarrow> x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
thus "x \<in> moebius_pt (moebius_rotation (-pi/2)) ` positive_y_axis"
[PROOF STATE]
proof (prove)
using this:
moebius_pt (moebius_rotation (pi / 2)) x \<in> positive_y_axis

goal (1 subgoal):
 1. x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis
[PROOF STEP]
by (auto simp add: image_iff) (rule_tac x="?y" in bexI, simp_all)
[PROOF STATE]
proof (state)
this:
x \<in> moebius_pt (moebius_rotation (- pi / 2)) ` positive_y_axis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma graph_ranD: "x \<in> graph m \<Longrightarrow> snd x \<in> ran m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> graph m \<Longrightarrow> snd x \<in> ran m
[PROOF STEP]
using snd_graph_ran
[PROOF STATE]
proof (prove)
using this:
snd ` graph ?m = ran ?m

goal (1 subgoal):
 1. x \<in> graph m \<Longrightarrow> snd x \<in> ran m
[PROOF STEP]
by (metis imageI)


[STATEMENT]
lemma closed_complex_Reals: "closed (\<real> :: complex set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closed \<real>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. closed \<real>
[PROOF STEP]
have "(\<real> :: complex set) = {z. Im z = 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<real> = {z. Im z = 0}
[PROOF STEP]
by (auto simp: complex_is_Real_iff)
[PROOF STATE]
proof (state)
this:
\<real> = {z. Im z = 0}

goal (1 subgoal):
 1. closed \<real>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<real> = {z. Im z = 0}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<real> = {z. Im z = 0}

goal (1 subgoal):
 1. closed \<real>
[PROOF STEP]
by (metis closed_halfspace_Im_eq)
[PROOF STATE]
proof (state)
this:
closed \<real>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma size_lower_result [simp]:
  assumes "x \<in># C"
  shows   "size (lower_result C) = size C - 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size (lower_result C) = size C - 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in># C

goal (1 subgoal):
 1. size (lower_result C) = size C - 1
[PROOF STEP]
by (auto simp: lower_result_def size_Diff_singleton)


[STATEMENT]
lemma lipschitz_on_congI:
  assumes "L'-lipschitz_on s' g'"
  assumes "s' = s"
  assumes "L' \<le> L"
  assumes "\<And>x y. x \<in> s \<Longrightarrow> g' x = g x"
  shows "L-lipschitz_on s g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. L-lipschitz_on s g
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
L'-lipschitz_on s' g'
s' = s
L' \<le> L
?x \<in> s \<Longrightarrow> g' ?x = g ?x

goal (1 subgoal):
 1. L-lipschitz_on s g
[PROOF STEP]
by (auto simp: lipschitz_on_def intro!: order_trans[OF _ mult_right_mono[OF \<open>L' \<le> L\<close>]])


[STATEMENT]
lemma vunionE[elim!]:
  assumes "x \<in>\<^sub>\<circ> A \<union>\<^sub>\<circ> B" and "x \<in>\<^sub>\<circ> A \<Longrightarrow> P" and "x \<in>\<^sub>\<circ> B \<Longrightarrow> P"
  shows P
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in>\<^sub>\<circ> A \<union>\<^sub>\<circ> B
x \<in>\<^sub>\<circ> A \<Longrightarrow> P
x \<in>\<^sub>\<circ> B \<Longrightarrow> P

goal (1 subgoal):
 1. P
[PROOF STEP]
by auto


[STATEMENT]
lemma finvimage_mono:
  assumes "r' \<subseteq>\<^sub>\<circ> r" and "A' \<subseteq>\<^sub>\<circ> A"
  shows "(r' -`\<^sub>\<bullet> A') \<subseteq>\<^sub>\<circ> (r -`\<^sub>\<bullet> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r' -`\<^sub>\<bullet> A' \<subseteq>\<^sub>\<circ> r -`\<^sub>\<bullet> A
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
r' \<subseteq>\<^sub>\<circ> r
A' \<subseteq>\<^sub>\<circ> A

goal (1 subgoal):
 1. r' -`\<^sub>\<bullet> A' \<subseteq>\<^sub>\<circ> r -`\<^sub>\<bullet> A
[PROOF STEP]
by fastforce


[STATEMENT]
lemma vpairwise_vinsert:
  "vpairwise r (vinsert x s) \<longleftrightarrow>
    (\<forall>y. y \<in>\<^sub>\<circ> s \<and> y \<noteq> x \<longrightarrow> r x y \<and> r y x) \<and> vpairwise r s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vpairwise r (vinsert x s) = ((\<forall>y. y \<in>\<^sub>\<circ> s \<and> y \<noteq> x \<longrightarrow> r x y \<and> r y x) \<and> vpairwise r s)
[PROOF STEP]
by (intro iffI conjI allI impI; (elim conjE | tactic\<open>all_tac\<close>))
    (auto simp: vpairwise_def)


[STATEMENT]
lemma change_tv_injection: assumes "inj f" shows "inj (change_tv f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj (change_tv f)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj (change_tv f)
[PROOF STEP]
have "change_tv f tv1 = change_tv f tv2 \<Longrightarrow> tv1 = tv2" for tv1 tv2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. change_tv f tv1 = change_tv f tv2 \<Longrightarrow> tv1 = tv2
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
inj f

goal (1 subgoal):
 1. change_tv f tv1 = change_tv f tv2 \<Longrightarrow> tv1 = tv2
[PROOF STEP]
by (cases tv1; cases tv2) (simp_all add: inj_eq)
[PROOF STATE]
proof (state)
this:
change_tv f ?tv1.0 = change_tv f ?tv2.0 \<Longrightarrow> ?tv1.0 = ?tv2.0

goal (1 subgoal):
 1. inj (change_tv f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
change_tv f ?tv1.0 = change_tv f ?tv2.0 \<Longrightarrow> ?tv1.0 = ?tv2.0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
change_tv f ?tv1.0 = change_tv f ?tv2.0 \<Longrightarrow> ?tv1.0 = ?tv2.0

goal (1 subgoal):
 1. inj (change_tv f)
[PROOF STEP]
by (simp add: injI)
[PROOF STATE]
proof (state)
this:
inj (change_tv f)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma partitions_parts_bounded:
  assumes "p partitions n"
  shows "sum p {..n} \<le> n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
assume "i \<le> n"
[PROOF STATE]
proof (state)
this:
i \<le> n

goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
p partitions n
[PROOF STEP]
have "p i \<le> p i * i"
[PROOF STATE]
proof (prove)
using this:
p partitions n

goal (1 subgoal):
 1. p i \<le> p i * i
[PROOF STEP]
by (auto elim!: partitionsE)
[PROOF STATE]
proof (state)
this:
p i \<le> p i * i

goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?i2 \<le> n \<Longrightarrow> p ?i2 \<le> p ?i2 * ?i2

goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
?i2 \<le> n \<Longrightarrow> p ?i2 \<le> p ?i2 * ?i2
[PROOF STEP]
have "sum p {..n} \<le> (\<Sum>i\<le>n. p i * i)"
[PROOF STATE]
proof (prove)
using this:
?i2 \<le> n \<Longrightarrow> p ?i2 \<le> p ?i2 * ?i2

goal (1 subgoal):
 1. sum p {..n} \<le> (\<Sum>i\<le>n. p i * i)
[PROOF STEP]
by (auto intro: sum_mono)
[PROOF STATE]
proof (state)
this:
sum p {..n} \<le> (\<Sum>i\<le>n. p i * i)

goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sum p {..n} \<le> (\<Sum>i\<le>n. p i * i)

goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
p partitions n
[PROOF STEP]
have n: "(\<Sum>i\<le>n. p i * i) = n"
[PROOF STATE]
proof (prove)
using this:
p partitions n

goal (1 subgoal):
 1. (\<Sum>i\<le>n. p i * i) = n
[PROOF STEP]
by (auto elim!: partitionsE)
[PROOF STATE]
proof (state)
this:
(\<Sum>i\<le>n. p i * i) = n

goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
sum p {..n} \<le> n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sum p {..n} \<le> n

goal (1 subgoal):
 1. sum p {..n} \<le> n
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
sum p {..n} \<le> n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma content_times_primitive_part [simp]: "smult (content p) (primitive_part p) = p"
  for p :: "'a :: semiring_gcd poly"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. smult (content p) (primitive_part p) = p
[PROOF STEP]
proof (cases "p = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. p = 0 \<Longrightarrow> smult (content p) (primitive_part p) = p
 2. p \<noteq> 0 \<Longrightarrow> smult (content p) (primitive_part p) = p
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
p = 0

goal (2 subgoals):
 1. p = 0 \<Longrightarrow> smult (content p) (primitive_part p) = p
 2. p \<noteq> 0 \<Longrightarrow> smult (content p) (primitive_part p) = p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
p = 0

goal (1 subgoal):
 1. smult (content p) (primitive_part p) = p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
smult (content p) (primitive_part p) = p

goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> smult (content p) (primitive_part p) = p
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> smult (content p) (primitive_part p) = p
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
p \<noteq> 0

goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> smult (content p) (primitive_part p) = p
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
p \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0

goal (1 subgoal):
 1. smult (content p) (primitive_part p) = p
[PROOF STEP]
unfolding primitive_part_def
[PROOF STATE]
proof (prove)
using this:
p \<noteq> 0

goal (1 subgoal):
 1. smult (content p) (map_poly (\<lambda>x. x div content p) p) = p
[PROOF STEP]
by (auto simp: smult_conv_map_poly map_poly_map_poly o_def content_dvd_coeffs
      intro: map_poly_idI)
[PROOF STATE]
proof (state)
this:
smult (content p) (primitive_part p) = p

goal:
No subgoals!
[PROOF STEP]
qed