[STATEMENT]
lemma two_calc_ideal_points [simp]:
  assumes "is_poincare_line H"
  shows "card (calc_ideal_points H) = 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (calc_ideal_points H) = 2
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. card (calc_ideal_points H) = 2
[PROOF STEP]
have  "\<exists> x \<in> calc_ideal_points H. \<exists> y \<in> calc_ideal_points H. \<forall> z \<in> calc_ideal_points H. z = x \<or> z = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x\<in>calc_ideal_points H. \<exists>y\<in>calc_ideal_points H. \<forall>z\<in>calc_ideal_points H. z = x \<or> z = y
[PROOF STEP]
by (transfer, transfer, case_tac H, simp del: calc_ideal_point1_cvec_def calc_ideal_point2_cvec_def)
[PROOF STATE]
proof (state)
this:
\<exists>x\<in>calc_ideal_points H. \<exists>y\<in>calc_ideal_points H. \<forall>z\<in>calc_ideal_points H. z = x \<or> z = y

goal (1 subgoal):
 1. card (calc_ideal_points H) = 2
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>x\<in>calc_ideal_points H. \<exists>y\<in>calc_ideal_points H. \<forall>z\<in>calc_ideal_points H. z = x \<or> z = y
[PROOF STEP]
obtain x y where *: "calc_ideal_points H = {x, y}"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<in>calc_ideal_points H. \<exists>y\<in>calc_ideal_points H. \<forall>z\<in>calc_ideal_points H. z = x \<or> z = y

