[STATEMENT]
lemma incratseq_incseq [simp]:
   "incratseq x n < incratseq x (Suc n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. incratseq x n < incratseq x (Suc n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. incratseq x n < incratseq x (Suc n)
[PROOF STEP]
have "max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < x

goal (1 subgoal):
 1. incratseq x n < incratseq x (Suc n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < x
[PROOF STEP]
have "\<exists>q. max (real_of_rat (incratseq x n))
          (x - 1 / real (n + 2))
         < real_of_rat q \<and>
         real_of_rat q < x"
[PROOF STATE]
proof (prove)
using this:
max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < x

goal (1 subgoal):
 1. \<exists>q. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < real_of_rat q \<and> real_of_rat q < x
[PROOF STEP]
using of_rat_dense
[PROOF STATE]
proof (prove)
using this:
max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < x
?x < ?y \<Longrightarrow> \<exists>q. ?x < real_of_rat q \<and> real_of_rat q < ?y

goal (1 subgoal):
 1. \<exists>q. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < real_of_rat q \<and> real_of_rat q < x
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>q. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < real_of_rat q \<and> real_of_rat q < x

goal (1 subgoal):
 1. incratseq x n < incratseq x (Suc n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>q. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < real_of_rat q \<and> real_of_rat q < x
[PROOF STEP]
have "incratseq x n
    < (SOME q.
          max (real_of_rat (incratseq x n))
           (x - 1 / real (n + 2))
          < real_of_rat q \<and>
          real_of_rat q < x)"
[PROOF STATE]
proof (prove)
using this:
\<exists>q. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < real_of_rat q \<and> real_of_rat q < x

goal (1 subgoal):
 1. incratseq x n < (SOME q. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < real_of_rat q \<and> real_of_rat q < x)
[PROOF STEP]
by (fastforce intro: someI2_ex simp add: of_rat_less)
[PROOF STATE]
proof (state)
this:
incratseq x n < (SOME q. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < real_of_rat q \<and> real_of_rat q < x)

goal (1 subgoal):
 1. incratseq x n < incratseq x (Suc n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
incratseq x n < (SOME q. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < real_of_rat q \<and> real_of_rat q < x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
incratseq x n < (SOME q. max (real_of_rat (incratseq x n)) (x - 1 / real (n + 2)) < real_of_rat q \<and> real_of_rat q < x)

goal (1 subgoal):
 1. incratseq x n < incratseq x (Suc n)
[PROOF STEP]
by (simp only: incratseq.simps)
[PROOF STATE]
proof (state)
this:
incratseq x n < incratseq x (Suc n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Bounded_vec_of_int: assumes "v \<in> Bounded_vec bnd"
  shows "(map_vec of_int v :: 'a vec) \<in> \<int>\<^sub>v \<inter> Bounded_vec (of_int bnd)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_int_hom.vec_hom v \<in> \<int>\<^sub>v \<inter> Bounded_vec (of_int bnd)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
v \<in> Bounded_vec bnd

goal (1 subgoal):
 1. of_int_hom.vec_hom v \<in> \<int>\<^sub>v \<inter> Bounded_vec (of_int bnd)
[PROOF STEP]
apply (simp add: Ints_vec_vec_set Bounded_vec_vec_set Ints_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>set\<^sub>v v. \<bar>x\<bar> \<le> bnd \<Longrightarrow> of_int ` set\<^sub>v v \<subseteq> range of_int \<and> (\<forall>x\<in>set\<^sub>v v. \<bar>of_int x\<bar> \<le> of_int bnd)
[PROOF STEP]
apply (intro conjI, force)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>set\<^sub>v v. \<bar>x\<bar> \<le> bnd \<Longrightarrow> \<forall>x\<in>set\<^sub>v v. \<bar>of_int x\<bar> \<le> of_int bnd
[PROOF STEP]
apply (clarsimp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x\<in>set\<^sub>v v. \<bar>x\<bar> \<le> bnd; x \<in> set\<^sub>v v\<rbrakk> \<Longrightarrow> \<bar>of_int x\<bar> \<le> of_int bnd
[PROOF STEP]
subgoal for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x\<in>set\<^sub>v v. \<bar>x\<bar> \<le> bnd; x \<in> set\<^sub>v v\<rbrakk> \<Longrightarrow> \<bar>of_int x\<bar> \<le> of_int bnd
[PROOF STEP]
apply (elim ballE[of _ _ x], auto)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> set\<^sub>v v; \<bar>x\<bar> \<le> bnd\<rbrakk> \<Longrightarrow> \<bar>of_int x\<bar> \<le> of_int bnd
[PROOF STEP]
by (metis of_int_abs of_int_le_iff)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma star_inf:
  assumes "right_unique r"
  shows "r\<^sup>*\<^sup>* x y \<Longrightarrow> inf r x \<Longrightarrow> inf r y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>r\<^sup>*\<^sup>* x y; Inf.inf r x\<rbrakk> \<Longrightarrow> Inf.inf r y
[PROOF STEP]
proof (induction y rule: rtranclp_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Inf.inf r x \<Longrightarrow> Inf.inf r x
 2. \<And>y z. \<lbrakk>r\<^sup>*\<^sup>* x y; r y z; Inf.inf r x \<Longrightarrow> Inf.inf r y; Inf.inf r x\<rbrakk> \<Longrightarrow> Inf.inf r z
[PROOF STEP]
case base
[PROOF STATE]
proof (state)
this:
Inf.inf r x

goal (2 subgoals):
 1. Inf.inf r x \<Longrightarrow> Inf.inf r x
 2. \<And>y z. \<lbrakk>r\<^sup>*\<^sup>* x y; r y z; Inf.inf r x \<Longrightarrow> Inf.inf r y; Inf.inf r x\<rbrakk> \<Longrightarrow> Inf.inf r z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
Inf.inf r x
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
Inf.inf r x

goal (1 subgoal):
 1. Inf.inf r x
[PROOF STEP]
by assumption
[PROOF STATE]
proof (state)
this:
Inf.inf r x

goal (1 subgoal):
 1. \<And>y z. \<lbrakk>r\<^sup>*\<^sup>* x y; r y z; Inf.inf r x \<Longrightarrow> Inf.inf r y; Inf.inf r x\<rbrakk> \<Longrightarrow> Inf.inf r z
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>y z. \<lbrakk>r\<^sup>*\<^sup>* x y; r y z; Inf.inf r x \<Longrightarrow> Inf.inf r y; Inf.inf r x\<rbrakk> \<Longrightarrow> Inf.inf r z
[PROOF STEP]
case (step y z)
[PROOF STATE]
proof (state)
this:
r\<^sup>*\<^sup>* x y
r y z
Inf.inf r x \<Longrightarrow> Inf.inf r y
Inf.inf r x

goal (1 subgoal):
 1. \<And>y z. \<lbrakk>r\<^sup>*\<^sup>* x y; r y z; Inf.inf r x \<Longrightarrow> Inf.inf r y; Inf.inf r x\<rbrakk> \<Longrightarrow> Inf.inf r z
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
r\<^sup>*\<^sup>* x y
r y z
Inf.inf r x \<Longrightarrow> Inf.inf r y
Inf.inf r x
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
r\<^sup>*\<^sup>* x y
r y z
Inf.inf r x \<Longrightarrow> Inf.inf r y
Inf.inf r x

goal (1 subgoal):
 1. Inf.inf r z
[PROOF STEP]
using step_inf[OF \<open>right_unique r\<close>]
[PROOF STATE]
proof (prove)
using this:
r\<^sup>*\<^sup>* x y
r y z
Inf.inf r x \<Longrightarrow> Inf.inf r y
Inf.inf r x
\<lbrakk>r ?x ?y; Inf.inf r ?x\<rbrakk> \<Longrightarrow> Inf.inf r ?y

goal (1 subgoal):
 1. Inf.inf r z
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
Inf.inf r z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_rotate[simp]: "set(rotate n xs) = set xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (rotate n xs) = set xs
[PROOF STEP]
by (induct n) (simp_all add:rotate_def)


[STATEMENT]
lemma JN_stable: "(\<Squnion>i \<in> I. F i) \<in> stable A = (\<forall>i \<in> I. F i \<in> stable A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (JOIN I F \<in> UNITY.stable A) = (\<forall>i\<in>I. F i \<in> UNITY.stable A)
[PROOF STEP]
by (simp add: stable_def constrains_def JOIN_def)


[STATEMENT]
lemma random_bst_reduce:
  "finite A \<Longrightarrow> A \<noteq> {} \<Longrightarrow>
     random_bst A = do {x \<leftarrow> pmf_of_set A; l \<leftarrow> random_bst {y\<in>A. y < x};
                        r \<leftarrow> random_bst {y\<in>A. y > x}; return_pmf \<langle>l, x, r\<rangle>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>finite A; A \<noteq> {}\<rbrakk> \<Longrightarrow> random_bst A = pmf_of_set A \<bind> (\<lambda>x. random_bst {y \<in> A. y < x} \<bind> (\<lambda>l. random_bst {y \<in> A. x < y} \<bind> (\<lambda>r. return_pmf \<langle>l, x, r\<rangle>)))
[PROOF STEP]
by (subst random_bst.simps) auto


[STATEMENT]
theorem assumes ms: "measure_space M" shows
  rv_gr_iff: "(f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
from ms
[PROOF STATE]
proof (chain)
picking this:
measure_space M
[PROOF STEP]
have "(f \<in> rv M) = (\<forall>a. {w.  a \<le> f w} \<in> measurable_sets M)"
[PROOF STATE]
proof (prove)
using this:
measure_space M

goal (1 subgoal):
 1. (f \<in> rv M) = (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M)
[PROOF STEP]
by (rule rv_ge_iff)
[PROOF STATE]
proof (state)
this:
(f \<in> rv M) = (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M)

goal (1 subgoal):
 1. (f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(f \<in> rv M) = (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M)

goal (1 subgoal):
 1. (f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
have "\<dots> = (\<forall>a. {w.  a < f w} \<in> measurable_sets M)" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
from ms
[PROOF STATE]
proof (chain)
picking this:
measure_space M
[PROOF STEP]
have sigma: "sigma_algebra (measurable_sets M)"
[PROOF STATE]
proof (prove)
using this:
measure_space M

goal (1 subgoal):
 1. sigma_algebra (measurable_sets M)
[PROOF STEP]
by (simp only: measure_space_def)
[PROOF STATE]
proof (state)
this:
sigma_algebra (measurable_sets M)

goal (1 subgoal):
 1. (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
sigma_algebra (measurable_sets M)

goal (1 subgoal):
 1. (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
note ge_gr
[PROOF STATE]
proof (state)
this:
\<lbrakk>sigma_algebra ?A; \<forall>a. {w. a \<le> ?f w} \<in> ?A\<rbrakk> \<Longrightarrow> \<forall>a. {w. a < ?f w} \<in> ?A

goal (1 subgoal):
 1. (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
sigma_algebra (measurable_sets M)
\<lbrakk>sigma_algebra ?A; \<forall>a. {w. a \<le> ?f w} \<in> ?A\<rbrakk> \<Longrightarrow> \<forall>a. {w. a < ?f w} \<in> ?A
[PROOF STEP]
have "?lhs \<Longrightarrow> ?rhs"
[PROOF STATE]
proof (prove)
using this:
sigma_algebra (measurable_sets M)
\<lbrakk>sigma_algebra ?A; \<forall>a. {w. a \<le> ?f w} \<in> ?A\<rbrakk> \<Longrightarrow> \<forall>a. {w. a < ?f w} \<in> ?A

goal (1 subgoal):
 1. \<forall>a. {w. a \<le> f w} \<in> measurable_sets M \<Longrightarrow> \<forall>a. {w. a < f w} \<in> measurable_sets M
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>a. {w. a \<le> f w} \<in> measurable_sets M \<Longrightarrow> \<forall>a. {w. a < f w} \<in> measurable_sets M

goal (1 subgoal):
 1. (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<forall>a. {w. a \<le> f w} \<in> measurable_sets M \<Longrightarrow> \<forall>a. {w. a < f w} \<in> measurable_sets M

goal (1 subgoal):
 1. (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
from sigma less_ge le_less gr_le
[PROOF STATE]
proof (chain)
picking this:
sigma_algebra (measurable_sets M)
\<lbrakk>sigma_algebra ?A; \<forall>a. {w. ?f w < a} \<in> ?A\<rbrakk> \<Longrightarrow> \<forall>a. {w. a \<le> ?f w} \<in> ?A
\<lbrakk>sigma_algebra ?A; \<forall>a. {w. ?f w \<le> a} \<in> ?A\<rbrakk> \<Longrightarrow> \<forall>a. {w. ?f w < a} \<in> ?A
\<lbrakk>sigma_algebra ?A; \<forall>a. {w. a < ?f w} \<in> ?A\<rbrakk> \<Longrightarrow> \<forall>a. {w. ?f w \<le> a} \<in> ?A
[PROOF STEP]
have "?rhs \<Longrightarrow> ?lhs"
[PROOF STATE]
proof (prove)
using this:
sigma_algebra (measurable_sets M)
\<lbrakk>sigma_algebra ?A; \<forall>a. {w. ?f w < a} \<in> ?A\<rbrakk> \<Longrightarrow> \<forall>a. {w. a \<le> ?f w} \<in> ?A
\<lbrakk>sigma_algebra ?A; \<forall>a. {w. ?f w \<le> a} \<in> ?A\<rbrakk> \<Longrightarrow> \<forall>a. {w. ?f w < a} \<in> ?A
\<lbrakk>sigma_algebra ?A; \<forall>a. {w. a < ?f w} \<in> ?A\<rbrakk> \<Longrightarrow> \<forall>a. {w. ?f w \<le> a} \<in> ?A

goal (1 subgoal):
 1. \<forall>a. {w. a < f w} \<in> measurable_sets M \<Longrightarrow> \<forall>a. {w. a \<le> f w} \<in> measurable_sets M
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>a. {w. a < f w} \<in> measurable_sets M \<Longrightarrow> \<forall>a. {w. a \<le> f w} \<in> measurable_sets M

goal (1 subgoal):
 1. (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>a. {w. a \<le> f w} \<in> measurable_sets M \<Longrightarrow> \<forall>a. {w. a < f w} \<in> measurable_sets M
\<forall>a. {w. a < f w} \<in> measurable_sets M \<Longrightarrow> \<forall>a. {w. a \<le> f w} \<in> measurable_sets M
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>a. {w. a \<le> f w} \<in> measurable_sets M \<Longrightarrow> \<forall>a. {w. a < f w} \<in> measurable_sets M
\<forall>a. {w. a < f w} \<in> measurable_sets M \<Longrightarrow> \<forall>a. {w. a \<le> f w} \<in> measurable_sets M

goal (1 subgoal):
 1. (\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<forall>a. {w. a \<le> f w} \<in> measurable_sets M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)

goal (1 subgoal):
 1. (f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)

goal (1 subgoal):
 1. (f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(f \<in> rv M) = (\<forall>a. {w. a < f w} \<in> measurable_sets M)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma esssup_const: "emeasure M (space M) \<noteq> 0 \<Longrightarrow> esssup M (\<lambda>x. c) = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure M (space M) \<noteq> 0 \<Longrightarrow> esssup M (\<lambda>x. c) = c
[PROOF STEP]
by (simp add: esssup_def Limsup_const ae_filter_eq_bot_iff)


[STATEMENT]
lemma lookupSomeAppend1[rule_format]:
"\<forall> L2 l c . lookup L1 l = Some c \<longrightarrow> lookup (L1 @ L2) l = Some c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>L2 l c. lookup L1 l = Some c \<longrightarrow> lookup (L1 @ L2) l = Some c
[PROOF STEP]
by (induct L1, simp, simp)


[STATEMENT]
lemma vec_plus_Cons:
shows "vec_plus (a # as) (b # bs) = (a+b) # vec_plus as bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vec_plus (a # as) (b # bs) = (a + b) # vec_plus as bs
[PROOF STEP]
by (simp add: vec_plus_def)


[STATEMENT]
lemma isomorphic_designs_symmetric: "(\<V>, \<B>) \<cong>\<^sub>D (\<V>', \<B>') \<Longrightarrow> (\<V>', \<B>') \<cong>\<^sub>D (\<V>, \<B>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<V>, \<B>) \<cong>\<^sub>D (\<V>', \<B>') \<Longrightarrow> (\<V>', \<B>') \<cong>\<^sub>D (\<V>, \<B>)
[PROOF STEP]
using isomorphic_designs_def design_isomorphism.inverse_design_isomorphism
[PROOF STATE]
proof (prove)
using this:
(?\<D> \<cong>\<^sub>D ?\<D>') = (\<exists>\<pi>. design_isomorphism (fst ?\<D>) (snd ?\<D>) (fst ?\<D>') (snd ?\<D>') \<pi>)
design_isomorphism ?\<V> ?\<B> ?\<V>' ?\<B>' ?bij_map \<Longrightarrow> design_isomorphism ?\<V>' ?\<B>' ?\<V> ?\<B> (inv_into ?\<V> ?bij_map)

goal (1 subgoal):
 1. (\<V>, \<B>) \<cong>\<^sub>D (\<V>', \<B>') \<Longrightarrow> (\<V>', \<B>') \<cong>\<^sub>D (\<V>, \<B>)
[PROOF STEP]
by metis


[STATEMENT]
lemma (in group) subgroup_subset_complementary:
  assumes "subgroup H G" "subgroup J G" "subgroup I G"
  and "I \<subseteq> J" "complementary H J"
shows "complementary H I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complementary H I
[PROOF STEP]
by (intro subgroup_carrier_complementary[OF assms(5), of H I] subgroup_incl, use assms in auto)


[STATEMENT]
lemma (in Group) s_top_sub:"\<lbrakk>G \<guillemotright> H; G \<guillemotright> K\<rbrakk> \<Longrightarrow>  H \<diamondop>\<^bsub>G\<^esub> K \<subseteq> carrier G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>G \<guillemotright> H ; G \<guillemotright> K \<rbrakk> \<Longrightarrow> H \<diamondop> K \<subseteq> carrier G
[PROOF STEP]
apply (rule subsetI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>G \<guillemotright> H ; G \<guillemotright> K ; x \<in> H \<diamondop> K\<rbrakk> \<Longrightarrow> x \<in> carrier G
[PROOF STEP]
apply (simp add:s_top_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>G \<guillemotright> H ; G \<guillemotright> K ; \<exists>xa\<in>H. \<exists>y\<in>K. xa \<cdot> y = x\<rbrakk> \<Longrightarrow> x \<in> carrier G
[PROOF STEP]
apply (erule bexE)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x xa y. \<lbrakk>G \<guillemotright> H ; G \<guillemotright> K ; xa \<in> H; y \<in> K; xa \<cdot> y = x\<rbrakk> \<Longrightarrow> x \<in> carrier G
[PROOF STEP]
apply (frule_tac h = xa in sg_subset_elem [of "H"], assumption+,
       frule_tac h = y in sg_subset_elem[of "K"], assumption+,
       frule_tac a = xa and b = y in mult_closed, assumption+, simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma homotopic_loops_imp_path_component_value:
   "\<lbrakk>homotopic_loops S p q; 0 \<le> t; t \<le> 1\<rbrakk>
        \<Longrightarrow> path_component S (p t) (q t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>homotopic_loops S p q; 0 \<le> t; t \<le> 1\<rbrakk> \<Longrightarrow> path_component S (p t) (q t)
[PROOF STEP]
apply (clarsimp simp add: homotopic_loops_def homotopic_with_def path_defs)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>h. \<lbrakk>0 \<le> t; t \<le> 1; continuous_on ({0..1} \<times> {0..1}) h; h ` ({0..1} \<times> {0..1}) \<subseteq> S; \<forall>x. h (0, x) = p x; \<forall>x. h (1, x) = q x; \<forall>t\<in>{0..1}. h (t, 1) = h (t, 0)\<rbrakk> \<Longrightarrow> \<exists>g. continuous_on {0..1} g \<and> g ` {0..1} \<subseteq> S \<and> g 0 = p t \<and> g 1 = q t
[PROOF STEP]
apply (rule_tac x="h \<circ> (\<lambda>u. (u, t))" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>h. \<lbrakk>0 \<le> t; t \<le> 1; continuous_on ({0..1} \<times> {0..1}) h; h ` ({0..1} \<times> {0..1}) \<subseteq> S; \<forall>x. h (0, x) = p x; \<forall>x. h (1, x) = q x; \<forall>t\<in>{0..1}. h (t, 1) = h (t, 0)\<rbrakk> \<Longrightarrow> continuous_on {0..1} (h \<circ> (\<lambda>u. (u, t))) \<and> (h \<circ> (\<lambda>u. (u, t))) ` {0..1} \<subseteq> S \<and> (h \<circ> (\<lambda>u. (u, t))) 0 = p t \<and> (h \<circ> (\<lambda>u. (u, t))) 1 = q t
[PROOF STEP]
apply (fastforce elim!: continuous_on_subset intro!: continuous_intros)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma coeff_powsum_mpoly_singleton:
  assumes "finite X" "k > 0"
  shows   "MPoly_Type.coeff (powsum_mpoly X k) (Poly_Mapping.single x k) = (if x \<in> X then 1 else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. MPoly_Type.coeff (powsum_mpoly X k) (Poly_Mapping.single x k) = (if x \<in> X then 1::'a else (0::'a))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite X
0 < k

goal (1 subgoal):
 1. MPoly_Type.coeff (powsum_mpoly X k) (Poly_Mapping.single x k) = (if x \<in> X then 1::'a else (0::'a))
[PROOF STEP]
by transfer' (simp add: lookup_powsum_mpoly_aux)


[STATEMENT]
lemma content_ff_eq_dff_nonzero: "content_ff p =dff x \<Longrightarrow> x \<noteq> 0 \<Longrightarrow> p \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>content_ff p =dff x; x \<noteq> 0\<rbrakk> \<Longrightarrow> p \<noteq> 0
[PROOF STEP]
using divides_ff_def eq_dff_def
[PROOF STATE]
proof (prove)
using this:
divides_ff ?x ?y \<equiv> \<exists>r. ?y = ?x * to_fract r
(?x =dff ?y) = (divides_ff ?x ?y \<and> divides_ff ?y ?x)

goal (1 subgoal):
 1. \<lbrakk>content_ff p =dff x; x \<noteq> 0\<rbrakk> \<Longrightarrow> p \<noteq> 0
[PROOF STEP]
by force


[STATEMENT]
lemma word_le_rbl: "x \<le> y \<longleftrightarrow> rev_bl_order True (rev (to_bl x)) (rev (to_bl y))"
  for x y :: "'a::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<le> y) = rev_bl_order True (rev (to_bl x)) (rev (to_bl y))
[PROOF STEP]
by (simp add: rev_bl_order_bl_to_bin word_le_def)


[STATEMENT]
lemma compactI:
  assumes "\<And>C. \<forall>t\<in>C. open t \<Longrightarrow> s \<subseteq> \<Union>C \<Longrightarrow> \<exists>C'. C' \<subseteq> C \<and> finite C' \<and> s \<subseteq> \<Union>C'"
  shows "compact s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compact s
[PROOF STEP]
unfolding compact_eq_Heine_Borel
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>C. Ball C open \<and> s \<subseteq> \<Union> C \<longrightarrow> (\<exists>D\<subseteq>C. finite D \<and> s \<subseteq> \<Union> D)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>Ball ?C open; s \<subseteq> \<Union> ?C\<rbrakk> \<Longrightarrow> \<exists>C'\<subseteq>?C. finite C' \<and> s \<subseteq> \<Union> C'

goal (1 subgoal):
 1. \<forall>C. Ball C open \<and> s \<subseteq> \<Union> C \<longrightarrow> (\<exists>D\<subseteq>C. finite D \<and> s \<subseteq> \<Union> D)
[PROOF STEP]
by metis


[STATEMENT]
lemma real_root_less_iff [simp]: "0 < n \<Longrightarrow> root n x < root n y \<longleftrightarrow> x < y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> (root n x < root n y) = (x < y)
[PROOF STEP]
by (cases "x < y") (simp_all add: real_root_less_mono linorder_not_less real_root_le_mono)


[STATEMENT]
lemma Pi_iff: "f \<in> Pi I X \<longleftrightarrow> (\<forall>i\<in>I. f i \<in> X i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> Pi I X) = (\<forall>i\<in>I. f i \<in> X i)
[PROOF STEP]
unfolding Pi_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> {f. \<forall>x. x \<in> I \<longrightarrow> f x \<in> X x}) = (\<forall>i\<in>I. f i \<in> X i)
[PROOF STEP]
by auto


[STATEMENT]
lemma pos_divideC_le_eq [field_simps]:
  "b /\<^sub>C c \<le> a \<longleftrightarrow> b \<le> c *\<^sub>C a" if "c > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (b /\<^sub>C c \<le> a) = (b \<le> c *\<^sub>C a)
[PROOF STEP]
using that pos_le_divideC_eq [of "inverse c" b a]
    less_complex_def
[PROOF STATE]
proof (prove)
using this:
0 < c
0 < inverse c \<Longrightarrow> (b \<le> a /\<^sub>C inverse c) = (b /\<^sub>C c \<le> a)
(?x < ?y) = (Re ?x < Re ?y \<and> Im ?x = Im ?y)

goal (1 subgoal):
 1. (b /\<^sub>C c \<le> a) = (b \<le> c *\<^sub>C a)
[PROOF STEP]
by auto


[STATEMENT]
lemma tendsto_inverse_ereal:
  assumes "(f \<longlongrightarrow> (c :: ereal)) F"
  assumes "eventually (\<lambda>x. f x \<ge> 0) F"
  shows   "((\<lambda>x. inverse (f x)) \<longlongrightarrow> inverse c) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. inverse (f x)) \<longlongrightarrow> inverse c) F
[PROOF STEP]
by (cases "F = bot")
     (auto intro!: tendsto_lowerbound assms
                   continuous_on_tendsto_compose[OF continuous_on_inverse_ereal])


[STATEMENT]
lemma unsynlr_inf: "unsynlr (inf x y) = unsynlr x \<inter> unsynlr y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unsynlr (inf x y) = unsynlr x \<inter> unsynlr y
[PROOF STEP]
unfolding inf_synlr_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unsynlr (mksynlr (unsynlr x \<inter> unsynlr y)) = unsynlr x \<inter> unsynlr y
[PROOF STEP]
by (simp add: admS_def synlr_def)


[STATEMENT]
lemma fInf_subdistl_var:
  fixes f :: "'a::complete_lattice \<Rightarrow> 'b::complete_lattice"
  shows "mono f \<Longrightarrow> f \<circ> \<Sqinter>G \<le> (\<Sqinter>g \<in> G. f \<circ> g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono f \<Longrightarrow> f \<circ> \<Sqinter> G \<le> \<Sqinter> ((\<circ>) f ` G)
[PROOF STEP]
by (simp add: INF_greatest Inf_lower le_fun_def monoD image_comp)


[STATEMENT]
lemma smc_prod_Comp:
  "(\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i)\<lparr>Comp\<rparr> =
    (
      \<lambda>gf\<in>\<^sub>\<circ>composable_arrs (\<Prod>\<^sub>S\<^sub>M\<^sub>Ci\<in>\<^sub>\<circ>I. \<AA> i).
        (\<lambda>i\<in>\<^sub>\<circ>I. gf\<lparr>0\<rparr>\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> gf\<lparr>1\<^sub>\<nat>\<rparr>\<lparr>i\<rparr>)
    )"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. smc_prod I \<AA>\<lparr>Comp\<rparr> = (\<lambda>gf\<in>\<^sub>\<circ>composable_arrs (smc_prod I \<AA>). \<lambda>i\<in>\<^sub>\<circ>I. gf\<lparr>[]\<^sub>\<circ>\<rparr>\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> gf\<lparr>1\<^sub>\<nat>\<rparr>\<lparr>i\<rparr>)
[PROOF STEP]
unfolding smc_prod_components smc_prod_composable_arrs_dg_prod
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>gf\<in>\<^sub>\<circ>composable_arrs (smc_prod I \<AA>). \<lambda>i\<in>\<^sub>\<circ>I. gf\<lparr>[]\<^sub>\<circ>\<rparr>\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> gf\<lparr>1\<^sub>\<nat>\<rparr>\<lparr>i\<rparr>) = (\<lambda>gf\<in>\<^sub>\<circ>composable_arrs (smc_prod I \<AA>). \<lambda>i\<in>\<^sub>\<circ>I. gf\<lparr>[]\<^sub>\<circ>\<rparr>\<lparr>i\<rparr> \<circ>\<^sub>A\<^bsub>\<AA> i\<^esub> gf\<lparr>1\<^sub>\<nat>\<rparr>\<lparr>i\<rparr>)
[PROOF STEP]
by simp


[STATEMENT]
lemma nat_of_integer_1 [simp]: "nat_of_integer 1 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nat_of_integer 1 = 1
[PROOF STEP]
by transfer simp


[STATEMENT]
lemma safety_def2: \<comment> \<open>Contraposition gives the customary prefix-closure definition\<close>
  "safety P \<longleftrightarrow> (\<forall>\<sigma>. (\<forall>i. \<exists>\<beta>. P (stake i \<sigma> @- \<beta>)) \<longrightarrow> P \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. safety P = (\<forall>\<sigma>. (\<forall>i. \<exists>\<beta>. P (stake i \<sigma> @- \<beta>)) \<longrightarrow> P \<sigma>)
[PROOF STEP]
unfolding safety_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>\<sigma>. \<not> P \<sigma> \<longrightarrow> (\<exists>i. \<forall>\<beta>. \<not> P (stake i \<sigma> @- \<beta>))) = (\<forall>\<sigma>. (\<forall>i. \<exists>\<beta>. P (stake i \<sigma> @- \<beta>)) \<longrightarrow> P \<sigma>)
[PROOF STEP]
by blast


[STATEMENT]
lemma pos_add_nonneg_ne_zero: "a > 0 \<Longrightarrow> b \<ge> 0 \<Longrightarrow> a + b \<noteq> 0"
  for a b::real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < a; 0 \<le> b\<rbrakk> \<Longrightarrow> a + b \<noteq> 0
[PROOF STEP]
by arith


[STATEMENT]
lemma cong_add_rcancel_nat: "[x + a = y + a] (mod n) \<longleftrightarrow> [x = y] (mod n)"
  for a x y :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [x + a = y + a] (mod n) = [x = y] (mod n)
[PROOF STEP]
by (simp add: cong_iff_lin_nat)


[STATEMENT]
lemma has_integral_neg: "(f has_integral k) S \<Longrightarrow> ((\<lambda>x. -(f x)) has_integral -k) S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f has_integral k) S \<Longrightarrow> ((\<lambda>x. - f x) has_integral - k) S
[PROOF STEP]
by (drule_tac c="-1" in has_integral_cmul) auto


[STATEMENT]
lemma dist_inf_mono:
  assumes distF: "dist_over_inf F"
  shows "mono F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono F
variables:
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>(x::'a) y::'a. x \<sqsubseteq> y \<Longrightarrow> F x \<sqsubseteq> F y
variables:
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
fix x :: 'a and y :: 'a
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>(x::'a) y::'a. x \<sqsubseteq> y \<Longrightarrow> F x \<sqsubseteq> F y
variables:
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
assume "x \<sqsubseteq> y"
[PROOF STATE]
proof (state)
this:
(x::'a::refinement_lattice) \<sqsubseteq> (y::'a::refinement_lattice)

goal (1 subgoal):
 1. \<And>(x::'a) y::'a. x \<sqsubseteq> y \<Longrightarrow> F x \<sqsubseteq> F y
variables:
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(x::'a::refinement_lattice) \<sqsubseteq> (y::'a::refinement_lattice)
[PROOF STEP]
have "F x = F (x \<sqinter> y)"
[PROOF STATE]
proof (prove)
using this:
(x::'a::refinement_lattice) \<sqsubseteq> (y::'a::refinement_lattice)

goal (1 subgoal):
 1. F x = F (x \<sqinter> y)
variables:
x, y :: 'a
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (simp add: le_iff_inf)
[PROOF STATE]
proof (state)
this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) (x::'a::refinement_lattice) = F (x \<sqinter> (y::'a::refinement_lattice))

goal (1 subgoal):
 1. \<And>(x::'a) y::'a. x \<sqsubseteq> y \<Longrightarrow> F x \<sqsubseteq> F y
variables:
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) (x::'a::refinement_lattice) = F (x \<sqinter> (y::'a::refinement_lattice))

goal (1 subgoal):
 1. \<And>(x::'a) y::'a. x \<sqsubseteq> y \<Longrightarrow> F x \<sqsubseteq> F y
variables:
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
have "... = F x \<sqinter> F y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. F (x \<sqinter> y) = F x \<sqinter> F y
variables:
x, y :: 'a
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. F (x \<sqinter> y) = F x \<sqinter> F y
variables:
x, y :: 'a
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
from distF
[PROOF STATE]
proof (chain)
picking this:
dist_over_inf (F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice)
[PROOF STEP]
have "F (\<Sqinter>{x, y}) = \<Sqinter>{F x, F y}"
[PROOF STATE]
proof (prove)
using this:
dist_over_inf (F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice)

goal (1 subgoal):
 1. F (\<Sqinter> {x, y}) = \<Sqinter> {F x, F y}
variables:
x, y :: 'a
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (drule_tac x = "{x, y}" in spec, simp)
[PROOF STATE]
proof (state)
this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) (\<Sqinter> {x::'a::refinement_lattice, y::'a::refinement_lattice}) = \<Sqinter> {F x, F y}

goal (1 subgoal):
 1. F (x \<sqinter> y) = F x \<sqinter> F y
variables:
x, y :: 'a
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) (\<Sqinter> {x::'a::refinement_lattice, y::'a::refinement_lattice}) = \<Sqinter> {F x, F y}
[PROOF STEP]
show "F (x \<sqinter> y) = F x \<sqinter> F y"
[PROOF STATE]
proof (prove)
using this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) (\<Sqinter> {x::'a::refinement_lattice, y::'a::refinement_lattice}) = \<Sqinter> {F x, F y}

goal (1 subgoal):
 1. F (x \<sqinter> y) = F x \<sqinter> F y
variables:
x, y :: 'a
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) ((x::'a::refinement_lattice) \<sqinter> (y::'a::refinement_lattice)) = F x \<sqinter> F y

