[STATEMENT]
lemma createSInt_id_g0:
    fixes b::nat
      and v::int
  assumes "v \<ge> 0"
      and "v < 2^(b-1)"
      and "b > 0"
    shows "createSInt b v = ShowL\<^sub>i\<^sub>n\<^sub>t v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. createSInt b v = \<lfloor>v\<rfloor>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. createSInt b v = \<lfloor>v\<rfloor>
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
0 \<le> v
v < 2 ^ (b - 1)
0 < b
[PROOF STEP]
have "v + 2^(b-1) \<ge> 0"
[PROOF STATE]
proof (prove)
using this:
0 \<le> v
v < 2 ^ (b - 1)
0 < b

goal (1 subgoal):
 1. 0 \<le> v + 2 ^ (b - 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> v + 2 ^ (b - 1)

goal (1 subgoal):
 1. createSInt b v = \<lfloor>v\<rfloor>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 \<le> v + 2 ^ (b - 1)

goal (1 subgoal):
 1. createSInt b v = \<lfloor>v\<rfloor>
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
0 \<le> v
v < 2 ^ (b - 1)
0 < b
[PROOF STEP]
have "v + (2^(b-1)) < 2^b"
[PROOF STATE]
proof (prove)
using this:
0 \<le> v
v < 2 ^ (b - 1)
0 < b

goal (1 subgoal):
 1. v + 2 ^ (b - 1) < 2 ^ b
[PROOF STEP]
using upper_bound[of b]
[PROOF STATE]
proof (prove)
using this:
0 \<le> v
v < 2 ^ (b - 1)
0 < b
\<lbrakk>0 < b; ?c < 2 ^ (b - 1)\<rbrakk> \<Longrightarrow> ?c + 2 ^ (b - 1) < 2 ^ b

goal (1 subgoal):
 1. v + 2 ^ (b - 1) < 2 ^ b
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
v + 2 ^ (b - 1) < 2 ^ b

goal (1 subgoal):
 1. createSInt b v = \<lfloor>v\<rfloor>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 \<le> v + 2 ^ (b - 1)
v + 2 ^ (b - 1) < 2 ^ b
[PROOF STEP]
have "(v + 2^(b-1)) mod (2^b) = v + 2^(b-1)"
[PROOF STATE]
proof (prove)
using this:
0 \<le> v + 2 ^ (b - 1)
v + 2 ^ (b - 1) < 2 ^ b

goal (1 subgoal):
 1. (v + 2 ^ (b - 1)) mod 2 ^ b = v + 2 ^ (b - 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(v + 2 ^ (b - 1)) mod 2 ^ b = v + 2 ^ (b - 1)

goal (1 subgoal):
 1. createSInt b v = \<lfloor>v\<rfloor>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(v + 2 ^ (b - 1)) mod 2 ^ b = v + 2 ^ (b - 1)

goal (1 subgoal):
 1. createSInt b v = \<lfloor>v\<rfloor>
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
0 \<le> v
v < 2 ^ (b - 1)
0 < b
[PROOF STEP]
have "createSInt b v=ShowL\<^sub>i\<^sub>n\<^sub>t (-(2^(b-1)) + (v+2^(b-1)) mod (2^b))"
[PROOF STATE]
proof (prove)
using this:
0 \<le> v
v < 2 ^ (b - 1)
0 < b

goal (1 subgoal):
 1. createSInt b v = \<lfloor>- (2 ^ (b - 1)) + (v + 2 ^ (b - 1)) mod 2 ^ b\<rfloor>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
createSInt b v = \<lfloor>- (2 ^ (b - 1)) + (v + 2 ^ (b - 1)) mod 2 ^ b\<rfloor>

goal (1 subgoal):
 1. createSInt b v = \<lfloor>v\<rfloor>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(v + 2 ^ (b - 1)) mod 2 ^ b = v + 2 ^ (b - 1)
createSInt b v = \<lfloor>- (2 ^ (b - 1)) + (v + 2 ^ (b - 1)) mod 2 ^ b\<rfloor>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(v + 2 ^ (b - 1)) mod 2 ^ b = v + 2 ^ (b - 1)
createSInt b v = \<lfloor>- (2 ^ (b - 1)) + (v + 2 ^ (b - 1)) mod 2 ^ b\<rfloor>

goal (1 subgoal):
 1. createSInt b v = \<lfloor>v\<rfloor>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
createSInt b v = \<lfloor>v\<rfloor>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lastTrailElementNotMarkedImpliesMarkedElementsToLAreMarkedElementsToLInButlastTrail:
  assumes "\<not> marked (last M)"
  shows "markedElementsTo e M = markedElementsTo e (butlast M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. markedElementsTo e M = markedElementsTo e (butlast M)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<not> marked (last M)

goal (1 subgoal):
 1. markedElementsTo e M = markedElementsTo e (butlast M)
[PROOF STEP]
unfolding markedElementsTo_def
[PROOF STATE]
proof (prove)
using this:
\<not> marked (last M)

goal (1 subgoal):
 1. markedElements (prefixToElement e M) = markedElements (prefixToElement e (butlast M))
[PROOF STEP]
by (induct M) auto


[STATEMENT]
lemma sqrt_numeral_simproc_aux:
  assumes "m * m \<equiv> n"
  shows   "sqrt (numeral n :: real) \<equiv> numeral m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (numeral n) \<equiv> numeral m
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sqrt (numeral n) \<equiv> numeral m
[PROOF STEP]
have "numeral n \<equiv> numeral m * (numeral m :: real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. numeral n \<equiv> numeral m * numeral m
[PROOF STEP]
by (simp add: assms [symmetric])
[PROOF STATE]
proof (state)
this:
numeral n \<equiv> numeral m * numeral m

goal (1 subgoal):
 1. sqrt (numeral n) \<equiv> numeral m
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
numeral n \<equiv> numeral m * numeral m

goal (1 subgoal):
 1. sqrt (numeral n) \<equiv> numeral m
[PROOF STEP]
have "sqrt \<dots> \<equiv> numeral m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sqrt (numeral m * numeral m) \<equiv> numeral m
[PROOF STEP]
by (subst real_sqrt_abs2) simp
[PROOF STATE]
proof (state)
this:
sqrt (numeral m * numeral m) \<equiv> numeral m

goal (1 subgoal):
 1. sqrt (numeral n) \<equiv> numeral m
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
numeral n \<equiv> numeral m * numeral m
sqrt (numeral m * numeral m) \<equiv> numeral m
[PROOF STEP]
show "sqrt (numeral n :: real) \<equiv> numeral m"
[PROOF STATE]
proof (prove)
using this:
numeral n \<equiv> numeral m * numeral m
sqrt (numeral m * numeral m) \<equiv> numeral m

goal (1 subgoal):
 1. sqrt (numeral n) \<equiv> numeral m
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sqrt (numeral n) \<equiv> numeral m

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma incseq_SucI: "(\<And>n. X n \<le> X (Suc n)) \<Longrightarrow> incseq X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>n. X n \<le> X (Suc n)) \<Longrightarrow> incseq X
[PROOF STEP]
using lift_Suc_mono_le[of X]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>n. X n \<le> X (Suc n); ?n \<le> ?n'\<rbrakk> \<Longrightarrow> X ?n \<le> X ?n'

goal (1 subgoal):
 1. (\<And>n. X n \<le> X (Suc n)) \<Longrightarrow> incseq X
[PROOF STEP]
by (auto simp: incseq_def)


[STATEMENT]
lemma rel_interior_translation_aux:
  fixes a :: "'n::euclidean_space"
  shows "((\<lambda>x. a + x) ` rel_interior S) \<subseteq> rel_interior ((\<lambda>x. a + x) ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
assume x: "x \<in> rel_interior S"
[PROOF STATE]
proof (state)
this:
x \<in> rel_interior S

goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> rel_interior S
[PROOF STEP]
obtain T where "open T" "x \<in> T \<inter> S" "T \<inter> affine hull S \<subseteq> S"
[PROOF STATE]
proof (prove)
using this:
x \<in> rel_interior S

goal (1 subgoal):
 1. (\<And>T. \<lbrakk>open T; x \<in> T \<inter> S; T \<inter> affine hull S \<subseteq> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using mem_rel_interior[of x S]
[PROOF STATE]
proof (prove)
using this:
x \<in> rel_interior S
(x \<in> rel_interior S) = (\<exists>T. open T \<and> x \<in> T \<inter> S \<and> T \<inter> affine hull S \<subseteq> S)

goal (1 subgoal):
 1. (\<And>T. \<lbrakk>open T; x \<in> T \<inter> S; T \<inter> affine hull S \<subseteq> S\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
open T
x \<in> T \<inter> S
T \<inter> affine hull S \<subseteq> S

goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
open T
x \<in> T \<inter> S
T \<inter> affine hull S \<subseteq> S
[PROOF STEP]
have "open ((\<lambda>x. a + x) ` T)"
      and "a + x \<in> ((\<lambda>x. a + x) ` T) \<inter> ((\<lambda>x. a + x) ` S)"
      and "((\<lambda>x. a + x) ` T) \<inter> affine hull ((\<lambda>x. a + x) ` S) \<subseteq> (\<lambda>x. a + x) ` S"
[PROOF STATE]
proof (prove)
using this:
open T
x \<in> T \<inter> S
T \<inter> affine hull S \<subseteq> S

goal (1 subgoal):
 1. open ((+) a ` T) &&& a + x \<in> (+) a ` T \<inter> (+) a ` S &&& (+) a ` T \<inter> affine hull (+) a ` S \<subseteq> (+) a ` S
[PROOF STEP]
using affine_hull_translation[of a S] open_translation[of T a] x
[PROOF STATE]
proof (prove)
using this:
open T
x \<in> T \<inter> S
T \<inter> affine hull S \<subseteq> S
affine hull (+) a ` S = (+) a ` (affine hull S)
open T \<Longrightarrow> open ((+) a ` T)
x \<in> rel_interior S

goal (1 subgoal):
 1. open ((+) a ` T) &&& a + x \<in> (+) a ` T \<inter> (+) a ` S &&& (+) a ` T \<inter> affine hull (+) a ` S \<subseteq> (+) a ` S
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
open ((+) a ` T)
a + x \<in> (+) a ` T \<inter> (+) a ` S
(+) a ` T \<inter> affine hull (+) a ` S \<subseteq> (+) a ` S

goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
open ((+) a ` T)
a + x \<in> (+) a ` T \<inter> (+) a ` S
(+) a ` T \<inter> affine hull (+) a ` S \<subseteq> (+) a ` S
[PROOF STEP]
have "a + x \<in> rel_interior ((\<lambda>x. a + x) ` S)"
[PROOF STATE]
proof (prove)
using this:
open ((+) a ` T)
a + x \<in> (+) a ` T \<inter> (+) a ` S
(+) a ` T \<inter> affine hull (+) a ` S \<subseteq> (+) a ` S

goal (1 subgoal):
 1. a + x \<in> rel_interior ((+) a ` S)
[PROOF STEP]
using mem_rel_interior[of "a+x" "((\<lambda>x. a + x) ` S)"]
[PROOF STATE]
proof (prove)
using this:
open ((+) a ` T)
a + x \<in> (+) a ` T \<inter> (+) a ` S
(+) a ` T \<inter> affine hull (+) a ` S \<subseteq> (+) a ` S
(a + x \<in> rel_interior ((+) a ` S)) = (\<exists>T. open T \<and> a + x \<in> T \<inter> (+) a ` S \<and> T \<inter> affine hull (+) a ` S \<subseteq> (+) a ` S)

goal (1 subgoal):
 1. a + x \<in> rel_interior ((+) a ` S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
a + x \<in> rel_interior ((+) a ` S)

goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?x2 \<in> rel_interior S \<Longrightarrow> a + ?x2 \<in> rel_interior ((+) a ` S)

goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x2 \<in> rel_interior S \<Longrightarrow> a + ?x2 \<in> rel_interior ((+) a ` S)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
?x2 \<in> rel_interior S \<Longrightarrow> a + ?x2 \<in> rel_interior ((+) a ` S)

goal (1 subgoal):
 1. (+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(+) a ` rel_interior S \<subseteq> rel_interior ((+) a ` S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma insert_ran_image:
  assumes j: "j < Suc n"
  assumes img: "f ` {0..<n} = {0..<n}"
  shows "insert_ran f j ` {0..<n} = {0..<Suc n} - {j}" (is "?L = ?R")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
have "?L = (\<lambda>i. insert_index j (f i)) ` {0..<n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = (\<lambda>i. insert_index j (f i)) ` {0..<n}
[PROOF STEP]
unfolding insert_ran_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. insert_index j (f i)) ` {0..<n} = (\<lambda>i. insert_index j (f i)) ` {0..<n}
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
insert_ran f j ` {0..<n} = (\<lambda>i. insert_index j (f i)) ` {0..<n}

goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
insert_ran f j ` {0..<n} = (\<lambda>i. insert_index j (f i)) ` {0..<n}

goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
have "... = (insert_index j \<circ> f) ` {0..<n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. insert_index j (f i)) ` {0..<n} = (insert_index j \<circ> f) ` {0..<n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>i. insert_index j (f i)) ` {0..<n} = (insert_index j \<circ> f) ` {0..<n}

goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>i. insert_index j (f i)) ` {0..<n} = (insert_index j \<circ> f) ` {0..<n}

goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
have "... = insert_index j ` f ` {0..<n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (insert_index j \<circ> f) ` {0..<n} = insert_index j ` f ` {0..<n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(insert_index j \<circ> f) ` {0..<n} = insert_index j ` f ` {0..<n}

goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(insert_index j \<circ> f) ` {0..<n} = insert_index j ` f ` {0..<n}

goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
have "... = insert_index j ` {0..<n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert_index j ` f ` {0..<n} = insert_index j ` {0..<n}
[PROOF STEP]
unfolding img
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert_index j ` {0..<n} = insert_index j ` {0..<n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
insert_index j ` f ` {0..<n} = insert_index j ` {0..<n}

goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
insert_ran f j ` {0..<n} = insert_index j ` {0..<n}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
insert_ran f j ` {0..<n} = insert_index j ` {0..<n}

goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
using insert_index_image[OF j]
[PROOF STATE]
proof (prove)
using this:
insert_ran f j ` {0..<n} = insert_index j ` {0..<n}
insert_index j ` {0..<n} = {0..<Suc n} - {j}

goal (1 subgoal):
 1. insert_ran f j ` {0..<n} = {0..<Suc n} - {j}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
insert_ran f j ` {0..<n} = {0..<Suc n} - {j}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bounded_antilinear_o_bounded_clinear:
  assumes "bounded_antilinear f"
    and "bounded_clinear g"
  shows "bounded_antilinear (\<lambda>x. f (g x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_antilinear (\<lambda>x. f (g x))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x y. f (g (x + y)) = f (g x) + f (g y)
 2. \<And>r x. f (g (r *\<^sub>C x)) = cnj r *\<^sub>C f (g x)
 3. \<exists>K. \<forall>x. norm (f (g x)) \<le> norm x * K
[PROOF STEP]
interpret f: bounded_antilinear f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_antilinear f
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x y. f (g (x + y)) = f (g x) + f (g y)
 2. \<And>r x. f (g (r *\<^sub>C x)) = cnj r *\<^sub>C f (g x)
 3. \<exists>K. \<forall>x. norm (f (g x)) \<le> norm x * K
[PROOF STEP]
interpret g: bounded_clinear g
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_clinear g
[PROOF STEP]
by fact
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>x y. f (g (x + y)) = f (g x) + f (g y)
 2. \<And>r x. f (g (r *\<^sub>C x)) = cnj r *\<^sub>C f (g x)
 3. \<exists>K. \<forall>x. norm (f (g x)) \<le> norm x * K
[PROOF STEP]
show "f (g (x + y)) = f (g x) + f (g y)" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (g (x + y)) = f (g x) + f (g y)
[PROOF STEP]
by (simp only: f.add g.add)
[PROOF STATE]
proof (state)
this:
f (g (?x + ?y)) = f (g ?x) + f (g ?y)

goal (2 subgoals):
 1. \<And>r x. f (g (r *\<^sub>C x)) = cnj r *\<^sub>C f (g x)
 2. \<exists>K. \<forall>x. norm (f (g x)) \<le> norm x * K
[PROOF STEP]
show "f (g (scaleC r x)) = scaleC (cnj r) (f (g x))" for r x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (g (r *\<^sub>C x)) = cnj r *\<^sub>C f (g x)
[PROOF STEP]
by (simp add: f.scaleC g.scaleC)
[PROOF STATE]
proof (state)
this:
f (g (?r *\<^sub>C ?x)) = cnj ?r *\<^sub>C f (g ?x)

goal (1 subgoal):
 1. \<exists>K. \<forall>x. norm (f (g x)) \<le> norm x * K
[PROOF STEP]
have "bounded_linear (\<lambda>x. f (g x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_linear (\<lambda>x. f (g x))
[PROOF STEP]
using f.bounded_linear g.bounded_linear
[PROOF STATE]
proof (prove)
using this:
bounded_linear f
bounded_linear g

goal (1 subgoal):
 1. bounded_linear (\<lambda>x. f (g x))
[PROOF STEP]
by (rule bounded_linear_compose)
[PROOF STATE]
proof (state)
this:
bounded_linear (\<lambda>x. f (g x))

goal (1 subgoal):
 1. \<exists>K. \<forall>x. norm (f (g x)) \<le> norm x * K
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bounded_linear (\<lambda>x. f (g x))
[PROOF STEP]
show "\<exists>K. \<forall>x. norm (f (g x)) \<le> norm x * K"
[PROOF STATE]
proof (prove)
using this:
bounded_linear (\<lambda>x. f (g x))

goal (1 subgoal):
 1. \<exists>K. \<forall>x. norm (f (g x)) \<le> norm x * K
[PROOF STEP]
by (rule bounded_linear.bounded)
[PROOF STATE]
proof (state)
this:
\<exists>K. \<forall>x. norm (f (g x)) \<le> norm x * K

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma integral_Dirichlet_kernel [simp]:
  "integral\<^sup>L (lebesgue_on {-pi..pi}) (Dirichlet_kernel n) = pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi
[PROOF STEP]
have "integral\<^sup>L (lebesgue_on {-pi..pi}) (Dirichlet_kernel n) = LINT x|lebesgue_on {-pi..pi}. 1/2 + (\<Sum>k = Suc 0..n. cos (k * x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = LINT x|lebesgue_on {- pi..pi}. 1 / 2 + (\<Sum>k = Suc 0..n. cos (real k * x))
[PROOF STEP]
using pi_ge_two
[PROOF STATE]
proof (prove)
using this:
2 \<le> pi

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = LINT x|lebesgue_on {- pi..pi}. 1 / 2 + (\<Sum>k = Suc 0..n. cos (real k * x))
[PROOF STEP]
by (force intro: Bochner_Integration.integral_cong [OF refl Dirichlet_kernel_cosine_sum])
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = LINT x|lebesgue_on {- pi..pi}. 1 / 2 + (\<Sum>k = Suc 0..n. cos (real k * x))

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = LINT x|lebesgue_on {- pi..pi}. 1 / 2 + (\<Sum>k = Suc 0..n. cos (real k * x))

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi
[PROOF STEP]
have "\<dots> = (LINT x|lebesgue_on {-pi..pi}. 1/2) + (LINT x|lebesgue_on {-pi..pi}. (\<Sum>k = Suc 0..n. cos (k * x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LINT x|lebesgue_on {- pi..pi}. 1 / 2 + (\<Sum>k = Suc 0..n. cos (real k * x)) = (LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x)))
[PROOF STEP]
proof (rule Bochner_Integration.integral_add)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. integrable (lebesgue_on {- pi..pi}) (\<lambda>x. 1 / 2)
 2. integrable (lebesgue_on {- pi..pi}) (\<lambda>x. \<Sum>k = Suc 0..n. cos (real k * x))
[PROOF STEP]
show "integrable (lebesgue_on {-pi..pi}) (\<lambda>x. \<Sum>k = Suc 0..n. cos (real k * x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable (lebesgue_on {- pi..pi}) (\<lambda>x. \<Sum>k = Suc 0..n. cos (real k * x))
[PROOF STEP]
by (rule Bochner_Integration.integrable_sum) (metis integrable_cos_cx mult_commute_abs)
[PROOF STATE]
proof (state)
this:
integrable (lebesgue_on {- pi..pi}) (\<lambda>x. \<Sum>k = Suc 0..n. cos (real k * x))

goal (1 subgoal):
 1. integrable (lebesgue_on {- pi..pi}) (\<lambda>x. 1 / 2)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
LINT x|lebesgue_on {- pi..pi}. 1 / 2 + (\<Sum>k = Suc 0..n. cos (real k * x)) = (LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x)))

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
LINT x|lebesgue_on {- pi..pi}. 1 / 2 + (\<Sum>k = Suc 0..n. cos (real k * x)) = (LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x)))

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi
[PROOF STEP]
have "\<dots> = pi"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x))) = pi
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x))) = pi
[PROOF STEP]
have "\<And>i. \<lbrakk>Suc 0 \<le> i; i \<le> n\<rbrakk>
         \<Longrightarrow> integrable (lebesgue_on {-pi..pi}) (\<lambda>x. cos (real i * x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. \<lbrakk>Suc 0 \<le> i; i \<le> n\<rbrakk> \<Longrightarrow> integrable (lebesgue_on {- pi..pi}) (\<lambda>x. cos (real i * x))
[PROOF STEP]
by (metis integrable_cos_cx mult_commute_abs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>Suc 0 \<le> ?i; ?i \<le> n\<rbrakk> \<Longrightarrow> integrable (lebesgue_on {- pi..pi}) (\<lambda>x. cos (real ?i * x))

goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x))) = pi
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>Suc 0 \<le> ?i; ?i \<le> n\<rbrakk> \<Longrightarrow> integrable (lebesgue_on {- pi..pi}) (\<lambda>x. cos (real ?i * x))
[PROOF STEP]
have "LINT x|lebesgue_on {-pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x)) = 0"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>Suc 0 \<le> ?i; ?i \<le> n\<rbrakk> \<Longrightarrow> integrable (lebesgue_on {- pi..pi}) (\<lambda>x. cos (real ?i * x))

goal (1 subgoal):
 1. LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x)) = 0
[PROOF STEP]
by (simp add: Bochner_Integration.integral_sum)
[PROOF STATE]
proof (state)
this:
LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x)) = 0

goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x))) = pi
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x)) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x)) = 0

goal (1 subgoal):
 1. (LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x))) = pi
[PROOF STEP]
by (auto simp: measure_restrict_space)
[PROOF STATE]
proof (state)
this:
(LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x))) = pi

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(LINT x|lebesgue_on {- pi..pi}. 1 / 2) + (LINT x|lebesgue_on {- pi..pi}. (\<Sum>k = Suc 0..n. cos (real k * x))) = pi

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi

goal (1 subgoal):
 1. integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
integral\<^sup>L (lebesgue_on {- pi..pi}) (Dirichlet_kernel n) = pi

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sq_norm_factor_bound:
  fixes f h :: "int poly"
  assumes dvd: "h dvd f" and f0: "f \<noteq> 0"
  shows "\<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
let ?r = real_of_int
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
have h21: "?r \<parallel>h\<parallel>\<^sup>2 \<le> (?r (norm1 h))^2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int \<parallel>h\<parallel>\<^sup>2 \<le> (real_of_int (norm1 h))\<^sup>2
[PROOF STEP]
using norm2_le_norm1_int[of h]
[PROOF STATE]
proof (prove)
using this:
\<parallel>h\<parallel>\<^sup>2 \<le> (norm1 h)\<^sup>2

goal (1 subgoal):
 1. real_of_int \<parallel>h\<parallel>\<^sup>2 \<le> (real_of_int (norm1 h))\<^sup>2
[PROOF STEP]
by (metis of_int_le_iff of_int_power)
[PROOF STATE]
proof (state)
this:
real_of_int \<parallel>h\<parallel>\<^sup>2 \<le> (real_of_int (norm1 h))\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real_of_int \<parallel>h\<parallel>\<^sup>2 \<le> (real_of_int (norm1 h))\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
have "\<dots> \<le> (2^(degree h) * mahler_measure h)^2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (real_of_int (norm1 h))\<^sup>2 \<le> (2 ^ degree h * mahler_measure h)\<^sup>2
[PROOF STEP]
using power_mono[OF norm_1_bound_mignotte[of h], of 2]
[PROOF STATE]
proof (prove)
using this:
0 \<le> real_of_int (norm1 h) \<Longrightarrow> (real_of_int (norm1 h))\<^sup>2 \<le> (2 ^ degree h * mahler_measure h)\<^sup>2

goal (1 subgoal):
 1. (real_of_int (norm1 h))\<^sup>2 \<le> (2 ^ degree h * mahler_measure h)\<^sup>2
[PROOF STEP]
by (auto simp: norm1_ge_0)
[PROOF STATE]
proof (state)
this:
(real_of_int (norm1 h))\<^sup>2 \<le> (2 ^ degree h * mahler_measure h)\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(real_of_int (norm1 h))\<^sup>2 \<le> (2 ^ degree h * mahler_measure h)\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
have "\<dots> = 2^(2 * degree h) * (mahler_measure h)^2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (2 ^ degree h * mahler_measure h)\<^sup>2 = 2 ^ (2 * degree h) * (mahler_measure h)\<^sup>2
[PROOF STEP]
by (simp add: power_even_eq power_mult_distrib)
[PROOF STATE]
proof (state)
this:
(2 ^ degree h * mahler_measure h)\<^sup>2 = 2 ^ (2 * degree h) * (mahler_measure h)\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(2 ^ degree h * mahler_measure h)\<^sup>2 = 2 ^ (2 * degree h) * (mahler_measure h)\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
have "\<dots> \<le> 2^(2 * degree h) * (mahler_measure f)^2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ (2 * degree h) * (mahler_measure h)\<^sup>2 \<le> 2 ^ (2 * degree h) * (mahler_measure f)\<^sup>2
[PROOF STEP]
by (rule mult_left_mono[OF power_mono], auto simp: mahler_measure_ge_0
    mahler_measure_dvd[OF f0 dvd])
[PROOF STATE]
proof (state)
this:
2 ^ (2 * degree h) * (mahler_measure h)\<^sup>2 \<le> 2 ^ (2 * degree h) * (mahler_measure f)\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 ^ (2 * degree h) * (mahler_measure h)\<^sup>2 \<le> 2 ^ (2 * degree h) * (mahler_measure f)\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
have "\<dots> \<le> 2^(2 * degree h) * ?r (\<parallel>f\<parallel>\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ (2 * degree h) * (mahler_measure f)\<^sup>2 \<le> 2 ^ (2 * degree h) * real_of_int \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
proof (rule mult_left_mono)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (mahler_measure f)\<^sup>2 \<le> real_of_int \<parallel>f\<parallel>\<^sup>2
 2. 0 \<le> 2 ^ (2 * degree h)
[PROOF STEP]
have "?r (\<parallel>f\<parallel>\<^sup>2) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> real_of_int \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> real_of_int \<parallel>f\<parallel>\<^sup>2

goal (2 subgoals):
 1. (mahler_measure f)\<^sup>2 \<le> real_of_int \<parallel>f\<parallel>\<^sup>2
 2. 0 \<le> 2 ^ (2 * degree h)
[PROOF STEP]
from real_sqrt_pow2[OF this]
[PROOF STATE]
proof (chain)
picking this:
(sqrt (real_of_int \<parallel>f\<parallel>\<^sup>2))\<^sup>2 = real_of_int \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
show "(mahler_measure f)\<^sup>2 \<le> ?r (\<parallel>f\<parallel>\<^sup>2)"
[PROOF STATE]
proof (prove)
using this:
(sqrt (real_of_int \<parallel>f\<parallel>\<^sup>2))\<^sup>2 = real_of_int \<parallel>f\<parallel>\<^sup>2

goal (1 subgoal):
 1. (mahler_measure f)\<^sup>2 \<le> real_of_int \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
using power_mono[OF mahler_measure_l2norm[of f], of 2]
[PROOF STATE]
proof (prove)
using this:
(sqrt (real_of_int \<parallel>f\<parallel>\<^sup>2))\<^sup>2 = real_of_int \<parallel>f\<parallel>\<^sup>2
0 \<le> mahler_measure f \<Longrightarrow> (mahler_measure f)\<^sup>2 \<le> (sqrt (real_of_int \<parallel>f\<parallel>\<^sup>2))\<^sup>2

goal (1 subgoal):
 1. (mahler_measure f)\<^sup>2 \<le> real_of_int \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
by (auto simp: mahler_measure_ge_0)
[PROOF STATE]
proof (state)
this:
(mahler_measure f)\<^sup>2 \<le> real_of_int \<parallel>f\<parallel>\<^sup>2

goal (1 subgoal):
 1. 0 \<le> 2 ^ (2 * degree h)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
2 ^ (2 * degree h) * (mahler_measure f)\<^sup>2 \<le> 2 ^ (2 * degree h) * real_of_int \<parallel>f\<parallel>\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
2 ^ (2 * degree h) * (mahler_measure f)\<^sup>2 \<le> 2 ^ (2 * degree h) * real_of_int \<parallel>f\<parallel>\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
have "\<dots> = ?r (2^(2*degree h) * \<parallel>f\<parallel>\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ (2 * degree h) * real_of_int \<parallel>f\<parallel>\<^sup>2 = real_of_int (2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2)
[PROOF STEP]
by (simp add: ac_simps)
[PROOF STATE]
proof (state)
this:
2 ^ (2 * degree h) * real_of_int \<parallel>f\<parallel>\<^sup>2 = real_of_int (2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2)

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
real_of_int \<parallel>h\<parallel>\<^sup>2 \<le> real_of_int (2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2)
[PROOF STEP]
show "\<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2"
[PROOF STATE]
proof (prove)
using this:
real_of_int \<parallel>h\<parallel>\<^sup>2 \<le> real_of_int (2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2)

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
unfolding of_int_le_iff
[PROOF STATE]
proof (prove)
using this:
\<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2

goal (1 subgoal):
 1. \<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<parallel>h\<parallel>\<^sup>2 \<le> 2 ^ (2 * degree h) * \<parallel>f\<parallel>\<^sup>2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inj_on_funpow_dist:
  assumes "y \<in> orbit f x" shows "inj_on (\<lambda>n. (f ^^ n) x) {0..funpow_dist f x y}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>n. (f ^^ n) x) {0..funpow_dist f x y}
[PROOF STEP]
using funpow_neq_less_funpow_dist[OF assms]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?m \<le> funpow_dist f x y; ?n \<le> funpow_dist f x y; ?m \<noteq> ?n\<rbrakk> \<Longrightarrow> (f ^^ ?m) x \<noteq> (f ^^ ?n) x

goal (1 subgoal):
 1. inj_on (\<lambda>n. (f ^^ n) x) {0..funpow_dist f x y}
[PROOF STEP]
by (intro inj_onI) auto


[STATEMENT]
lemma diagonal_to_Smith_PQ_JNF_local_typedef:
  assumes A: "isDiagonal_mat A" and ib: "is_bezout_ext bezout"
  and A_dim: "A \<in> carrier_mat m n"
  assumes PSQ: "(P,S,Q) = diagonal_to_Smith_PQ_JNF A bezout"
  shows "S = P*A*Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S
  \<and> P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S \<and> P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S \<and> P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n
[PROOF STEP]
have dim_matrices: "P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n
[PROOF STEP]
by (rule diagonal_to_Smith_PQ_JNF_dim[OF A_dim PSQ[symmetric]])
[PROOF STATE]
proof (state)
this:
P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n

goal (1 subgoal):
 1. S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S \<and> P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S \<and> P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n
[PROOF STEP]
using diagonal_to_Smith_PQ_JNF_internalized[where ?'c='c, where ?'a='b,
      OF type_to_set2(1) type_to_set(1), of m A S P Q]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<exists>Rep Abs. type_definition Rep Abs {0..<int m}; 1 < m; A \<in> carrier_mat CARD('b) CARD('c); S \<in> carrier_mat CARD('b) CARD('c); P \<in> carrier_mat CARD('b) CARD('b); Q \<in> carrier_mat CARD('c) CARD('c); diagonal_to_Smith_PQ_JNF A ?bezout = (P, S, Q); isDiagonal_mat A; is_bezout_ext ?bezout\<rbrakk> \<Longrightarrow> S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S

goal (1 subgoal):
 1. S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S \<and> P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n
[PROOF STEP]
unfolding type_to_set1(2)[symmetric] type_to_set2(2)[symmetric]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<exists>Rep Abs. type_definition Rep Abs {0..<int m}; 1 < m; A \<in> carrier_mat m n; S \<in> carrier_mat m n; P \<in> carrier_mat m m; Q \<in> carrier_mat n n; diagonal_to_Smith_PQ_JNF A ?bezout = (P, S, Q); isDiagonal_mat A; is_bezout_ext ?bezout\<rbrakk> \<Longrightarrow> S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S

goal (1 subgoal):
 1. S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S \<and> P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n
[PROOF STEP]
using assms m dim_matrices local_typedef1
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<exists>Rep Abs. type_definition Rep Abs {0..<int m}; 1 < m; A \<in> carrier_mat m n; S \<in> carrier_mat m n; P \<in> carrier_mat m m; Q \<in> carrier_mat n n; diagonal_to_Smith_PQ_JNF A ?bezout = (P, S, Q); isDiagonal_mat A; is_bezout_ext ?bezout\<rbrakk> \<Longrightarrow> S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S
isDiagonal_mat A
is_bezout_ext bezout
A \<in> carrier_mat m n
(P, S, Q) = diagonal_to_Smith_PQ_JNF A bezout
1 < m
P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n
\<exists>Rep Abs. type_definition Rep Abs {0..<int m}

goal (1 subgoal):
 1. S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S \<and> P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
S = P * A * Q \<and> invertible_mat P \<and> invertible_mat Q \<and> Smith_normal_form_mat S \<and> P \<in> carrier_mat m m \<and> S \<in> carrier_mat m n \<and> Q \<in> carrier_mat n n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma at_right_to_0: "at_right a = filtermap (\<lambda>x. x + a) (at_right 0)"
  for a :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. at_right a = filtermap (\<lambda>x. x + a) (at_right 0)
[PROOF STEP]
using filtermap_at_right_shift[of "-a" 0]
[PROOF STATE]
proof (prove)
using this:
filtermap (\<lambda>x. x - - a) (at_right 0) = at_right (0 - - a)

goal (1 subgoal):
 1. at_right a = filtermap (\<lambda>x. x + a) (at_right 0)
[PROOF STEP]
by simp


[STATEMENT]
lemma poly_fun_comp:
  assumes "poly_fun f" and "poly_fun g"
  shows "poly_fun (\<lambda>x. f (g x))" and "poly_fun (f \<circ> g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_fun (\<lambda>x. f (g x)) &&& poly_fun (f \<circ> g)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. poly_fun (\<lambda>x. f (g x))
 2. poly_fun (f \<circ> g)
[PROOF STEP]
from assms(1)
[PROOF STATE]
proof (chain)
picking this:
poly_fun f
[PROOF STEP]
obtain p where p: "\<And>a. rat_of_int (f a) = poly p (rat_of_int a)"
[PROOF STATE]
proof (prove)
using this:
poly_fun f

goal (1 subgoal):
 1. (\<And>p. (\<And>a. rat_of_int (f a) = poly p (rat_of_int a)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule poly_funE, blast)
[PROOF STATE]
proof (state)
this:
rat_of_int (f ?a) = poly p (rat_of_int ?a)

goal (2 subgoals):
 1. poly_fun (\<lambda>x. f (g x))
 2. poly_fun (f \<circ> g)
[PROOF STEP]
from assms(2)
[PROOF STATE]
proof (chain)
picking this:
poly_fun g
[PROOF STEP]
obtain q where q: "\<And>a. rat_of_int (g a) = poly q (rat_of_int a)"
[PROOF STATE]
proof (prove)
using this:
poly_fun g

goal (1 subgoal):
 1. (\<And>q. (\<And>a. rat_of_int (g a) = poly q (rat_of_int a)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule poly_funE, blast)
[PROOF STATE]
proof (state)
this:
rat_of_int (g ?a) = poly q (rat_of_int ?a)

goal (2 subgoals):
 1. poly_fun (\<lambda>x. f (g x))
 2. poly_fun (f \<circ> g)
[PROOF STEP]
show "poly_fun (\<lambda>x. f (g x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_fun (\<lambda>x. f (g x))
[PROOF STEP]
by (rule poly_funI[where p="p \<circ>\<^sub>p q"]) (simp add: p q poly_pcompose)
[PROOF STATE]
proof (state)
this:
poly_fun (\<lambda>x. f (g x))

goal (1 subgoal):
 1. poly_fun (f \<circ> g)
[PROOF STEP]
thus "poly_fun (f \<circ> g)"
[PROOF STATE]
proof (prove)
using this:
poly_fun (\<lambda>x. f (g x))

goal (1 subgoal):
 1. poly_fun (f \<circ> g)
[PROOF STEP]
by (simp only: comp_def)
[PROOF STATE]
proof (state)
this:
poly_fun (f \<circ> g)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma norm_vec_index_unit_vec_is_0 [simp]:
  assumes "j < n" and "j \<noteq> i"
  shows "cmod ((unit_vec n i) $ j) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cmod (unit_vec n i $ j) = 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
j < n
j \<noteq> i

goal (1 subgoal):
 1. cmod (unit_vec n i $ j) = 0
[PROOF STEP]
by (simp add: unit_vec_def)


[STATEMENT]
lemma index_set_lm_1: "\<lbrakk> index_set A; n\<in> A; nat_to_ce_set n = nat_to_ce_set m \<rbrakk> \<Longrightarrow> m \<in> A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>index_set A; n \<in> A; nat_to_ce_set n = nat_to_ce_set m\<rbrakk> \<Longrightarrow> m \<in> A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>index_set A; n \<in> A; nat_to_ce_set n = nat_to_ce_set m\<rbrakk> \<Longrightarrow> m \<in> A
[PROOF STEP]
assume A1: "index_set A"
[PROOF STATE]
proof (state)
this:
index_set A

goal (1 subgoal):
 1. \<lbrakk>index_set A; n \<in> A; nat_to_ce_set n = nat_to_ce_set m\<rbrakk> \<Longrightarrow> m \<in> A
[PROOF STEP]
assume A2: "n \<in> A"
[PROOF STATE]
proof (state)
this:
n \<in> A

goal (1 subgoal):
 1. \<lbrakk>index_set A; n \<in> A; nat_to_ce_set n = nat_to_ce_set m\<rbrakk> \<Longrightarrow> m \<in> A
[PROOF STEP]
assume A3: "nat_to_ce_set n = nat_to_ce_set m"
[PROOF STATE]
proof (state)
this:
nat_to_ce_set n = nat_to_ce_set m

goal (1 subgoal):
 1. \<lbrakk>index_set A; n \<in> A; nat_to_ce_set n = nat_to_ce_set m\<rbrakk> \<Longrightarrow> m \<in> A
[PROOF STEP]
from A2 A3
[PROOF STATE]
proof (chain)
picking this:
n \<in> A
nat_to_ce_set n = nat_to_ce_set m
[PROOF STEP]
have L1: "n \<in> A \<and> (nat_to_ce_set n = nat_to_ce_set m)"
[PROOF STATE]
proof (prove)
using this:
n \<in> A
nat_to_ce_set n = nat_to_ce_set m

goal (1 subgoal):
 1. n \<in> A \<and> nat_to_ce_set n = nat_to_ce_set m
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
n \<in> A \<and> nat_to_ce_set n = nat_to_ce_set m

goal (1 subgoal):
 1. \<lbrakk>index_set A; n \<in> A; nat_to_ce_set n = nat_to_ce_set m\<rbrakk> \<Longrightarrow> m \<in> A
[PROOF STEP]
from A1
[PROOF STATE]
proof (chain)
picking this:
index_set A
[PROOF STEP]
have L2: "\<forall> n m. n \<in> A \<and> (nat_to_ce_set n = nat_to_ce_set m) \<longrightarrow> m \<in> A"
[PROOF STATE]
proof (prove)
using this:
index_set A

goal (1 subgoal):
 1. \<forall>n m. n \<in> A \<and> nat_to_ce_set n = nat_to_ce_set m \<longrightarrow> m \<in> A
[PROOF STEP]
by (unfold index_set_def)
[PROOF STATE]
proof (state)
this:
\<forall>n m. n \<in> A \<and> nat_to_ce_set n = nat_to_ce_set m \<longrightarrow> m \<in> A

goal (1 subgoal):
 1. \<lbrakk>index_set A; n \<in> A; nat_to_ce_set n = nat_to_ce_set m\<rbrakk> \<Longrightarrow> m \<in> A
[PROOF STEP]
from L1 L2
[PROOF STATE]
proof (chain)
picking this:
n \<in> A \<and> nat_to_ce_set n = nat_to_ce_set m
\<forall>n m. n \<in> A \<and> nat_to_ce_set n = nat_to_ce_set m \<longrightarrow> m \<in> A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n \<in> A \<and> nat_to_ce_set n = nat_to_ce_set m
\<forall>n m. n \<in> A \<and> nat_to_ce_set n = nat_to_ce_set m \<longrightarrow> m \<in> A

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma dickson_grading_lcs_minus:
  assumes "dickson_grading d"
  shows "d (lcs s t - s) \<le> max (d s) (d t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d (lcs s t - s) \<le> max (d s) (d t)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. d (lcs s t - s) \<le> max (d s) (d t)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
dickson_grading d
[PROOF STEP]
have "d (lcs s t - s) \<le> d (lcs s t)"
[PROOF STATE]
proof (prove)
using this:
dickson_grading d

goal (1 subgoal):
 1. d (lcs s t - s) \<le> d (lcs s t)
[PROOF STEP]
by (rule dickson_grading_minus, intro adds_lcs)
[PROOF STATE]
proof (state)
this:
d (lcs s t - s) \<le> d (lcs s t)

goal (1 subgoal):
 1. d (lcs s t - s) \<le> max (d s) (d t)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d (lcs s t - s) \<le> d (lcs s t)

goal (1 subgoal):
 1. d (lcs s t - s) \<le> max (d s) (d t)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
dickson_grading d
[PROOF STEP]
have "... \<le> max (d s) (d t)"
[PROOF STATE]
proof (prove)
using this:
dickson_grading d

goal (1 subgoal):
 1. d (lcs s t) \<le> max (d s) (d t)
[PROOF STEP]
by (rule dickson_grading_lcs)
[PROOF STATE]
proof (state)
this:
d (lcs s t) \<le> max (d s) (d t)

goal (1 subgoal):
 1. d (lcs s t - s) \<le> max (d s) (d t)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
d (lcs s t - s) \<le> max (d s) (d t)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
d (lcs s t - s) \<le> max (d s) (d t)

goal (1 subgoal):
 1. d (lcs s t - s) \<le> max (d s) (d t)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
d (lcs s t - s) \<le> max (d s) (d t)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma idx_correct:
  assumes "distinct xs"
  shows "idx xs y = Some n \<longleftrightarrow> n < length xs \<and> xs ! n = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (idx xs y = Some n) = (n < length xs \<and> xs ! n = y)
[PROOF STEP]
using idx'_correct[OF assms]
[PROOF STATE]
proof (prove)
using this:
(idx' ?ctr xs ?y = Some ?n) = (?ctr \<le> ?n \<and> ?n < length xs + ?ctr \<and> xs ! (?n - ?ctr) = ?y)

goal (1 subgoal):
 1. (idx xs y = Some n) = (n < length xs \<and> xs ! n = y)
[PROOF STEP]
by (simp add: idx_def)


[STATEMENT]
lemma (in prob_space) emeasure_intersection:
  fixes e::"nat \<Rightarrow> real"
  assumes [measurable]: "\<And>n. U n \<in> sets M"
      and [simp]: "\<And>n. 0 \<le> e n" "summable e"
      and ge: "\<And>n. emeasure M (U n) \<ge> 1 - (e n)"
  shows "emeasure M (\<Inter>n. U n) \<ge> 1 - (\<Sum>n. e n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
define V where "V = (\<lambda>n. space M - (U n))"
[PROOF STATE]
proof (state)
this:
V = (\<lambda>n. space M - U n)

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
have [measurable]: "V n \<in> sets M" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. V n \<in> events
[PROOF STEP]
unfolding V_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. space M - U n \<in> events
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
V ?n12 \<in> events

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
have *: "emeasure M (V n) \<le> e n" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (V n) \<le> ennreal (e n)
[PROOF STEP]
unfolding V_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (space M - U n) \<le> ennreal (e n)
[PROOF STEP]
using ge[of n]
[PROOF STATE]
proof (prove)
using this:
ennreal (1 - e n) \<le> emeasure M (U n)

goal (1 subgoal):
 1. emeasure M (space M - U n) \<le> ennreal (e n)
[PROOF STEP]
by (simp add: emeasure_eq_measure prob_compl ennreal_leI)
[PROOF STATE]
proof (state)
this:
emeasure M (V ?n12) \<le> ennreal (e ?n12)

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
have "emeasure M (\<Union>n. V n) \<le> (\<Sum>n. emeasure M (V n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (\<Union> (range V)) \<le> (\<Sum>n. emeasure M (V n))
[PROOF STEP]
by (rule emeasure_subadditive_countably, auto)
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union> (range V)) \<le> (\<Sum>n. emeasure M (V n))

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union> (range V)) \<le> (\<Sum>n. emeasure M (V n))

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
have "... \<le> (\<Sum>n. ennreal (e n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n. emeasure M (V n)) \<le> (\<Sum>n. ennreal (e n))
[PROOF STEP]
using *
[PROOF STATE]
proof (prove)
using this:
emeasure M (V ?n12) \<le> ennreal (e ?n12)

goal (1 subgoal):
 1. (\<Sum>n. emeasure M (V n)) \<le> (\<Sum>n. ennreal (e n))
[PROOF STEP]
by (intro suminf_le) auto
[PROOF STATE]
proof (state)
this:
(\<Sum>n. emeasure M (V n)) \<le> (\<Sum>n. ennreal (e n))

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>n. emeasure M (V n)) \<le> (\<Sum>n. ennreal (e n))

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
have "... = ennreal (\<Sum>n. e n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>n. ennreal (e n)) = ennreal (\<Sum>n. e n)
[PROOF STEP]
by (intro suminf_ennreal_eq) auto
[PROOF STATE]
proof (state)
this:
(\<Sum>n. ennreal (e n)) = ennreal (\<Sum>n. e n)

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure M (\<Union> (range V)) \<le> ennreal (\<Sum>n. e n)
[PROOF STEP]
have "emeasure M (\<Union>n. V n) \<le> suminf e"
[PROOF STATE]
proof (prove)
using this:
emeasure M (\<Union> (range V)) \<le> ennreal (\<Sum>n. e n)

goal (1 subgoal):
 1. emeasure M (\<Union> (range V)) \<le> ennreal (suminf e)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
emeasure M (\<Union> (range V)) \<le> ennreal (suminf e)

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
emeasure M (\<Union> (range V)) \<le> ennreal (suminf e)
[PROOF STEP]
have "1 - suminf e \<le> emeasure M (space M - (\<Union>n. V n))"
[PROOF STATE]
proof (prove)
using this:
emeasure M (\<Union> (range V)) \<le> ennreal (suminf e)

goal (1 subgoal):
 1. ennreal (1 - suminf e) \<le> emeasure M (space M - \<Union> (range V))
[PROOF STEP]
by (simp add: emeasure_eq_measure prob_compl suminf_nonneg)
[PROOF STATE]
proof (state)
this:
ennreal (1 - suminf e) \<le> emeasure M (space M - \<Union> (range V))

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
ennreal (1 - suminf e) \<le> emeasure M (space M - \<Union> (range V))

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
have "... \<le> emeasure M (\<Inter>n. U n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (space M - \<Union> (range V)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
by (rule emeasure_mono) (auto simp: V_def)
[PROOF STATE]
proof (state)
this:
emeasure M (space M - \<Union> (range V)) \<le> emeasure M (\<Inter> (range U))

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
ennreal (1 - suminf e) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ennreal (1 - suminf e) \<le> emeasure M (\<Inter> (range U))

goal (1 subgoal):
 1. ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ennreal (1 - (\<Sum>n. e n)) \<le> emeasure M (\<Inter> (range U))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma invertible_mult_JNF:
  fixes A::"'a::comm_ring_1 mat"
  assumes A: "A\<in>carrier_mat n n" and B: "B\<in>carrier_mat n n"
    and inv_A: "invertible_mat A" and inv_B: "invertible_mat B"
shows "invertible_mat (A*B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invertible_mat (A * B)
[PROOF STEP]
proof (cases "n = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<Longrightarrow> invertible_mat (A * B)
 2. n \<noteq> 0 \<Longrightarrow> invertible_mat (A * B)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
n = 0

goal (2 subgoals):
 1. n = 0 \<Longrightarrow> invertible_mat (A * B)
 2. n \<noteq> 0 \<Longrightarrow> invertible_mat (A * B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n = 0

goal (1 subgoal):
 1. invertible_mat (A * B)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
n = 0
A \<in> carrier_mat n n
B \<in> carrier_mat n n
invertible_mat A
invertible_mat B

goal (1 subgoal):
 1. invertible_mat (A * B)
[PROOF STEP]
by (simp add: invertible_mat_zero)
[PROOF STATE]
proof (state)
this:
invertible_mat (A * B)

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> invertible_mat (A * B)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> invertible_mat (A * B)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
n \<noteq> 0

goal (1 subgoal):
 1. n \<noteq> 0 \<Longrightarrow> invertible_mat (A * B)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
n \<noteq> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0

goal (1 subgoal):
 1. invertible_mat (A * B)
[PROOF STEP]
using
      invertible_mult[where ?'a="'a::comm_ring_1", where ?'b="'n::finite", where ?'c="'n::finite",
      where ?'d="'n::finite", untransferred, cancel_card_constraint, OF assms]
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0
n \<noteq> 0 \<Longrightarrow> invertible_mat (A * B)

goal (1 subgoal):
 1. invertible_mat (A * B)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
invertible_mat (A * B)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma constructing_append_col_row:
  assumes "i < dim_row A"
    and "dim_row A = dim_vec b"
  shows "row (mat_append_col A b) i = row A i @\<^sub>v [vec_index b i]\<^sub>v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row (mat_append_col A b) i = row A i @\<^sub>v [b $ i]\<^sub>v
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>ia. ia < dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v) \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
 2. dim_vec (row (mat_append_col A b) i) = dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v)
[PROOF STEP]
show 1: "dim_vec (Matrix.row (mat_append_col A b) i) = dim_vec (Matrix.row A i @\<^sub>v [b $ i]\<^sub>v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec (row (mat_append_col A b) i) = dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
dim_vec (row (mat_append_col A b) i) = dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v)

goal (1 subgoal):
 1. \<And>ia. ia < dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v) \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
fix ia
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>ia. ia < dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v) \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
assume a: "ia < dim_vec (Matrix.row A i @\<^sub>v [b $ i]\<^sub>v)"
[PROOF STATE]
proof (state)
this:
ia < dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v)

goal (1 subgoal):
 1. \<And>ia. ia < dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v) \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
consider "ia = dim_col A" | "ia < dim_col A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>ia = dim_col A \<Longrightarrow> thesis; ia < dim_col A \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using a less_SucE
[PROOF STATE]
proof (prove)
using this:
ia < dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v)
\<lbrakk>?m < Suc ?n; ?m < ?n \<Longrightarrow> ?P; ?m = ?n \<Longrightarrow> ?P\<rbrakk> \<Longrightarrow> ?P

goal (1 subgoal):
 1. \<lbrakk>ia = dim_col A \<Longrightarrow> thesis; ia < dim_col A \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<lbrakk>ia = dim_col A \<Longrightarrow> ?thesis; ia < dim_col A \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<And>ia. ia < dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v) \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>ia = dim_col A \<Longrightarrow> ?thesis; ia < dim_col A \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis
[PROOF STEP]
show "row (mat_append_col A b) i $ ia = (Matrix.row A i @\<^sub>v [b $ i]\<^sub>v) $ ia "
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>ia = dim_col A \<Longrightarrow> ?thesis; ia < dim_col A \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ia = dim_col A \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
 2. ia < dim_col A \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
ia = dim_col A

goal (2 subgoals):
 1. ia = dim_col A \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
 2. ia < dim_col A \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ia = dim_col A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
ia = dim_col A

goal (1 subgoal):
 1. row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
using mat_append_col_vec_index[of i A b, OF assms]
[PROOF STATE]
proof (prove)
using this:
ia = dim_col A
row (mat_append_col A b) i $ dim_col A = b $ i

goal (1 subgoal):
 1. row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia

goal (1 subgoal):
 1. ia < dim_col A \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ia < dim_col A \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
ia < dim_col A

goal (1 subgoal):
 1. ia < dim_col A \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
have "row (mat_append_col A b) i $ ia = (mat_append_col A b) $$ (i, ia)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row (mat_append_col A b) i $ ia = mat_append_col A b $$ (i, ia)
[PROOF STEP]
using a assms(1)
[PROOF STATE]
proof (prove)
using this:
ia < dim_vec (row A i @\<^sub>v [b $ i]\<^sub>v)
i < dim_row A

goal (1 subgoal):
 1. row (mat_append_col A b) i $ ia = mat_append_col A b $$ (i, ia)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
row (mat_append_col A b) i $ ia = mat_append_col A b $$ (i, ia)

goal (1 subgoal):
 1. ia < dim_col A \<Longrightarrow> row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
row (mat_append_col A b) i $ ia = mat_append_col A b $$ (i, ia)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
row (mat_append_col A b) i $ ia = mat_append_col A b $$ (i, ia)

goal (1 subgoal):
 1. row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
using mat_append_col_access_in_mat[of A b i ia, OF assms(2) assms(1) 2]
[PROOF STATE]
proof (prove)
using this:
row (mat_append_col A b) i $ ia = mat_append_col A b $$ (i, ia)
row (mat_append_col A b) i $ ia = row A i $ ia

goal (1 subgoal):
 1. row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
using "2"
[PROOF STATE]
proof (prove)
using this:
row (mat_append_col A b) i $ ia = mat_append_col A b $$ (i, ia)
row (mat_append_col A b) i $ ia = row A i $ ia
ia < dim_col A

goal (1 subgoal):
 1. row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
row (mat_append_col A b) i $ ia = (row A i @\<^sub>v [b $ i]\<^sub>v) $ ia

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma delete_None_set_of_conv: "delete x t = None = (x \<notin> set_of t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (delete x t = None) = (x \<notin> set_of t)
[PROOF STEP]
proof (induct t)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>t1 x2 x3 t2. \<lbrakk>(delete x t1 = None) = (x \<notin> set_of t1); (delete x t2 = None) = (x \<notin> set_of t2)\<rbrakk> \<Longrightarrow> (delete x (Node t1 x2 x3 t2) = None) = (x \<notin> set_of (Node t1 x2 x3 t2))
 2. (delete x Tip = None) = (x \<notin> set_of Tip)
[PROOF STEP]
case Tip
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. \<And>t1 x2 x3 t2. \<lbrakk>(delete x t1 = None) = (x \<notin> set_of t1); (delete x t2 = None) = (x \<notin> set_of t2)\<rbrakk> \<Longrightarrow> (delete x (Node t1 x2 x3 t2) = None) = (x \<notin> set_of (Node t1 x2 x3 t2))
 2. (delete x Tip = None) = (x \<notin> set_of Tip)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (delete x Tip = None) = (x \<notin> set_of Tip)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(delete x Tip = None) = (x \<notin> set_of Tip)

goal (1 subgoal):
 1. \<And>t1 x2 x3 t2. \<lbrakk>(delete x t1 = None) = (x \<notin> set_of t1); (delete x t2 = None) = (x \<notin> set_of t2)\<rbrakk> \<Longrightarrow> (delete x (Node t1 x2 x3 t2) = None) = (x \<notin> set_of (Node t1 x2 x3 t2))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>t1 x2 x3 t2. \<lbrakk>(delete x t1 = None) = (x \<notin> set_of t1); (delete x t2 = None) = (x \<notin> set_of t2)\<rbrakk> \<Longrightarrow> (delete x (Node t1 x2 x3 t2) = None) = (x \<notin> set_of (Node t1 x2 x3 t2))
[PROOF STEP]
case (Node l y d r)
[PROOF STATE]
proof (state)
this:
(delete x l = None) = (x \<notin> set_of l)
(delete x r = None) = (x \<notin> set_of r)

goal (1 subgoal):
 1. \<And>t1 x2 x3 t2. \<lbrakk>(delete x t1 = None) = (x \<notin> set_of t1); (delete x t2 = None) = (x \<notin> set_of t2)\<rbrakk> \<Longrightarrow> (delete x (Node t1 x2 x3 t2) = None) = (x \<notin> set_of (Node t1 x2 x3 t2))
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
(delete x l = None) = (x \<notin> set_of l)
(delete x r = None) = (x \<notin> set_of r)

goal (1 subgoal):
 1. (delete x (Node l y d r) = None) = (x \<notin> set_of (Node l y d r))
[PROOF STEP]
by (auto split: option.splits)
[PROOF STATE]
proof (state)
this:
(delete x (Node l y d r) = None) = (x \<notin> set_of (Node l y d r))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma cInf_restrict_nat:
  fixes x :: nat
  assumes "x \<in> A"
  shows "Inf A = Inf {y \<in> A. y \<le> x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sqinter> A = \<Sqinter> {y \<in> A. y \<le> x}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
x \<in> A

goal (1 subgoal):
 1. \<Sqinter> A = \<Sqinter> {y \<in> A. y \<le> x}
[PROOF STEP]
by (auto intro!: antisym intro: cInf_greatest cInf_lower Inf_nat_def1)


[STATEMENT]
theorem assumes ms: "measure_space M"
  shows const_rv: "(\<lambda>x. c) \<in> rv M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. c) \<in> rv M
[PROOF STEP]
using ms
[PROOF STATE]
proof (prove)
using this:
measure_space M

goal (1 subgoal):
 1. (\<lambda>x. c) \<in> rv M
[PROOF STEP]
by (auto simp only: measure_space_def const_measurable rv_def)


[STATEMENT]
theorem (in valid_unSimpGraph) friendship_thm:
  assumes friend_assm:"\<And>v u. v\<in>V \<Longrightarrow> u\<in>V \<Longrightarrow> v\<noteq>u \<Longrightarrow> \<exists>! n. adjacent v n \<and> adjacent u n"
      and "finite V"
  shows "\<exists>v. \<forall>n\<in>V. n\<noteq>v \<longrightarrow> adjacent v n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
have "card V=0 \<Longrightarrow> ?thesis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card V = 0 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
using \<open>finite V\<close>
[PROOF STATE]
proof (prove)
using this:
finite V

goal (1 subgoal):
 1. card V = 0 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
by (metis all_not_in_conv card_seteq empty_subsetI le0)
[PROOF STATE]
proof (state)
this:
card V = 0 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n

goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card V = 0 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n

goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
have "card V=1 \<Longrightarrow> ?thesis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card V = 1 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card V = 1 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
assume "card V=1"
[PROOF STATE]
proof (state)
this:
card V = 1

goal (1 subgoal):
 1. card V = 1 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card V = 1
[PROOF STEP]
obtain v where "V={v}"
[PROOF STATE]
proof (prove)
using this:
card V = 1

goal (1 subgoal):
 1. (\<And>v. V = {v} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using card_eq_SucD[of V 0]
[PROOF STATE]
proof (prove)
using this:
card V = 1
card V = Suc 0 \<Longrightarrow> \<exists>b B. V = insert b B \<and> b \<notin> B \<and> card B = 0 \<and> (0 = 0 \<longrightarrow> B = {})

goal (1 subgoal):
 1. (\<And>v. V = {v} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
V = {v}

goal (1 subgoal):
 1. card V = 1 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
hence "\<forall>n\<in>V. n=v"
[PROOF STATE]
proof (prove)
using this:
V = {v}

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

goal (1 subgoal):
 1. card V = 1 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
thus "\<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n"
[PROOF STATE]
proof (prove)
using this:
\<forall>n\<in>V. n = v

goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
card V = 1 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n

goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card V = 1 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n

goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
have "card V\<ge>2 \<Longrightarrow> ?thesis"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 \<le> card V \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 \<le> card V \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
assume "card V\<ge>2"
[PROOF STATE]
proof (state)
this:
2 \<le> card V

goal (1 subgoal):
 1. 2 \<le> card V \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
hence "\<exists>v\<in>V. degree v G = 2"
[PROOF STATE]
proof (prove)
using this:
2 \<le> card V

goal (1 subgoal):
 1. \<exists>v\<in>V. degree v G = 2
[PROOF STEP]
using exist_degree_two[OF friend_assm] \<open>finite V\<close>
[PROOF STATE]
proof (prove)
using this:
2 \<le> card V
\<lbrakk>\<And>v u. \<lbrakk>v \<in> V; u \<in> V; v \<noteq> u\<rbrakk> \<Longrightarrow> v \<in> V; \<And>v u. \<lbrakk>v \<in> V; u \<in> V; v \<noteq> u\<rbrakk> \<Longrightarrow> u \<in> V; \<And>v u. \<lbrakk>v \<in> V; u \<in> V; v \<noteq> u\<rbrakk> \<Longrightarrow> v \<noteq> u; finite E; finite V; 2 \<le> card V\<rbrakk> \<Longrightarrow> \<exists>v\<in>V. degree v G = 2
finite V

goal (1 subgoal):
 1. \<exists>v\<in>V. degree v G = 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>v\<in>V. degree v G = 2

goal (1 subgoal):
 1. 2 \<le> card V \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>v\<in>V. degree v G = 2

goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
using degree_two_windmill[OF friend_assm] \<open>card V\<ge>2\<close> \<open>finite V\<close>
[PROOF STATE]
proof (prove)
using this:
\<exists>v\<in>V. degree v G = 2
\<lbrakk>\<And>v u. \<lbrakk>v \<in> V; u \<in> V; v \<noteq> u\<rbrakk> \<Longrightarrow> v \<in> V; \<And>v u. \<lbrakk>v \<in> V; u \<in> V; v \<noteq> u\<rbrakk> \<Longrightarrow> u \<in> V; \<And>v u. \<lbrakk>v \<in> V; u \<in> V; v \<noteq> u\<rbrakk> \<Longrightarrow> v \<noteq> u; finite E; 2 \<le> card V\<rbrakk> \<Longrightarrow> (\<exists>v\<in>V. degree v G = 2) = (\<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n)
2 \<le> card V
finite V

goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
2 \<le> card V \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n

goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
card V = 0 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
card V = 1 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
2 \<le> card V \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card V = 0 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
card V = 1 \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
2 \<le> card V \<Longrightarrow> \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n

goal (1 subgoal):
 1. \<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
\<exists>v. \<forall>n\<in>V. n \<noteq> v \<longrightarrow> adjacent v n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem LT13: "\<turnstile> (F \<leadsto> G) \<longrightarrow> (G \<leadsto> H) \<longrightarrow> (F \<leadsto> H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> (F \<leadsto> G) \<longrightarrow> (G \<leadsto> H) \<longrightarrow> F \<leadsto> H
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<turnstile> (F \<leadsto> G) \<longrightarrow> (G \<leadsto> H) \<longrightarrow> F \<leadsto> H
[PROOF STEP]
have "\<turnstile> \<diamond>G \<longrightarrow> (G \<leadsto> H) \<longrightarrow> \<diamond>H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<diamond>G \<longrightarrow> (G \<leadsto> H) \<longrightarrow> \<diamond>H
[PROOF STEP]
by (rule LT6)
[PROOF STATE]
proof (state)
this:
\<turnstile> \<diamond>G \<longrightarrow> (G \<leadsto> H) \<longrightarrow> \<diamond>H

goal (1 subgoal):
 1. \<turnstile> (F \<leadsto> G) \<longrightarrow> (G \<leadsto> H) \<longrightarrow> F \<leadsto> H
[PROOF STEP]
hence "\<turnstile> \<box>(F \<longrightarrow> \<diamond>G) \<longrightarrow> \<box>((G \<leadsto> H) \<longrightarrow> (F \<longrightarrow> \<diamond>H))"
[PROOF STATE]
proof (prove)
using this:
\<turnstile> \<diamond>G \<longrightarrow> (G \<leadsto> H) \<longrightarrow> \<diamond>H

goal (1 subgoal):
 1. \<turnstile> \<box>(F \<longrightarrow> \<diamond>G) \<longrightarrow> \<box>((G \<leadsto> H) \<longrightarrow> F \<longrightarrow> \<diamond>H)
[PROOF STEP]
by (intro STL4) auto
[PROOF STATE]
proof (state)
this:
\<turnstile> \<box>(F \<longrightarrow> \<diamond>G) \<longrightarrow> \<box>((G \<leadsto> H) \<longrightarrow> F \<longrightarrow> \<diamond>H)

goal (1 subgoal):
 1. \<turnstile> (F \<leadsto> G) \<longrightarrow> (G \<leadsto> H) \<longrightarrow> F \<leadsto> H
[PROOF STEP]
from lift_imp_trans[OF this MM0]
[PROOF STATE]
proof (chain)
picking this:
\<turnstile> \<box>(F \<longrightarrow> \<diamond>G) \<longrightarrow> \<box>(G \<leadsto> H) \<longrightarrow> \<box>(F \<longrightarrow> \<diamond>H)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<turnstile> \<box>(F \<longrightarrow> \<diamond>G) \<longrightarrow> \<box>(G \<leadsto> H) \<longrightarrow> \<box>(F \<longrightarrow> \<diamond>H)

goal (1 subgoal):
 1. \<turnstile> (F \<leadsto> G) \<longrightarrow> (G \<leadsto> H) \<longrightarrow> F \<leadsto> H
[PROOF STEP]
by (simp add: leadsto_def)
[PROOF STATE]
proof (state)
this:
\<turnstile> (F \<leadsto> G) \<longrightarrow> (G \<leadsto> H) \<longrightarrow> F \<leadsto> H

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma simp_eq_emptyset:
  "(X = {}) = (\<forall> x. x \<notin> X)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (X = {}) = (\<forall>x. x \<notin> X)
[PROOF STEP]
by blast


[STATEMENT]
lemma cardMeqIndexH: "card M = card (rcosets H)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card M = card (rcosets H)
[PROOF STEP]
using inj_M_GmodH inj_GmodH_M
[PROOF STATE]
proof (prove)
using this:
\<exists>f\<in>M \<rightarrow> rcosets H. inj_on f M
\<exists>g\<in>rcosets H \<rightarrow> M. inj_on g (rcosets H)

goal (1 subgoal):
 1. card M = card (rcosets H)
[PROOF STEP]
by (blast intro: card_bij finite_M H_is_subgroup rcosets_subset_PowG [THEN finite_subset])


[STATEMENT]
lemma phiDefs_finite[simp]: "finite (phiDefs g n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (phiDefs g n)
[PROOF STEP]
unfolding phiDefs_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {v. (n, v) \<in> dom (phis g)}
[PROOF STEP]
proof (rule finite_surj[where f=snd], rule phis_finite[where g=g])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. {v. (n, v) \<in> dom (phis g)} \<subseteq> snd ` dom (phis g)
[PROOF STEP]
have "\<And>x y. phis g (n,x) = Some y \<Longrightarrow> x \<in> snd ` dom (phis g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. phis g (n, x) = Some y \<Longrightarrow> x \<in> snd ` dom (phis g)
[PROOF STEP]
by (metis domI imageI snd_conv)
[PROOF STATE]
proof (state)
this:
phis g (n, ?x1) = Some ?y1 \<Longrightarrow> ?x1 \<in> snd ` dom (phis g)

goal (1 subgoal):
 1. {v. (n, v) \<in> dom (phis g)} \<subseteq> snd ` dom (phis g)
[PROOF STEP]
thus "{v. (n, v) \<in> dom (phis g)} \<subseteq> snd ` dom (phis g)"
[PROOF STATE]
proof (prove)
using this:
phis g (n, ?x1) = Some ?y1 \<Longrightarrow> ?x1 \<in> snd ` dom (phis g)

goal (1 subgoal):
 1. {v. (n, v) \<in> dom (phis g)} \<subseteq> snd ` dom (phis g)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{v. (n, v) \<in> dom (phis g)} \<subseteq> snd ` dom (phis g)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lfp_while:
  assumes "mono f" and "!!X. X \<subseteq> C \<Longrightarrow> f X \<subseteq> C" and "finite C"
  shows "lfp f = while (\<lambda>A. f A \<noteq> A) f {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lfp f = while (\<lambda>A. f A \<noteq> A) f {}
[PROOF STEP]
unfolding while_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lfp f = the (while_option (\<lambda>A. f A \<noteq> A) f {})
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
mono f
?X \<subseteq> C \<Longrightarrow> f ?X \<subseteq> C
finite C

goal (1 subgoal):
 1. lfp f = the (while_option (\<lambda>A. f A \<noteq> A) f {})
[PROOF STEP]
by (rule lfp_the_while_option) blast


[STATEMENT]
lemma open_segment_eq_empty [simp]: "open_segment a b = {} \<longleftrightarrow> a = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (open_segment a b = {}) = (a = b)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (open_segment a b = {}) = (a = b)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (open_segment a b = {}) = (a = b)
[PROOF STEP]
assume a1: "open_segment a b = {}"
[PROOF STATE]
proof (state)
this:
open_segment a b = {}

goal (1 subgoal):
 1. (open_segment a b = {}) = (a = b)
[PROOF STEP]
have "{} \<noteq> {0::real<..<1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {} \<noteq> {0<..<1}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
{} \<noteq> {0<..<1}

goal (1 subgoal):
 1. (open_segment a b = {}) = (a = b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{} \<noteq> {0<..<1}
[PROOF STEP]
have "a = b"
[PROOF STATE]
proof (prove)
using this:
{} \<noteq> {0<..<1}

goal (1 subgoal):
 1. a = b
[PROOF STEP]
using a1 open_segment_image_interval
[PROOF STATE]
proof (prove)
using this:
{} \<noteq> {0<..<1}
open_segment a b = {}
open_segment ?a ?b = (if ?a = ?b then {} else (\<lambda>u. (1 - u) *\<^sub>R ?a + u *\<^sub>R ?b) ` {0<..<1})

goal (1 subgoal):
 1. a = b
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
a = b

goal (1 subgoal):
 1. (open_segment a b = {}) = (a = b)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
open_segment a b = {} \<Longrightarrow> a = b

goal (1 subgoal):
 1. (open_segment a b = {}) = (a = b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
open_segment a b = {} \<Longrightarrow> a = b
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
open_segment a b = {} \<Longrightarrow> a = b

goal (1 subgoal):
 1. (open_segment a b = {}) = (a = b)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(open_segment a b = {}) = (a = b)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma card_of_Fpow_lists: "|Fpow A| \<le>o |lists A|"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. |Fpow A| \<le>o |lists A|
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. |Fpow A| \<le>o |lists A|
[PROOF STEP]
have "set ` (lists A) = Fpow A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set ` lists A = Fpow A
[PROOF STEP]
unfolding lists_def2 Fpow_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set ` {l. set l \<subseteq> A} = {X. X \<subseteq> A \<and> finite X}
[PROOF STEP]
using finite_list finite_set
[PROOF STATE]
proof (prove)
using this:
finite ?A \<Longrightarrow> \<exists>xs. set xs = ?A
finite (set ?xs)

goal (1 subgoal):
 1. set ` {l. set l \<subseteq> A} = {X. X \<subseteq> A \<and> finite X}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
set ` lists A = Fpow A

goal (1 subgoal):
 1. |Fpow A| \<le>o |lists A|
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
set ` lists A = Fpow A

goal (1 subgoal):
 1. |Fpow A| \<le>o |lists A|
[PROOF STEP]
using card_of_ordLeq2[of "Fpow A"] Fpow_not_empty[of A]
[PROOF STATE]
proof (prove)
using this:
set ` lists A = Fpow A
Fpow A \<noteq> {} \<Longrightarrow> (\<exists>g. g ` ?B = Fpow A) = (|Fpow A| \<le>o |?B|)
Fpow A \<noteq> {}

goal (1 subgoal):
 1. |Fpow A| \<le>o |lists A|
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
|Fpow A| \<le>o |lists A|

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma int_shift_bij:
  "bij int_left_shift" "inv int_left_shift = int_right_shift"
  "bij int_right_shift" "inv int_right_shift = int_left_shift"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (bij int_left_shift &&& inv int_left_shift = int_right_shift) &&& bij int_right_shift &&& inv int_right_shift = int_left_shift
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. bij int_left_shift
 2. inv int_left_shift = int_right_shift
 3. bij int_right_shift
 4. inv int_right_shift = int_left_shift
[PROOF STEP]
show "bij int_left_shift"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij int_left_shift
[PROOF STEP]
apply (rule bij_betw_byWitness[where ?f' = "\<lambda>x. (\<lambda>i. x (i-1))"])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<forall>a\<in>UNIV. (\<lambda>i. int_left_shift a (i - 1)) = a
 2. \<forall>a'\<in>UNIV. int_left_shift (\<lambda>i. a' (i - 1)) = a'
 3. range int_left_shift \<subseteq> UNIV
 4. range (\<lambda>x i. x (i - 1)) \<subseteq> UNIV
[PROOF STEP]
unfolding int_left_shift_def
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<forall>a\<in>UNIV. (\<lambda>i. a (i - 1 + 1)) = a
 2. \<forall>a'\<in>UNIV. (\<lambda>i. a' (i + 1 - 1)) = a'
 3. range (\<lambda>x i. x (i + 1)) \<subseteq> UNIV
 4. range (\<lambda>x i. x (i - 1)) \<subseteq> UNIV
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
bij int_left_shift

goal (3 subgoals):
 1. inv int_left_shift = int_right_shift
 2. bij int_right_shift
 3. inv int_right_shift = int_left_shift
[PROOF STEP]
show "inv int_left_shift = int_right_shift"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv int_left_shift = int_right_shift
[PROOF STEP]
apply (rule inv_equality)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. int_right_shift (int_left_shift x) = x
 2. \<And>y. int_left_shift (int_right_shift y) = y
[PROOF STEP]
unfolding int_left_shift_def int_right_shift_def
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. (\<lambda>i. x (i - 1 + 1)) = x
 2. \<And>y. (\<lambda>i. y (i + 1 - 1)) = y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inv int_left_shift = int_right_shift

goal (2 subgoals):
 1. bij int_right_shift
 2. inv int_right_shift = int_left_shift
[PROOF STEP]
show "bij int_right_shift"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij int_right_shift
[PROOF STEP]
apply (rule bij_betw_byWitness[where ?f' = "\<lambda>x. (\<lambda>i. x (i+1))"])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<forall>a\<in>UNIV. (\<lambda>i. int_right_shift a (i + 1)) = a
 2. \<forall>a'\<in>UNIV. int_right_shift (\<lambda>i. a' (i + 1)) = a'
 3. range int_right_shift \<subseteq> UNIV
 4. range (\<lambda>x i. x (i + 1)) \<subseteq> UNIV
[PROOF STEP]
unfolding int_right_shift_def
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<forall>a\<in>UNIV. (\<lambda>i. a (i + 1 - 1)) = a
 2. \<forall>a'\<in>UNIV. (\<lambda>i. a' (i - 1 + 1)) = a'
 3. range (\<lambda>x i. x (i - 1)) \<subseteq> UNIV
 4. range (\<lambda>x i. x (i + 1)) \<subseteq> UNIV
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
bij int_right_shift

goal (1 subgoal):
 1. inv int_right_shift = int_left_shift
[PROOF STEP]
show "inv int_right_shift = int_left_shift"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inv int_right_shift = int_left_shift
[PROOF STEP]
apply (rule inv_equality)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. int_left_shift (int_right_shift x) = x
 2. \<And>y. int_right_shift (int_left_shift y) = y
[PROOF STEP]
unfolding int_left_shift_def int_right_shift_def
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. (\<lambda>i. x (i + 1 - 1)) = x
 2. \<And>y. (\<lambda>i. y (i - 1 + 1)) = y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inv int_right_shift = int_left_shift

goal:
No subgoals!
[PROOF STEP]
qed