[STATEMENT]
lemma division_decomp:
  assumes "a dvd b * c"
  shows "\<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
proof (cases "gcd a b = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. gcd a b = (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
 2. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
gcd a b = (0::'a)

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

goal (1 subgoal):
 1. a = (0::'a) \<and> b = (0::'a)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a = (0::'a) \<and> b = (0::'a)

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

goal (1 subgoal):
 1. a = (0::'a) * c \<and> (0::'a) dvd b \<and> c dvd c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a = (0::'a) * c \<and> (0::'a) dvd b \<and> c dvd c

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

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

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

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
let ?d = "gcd a b"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
from gcd_coprime_exists [OF False]
[PROOF STATE]
proof (chain)
picking this:
\<exists>a' b'. a = a' * gcd a b \<and> b = b' * gcd a b \<and> coprime a' b'
[PROOF STEP]
obtain a' b' where ab': "a = a' * ?d" "b = b' * ?d" "coprime a' b'"
[PROOF STATE]
proof (prove)
using this:
\<exists>a' b'. a = a' * gcd a b \<and> b = b' * gcd a b \<and> coprime a' b'

goal (1 subgoal):
 1. (\<And>a' b'. \<lbrakk>a = a' * gcd a b; b = b' * gcd a b; coprime a' b'\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
a = a' * gcd a b
b = b' * gcd a b
coprime a' b'

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
from ab'(1)
[PROOF STATE]
proof (chain)
picking this:
a = a' * gcd a b
[PROOF STEP]
have "a' dvd a"
[PROOF STATE]
proof (prove)
using this:
a = a' * gcd a b

goal (1 subgoal):
 1. a' dvd a
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
a' dvd a

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
a dvd b * c
a' dvd a
[PROOF STEP]
have "a' dvd b * c"
[PROOF STATE]
proof (prove)
using this:
a dvd b * c
a' dvd a

goal (1 subgoal):
 1. a' dvd b * c
[PROOF STEP]
using dvd_trans [of a' a "b * c"]
[PROOF STATE]
proof (prove)
using this:
a dvd b * c
a' dvd a
\<lbrakk>a' dvd a; a dvd b * c\<rbrakk> \<Longrightarrow> a' dvd b * c

goal (1 subgoal):
 1. a' dvd b * c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a' dvd b * c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
from assms ab'(1,2)
[PROOF STATE]
proof (chain)
picking this:
a dvd b * c
a = a' * gcd a b
b = b' * gcd a b
[PROOF STEP]
have "a' * ?d dvd (b' * ?d) * c"
[PROOF STATE]
proof (prove)
using this:
a dvd b * c
a = a' * gcd a b
b = b' * gcd a b

goal (1 subgoal):
 1. a' * gcd a b dvd b' * gcd a b * c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a' * gcd a b dvd b' * gcd a b * c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a' * gcd a b dvd b' * gcd a b * c
[PROOF STEP]
have "?d * a' dvd ?d * (b' * c)"
[PROOF STATE]
proof (prove)
using this:
a' * gcd a b dvd b' * gcd a b * c

goal (1 subgoal):
 1. gcd a b * a' dvd gcd a b * (b' * c)
[PROOF STEP]
by (simp add: mult_ac)
[PROOF STATE]
proof (state)
this:
gcd a b * a' dvd gcd a b * (b' * c)

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
with \<open>?d \<noteq> 0\<close>
[PROOF STATE]
proof (chain)
picking this:
gcd a b \<noteq> (0::'a)
gcd a b * a' dvd gcd a b * (b' * c)
[PROOF STEP]
have "a' dvd b' * c"
[PROOF STATE]
proof (prove)
using this:
gcd a b \<noteq> (0::'a)
gcd a b * a' dvd gcd a b * (b' * c)

goal (1 subgoal):
 1. a' dvd b' * c
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a' dvd b' * c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a' dvd b' * c
[PROOF STEP]
have "a' dvd c"
[PROOF STATE]
proof (prove)
using this:
a' dvd b' * c

goal (1 subgoal):
 1. a' dvd c
[PROOF STEP]
using \<open>coprime a' b'\<close>
[PROOF STATE]
proof (prove)
using this:
a' dvd b' * c
coprime a' b'

goal (1 subgoal):
 1. a' dvd c
[PROOF STEP]
by (simp add: coprime_dvd_mult_right_iff)
[PROOF STATE]
proof (state)
this:
a' dvd c

goal (1 subgoal):
 1. gcd a b \<noteq> (0::'a) \<Longrightarrow> \<exists>b' c'. a = b' * c' \<and> b' dvd b \<and> c' dvd c
[PROOF STEP]
with ab'(1)
[PROOF STATE]
proof (chain)
picking this:
a = a' * gcd a b
a' dvd c
[PROOF STEP]
have "a = ?d * a' \<and> ?d dvd b \<and> a' dvd c"
[PROOF STATE]
proof (prove)
using this:
a = a' * gcd a b
a' dvd c

goal (1 subgoal):
 1. a = gcd a b * a' \<and> gcd a b dvd b \<and> a' dvd c
[PROOF STEP]
by (simp add: ac_simps)
[PROOF STATE]
proof (state)
this:
a = gcd a b * a' \<and> gcd a b dvd b \<and> a' dvd c

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

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma subcocycle_cmult:
  assumes "subcocycle u" "c \<ge> 0"
  shows "subcocycle (\<lambda>n x. c * u n x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subcocycle (\<lambda>n x. c * u n x)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
subcocycle u
0 \<le> c

goal (1 subgoal):
 1. subcocycle (\<lambda>n x. c * u n x)
[PROOF STEP]
unfolding subcocycle_def
[PROOF STATE]
proof (prove)
using this:
(\<forall>n. integrable M (u n)) \<and> (\<forall>n m x. u (n + m) x \<le> u n x + u m ((T ^^ n) x))
0 \<le> c

goal (1 subgoal):
 1. (\<forall>n. integrable M (\<lambda>x. c * u n x)) \<and> (\<forall>n m x. c * u (n + m) x \<le> c * u n x + c * u m ((T ^^ n) x))
[PROOF STEP]
by (auto, metis distrib_left mult_left_mono)


[STATEMENT]
lemma vint_addition_law_of_order:
  assumes "x \<in>\<^sub>\<circ> \<int>\<^sub>\<circ>" and "y \<in>\<^sub>\<circ> \<int>\<^sub>\<circ>" and "z \<in>\<^sub>\<circ> \<int>\<^sub>\<circ>" and "x <\<^sub>\<int> y"
  shows "x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
have "x' < y' \<Longrightarrow> x' + z' < y' + z'" for x' y' z' :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x' < y' \<Longrightarrow> x' + z' < y' + z'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?x' < ?y' \<Longrightarrow> ?x' + ?z' < ?y' + ?z'

goal (1 subgoal):
 1. x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
from this[untransferred, OF assms]
[PROOF STATE]
proof (chain)
picking this:
x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z

goal (1 subgoal):
 1. x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
x +\<^sub>\<int> z <\<^sub>\<int> y +\<^sub>\<int> z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma AG_mono: "p \<subseteq> q \<Longrightarrow> \<^bold>A\<^bold>G p \<subseteq> \<^bold>A\<^bold>G q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<subseteq> q \<Longrightarrow> \<^bold>A\<^bold>G p \<subseteq> \<^bold>A\<^bold>G q
[PROOF STEP]
by (simp only: AG_gfp, rule gfp_mono) auto


[STATEMENT]
lemma edges_are_in_V: assumes "v\<rightarrow>w" shows "v \<in> V" "w \<in> V"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<in> V &&& w \<in> V
[PROOF STEP]
using assms valid_edge_set
[PROOF STATE]
proof (prove)
using this:
v \<rightarrow> w
E \<subseteq> V \<times> V

goal (1 subgoal):
 1. v \<in> V &&& w \<in> V
[PROOF STEP]
by blast+


[STATEMENT]
lemma act_sup_distl: "\<alpha> x (p \<squnion> q) = (\<alpha> x p) \<squnion> (\<alpha> x q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
have "\<alpha> x (p \<squnion> q) = \<alpha> x (\<Squnion>{p,q})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x (\<Squnion>{p, q})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<alpha> x (p \<squnion> q) = \<alpha> x (\<Squnion>{p, q})

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<alpha> x (p \<squnion> q) = \<alpha> x (\<Squnion>{p, q})

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
have "... = \<Squnion>{\<alpha> x y |y. y \<in> {p,q}}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<alpha> x (\<Squnion>{p, q}) = \<Squnion>{\<alpha> x y |y. y \<in> {p, q}}
[PROOF STEP]
by (rule act4)
[PROOF STATE]
proof (state)
this:
\<alpha> x (\<Squnion>{p, q}) = \<Squnion>{\<alpha> x y |y. y \<in> {p, q}}

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<alpha> x (\<Squnion>{p, q}) = \<Squnion>{\<alpha> x y |y. y \<in> {p, q}}

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
have "... = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion>{\<alpha> x y |y. y \<in> {p, q}} = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}
[PROOF STEP]
by (metis empty_iff insert_iff)
[PROOF STATE]
proof (state)
this:
\<Squnion>{\<alpha> x y |y. y \<in> {p, q}} = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<alpha> x (p \<squnion> q) = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<alpha> x (p \<squnion> q) = \<Squnion>{v. v = \<alpha> x p \<or> v = \<alpha> x q}

goal (1 subgoal):
 1. \<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q
[PROOF STEP]
by (metis Collect_disj_eq Sup_insert ccpo_Sup_singleton insert_def singleton_conv)
[PROOF STATE]
proof (state)
this:
\<alpha> x (p \<squnion> q) = \<alpha> x p \<squnion> \<alpha> x q

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma length_mirror2: "length ps = length (mirror2 ps)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length ps = length (mirror2 ps)
[PROOF STEP]
unfolding mirror2_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length ps = length (mirror2_aux (max2 ps + min2 ps) ps)
[PROOF STEP]
using length_mirror2_aux
[PROOF STATE]
proof (prove)
using this:
length ?ps = length (mirror2_aux ?n ?ps)

goal (1 subgoal):
 1. length ps = length (mirror2_aux (max2 ps + min2 ps) ps)
[PROOF STEP]
by auto


[STATEMENT]
theorem wls_vsubst_subst_compose1:
assumes "wls s X" and "wls (asSort ys) Y"
shows "((X #[Y / y]_ys) #[y1 // y]_ys) = (X #[(Y #[y1 // y]_ys) / y]_ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X #[Y / y]_ys #[y1 // y]_ys = X #[Y #[y1 // y]_ys / y]_ys
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
wls s X
wls (asSort ys) Y

goal (1 subgoal):
 1. X #[Y / y]_ys #[y1 // y]_ys = X #[Y #[y1 // y]_ys / y]_ys
[PROOF STEP]
by(simp add: vsubst_subst_compose1)


[STATEMENT]
lemma map_in_lists: "inj f \<Longrightarrow> map f u \<in> lists (f ` A) \<longleftrightarrow> u \<in> lists A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj f \<Longrightarrow> (map f u \<in> lists (f ` A)) = (u \<in> lists A)
[PROOF STEP]
by (simp add: lists_image inj_image_mem_iff inj_mapI)