[STATEMENT]
lemma inner_prod_with_itself_Re_non0:
  assumes "u \<noteq> 0\<^sub>v (dim_vec u)"
  shows "Re (\<langle>u|u\<rangle>) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
obtain i where a1:"i < dim_vec u" and "u $ i \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. \<lbrakk>i < dim_vec u; u $ i \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms zero_vec_def
[PROOF STATE]
proof (prove)
using this:
u \<noteq> 0\<^sub>v (dim_vec u)
0\<^sub>v ?n \<equiv> vec ?n (\<lambda>i. 0::?'a)

goal (1 subgoal):
 1. (\<And>i. \<lbrakk>i < dim_vec u; u $ i \<noteq> 0\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis dim_vec eq_vecI index_zero_vec(1))
[PROOF STATE]
proof (state)
this:
i < dim_vec u
u $ i \<noteq> 0

goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < dim_vec u
u $ i \<noteq> 0
[PROOF STEP]
have f1:"Re (cnj (u $ i) * (u $ i)) > 0"
[PROOF STATE]
proof (prove)
using this:
i < dim_vec u
u $ i \<noteq> 0

goal (1 subgoal):
 1. 0 < Re (cnj (u $ i) * u $ i)
[PROOF STEP]
by (metis Re_complex_of_real complex_mult_cnj complex_neq_0 mult.commute)
[PROOF STATE]
proof (state)
this:
0 < Re (cnj (u $ i) * u $ i)

goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
0 < Re (cnj (u $ i) * u $ i)

goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
have f2:"Re (\<langle>u|u\<rangle>) = (\<Sum>i<dim_vec u. Re (cnj(u $ i) * (u $ i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re \<langle>u|u\<rangle> = (\<Sum>i<dim_vec u. Re (cnj (u $ i) * u $ i))
[PROOF STEP]
using inner_prod_def
[PROOF STATE]
proof (prove)
using this:
\<langle>?u|?v\<rangle> \<equiv> \<Sum>i = 0..<dim_vec ?v. cnj (?u $ i) * ?v $ i

goal (1 subgoal):
 1. Re \<langle>u|u\<rangle> = (\<Sum>i<dim_vec u. Re (cnj (u $ i) * u $ i))
[PROOF STEP]
by (simp add: lessThan_atLeast0)
[PROOF STATE]
proof (state)
this:
Re \<langle>u|u\<rangle> = (\<Sum>i<dim_vec u. Re (cnj (u $ i) * u $ i))

goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
Re \<langle>u|u\<rangle> = (\<Sum>i<dim_vec u. Re (cnj (u $ i) * u $ i))

goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
have f3:"\<forall>i<dim_vec u. Re (cnj(u $ i) * (u $ i)) \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i<dim_vec u. 0 \<le> Re (cnj (u $ i) * u $ i)
[PROOF STEP]
using complex_mult_cnj
[PROOF STATE]
proof (prove)
using this:
?z * cnj ?z = complex_of_real ((Re ?z)\<^sup>2 + (Im ?z)\<^sup>2)

goal (1 subgoal):
 1. \<forall>i<dim_vec u. 0 \<le> Re (cnj (u $ i) * u $ i)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<forall>i<dim_vec u. 0 \<le> Re (cnj (u $ i) * u $ i)

goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
0 < Re (cnj (u $ i) * u $ i)
Re \<langle>u|u\<rangle> = (\<Sum>i<dim_vec u. Re (cnj (u $ i) * u $ i))
\<forall>i<dim_vec u. 0 \<le> Re (cnj (u $ i) * u $ i)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
0 < Re (cnj (u $ i) * u $ i)
Re \<langle>u|u\<rangle> = (\<Sum>i<dim_vec u. Re (cnj (u $ i) * u $ i))
\<forall>i<dim_vec u. 0 \<le> Re (cnj (u $ i) * u $ i)

goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
using a1 inner_prod_def lessThan_iff
[PROOF STATE]
proof (prove)
using this:
0 < Re (cnj (u $ i) * u $ i)
Re \<langle>u|u\<rangle> = (\<Sum>i<dim_vec u. Re (cnj (u $ i) * u $ i))
\<forall>i<dim_vec u. 0 \<le> Re (cnj (u $ i) * u $ i)
i < dim_vec u
\<langle>?u|?v\<rangle> \<equiv> \<Sum>i = 0..<dim_vec ?v. cnj (?u $ i) * ?v $ i
(?i \<in> {..<?k}) = (?i < ?k)

goal (1 subgoal):
 1. 0 < Re \<langle>u|u\<rangle>
[PROOF STEP]
by (metis (no_types, lifting) finite_lessThan sum_pos2)
[PROOF STATE]
proof (state)
this:
0 < Re \<langle>u|u\<rangle>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sum_ssub_nzero_cong:
  assumes "\<forall>k. k \<le> length p - 1 \<and> issub (p!k) \<and> l = goes_to (p!k) \<longrightarrow> f k = g k"
  shows "\<Sum>S- p l f = \<Sum>S- p l g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum>S- p l f  = \<Sum>S- p l g
[PROOF STEP]
unfolding sum_ssub_nzero.simps
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k = 0..length p - 1. if issub (p ! k) \<and> l = goes_to (p ! k) then f k else 0) = (\<Sum>k = 0..length p - 1. if issub (p ! k) \<and> l = goes_to (p ! k) then g k else 0)
[PROOF STEP]
by (rule sum.cong, simp) (rule if_cong, simp_all add: assms)