goal (1 subgoal):
 1. (\<And>x y. calc_ideal_points H = {x, y} \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
calc_ideal_points H = {x, y}

goal (1 subgoal):
 1. card (calc_ideal_points H) = 2
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
calc_ideal_points H = {x, y}

goal (1 subgoal):
 1. card (calc_ideal_points H) = 2
[PROOF STEP]
have "x \<noteq> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<noteq> y
[PROOF STEP]
using calc_ideal_points_different[OF assms] *
[PROOF STATE]
proof (prove)
using this:
\<exists>i1\<in>calc_ideal_points H. \<exists>i2\<in>calc_ideal_points H. i1 \<noteq> i2
calc_ideal_points H = {x, y}

goal (1 subgoal):
 1. x \<noteq> y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<noteq> y

goal (1 subgoal):
 1. card (calc_ideal_points H) = 2
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
calc_ideal_points H = {x, y}
x \<noteq> y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
calc_ideal_points H = {x, y}
x \<noteq> y

goal (1 subgoal):
 1. card (calc_ideal_points H) = 2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
card (calc_ideal_points H) = 2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closed_Inter [continuous_intros, intro]: "\<forall>S\<in>K. closed S \<Longrightarrow> closed (\<Inter>K)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>S\<in>K. closed S \<Longrightarrow> closed (\<Inter> K)
[PROOF STEP]
unfolding closed_def uminus_Inf
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>S\<in>K. open (- S) \<Longrightarrow> open (\<Union> (uminus ` K))
[PROOF STEP]
by auto


[STATEMENT]
lemma mono_imp_UN_eq_last: "mono A \<Longrightarrow> (\<Union>i\<le>n. A i) = A n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mono A \<Longrightarrow> \<Union> (A ` {..n}) = A n
[PROOF STEP]
unfolding mono_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y. x \<le> y \<longrightarrow> A x \<subseteq> A y \<Longrightarrow> \<Union> (A ` {..n}) = A n
[PROOF STEP]
by auto


[STATEMENT]
lemma tendsto_minus_cancel: "((\<lambda>x. - f x) \<longlongrightarrow> - a) F \<Longrightarrow> (f \<longlongrightarrow> a) F"
  for a :: "'a::topological_group_add"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. - f x) \<longlongrightarrow> - a) F \<Longrightarrow> (f \<longlongrightarrow> a) F
[PROOF STEP]
by (drule tendsto_minus) simp


[STATEMENT]
lemma algebraic_int_minus_iff [simp]:
  "algebraic_int (-x) \<longleftrightarrow> algebraic_int (x :: 'a :: field_char_0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. algebraic_int (- x) = algebraic_int x
[PROOF STEP]
using algebraic_int_minus[of x] algebraic_int_minus[of "-x"]
[PROOF STATE]
proof (prove)
using this:
algebraic_int x \<Longrightarrow> algebraic_int (- x)
algebraic_int (- x) \<Longrightarrow> algebraic_int (- (- x))

goal (1 subgoal):
 1. algebraic_int (- x) = algebraic_int x
[PROOF STEP]
by auto


[STATEMENT]
lemma "25 *\<^sub>Q metre \<^bold>/ second = 90 *\<^sub>Q (kilo *\<^sub>Q metre) \<^bold>/ hour"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (25::'a) *\<^sub>Q metre \<^bold>\<cdot> second\<^sup>-\<^sup>\<one> = (90::'a) *\<^sub>Q (kilo *\<^sub>Q metre) \<^bold>\<cdot> hour\<^sup>-\<^sup>\<one>
[PROOF STEP]
by (si_calc)


[STATEMENT]
lemma v_1_AE: "cfg \<in> valid_cfg \<Longrightarrow> v cfg = 1 \<longleftrightarrow> (AE \<omega> in T cfg. (HLD S1 suntil HLD S2) (state cfg ## \<omega>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cfg \<in> valid_cfg \<Longrightarrow> (v cfg = 1) = (AE \<omega> in T cfg. (HLD S1 suntil HLD S2) (state cfg ## \<omega>))
[PROOF STEP]
unfolding v_eq T.emeasure_eq_measure ennreal_eq_1 space_T[symmetric, of cfg]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. cfg \<in> valid_cfg \<Longrightarrow> (T.prob cfg {x \<in> space (T cfg). (HLD S1 suntil HLD S2) (state cfg ## x)} = 1) = (AE \<omega> in T cfg. (HLD S1 suntil HLD S2) (state cfg ## \<omega>))
[PROOF STEP]
by (rule T.prob_Collect_eq_1) simp


[STATEMENT]
lemma NR\<^sub>N_u_0:
  assumes "0 < n" "p \<in> {0<..<1}"
  shows "NR\<^sub>N n 0 l = (p * (l + NR\<^sub>N (n - 1) 0 l) +
                     q * (\<Sum>k<n - 1. NR\<^sub>N (k + 1) 0 l * (pmf (binomial_pmf (n - 1) q) k)))
                     / (1 - (q ^ n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NR\<^sub>N n 0 l = (ennreal p * (of_nat l + NR\<^sub>N (n - 1) 0 l) + ennreal q * (\<Sum>k<n - 1. NR\<^sub>N (k + 1) 0 l * ennreal (pmf (binomial_pmf (n - 1) q) k))) / ennreal (1 - q ^ n)
[PROOF STEP]
unfolding NR\<^sub>N_recurrence[OF assms]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (ennreal p * (of_nat l + NR\<^sub>N (n - 1) 0 l) + ennreal q * (of_nat 0 + (\<Sum>k<n - 1. NR\<^sub>N (k + 1) 0 l * ennreal (pmf (binomial_pmf (n - 1) q) k)))) / ennreal (1 - q ^ n) = (ennreal p * (of_nat l + NR\<^sub>N (n - 1) 0 l) + ennreal q * (\<Sum>k<n - 1. NR\<^sub>N (k + 1) 0 l * ennreal (pmf (binomial_pmf (n - 1) q) k))) / ennreal (1 - q ^ n)
[PROOF STEP]
by (simp)


[STATEMENT]
lemma last_message_hold_init_nth: "
  \<And>i m. i < length xs \<Longrightarrow>
  (last_message_hold_init xs m) ! i = last_message (m # xs \<down> Suc i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i m. i < length xs \<Longrightarrow> last_message_hold_init xs m ! i = last_message (m # xs \<down> Suc i)
[PROOF STEP]
apply (induct xs, simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a xs i m. \<lbrakk>\<And>i m. i < length xs \<Longrightarrow> last_message_hold_init xs m ! i = last_message (m # xs \<down> Suc i); i < length (a # xs)\<rbrakk> \<Longrightarrow> last_message_hold_init (a # xs) m ! i = last_message (m # (a # xs) \<down> Suc i)
[PROOF STEP]
apply (simp add: nth_Cons')
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
theorem isFDERIV_imp_isnFDERIV:
  assumes "isFDERIV N xs fas vs" and [simp]: "length fas = N" "length xs = N" "length ds = N"
  shows "isnFDERIV N fas xs ds vs n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isnFDERIV N fas xs ds vs n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
isFDERIV N xs fas vs
length fas = N
length xs = N
length ds = N

goal (1 subgoal):
 1. isnFDERIV N fas xs ds vs n
[PROOF STEP]
by (induction n) (auto intro!: isFDERIV_imp_isFDERIV_FDERIV_n isFDERIV_map_Var)


[STATEMENT]
lemma second_vertices_card: "card second_vertices = card paths"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card second_vertices = card paths
[PROOF STEP]
unfolding second_vertices_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (second_vertex ` paths) = card paths
[PROOF STEP]
using finite_paths card_image second_vertex_inj
[PROOF STATE]
proof (prove)
using this:
finite paths
inj_on ?f ?A \<Longrightarrow> card (?f ` ?A) = card ?A
inj_on second_vertex paths

goal (1 subgoal):
 1. card (second_vertex ` paths) = card paths
[PROOF STEP]
by blast


[STATEMENT]
lemma less_eq_Max_atms_of: "C \<noteq> {#} \<Longrightarrow> C \<le> D \<Longrightarrow> Max (atms_of C) \<le> Max (atms_of D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>C \<noteq> {#}; C \<le> D\<rbrakk> \<Longrightarrow> Max (atms_of C) \<le> Max (atms_of D)
[PROOF STEP]
unfolding atms_of_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>C \<noteq> {#}; C \<le> D\<rbrakk> \<Longrightarrow> Max (atm_of ` set_mset C) \<le> Max (atm_of ` set_mset D)
[PROOF STEP]
by (metis Max_atm_of_set_mset_commute leq_imp_less_eq_atm_of less_eq_Max_lit
      less_eq_multiset_empty_right)


[STATEMENT]
lemma fpxs_nth_mult:
  "fpxs_nth (f * g) r =
     (\<Sum>(y,z) | y \<in> fpxs_supp f \<and> z \<in> fpxs_supp g \<and> r = y + z. fpxs_nth f y * fpxs_nth g z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fpxs_nth (f * g) r = (\<Sum>(y, z)\<in>{(y, z). y \<in> fpxs_supp f \<and> z \<in> fpxs_supp g \<and> r = y + z}. fpxs_nth f y * fpxs_nth g z)
[PROOF STEP]
by transfer simp


[STATEMENT]
lemma real_sqrt_ge_abs1 [simp]: "\<bar>x\<bar> \<le> sqrt (x\<^sup>2 + y\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x\<bar> \<le> sqrt (x\<^sup>2 + y\<^sup>2)
[PROOF STEP]
by (rule power2_le_imp_le) simp_all


[STATEMENT]
lemma HSem_cong[fundef_cong]:
  "\<lbrakk> (\<And> e. e \<in> snd ` set heap2 \<Longrightarrow> ESem1 e = ESem2 e); heap1 = heap2  \<rbrakk>
      \<Longrightarrow> has_ESem.HSem ESem1 heap1 = has_ESem.HSem ESem2 heap2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>e. e \<in> snd ` set heap2 \<Longrightarrow> ESem1 e = ESem2 e; heap1 = heap2\<rbrakk> \<Longrightarrow> has_ESem.HSem ESem1 heap1 = has_ESem.HSem ESem2 heap2
[PROOF STEP]
unfolding has_ESem.HSem_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>e. e \<in> snd ` set heap2 \<Longrightarrow> ESem1 e = ESem2 e; heap1 = heap2\<rbrakk> \<Longrightarrow> (\<Lambda> \<rho>. \<mu> x. \<rho> ++\<^bsub>domA heap1\<^esub> evalHeap heap1 (\<lambda>e. ESem1 e\<cdot>x)) = (\<Lambda> \<rho>. \<mu> x. \<rho> ++\<^bsub>domA heap2\<^esub> evalHeap heap2 (\<lambda>e. ESem2 e\<cdot>x))
[PROOF STEP]
by (auto cong:evalHeap_cong)


[STATEMENT]
lemma power_tc: "VARS (p::int) i
  [ True ]
  p := 1;
  i := 0;
  WHILE i < n
    INV { p = x^i \<and> i \<le> n }
    VAR { n - i }
     DO p := p * x;
        i := i + 1
     OD
  [ p = x^n ]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [True]
p := 1; i := 0; WHILE i < n INV {p = x ^ i \<and> i \<le> n}  VAR {n - i}
DO p := p * x; i := i + 1 OD
[p = x ^ n]
[PROOF STEP]
apply vcg_tc
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>p i. True \<Longrightarrow> 1 = x ^ 0 \<and> 0 \<le> n
 2. \<And>na p i. ((p = x ^ i \<and> i \<le> n) \<and> i < n) \<and> n - i = na \<Longrightarrow> (p * x, i + 1) \<in> {s. (case s of (p, i) \<Rightarrow> p = x ^ i \<and> i \<le> n) \<and> (case s of (p, x) \<Rightarrow> n - x) < na}
 3. \<And>p i. (p = x ^ i \<and> i \<le> n) \<and> \<not> i < n \<Longrightarrow> p = x ^ n
[PROOF STEP]
by auto


[STATEMENT]
lemma is_meetI:
  fixes x y z :: "'a :: Finite_Meet_cpo"
  assumes "z \<sqsubseteq> x"
  assumes "z \<sqsubseteq> y"
  assumes "\<And> a. \<lbrakk> a \<sqsubseteq> x ; a \<sqsubseteq> y \<rbrakk> \<Longrightarrow> a \<sqsubseteq> z"
  shows "x \<sqinter> y = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<sqinter> y = z
[PROOF STEP]
by (metis assms below_antisym meet_above_iff below_refl)


[STATEMENT]
lemma polyexp_ratfps_Cons: "polyexp_ratfps (x#xs) = (case x of (a,k,b) \<Rightarrow>
  ratfps_of_poly (Polynomial.smult a (fps_monom_poly b k)) /
     ratfps_of_poly ([:1, -b:] ^ (k + 1))) + polyexp_ratfps xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. polyexp_ratfps (x # xs) = (case x of (a, k, b) \<Rightarrow> ratfps_of_poly (smult a (fps_monom_poly b k)) / ratfps_of_poly ([:1::'a, - b:] ^ (k + 1))) + polyexp_ratfps xs
[PROOF STEP]
by (simp add: polyexp_ratfps_def)


[STATEMENT]
lemma arg_max_SUP: "is_arg_max (f :: 'b \<Rightarrow> real) (\<lambda>x. x \<in> X) m \<Longrightarrow> f m = (\<Squnion>(f ` X))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_arg_max f (\<lambda>x. x \<in> X) m \<Longrightarrow> f m = \<Squnion> (f ` X)
[PROOF STEP]
unfolding is_arg_max_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<in> X \<and> (\<nexists>y. y \<in> X \<and> f m < f y) \<Longrightarrow> f m = \<Squnion> (f ` X)
[PROOF STEP]
by (auto intro!: antisym cSUP_upper bdd_aboveI[of _ "f m"] cSUP_least)


[STATEMENT]
lemma card_univ_subtract:
  assumes "finite (UNIV :: 'a set)" and  "mono \<tau>"
     and  "(\<forall>i :: nat. ((\<tau> :: 'a set \<Rightarrow> 'a set) ^^ (i + (1 :: nat)))(UNIV :: 'a set) \<subset> (\<tau> ^^ i) UNIV)"
   shows "(\<forall> i :: nat. card((\<tau> ^^ i) (UNIV ::'a set)) \<le> (card (UNIV :: 'a set)) - i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i. card ((\<tau> ^^ i) UNIV) \<le> card UNIV - i
[PROOF STEP]
proof (rule allI, induct_tac i)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. card ((\<tau> ^^ 0) UNIV) \<le> card UNIV - 0
 2. \<And>i n. card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
show "card ((\<tau> ^^ (0)) UNIV) \<le> card (UNIV :: 'a set) - (0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card ((\<tau> ^^ 0) UNIV) \<le> card UNIV - 0
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite UNIV
mono \<tau>
\<forall>i. (\<tau> ^^ (i + 1)) UNIV \<subset> (\<tau> ^^ i) UNIV

goal (1 subgoal):
 1. card ((\<tau> ^^ 0) UNIV) \<le> card UNIV - 0
[PROOF STEP]
by (simp)
[PROOF STATE]
proof (state)
this:
card ((\<tau> ^^ 0) UNIV) \<le> card UNIV - 0

goal (1 subgoal):
 1. \<And>i n. card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i n. card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
show "\<And>(i) n.
       card ((\<tau> ^^ n) (UNIV :: 'a set)) \<le> card (UNIV :: 'a set) - n \<Longrightarrow>
       card ((\<tau> ^^ Suc n) (UNIV :: 'a set)) \<le> card (UNIV :: 'a set) - Suc n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i n. card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite UNIV
mono \<tau>
\<forall>i. (\<tau> ^^ (i + 1)) UNIV \<subset> (\<tau> ^^ i) UNIV

goal (1 subgoal):
 1. \<And>i n. card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i n. \<lbrakk>card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n; finite UNIV; mono \<tau>; \<forall>i. (\<tau> ^^ (i + 1)) UNIV \<subset> (\<tau> ^^ i) UNIV\<rbrakk> \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
fix i n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i n. \<lbrakk>card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n; finite UNIV; mono \<tau>; \<forall>i. (\<tau> ^^ (i + 1)) UNIV \<subset> (\<tau> ^^ i) UNIV\<rbrakk> \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
assume a: "card ((\<tau> ^^ n) (UNIV :: 'a set)) \<le> card (UNIV :: 'a set) - n"
[PROOF STATE]
proof (state)
this:
card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n

goal (1 subgoal):
 1. \<And>i n. \<lbrakk>card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n; finite UNIV; mono \<tau>; \<forall>i. (\<tau> ^^ (i + 1)) UNIV \<subset> (\<tau> ^^ i) UNIV\<rbrakk> \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
have b: "(\<tau> ^^ (n + (1)))(UNIV :: 'a set) \<subset> (\<tau> ^^ n) UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<tau> ^^ (n + 1)) UNIV \<subset> (\<tau> ^^ n) UNIV
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite UNIV
mono \<tau>
\<forall>i. (\<tau> ^^ (i + 1)) UNIV \<subset> (\<tau> ^^ i) UNIV

goal (1 subgoal):
 1. (\<tau> ^^ (n + 1)) UNIV \<subset> (\<tau> ^^ n) UNIV
[PROOF STEP]
by (erule_tac x = n in spec)
[PROOF STATE]
proof (state)
this:
(\<tau> ^^ (n + 1)) UNIV \<subset> (\<tau> ^^ n) UNIV

goal (1 subgoal):
 1. \<And>i n. \<lbrakk>card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n; finite UNIV; mono \<tau>; \<forall>i. (\<tau> ^^ (i + 1)) UNIV \<subset> (\<tau> ^^ i) UNIV\<rbrakk> \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
have "card((\<tau> ^^ (n + (1 :: nat)))(UNIV :: 'a set)) < card((\<tau> ^^ n) (UNIV :: 'a set))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card ((\<tau> ^^ (n + 1)) UNIV) < card ((\<tau> ^^ n) UNIV)
[PROOF STEP]
by (rule psubset_card_mono, rule finite_subset, rule subset_UNIV, rule assms(1), rule b)
[PROOF STATE]
proof (state)
this:
card ((\<tau> ^^ (n + 1)) UNIV) < card ((\<tau> ^^ n) UNIV)

goal (1 subgoal):
 1. \<And>i n. \<lbrakk>card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n; finite UNIV; mono \<tau>; \<forall>i. (\<tau> ^^ (i + 1)) UNIV \<subset> (\<tau> ^^ i) UNIV\<rbrakk> \<Longrightarrow> card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
thus "card ((\<tau> ^^ Suc n) (UNIV :: 'a set)) \<le> card (UNIV :: 'a set) - Suc n"
[PROOF STATE]
proof (prove)
using this:
card ((\<tau> ^^ (n + 1)) UNIV) < card ((\<tau> ^^ n) UNIV)

goal (1 subgoal):
 1. card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
card ((\<tau> ^^ (n + 1)) UNIV) < card ((\<tau> ^^ n) UNIV)
card ((\<tau> ^^ n) UNIV) \<le> card UNIV - n

goal (1 subgoal):
 1. card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
card ((\<tau> ^^ Suc n) UNIV) \<le> card UNIV - Suc n

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
card ((\<tau> ^^ ?n) UNIV) \<le> card UNIV - ?n \<Longrightarrow> card ((\<tau> ^^ Suc ?n) UNIV) \<le> card UNIV - Suc ?n

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_integral_cont_up:
  fixes f :: "_ \<Rightarrow> 'a :: {banach, second_countable_topology}"
  assumes [measurable]: "\<And>i. A i \<in> sets M" and A: "incseq A"
  and intgbl: "set_integrable M (\<Union>i. A i) f"
shows "(\<lambda>i. LINT x:(A i)|M. f x) \<longlonglongrightarrow> LINT x:(\<Union>i. A i)|M. f x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. set_lebesgue_integral M (A i) f) \<longlonglongrightarrow> set_lebesgue_integral M (\<Union> (range A)) f
[PROOF STEP]
unfolding set_lebesgue_integral_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>i. LINT x|M. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> LINT x|M. indicat_real (\<Union> (range A)) x *\<^sub>R f x
[PROOF STEP]
proof (intro integral_dominated_convergence[where w="\<lambda>x. indicator (\<Union>i. A i) x *\<^sub>R norm (f x)"])
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R f x) \<in> borel_measurable M
 2. \<And>i. (\<lambda>x. indicat_real (A i) x *\<^sub>R f x) \<in> borel_measurable M
 3. integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x))
 4. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 5. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
have int_A: "\<And>i. set_integrable M (A i) f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. set_integrable M (A i) f
[PROOF STEP]
using intgbl
[PROOF STATE]
proof (prove)
using this:
set_integrable M (\<Union> (range A)) f

goal (1 subgoal):
 1. \<And>i. set_integrable M (A i) f
[PROOF STEP]
by (rule set_integrable_subset) auto
[PROOF STATE]
proof (state)
this:
set_integrable M (A ?i) f

goal (5 subgoals):
 1. (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R f x) \<in> borel_measurable M
 2. \<And>i. (\<lambda>x. indicat_real (A i) x *\<^sub>R f x) \<in> borel_measurable M
 3. integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x))
 4. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 5. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
show "\<And>i. (\<lambda>x. indicator (A i) x *\<^sub>R f x) \<in> borel_measurable M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. (\<lambda>x. indicat_real (A i) x *\<^sub>R f x) \<in> borel_measurable M
[PROOF STEP]
using int_A integrable_iff_bounded set_integrable_def
[PROOF STATE]
proof (prove)
using this:
set_integrable M (A ?i) f
integrable ?M ?f = (?f \<in> borel_measurable ?M \<and> \<integral>\<^sup>+ x. ennreal (norm (?f x)) \<partial>?M < \<infinity>)
set_integrable ?M ?A ?f \<equiv> integrable ?M (\<lambda>x. indicat_real ?A x *\<^sub>R ?f x)

goal (1 subgoal):
 1. \<And>i. (\<lambda>x. indicat_real (A i) x *\<^sub>R f x) \<in> borel_measurable M
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>x. indicat_real (A ?i) x *\<^sub>R f x) \<in> borel_measurable M

goal (4 subgoals):
 1. (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R f x) \<in> borel_measurable M
 2. integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x))
 3. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 4. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
show "(\<lambda>x. indicator (\<Union>(A ` UNIV)) x *\<^sub>R f x) \<in> borel_measurable M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R f x) \<in> borel_measurable M
[PROOF STEP]
using integrable_iff_bounded intgbl set_integrable_def
[PROOF STATE]
proof (prove)
using this:
integrable ?M ?f = (?f \<in> borel_measurable ?M \<and> \<integral>\<^sup>+ x. ennreal (norm (?f x)) \<partial>?M < \<infinity>)
set_integrable M (\<Union> (range A)) f
set_integrable ?M ?A ?f \<equiv> integrable ?M (\<lambda>x. indicat_real ?A x *\<^sub>R ?f x)

goal (1 subgoal):
 1. (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R f x) \<in> borel_measurable M
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R f x) \<in> borel_measurable M