goal:
No subgoals!
variables:
x, y :: 'a
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) ((x::'a::refinement_lattice) \<sqinter> (y::'a::refinement_lattice)) = F x \<sqinter> F y

goal (1 subgoal):
 1. \<And>(x::'a) y::'a. x \<sqsubseteq> y \<Longrightarrow> F x \<sqsubseteq> F y
variables:
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) (x::'a::refinement_lattice) = F x \<sqinter> F (y::'a::refinement_lattice)
[PROOF STEP]
show "F x \<sqsubseteq> F y"
[PROOF STATE]
proof (prove)
using this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) (x::'a::refinement_lattice) = F x \<sqinter> F (y::'a::refinement_lattice)

goal (1 subgoal):
 1. F x \<sqsubseteq> F y
variables:
x, y :: 'a
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
by (metis le_iff_inf)
[PROOF STATE]
proof (state)
this:
(F::'a::refinement_lattice \<Rightarrow> 'a::refinement_lattice) (x::'a::refinement_lattice) \<sqsubseteq> F (y::'a::refinement_lattice)

goal:
No subgoals!
variables:
F :: 'a \<Rightarrow> 'a
type variables:
'a :: refinement_lattice
[PROOF STEP]
qed


[STATEMENT]
lemma open_segment_line_hyperplanes:
  "{a <--< b} = range (\<lambda>u. a + u *\<^sub>R (b - a)) \<inter> {x. a \<bullet> (b - a) < x \<bullet> (b - a) \<and> x \<bullet> (b - a) < b \<bullet> (b - a)}"
  if "a \<noteq> b"
  for a b::"'a::euclidean_space"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {a<--<b} = range (\<lambda>u. a + u *\<^sub>R (b - a)) \<inter> {x. a \<bullet> (b - a) < x \<bullet> (b - a) \<and> x \<bullet> (b - a) < b \<bullet> (b - a)}