[STATEMENT]
theorem Euler_partition_theorem:
  "card {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} = card {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}"
  (is "card ?distinct_partitions = card ?odd_partitions")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} = card {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
proof (rule card_bij_eq)
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. inj_on ?f {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 2. ?f ` {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
 3. inj_on ?g {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
 4. ?g ` {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 5. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 6. finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
from odd_of_distinct_in_odd_partitions
[PROOF STATE]
proof (chain)
picking this:
?p \<in> {p. p partitions ?n \<and> (\<forall>i. p i \<le> 1)} \<Longrightarrow> odd_of_distinct ?p \<in> {p. p partitions ?n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
show
    "odd_of_distinct ` ?distinct_partitions \<subseteq> ?odd_partitions"
[PROOF STATE]
proof (prove)
using this:
?p \<in> {p. p partitions ?n \<and> (\<forall>i. p i \<le> 1)} \<Longrightarrow> odd_of_distinct ?p \<in> {p. p partitions ?n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}

goal (1 subgoal):
 1. odd_of_distinct ` {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
odd_of_distinct ` {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}

goal (5 subgoals):
 1. inj_on odd_of_distinct {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 2. inj_on ?g {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
 3. ?g ` {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 4. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 5. finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
odd_of_distinct ` {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}

goal (5 subgoals):
 1. inj_on odd_of_distinct {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 2. inj_on ?g {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
 3. ?g ` {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 4. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 5. finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
from distinct_of_odd_in_distinct_partitions
[PROOF STATE]
proof (chain)
picking this:
?p \<in> {p. p partitions ?n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<Longrightarrow> distinct_of_odd ?p \<in> {p. p partitions ?n \<and> (\<forall>i. p i \<le> 1)}
[PROOF STEP]
show
    "distinct_of_odd ` ?odd_partitions \<subseteq> ?distinct_partitions"
[PROOF STATE]
proof (prove)
using this:
?p \<in> {p. p partitions ?n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<Longrightarrow> distinct_of_odd ?p \<in> {p. p partitions ?n \<and> (\<forall>i. p i \<le> 1)}

goal (1 subgoal):
 1. distinct_of_odd ` {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
distinct_of_odd ` {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}

goal (4 subgoals):
 1. inj_on odd_of_distinct {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 2. inj_on distinct_of_odd {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
 3. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 4. finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
distinct_of_odd ` {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}

goal (4 subgoals):
 1. inj_on odd_of_distinct {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 2. inj_on distinct_of_odd {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
 3. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 4. finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
have "\<forall>p\<in>?distinct_partitions. distinct_of_odd (odd_of_distinct p) = p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>p\<in>{p. p partitions n \<and> (\<forall>i. p i \<le> 1)}. distinct_of_odd (odd_of_distinct p) = p
[PROOF STEP]
by auto (subst distinct_odd; auto simp add: partitions_def)
[PROOF STATE]
proof (state)
this:
\<forall>p\<in>{p. p partitions n \<and> (\<forall>i. p i \<le> 1)}. distinct_of_odd (odd_of_distinct p) = p

goal (4 subgoals):
 1. inj_on odd_of_distinct {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 2. inj_on distinct_of_odd {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
 3. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 4. finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>p\<in>{p. p partitions n \<and> (\<forall>i. p i \<le> 1)}. distinct_of_odd (odd_of_distinct p) = p

goal (4 subgoals):
 1. inj_on odd_of_distinct {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 2. inj_on distinct_of_odd {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
 3. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 4. finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
have "\<forall>p\<in>?odd_partitions. odd_of_distinct (distinct_of_odd p) = p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>p\<in>{p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}. odd_of_distinct (distinct_of_odd p) = p
[PROOF STEP]
by auto (subst odd_distinct; auto simp add: partitions_def)
[PROOF STATE]
proof (state)
this:
\<forall>p\<in>{p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}. odd_of_distinct (distinct_of_odd p) = p

goal (4 subgoals):
 1. inj_on odd_of_distinct {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 2. inj_on distinct_of_odd {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
 3. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 4. finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
odd_of_distinct ` {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
distinct_of_odd ` {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
\<forall>p\<in>{p. p partitions n \<and> (\<forall>i. p i \<le> 1)}. distinct_of_odd (odd_of_distinct p) = p
\<forall>p\<in>{p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}. odd_of_distinct (distinct_of_odd p) = p
[PROOF STEP]
show "inj_on odd_of_distinct ?distinct_partitions"
    "inj_on distinct_of_odd ?odd_partitions"
[PROOF STATE]
proof (prove)
using this:
odd_of_distinct ` {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
distinct_of_odd ` {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)} \<subseteq> {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
\<forall>p\<in>{p. p partitions n \<and> (\<forall>i. p i \<le> 1)}. distinct_of_odd (odd_of_distinct p) = p
\<forall>p\<in>{p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}. odd_of_distinct (distinct_of_odd p) = p

goal (1 subgoal):
 1. inj_on odd_of_distinct {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} &&& inj_on distinct_of_odd {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
by (intro bij_betw_imp_inj_on bij_betw_byWitness; auto)+
[PROOF STATE]
proof (state)
this:
inj_on odd_of_distinct {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
inj_on distinct_of_odd {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}

goal (2 subgoals):
 1. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
 2. finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
show "finite ?distinct_partitions" "finite ?odd_partitions"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)} &&& finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}
[PROOF STEP]
by (simp add: finite_partitions)+
[PROOF STATE]
proof (state)
this:
finite {p. p partitions n \<and> (\<forall>i. p i \<le> 1)}
finite {p. p partitions n \<and> (\<forall>i. p i \<noteq> 0 \<longrightarrow> odd i)}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma period_eq:
  assumes "C \<in> UNIV // communicating" "x \<in> C"
  shows "period C = Gcd (period_set x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. period C = Gcd (period_set x)
[PROOF STEP]
unfolding period_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SOME d. \<forall>x\<in>C. d = Gcd (period_set x)) = Gcd (period_set x)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
C \<in> UNIV // communicating
x \<in> C

goal (1 subgoal):
 1. (SOME d. \<forall>x\<in>C. d = Gcd (period_set x)) = Gcd (period_set x)
[PROOF STEP]
by (rule_tac someI2[where a="Gcd (period_set x)"])
     (auto intro!: Gcd_period_set_invariant irreducibleD)


[STATEMENT]
lemma Bernstein_coeffs_01_smult:
  assumes "degree P \<le> p"
  shows "nth_default 0 (Bernstein_coeffs_01 p (smult a P)) i =
          a * nth_default 0 (Bernstein_coeffs_01 p P) i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nth_default 0 (Bernstein_coeffs_01 p (smult a P)) i = a * nth_default 0 (Bernstein_coeffs_01 p P) i
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
degree P \<le> p

goal (1 subgoal):
 1. nth_default 0 (Bernstein_coeffs_01 p (smult a P)) i = a * nth_default 0 (Bernstein_coeffs_01 p P) i
[PROOF STEP]
by (auto simp: nth_default_Bernstein_coeffs_01 reciprocal_smult
      pcompose_smult)


[STATEMENT]
lemma Min_set_partition_covers:
  assumes "finite As"
  assumes "As \<subseteq> carrier (SA m)"
  assumes "As \<noteq> {}"
  assumes "is_semialgebraic m B"
  shows "\<Union> (Min_set_partition m As B)  = B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (Min_set_partition m As B) = B
[PROOF STEP]
unfolding Min_set_partition_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (disjointify ((\<inter>) B ` Min_set m As ` As)) = B
[PROOF STEP]
using Min_set_partition_covers0[of As m B] assms disjointify_union[of "((\<inter>) B ` Min_set m As ` As)"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>finite As; As \<noteq> {}; As \<subseteq> carrier (SA m); is_semialgebraic m B\<rbrakk> \<Longrightarrow> \<Union> ((\<inter>) B ` Min_set m As ` As) = B
finite As
As \<subseteq> carrier (SA m)
As \<noteq> {}
is_semialgebraic m B
finite ((\<inter>) B ` Min_set m As ` As) \<Longrightarrow> \<Union> (disjointify ((\<inter>) B ` Min_set m As ` As)) = \<Union> ((\<inter>) B ` Min_set m As ` As)

goal (1 subgoal):
 1. \<Union> (disjointify ((\<inter>) B ` Min_set m As ` As)) = B
[PROOF STEP]
by (metis finite_imageI)


[STATEMENT]
lemma sum_invert: "N \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - N)..n. f (n - i)) = (\<Sum>j<N. f j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - N)..n. f (n - i)) = sum f {..<N}
[PROOF STEP]
proof (induction N)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - 0)..n. f (n - i)) = sum f {..<0}
 2. \<And>N. \<lbrakk>N \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - N)..n. f (n - i)) = sum f {..<N}; Suc N \<le> n\<rbrakk> \<Longrightarrow> (\<Sum>i = Suc (n - Suc N)..n. f (n - i)) = sum f {..<Suc N}
[PROOF STEP]
case (Suc N)
[PROOF STATE]
proof (state)
this:
N \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - N)..n. f (n - i)) = sum f {..<N}
Suc N \<le> n

goal (2 subgoals):
 1. 0 \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - 0)..n. f (n - i)) = sum f {..<0}
 2. \<And>N. \<lbrakk>N \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - N)..n. f (n - i)) = sum f {..<N}; Suc N \<le> n\<rbrakk> \<Longrightarrow> (\<Sum>i = Suc (n - Suc N)..n. f (n - i)) = sum f {..<Suc N}
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
N \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - N)..n. f (n - i)) = sum f {..<N}
Suc N \<le> n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
N \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - N)..n. f (n - i)) = sum f {..<N}
Suc N \<le> n

goal (1 subgoal):
 1. (\<Sum>i = Suc (n - Suc N)..n. f (n - i)) = sum f {..<Suc N}
[PROOF STEP]
apply (auto simp: Suc_diff_Suc)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(\<Sum>i = Suc (n - N)..n. f (n - i)) = sum f {..<N}; Suc N \<le> n\<rbrakk> \<Longrightarrow> (\<Sum>i = n - N..n. f (n - i)) = sum f {..<N} + f N
[PROOF STEP]
by (metis sum.atLeast_Suc_atMost Suc_leD add.commute diff_diff_cancel diff_le_self)
[PROOF STATE]
proof (state)
this:
(\<Sum>i = Suc (n - Suc N)..n. f (n - i)) = sum f {..<Suc N}

goal (1 subgoal):
 1. 0 \<le> n \<Longrightarrow> (\<Sum>i = Suc (n - 0)..n. f (n - i)) = sum f {..<0}
[PROOF STEP]
qed auto


[STATEMENT]
lemma hermitian_one:
  shows "hermitian ((1\<^sub>m n)::('a::conjugatable_field mat))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hermitian (1\<^sub>m n)
[PROOF STEP]
unfolding hermitian_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint (1\<^sub>m n) = 1\<^sub>m n
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. adjoint (1\<^sub>m n) = 1\<^sub>m n
[PROOF STEP]
have "conjugate (1::'a) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjugate (1::'a) = (1::'a)
[PROOF STEP]
apply (subst mult_1_right[symmetric, of "conjugate 1"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjugate (1::'a) * (1::'a) = (1::'a)
[PROOF STEP]
apply (subst conjugate_id[symmetric, of "conjugate 1 * 1"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjugate (conjugate (conjugate (1::'a) * (1::'a))) = (1::'a)
[PROOF STEP]
apply (subst conjugate_dist_mul)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjugate (conjugate (conjugate (1::'a)) * conjugate (1::'a)) = (1::'a)
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
conjugate (1::'a) = (1::'a)

goal (1 subgoal):
 1. adjoint (1\<^sub>m n) = 1\<^sub>m n
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
conjugate (1::'a) = (1::'a)
[PROOF STEP]
show "adjoint ((1\<^sub>m n)::('a::conjugatable_field mat)) = (1\<^sub>m n)"
[PROOF STATE]
proof (prove)
using this:
conjugate (1::'a) = (1::'a)

goal (1 subgoal):
 1. adjoint (1\<^sub>m n) = 1\<^sub>m n
[PROOF STEP]
by (auto simp add: adjoint_eval)
[PROOF STATE]
proof (state)
this:
adjoint (1\<^sub>m n) = 1\<^sub>m n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fls_inverse_delta:
  fixes   b :: "'a::division_ring"
  shows   "inverse (Abs_fls (\<lambda>n. if n=a then b else 0)) =
            Abs_fls (\<lambda>n. if n=-a then inverse b else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inverse (Abs_fls (\<lambda>n. if n = a then b else (0::'a))) = Abs_fls (\<lambda>n. if n = - a then inverse b else (0::'a))
[PROOF STEP]
by      (cases "b=0") (simp_all add: fls_inverse_delta_nonzero)


[STATEMENT]
lemma continuous_on_components_open_eq:
  fixes S :: "'a::real_normed_vector set"
  shows "open S \<Longrightarrow> (continuous_on S f \<longleftrightarrow> (\<forall>c \<in> components S. continuous_on c f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open S \<Longrightarrow> continuous_on S f = (\<forall>c\<in>components S. continuous_on c f)
[PROOF STEP]
using continuous_on_subset in_components_subset
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>continuous_on ?s ?f; ?t \<subseteq> ?s\<rbrakk> \<Longrightarrow> continuous_on ?t ?f
?c \<in> components ?s \<Longrightarrow> ?c \<subseteq> ?s

goal (1 subgoal):
 1. open S \<Longrightarrow> continuous_on S f = (\<forall>c\<in>components S. continuous_on c f)
[PROOF STEP]
by (blast intro: continuous_on_components_open)


[STATEMENT]
lemma periodic_mult: "\<chi> (a + m * n) = \<chi> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> (a + m * n) = \<chi> a
[PROOF STEP]
proof (induction m)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<chi> (a + 0 * n) = \<chi> a
 2. \<And>m. \<chi> (a + m * n) = \<chi> a \<Longrightarrow> \<chi> (a + Suc m * n) = \<chi> a
[PROOF STEP]
case (Suc m)
[PROOF STATE]
proof (state)
this:
\<chi> (a + m * n) = \<chi> a

goal (2 subgoals):
 1. \<chi> (a + 0 * n) = \<chi> a
 2. \<And>m. \<chi> (a + m * n) = \<chi> a \<Longrightarrow> \<chi> (a + Suc m * n) = \<chi> a
[PROOF STEP]
have "a + Suc m * n = a + m * n+ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a + Suc m * n = a + m * n + n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a + Suc m * n = a + m * n + n

goal (2 subgoals):
 1. \<chi> (a + 0 * n) = \<chi> a
 2. \<And>m. \<chi> (a + m * n) = \<chi> a \<Longrightarrow> \<chi> (a + Suc m * n) = \<chi> a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
a + Suc m * n = a + m * n + n

goal (2 subgoals):
 1. \<chi> (a + 0 * n) = \<chi> a
 2. \<And>m. \<chi> (a + m * n) = \<chi> a \<Longrightarrow> \<chi> (a + Suc m * n) = \<chi> a
[PROOF STEP]
have "\<chi> \<dots> = \<chi> (a + m * n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> (a + m * n + n) = \<chi> (a + m * n)
[PROOF STEP]
by (rule periodic)
[PROOF STATE]
proof (state)
this:
\<chi> (a + m * n + n) = \<chi> (a + m * n)

goal (2 subgoals):
 1. \<chi> (a + 0 * n) = \<chi> a
 2. \<And>m. \<chi> (a + m * n) = \<chi> a \<Longrightarrow> \<chi> (a + Suc m * n) = \<chi> a
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<chi> (a + m * n + n) = \<chi> (a + m * n)

goal (2 subgoals):
 1. \<chi> (a + 0 * n) = \<chi> a
 2. \<And>m. \<chi> (a + m * n) = \<chi> a \<Longrightarrow> \<chi> (a + Suc m * n) = \<chi> a
[PROOF STEP]
have "\<dots> = \<chi> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<chi> (a + m * n) = \<chi> a
[PROOF STEP]
by (rule Suc.IH)
[PROOF STATE]
proof (state)
this:
\<chi> (a + m * n) = \<chi> a

goal (2 subgoals):
 1. \<chi> (a + 0 * n) = \<chi> a
 2. \<And>m. \<chi> (a + m * n) = \<chi> a \<Longrightarrow> \<chi> (a + Suc m * n) = \<chi> a
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<chi> (a + Suc m * n) = \<chi> a
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
\<chi> (a + Suc m * n) = \<chi> a

goal (1 subgoal):
 1. \<chi> (a + Suc m * n) = \<chi> a
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<chi> (a + Suc m * n) = \<chi> a

goal (1 subgoal):
 1. \<chi> (a + 0 * n) = \<chi> a
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma ListSum_le:
  "(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> (\<Sum>\<^bsub>v \<in> V\<^esub> f v) \<le> (\<Sum>\<^bsub>v \<in> V\<^esub> (g v::nat))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g
[PROOF STEP]
proof (induct V)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>v. v \<in> set [] \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum [] f \<le> ListSum [] g
 2. \<And>a V. \<lbrakk>(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g; \<And>v. v \<in> set (a # V) \<Longrightarrow> f v \<le> g v\<rbrakk> \<Longrightarrow> ListSum (a # V) f \<le> ListSum (a # V) g
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
?v \<in> set [] \<Longrightarrow> f ?v \<le> g ?v

goal (2 subgoals):
 1. (\<And>v. v \<in> set [] \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum [] f \<le> ListSum [] g
 2. \<And>a V. \<lbrakk>(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g; \<And>v. v \<in> set (a # V) \<Longrightarrow> f v \<le> g v\<rbrakk> \<Longrightarrow> ListSum (a # V) f \<le> ListSum (a # V) g
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?v \<in> set [] \<Longrightarrow> f ?v \<le> g ?v
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
?v \<in> set [] \<Longrightarrow> f ?v \<le> g ?v

goal (1 subgoal):
 1. ListSum [] f \<le> ListSum [] g
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ListSum [] f \<le> ListSum [] g

goal (1 subgoal):
 1. \<And>a V. \<lbrakk>(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g; \<And>v. v \<in> set (a # V) \<Longrightarrow> f v \<le> g v\<rbrakk> \<Longrightarrow> ListSum (a # V) f \<le> ListSum (a # V) g
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a V. \<lbrakk>(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g; \<And>v. v \<in> set (a # V) \<Longrightarrow> f v \<le> g v\<rbrakk> \<Longrightarrow> ListSum (a # V) f \<le> ListSum (a # V) g
[PROOF STEP]
case (Cons v V)
[PROOF STATE]
proof (state)
this:
(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g
?v \<in> set (v # V) \<Longrightarrow> f ?v \<le> g ?v

goal (1 subgoal):
 1. \<And>a V. \<lbrakk>(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g; \<And>v. v \<in> set (a # V) \<Longrightarrow> f v \<le> g v\<rbrakk> \<Longrightarrow> ListSum (a # V) f \<le> ListSum (a # V) g
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g
?v \<in> set (v # V) \<Longrightarrow> f ?v \<le> g ?v
[PROOF STEP]
have "(\<Sum>\<^bsub>v \<in> V\<^esub> f v) \<le> (\<Sum>\<^bsub>v \<in> V\<^esub> g v)"
[PROOF STATE]
proof (prove)
using this:
(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g
?v \<in> set (v # V) \<Longrightarrow> f ?v \<le> g ?v

goal (1 subgoal):
 1. ListSum V f \<le> ListSum V g
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ListSum V f \<le> ListSum V g

goal (1 subgoal):
 1. \<And>a V. \<lbrakk>(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g; \<And>v. v \<in> set (a # V) \<Longrightarrow> f v \<le> g v\<rbrakk> \<Longrightarrow> ListSum (a # V) f \<le> ListSum (a # V) g
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
ListSum V f \<le> ListSum V g

goal (1 subgoal):
 1. \<And>a V. \<lbrakk>(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g; \<And>v. v \<in> set (a # V) \<Longrightarrow> f v \<le> g v\<rbrakk> \<Longrightarrow> ListSum (a # V) f \<le> ListSum (a # V) g
[PROOF STEP]
from Cons
[PROOF STATE]
proof (chain)
picking this:
(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g
?v \<in> set (v # V) \<Longrightarrow> f ?v \<le> g ?v
[PROOF STEP]
have "f v \<le> g v"
[PROOF STATE]
proof (prove)
using this:
(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g
?v \<in> set (v # V) \<Longrightarrow> f ?v \<le> g ?v

goal (1 subgoal):
 1. f v \<le> g v
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f v \<le> g v

goal (1 subgoal):
 1. \<And>a V. \<lbrakk>(\<And>v. v \<in> set V \<Longrightarrow> f v \<le> g v) \<Longrightarrow> ListSum V f \<le> ListSum V g; \<And>v. v \<in> set (a # V) \<Longrightarrow> f v \<le> g v\<rbrakk> \<Longrightarrow> ListSum (a # V) f \<le> ListSum (a # V) g
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
ListSum V f \<le> ListSum V g
f v \<le> g v
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
ListSum V f \<le> ListSum V g
f v \<le> g v

goal (1 subgoal):
 1. ListSum (v # V) f \<le> ListSum (v # V) g
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ListSum (v # V) f \<le> ListSum (v # V) g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma homotopic_join_subpaths2:
  assumes "homotopic_paths s (subpath u v g +++ subpath v w g) (subpath u w g)"
    shows "homotopic_paths s (subpath w v g +++ subpath v u g) (subpath w u g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. homotopic_paths s (subpath w v g +++ subpath v u g) (subpath w u g)
[PROOF STEP]
by (metis assms homotopic_paths_reversepath_D pathfinish_subpath pathstart_subpath reversepath_joinpaths reversepath_subpath)


[STATEMENT]
lemma trancl_on_eq_tranclp_on:
  "on P (\<lambda>x y. (x, y) \<in> r)\<^sup>+\<^sup>+ x y = ((x, y) \<in> on (Collect P) r\<^sup>+)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. on P (\<lambda>x y. (x, y) \<in> r)\<^sup>+\<^sup>+ x y = ((x, y) \<in> on (Collect P) r\<^sup>+)
[PROOF STEP]
unfolding trancl_on_def tranclp_on_def Set.mem_Collect_eq
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lfp (\<lambda>p x1 x2. (\<exists>a b. x1 = a \<and> x2 = b \<and> P a \<and> P b \<and> (a, b) \<in> r) \<or> (\<exists>a b c. x1 = a \<and> x2 = c \<and> P a \<and> P b \<and> P c \<and> p a b \<and> (b, c) \<in> r)) x y = (case (x, y) of (x, xa) \<Rightarrow> lfp (\<lambda>p x1 x2. (\<exists>a b. x1 = a \<and> x2 = b \<and> P a \<and> P b \<and> (a, b) \<in> r) \<or> (\<exists>a b c. x1 = a \<and> x2 = c \<and> P a \<and> P b \<and> P c \<and> p a b \<and> (b, c) \<in> r)) x xa)
[PROOF STEP]
by simp


[STATEMENT]
lemma replication_num_simple_def: "\<B> rep x = card {b \<in> design_support . x \<in> b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<B> rep x = card {b \<in> design_support. x \<in> b}
[PROOF STEP]
using design_support_def point_replication_number_def card_size_filter_eq simple_blocks_eq_sup
[PROOF STATE]
proof (prove)
using this:
design_support \<equiv> set_mset \<B>
?B rep ?x \<equiv> size (filter_mset ((\<in>) ?x) ?B)
finite ?A \<Longrightarrow> card {a \<in> ?A. ?P a} = size (filter_mset ?P (mset_set ?A))
mset_set design_support = \<B>

goal (1 subgoal):
 1. \<B> rep x = card {b \<in> design_support. x \<in> b}
[PROOF STEP]
by (metis finite_set_mset)


[STATEMENT]
theorem (in partial_order) complete_lattice_criterion1:
  assumes top_exists: "\<exists>g. greatest L g (carrier L)"
    and inf_exists:
      "!!A. [| A \<subseteq> carrier L; A \<noteq> {} |] ==> \<exists>i. greatest L i (Lower L A)"
  shows "complete_lattice L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. complete_lattice L
[PROOF STEP]
proof (rule complete_latticeI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
from top_exists
[PROOF STATE]
proof (chain)
picking this:
\<exists>g. greatest L g (carrier L)
[PROOF STEP]
obtain top where top: "greatest L top (carrier L)"
[PROOF STATE]
proof (prove)
using this:
\<exists>g. greatest L g (carrier L)

goal (1 subgoal):
 1. (\<And>top. greatest L top (carrier L) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
greatest L top (carrier L)

goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
fix A
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
assume L: "A \<subseteq> carrier L"
[PROOF STATE]
proof (state)
this:
A \<subseteq> carrier L

goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
let ?B = "Upper L A"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
from L top
[PROOF STATE]
proof (chain)
picking this:
A \<subseteq> carrier L
greatest L top (carrier L)
[PROOF STEP]
have "top \<in> ?B"
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> carrier L
greatest L top (carrier L)

goal (1 subgoal):
 1. top \<in> Upper L A
[PROOF STEP]
by (fast intro!: Upper_memI intro: greatest_le)
[PROOF STATE]
proof (state)
this:
top \<in> Upper L A

goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
top \<in> Upper L A
[PROOF STEP]
have B_non_empty: "?B \<noteq> {}"
[PROOF STATE]
proof (prove)
using this:
top \<in> Upper L A

goal (1 subgoal):
 1. Upper L A \<noteq> {}
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
Upper L A \<noteq> {}

goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
have B_L: "?B \<subseteq> carrier L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Upper L A \<subseteq> carrier L
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Upper L A \<subseteq> carrier L

goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
from inf_exists [OF B_L B_non_empty]
[PROOF STATE]
proof (chain)
picking this:
\<exists>i. is_glb L i (Upper L A)
[PROOF STEP]
obtain b where b_inf_B: "greatest L b (Lower L ?B)"
[PROOF STATE]
proof (prove)
using this:
\<exists>i. is_glb L i (Upper L A)

goal (1 subgoal):
 1. (\<And>b. is_glb L b (Upper L A) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
is_glb L b (Upper L A)

goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
is_glb L b (Upper L A)
[PROOF STEP]
have bcarr: "b \<in> carrier L"
[PROOF STATE]
proof (prove)
using this:
is_glb L b (Upper L A)

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

goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
have "least L b (Upper L A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_lub L b A
[PROOF STEP]
proof (rule least_UpperI)
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> b
 2. \<And>y. y \<in> Upper L A \<Longrightarrow> b \<sqsubseteq> y
 3. A \<subseteq> carrier L
 4. b \<in> carrier L
[PROOF STEP]
show "\<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<sqsubseteq> b
[PROOF STEP]
by (meson L Lower_memI Upper_memD b_inf_B greatest_le rev_subsetD)
[PROOF STATE]
proof (state)
this:
?x \<in> A \<Longrightarrow> ?x \<sqsubseteq> b

goal (3 subgoals):
 1. \<And>y. y \<in> Upper L A \<Longrightarrow> b \<sqsubseteq> y
 2. A \<subseteq> carrier L
 3. b \<in> carrier L
[PROOF STEP]
show "\<And>y. y \<in> Upper L A \<Longrightarrow> b \<sqsubseteq> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>y. y \<in> Upper L A \<Longrightarrow> b \<sqsubseteq> y
[PROOF STEP]
by (auto elim: greatest_Lower_below [OF b_inf_B])
[PROOF STATE]
proof (state)
this:
?y \<in> Upper L A \<Longrightarrow> b \<sqsubseteq> ?y

goal (2 subgoals):
 1. A \<subseteq> carrier L
 2. b \<in> carrier L
[PROOF STEP]
qed (use L bcarr in auto)
[PROOF STATE]
proof (state)
this:
is_lub L b A

goal (2 subgoals):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>s. is_lub L s A
 2. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
is_lub L b A
[PROOF STEP]
show "\<exists>s. least L s (Upper L A)"
[PROOF STATE]
proof (prove)
using this:
is_lub L b A

goal (1 subgoal):
 1. \<exists>s. is_lub L s A
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>s. is_lub L s A

goal (1 subgoal):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
fix A
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
assume L: "A \<subseteq> carrier L"
[PROOF STATE]
proof (state)
this:
A \<subseteq> carrier L

goal (1 subgoal):
 1. \<And>A. A \<subseteq> carrier L \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
show "\<exists>i. greatest L i (Lower L A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>i. is_glb L i A
[PROOF STEP]
proof (cases "A = {}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. A = {} \<Longrightarrow> \<exists>i. is_glb L i A
 2. A \<noteq> {} \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
A = {}

goal (2 subgoals):
 1. A = {} \<Longrightarrow> \<exists>i. is_glb L i A
 2. A \<noteq> {} \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A = {}

goal (1 subgoal):
 1. \<exists>i. is_glb L i A
[PROOF STEP]
by (simp add: top_exists)
[PROOF STATE]
proof (state)
this:
\<exists>i. is_glb L i A

goal (1 subgoal):
 1. A \<noteq> {} \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A \<noteq> {} \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
A \<noteq> {}

goal (1 subgoal):
 1. A \<noteq> {} \<Longrightarrow> \<exists>i. is_glb L i A
[PROOF STEP]
with L
[PROOF STATE]
proof (chain)
picking this:
A \<subseteq> carrier L
A \<noteq> {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> carrier L
A \<noteq> {}

goal (1 subgoal):
 1. \<exists>i. is_glb L i A
[PROOF STEP]
by (rule inf_exists)
[PROOF STATE]
proof (state)
this:
\<exists>i. is_glb L i A

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<exists>i. is_glb L i A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_minus_one: "\<lbrakk>v \<noteq> v'; v' \<in> set vs\<rbrakk> \<Longrightarrow> set vs - {v'} \<subseteq> {v} \<longleftrightarrow> set vs = {v'} \<or> set vs = {v,v'}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>v \<noteq> v'; v' \<in> set vs\<rbrakk> \<Longrightarrow> (set vs - {v'} \<subseteq> {v}) = (set vs = {v'} \<or> set vs = {v, v'})
[PROOF STEP]
by auto


[STATEMENT]
lemma continuous_open_quotient_map:
   "\<lbrakk>continuous_map X X' f; open_map X X' f\<rbrakk> \<Longrightarrow> quotient_map X X' f \<longleftrightarrow> f ` (topspace X) = topspace X'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_map X X' f; open_map X X' f\<rbrakk> \<Longrightarrow> quotient_map X X' f = (f ` topspace X = topspace X')
[PROOF STEP]
by (meson continuous_open_imp_quotient_map quotient_map_def)


[STATEMENT]
lemma zip_append2:
  "zip xs (ys @ zs) =
  zip (take (length ys) xs) ys @ zip (drop (length ys) xs) zs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zip xs (ys @ zs) = zip (take (length ys) xs) ys @ zip (drop (length ys) xs) zs
[PROOF STEP]
by (induct xs ys rule:list_induct2') auto


[STATEMENT]
lemma sup_acc_SomeE: "sup_acc step accept rho q i j = Some (ts, tp) \<Longrightarrow>
  tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sup_acc step accept rho q i j = Some (ts, tp) \<Longrightarrow> tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sup_acc step accept rho q i j = Some (ts, tp) \<Longrightarrow> tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)
[PROOF STEP]
assume assms: "sup_acc step accept rho q i j = Some (ts, tp)"
[PROOF STATE]
proof (state)
this:
sup_acc step accept rho q i j = Some (ts, tp)

goal (1 subgoal):
 1. sup_acc step accept rho q i j = Some (ts, tp) \<Longrightarrow> tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)
[PROOF STEP]
define L where "L  = {l \<in> {i..<j}. acc step accept rho q (i, Suc l)}"
[PROOF STATE]
proof (state)
this:
L = {l \<in> {i..<j}. acc step accept rho q (i, Suc l)}

goal (1 subgoal):
 1. sup_acc step accept rho q i j = Some (ts, tp) \<Longrightarrow> tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)
[PROOF STEP]
have L_props: "finite L" "L \<noteq> {}" "Max L = tp"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite L &&& L \<noteq> {} &&& Max L = tp
[PROOF STEP]
unfolding L_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {l \<in> {i..<j}. acc step accept rho q (i, Suc l)} &&& {l \<in> {i..<j}. acc step accept rho q (i, Suc l)} \<noteq> {} &&& Max {l \<in> {i..<j}. acc step accept rho q (i, Suc l)} = tp
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
sup_acc step accept rho q i j = Some (ts, tp)

goal (1 subgoal):
 1. finite {l \<in> {i..<j}. acc step accept rho q (i, Suc l)} &&& {l \<in> {i..<j}. acc step accept rho q (i, Suc l)} \<noteq> {} &&& Max {l \<in> {i..<j}. acc step accept rho q (i, Suc l)} = tp
[PROOF STEP]
by (auto simp add: sup_acc_def Let_def split: if_splits)
[PROOF STATE]
proof (state)
this:
finite L
L \<noteq> {}
Max L = tp

goal (1 subgoal):
 1. sup_acc step accept rho q i j = Some (ts, tp) \<Longrightarrow> tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)
[PROOF STEP]
using Max_in[OF L_props(1,2)]
[PROOF STATE]
proof (prove)
using this:
Max L \<in> L

goal (1 subgoal):
 1. tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)
[PROOF STEP]
unfolding L_props(3)
[PROOF STATE]
proof (prove)
using this:
tp \<in> L

goal (1 subgoal):
 1. tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)
[PROOF STEP]
unfolding L_def
[PROOF STATE]
proof (prove)
using this:
tp \<in> {l \<in> {i..<j}. acc step accept rho q (i, Suc l)}

goal (1 subgoal):
 1. tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
tp \<in> {i..<j} \<and> acc step accept rho q (i, Suc tp)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Ord_in_Ord: "\<lbrakk> Ord k;  m \<in> elts k \<rbrakk>  \<Longrightarrow> Ord m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Ord k; m \<in> elts k\<rbrakk> \<Longrightarrow> Ord m
[PROOF STEP]
using Ord_def Ord_trans
[PROOF STATE]
proof (prove)
using this:
Ord ?x \<equiv> Transset ?x \<and> (\<forall>y\<in>elts ?x. Transset y)
\<lbrakk>?i \<in> elts ?j; ?j \<in> elts ?k; Ord ?k\<rbrakk> \<Longrightarrow> ?i \<in> elts ?k

goal (1 subgoal):
 1. \<lbrakk>Ord k; m \<in> elts k\<rbrakk> \<Longrightarrow> Ord m
[PROOF STEP]
by blast


[STATEMENT]
lemma one_le_Fract_iff: "0 < b \<Longrightarrow> 1 \<le> Fract a b \<longleftrightarrow> b \<le> a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < b \<Longrightarrow> (1 \<le> Fract a b) = (b \<le> a)
[PROOF STEP]
by (simp add: One_rat_def mult_le_cancel_right)


[STATEMENT]
theorem equiv_rels_set:
  assumes "x \<in> set (equiv_rels n)"
  shows "equiv {..<n} x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equiv {..<n} x
[PROOF STEP]
using assms equiv_rels_def kernel_of_equiv enum_rgfs_len
[PROOF STATE]
proof (prove)
using this:
x \<in> set (equiv_rels n)
equiv_rels ?n = map kernel_of (enum_rgfs ?n)
equiv {..<length ?xs} (kernel_of ?xs)
?x \<in> set (enum_rgfs ?n) \<Longrightarrow> length ?x = ?n

goal (1 subgoal):
 1. equiv {..<n} x
[PROOF STEP]
by auto


[STATEMENT]
lemma ceiling_eq: "of_int n < x \<Longrightarrow> x \<le> of_int n + 1 \<Longrightarrow> \<lceil>x\<rceil> = n + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>of_int n < x; x \<le> of_int n + (1::'a)\<rbrakk> \<Longrightarrow> \<lceil>x\<rceil> = n + 1
[PROOF STEP]
by (simp add: ceiling_unique)


[STATEMENT]
lemma vifintersection_vunion:
  assumes "I \<noteq> 0" and "J \<noteq> 0"
  shows "(\<Inter>\<^sub>\<circ>i\<in>\<^sub>\<circ>I. f i) \<union>\<^sub>\<circ> (\<Inter>\<^sub>\<circ>j\<in>\<^sub>\<circ>J. g j) = (\<Inter>\<^sub>\<circ>i\<in>\<^sub>\<circ>I. \<Inter>\<^sub>\<circ>j\<in>\<^sub>\<circ>J. f i \<union>\<^sub>\<circ> g j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Inter>\<^sub>\<circ> (VLambda I f `\<^sub>\<circ> I) \<union>\<^sub>\<circ> \<Inter>\<^sub>\<circ> (VLambda J g `\<^sub>\<circ> J) = \<Inter>\<^sub>\<circ> ((\<lambda>a\<in>\<^sub>\<circ>I. \<Inter>\<^sub>\<circ> ((\<lambda>aa\<in>\<^sub>\<circ>J. f a \<union>\<^sub>\<circ> g aa) `\<^sub>\<circ> J)) `\<^sub>\<circ> I)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
I \<noteq> 0
J \<noteq> 0

goal (1 subgoal):
 1. \<Inter>\<^sub>\<circ> (VLambda I f `\<^sub>\<circ> I) \<union>\<^sub>\<circ> \<Inter>\<^sub>\<circ> (VLambda J g `\<^sub>\<circ> J) = \<Inter>\<^sub>\<circ> ((\<lambda>a\<in>\<^sub>\<circ>I. \<Inter>\<^sub>\<circ> ((\<lambda>aa\<in>\<^sub>\<circ>J. f a \<union>\<^sub>\<circ> g aa) `\<^sub>\<circ> J)) `\<^sub>\<circ> I)
[PROOF STEP]
by (blast intro!: vsubset_antisym)


[STATEMENT]
lemma ordinal_of_nat_times [simp]:
"ordinal_of_nat x * ordinal_of_nat y = ordinal_of_nat (x * y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ordinal_of_nat x * ordinal_of_nat y = ordinal_of_nat (x * y)
[PROOF STEP]
by (induct y) (simp_all add: add.commute)


[STATEMENT]
lemma ANR_eq_absolute_neighbourhood_extensor:
  fixes S :: "'a::euclidean_space set"
  shows "ANR S \<longleftrightarrow>
         (\<forall>f :: 'a * real \<Rightarrow> 'a.
          \<forall>U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow>
                closedin (top_of_set U) T \<longrightarrow>
               (\<exists>V g. T \<subseteq> V \<and> openin (top_of_set U) V \<and>
                       continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x \<in> T. g x = f x)))" (is "_ = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ANR S = (\<forall>f U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow> closedin (top_of_set U) T \<longrightarrow> (\<exists>V g. T \<subseteq> V \<and> openin (top_of_set U) V \<and> continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x\<in>T. g x = f x)))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ANR S \<Longrightarrow> \<forall>f U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow> closedin (top_of_set U) T \<longrightarrow> (\<exists>V g. T \<subseteq> V \<and> openin (top_of_set U) V \<and> continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x\<in>T. g x = f x))
 2. \<forall>f U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow> closedin (top_of_set U) T \<longrightarrow> (\<exists>V g. T \<subseteq> V \<and> openin (top_of_set U) V \<and> continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x\<in>T. g x = f x)) \<Longrightarrow> ANR S
[PROOF STEP]
assume "ANR S"
[PROOF STATE]
proof (state)
this:
ANR S

goal (2 subgoals):
 1. ANR S \<Longrightarrow> \<forall>f U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow> closedin (top_of_set U) T \<longrightarrow> (\<exists>V g. T \<subseteq> V \<and> openin (top_of_set U) V \<and> continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x\<in>T. g x = f x))
 2. \<forall>f U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow> closedin (top_of_set U) T \<longrightarrow> (\<exists>V g. T \<subseteq> V \<and> openin (top_of_set U) V \<and> continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x\<in>T. g x = f x)) \<Longrightarrow> ANR S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ANR S
[PROOF STEP]
show ?rhs
[PROOF STATE]
proof (prove)
using this:
ANR S

goal (1 subgoal):
 1. \<forall>f U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow> closedin (top_of_set U) T \<longrightarrow> (\<exists>V g. T \<subseteq> V \<and> openin (top_of_set U) V \<and> continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x\<in>T. g x = f x))
[PROOF STEP]
by (metis ANR_imp_absolute_neighbourhood_extensor)
[PROOF STATE]
proof (state)
this:
\<forall>f U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow> closedin (top_of_set U) T \<longrightarrow> (\<exists>V g. T \<subseteq> V \<and> openin (top_of_set U) V \<and> continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x\<in>T. g x = f x))

goal (1 subgoal):
 1. \<forall>f U T. continuous_on T f \<longrightarrow> f ` T \<subseteq> S \<longrightarrow> closedin (top_of_set U) T \<longrightarrow> (\<exists>V g. T \<subseteq> V \<and> openin (top_of_set U) V \<and> continuous_on V g \<and> g ` V \<subseteq> S \<and> (\<forall>x\<in>T. g x = f x)) \<Longrightarrow> ANR S
[PROOF STEP]
qed (simp add: absolute_neighbourhood_extensor_imp_ANR)


[STATEMENT]
lemma emeasure_lborel_cbox_eq':
  "emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
proof (cases "\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
 2. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba

goal (2 subgoals):
 1. \<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
 2. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
hence "emeasure lborel (cbox a b) = ennreal (prod ((\<bullet>) (b - a)) Basis)"
[PROOF STATE]
proof (prove)
using this:
\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba

goal (1 subgoal):
 1. emeasure lborel (cbox a b) = ennreal (prod ((\<bullet>) (b - a)) Basis)
[PROOF STEP]
unfolding emeasure_lborel_cbox_eq
[PROOF STATE]
proof (prove)
using this:
\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba

goal (1 subgoal):
 1. ennreal (if \<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba then prod ((\<bullet>) (b - a)) Basis else 0) = ennreal (prod ((\<bullet>) (b - a)) Basis)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
emeasure lborel (cbox a b) = ennreal (prod ((\<bullet>) (b - a)) Basis)

goal (2 subgoals):
 1. \<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
 2. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure lborel (cbox a b) = ennreal (prod ((\<bullet>) (b - a)) Basis)

goal (2 subgoals):
 1. \<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
 2. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
have "prod ((\<bullet>) (b - a)) Basis = (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prod ((\<bullet>) (b - a)) Basis = (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
using True
[PROOF STATE]
proof (prove)
using this:
\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba

goal (1 subgoal):
 1. prod ((\<bullet>) (b - a)) Basis = (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
by (intro prod.cong refl) (auto simp: max_def inner_simps)
[PROOF STATE]
proof (state)
this:
prod ((\<bullet>) (b - a)) Basis = (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))

goal (2 subgoals):
 1. \<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
 2. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))

goal (1 subgoal):
 1. emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))

goal (1 subgoal):
 1. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba)

goal (1 subgoal):
 1. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
hence "emeasure lborel (cbox a b) = ennreal 0"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba)

goal (1 subgoal):
 1. emeasure lborel (cbox a b) = ennreal 0
[PROOF STEP]
by (auto simp: emeasure_lborel_cbox_eq)
[PROOF STATE]
proof (state)
this:
emeasure lborel (cbox a b) = ennreal 0

goal (1 subgoal):
 1. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure lborel (cbox a b) = ennreal 0

goal (1 subgoal):
 1. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
from False
[PROOF STATE]
proof (chain)
picking this:
\<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba)
[PROOF STEP]
have "0 = (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))"
[PROOF STATE]
proof (prove)
using this:
\<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba)

goal (1 subgoal):
 1. 0 = (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
by (auto simp: max_def inner_simps)
[PROOF STATE]
proof (state)
this:
0 = (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))

goal (1 subgoal):
 1. \<not> (\<forall>ba\<in>Basis. a \<bullet> ba \<le> b \<bullet> ba) \<Longrightarrow> emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))

goal (1 subgoal):
 1. emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
emeasure lborel (cbox a b) = ennreal (\<Prod>e\<in>Basis. max 0 ((b - a) \<bullet> e))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma pow_mat_dim[simp]:
  "dim_row (A ^\<^sub>m k) = dim_row A"
  "dim_col (A ^\<^sub>m k) = (if k = 0 then dim_row A else dim_col A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row (A ^\<^sub>m k) = dim_row A &&& dim_col (A ^\<^sub>m k) = (if k = 0 then dim_row A else dim_col A)
[PROOF STEP]
by (induct k, auto)


[STATEMENT]
lemma sum_wcount_Int:
  "finite A \<Longrightarrow> sum (wcount f N) (A \<inter> set_mset N) = sum (wcount f N) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> sum (wcount f N) (A \<inter> set_mset N) = sum (wcount f N) A
[PROOF STEP]
by (induct rule: finite_induct)
    (simp_all add: Int_insert_left wcount_def count_eq_zero_iff)


[STATEMENT]
lemma natLeq_ofilter_iff:
"ofilter natLeq A = (A = UNIV \<or> (\<exists>n. A = {0 ..< n}))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ofilter natLeq A = (A = UNIV \<or> (\<exists>n. A = {0..<n}))
[PROOF STEP]
proof(rule iffI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ofilter natLeq A \<Longrightarrow> A = UNIV \<or> (\<exists>n. A = {0..<n})
 2. A = UNIV \<or> (\<exists>n. A = {0..<n}) \<Longrightarrow> ofilter natLeq A
[PROOF STEP]
assume "ofilter natLeq A"
[PROOF STATE]
proof (state)
this:
ofilter natLeq A

goal (2 subgoals):
 1. ofilter natLeq A \<Longrightarrow> A = UNIV \<or> (\<exists>n. A = {0..<n})
 2. A = UNIV \<or> (\<exists>n. A = {0..<n}) \<Longrightarrow> ofilter natLeq A
[PROOF STEP]
hence "\<forall>m n. n \<in> A \<and> m \<le> n \<longrightarrow> m \<in> A"
[PROOF STATE]
proof (prove)
using this:
ofilter natLeq A

goal (1 subgoal):
 1. \<forall>m n. n \<in> A \<and> m \<le> n \<longrightarrow> m \<in> A
[PROOF STEP]
using natLeq_wo_rel
[PROOF STATE]
proof (prove)
using this:
ofilter natLeq A
wo_rel natLeq

goal (1 subgoal):
 1. \<forall>m n. n \<in> A \<and> m \<le> n \<longrightarrow> m \<in> A
[PROOF STEP]
by(auto simp add: natLeq_def wo_rel.ofilter_def under_def)
[PROOF STATE]
proof (state)
this:
\<forall>m n. n \<in> A \<and> m \<le> n \<longrightarrow> m \<in> A

goal (2 subgoals):
 1. ofilter natLeq A \<Longrightarrow> A = UNIV \<or> (\<exists>n. A = {0..<n})
 2. A = UNIV \<or> (\<exists>n. A = {0..<n}) \<Longrightarrow> ofilter natLeq A
[PROOF STEP]
thus "A = UNIV \<or> (\<exists>n. A = {0 ..< n})"
[PROOF STATE]
proof (prove)
using this:
\<forall>m n. n \<in> A \<and> m \<le> n \<longrightarrow> m \<in> A

goal (1 subgoal):
 1. A = UNIV \<or> (\<exists>n. A = {0..<n})
[PROOF STEP]
using closed_nat_set_iff
[PROOF STATE]
proof (prove)
using this:
\<forall>m n. n \<in> A \<and> m \<le> n \<longrightarrow> m \<in> A
\<forall>m n. n \<in> ?A \<and> m \<le> n \<longrightarrow> m \<in> ?A \<Longrightarrow> ?A = UNIV \<or> (\<exists>n. ?A = {0..<n})

goal (1 subgoal):
 1. A = UNIV \<or> (\<exists>n. A = {0..<n})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A = UNIV \<or> (\<exists>n. A = {0..<n})

goal (1 subgoal):
 1. A = UNIV \<or> (\<exists>n. A = {0..<n}) \<Longrightarrow> ofilter natLeq A
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A = UNIV \<or> (\<exists>n. A = {0..<n}) \<Longrightarrow> ofilter natLeq A
[PROOF STEP]
assume "A = UNIV \<or> (\<exists>n. A = {0 ..< n})"
[PROOF STATE]
proof (state)
this:
A = UNIV \<or> (\<exists>n. A = {0..<n})

goal (1 subgoal):
 1. A = UNIV \<or> (\<exists>n. A = {0..<n}) \<Longrightarrow> ofilter natLeq A
[PROOF STEP]
thus "ofilter natLeq A"
[PROOF STATE]
proof (prove)
using this:
A = UNIV \<or> (\<exists>n. A = {0..<n})

goal (1 subgoal):
 1. ofilter natLeq A
[PROOF STEP]
by(auto simp add: natLeq_ofilter_less natLeq_UNIV_ofilter)
[PROOF STATE]
proof (state)
this:
ofilter natLeq A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma gf_U_eq_U: "gf_U x y 1 = U x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gf_U x y 1 = U x y
[PROOF STEP]
using u_sums_U[THEN sums_unique]
[PROOF STATE]
proof (prove)
using this:
U ?x1 ?y1 = suminf (u ?x1 ?y1)

goal (1 subgoal):
 1. gf_U x y 1 = U x y
[PROOF STEP]
by (simp add: gf_U_def U_def)


[STATEMENT]
lemma perm_rem_conv: "\<And>f x y. bij f \<Longrightarrow> perm_rem x f y = (
    if x = y then x
    else if f y = x then f (f y)
    else f y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f x y. bij f \<Longrightarrow> perm_rem x f y = (if x = y then x else if f y = x then f (f y) else f y)
[PROOF STEP]
by (auto simp: perm_rem_simps)


[STATEMENT]
lemma (in bounded_linear) local_lipschitzI:
  shows "local_lipschitz A B (\<lambda>_. f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local_lipschitz A B (\<lambda>_. f)
[PROOF STEP]
proof (rule local_lipschitzI, goal_cases)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>t x. \<lbrakk>t \<in> A; x \<in> B\<rbrakk> \<Longrightarrow> \<exists>u>0. \<exists>L. \<forall>t\<in>cball t u \<inter> A. L-lipschitz_on (cball x u \<inter> B) f
[PROOF STEP]
case (1 t x)
[PROOF STATE]
proof (state)
this:
t \<in> A
x \<in> B

goal (1 subgoal):
 1. \<And>t x. \<lbrakk>t \<in> A; x \<in> B\<rbrakk> \<Longrightarrow> \<exists>u>0. \<exists>L. \<forall>t\<in>cball t u \<inter> A. L-lipschitz_on (cball x u \<inter> B) f
[PROOF STEP]
from lipschitz_boundE[of "(cball x 1 \<inter> B)"]
[PROOF STATE]
proof (chain)
picking this:
(\<And>Ba. Ba-lipschitz_on (cball x 1 \<inter> B) f \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis
[PROOF STEP]
obtain C where "C-lipschitz_on (cball x 1 \<inter> B) f"
[PROOF STATE]
proof (prove)
using this:
(\<And>Ba. Ba-lipschitz_on (cball x 1 \<inter> B) f \<Longrightarrow> ?thesis) \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. (\<And>C. C-lipschitz_on (cball x 1 \<inter> B) f \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
C-lipschitz_on (cball x 1 \<inter> B) f

goal (1 subgoal):
 1. \<And>t x. \<lbrakk>t \<in> A; x \<in> B\<rbrakk> \<Longrightarrow> \<exists>u>0. \<exists>L. \<forall>t\<in>cball t u \<inter> A. L-lipschitz_on (cball x u \<inter> B) f
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
C-lipschitz_on (cball x 1 \<inter> B) f
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
C-lipschitz_on (cball x 1 \<inter> B) f

goal (1 subgoal):
 1. \<exists>u>0. \<exists>L. \<forall>t\<in>cball t u \<inter> A. L-lipschitz_on (cball x u \<inter> B) f
[PROOF STEP]
by (auto intro: exI[where x=1])
[PROOF STATE]
proof (state)
this:
\<exists>u>0. \<exists>L. \<forall>t\<in>cball t u \<inter> A. L-lipschitz_on (cball x u \<inter> B) f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma exp_less_cancel: "exp x < exp y \<Longrightarrow> x < y"
  for x y :: real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. exp x < exp y \<Longrightarrow> x < y
[PROOF STEP]
unfolding linorder_not_le [symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> exp y \<le> exp x \<Longrightarrow> \<not> y \<le> x
[PROOF STEP]
by (auto simp: order_le_less exp_less_mono)


[STATEMENT]
lemma zip_replicate2: "zip xs (replicate n y) = map (\<lambda>x. (x, y)) (take n xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. zip xs (replicate n y) = map (\<lambda>x. (x, y)) (take n xs)
[PROOF STEP]
by(subst zip_commute)(simp add: zip_replicate1)


[STATEMENT]
lemma all_bi_edges_main: "X \<inter> Y = {} \<Longrightarrow> all_bi_edges X Y \<subseteq> all_edges (X \<union> Y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<inter> Y = {} \<Longrightarrow> all_bi_edges X Y \<subseteq> all_edges (X \<union> Y)
[PROOF STEP]
unfolding  all_edges_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X \<inter> Y = {} \<Longrightarrow> all_bi_edges X Y \<subseteq> {e. e \<subseteq> X \<union> Y \<and> card e = 2}
[PROOF STEP]
using all_bi_edges_wf all_bi_edges_2
[PROOF STATE]
proof (prove)
using this:
?e \<in> all_bi_edges ?X ?Y \<Longrightarrow> ?e \<subseteq> ?X \<union> ?Y
\<lbrakk>?X \<inter> ?Y = {}; ?e \<in> all_bi_edges ?X ?Y\<rbrakk> \<Longrightarrow> card ?e = 2

goal (1 subgoal):
 1. X \<inter> Y = {} \<Longrightarrow> all_bi_edges X Y \<subseteq> {e. e \<subseteq> X \<union> Y \<and> card e = 2}
[PROOF STEP]
by blast


[STATEMENT]
theorem dual_meet [intro?]: "dual (x \<sqinter> y) = dual x \<squnion> dual y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dual (x \<sqinter> y) = dual x \<squnion> dual y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dual (x \<sqinter> y) = dual x \<squnion> dual y
[PROOF STEP]
from is_inf_meet
[PROOF STATE]
proof (chain)
picking this:
is_inf ?x ?y (?x \<sqinter> ?y)
[PROOF STEP]
have "is_sup (dual x) (dual y) (dual (x \<sqinter> y))"
[PROOF STATE]
proof (prove)
using this:
is_inf ?x ?y (?x \<sqinter> ?y)

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

goal (1 subgoal):
 1. dual (x \<sqinter> y) = dual x \<squnion> dual y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
is_sup (dual x) (dual y) (dual (x \<sqinter> y))
[PROOF STEP]
have "dual x \<squnion> dual y = dual (x \<sqinter> y)"
[PROOF STATE]
proof (prove)
using this:
is_sup (dual x) (dual y) (dual (x \<sqinter> y))

goal (1 subgoal):
 1. dual x \<squnion> dual y = dual (x \<sqinter> y)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
dual x \<squnion> dual y = dual (x \<sqinter> y)

goal (1 subgoal):
 1. dual (x \<sqinter> y) = dual x \<squnion> dual y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
dual x \<squnion> dual y = dual (x \<sqinter> y)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
dual x \<squnion> dual y = dual (x \<sqinter> y)

goal (1 subgoal):
 1. dual (x \<sqinter> y) = dual x \<squnion> dual y
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
dual (x \<sqinter> y) = dual x \<squnion> dual y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma local_time_birkhoff:
  "local_time A n x = birkhoff_sum (indicator A) n x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local_time A n x = birkhoff_sum (indicator A) n x
[PROOF STEP]
proof (induction n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. local_time A 0 x = birkhoff_sum (indicator A) 0 x
 2. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. local_time A 0 x = birkhoff_sum (indicator A) 0 x
 2. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local_time A 0 x = birkhoff_sum (indicator A) 0 x
[PROOF STEP]
unfolding local_time_def birkhoff_sum_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card {i \<in> {..<0}. (T ^^ i) x \<in> A} = (\<Sum>i<0. indicator A ((T ^^ i) x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
local_time A 0 x = birkhoff_sum (indicator A) 0 x

goal (1 subgoal):
 1. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
local_time A n x = birkhoff_sum (indicator A) n x

goal (1 subgoal):
 1. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
have "local_time A (n+1) x = local_time A n x + indicator A ((T^^n) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
proof (cases)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
 2. \<not> ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
assume *: "(T^^n) x \<in> A"
[PROOF STATE]
proof (state)
this:
(T ^^ n) x \<in> A

goal (2 subgoals):
 1. ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
 2. \<not> ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(T ^^ n) x \<in> A
[PROOF STEP]
have "{i\<in>{..<Suc n}. (T^^i) x \<in> A} = {i\<in>{..<n}. (T^^i) x \<in> A} \<union> {n}"
[PROOF STATE]
proof (prove)
using this:
(T ^^ n) x \<in> A

goal (1 subgoal):
 1. {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A} \<union> {n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
{i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A} \<union> {n}

goal (2 subgoals):
 1. ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
 2. \<not> ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A} \<union> {n}
[PROOF STEP]
have "card {i\<in>{..<Suc n}. (T^^i) x \<in> A} = card {i\<in>{..<n}. (T^^i) x \<in> A} + card {n}"
[PROOF STATE]
proof (prove)
using this:
{i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A} \<union> {n}

goal (1 subgoal):
 1. card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A} + card {n}
[PROOF STEP]
using card_Un_disjoint
[PROOF STATE]
proof (prove)
using this:
{i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A} \<union> {n}
\<lbrakk>finite ?A; finite ?B; ?A \<inter> ?B = {}\<rbrakk> \<Longrightarrow> card (?A \<union> ?B) = card ?A + card ?B

goal (1 subgoal):
 1. card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A} + card {n}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A} + card {n}

goal (2 subgoals):
 1. ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
 2. \<not> ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A} + card {n}
[PROOF STEP]
have "local_time A (n+1) x = local_time A n x + 1"
[PROOF STATE]
proof (prove)
using this:
card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A} + card {n}

goal (1 subgoal):
 1. local_time A (n + 1) x = local_time A n x + 1
[PROOF STEP]
using local_time_def
[PROOF STATE]
proof (prove)
using this:
card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A} + card {n}
local_time ?A ?n ?x = card {i \<in> {..<?n}. (T ^^ i) ?x \<in> ?A}

goal (1 subgoal):
 1. local_time A (n + 1) x = local_time A n x + 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = local_time A n x + 1

goal (2 subgoals):
 1. ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
 2. \<not> ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = local_time A n x + 1

goal (2 subgoals):
 1. ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
 2. \<not> ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
have "indicator A ((T^^n)x) = (1::nat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. indicator A ((T ^^ n) x) = 1
[PROOF STEP]
using * indicator_def
[PROOF STATE]
proof (prove)
using this:
(T ^^ n) x \<in> A
indicator ?S ?x = of_bool (?x \<in> ?S)

goal (1 subgoal):
 1. indicator A ((T ^^ n) x) = 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
indicator A ((T ^^ n) x) = 1

goal (2 subgoals):
 1. ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
 2. \<not> ?P \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
local_time A (n + 1) x = local_time A n x + 1
indicator A ((T ^^ n) x) = 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
local_time A (n + 1) x = local_time A n x + 1
indicator A ((T ^^ n) x) = 1

goal (1 subgoal):
 1. local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)

goal (1 subgoal):
 1. (T ^^ n) x \<notin> A \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (T ^^ n) x \<notin> A \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
assume *: "\<not>((T^^n) x \<in> A)"
[PROOF STATE]
proof (state)
this:
(T ^^ n) x \<notin> A

goal (1 subgoal):
 1. (T ^^ n) x \<notin> A \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(T ^^ n) x \<notin> A
[PROOF STEP]
have "{i\<in>{..<Suc n}. (T^^i) x \<in> A} = {i\<in>{..<n}. (T^^i) x \<in> A}"
[PROOF STATE]
proof (prove)
using this:
(T ^^ n) x \<notin> A

goal (1 subgoal):
 1. {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A}
[PROOF STEP]
using less_Suc_eq
[PROOF STATE]
proof (prove)
using this:
(T ^^ n) x \<notin> A
(?m < Suc ?n) = (?m < ?n \<or> ?m = ?n)

goal (1 subgoal):
 1. {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A}
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
{i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A}

goal (1 subgoal):
 1. (T ^^ n) x \<notin> A \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A}
[PROOF STEP]
have "card {i\<in>{..<Suc n}. (T^^i) x \<in> A} = card {i\<in>{..<n}. (T^^i) x \<in> A}"
[PROOF STATE]
proof (prove)
using this:
{i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = {i \<in> {..<n}. (T ^^ i) x \<in> A}

goal (1 subgoal):
 1. card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A}

goal (1 subgoal):
 1. (T ^^ n) x \<notin> A \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A}
[PROOF STEP]
have "local_time A (n+1) x = local_time A n x"
[PROOF STATE]
proof (prove)
using this:
card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A}

goal (1 subgoal):
 1. local_time A (n + 1) x = local_time A n x
[PROOF STEP]
using local_time_def
[PROOF STATE]
proof (prove)
using this:
card {i \<in> {..<Suc n}. (T ^^ i) x \<in> A} = card {i \<in> {..<n}. (T ^^ i) x \<in> A}
local_time ?A ?n ?x = card {i \<in> {..<?n}. (T ^^ i) ?x \<in> ?A}

goal (1 subgoal):
 1. local_time A (n + 1) x = local_time A n x
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = local_time A n x

goal (1 subgoal):
 1. (T ^^ n) x \<notin> A \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = local_time A n x

goal (1 subgoal):
 1. (T ^^ n) x \<notin> A \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
have "indicator A ((T^^n)x) = (0::nat)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. indicator A ((T ^^ n) x) = 0
[PROOF STEP]
using * indicator_def
[PROOF STATE]
proof (prove)
using this:
(T ^^ n) x \<notin> A
indicator ?S ?x = of_bool (?x \<in> ?S)

goal (1 subgoal):
 1. indicator A ((T ^^ n) x) = 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
indicator A ((T ^^ n) x) = 0

goal (1 subgoal):
 1. (T ^^ n) x \<notin> A \<Longrightarrow> local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
local_time A (n + 1) x = local_time A n x
indicator A ((T ^^ n) x) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
local_time A (n + 1) x = local_time A n x
indicator A ((T ^^ n) x) = 0

goal (1 subgoal):
 1. local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)

goal (1 subgoal):
 1. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
[PROOF STEP]
have "local_time A (n+1) x = birkhoff_sum (indicator A) n x + indicator A ((T^^n) x)"
[PROOF STATE]
proof (prove)
using this:
local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)

goal (1 subgoal):
 1. local_time A (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)
[PROOF STEP]
using Suc.IH
[PROOF STATE]
proof (prove)
using this:
local_time A (n + 1) x = local_time A n x + indicator A ((T ^^ n) x)
local_time A n x = birkhoff_sum (indicator A) n x

goal (1 subgoal):
 1. local_time A (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)

goal (1 subgoal):
 1. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)

goal (1 subgoal):
 1. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
have "birkhoff_sum (indicator A) (n+1) x = birkhoff_sum (indicator A) n x + indicator A ((T^^n) x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. birkhoff_sum (indicator A) (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)
[PROOF STEP]
by (metis birkhoff_sum_cocycle[where ?n = "n" and ?m = "1"] birkhoff_sum_1(2))
[PROOF STATE]
proof (state)
this:
birkhoff_sum (indicator A) (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)

goal (1 subgoal):
 1. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
local_time A (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)
birkhoff_sum (indicator A) (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)
[PROOF STEP]
have "local_time A (n+1) x = birkhoff_sum (indicator A) (n+1) x"
[PROOF STATE]
proof (prove)
using this:
local_time A (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)
birkhoff_sum (indicator A) (n + 1) x = birkhoff_sum (indicator A) n x + indicator A ((T ^^ n) x)

goal (1 subgoal):
 1. local_time A (n + 1) x = birkhoff_sum (indicator A) (n + 1) x
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
local_time A (n + 1) x = birkhoff_sum (indicator A) (n + 1) x

goal (1 subgoal):
 1. \<And>n. local_time A n x = birkhoff_sum (indicator A) n x \<Longrightarrow> local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
local_time A (n + 1) x = birkhoff_sum (indicator A) (n + 1) x
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
local_time A (n + 1) x = birkhoff_sum (indicator A) (n + 1) x

goal (1 subgoal):
 1. local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x
[PROOF STEP]
by (metis Suc_eq_plus1)
[PROOF STATE]
proof (state)
this:
local_time A (Suc n) x = birkhoff_sum (indicator A) (Suc n) x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_image_eq_pointwiseI:
  assumes "length l = length l'"
  assumes "\<And>i. i<length l \<Longrightarrow> f (l!i) = f (l'!i)"
  shows "f`set l = f`set l'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` set l = f ` set l'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
length l = length l'
?i < length l \<Longrightarrow> f (l ! ?i) = f (l' ! ?i)

goal (1 subgoal):
 1. f ` set l = f ` set l'
[PROOF STEP]
by (fastforce simp: in_set_conv_nth in_set_image_conv_nth)


[STATEMENT]
lemma cop2_os__osp:
  assumes "\<not> Coplanar A B C X" and
    "Coplanar A B C D" and
    "Coplanar A B C E" and
    "D E OS X Y"
  shows "A B C OSP X Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A B C OSP X Y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. A B C OSP X Y
[PROOF STEP]
obtain Z where P1: "D E TS X Z \<and> D E TS Y Z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>Z. D E TS X Z \<and> D E TS Y Z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using OS_def assms(4)
[PROOF STATE]
proof (prove)
using this:
?A ?B OS ?P ?Q \<equiv> \<exists>R. ?A ?B TS ?P R \<and> ?A ?B TS ?Q R
D E OS X Y

goal (1 subgoal):
 1. (\<And>Z. D E TS X Z \<and> D E TS Y Z \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
D E TS X Z \<and> D E TS Y Z

goal (1 subgoal):
 1. A B C OSP X Y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
D E TS X Z \<and> D E TS Y Z
[PROOF STEP]
have P2: "A B C TSP X Z"
[PROOF STATE]
proof (prove)
using this:
D E TS X Z \<and> D E TS Y Z

goal (1 subgoal):
 1. A B CTSP X Z
[PROOF STEP]
using assms(1) assms(2) assms(3) cop2_ts__tsp
[PROOF STATE]
proof (prove)
using this:
D E TS X Z \<and> D E TS Y Z
\<not> Coplanar A B C X
Coplanar A B C D
Coplanar A B C E
\<lbrakk>\<not> Coplanar ?A ?B ?C ?X; Coplanar ?A ?B ?C ?D; Coplanar ?A ?B ?C ?E; ?D ?E TS ?X ?Y\<rbrakk> \<Longrightarrow> ?A ?B ?CTSP ?X ?Y

goal (1 subgoal):
 1. A B CTSP X Z
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
A B CTSP X Z

goal (1 subgoal):
 1. A B C OSP X Y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A B CTSP X Z
[PROOF STEP]
have P3: "A B C TSP Y Z"
[PROOF STATE]
proof (prove)
using this:
A B CTSP X Z

goal (1 subgoal):
 1. A B CTSP Y Z
[PROOF STEP]
by (meson P1 assms(2) assms(3) cop2_ts__tsp l9_2 tsp__ncop2)
[PROOF STATE]
proof (state)
this:
A B CTSP Y Z

goal (1 subgoal):
 1. A B C OSP X Y
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
A B CTSP Y Z
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
A B CTSP Y Z

goal (1 subgoal):
 1. A B C OSP X Y
[PROOF STEP]
using P2 l9_41_1
[PROOF STATE]
proof (prove)
using this:
A B CTSP Y Z
A B CTSP X Z
\<lbrakk>?A ?B ?CTSP ?P ?R; ?A ?B ?CTSP ?Q ?R\<rbrakk> \<Longrightarrow> ?A ?B ?C OSP ?P ?Q

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma parts_UN_subset2: "parts(\<Union>x\<in>A. H x) \<subseteq> (\<Union>x\<in>A. parts(H x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. parts (\<Union> (H ` A)) \<subseteq> (\<Union>x\<in>A. parts (H x))
[PROOF STEP]
apply (rule subsetI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> parts (\<Union> (H ` A)) \<Longrightarrow> x \<in> (\<Union>x\<in>A. parts (H x))
[PROOF STEP]
apply (erule parts.induct, blast+)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma factorization_m_smult: assumes "factorization_m f (c,fs)"
  shows "factorization_m (smult d f) (c * d,fs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. factorization_m (smult d f) (c * d, fs)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. factorization_m (smult d f) (c * d, fs)
[PROOF STEP]
note * = assms[unfolded factorization_m_def split]
[PROOF STATE]
proof (state)
this:
f =m smult c (\<Prod>\<^sub># fs) \<and> (\<forall>f\<in>#fs. irreducible\<^sub>d_m f \<and> monic (Mp f))

goal (1 subgoal):
 1. factorization_m (smult d f) (c * d, fs)
[PROOF STEP]
from *
[PROOF STATE]
proof (chain)
picking this:
f =m smult c (\<Prod>\<^sub># fs) \<and> (\<forall>f\<in>#fs. irreducible\<^sub>d_m f \<and> monic (Mp f))
[PROOF STEP]
have f: "Mp f = Mp (smult c (prod_mset fs))"
[PROOF STATE]
proof (prove)
using this:
f =m smult c (\<Prod>\<^sub># fs) \<and> (\<forall>f\<in>#fs. irreducible\<^sub>d_m f \<and> monic (Mp f))

goal (1 subgoal):
 1. f =m smult c (\<Prod>\<^sub># fs)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f =m smult c (\<Prod>\<^sub># fs)

goal (1 subgoal):
 1. factorization_m (smult d f) (c * d, fs)
[PROOF STEP]
have "Mp (smult d f) = Mp (smult d (Mp f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. smult d f =m smult d (Mp f)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
smult d f =m smult d (Mp f)

goal (1 subgoal):
 1. factorization_m (smult d f) (c * d, fs)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
smult d f =m smult d (Mp f)

goal (1 subgoal):
 1. factorization_m (smult d f) (c * d, fs)
[PROOF STEP]
have "\<dots> = Mp (smult (c * d) (prod_mset fs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. smult d (Mp f) =m smult (c * d) (\<Prod>\<^sub># fs)
[PROOF STEP]
unfolding f
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. smult d (Mp (smult c (\<Prod>\<^sub># fs))) =m smult (c * d) (\<Prod>\<^sub># fs)
[PROOF STEP]
by (simp add: ac_simps)
[PROOF STATE]
proof (state)
this:
smult d (Mp f) =m smult (c * d) (\<Prod>\<^sub># fs)

goal (1 subgoal):
 1. factorization_m (smult d f) (c * d, fs)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
smult d f =m smult (c * d) (\<Prod>\<^sub># fs)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
smult d f =m smult (c * d) (\<Prod>\<^sub># fs)

goal (1 subgoal):
 1. factorization_m (smult d f) (c * d, fs)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
smult d f =m smult (c * d) (\<Prod>\<^sub># fs)
factorization_m f (c, fs)

goal (1 subgoal):
 1. factorization_m (smult d f) (c * d, fs)
[PROOF STEP]
unfolding factorization_m_def split
[PROOF STATE]
proof (prove)
using this:
smult d f =m smult (c * d) (\<Prod>\<^sub># fs)
f =m smult c (\<Prod>\<^sub># fs) \<and> (\<forall>f\<in>#fs. irreducible\<^sub>d_m f \<and> monic (Mp f))

goal (1 subgoal):
 1. smult d f =m smult (c * d) (\<Prod>\<^sub># fs) \<and> (\<forall>f\<in>#fs. irreducible\<^sub>d_m f \<and> monic (Mp f))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
factorization_m (smult d f) (c * d, fs)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma l2_eq: "length a = length b \<Longrightarrow> l2 a b = (\<Prod>d<length a. l2_\<phi> (a!d) (b!d))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length a = length b \<Longrightarrow> l2 a b = (\<Prod>d<length a. l2_\<phi> (a ! d) (b ! d))
[PROOF STEP]
unfolding l2_def l2_\<phi>_def \<Phi>_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length a = length b \<Longrightarrow> LINT x|Pi\<^sub>M {..<length a} (\<lambda>d. lborel). (\<Prod>d<length a. \<phi> (a ! d) (x d)) * (\<Prod>d<length b. \<phi> (b ! d) (x d)) = (\<Prod>d<length a. LBINT x. \<phi> (a ! d) x * \<phi> (b ! d) x)
[PROOF STEP]
apply (simp add: prod.distrib[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length a = length b \<Longrightarrow> LINT x|Pi\<^sub>M {..<length b} (\<lambda>d. lborel). (\<Prod>xa<length b. \<phi> (a ! xa) (x xa) * \<phi> (b ! xa) (x xa)) = (\<Prod>d<length b. LBINT x. \<phi> (a ! d) x * \<phi> (b ! d) x)
[PROOF STEP]
proof (rule product_sigma_finite.product_integral_prod)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. length a = length b \<Longrightarrow> product_sigma_finite (\<lambda>d. lborel)
 2. length a = length b \<Longrightarrow> finite {..<length b}
 3. \<And>x. \<lbrakk>length a = length b; x \<in> {..<length b}\<rbrakk> \<Longrightarrow> integrable lborel (\<lambda>xa. \<phi> (a ! x) xa * \<phi> (b ! x) xa)
[PROOF STEP]
show "product_sigma_finite (\<lambda>d. lborel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. product_sigma_finite (\<lambda>d. lborel)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
product_sigma_finite (\<lambda>d. lborel)

goal (2 subgoals):
 1. length a = length b \<Longrightarrow> finite {..<length b}
 2. \<And>x. \<lbrakk>length a = length b; x \<in> {..<length b}\<rbrakk> \<Longrightarrow> integrable lborel (\<lambda>xa. \<phi> (a ! x) xa * \<phi> (b ! x) xa)
[PROOF STEP]
qed (auto intro: integrable_\<phi>2)


[STATEMENT]
lemma tendsto_eval_fds_truncate:
  assumes "fds_converges f s"
  shows   "(\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
have "(\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s \<longleftrightarrow>
          (\<lambda>N. \<Sum>i\<le>N. fds_nth f i / nat_power i s) \<longlonglongrightarrow> eval_fds f s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s = (\<lambda>N. \<Sum>i\<le>N. fds_nth f i / nat_power i s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
unfolding eval_fds_truncate
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>N. \<Sum>k = 1..N. fds_nth f k / nat_power k s) \<longlonglongrightarrow> eval_fds f s = (\<lambda>N. \<Sum>i\<le>N. fds_nth f i / nat_power i s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
by (intro filterlim_cong always_eventually allI sum.mono_neutral_left) (auto simp: not_le)
[PROOF STATE]
proof (state)
this:
(\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s = (\<lambda>N. \<Sum>i\<le>N. fds_nth f i / nat_power i s) \<longlonglongrightarrow> eval_fds f s

goal (1 subgoal):
 1. (\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s = (\<lambda>N. \<Sum>i\<le>N. fds_nth f i / nat_power i s) \<longlonglongrightarrow> eval_fds f s

goal (1 subgoal):
 1. (\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
have \<dots>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>N. \<Sum>i\<le>N. fds_nth f i / nat_power i s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
fds_converges f s

goal (1 subgoal):
 1. (\<lambda>N. \<Sum>i\<le>N. fds_nth f i / nat_power i s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
by (simp add: fds_converges_iff sums_def' atLeast0AtMost)
[PROOF STATE]
proof (state)
this:
(\<lambda>N. \<Sum>i\<le>N. fds_nth f i / nat_power i s) \<longlonglongrightarrow> eval_fds f s

goal (1 subgoal):
 1. (\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s

goal (1 subgoal):
 1. (\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>N. eval_fds (fds_truncate N f) s) \<longlonglongrightarrow> eval_fds f s

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in Tarski) intY1_func: "(\<lambda>x \<in> intY1. f x) \<in> intY1 \<rightarrow> intY1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. restrict f intY1 \<in> intY1 \<rightarrow> intY1
[PROOF STEP]
apply (rule restrictI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> intY1 \<Longrightarrow> f x \<in> intY1
[PROOF STEP]
apply (metis intY1_f_closed)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done