goal (3 subgoals):
 1. integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x))
 2. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 3. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
show "integrable M (\<lambda>x. indicator (\<Union>i. A i) x *\<^sub>R norm (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x))
[PROOF STEP]
using int_A intgbl integrable_norm
[PROOF STATE]
proof (prove)
using this:
set_integrable M (A ?i) f
set_integrable M (\<Union> (range A)) f
integrable ?M ?f \<Longrightarrow> integrable ?M (\<lambda>x. norm (?f x))

goal (1 subgoal):
 1. integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x))
[PROOF STEP]
unfolding set_integrable_def
[PROOF STATE]
proof (prove)
using this:
integrable M (\<lambda>x. indicat_real (A ?i) x *\<^sub>R f x)
integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R f x)
integrable ?M ?f \<Longrightarrow> integrable ?M (\<lambda>x. norm (?f x))

goal (1 subgoal):
 1. integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x))

goal (2 subgoals):
 1. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 2. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
integrable M (\<lambda>x. indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x))

goal (2 subgoals):
 1. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 2. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
fix x i
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 2. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
assume "x \<in> A i"
[PROOF STATE]
proof (state)
this:
x \<in> A i

goal (2 subgoals):
 1. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 2. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
with A
[PROOF STATE]
proof (chain)
picking this:
incseq A
x \<in> A i
[PROOF STEP]
have "(\<lambda>xa. indicator (A xa) x::real) \<longlonglongrightarrow> 1 \<longleftrightarrow> (\<lambda>xa. 1::real) \<longlonglongrightarrow> 1"
[PROOF STATE]
proof (prove)
using this:
incseq A
x \<in> A i