[PROOF STEP]
proof safe
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<in> range (\<lambda>u. a + u *\<^sub>R (b - a))
 2. \<And>x. x \<in> {a<--<b} \<Longrightarrow> a \<bullet> (b - a) < x \<bullet> (b - a)
 3. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<bullet> (b - a) < b \<bullet> (b - a)
 4. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<in> range (\<lambda>u. a + u *\<^sub>R (b - a))
 2. \<And>x. x \<in> {a<--<b} \<Longrightarrow> a \<bullet> (b - a) < x \<bullet> (b - a)
 3. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<bullet> (b - a) < b \<bullet> (b - a)
 4. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
assume x: "x \<in> {a<--<b}"
[PROOF STATE]
proof (state)
this:
x \<in> {a<--<b}

goal (4 subgoals):
 1. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<in> range (\<lambda>u. a + u *\<^sub>R (b - a))
 2. \<And>x. x \<in> {a<--<b} \<Longrightarrow> a \<bullet> (b - a) < x \<bullet> (b - a)
 3. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<bullet> (b - a) < b \<bullet> (b - a)
 4. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
x \<in> {a<--<b}
[PROOF STEP]
obtain u where u: "0 < u" "u < 1" and x_eq: "x = a + u *\<^sub>R (b - a)"
[PROOF STATE]
proof (prove)
using this:
x \<in> {a<--<b}

goal (1 subgoal):
 1. (\<And>u. \<lbrakk>0 < u; u < 1; x = a + u *\<^sub>R (b - a)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp add: in_segment algebra_simps)
[PROOF STATE]
proof (state)
this:
0 < u
u < 1
x = a + u *\<^sub>R (b - a)

goal (4 subgoals):
 1. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<in> range (\<lambda>u. a + u *\<^sub>R (b - a))
 2. \<And>x. x \<in> {a<--<b} \<Longrightarrow> a \<bullet> (b - a) < x \<bullet> (b - a)
 3. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<bullet> (b - a) < b \<bullet> (b - a)
 4. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
show "x \<in> range (\<lambda>u. a + u *\<^sub>R (b - a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> range (\<lambda>u. a + u *\<^sub>R (b - a))
[PROOF STEP]
using x_eq
[PROOF STATE]
proof (prove)
using this:
x = a + u *\<^sub>R (b - a)

goal (1 subgoal):
 1. x \<in> range (\<lambda>u. a + u *\<^sub>R (b - a))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> range (\<lambda>u. a + u *\<^sub>R (b - a))

goal (3 subgoals):
 1. \<And>x. x \<in> {a<--<b} \<Longrightarrow> a \<bullet> (b - a) < x \<bullet> (b - a)
 2. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<bullet> (b - a) < b \<bullet> (b - a)
 3. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
have "2 * (a \<bullet> b) < a \<bullet> a + b \<bullet> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * (a \<bullet> b) < a \<bullet> a + b \<bullet> b
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
a \<noteq> b

goal (1 subgoal):
 1. 2 * (a \<bullet> b) < a \<bullet> a + b \<bullet> b
[PROOF STEP]
by (rule inner_quad_gt)
[PROOF STATE]
proof (state)
this:
2 * (a \<bullet> b) < a \<bullet> a + b \<bullet> b

goal (3 subgoals):
 1. \<And>x. x \<in> {a<--<b} \<Longrightarrow> a \<bullet> (b - a) < x \<bullet> (b - a)
 2. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<bullet> (b - a) < b \<bullet> (b - a)
 3. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
2 * (a \<bullet> b) < a \<bullet> a + b \<bullet> b
[PROOF STEP]
have "u * (2 * (a \<bullet> b) - a \<bullet> a - b \<bullet> b) < 0"
    "0 < (1 - u) * (a \<bullet> a + b \<bullet> b - a \<bullet> b * 2)"
[PROOF STATE]
proof (prove)
using this:
2 * (a \<bullet> b) < a \<bullet> a + b \<bullet> b

goal (1 subgoal):
 1. u * (2 * (a \<bullet> b) - a \<bullet> a - b \<bullet> b) < 0 &&& 0 < (1 - u) * (a \<bullet> a + b \<bullet> b - a \<bullet> b * 2)
[PROOF STEP]
by (simp_all add: mult_less_0_iff u)
[PROOF STATE]
proof (state)
this:
u * (2 * (a \<bullet> b) - a \<bullet> a - b \<bullet> b) < 0
0 < (1 - u) * (a \<bullet> a + b \<bullet> b - a \<bullet> b * 2)

goal (3 subgoals):
 1. \<And>x. x \<in> {a<--<b} \<Longrightarrow> a \<bullet> (b - a) < x \<bullet> (b - a)
 2. \<And>x. x \<in> {a<--<b} \<Longrightarrow> x \<bullet> (b - a) < b \<bullet> (b - a)
 3. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
u * (2 * (a \<bullet> b) - a \<bullet> a - b \<bullet> b) < 0
0 < (1 - u) * (a \<bullet> a + b \<bullet> b - a \<bullet> b * 2)
[PROOF STEP]
show " a \<bullet> (b - a) < x \<bullet> (b - a)" "x \<bullet> (b - a) < b \<bullet> (b - a)"
[PROOF STATE]
proof (prove)
using this:
u * (2 * (a \<bullet> b) - a \<bullet> a - b \<bullet> b) < 0
0 < (1 - u) * (a \<bullet> a + b \<bullet> b - a \<bullet> b * 2)

goal (1 subgoal):
 1. a \<bullet> (b - a) < x \<bullet> (b - a) &&& x \<bullet> (b - a) < b \<bullet> (b - a)
[PROOF STEP]
by (auto simp: x_eq algebra_simps power2_eq_square inner_commute)
[PROOF STATE]
proof (state)
this:
a \<bullet> (b - a) < x \<bullet> (b - a)
x \<bullet> (b - a) < b \<bullet> (b - a)

goal (1 subgoal):
 1. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
fix u
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
assume
    "a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a)"
    "(a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)"
[PROOF STATE]
proof (state)
this:
a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a)
(a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)

goal (1 subgoal):
 1. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a)
(a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)
[PROOF STEP]
have "0 < u * ((b - a) \<bullet> (b - a))" "0 < (1 - u) * ((b - a) \<bullet> (b - a))"
[PROOF STATE]
proof (prove)
using this:
a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a)
(a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)

goal (1 subgoal):
 1. 0 < u * ((b - a) \<bullet> (b - a)) &&& 0 < (1 - u) * ((b - a) \<bullet> (b - a))
[PROOF STEP]
by (auto simp: algebra_simps)
[PROOF STATE]
proof (state)
this:
0 < u * ((b - a) \<bullet> (b - a))
0 < (1 - u) * ((b - a) \<bullet> (b - a))

goal (1 subgoal):
 1. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < u * ((b - a) \<bullet> (b - a))
0 < (1 - u) * ((b - a) \<bullet> (b - a))
[PROOF STEP]
have "0 < u" "u < 1"
[PROOF STATE]
proof (prove)
using this:
0 < u * ((b - a) \<bullet> (b - a))
0 < (1 - u) * ((b - a) \<bullet> (b - a))

goal (1 subgoal):
 1. 0 < u &&& u < 1
[PROOF STEP]
using inner_ge_zero[of "(b - a)"] that
[PROOF STATE]
proof (prove)
using this:
0 < u * ((b - a) \<bullet> (b - a))
0 < (1 - u) * ((b - a) \<bullet> (b - a))
0 \<le> (b - a) \<bullet> (b - a)
a \<noteq> b

goal (1 subgoal):
 1. 0 < u &&& u < 1
[PROOF STEP]
by (auto simp add: zero_less_mult_iff)
[PROOF STATE]
proof (state)
this:
0 < u
u < 1

goal (1 subgoal):
 1. \<And>x u. \<lbrakk>u \<in> UNIV; a \<bullet> (b - a) < (a + u *\<^sub>R (b - a)) \<bullet> (b - a); (a + u *\<^sub>R (b - a)) \<bullet> (b - a) < b \<bullet> (b - a)\<rbrakk> \<Longrightarrow> a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
0 < u
u < 1
[PROOF STEP]
show "a + u *\<^sub>R (b - a) \<in> {a<--<b}"
[PROOF STATE]
proof (prove)
using this:
0 < u
u < 1

goal (1 subgoal):
 1. a + u *\<^sub>R (b - a) \<in> {a<--<b}
[PROOF STEP]
by (auto simp: in_segment algebra_simps that)
[PROOF STATE]
proof (state)
this:
a + u *\<^sub>R (b - a) \<in> {a<--<b}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma trapC_eq:
  shows "trapC = {p. (fst p)^2 + (snd p)^2 - 4 \<le> 0} \<inter> {p. 1/4 - ((fst p)^2 + (snd p)^2) \<le> 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trapC = {p. (fst p)\<^sup>2 + (snd p)\<^sup>2 - 4 \<le> 0} \<inter> {p. 1 / 4 - ((fst p)\<^sup>2 + (snd p)\<^sup>2) \<le> 0}
[PROOF STEP]
unfolding trapC_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cball (0, 0) 2 - ball (0, 0) (1 / 2) = {p. (fst p)\<^sup>2 + (snd p)\<^sup>2 - 4 \<le> 0} \<inter> {p. 1 / 4 - ((fst p)\<^sup>2 + (snd p)\<^sup>2) \<le> 0}
[PROOF STEP]
apply (auto simp add: dist_Pair_Pair)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a b. \<lbrakk>sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2; \<not> sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> a\<^sup>2 + b\<^sup>2 \<le> 4
 2. \<And>a b. \<lbrakk>sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2; \<not> sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4
 3. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4\<rbrakk> \<Longrightarrow> sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2
 4. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
using real_sqrt_le_iff
[PROOF STATE]
proof (prove)
using this:
(sqrt ?x \<le> sqrt ?y) = (?x \<le> ?y)

goal (4 subgoals):
 1. \<And>a b. \<lbrakk>sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2; \<not> sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> a\<^sup>2 + b\<^sup>2 \<le> 4
 2. \<And>a b. \<lbrakk>sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2; \<not> sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4
 3. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4\<rbrakk> \<Longrightarrow> sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2
 4. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply fastforce
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b. \<lbrakk>sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2; \<not> sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4
 2. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4\<rbrakk> \<Longrightarrow> sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2
 3. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (smt four_x_squared one_le_power real_sqrt_ge_0_iff real_sqrt_pow2)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4\<rbrakk> \<Longrightarrow> sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2
 2. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
using real_sqrt_le_mono
[PROOF STATE]
proof (prove)
using this:
?x \<le> ?y \<Longrightarrow> sqrt ?x \<le> sqrt ?y

goal (2 subgoals):
 1. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4\<rbrakk> \<Longrightarrow> sqrt (a\<^sup>2 + b\<^sup>2) \<le> 2
 2. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply fastforce
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
fix a :: real and b :: real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
assume a1: "sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1"
[PROOF STATE]
proof (state)
this:
sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
assume a2: "1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4"
[PROOF STATE]
proof (state)
this:
1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
have "\<forall>r. 1 \<le> sqrt r \<or> \<not> 1 \<le> r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>r. 1 \<le> sqrt r \<or> \<not> 1 \<le> r
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>r. 1 \<le> sqrt r \<or> \<not> 1 \<le> r

goal (1 subgoal):
 1. \<And>a b. \<lbrakk>a\<^sup>2 + b\<^sup>2 \<le> 4; 1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4; sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>r. 1 \<le> sqrt r \<or> \<not> 1 \<le> r
[PROOF STEP]
show False
[PROOF STATE]
proof (prove)
using this:
\<forall>r. 1 \<le> sqrt r \<or> \<not> 1 \<le> r

goal (1 subgoal):
 1. False
[PROOF STEP]
using a2 a1
[PROOF STATE]
proof (prove)
using this:
\<forall>r. 1 \<le> sqrt r \<or> \<not> 1 \<le> r
1 \<le> a\<^sup>2 * 4 + b\<^sup>2 * 4
sqrt (a\<^sup>2 + b\<^sup>2) * 2 < 1

goal (1 subgoal):
 1. False