goal (1 subgoal):
 1. (\<lambda>xa. indicat_real (A xa) x) \<longlonglongrightarrow> 1 = (\<lambda>xa. 1) \<longlonglongrightarrow> 1
[PROOF STEP]
by (intro filterlim_cong refl)
         (fastforce simp: eventually_sequentially incseq_def subset_eq intro!: exI[of _ i])
[PROOF STATE]
proof (state)
this:
(\<lambda>xa. indicat_real (A xa) x) \<longlonglongrightarrow> 1 = (\<lambda>xa. 1) \<longlonglongrightarrow> 1

goal (2 subgoals):
 1. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 2. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?x2 \<in> A ?i2 \<Longrightarrow> (\<lambda>xa. indicat_real (A xa) ?x2) \<longlonglongrightarrow> 1 = (\<lambda>xa. 1) \<longlonglongrightarrow> 1

goal (2 subgoals):
 1. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
 2. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?x2 \<in> A ?i2 \<Longrightarrow> (\<lambda>xa. indicat_real (A xa) ?x2) \<longlonglongrightarrow> 1 = (\<lambda>xa. 1) \<longlonglongrightarrow> 1
[PROOF STEP]
show "AE x in M. (\<lambda>i. indicator (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicator (\<Union>i. A i) x *\<^sub>R f x"
[PROOF STATE]
proof (prove)
using this:
?x2 \<in> A ?i2 \<Longrightarrow> (\<lambda>xa. indicat_real (A xa) ?x2) \<longlonglongrightarrow> 1 = (\<lambda>xa. 1) \<longlonglongrightarrow> 1