[PROOF STEP]
by (metis (no_types) Groups.mult_ac(2) distrib_left linorder_not_le real_sqrt_four real_sqrt_mult)
[PROOF STATE]
proof (state)
this:
False

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma det30_minus_scaled2[simp]:
  "det3 0 (a - x *\<^sub>R a) b = 0 \<longleftrightarrow> (if x = 1 then True else det3 0 a b = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (det3 0 (a - x *\<^sub>R a) b = 0) = (if x = 1 then True else det3 0 a b = 0)
[PROOF STEP]
using det30_plus_scaled2[of a  "-x" b]
[PROOF STATE]
proof (prove)
using this:
(det3 0 (a + - x *\<^sub>R a) b = 0) = (if - x = - 1 then True else det3 0 a b = 0)

goal (1 subgoal):
 1. (det3 0 (a - x *\<^sub>R a) b = 0) = (if x = 1 then True else det3 0 a b = 0)
[PROOF STEP]
by simp


[STATEMENT]
lemma rGamma_plus1: "z * rGamma (z + 1) = rGamma z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
let ?f = "\<lambda>n. (z + 1) * inverse (of_nat n) + 1"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
have "eventually (\<lambda>n. ?f n * rGamma_series z n = z * rGamma_series (z + 1) n) sequentially"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
[PROOF STEP]
using eventually_gt_at_top[of "0::nat"]
[PROOF STATE]
proof (prove)
using this:
eventually ((<) 0) sequentially

goal (1 subgoal):
 1. \<forall>\<^sub>F n in sequentially. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
[PROOF STEP]
fix n :: nat
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
[PROOF STEP]
assume n: "n > 0"
[PROOF STATE]
proof (state)
this:
0 < n

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
[PROOF STEP]
hence "z * rGamma_series (z + 1) n = inverse (of_nat n) *
             pochhammer z (Suc (Suc n)) / (fact n * exp (z * of_real (ln (of_nat n))))"
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. z * rGamma_series (z + (1::'a)) n = inverse (of_nat n) * pochhammer z (Suc (Suc n)) / (fact n * exp (z * of_real (ln (real n))))
[PROOF STEP]
by (subst pochhammer_rec) (simp add: rGamma_series_def field_simps exp_add exp_of_real)
[PROOF STATE]
proof (state)
this:
z * rGamma_series (z + (1::'a)) n = inverse (of_nat n) * pochhammer z (Suc (Suc n)) / (fact n * exp (z * of_real (ln (real n))))

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
z * rGamma_series (z + (1::'a)) n = inverse (of_nat n) * pochhammer z (Suc (Suc n)) / (fact n * exp (z * of_real (ln (real n))))

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
[PROOF STEP]
from n
[PROOF STATE]
proof (chain)
picking this:
0 < n
[PROOF STEP]
have "\<dots> = ?f n * rGamma_series z n"
[PROOF STATE]
proof (prove)
using this:
0 < n

goal (1 subgoal):
 1. inverse (of_nat n) * pochhammer z (Suc (Suc n)) / (fact n * exp (z * of_real (ln (real n)))) = ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n
[PROOF STEP]
by (subst pochhammer_rec') (simp_all add: field_split_simps rGamma_series_def)
[PROOF STATE]
proof (state)
this:
inverse (of_nat n) * pochhammer z (Suc (Suc n)) / (fact n * exp (z * of_real (ln (real n)))) = ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n

goal (1 subgoal):
 1. \<And>n. 0 < n \<Longrightarrow> ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
z * rGamma_series (z + (1::'a)) n = ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n
[PROOF STEP]
show "?f n * rGamma_series z n = z * rGamma_series (z + 1) n"
[PROOF STATE]
proof (prove)
using this:
z * rGamma_series (z + (1::'a)) n = ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n

goal (1 subgoal):
 1. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n

goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F n in sequentially. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n

goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
have "(\<lambda>n. ?f n * rGamma_series z n) \<longlonglongrightarrow> ((z+1) * 0 + 1) * rGamma z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n) \<longlonglongrightarrow> ((z + (1::'a)) * (0::'a) + (1::'a)) * rGamma z
[PROOF STEP]
by (intro tendsto_intros lim_inverse_n)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n) \<longlonglongrightarrow> ((z + (1::'a)) * (0::'a) + (1::'a)) * rGamma z

goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
hence "(\<lambda>n. ?f n * rGamma_series z n) \<longlonglongrightarrow> rGamma z"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n) \<longlonglongrightarrow> ((z + (1::'a)) * (0::'a) + (1::'a)) * rGamma z

goal (1 subgoal):
 1. (\<lambda>n. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n) \<longlonglongrightarrow> rGamma z
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>n. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n) \<longlonglongrightarrow> rGamma z

goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F n in sequentially. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
(\<lambda>n. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n) \<longlonglongrightarrow> rGamma z
[PROOF STEP]
have "(\<lambda>n. z * rGamma_series (z + 1) n) \<longlonglongrightarrow> rGamma z"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F n in sequentially. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n = z * rGamma_series (z + (1::'a)) n
(\<lambda>n. ((z + (1::'a)) * inverse (of_nat n) + (1::'a)) * rGamma_series z n) \<longlonglongrightarrow> rGamma z

goal (1 subgoal):
 1. (\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> rGamma z
[PROOF STEP]
by (blast intro: Lim_transform_eventually)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> rGamma z

goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
(\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> rGamma z

goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
have "(\<lambda>n. z * rGamma_series (z + 1) n) \<longlonglongrightarrow> z * rGamma (z + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> z * rGamma (z + (1::'a))
[PROOF STEP]
by (intro tendsto_intros)
[PROOF STATE]
proof (state)
this:
(\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> z * rGamma (z + (1::'a))

goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> rGamma z
(\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> z * rGamma (z + (1::'a))
[PROOF STEP]
show "z * rGamma (z + 1) = rGamma z"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> rGamma z
(\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> z * rGamma (z + (1::'a))

goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
using LIMSEQ_unique
[PROOF STATE]
proof (prove)
using this:
(\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> rGamma z
(\<lambda>n. z * rGamma_series (z + (1::'a)) n) \<longlonglongrightarrow> z * rGamma (z + (1::'a))
\<lbrakk>?X \<longlonglongrightarrow> ?a; ?X \<longlonglongrightarrow> ?b\<rbrakk> \<Longrightarrow> ?a = ?b

goal (1 subgoal):
 1. z * rGamma (z + (1::'a)) = rGamma z
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
z * rGamma (z + (1::'a)) = rGamma z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem tensor_non_empty: assumes "A \<noteq> []" and "B \<noteq> []"
 shows "A \<otimes> B \<noteq> []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<otimes> B \<noteq> []
[PROOF STEP]
using  assms(1) assms(2) length_0_conv length_Tensor mult_is_0
[PROOF STATE]
proof (prove)
using this:
A \<noteq> []
B \<noteq> []
(length ?xs = 0) = (?xs = [])
length (?M1.0 \<otimes> ?M2.0) = length ?M1.0 * length ?M2.0
(?m * ?n = 0) = (?m = 0 \<or> ?n = 0)

goal (1 subgoal):
 1. A \<otimes> B \<noteq> []
[PROOF STEP]
by metis


[STATEMENT]
lemma greatest_lower_bound:
  "-x \<le> -y \<and> -x \<le> -z \<longleftrightarrow> -x \<le> -y \<sqinter> -z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- x \<le> - y \<and> - x \<le> - z) = (- x \<le> - y \<sqinter> - z)
[PROOF STEP]
by (metis inf_closed sub_inf_left_isotone less_eq_inf transitive lower_bound_left lower_bound_right)


[STATEMENT]
lemma union_is_subset [forward]: "A \<union> B \<subseteq> C \<Longrightarrow> A \<subseteq> C \<and> B \<subseteq> C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<union> B \<subseteq> C \<Longrightarrow> A \<subseteq> C \<and> B \<subseteq> C
[PROOF STEP]
by simp


[STATEMENT]
lemma cblinfun_of_mat_uminus:
  defines "nA \<equiv> length (canonical_basis :: 'a::{basis_enum,complex_normed_vector} list)"
    and "nB \<equiv> length (canonical_basis :: 'b::{basis_enum,complex_normed_vector} list)"
  assumes "M \<in> carrier_mat nB nA"
  shows "(cblinfun_of_mat (-M) :: 'a \<Rightarrow>\<^sub>C\<^sub>L 'b) = - cblinfun_of_mat M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cblinfun_of_mat (- M) = - cblinfun_of_mat M
[PROOF STEP]
by (smt assms add.group_axioms add.right_neutral add_minus_cancel add_uminus_minus_mat
      cblinfun_of_mat_plus group.inverse_inverse mat_of_cblinfun_inverse mat_of_cblinfun_zero
      minus_r_inv_mat uminus_carrier_mat)


[STATEMENT]
lemma resr_trans: "(x \<rightarrow> y)  \<cdot>  (y \<rightarrow> z) \<le> x \<rightarrow> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<rightarrow> y) \<cdot> (y \<rightarrow> z) \<le> x \<rightarrow> z
[PROOF STEP]
by (metis local.res_ri1 local.resr_antitonel local.resr_galois mult_assoc)


[STATEMENT]
lemma (in group) subgroup_generated_group_carrier:
  "subgroup_generated G (carrier G) = G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgroup_generated G (carrier G) = G
[PROOF STEP]
proof (rule monoid.equality)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. carrier (subgroup_generated G (carrier G)) = carrier G
 2. (\<otimes>\<^bsub>subgroup_generated G (carrier G)\<^esub>) = (\<otimes>)
 3. \<one>\<^bsub>subgroup_generated G (carrier G)\<^esub> = \<one>
 4. monoid.more (subgroup_generated G (carrier G)) = monoid.more G
[PROOF STEP]
show "carrier (subgroup_generated G (carrier G)) = carrier G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier (subgroup_generated G (carrier G)) = carrier G
[PROOF STEP]
by (simp add: subgroup.carrier_subgroup_generated_subgroup subgroup_self)
[PROOF STATE]
proof (state)
this:
carrier (subgroup_generated G (carrier G)) = carrier G

goal (3 subgoals):
 1. (\<otimes>\<^bsub>subgroup_generated G (carrier G)\<^esub>) = (\<otimes>)
 2. \<one>\<^bsub>subgroup_generated G (carrier G)\<^esub> = \<one>
 3. monoid.more (subgroup_generated G (carrier G)) = monoid.more G
[PROOF STEP]
qed (auto simp: subgroup_generated_def)


[STATEMENT]
lemma divide_strict_right_mono:
  "a < b \<Longrightarrow> 0 < c \<Longrightarrow> a / c < b / c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a < b; (0::'a) < c\<rbrakk> \<Longrightarrow> a / c < b / c
[PROOF STEP]
by (simp add: less_imp_not_eq2 divide_inverse mult_strict_right_mono
      positive_imp_inverse_positive)


[STATEMENT]
lemma nonempty_Fix:
  fixes f :: "'a::complete_lattice \<Rightarrow> 'a"
  shows "mono f \<Longrightarrow> Fix f \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono f \<Longrightarrow> Fix f \<noteq> {}
[PROOF STEP]
using lfp_in_Fix
[PROOF STATE]
proof (prove)
using this:
mono ?f \<Longrightarrow> lfp ?f \<in> Fix ?f

goal (1 subgoal):
 1. mono f \<Longrightarrow> Fix f \<noteq> {}
[PROOF STEP]
by fastforce


[STATEMENT]
lemma prod_2_Rel_ArrValD[dest]:
  assumes "\<langle>\<langle>a, b\<rangle>, \<langle>c, d\<rangle>\<rangle> \<in>\<^sub>\<circ> prod_2_Rel_ArrVal S T"
  shows "\<langle>a, c\<rangle> \<in>\<^sub>\<circ> S" and "\<langle>b, d\<rangle> \<in>\<^sub>\<circ> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>a, c\<rangle> \<in>\<^sub>\<circ> S &&& \<langle>b, d\<rangle> \<in>\<^sub>\<circ> T
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<langle>\<langle>a, b\<rangle>, c, d\<rangle> \<in>\<^sub>\<circ> prod_2_Rel_ArrVal S T

goal (1 subgoal):
 1. \<langle>a, c\<rangle> \<in>\<^sub>\<circ> S &&& \<langle>b, d\<rangle> \<in>\<^sub>\<circ> T
[PROOF STEP]
unfolding prod_2_Rel_ArrVal_def
[PROOF STATE]
proof (prove)
using this:
\<langle>\<langle>a, b\<rangle>, c, d\<rangle> \<in>\<^sub>\<circ> ZFC_in_HOL.set {\<langle>\<langle>a, b\<rangle>, c, d\<rangle> |a b c d. \<langle>a, c\<rangle> \<in>\<^sub>\<circ> S \<and> \<langle>b, d\<rangle> \<in>\<^sub>\<circ> T}

goal (1 subgoal):
 1. \<langle>a, c\<rangle> \<in>\<^sub>\<circ> S &&& \<langle>b, d\<rangle> \<in>\<^sub>\<circ> T
[PROOF STEP]
by auto


[STATEMENT]
lemma unlr_sup: "unlr (sup x y) = unlr x \<union> unlr y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unlr (sup x y) = unlr x \<union> unlr y
[PROOF STEP]
unfolding sup_admS_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. unlr (mklr (unlr x \<union> unlr y)) = unlr x \<union> unlr y
[PROOF STEP]
by (simp add: admS_def)


[STATEMENT]
lemma le_ceiling_iff: "z \<le> \<lceil>x\<rceil> \<longleftrightarrow> of_int z - 1 < x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (z \<le> \<lceil>x\<rceil>) = (of_int z - (1::'a) < x)
[PROOF STEP]
by (simp add: not_less [symmetric] ceiling_less_iff)


[STATEMENT]
lemma Lim_null:
  fixes f :: "'a \<Rightarrow> 'b::real_normed_vector"
  shows "(f \<longlongrightarrow> l) net \<longleftrightarrow> ((\<lambda>x. f(x) - l) \<longlongrightarrow> 0) net"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<longlongrightarrow> l) net = ((\<lambda>x. f x - l) \<longlongrightarrow> (0::'b)) net
[PROOF STEP]
by (simp add: Lim dist_norm)


[STATEMENT]
lemma hcmod_mult_hcnj: "\<And>z. hcmod (z * hcnj z) = (hcmod z)\<^sup>2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>z. hcmod (z * hcnj z) = (hcmod z)\<^sup>2
[PROOF STEP]
by transfer (rule complex_mod_mult_cnj)


[STATEMENT]
theorem Clique_not_solvable_by_small_monotone_circuit:
  fixes \<phi> :: "'a mformula"
  assumes LARGE: "k \<ge> Large_Number"
  and \<pi>: "bij_betw \<pi> V [k^8]^\<two>"
  and solution: "\<forall>G\<in>Graphs [k ^ 8]. (G \<in> Clique [k ^ 8] (k^2)) = eval (\<lambda> x. \<pi> x \<in> G) \<phi>"
  and vars: "vars \<phi> \<subseteq> V"
shows "cs \<phi> > k powr (8 / 7 * k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real k powr (8 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real k powr (8 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
from LARGE
[PROOF STATE]
proof (chain)
picking this:
Large_Number \<le> k
[PROOF STEP]
have LARGE: "Large_Number \<le> k\<^sup>2"
[PROOF STATE]
proof (prove)
using this:
Large_Number \<le> k

goal (1 subgoal):
 1. Large_Number \<le> k\<^sup>2
[PROOF STEP]
by (simp add: power2_nat_le_imp_le)
[PROOF STATE]
proof (state)
this:
Large_Number \<le> k\<^sup>2

goal (1 subgoal):
 1. real k powr (8 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
have id: "k\<^sup>2 ^ 4 = k^8" "sqrt (k^2) = k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k\<^sup>2 ^ 4 = k ^ 8 &&& sqrt (real (k\<^sup>2)) = real k
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
k\<^sup>2 ^ 4 = k ^ 8
sqrt (real (k\<^sup>2)) = real k

goal (1 subgoal):
 1. real k powr (8 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
from Clique_not_solvable_by_small_monotone_circuit_squared[of "k^2", unfolded id, OF _ LARGE \<pi> solution vars]
[PROOF STATE]
proof (chain)
picking this:
\<exists>l. k\<^sup>2 = l\<^sup>2 \<Longrightarrow> real (k\<^sup>2) powr (4 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
have "cs \<phi> > (k^2) powr (4 / 7 * k)"
[PROOF STATE]
proof (prove)
using this:
\<exists>l. k\<^sup>2 = l\<^sup>2 \<Longrightarrow> real (k\<^sup>2) powr (4 / 7 * real k) < real (cs \<phi>)

goal (1 subgoal):
 1. real (k\<^sup>2) powr (4 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
real (k\<^sup>2) powr (4 / 7 * real k) < real (cs \<phi>)

goal (1 subgoal):
 1. real k powr (8 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real (k\<^sup>2) powr (4 / 7 * real k) < real (cs \<phi>)

goal (1 subgoal):
 1. real k powr (8 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
have "(k^2) powr (4 / 7 * k) = k powr (8 / 7 * k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (k\<^sup>2) powr (4 / 7 * real k) = real k powr (8 / 7 * real k)
[PROOF STEP]
unfolding of_nat_power
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (real k)\<^sup>2 powr (4 / 7 * real k) = real k powr (8 / 7 * real k)
[PROOF STEP]
using powr_powr[of "real k" 2]
[PROOF STATE]
proof (prove)
using this:
(real k powr 2) powr ?b = real k powr (2 * ?b)

goal (1 subgoal):
 1. (real k)\<^sup>2 powr (4 / 7 * real k) = real k powr (8 / 7 * real k)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real (k\<^sup>2) powr (4 / 7 * real k) = real k powr (8 / 7 * real k)

goal (1 subgoal):
 1. real k powr (8 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
real k powr (8 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
real k powr (8 / 7 * real k) < real (cs \<phi>)

goal (1 subgoal):
 1. real k powr (8 / 7 * real k) < real (cs \<phi>)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
real k powr (8 / 7 * real k) < real (cs \<phi>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma powreal_less_cancel_iff [simp]:
  "1 < a \<Longrightarrow> (a pow\<^sub>\<real> r < a pow\<^sub>\<real> s) = (r < s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 < a \<Longrightarrow> (a pow\<^sub>\<real> r < a pow\<^sub>\<real> s) = (r < s)
[PROOF STEP]
by (metis less_imp_le powreal_less_cancel powreal_less_mono)


[STATEMENT]
lemma order_hom: "order (hom x) (map_poly hom f) = order x f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. order (hom x) (map_poly hom f) = order x f
[PROOF STEP]
unfolding Polynomial.order_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LEAST n. \<not> [:- hom x, 1::'b:] ^ Suc n dvd map_poly hom f) = (LEAST n. \<not> [:- x, 1::'a:] ^ Suc n dvd f)
[PROOF STEP]
unfolding hom_dvd_iff[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LEAST n. \<not> [:- hom x, 1::'b:] ^ Suc n dvd map_poly hom f) = (LEAST n. \<not> map_poly hom ([:- x, 1::'a:] ^ Suc n) dvd map_poly hom f)
[PROOF STEP]
unfolding hom_power
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (LEAST n. \<not> [:- hom x, 1::'b:] ^ Suc n dvd map_poly hom f) = (LEAST n. \<not> map_poly hom [:- x, 1::'a:] ^ Suc n dvd map_poly hom f)
[PROOF STEP]
by (simp add: base.hom_uminus)


[STATEMENT]
lemma free_group_over_empty_set: "\<exists>h. h \<in> iso \<F>\<^bsub>{}\<^esub> unit_group"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>h. h \<in> Group.iso \<F>\<^bsub>{}\<^esub> unit_group
[PROOF STEP]
proof(rule group.unit_group_unique)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Group.group \<F>\<^bsub>{}\<^esub>
 2. card (carrier \<F>\<^bsub>{}\<^esub>) = 1
[PROOF STEP]
show "group \<F>\<^bsub>{}\<^esub>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Group.group \<F>\<^bsub>{}\<^esub>
[PROOF STEP]
by (rule free_group_is_group)
[PROOF STATE]
proof (state)
this:
Group.group \<F>\<^bsub>{}\<^esub>

goal (1 subgoal):
 1. card (carrier \<F>\<^bsub>{}\<^esub>) = 1
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (carrier \<F>\<^bsub>{}\<^esub>) = 1
[PROOF STEP]
have "carrier \<F>\<^bsub>{}::'a set\<^esub> = {[]}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. carrier \<F>\<^bsub>{}\<^esub> = {[]}
[PROOF STEP]
by (auto simp add:free_group_def)
[PROOF STATE]
proof (state)
this:
carrier \<F>\<^bsub>{}\<^esub> = {[]}

goal (1 subgoal):
 1. card (carrier \<F>\<^bsub>{}\<^esub>) = 1
[PROOF STEP]
thus "card (carrier \<F>\<^bsub>{}::'a set\<^esub>) = 1"
[PROOF STATE]
proof (prove)
using this:
carrier \<F>\<^bsub>{}\<^esub> = {[]}

goal (1 subgoal):
 1. card (carrier \<F>\<^bsub>{}\<^esub>) = 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card (carrier \<F>\<^bsub>{}\<^esub>) = 1

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma dim_zero_subspace_eq:
  assumes subs_A: "subspace A"
  shows "(dim A = 0) = (A = {0})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (local.dim A = 0) = (A = {0::'b})
[PROOF STEP]
by (metis dim_zero_eq dim_zero_eq' subspace_0[OF subs_A] empty_iff)


[STATEMENT]
lemma twice_field_differentiable_at_sin_fun [intro]:
  assumes "f twice_field_differentiable_at x"
  shows   "(\<lambda>x. sin (f x)) twice_field_differentiable_at x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. sin (f x)) twice_field_differentiable_at x
[PROOF STEP]
by (simp add: assms twice_field_differentiable_at_compose)


[STATEMENT]
lemma complex_is_real_iff_compare0: \<open>(x::complex) \<in> \<real> \<longleftrightarrow> x \<le> 0 \<or> x \<ge> 0\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> \<real>) = (x \<le> 0 \<or> 0 \<le> x)
[PROOF STEP]
using complex_is_Real_iff less_eq_complex_def
[PROOF STATE]
proof (prove)
using this:
(?z \<in> \<real>) = (Im ?z = 0)
(?x \<le> ?y) = (Re ?x \<le> Re ?y \<and> Im ?x = Im ?y)

goal (1 subgoal):
 1. (x \<in> \<real>) = (x \<le> 0 \<or> 0 \<le> x)
[PROOF STEP]
by auto


[STATEMENT]
lemma corthogonal_vec_of_basis_enum:
  fixes S :: "'a::onb_enum list"
  shows "corthogonal (map vec_of_basis_enum S) \<longleftrightarrow> is_ortho_set (set S) \<and> distinct S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. corthogonal (map vec_of_basis_enum S) = (is_ortho_set (set S) \<and> distinct S)
[PROOF STEP]
proof auto
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. corthogonal (map vec_of_basis_enum S) \<Longrightarrow> is_ortho_set (set S)
 2. corthogonal (map vec_of_basis_enum S) \<Longrightarrow> distinct S
 3. \<lbrakk>is_ortho_set (set S); distinct S\<rbrakk> \<Longrightarrow> corthogonal (map vec_of_basis_enum S)
[PROOF STEP]
assume assm: \<open>corthogonal (map vec_of_basis_enum S)\<close>
[PROOF STATE]
proof (state)
this:
corthogonal (map vec_of_basis_enum S)

goal (3 subgoals):
 1. corthogonal (map vec_of_basis_enum S) \<Longrightarrow> is_ortho_set (set S)
 2. corthogonal (map vec_of_basis_enum S) \<Longrightarrow> distinct S
 3. \<lbrakk>is_ortho_set (set S); distinct S\<rbrakk> \<Longrightarrow> corthogonal (map vec_of_basis_enum S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
corthogonal (map vec_of_basis_enum S)
[PROOF STEP]
show \<open>is_ortho_set (set S)\<close>
[PROOF STATE]
proof (prove)
using this:
corthogonal (map vec_of_basis_enum S)

goal (1 subgoal):
 1. is_ortho_set (set S)
[PROOF STEP]
by (smt (verit, ccfv_SIG) cinner_eq_zero_iff corthogonal_def cscalar_prod_vec_of_basis_enum in_set_conv_nth is_ortho_set_def length_map nth_map)
[PROOF STATE]
proof (state)
this:
is_ortho_set (set S)

goal (2 subgoals):
 1. corthogonal (map vec_of_basis_enum S) \<Longrightarrow> distinct S
 2. \<lbrakk>is_ortho_set (set S); distinct S\<rbrakk> \<Longrightarrow> corthogonal (map vec_of_basis_enum S)
[PROOF STEP]
show \<open>distinct S\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct S
[PROOF STEP]
using assm corthogonal_distinct distinct_map
[PROOF STATE]
proof (prove)
using this:
corthogonal (map vec_of_basis_enum S)
corthogonal ?us \<Longrightarrow> distinct ?us
distinct (map ?f ?xs) = (distinct ?xs \<and> inj_on ?f (set ?xs))

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

goal (1 subgoal):
 1. \<lbrakk>is_ortho_set (set S); distinct S\<rbrakk> \<Longrightarrow> corthogonal (map vec_of_basis_enum S)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>is_ortho_set (set S); distinct S\<rbrakk> \<Longrightarrow> corthogonal (map vec_of_basis_enum S)
[PROOF STEP]
assume \<open>is_ortho_set (set S)\<close> and \<open>distinct S\<close>
[PROOF STATE]
proof (state)
this:
is_ortho_set (set S)
distinct S

goal (1 subgoal):
 1. \<lbrakk>is_ortho_set (set S); distinct S\<rbrakk> \<Longrightarrow> corthogonal (map vec_of_basis_enum S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
is_ortho_set (set S)
distinct S
[PROOF STEP]
show \<open>corthogonal (map vec_of_basis_enum S)\<close>
[PROOF STATE]
proof (prove)
using this:
is_ortho_set (set S)
distinct S

goal (1 subgoal):
 1. corthogonal (map vec_of_basis_enum S)
[PROOF STEP]
by (smt (verit, ccfv_threshold) cinner_eq_zero_iff corthogonalI cscalar_prod_vec_of_basis_enum is_ortho_set_def length_map length_map nth_eq_iff_index_eq nth_map nth_map nth_mem nth_mem)
[PROOF STATE]
proof (state)
this:
corthogonal (map vec_of_basis_enum S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Cong\<^sub>0_subst_right:
    assumes "u \<approx>\<^sub>0 u'" and "t \<frown> u"
    shows "t \<frown> u'" and "(t \\ u) \\ (u' \\ u) \<approx>\<^sub>0 (t \\ u') \\ (u \\ u')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<frown> u' &&& (t \ u) \ (u' \ u) \<approx>\<^sub>0 (t \ u') \ (u \ u')
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
u \<approx>\<^sub>0 u'
t \<frown> u

goal (1 subgoal):
 1. t \<frown> u' &&& (t \ u) \ (u' \ u) \<approx>\<^sub>0 (t \ u') \ (u \ u')
[PROOF STEP]
apply (meson Cong\<^sub>0_subst_left(1) R.con_sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (t \ u) \ (u' \ u) \<approx>\<^sub>0 (t \ u') \ (u \ u')
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
u \<approx>\<^sub>0 u'
t \<frown> u

goal (1 subgoal):
 1. (t \ u) \ (u' \ u) \<approx>\<^sub>0 (t \ u') \ (u \ u')
[PROOF STEP]
by (metis R.sources_resid Cong\<^sub>0_imp_con Cong\<^sub>0_reflexive Resid_along_normal_preserves_Cong\<^sub>0
                R.arr_resid_iff_con residuation.cube R.residuation_axioms)


[STATEMENT]
lemma bernoulli_code [code]:
  "bernoulli n =
     (if n = 0 then 1 else if n = 1 then -1/2 else if odd n then 0 else akiyama_tanigawa n 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bernoulli n = (if n = 0 then 1 else if n = 1 then - 1 / 2 else if odd n then 0 else akiyama_tanigawa n 0)
[PROOF STEP]
proof (cases "n = 0 \<or> n = 1 \<or> odd n")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. n = 0 \<or> n = 1 \<or> odd n \<Longrightarrow> bernoulli n = (if n = 0 then 1 else if n = 1 then - 1 / 2 else if odd n then 0 else akiyama_tanigawa n 0)
 2. \<not> (n = 0 \<or> n = 1 \<or> odd n) \<Longrightarrow> bernoulli n = (if n = 0 then 1 else if n = 1 then - 1 / 2 else if odd n then 0 else akiyama_tanigawa n 0)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (n = 0 \<or> n = 1 \<or> odd n)

goal (2 subgoals):
 1. n = 0 \<or> n = 1 \<or> odd n \<Longrightarrow> bernoulli n = (if n = 0 then 1 else if n = 1 then - 1 / 2 else if odd n then 0 else akiyama_tanigawa n 0)
 2. \<not> (n = 0 \<or> n = 1 \<or> odd n) \<Longrightarrow> bernoulli n = (if n = 0 then 1 else if n = 1 then - 1 / 2 else if odd n then 0 else akiyama_tanigawa n 0)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<not> (n = 0 \<or> n = 1 \<or> odd n)

goal (1 subgoal):
 1. bernoulli n = (if n = 0 then 1 else if n = 1 then - 1 / 2 else if odd n then 0 else akiyama_tanigawa n 0)
[PROOF STEP]
by (auto simp add: bernoulli_conv_akiyama_tanigawa)
[PROOF STATE]
proof (state)
this:
bernoulli n = (if n = 0 then 1 else if n = 1 then - 1 / 2 else if odd n then 0 else akiyama_tanigawa n 0)

goal (1 subgoal):
 1. n = 0 \<or> n = 1 \<or> odd n \<Longrightarrow> bernoulli n = (if n = 0 then 1 else if n = 1 then - 1 / 2 else if odd n then 0 else akiyama_tanigawa n 0)
[PROOF STEP]
qed (auto simp: bernoulli_odd_eq_0)


[STATEMENT]
lemma amin_commute:"amin x y = amin y x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. amin x y = amin y x
[PROOF STEP]
apply (cut_tac ale_linear[of "x" "y"], erule disjE, simp add:amin_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<le> x \<Longrightarrow> amin x y = amin y x
[PROOF STEP]
apply (simp add:amin_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma intpow_spos [simp]: "x > 0 \<Longrightarrow> x ^\<^sub>Z n > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < x \<Longrightarrow> (0::'a) < x ^\<^sub>Z n
[PROOF STEP]
by (simp add: intpow_def)


[STATEMENT]
lemma [simp]: "m \<le> n \<Longrightarrow> a ^ n \<le> a ^ m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> a ^ n \<le> a ^ m
[PROOF STEP]
apply (subgoal_tac "a ^ n = (a ^ m) * (a ^ (n-m))")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>m \<le> n; a ^ n = a ^ m * a ^ (n - m)\<rbrakk> \<Longrightarrow> a ^ n \<le> a ^ m
 2. m \<le> n \<Longrightarrow> a ^ n = a ^ m * a ^ (n - m)
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<Longrightarrow> a ^ n = a ^ m * a ^ (n - m)
[PROOF STEP]
apply (cut_tac a = a and m = "m" and n = "n - m" in power_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>m \<le> n; a ^ (m + (n - m)) = a ^ m * a ^ (n - m)\<rbrakk> \<Longrightarrow> a ^ n = a ^ m * a ^ (n - m)
[PROOF STEP]
by simp


[STATEMENT]
lemma unit_ball_vol_nonneg [simp]: "n \<ge> 0 \<Longrightarrow> unit_ball_vol n \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> n \<Longrightarrow> 0 \<le> unit_ball_vol n
[PROOF STEP]
by (simp add: dual_order.strict_implies_order)


[STATEMENT]
lemma map_split_alt: "map_split f xs = (map (fst o f) xs, map (snd o f) xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_split f xs = (map (fst \<circ> f) xs, map (snd \<circ> f) xs)
[PROOF STEP]
by (induct xs) (auto split: prod.splits)


[STATEMENT]
theorem hbt_delete_auto:
  "hbt t \<Longrightarrow> hbt(delete x t)"
  "hbt t \<Longrightarrow> height t \<in> {height (delete x t), height (delete x t) + 1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (hbt t \<Longrightarrow> hbt (delete x t)) &&& (hbt t \<Longrightarrow> height t \<in> {height (delete x t), height (delete x t) + 1})
[PROOF STEP]
proof (induct t rule: tree2_induct)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. hbt \<langle>\<rangle> \<Longrightarrow> hbt (delete x \<langle>\<rangle>)
 2. hbt \<langle>\<rangle> \<Longrightarrow> height \<langle>\<rangle> \<in> {height (delete x \<langle>\<rangle>), height (delete x \<langle>\<rangle>) + 1}
 3. \<And>x1 a b x3. \<lbrakk>hbt x1 \<Longrightarrow> hbt (delete x x1); hbt x1 \<Longrightarrow> height x1 \<in> {height (delete x x1), height (delete x x1) + 1}; hbt x3 \<Longrightarrow> hbt (delete x x3); hbt x3 \<Longrightarrow> height x3 \<in> {height (delete x x3), height (delete x x3) + 1}; hbt \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> hbt (delete x \<langle>x1, (a, b), x3\<rangle>)
 4. \<And>x1 a b x3. \<lbrakk>hbt x1 \<Longrightarrow> hbt (delete x x1); hbt x1 \<Longrightarrow> height x1 \<in> {height (delete x x1), height (delete x x1) + 1}; hbt x3 \<Longrightarrow> hbt (delete x x3); hbt x3 \<Longrightarrow> height x3 \<in> {height (delete x x3), height (delete x x3) + 1}; hbt \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> height \<langle>x1, (a, b), x3\<rangle> \<in> {height (delete x \<langle>x1, (a, b), x3\<rangle>), height (delete x \<langle>x1, (a, b), x3\<rangle>) + 1}
[PROOF STEP]
case (Node l a n r)
[PROOF STATE]
proof (state)
this:
hbt l \<Longrightarrow> hbt (delete x l)
hbt l \<Longrightarrow> height l \<in> {height (delete x l), height (delete x l) + 1}
hbt r \<Longrightarrow> hbt (delete x r)
hbt r \<Longrightarrow> height r \<in> {height (delete x r), height (delete x r) + 1}

goal (4 subgoals):
 1. hbt \<langle>\<rangle> \<Longrightarrow> hbt (delete x \<langle>\<rangle>)
 2. hbt \<langle>\<rangle> \<Longrightarrow> height \<langle>\<rangle> \<in> {height (delete x \<langle>\<rangle>), height (delete x \<langle>\<rangle>) + 1}
 3. \<And>x1 a b x3. \<lbrakk>hbt x1 \<Longrightarrow> hbt (delete x x1); hbt x1 \<Longrightarrow> height x1 \<in> {height (delete x x1), height (delete x x1) + 1}; hbt x3 \<Longrightarrow> hbt (delete x x3); hbt x3 \<Longrightarrow> height x3 \<in> {height (delete x x3), height (delete x x3) + 1}; hbt \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> hbt (delete x \<langle>x1, (a, b), x3\<rangle>)
 4. \<And>x1 a b x3. \<lbrakk>hbt x1 \<Longrightarrow> hbt (delete x x1); hbt x1 \<Longrightarrow> height x1 \<in> {height (delete x x1), height (delete x x1) + 1}; hbt x3 \<Longrightarrow> hbt (delete x x3); hbt x3 \<Longrightarrow> height x3 \<in> {height (delete x x3), height (delete x x3) + 1}; hbt \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> height \<langle>x1, (a, b), x3\<rangle> \<in> {height (delete x \<langle>x1, (a, b), x3\<rangle>), height (delete x \<langle>x1, (a, b), x3\<rangle>) + 1}
[PROOF STEP]
case 1
[PROOF STATE]
proof (state)
this:
hbt \<langle>l, (a, n), r\<rangle>

goal (4 subgoals):
 1. hbt \<langle>\<rangle> \<Longrightarrow> hbt (delete x \<langle>\<rangle>)
 2. hbt \<langle>\<rangle> \<Longrightarrow> height \<langle>\<rangle> \<in> {height (delete x \<langle>\<rangle>), height (delete x \<langle>\<rangle>) + 1}
 3. \<And>x1 a b x3. \<lbrakk>hbt x1 \<Longrightarrow> hbt (delete x x1); hbt x1 \<Longrightarrow> height x1 \<in> {height (delete x x1), height (delete x x1) + 1}; hbt x3 \<Longrightarrow> hbt (delete x x3); hbt x3 \<Longrightarrow> height x3 \<in> {height (delete x x3), height (delete x x3) + 1}; hbt \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> hbt (delete x \<langle>x1, (a, b), x3\<rangle>)
 4. \<And>x1 a b x3. \<lbrakk>hbt x1 \<Longrightarrow> hbt (delete x x1); hbt x1 \<Longrightarrow> height x1 \<in> {height (delete x x1), height (delete x x1) + 1}; hbt x3 \<Longrightarrow> hbt (delete x x3); hbt x3 \<Longrightarrow> height x3 \<in> {height (delete x x3), height (delete x x3) + 1}; hbt \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> height \<langle>x1, (a, b), x3\<rangle> \<in> {height (delete x \<langle>x1, (a, b), x3\<rangle>), height (delete x \<langle>x1, (a, b), x3\<rangle>) + 1}
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
hbt \<langle>l, (a, n), r\<rangle>

goal (1 subgoal):
 1. hbt (delete x \<langle>l, (a, n), r\<rangle>)
[PROOF STEP]
using Node hbt_split_max[of l]
[PROOF STATE]
proof (prove)
using this:
hbt \<langle>l, (a, n), r\<rangle>
hbt l \<Longrightarrow> hbt (delete x l)
hbt l \<Longrightarrow> height l \<in> {height (delete x l), height (delete x l) + 1}
hbt r \<Longrightarrow> hbt (delete x r)
hbt r \<Longrightarrow> height r \<in> {height (delete x r), height (delete x r) + 1}
\<lbrakk>hbt l; l \<noteq> \<langle>\<rangle>\<rbrakk> \<Longrightarrow> hbt (fst (split_max l)) \<and> height l \<in> {height (fst (split_max l)), height (fst (split_max l)) + 1}

goal (1 subgoal):
 1. hbt (delete x \<langle>l, (a, n), r\<rangle>)
[PROOF STEP]
by (auto intro!: hbt_balL hbt_balR split: prod.split)
[PROOF STATE]
proof (state)
this:
hbt (delete x \<langle>l, (a, n), r\<rangle>)

goal (3 subgoals):
 1. hbt \<langle>\<rangle> \<Longrightarrow> hbt (delete x \<langle>\<rangle>)
 2. hbt \<langle>\<rangle> \<Longrightarrow> height \<langle>\<rangle> \<in> {height (delete x \<langle>\<rangle>), height (delete x \<langle>\<rangle>) + 1}
 3. \<And>x1 a b x3. \<lbrakk>hbt x1 \<Longrightarrow> hbt (delete x x1); hbt x1 \<Longrightarrow> height x1 \<in> {height (delete x x1), height (delete x x1) + 1}; hbt x3 \<Longrightarrow> hbt (delete x x3); hbt x3 \<Longrightarrow> height x3 \<in> {height (delete x x3), height (delete x x3) + 1}; hbt \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> height \<langle>x1, (a, b), x3\<rangle> \<in> {height (delete x \<langle>x1, (a, b), x3\<rangle>), height (delete x \<langle>x1, (a, b), x3\<rangle>) + 1}
[PROOF STEP]
case 2
[PROOF STATE]
proof (state)
this:
hbt \<langle>l, (a, n), r\<rangle>

goal (3 subgoals):
 1. hbt \<langle>\<rangle> \<Longrightarrow> hbt (delete x \<langle>\<rangle>)
 2. hbt \<langle>\<rangle> \<Longrightarrow> height \<langle>\<rangle> \<in> {height (delete x \<langle>\<rangle>), height (delete x \<langle>\<rangle>) + 1}
 3. \<And>x1 a b x3. \<lbrakk>hbt x1 \<Longrightarrow> hbt (delete x x1); hbt x1 \<Longrightarrow> height x1 \<in> {height (delete x x1), height (delete x x1) + 1}; hbt x3 \<Longrightarrow> hbt (delete x x3); hbt x3 \<Longrightarrow> height x3 \<in> {height (delete x x3), height (delete x x3) + 1}; hbt \<langle>x1, (a, b), x3\<rangle>\<rbrakk> \<Longrightarrow> height \<langle>x1, (a, b), x3\<rangle> \<in> {height (delete x \<langle>x1, (a, b), x3\<rangle>), height (delete x \<langle>x1, (a, b), x3\<rangle>) + 1}
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
proof(cases "x = a")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = a \<Longrightarrow> height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
 2. x \<noteq> a \<Longrightarrow> height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
x = a

goal (2 subgoals):
 1. x = a \<Longrightarrow> height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
 2. x \<noteq> a \<Longrightarrow> height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x = a

goal (1 subgoal):
 1. height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
using 2 hbt_split_max[of l]
[PROOF STATE]
proof (prove)
using this:
x = a
hbt \<langle>l, (a, n), r\<rangle>
\<lbrakk>hbt l; l \<noteq> \<langle>\<rangle>\<rbrakk> \<Longrightarrow> hbt (fst (split_max l)) \<and> height l \<in> {height (fst (split_max l)), height (fst (split_max l)) + 1}

goal (1 subgoal):
 1. height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
by(auto simp: balR_def max_absorb2 split!: if_splits prod.split tree.split)
[PROOF STATE]
proof (state)
this:
height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}

goal (1 subgoal):
 1. x \<noteq> a \<Longrightarrow> height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x \<noteq> a \<Longrightarrow> height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> a

goal (1 subgoal):
 1. x \<noteq> a \<Longrightarrow> height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
x \<noteq> a

goal (1 subgoal):
 1. height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
using height_balL[of l "delete x r" a] height_balR[of "delete x l" r a] 2 Node
[PROOF STATE]
proof (prove)
using this:
x \<noteq> a
\<lbrakk>hbt l; hbt (delete x r); height l = height (delete x r) + m + 1\<rbrakk> \<Longrightarrow> height (balL l a (delete x r)) \<in> {height (delete x r) + m + 1, height (delete x r) + m + 2}
\<lbrakk>hbt (delete x l); hbt r; height r = height (delete x l) + m + 1\<rbrakk> \<Longrightarrow> height (balR (delete x l) a r) \<in> {height (delete x l) + m + 1, height (delete x l) + m + 2}
hbt \<langle>l, (a, n), r\<rangle>
hbt l \<Longrightarrow> hbt (delete x l)
hbt l \<Longrightarrow> height l \<in> {height (delete x l), height (delete x l) + 1}
hbt r \<Longrightarrow> hbt (delete x r)
hbt r \<Longrightarrow> height r \<in> {height (delete x r), height (delete x r) + 1}

goal (1 subgoal):
 1. height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}
[PROOF STEP]
by(auto simp: balL_def balR_def split!: if_split)
[PROOF STATE]
proof (state)
this:
height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
height \<langle>l, (a, n), r\<rangle> \<in> {height (delete x \<langle>l, (a, n), r\<rangle>), height (delete x \<langle>l, (a, n), r\<rangle>) + 1}

goal (2 subgoals):
 1. hbt \<langle>\<rangle> \<Longrightarrow> hbt (delete x \<langle>\<rangle>)
 2. hbt \<langle>\<rangle> \<Longrightarrow> height \<langle>\<rangle> \<in> {height (delete x \<langle>\<rangle>), height (delete x \<langle>\<rangle>) + 1}
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma toplevel_summands_flatten:
  "\<lbrakk>X \<noteq> {}; finite X; \<forall>x \<in> X. \<not>(\<exists>r s. x = Plus r s)\<rbrakk> \<Longrightarrow> toplevel_summands (flatten PLUS X) = X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>X \<noteq> {}; finite X; \<forall>x\<in>X. \<nexists>r s. x = Plus r s\<rbrakk> \<Longrightarrow> toplevel_summands (PLUS (sorted_list_of_set X)) = X
[PROOF STEP]
using toplevel_summands_PLUS_strong[of "sorted_list_of_set X"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>sorted_list_of_set X \<noteq> []; list_all (\<lambda>x. \<nexists>r s. x = Plus r s) (sorted_list_of_set X)\<rbrakk> \<Longrightarrow> toplevel_summands (PLUS (sorted_list_of_set X)) = set (sorted_list_of_set X)

goal (1 subgoal):
 1. \<lbrakk>X \<noteq> {}; finite X; \<forall>x\<in>X. \<nexists>r s. x = Plus r s\<rbrakk> \<Longrightarrow> toplevel_summands (PLUS (sorted_list_of_set X)) = X
[PROOF STEP]
unfolding list_all_iff
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>sorted_list_of_set X \<noteq> []; \<forall>x\<in>set (sorted_list_of_set X). \<nexists>r s. x = Plus r s\<rbrakk> \<Longrightarrow> toplevel_summands (PLUS (sorted_list_of_set X)) = set (sorted_list_of_set X)

goal (1 subgoal):
 1. \<lbrakk>X \<noteq> {}; finite X; \<forall>x\<in>X. \<nexists>r s. x = Plus r s\<rbrakk> \<Longrightarrow> toplevel_summands (PLUS (sorted_list_of_set X)) = X
[PROOF STEP]
by fastforce


[STATEMENT]
lemma translation_galois:
  fixes a :: "'a::ab_group_add"
  shows "T = ((\<lambda>x. a + x) ` S) \<longleftrightarrow> S = ((\<lambda>x. (- a) + x) ` T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (T = (+) a ` S) = (S = (+) (- a) ` T)
[PROOF STEP]
using translation_assoc[of "-a" a S]
[PROOF STATE]
proof (prove)
using this:
(+) (- a) ` (+) a ` S = (+) (a + - a) ` S

goal (1 subgoal):
 1. (T = (+) a ` S) = (S = (+) (- a) ` T)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>(\<lambda>x. x - a) ` (+) a ` (\<lambda>x. x - a) ` T = (\<lambda>x. x - a) ` T; S = (\<lambda>x. x - a) ` T; x \<in> T\<rbrakk> \<Longrightarrow> x \<in> (+) a ` (\<lambda>x. x - a) ` T
[PROOF STEP]
using translation_assoc[of a "-a" T]
[PROOF STATE]
proof (prove)
using this:
(+) a ` (+) (- a) ` T = (+) (- a + a) ` T

goal (1 subgoal):
 1. \<And>x. \<lbrakk>(\<lambda>x. x - a) ` (+) a ` (\<lambda>x. x - a) ` T = (\<lambda>x. x - a) ` T; S = (\<lambda>x. x - a) ` T; x \<in> T\<rbrakk> \<Longrightarrow> x \<in> (+) a ` (\<lambda>x. x - a) ` T
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma fact_diff_Suc: "n < Suc m \<Longrightarrow> fact (Suc m - n) = of_nat (Suc m - n) * fact (m - n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < Suc m \<Longrightarrow> fact (Suc m - n) = of_nat (Suc m - n) * fact (m - n)
[PROOF STEP]
by (subst fact_reduce) auto


[STATEMENT]
lemma length_takeWhile_le: "length (takeWhile P xs) \<le> length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (takeWhile P xs) \<le> length xs
[PROOF STEP]
by (induct xs) auto


[STATEMENT]
lemma pairwise_disjnt_countable:
  fixes \<N> :: "nat set set"
  assumes "pairwise disjnt \<N>"
    shows "countable \<N>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. countable \<N>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. countable \<N>
[PROOF STEP]
have "inj_on (\<lambda>X. SOME n. n \<in> X) (\<N> - {{}})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (\<lambda>X. SOME n. n \<in> X) (\<N> - {{}})
[PROOF STEP]
by (clarsimp simp: inj_on_def) (metis assms disjnt_iff pairwiseD some_in_eq)
[PROOF STATE]
proof (state)
this:
inj_on (\<lambda>X. SOME n. n \<in> X) (\<N> - {{}})

goal (1 subgoal):
 1. countable \<N>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
inj_on (\<lambda>X. SOME n. n \<in> X) (\<N> - {{}})
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
inj_on (\<lambda>X. SOME n. n \<in> X) (\<N> - {{}})

goal (1 subgoal):
 1. countable \<N>
[PROOF STEP]
by (metis countable_Diff_eq countable_def)
[PROOF STATE]
proof (state)
this:
countable \<N>

goal:
No subgoals!
[PROOF STEP]
qed