goal (1 subgoal):
 1. AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x
[PROOF STEP]
by (intro AE_I2 tendsto_intros) (auto split: split_indicator)
[PROOF STATE]
proof (state)
this:
AE x in M. (\<lambda>i. indicat_real (A i) x *\<^sub>R f x) \<longlonglongrightarrow> indicat_real (\<Union> (range A)) x *\<^sub>R f x

goal (1 subgoal):
 1. \<And>i. AE x in M. norm (indicat_real (A i) x *\<^sub>R f x) \<le> indicat_real (\<Union> (range A)) x *\<^sub>R norm (f x)
[PROOF STEP]
qed (auto split: split_indicator)


[STATEMENT]
lemma pdevs_apply_filter_slist: "pdevs_apply (Pdevs (filter_slist P xs)) i =
  (if P i (pdevs_apply (Pdevs xs) i) then pdevs_apply (Pdevs xs) i else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pdevs_apply (Pdevs (filter_slist P xs)) i = (if P i (pdevs_apply (Pdevs xs) i) then pdevs_apply (Pdevs xs) i else (0::'a))
[PROOF STEP]
by (simp add: compute_pdevs_apply slist_apply_filter_slist)


[STATEMENT]
lemma iMOD_union: "
  \<lbrakk> r \<le> r'; r mod m = r' mod m \<rbrakk> \<Longrightarrow>
  [r, mod m] \<union> [r', mod m] = [r, mod m]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>r \<le> r'; r mod m = r' mod m\<rbrakk> \<Longrightarrow> [ r, mod m ] \<union> [ r', mod m ] = [ r, mod m ]
[PROOF STEP]
by (fastforce simp: iT_iff)


[STATEMENT]
lemma zmultiset_partition: "M = {#x \<in>#\<^sub>z M. P x #} + {#x \<in>#\<^sub>z M. \<not> P x#}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. M = filter_zmset P M + {#x \<in>#\<^sub>z M. \<not> P x#}
[PROOF STEP]
by (subst zmultiset_eq_iff) auto


[STATEMENT]
lemma finite_rel: "finite {(u, v). is_dec_det u \<and> is_dec_det v \<and> \<nu>\<^sub>b (mk_stationary_det u) >
  \<nu>\<^sub>b (mk_stationary_det v)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {(u, v). is_dec_det u \<and> is_dec_det v \<and> \<nu>\<^sub>b (mk_stationary_det v) < \<nu>\<^sub>b (mk_stationary_det u)}
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {(u, v). is_dec_det u \<and> is_dec_det v \<and> \<nu>\<^sub>b (mk_stationary_det v) < \<nu>\<^sub>b (mk_stationary_det u)}
[PROOF STEP]
have aux: "finite {(u, v). is_dec_det u \<and> is_dec_det v}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {(u, v). is_dec_det u \<and> is_dec_det v}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite {(u, v). is_dec_det u \<and> is_dec_det v}

goal (1 subgoal):
 1. finite {(u, v). is_dec_det u \<and> is_dec_det v \<and> \<nu>\<^sub>b (mk_stationary_det v) < \<nu>\<^sub>b (mk_stationary_det u)}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {(u, v). is_dec_det u \<and> is_dec_det v \<and> \<nu>\<^sub>b (mk_stationary_det v) < \<nu>\<^sub>b (mk_stationary_det u)}
[PROOF STEP]
by (auto intro: finite_subset[OF _ aux])
[PROOF STATE]
proof (state)
this:
finite {(u, v). is_dec_det u \<and> is_dec_det v \<and> \<nu>\<^sub>b (mk_stationary_det v) < \<nu>\<^sub>b (mk_stationary_det u)}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Proj_vimage_chart_basis_domainP:
  "Proj -` Collect (chart_basis_domainP b) = Collect (chart_basis_domain_nonzeroP b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Proj -` Collect (chart_basis_domainP b) = Collect (chart_basis_domain_nonzeroP b)
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x xa. chart_basis_domainP b (Proj x) \<Longrightarrow> chart_basis_domain_nonzeroP b x
 2. \<And>x. chart_basis_domain_nonzeroP b x \<Longrightarrow> x \<in> Proj -` Collect (chart_basis_domainP b)
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. chart_basis_domainP b (Proj x_) \<Longrightarrow> chart_basis_domain_nonzeroP b x_
[PROOF STEP]
by transfer'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. chart_basis_domain_nonzeroP b x \<Longrightarrow> x \<in> Proj -` Collect (chart_basis_domainP b)
[PROOF STEP]
subgoal for x
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. chart_basis_domain_nonzeroP b x \<Longrightarrow> x \<in> Proj -` Collect (chart_basis_domainP b)
[PROOF STEP]
by auto transfer
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma norm_lt: "norm x < norm y \<longleftrightarrow> inner x x < inner y y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (norm x < norm y) = (inner x x < inner y y)
[PROOF STEP]
by (simp add: norm_eq_sqrt_inner)


[STATEMENT]
lemma moebius_pt_moebius_translation [simp]:
  shows "moebius_pt (moebius_translation v) (of_complex z) = of_complex (z + v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_pt (moebius_translation v) (of_complex z) = of_complex (z + v)
[PROOF STEP]
unfolding moebius_translation_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. moebius_pt (moebius_similarity 1 v) (of_complex z) = of_complex (z + v)
[PROOF STEP]
by (simp add: field_simps)


[STATEMENT]
lemma varTypes_finite:
  "finite (Collect varType_inv)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (Collect varType_inv)
[PROOF STEP]
proof (rule finite_subset)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Collect varType_inv \<subseteq> ?B
 2. finite ?B
[PROOF STEP]
show "Collect (varType_inv) \<subseteq>
      {VTChan}
    \<union> (\<lambda>(l,h). VTBounded l h)
      ` ({min_var_value..max_var_value} \<times> {min_var_value..max_var_value})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Collect varType_inv \<subseteq> {VTChan} \<union> (\<lambda>(l, h). VTBounded l h) ` ({min_var_value..max_var_value} \<times> {min_var_value..max_var_value})
[PROOF STEP]
apply (rule subsetI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> Collect varType_inv \<Longrightarrow> x \<in> {VTChan} \<union> (\<lambda>(l, h). VTBounded l h) ` ({min_var_value..max_var_value} \<times> {min_var_value..max_var_value})
[PROOF STEP]
apply (case_tac x)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x x11 x12. \<lbrakk>x \<in> Collect varType_inv; x = VTBounded x11 x12\<rbrakk> \<Longrightarrow> x \<in> {VTChan} \<union> (\<lambda>(l, h). VTBounded l h) ` ({min_var_value..max_var_value} \<times> {min_var_value..max_var_value})
 2. \<And>x. \<lbrakk>x \<in> Collect varType_inv; x = VTChan\<rbrakk> \<Longrightarrow> x \<in> {VTChan} \<union> (\<lambda>(l, h). VTBounded l h) ` ({min_var_value..max_var_value} \<times> {min_var_value..max_var_value})
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
Collect varType_inv \<subseteq> {VTChan} \<union> (\<lambda>(l, h). VTBounded l h) ` ({min_var_value..max_var_value} \<times> {min_var_value..max_var_value})

goal (1 subgoal):
 1. finite ({VTChan} \<union> (\<lambda>(l, h). VTBounded l h) ` ({min_var_value..max_var_value} \<times> {min_var_value..max_var_value}))
[PROOF STEP]
show "finite ..."
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite ({VTChan} \<union> (\<lambda>(l, h). VTBounded l h) ` ({min_var_value..max_var_value} \<times> {min_var_value..max_var_value}))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
finite ({VTChan} \<union> (\<lambda>(l, h). VTBounded l h) ` ({min_var_value..max_var_value} \<times> {min_var_value..max_var_value}))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma aminus:"- ant m = ant (-m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - ant m = ant (- m)
[PROOF STEP]
apply (simp add:ant_def minus_ant_def,
       cut_tac ant_z_in_Ainteg[of "m"],
       simp add:Abs_Ainteg_inverse)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma of_complex_diff [simp]: "of_complex (x - y) = of_complex x - of_complex y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_complex (x - y) = of_complex x - of_complex y
[PROOF STEP]
by (simp add: of_complex_def scaleC_diff_left)


[STATEMENT]
lemma "(-x = y) = (x = (-y::real))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (- x = y) = (x = - y)
[PROOF STEP]
by arith


[STATEMENT]
lemma sum_image_mset_mono:
  fixes f :: "'a \<Rightarrow> 'b::canonically_ordered_monoid_add"
  assumes sub: "A \<subseteq># B"
  shows "(\<Sum>m \<in># A. f m) \<le> (\<Sum>m \<in># B. f m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset f A) \<le> \<Sum>\<^sub># (image_mset f B)
[PROOF STEP]
by (metis image_mset_union le_iff_add sub subset_mset.add_diff_inverse sum_mset.union)


[STATEMENT]
lemma char_of_integer_code [code]:
  "char_of_integer k = (let
     (q0, b0) = bit_cut_integer k;
     (q1, b1) = bit_cut_integer q0;
     (q2, b2) = bit_cut_integer q1;
     (q3, b3) = bit_cut_integer q2;
     (q4, b4) = bit_cut_integer q3;
     (q5, b5) = bit_cut_integer q4;
     (q6, b6) = bit_cut_integer q5;
     (_, b7) = bit_cut_integer q6
    in Char b0 b1 b2 b3 b4 b5 b6 b7)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. char_of_integer k = (let (q0, b0) = bit_cut_integer k; (q1, b1) = bit_cut_integer q0; (q2, b2) = bit_cut_integer q1; (q3, b3) = bit_cut_integer q2; (q4, b4) = bit_cut_integer q3; (q5, b5) = bit_cut_integer q4; (q6, b6) = bit_cut_integer q5; (uu_, b7) = bit_cut_integer q6 in Char b0 b1 b2 b3 b4 b5 b6 b7)
[PROOF STEP]
by (simp add: bit_cut_integer_def char_of_integer_def char_of_def div_mult2_numeral_eq bit_iff_odd_drop_bit drop_bit_eq_div)


[STATEMENT]
lemma subtensor_plus:
fixes A::"'a::semigroup_add tensor" and B::"'a::semigroup_add tensor"
assumes "i < hd (dims A)"
and "dims A = dims B"
and "dims A \<noteq> []"
shows "subtensor (A + B) i = subtensor A i + subtensor B i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subtensor (A + B) i = subtensor A i + subtensor B i
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. subtensor (A + B) i = subtensor A i + subtensor B i
[PROOF STEP]
have "length (vec A) =  hd (dims A) * prod_list (tl (dims A))"
        "length (Tensor.vec B) = hd (dims A) * prod_list (tl (dims A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (vec A) = hd (dims A) * prod_list (tl (dims A)) &&& length (vec B) = hd (dims A) * prod_list (tl (dims A))
[PROOF STEP]
using length_vec prod_list.Cons assms
[PROOF STATE]
proof (prove)
using this:
length (vec ?A) = prod_list (dims ?A)
prod_list (?x # ?xs) = ?x * prod_list ?xs
i < hd (dims A)
dims A = dims B
dims A \<noteq> []

goal (1 subgoal):
 1. length (vec A) = hd (dims A) * prod_list (tl (dims A)) &&& length (vec B) = hd (dims A) * prod_list (tl (dims A))
[PROOF STEP]
by (metis (no_types) list.exhaust_sel)+
[PROOF STATE]
proof (state)
this:
length (vec A) = hd (dims A) * prod_list (tl (dims A))
length (vec B) = hd (dims A) * prod_list (tl (dims A))

goal (1 subgoal):
 1. subtensor (A + B) i = subtensor A i + subtensor B i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
length (vec A) = hd (dims A) * prod_list (tl (dims A))
length (vec B) = hd (dims A) * prod_list (tl (dims A))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
length (vec A) = hd (dims A) * prod_list (tl (dims A))
length (vec B) = hd (dims A) * prod_list (tl (dims A))

goal (1 subgoal):
 1. subtensor (A + B) i = subtensor A i + subtensor B i
[PROOF STEP]
using Tensor_Plus.vec_plus assms fixed_length_sublist_plus vec_subtensor tensor_eqI
     dims_subtensor plus_dim1
[PROOF STATE]
proof (prove)
using this:
length (vec A) = hd (dims A) * prod_list (tl (dims A))
length (vec B) = hd (dims A) * prod_list (tl (dims A))
dims ?A = dims ?B \<Longrightarrow> vec (?A + ?B) = vec_plus (vec ?A) (vec ?B)
i < hd (dims A)
dims A = dims B
dims A \<noteq> []
\<lbrakk>length ?xs1.0 = ?c * ?l; length ?xs2.0 = ?c * ?l; ?i < ?c\<rbrakk> \<Longrightarrow> fixed_length_sublist (vec_plus ?xs1.0 ?xs2.0) ?l ?i = vec_plus (fixed_length_sublist ?xs1.0 ?l ?i) (fixed_length_sublist ?xs2.0 ?l ?i)
\<lbrakk>dims ?A \<noteq> []; ?i < hd (dims ?A)\<rbrakk> \<Longrightarrow> vec (subtensor ?A ?i) = fixed_length_sublist (vec ?A) (prod_list (tl (dims ?A))) ?i
\<lbrakk>dims ?A = dims ?B; vec ?A = vec ?B\<rbrakk> \<Longrightarrow> ?A = ?B
\<lbrakk>dims ?A \<noteq> []; ?i < hd (dims ?A)\<rbrakk> \<Longrightarrow> dims (subtensor ?A ?i) = tl (dims ?A)
dims ?A = dims ?B \<Longrightarrow> dims (?A + ?B) = dims ?A

goal (1 subgoal):
 1. subtensor (A + B) i = subtensor A i + subtensor B i
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
subtensor (A + B) i = subtensor A i + subtensor B i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma reduced_word_forI_compare:
  "\<lbrakk> reduced_word_for A a as; bs \<in> lists A; sum_list bs = a; length bs = length as \<rbrakk>
    \<Longrightarrow> reduced_word_for A a bs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>reduced_word_for A a as; bs \<in> lists A; sum_list bs = a; length bs = length as\<rbrakk> \<Longrightarrow> reduced_word_for A a bs
[PROOF STEP]
using reduced_word_for_def is_arg_min_eq[of length]
[PROOF STATE]
proof (prove)
using this:
reduced_word_for ?A ?a ?as \<equiv> is_arg_min length (word_for ?A ?a) ?as
\<lbrakk>is_arg_min length ?P ?x; ?P ?z; length ?z = length ?x\<rbrakk> \<Longrightarrow> is_arg_min length ?P ?z

goal (1 subgoal):
 1. \<lbrakk>reduced_word_for A a as; bs \<in> lists A; sum_list bs = a; length bs = length as\<rbrakk> \<Longrightarrow> reduced_word_for A a bs
[PROOF STEP]
by fast


[STATEMENT]
lemma less_sets_UN2: "less_sets A (\<Union> \<B>) \<longleftrightarrow> (\<forall>B\<in>\<B>. A \<lless> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<lless> \<Union> \<B>) = (\<forall>B\<in>\<B>. A \<lless> B)
[PROOF STEP]
by (auto simp: less_sets_def)


[STATEMENT]
lemma lim_imp_Gromov_converging_at_boundary:
  fixes u::"nat \<Rightarrow> 'a::Gromov_hyperbolic_space"
  assumes "(\<lambda>n. to_Gromov_completion (u n)) \<longlonglongrightarrow> x" "x \<in> Gromov_boundary"
  shows "Gromov_converging_at_boundary u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Gromov_converging_at_boundary u
[PROOF STEP]
using Gromov_boundary_abs_converging Gromov_completion_converge_to_boundary assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> Gromov_boundary; abs_Gromov_completion ?u = ?x; Gromov_completion_rel ?u ?u\<rbrakk> \<Longrightarrow> Gromov_converging_at_boundary ?u
?x \<in> Gromov_boundary \<Longrightarrow> (\<lambda>n. to_Gromov_completion (?u n)) \<longlonglongrightarrow> ?x = (Gromov_completion_rel ?u ?u \<and> abs_Gromov_completion ?u = ?x)
(\<lambda>n. to_Gromov_completion (u n)) \<longlonglongrightarrow> x
x \<in> Gromov_boundary

goal (1 subgoal):
 1. Gromov_converging_at_boundary u
[PROOF STEP]
by blast


[STATEMENT]
lemma content_cbox_cases:
  "content (cbox a b) = (if \<forall>i\<in>Basis. a\<bullet>i \<le> b\<bullet>i then prod (\<lambda>i. b\<bullet>i - a\<bullet>i) Basis else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. content (cbox a b) = (if \<forall>i\<in>Basis. a \<bullet> i \<le> b \<bullet> i then \<Prod>i\<in>Basis. b \<bullet> i - a \<bullet> i else 0)
[PROOF STEP]
by (simp add: measure_lborel_cbox_eq inner_diff)


[STATEMENT]
lemma mem_ball [simp, metric_unfold]: "y \<in> ball x e \<longleftrightarrow> dist x y < e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y \<in> ball x e) = (dist x y < e)
[PROOF STEP]
by (simp add: ball_def)


[STATEMENT]
lemma word_oa_dist: "x AND y OR z = (x OR z) AND (y OR z)"
  for x :: "'a::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x AND y OR z = (x OR z) AND (y OR z)
[PROOF STEP]
by (fact bit.disj_conj_distrib2)


[STATEMENT]
lemma perron_frobenius:
  assumes "real_non_neg_mat A"
  shows "\<exists>v. eigen_vector A v (of_real (spectral_radius A)) \<and> real_non_neg_vec v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>v. eigen_vector A v (complex_of_real (HMA_Connect.spectral_radius A)) \<and> real_non_neg_vec v
[PROOF STEP]
by (rule Perron_Frobenius.perron_frobenius_both[OF assms])


[STATEMENT]
lemma hyperdual_eq_parts_cancel [simp]:
  fixes a b c d :: "'a :: ring_1"
  shows "(a *\<^sub>H ba + b *\<^sub>H e1 + c *\<^sub>H e2 + d *\<^sub>H e12 = a' *\<^sub>H ba + b' *\<^sub>H e1 + c' *\<^sub>H e2 + d' *\<^sub>H e12) \<equiv>
         (a = a' \<and> b = b' \<and> c = c' \<and> d = d')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a *\<^sub>H ba + b *\<^sub>H e1 + c *\<^sub>H e2 + d *\<^sub>H e12 = a' *\<^sub>H ba + b' *\<^sub>H e1 + c' *\<^sub>H e2 + d' *\<^sub>H e12 \<equiv> a = a' \<and> b = b' \<and> c = c' \<and> d = d'
[PROOF STEP]
by (smt Hyperdual_eq hyperdual.inject)


[STATEMENT]
lemma "(\<exists>x y::'a. \<forall>z. z=x \<or> z=y) \<and> P(a) \<and> P(b) \<and> (\<not>a=b)
                \<longrightarrow> (\<forall>u::'a. P(u))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>x y. \<forall>z. z = x \<or> z = y) \<and> P a \<and> P b \<and> a \<noteq> b \<longrightarrow> (\<forall>u. P u)
[PROOF STEP]
by metis


[STATEMENT]
lemma dtree_to_list_snds_disjoint2:
  "(darcs t1 \<union> {e1}) \<inter> (darcs t2 \<union> {e2}) = {}
    \<Longrightarrow> snd ` set (dtree_to_list (Node r {|(t1,e1)|}))
      \<inter> snd ` set (dtree_to_list (Node r {|(t2,e2)|})) = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (darcs t1 \<union> {e1}) \<inter> (darcs t2 \<union> {e2}) = {} \<Longrightarrow> snd ` set (dtree_to_list (Node r {|(t1, e1)|})) \<inter> snd ` set (dtree_to_list (Node r {|(t2, e2)|})) = {}
[PROOF STEP]
using disjoint_iff dtree_to_list_x_in_darcs
[PROOF STATE]
proof (prove)
using this:
(?A \<inter> ?B = {}) = (\<forall>x. x \<in> ?A \<longrightarrow> x \<notin> ?B)
?x \<in> snd ` set (dtree_to_list (Node ?r {|(?t1.0, ?e1.0)|})) \<Longrightarrow> ?x \<in> darcs ?t1.0 \<union> {?e1.0}

goal (1 subgoal):
 1. (darcs t1 \<union> {e1}) \<inter> (darcs t2 \<union> {e2}) = {} \<Longrightarrow> snd ` set (dtree_to_list (Node r {|(t1, e1)|})) \<inter> snd ` set (dtree_to_list (Node r {|(t2, e2)|})) = {}
[PROOF STEP]
by metis


[STATEMENT]
lemma qbs_closed3_dest':
  fixes P::"real \<Rightarrow> nat" and Fi :: "nat \<Rightarrow> real \<Rightarrow> _"
  assumes "P \<in> real_borel \<rightarrow>\<^sub>M nat_borel"
      and "\<And>i. Fi i \<in> qbs_Mx X"
    shows "(\<lambda>r. Fi (P r) r) \<in> qbs_Mx X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>r. Fi (P r) r) \<in> qbs_Mx X
[PROOF STEP]
using qbs_closed3_dest[OF measurable_separate[OF assms(1)] assms(2)]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>r. Fi (?i1 (P r)) r) \<in> qbs_Mx X

goal (1 subgoal):
 1. (\<lambda>r. Fi (P r) r) \<in> qbs_Mx X
[PROOF STEP]
.


[STATEMENT]
lemma nth_coeffs_negacycl:
assumes "j<n"
shows "poly.coeff (of_qr (negacycl_conv f g)) j =
  (\<Sum>i<n. conv_sign ((int j - int i) div int n) * poly.coeff (of_qr f) i *
   poly.coeff (of_qr g) (nat ((int j - int i) mod int n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly.coeff (of_qr (negacycl_conv f g)) j = (\<Sum>i<n. conv_sign ((int j - int i) div int n) * poly.coeff (of_qr f) i * poly.coeff (of_qr g) (nat ((int j - int i) mod int n)))
[PROOF STEP]
unfolding negacycl_conv_def of_qr_to_qr map_upto_n_mod coeff_Poly_eq
 nth_default_map[OF assms]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>ja<n. conv_sign ((int j - int ja) div int n) * poly.coeff (of_qr f) ja * poly.coeff (of_qr g) (nat ((int j - int ja) mod int n))) = (\<Sum>i<n. conv_sign ((int j - int i) div int n) * poly.coeff (of_qr f) i * poly.coeff (of_qr g) (nat ((int j - int i) mod int n)))
[PROOF STEP]
by auto