[STATEMENT]
lemma bij_betw_function_of:
  assumes "bij_betw enum {0..<card A} A"
  shows "bij_betw (function_of A enum) {xs. set xs \<subseteq> B \<and> length xs = card A} (A \<rightarrow>\<^sub>E B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw (function_of A enum) {xs. set xs \<subseteq> B \<and> length xs = card A} (A \<rightarrow>\<^sub>E B)
[PROOF STEP]
proof (rule bij_betw_byWitness[where f'="sequence_of A enum"])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<forall>a\<in>{xs. set xs \<subseteq> B \<and> length xs = card A}. sequence_of A enum (function_of A enum a) = a
 2. \<forall>a'\<in>A \<rightarrow>\<^sub>E B. function_of A enum (sequence_of A enum a') = a'
 3. function_of A enum ` {xs. set xs \<subseteq> B \<and> length xs = card A} \<subseteq> A \<rightarrow>\<^sub>E B
 4. sequence_of A enum ` (A \<rightarrow>\<^sub>E B) \<subseteq> {xs. set xs \<subseteq> B \<and> length xs = card A}
[PROOF STEP]
show "\<forall>f\<in>A \<rightarrow>\<^sub>E B. function_of A enum (sequence_of A enum f) = f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>f\<in>A \<rightarrow>\<^sub>E B. function_of A enum (sequence_of A enum f) = f
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
bij_betw enum {0..<card A} A

goal (1 subgoal):
 1. \<forall>f\<in>A \<rightarrow>\<^sub>E B. function_of A enum (sequence_of A enum f) = f
[PROOF STEP]
by (simp add: function_of_sequence_of)
[PROOF STATE]
proof (state)
this:
\<forall>f\<in>A \<rightarrow>\<^sub>E B. function_of A enum (sequence_of A enum f) = f

goal (3 subgoals):
 1. \<forall>a\<in>{xs. set xs \<subseteq> B \<and> length xs = card A}. sequence_of A enum (function_of A enum a) = a
 2. function_of A enum ` {xs. set xs \<subseteq> B \<and> length xs = card A} \<subseteq> A \<rightarrow>\<^sub>E B
 3. sequence_of A enum ` (A \<rightarrow>\<^sub>E B) \<subseteq> {xs. set xs \<subseteq> B \<and> length xs = card A}
[PROOF STEP]
show "\<forall>xs\<in>{xs. set xs \<subseteq> B \<and> length xs = card A}. sequence_of A enum (function_of A enum xs) = xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>xs\<in>{xs. set xs \<subseteq> B \<and> length xs = card A}. sequence_of A enum (function_of A enum xs) = xs
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
bij_betw enum {0..<card A} A

goal (1 subgoal):
 1. \<forall>xs\<in>{xs. set xs \<subseteq> B \<and> length xs = card A}. sequence_of A enum (function_of A enum xs) = xs
[PROOF STEP]
by (auto simp add: sequence_of_function_of)
[PROOF STATE]
proof (state)
this:
\<forall>xs\<in>{xs. set xs \<subseteq> B \<and> length xs = card A}. sequence_of A enum (function_of A enum xs) = xs

goal (2 subgoals):
 1. function_of A enum ` {xs. set xs \<subseteq> B \<and> length xs = card A} \<subseteq> A \<rightarrow>\<^sub>E B
 2. sequence_of A enum ` (A \<rightarrow>\<^sub>E B) \<subseteq> {xs. set xs \<subseteq> B \<and> length xs = card A}
[PROOF STEP]
show "sequence_of A enum ` (A \<rightarrow>\<^sub>E B) \<subseteq> {xs. set xs \<subseteq> B \<and> length xs = card A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sequence_of A enum ` (A \<rightarrow>\<^sub>E B) \<subseteq> {xs. set xs \<subseteq> B \<and> length xs = card A}
[PROOF STEP]
using assms set_sequence_of[OF assms] length_sequence_of
[PROOF STATE]
proof (prove)
using this:
bij_betw enum {0..<card A} A
?f \<in> A \<rightarrow>\<^sub>E ?B \<Longrightarrow> set (sequence_of A enum ?f) \<subseteq> ?B
\<lbrakk>bij_betw ?enum {0..<card ?A} ?A; ?f \<in> ?A \<rightarrow>\<^sub>E ?B\<rbrakk> \<Longrightarrow> length (sequence_of ?A ?enum ?f) = card ?A

goal (1 subgoal):
 1. sequence_of A enum ` (A \<rightarrow>\<^sub>E B) \<subseteq> {xs. set xs \<subseteq> B \<and> length xs = card A}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
sequence_of A enum ` (A \<rightarrow>\<^sub>E B) \<subseteq> {xs. set xs \<subseteq> B \<and> length xs = card A}

goal (1 subgoal):
 1. function_of A enum ` {xs. set xs \<subseteq> B \<and> length xs = card A} \<subseteq> A \<rightarrow>\<^sub>E B
[PROOF STEP]
show "function_of A enum ` {xs. set xs \<subseteq> B \<and> length xs = card A} \<subseteq> A \<rightarrow>\<^sub>E B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. function_of A enum ` {xs. set xs \<subseteq> B \<and> length xs = card A} \<subseteq> A \<rightarrow>\<^sub>E B
[PROOF STEP]
using assms function_of_in_extensional_funcset
[PROOF STATE]
proof (prove)
using this:
bij_betw enum {0..<card A} A
\<lbrakk>bij_betw ?enum {0..<card ?A} ?A; set ?xs \<subseteq> ?B; length ?xs = card ?A\<rbrakk> \<Longrightarrow> function_of ?A ?enum ?xs \<in> ?A \<rightarrow>\<^sub>E ?B

goal (1 subgoal):
 1. function_of A enum ` {xs. set xs \<subseteq> B \<and> length xs = card A} \<subseteq> A \<rightarrow>\<^sub>E B
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
function_of A enum ` {xs. set xs \<subseteq> B \<and> length xs = card A} \<subseteq> A \<rightarrow>\<^sub>E B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma roots_of_complex_rf_poly: "set (roots_of_complex_rf_poly p) = {x. poly (poly_rf p) x = 0}"
  "distinct (roots_of_complex_rf_poly p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (roots_of_complex_rf_poly p) = {x. poly (poly_rf p) x = 0} &&& distinct (roots_of_complex_rf_poly p)
[PROOF STEP]
unfolding roots_of_complex_rf_poly_def genuine_roots_impl
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {z. poly (gr_poly (roots_of_complex_rf_poly_part1 p)) z = 0} = {x. poly (poly_rf p) x = 0} &&& distinct (genuine_roots_impl (roots_of_complex_rf_poly_part1 p))
[PROOF STEP]
by (transfer, auto simp: genuine_roots_impl)


[STATEMENT]
lemma product_simps:
  "initial_wp (product A B) = (initial_wp A, initial_wp B)"
  "states_wp (product A B) = (states_wp A) \<times> (states_wp B)"
  "inputs_wp (product A B) = inputs_wp A \<union> inputs_wp B"
  "outputs_wp (product A B) = outputs_wp A \<union> outputs_wp B"
  "transitions_wp (product A B) = (image (\<lambda>((qA,x,y,qA'), (qB,x',y',qB')) . ((qA,qB),x,y,(qA',qB'))) (Set.filter (\<lambda>((qA,x,y,qA'), (qB,x',y',qB')) . x = x' \<and> y = y') (\<Union>(image (\<lambda> tA . image (\<lambda> tB . (tA,tB)) (transitions_wp B)) (transitions_wp A)))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (initial_wp (FSM_Code_Datatype.product A B) = (initial_wp A, initial_wp B) &&& states_wp (FSM_Code_Datatype.product A B) = states_wp A \<times> states_wp B) &&& inputs_wp (FSM_Code_Datatype.product A B) = inputs_wp A \<union> inputs_wp B &&& outputs_wp (FSM_Code_Datatype.product A B) = outputs_wp A \<union> outputs_wp B &&& transitions_wp (FSM_Code_Datatype.product A B) = (\<lambda>((qA, x, y, qA'), qB, x', y', qB'). ((qA, qB), x, y, qA', qB')) ` Set.filter (\<lambda>((qA, x, y, qA'), qB, x', y', qB'). x = x' \<and> y = y') (\<Union>tA\<in>transitions_wp A. Pair tA ` transitions_wp B)
[PROOF STEP]
by (transfer; simp)+


[STATEMENT]
theorem Stirling_closed_form:
  "real (Stirling n k) = (\<Sum>j\<le>k. (-1)^(k - j) * real (k choose j) * real j ^ n) / fact k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
have "(fps_exp 1 - 1 :: real fps) = (fps_exp 1 + (-1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_exp 1 - 1 = fps_exp 1 + - 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
fps_exp 1 - 1 = fps_exp 1 + - 1

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
fps_exp 1 - 1 = fps_exp 1 + - 1

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
have "\<dots> ^ k = (\<Sum>j\<le>k. of_nat (k choose j) * fps_exp 1 ^ j * (- 1) ^ (k - j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fps_exp 1 + - 1) ^ k = (\<Sum>j\<le>k. of_nat (k choose j) * fps_exp 1 ^ j * (- 1) ^ (k - j))
[PROOF STEP]
unfolding binomial_ring
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>ka\<le>k. of_nat (k choose ka) * fps_exp 1 ^ ka * (- 1) ^ (k - ka)) = (\<Sum>j\<le>k. of_nat (k choose j) * fps_exp 1 ^ j * (- 1) ^ (k - j))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(fps_exp 1 + - 1) ^ k = (\<Sum>j\<le>k. of_nat (k choose j) * fps_exp 1 ^ j * (- 1) ^ (k - j))

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(fps_exp 1 + - 1) ^ k = (\<Sum>j\<le>k. of_nat (k choose j) * fps_exp 1 ^ j * (- 1) ^ (k - j))

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
have "\<dots> = (\<Sum>j\<le>k. fps_const ((-1) ^ (k - j) * real (k choose j)) * fps_exp (real j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j\<le>k. of_nat (k choose j) * fps_exp 1 ^ j * (- 1) ^ (k - j)) = (\<Sum>j\<le>k. fps_const ((- 1) ^ (k - j) * real (k choose j)) * fps_exp (real j))
[PROOF STEP]
by (simp add: fps_const_mult [symmetric] fps_const_power [symmetric]
                  fps_const_neg [symmetric] mult_ac fps_of_nat fps_exp_power_mult
             del: fps_const_mult fps_const_power fps_const_neg)
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<le>k. of_nat (k choose j) * fps_exp 1 ^ j * (- 1) ^ (k - j)) = (\<Sum>j\<le>k. fps_const ((- 1) ^ (k - j) * real (k choose j)) * fps_exp (real j))

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<le>k. of_nat (k choose j) * fps_exp 1 ^ j * (- 1) ^ (k - j)) = (\<Sum>j\<le>k. fps_const ((- 1) ^ (k - j) * real (k choose j)) * fps_exp (real j))

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
have "\<dots> $ n = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j\<le>k. fps_const ((- 1) ^ (k - j) * real (k choose j)) * fps_exp (real j)) $ n = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact n
[PROOF STEP]
by (simp add: fps_sum_nth sum_divide_distrib)
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<le>k. fps_const ((- 1) ^ (k - j) * real (k choose j)) * fps_exp (real j)) $ n = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact n

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<le>k. fps_const ((- 1) ^ (k - j) * real (k choose j)) * fps_exp (real j)) $ n = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact n

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
have "\<dots> * fact n = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact n * fact n = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact n * fact n = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n)

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact n * fact n = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n)

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
note Stirling_fps_aux[of k n]
[PROOF STATE]
proof (state)
this:
(fps_exp 1 - 1) ^ k $ n * fact n = fact k * real (Stirling n k)

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
fact k * real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
fact k * real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n)

goal (1 subgoal):
 1. real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k
[PROOF STEP]
by (simp add: atLeast0AtMost field_simps)
[PROOF STATE]
proof (state)
this:
real (Stirling n k) = (\<Sum>j\<le>k. (- 1) ^ (k - j) * real (k choose j) * real j ^ n) / fact k

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma multrow_mat_Unit: assumes k: "k < n" and a: "(a :: 'a :: division_ring) \<noteq> 0"
  shows "multrow_mat n k a \<in> Units (ring_mat TYPE('a) n b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multrow_mat n k a \<in> Units (ring_mat TYPE('a) n b)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. multrow_mat n k a \<in> Units (ring_mat TYPE('a) n b)
[PROOF STEP]
from a
[PROOF STATE]
proof (chain)
picking this:
a \<noteq> (0::'a)
[PROOF STEP]
have ia: "inverse a \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a)

goal (1 subgoal):
 1. inverse a \<noteq> (0::'a)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inverse a \<noteq> (0::'a)

goal (1 subgoal):
 1. multrow_mat n k a \<in> Units (ring_mat TYPE('a) n b)
[PROOF STEP]
interpret m: semiring "ring_mat TYPE('a) n b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. semiring (ring_mat TYPE('a) n b)
[PROOF STEP]
by (rule semiring_mat)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. multrow_mat n k a \<in> Units (ring_mat TYPE('a) n b)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multrow_mat n k a \<in> Units (ring_mat TYPE('a) n b)
[PROOF STEP]
unfolding Units_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. multrow_mat n k a \<in> {y \<in> carrier (ring_mat TYPE('a) n b). \<exists>x\<in>carrier (ring_mat TYPE('a) n b). x \<otimes>\<^bsub>ring_mat TYPE('a) n b\<^esub> y = \<one>\<^bsub>ring_mat TYPE('a) n b\<^esub> \<and> y \<otimes>\<^bsub>ring_mat TYPE('a) n b\<^esub> x = \<one>\<^bsub>ring_mat TYPE('a) n b\<^esub>}
[PROOF STEP]
by (rule, rule conjI[OF _ bexI[of _ "multrow_mat n k (inverse a)"]], insert a,
    auto simp: ring_mat_def multrow_mat_inv[OF k],
    rule trans[OF _ multrow_mat_inv[OF k ia]], insert a, auto)
[PROOF STATE]
proof (state)
this:
multrow_mat n k a \<in> Units (ring_mat TYPE('a) n b)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma translation_length_nonneg [simp, mono_intros]:
  "translation_length f \<ge> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> translation_length f
[PROOF STEP]
unfolding translation_length_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> Inf {dist x (f x) |x. True}
[PROOF STEP]
by (rule cInf_greatest, auto)


[STATEMENT]
lemma vfinite_vunion: "vfinite (A \<union>\<^sub>\<circ> B) \<longleftrightarrow> vfinite A \<and> vfinite B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vfinite (A \<union>\<^sub>\<circ> B) = (vfinite A \<and> vfinite B)
[PROOF STEP]
by (auto simp: elts_sup_iff)


[STATEMENT]
theorem final_progress:
    assumes FRUN: "C.is_fair_run s"
    assumes WAIT: "t<N" and "is_WAIT (tts (s i) t)"
    shows "\<exists>j>i. is_HOLD (tts (s j) t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>j>i. is_HOLD (tts (s j) t)
[PROOF STEP]
using FRUN
[PROOF STATE]
proof (prove)
using this:
C.is_fair_run s

goal (1 subgoal):
 1. \<exists>j>i. is_HOLD (tts (s j) t)
[PROOF STEP]
proof (rule sim.xfer_fair_run)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>as. \<lbrakk>A.is_fair_run as; \<forall>i. sim_rel (as i) (s i)\<rbrakk> \<Longrightarrow> \<exists>j>i. is_HOLD (tts (s j) t)
[PROOF STEP]
fix as
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>as. \<lbrakk>A.is_fair_run as; \<forall>i. sim_rel (as i) (s i)\<rbrakk> \<Longrightarrow> \<exists>j>i. is_HOLD (tts (s j) t)
[PROOF STEP]
assume Ra: "A.is_fair_run as"
       and SIM[rule_format]: "\<forall>i. sim_rel (as i) (s i)"
[PROOF STATE]
proof (state)
this:
A.is_fair_run as
sim_rel (as ?i) (s ?i)

goal (1 subgoal):
 1. \<And>as. \<lbrakk>A.is_fair_run as; \<forall>i. sim_rel (as i) (s i)\<rbrakk> \<Longrightarrow> \<exists>j>i. is_HOLD (tts (s j) t)
[PROOF STEP]
note XFER = xfer_init[OF SIM] xfer_holds[OF SIM] xfer_waits[OF SIM]
[PROOF STATE]
proof (state)
this:
(tts (s ?i1) ?t = INIT) = (tts (as ?i1) ?t = INIT)
is_HOLD (tts (s ?i1) ?t) = is_HOLD (tts (as ?i1) ?t)
is_WAIT (tts (s ?i1) ?t) = is_WAIT (tts (as ?i1) ?t)

goal (1 subgoal):
 1. \<And>as. \<lbrakk>A.is_fair_run as; \<forall>i. sim_rel (as i) (s i)\<rbrakk> \<Longrightarrow> \<exists>j>i. is_HOLD (tts (s j) t)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>j>i. is_HOLD (tts (s j) t)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
C.is_fair_run s
t < N
is_WAIT (tts (s i) t)

goal (1 subgoal):
 1. \<exists>j>i. is_HOLD (tts (s j) t)
[PROOF STEP]
apply (simp add: XFER)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>C.is_fair_run s; t < N; is_WAIT (tts (as i) t)\<rbrakk> \<Longrightarrow> \<exists>j>i. is_HOLD (tts (as j) t)
[PROOF STEP]
apply (erule (1) progress[OF Ra])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
\<exists>j>i. is_HOLD (tts (s j) t)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma I_intF:
assumes f: "wtFsym f" and al: "list_all2 I_intT (arOf f) al"
shows "I_intT (resOf f) (I_intF f al)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. I_intT (resOf f) (I_intF f al)
[PROOF STEP]
unfolding I_intT_def I_intF_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infTp (resOf f) \<longrightarrow> intT (resOf f) (intF f (map2 proj (arOf f) al))
[PROOF STEP]
apply safe
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infTp (resOf f) \<Longrightarrow> intT (resOf f) (intF f (map2 proj (arOf f) al))
[PROOF STEP]
apply(rule intF[OF f])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infTp (resOf f) \<Longrightarrow> list_all2 intT (arOf f) (map2 proj (arOf f) al)
[PROOF STEP]
using al
[PROOF STATE]
proof (prove)
using this:
list_all2 I_intT (arOf f) al

goal (1 subgoal):
 1. infTp (resOf f) \<Longrightarrow> list_all2 intT (arOf f) (map2 proj (arOf f) al)
[PROOF STEP]
unfolding list_all2_length
[PROOF STATE]
proof (prove)
using this:
length (arOf f) = length al \<and> (\<forall>i<length (arOf f). I_intT (arOf f ! i) (al ! i))

goal (1 subgoal):
 1. infTp (resOf f) \<Longrightarrow> length (arOf f) = length (map2 proj (arOf f) al) \<and> (\<forall>i<length (arOf f). intT (arOf f ! i) (map2 proj (arOf f) al ! i))
[PROOF STEP]
by auto


[STATEMENT]
lemma Riemann_localization_integral_range_half:
  assumes f: "f absolutely_integrable_on {-pi..pi}"
    and "0 < d" "d \<le> pi"
  shows "(\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * (f x + f(-x)))
            - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * (f x + f(-x)))) \<longlonglongrightarrow> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * (f x + f (- x))) - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * (f x + f (- x)))) \<longlonglongrightarrow> 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * (f x + f (- x))) - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * (f x + f (- x)))) \<longlonglongrightarrow> 0
[PROOF STEP]
have *: "(\<lambda>x. Dirichlet_kernel n x * f x) absolutely_integrable_on {-d..d}" for n
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. Dirichlet_kernel n x * f x) absolutely_integrable_on {- d..d}
[PROOF STEP]
by (metis (full_types) absolutely_integrable_mult_Dirichlet_kernel absolutely_integrable_on_subinterval
              \<open>d \<le> pi\<close> atLeastatMost_subset_iff f neg_le_iff_le)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. Dirichlet_kernel ?n x * f x) absolutely_integrable_on {- d..d}

goal (1 subgoal):
 1. (\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * (f x + f (- x))) - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * (f x + f (- x)))) \<longlonglongrightarrow> 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * (f x + f (- x))) - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * (f x + f (- x)))) \<longlonglongrightarrow> 0
[PROOF STEP]
using absolutely_integrable_mult_Dirichlet_kernel [OF f]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. Dirichlet_kernel ?n x * f x) absolutely_integrable_on {- pi..pi}

goal (1 subgoal):
 1. (\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * (f x + f (- x))) - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * (f x + f (- x)))) \<longlonglongrightarrow> 0
[PROOF STEP]
using Riemann_localization_integral_range [OF assms]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. Dirichlet_kernel ?n x * f x) absolutely_integrable_on {- pi..pi}
(\<lambda>n. (LINT x|lebesgue_on {- pi..pi}. Dirichlet_kernel n x * f x) - (LINT x|lebesgue_on {- d..d}. Dirichlet_kernel n x * f x)) \<longlonglongrightarrow> 0

goal (1 subgoal):
 1. (\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * (f x + f (- x))) - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * (f x + f (- x)))) \<longlonglongrightarrow> 0
[PROOF STEP]
apply (simp add: "*" absolutely_integrable_imp_integrable integral_reflect_and_add)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>n. (\<lambda>x. Dirichlet_kernel n x * f x) absolutely_integrable_on {- pi..pi}; (\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * f x + Dirichlet_kernel n x * f (- x)) - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * f x + Dirichlet_kernel n x * f (- x))) \<longlonglongrightarrow> 0\<rbrakk> \<Longrightarrow> (\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * (f x + f (- x))) - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * (f x + f (- x)))) \<longlonglongrightarrow> 0
[PROOF STEP]
apply (simp add: algebra_simps)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
(\<lambda>n. (LINT x|lebesgue_on {0..pi}. Dirichlet_kernel n x * (f x + f (- x))) - (LINT x|lebesgue_on {0..d}. Dirichlet_kernel n x * (f x + f (- x)))) \<longlonglongrightarrow> 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma topcontinuous_at_atin:
   "topcontinuous_at X Y f x \<longleftrightarrow>
        x \<in> topspace X \<and>
        (\<forall>x \<in> topspace X. f x \<in> topspace Y) \<and>
        limitin Y f (f x) (atin X x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. topcontinuous_at X Y f x = (x \<in> topspace X \<and> (\<forall>x\<in>topspace X. f x \<in> topspace Y) \<and> limitin Y f (f x) (atin X x))
[PROOF STEP]
unfolding topcontinuous_at_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> topspace X \<and> (\<forall>x\<in>topspace X. f x \<in> topspace Y) \<and> (\<forall>V. openin Y V \<and> f x \<in> V \<longrightarrow> (\<exists>U. openin X U \<and> x \<in> U \<and> (\<forall>y\<in>U. f y \<in> V)))) = (x \<in> topspace X \<and> (\<forall>x\<in>topspace X. f x \<in> topspace Y) \<and> limitin Y f (f x) (atin X x))
[PROOF STEP]
by (fastforce simp add: limitin_atin)+


[STATEMENT]
lemma dom_1: "d (x \<cdot> y) \<le> d x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
have "d (x \<cdot> y) = d (d x \<cdot> d (x \<cdot> y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d (x \<cdot> y) = d (d x \<cdot> d (x \<cdot> y))
[PROOF STEP]
by (metis dns1 dns2 mult_assoc)
[PROOF STATE]
proof (state)
this:
d (x \<cdot> y) = d (d x \<cdot> d (x \<cdot> y))

goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d (x \<cdot> y) = d (d x \<cdot> d (x \<cdot> y))

goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
have "... \<le> d (d x) + d (d x \<cdot> d (x \<cdot> y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d (d x \<cdot> d (x \<cdot> y)) \<le> d (d x) + d (d x \<cdot> d (x \<cdot> y))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
d (d x \<cdot> d (x \<cdot> y)) \<le> d (d x) + d (d x \<cdot> d (x \<cdot> y))

goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d (d x \<cdot> d (x \<cdot> y)) \<le> d (d x) + d (d x \<cdot> d (x \<cdot> y))

goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
have "... = d (d x + d x \<cdot> d (x \<cdot> y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d (d x) + d (d x \<cdot> d (x \<cdot> y)) = d (d x + d x \<cdot> d (x \<cdot> y))
[PROOF STEP]
using dns3
[PROOF STATE]
proof (prove)
using this:
d (?x + ?y) = d ?x + d ?y

goal (1 subgoal):
 1. d (d x) + d (d x \<cdot> d (x \<cdot> y)) = d (d x + d x \<cdot> d (x \<cdot> y))
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
d (d x) + d (d x \<cdot> d (x \<cdot> y)) = d (d x + d x \<cdot> d (x \<cdot> y))

goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
d (d x) + d (d x \<cdot> d (x \<cdot> y)) = d (d x + d x \<cdot> d (x \<cdot> y))

goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
have "... = d (d x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d (d x + d x \<cdot> d (x \<cdot> y)) = d (d x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
d (d x + d x \<cdot> d (x \<cdot> y)) = d (d x)

goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
d (x \<cdot> y) \<le> d (d x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
d (x \<cdot> y) \<le> d (d x)

goal (1 subgoal):
 1. d (x \<cdot> y) \<le> d x
[PROOF STEP]
by (metis dom_add_closed add_idem')
[PROOF STATE]
proof (state)
this:
d (x \<cdot> y) \<le> d x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma LIMSEQ_lessThan_iff_atMost:
  shows "(\<lambda>n. f {..<n}) \<longlonglongrightarrow> x \<longleftrightarrow> (\<lambda>n. f {..n}) \<longlonglongrightarrow> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. f {..<n}) \<longlonglongrightarrow> x = (\<lambda>n. f {..n}) \<longlonglongrightarrow> x
[PROOF STEP]
apply (subst filterlim_sequentially_Suc [symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f {..<Suc x}) \<longlonglongrightarrow> x = (\<lambda>n. f {..n}) \<longlonglongrightarrow> x
[PROOF STEP]
apply (simp only: lessThan_Suc_atMost)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma truncate_down_shift_int:
  "truncate_down p (x * 2 powr real_of_int k) = truncate_down p x * 2 powr k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. truncate_down p (x * 2 powr real_of_int k) = truncate_down p x * 2 powr real_of_int k
[PROOF STEP]
by (cases "x = 0")
    (simp_all add: algebra_simps abs_mult log_mult truncate_down_def
      round_down_shift[of _ _ k, simplified])


[STATEMENT]
lemma field_differentiable_diff[derivative_intros]:
  "(f has_field_derivative f') F \<Longrightarrow>
    (g has_field_derivative g') F \<Longrightarrow> ((\<lambda>z. f z - g z) has_field_derivative f' - g') F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(f has_field_derivative f') F; (g has_field_derivative g') F\<rbrakk> \<Longrightarrow> ((\<lambda>z. f z - g z) has_field_derivative f' - g') F
[PROOF STEP]
by (simp only: diff_conv_add_uminus field_differentiable_add field_differentiable_minus)


[STATEMENT]
lemma mapp_2_mapp: "mapp_2 (\<lambda>t a. f t) 0 p = Poly_Mapping.mapp f p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mapp_2 (\<lambda>t a. f t) 0 p = Poly_Mapping.mapp f p
[PROOF STEP]
by (rule poly_mapping_eqI, simp add: lookup_mapp lookup_mapp_2)


[STATEMENT]
lemma mssnth_ln_series_stream:
  "mssnth ln_series_stream n = (-1) ^ Suc n / real n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mssnth ln_series_stream n = (- 1) ^ Suc n / real n
[PROOF STEP]
unfolding ln_series_stream_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mssnth (MSSCons 0 (ln_series_stream_aux False 1)) n = (- 1) ^ Suc n / real n
[PROOF STEP]
by (cases n) (simp_all add: mssnth_ln_series_stream_aux field_simps)


[STATEMENT]
lemma size_mset [simp]: "size (mset xs) = length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size (mset xs) = length xs
[PROOF STEP]
by (induct xs) simp_all


[STATEMENT]
lemma ideal_points_proportional:
  assumes "is_poincare_line H" "ideal_points H = {i1, i2}" "to_complex i1 = cor k * to_complex i2"
  shows "0\<^sub>h \<in> circline_set H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
have "i1 \<noteq> i2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i1 \<noteq> i2
[PROOF STEP]
using \<open>ideal_points H = {i1, i2}\<close>
[PROOF STATE]
proof (prove)
using this:
ideal_points H = {i1, i2}

goal (1 subgoal):
 1. i1 \<noteq> i2
[PROOF STEP]
using \<open>is_poincare_line H\<close> ex_poincare_line_points ideal_points_different(1)
[PROOF STATE]
proof (prove)
using this:
ideal_points H = {i1, i2}
is_poincare_line H
is_poincare_line ?H \<Longrightarrow> \<exists>u v. u \<in> unit_disc \<and> v \<in> unit_disc \<and> u \<noteq> v \<and> ?H = poincare_line u v
\<lbrakk>?u \<in> unit_disc; ?v \<in> unit_disc; ?u \<noteq> ?v; ideal_points (poincare_line ?u ?v) = {?i1.0, ?i2.0}\<rbrakk> \<Longrightarrow> ?i1.0 \<noteq> ?i2.0

goal (1 subgoal):
 1. i1 \<noteq> i2
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
i1 \<noteq> i2

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
have "i1 \<in> circline_set unit_circle" "i2 \<in> circline_set unit_circle"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i1 \<in> circline_set unit_circle &&& i2 \<in> circline_set unit_circle
[PROOF STEP]
using assms calc_ideal_points_on_unit_circle ideal_points_unique
[PROOF STATE]
proof (prove)
using this:
is_poincare_line H
ideal_points H = {i1, i2}
to_complex i1 = cor k * to_complex i2
\<forall>z\<in>calc_ideal_points ?H. z \<in> circline_set unit_circle
is_poincare_line ?H \<Longrightarrow> ideal_points ?H = calc_ideal_points ?H

goal (1 subgoal):
 1. i1 \<in> circline_set unit_circle &&& i2 \<in> circline_set unit_circle
[PROOF STEP]
by blast+
[PROOF STATE]
proof (state)
this:
i1 \<in> circline_set unit_circle
i2 \<in> circline_set unit_circle

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
hence "cmod (cor k) = 1"
[PROOF STATE]
proof (prove)
using this:
i1 \<in> circline_set unit_circle
i2 \<in> circline_set unit_circle

goal (1 subgoal):
 1. cmod (cor k) = 1
[PROOF STEP]
using \<open>to_complex i1 = cor k * to_complex i2\<close>
[PROOF STATE]
proof (prove)
using this:
i1 \<in> circline_set unit_circle
i2 \<in> circline_set unit_circle
to_complex i1 = cor k * to_complex i2

goal (1 subgoal):
 1. cmod (cor k) = 1
[PROOF STEP]
by (metis (mono_tags, lifting) circline_set_unit_circle imageE mem_Collect_eq mult.right_neutral norm_mult to_complex_of_complex unit_circle_set_def)
[PROOF STATE]
proof (state)
this:
cmod (cor k) = 1

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
hence "k = -1"
[PROOF STATE]
proof (prove)
using this:
cmod (cor k) = 1

goal (1 subgoal):
 1. k = - 1
[PROOF STEP]
using \<open>to_complex i1 = cor k * to_complex i2\<close> \<open>i1 \<noteq> i2\<close>
[PROOF STATE]
proof (prove)
using this:
cmod (cor k) = 1
to_complex i1 = cor k * to_complex i2
i1 \<noteq> i2

goal (1 subgoal):
 1. k = - 1
[PROOF STEP]
using \<open>i1 \<in> circline_set unit_circle\<close> \<open>i2 \<in> circline_set unit_circle\<close>
[PROOF STATE]
proof (prove)
using this:
cmod (cor k) = 1
to_complex i1 = cor k * to_complex i2
i1 \<noteq> i2
i1 \<in> circline_set unit_circle
i2 \<in> circline_set unit_circle

goal (1 subgoal):
 1. k = - 1
[PROOF STEP]
by (smt (verit, best) mult_cancel_right1 norm_of_real not_inf_on_unit_circle'' of_complex_to_complex of_real_1)
[PROOF STATE]
proof (state)
this:
k = - 1

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
have "\<forall> i1 \<in> calc_ideal_points H. \<forall> i2 \<in> calc_ideal_points H. is_poincare_line H \<and> i1 \<noteq> i2 \<and> to_complex i1 = - to_complex i2 \<longrightarrow>
           0\<^sub>h \<in> circline_set H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i1\<in>calc_ideal_points H. \<forall>i2\<in>calc_ideal_points H. is_poincare_line H \<and> i1 \<noteq> i2 \<and> to_complex i1 = - to_complex i2 \<longrightarrow> 0\<^sub>h \<in> circline_set H
[PROOF STEP]
unfolding circline_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i1\<in>calc_ideal_points H. \<forall>i2\<in>calc_ideal_points H. is_poincare_line H \<and> i1 \<noteq> i2 \<and> to_complex i1 = - to_complex i2 \<longrightarrow> 0\<^sub>h \<in> Collect (on_circline H)
[PROOF STEP]
proof (simp, transfer, transfer, safe)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
fix A B C D i11 i12 i21 i22 k
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
assume H:"hermitean (A, B, C, D)" "(A, B, C, D) \<noteq> mat_zero"
[PROOF STATE]
proof (state)
this:
hermitean (A, B, C, D)
(A, B, C, D) \<noteq> mat_zero

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
assume line: "is_poincare_line_cmat (A, B, C, D)"
[PROOF STATE]
proof (state)
this:
is_poincare_line_cmat (A, B, C, D)

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
assume i1: "(i11, i12) \<in> calc_ideal_points_cmat_cvec (A, B, C, D)"
[PROOF STATE]
proof (state)
this:
(i11, i12) \<in> calc_ideal_points_cmat_cvec (A, B, C, D)

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
assume i2:"(i21, i22) \<in> calc_ideal_points_cmat_cvec (A, B, C, D)"
[PROOF STATE]
proof (state)
this:
(i21, i22) \<in> calc_ideal_points_cmat_cvec (A, B, C, D)

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
assume "\<not> (i11, i12) \<approx>\<^sub>v (i21, i22)"
[PROOF STATE]
proof (state)
this:
\<not> (i11, i12) \<approx>\<^sub>v (i21, i22)

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
assume opposite: "to_complex_cvec (i11, i12) = - to_complex_cvec (i21, i22)"
[PROOF STATE]
proof (state)
this:
to_complex_cvec (i11, i12) = - to_complex_cvec (i21, i22)

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
let ?discr =  "sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
let ?den = "(cmod B)\<^sup>2"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
let ?i1 = "B * (- D - \<i> * ?discr)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
let ?i2 = "B * (- D + \<i> * ?discr)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
have "i11 = ?i1 \<or> i11 = ?i2" "i12 = ?den"
      "i21 = ?i1 \<or> i21 = ?i2" "i22 = ?den"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (i11 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i11 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) &&& i12 = cor ((cmod B)\<^sup>2)) &&& i21 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i21 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) &&& i22 = cor ((cmod B)\<^sup>2)
[PROOF STEP]
using i1 i2 H line
[PROOF STATE]
proof (prove)
using this:
(i11, i12) \<in> calc_ideal_points_cmat_cvec (A, B, C, D)
(i21, i22) \<in> calc_ideal_points_cmat_cvec (A, B, C, D)
hermitean (A, B, C, D)
(A, B, C, D) \<noteq> mat_zero
is_poincare_line_cmat (A, B, C, D)

goal (1 subgoal):
 1. (i11 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i11 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) &&& i12 = cor ((cmod B)\<^sup>2)) &&& i21 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i21 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) &&& i22 = cor ((cmod B)\<^sup>2)
[PROOF STEP]
by (auto split: if_split_asm)
[PROOF STATE]
proof (state)
this:
i11 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i11 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))
i12 = cor ((cmod B)\<^sup>2)
i21 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i21 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))
i22 = cor ((cmod B)\<^sup>2)

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
hence i: "i11 = ?i1 \<and> i21 = ?i2 \<or> i11 = ?i2 \<and> i21 = ?i1"
[PROOF STATE]
proof (prove)
using this:
i11 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i11 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))
i12 = cor ((cmod B)\<^sup>2)
i21 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i21 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))
i22 = cor ((cmod B)\<^sup>2)

goal (1 subgoal):
 1. i11 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<and> i21 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i11 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<and> i21 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))
[PROOF STEP]
using \<open>\<not> (i11, i12) \<approx>\<^sub>v (i21, i22)\<close>
[PROOF STATE]
proof (prove)
using this:
i11 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i11 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))
i12 = cor ((cmod B)\<^sup>2)
i21 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i21 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))
i22 = cor ((cmod B)\<^sup>2)
\<not> (i11, i12) \<approx>\<^sub>v (i21, i22)

goal (1 subgoal):
 1. i11 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<and> i21 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i11 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<and> i21 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i11 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<and> i21 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i11 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<and> i21 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
have "?den \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (cmod B)\<^sup>2 \<noteq> 0
[PROOF STEP]
using line
[PROOF STATE]
proof (prove)
using this:
is_poincare_line_cmat (A, B, C, D)

goal (1 subgoal):
 1. (cmod B)\<^sup>2 \<noteq> 0
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(cmod B)\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
hence "i11 = - i21"
[PROOF STATE]
proof (prove)
using this:
(cmod B)\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. i11 = - i21
[PROOF STEP]
using opposite \<open>i12 = ?den\<close> \<open>i22 = ?den\<close>
[PROOF STATE]
proof (prove)
using this:
(cmod B)\<^sup>2 \<noteq> 0
to_complex_cvec (i11, i12) = - to_complex_cvec (i21, i22)
i12 = cor ((cmod B)\<^sup>2)
i22 = cor ((cmod B)\<^sup>2)

goal (1 subgoal):
 1. i11 = - i21
[PROOF STEP]
by (simp add: nonzero_neg_divide_eq_eq2)
[PROOF STATE]
proof (state)
this:
i11 = - i21

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
hence "?i1 = - ?i2"
[PROOF STATE]
proof (prove)
using this:
i11 = - i21

goal (1 subgoal):
 1. B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) = - (B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))))
[PROOF STEP]
using i
[PROOF STATE]
proof (prove)
using this:
i11 = - i21
i11 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<and> i21 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<or> i11 = B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) \<and> i21 = B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2)))

goal (1 subgoal):
 1. B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) = - (B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))))
[PROOF STEP]
by (metis add.inverse_inverse)
[PROOF STATE]
proof (state)
this:
B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) = - (B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))))

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
hence "D = 0"
[PROOF STATE]
proof (prove)
using this:
B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) = - (B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))))

goal (1 subgoal):
 1. D = 0
[PROOF STEP]
using \<open>?den \<noteq> 0\<close>
[PROOF STATE]
proof (prove)
using this:
B * (- D - \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))) = - (B * (- D + \<i> * cor (sqrt ((cmod B)\<^sup>2 - (Re D)\<^sup>2))))
(cmod B)\<^sup>2 \<noteq> 0

goal (1 subgoal):
 1. D = 0
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
D = 0

goal (1 subgoal):
 1. \<And>a aa ab b ac ba ad bb. \<lbrakk>hermitean (a, aa, ab, b); (a, aa, ab, b) \<noteq> mat_zero; is_poincare_line_cmat (a, aa, ab, b); (ac, ba) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); (ad, bb) \<in> calc_ideal_points_cmat_cvec (a, aa, ab, b); \<not> (ac, ba) \<approx>\<^sub>v (ad, bb); to_complex_cvec (ac, ba) = - to_complex_cvec (ad, bb)\<rbrakk> \<Longrightarrow> on_circline_cmat_cvec (a, aa, ab, b) 0\<^sub>v
[PROOF STEP]
thus "on_circline_cmat_cvec (A, B, C, D) 0\<^sub>v"
[PROOF STATE]
proof (prove)
using this:
D = 0

goal (1 subgoal):
 1. on_circline_cmat_cvec (A, B, C, D) 0\<^sub>v
[PROOF STEP]
by (simp add: vec_cnj_def)
[PROOF STATE]
proof (state)
this:
on_circline_cmat_cvec (A, B, C, D) 0\<^sub>v

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>i1\<in>calc_ideal_points H. \<forall>i2\<in>calc_ideal_points H. is_poincare_line H \<and> i1 \<noteq> i2 \<and> to_complex i1 = - to_complex i2 \<longrightarrow> 0\<^sub>h \<in> circline_set H

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
\<forall>i1\<in>calc_ideal_points H. \<forall>i2\<in>calc_ideal_points H. is_poincare_line H \<and> i1 \<noteq> i2 \<and> to_complex i1 = - to_complex i2 \<longrightarrow> 0\<^sub>h \<in> circline_set H

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
using assms \<open>k = -1\<close>
[PROOF STATE]
proof (prove)
using this:
\<forall>i1\<in>calc_ideal_points H. \<forall>i2\<in>calc_ideal_points H. is_poincare_line H \<and> i1 \<noteq> i2 \<and> to_complex i1 = - to_complex i2 \<longrightarrow> 0\<^sub>h \<in> circline_set H
is_poincare_line H
ideal_points H = {i1, i2}
to_complex i1 = cor k * to_complex i2
k = - 1

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
using calc_ideal_points_different ideal_points_unique
[PROOF STATE]
proof (prove)
using this:
\<forall>i1\<in>calc_ideal_points H. \<forall>i2\<in>calc_ideal_points H. is_poincare_line H \<and> i1 \<noteq> i2 \<and> to_complex i1 = - to_complex i2 \<longrightarrow> 0\<^sub>h \<in> circline_set H
is_poincare_line H
ideal_points H = {i1, i2}
to_complex i1 = cor k * to_complex i2
k = - 1
is_poincare_line ?H \<Longrightarrow> \<exists>i1\<in>calc_ideal_points ?H. \<exists>i2\<in>calc_ideal_points ?H. i1 \<noteq> i2
is_poincare_line ?H \<Longrightarrow> ideal_points ?H = calc_ideal_points ?H

goal (1 subgoal):
 1. 0\<^sub>h \<in> circline_set H
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
0\<^sub>h \<in> circline_set H

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in linorder) map_iterator_linord_dom_filter_correct :
  assumes it_OK: "map_iterator_linord it m"
  shows "set_iterator_linord (map_iterator_dom_filter P it) {k. \<exists>v. m k = Some v \<and> P (k, v)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set_iterator_linord (map_iterator_dom_filter P it) {k. \<exists>v. m k = Some v \<and> P (k, v)}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
map_iterator_linord it m

goal (1 subgoal):
 1. set_iterator_linord (map_iterator_dom_filter P it) {k. \<exists>v. m k = Some v \<and> P (k, v)}
[PROOF STEP]
unfolding set_iterator_map_linord_def set_iterator_linord_def
[PROOF STATE]
proof (prove)
using this:
map_iterator_genord it m (\<lambda>(k, uu_) (k', uu_). k \<le> k')

goal (1 subgoal):
 1. set_iterator_genord (map_iterator_dom_filter P it) {k. \<exists>v. m k = Some v \<and> P (k, v)} (\<le>)
[PROOF STEP]
apply (rule_tac map_iterator_genord_dom_filter_correct
  [where R = "\<lambda>(k,_) (k',_). k\<le>k'"])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. map_iterator_genord it m (\<lambda>(k, uu_) (k', uu_). k \<le> k') \<Longrightarrow> map_iterator_genord it m (\<lambda>(k, uu_) (k', uu_). k \<le> k')
 2. \<And>k1 v1 k2 v2. \<lbrakk>map_iterator_genord it m (\<lambda>(k, uu_) (k', uu_). k \<le> k'); m k1 = Some v1; P (k1, v1); m k2 = Some v2; P (k2, v2); (case (k1, v1) of (k, uu_) \<Rightarrow> \<lambda>(k', uu_). k \<le> k') (k2, v2)\<rbrakk> \<Longrightarrow> k1 \<le> k2
[PROOF STEP]
apply (simp_all add: set_iterator_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma ordinal_exp_assoc:
"(x ** y) ** z = x ** (y * z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x ** y) ** z = x ** (y * z)
[PROOF STEP]
apply (case_tac "x = 0", simp_all)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> (x ** y) ** z = x ** (y * z)
[PROOF STEP]
apply (rule_tac a=z in oLimit_induct, simp_all add: ordinal_exp_distrib)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma edges_split_loop_inter_empty: "{} = {e \<in> E . is_loop e } \<inter> {e \<in> E . is_sedge e}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {} = {e \<in> E. is_loop e} \<inter> {e \<in> E. is_sedge e}
[PROOF STEP]
unfolding is_loop_def is_sedge_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {} = {e \<in> E. card e = 1} \<inter> {e \<in> E. card e = 2}
[PROOF STEP]
by auto


[STATEMENT]
lemma (in domain) degree_one_associatedI:
  assumes "subfield K R" and "p \<in> carrier (K[X])" and "degree p = 1"
  shows "p \<sim>\<^bsub>K[X]\<^esub> [ \<one>, inv (lead_coeff p) \<otimes> (const_term p) ]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<sim>\<^bsub>K [X]\<^esub> [\<one>, inv lead_coeff p \<otimes> const_term p]
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. p \<sim>\<^bsub>K [X]\<^esub> [\<one>, inv lead_coeff p \<otimes> const_term p]
[PROOF STEP]
from \<open>p \<in> carrier (K[X])\<close> and \<open>degree p = 1\<close>
[PROOF STATE]
proof (chain)
picking this:
p \<in> carrier (K [X])
degree p = 1
[PROOF STEP]
obtain a b where "p = [ a, b ]" and "a \<in> K" "a \<noteq> \<zero>" and "b \<in> K"
[PROOF STATE]
proof (prove)
using this:
p \<in> carrier (K [X])
degree p = 1

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>p = [a, b]; a \<in> K; a \<noteq> \<zero>; b \<in> K\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p = [a, b]
a \<in> K
a \<noteq> \<zero>
b \<in> K

goal (1 subgoal):
 1. p \<sim>\<^bsub>K [X]\<^esub> [\<one>, inv lead_coeff p \<otimes> const_term p]
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
p = [a, b]
a \<in> K
a \<noteq> \<zero>
b \<in> K

goal (1 subgoal):
 1. p \<sim>\<^bsub>K [X]\<^esub> [\<one>, inv lead_coeff p \<otimes> const_term p]
[PROOF STEP]
using subring_degree_one_associatedI[OF subfieldE(1)[OF assms(1)]]
          subfield_m_inv[OF assms(1)] subsetD[OF subfieldE(3)[OF assms(1)]]
[PROOF STATE]
proof (prove)
using this:
p = [a, b]
a \<in> K
a \<noteq> \<zero>
b \<in> K
\<lbrakk>?a \<in> K; ?a' \<in> K; ?b \<in> K; ?a \<otimes> ?a' = \<one>\<rbrakk> \<Longrightarrow> [?a, ?b] \<sim>\<^bsub>K [X]\<^esub> [\<one>, ?a' \<otimes> ?b]
?k \<in> K - {\<zero>} \<Longrightarrow> inv ?k \<in> K - {\<zero>}
?k \<in> K - {\<zero>} \<Longrightarrow> ?k \<otimes> inv ?k = \<one>
?k \<in> K - {\<zero>} \<Longrightarrow> inv ?k \<otimes> ?k = \<one>
?c \<in> K \<Longrightarrow> ?c \<in> carrier R

goal (1 subgoal):
 1. p \<sim>\<^bsub>K [X]\<^esub> [\<one>, inv lead_coeff p \<otimes> const_term p]
[PROOF STEP]
unfolding const_term_def
[PROOF STATE]
proof (prove)
using this:
p = [a, b]
a \<in> K
a \<noteq> \<zero>
b \<in> K
\<lbrakk>?a \<in> K; ?a' \<in> K; ?b \<in> K; ?a \<otimes> ?a' = \<one>\<rbrakk> \<Longrightarrow> [?a, ?b] \<sim>\<^bsub>K [X]\<^esub> [\<one>, ?a' \<otimes> ?b]
?k \<in> K - {\<zero>} \<Longrightarrow> inv ?k \<in> K - {\<zero>}
?k \<in> K - {\<zero>} \<Longrightarrow> ?k \<otimes> inv ?k = \<one>
?k \<in> K - {\<zero>} \<Longrightarrow> inv ?k \<otimes> ?k = \<one>
?c \<in> K \<Longrightarrow> ?c \<in> carrier R

goal (1 subgoal):
 1. p \<sim>\<^bsub>K [X]\<^esub> [\<one>, inv lead_coeff p \<otimes> local.eval p \<zero>]
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
p \<sim>\<^bsub>K [X]\<^esub> [\<one>, inv lead_coeff p \<otimes> const_term p]

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mdeg_img_le':
  assumes "\<forall>(t,e) \<in> fset xs. max_deg (f t) \<le> max_deg t"
  shows "max_deg (Node r ((\<lambda>(t,e). (f t, e)) |`| xs)) \<le> max_deg (Node r xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. max_deg (Node r ((\<lambda>(t, e). (f t, e)) |`| xs)) \<le> max_deg (Node r xs)
[PROOF STEP]
using mdeg_img_le[of xs "\<lambda>(t,e). (f t, e)"] assms
[PROOF STATE]
proof (prove)
using this:
\<forall>(t, e)\<in>fset xs. max_deg (fst (case (t, e) of (t, e) \<Rightarrow> (f t, e))) \<le> max_deg t \<Longrightarrow> max_deg (Node ?r ((\<lambda>(t, e). (f t, e)) |`| xs)) \<le> max_deg (Node ?r xs)
\<forall>(t, e)\<in>fset xs. max_deg (f t) \<le> max_deg t

goal (1 subgoal):
 1. max_deg (Node r ((\<lambda>(t, e). (f t, e)) |`| xs)) \<le> max_deg (Node r xs)
[PROOF STEP]
by simp


[STATEMENT]
lemma iWeakSince_iSince_conv: "(P t'. t' \<B> t I. Q t) = ((P t'. t' \<S> t I. Q t) \<or> (\<box> t I. P t))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P t'. t' \<B> t I. Q t) = ((P t'. t' \<S> t I. Q t) \<or> (\<box> t I. P t))
[PROOF STEP]
unfolding iWeakSince_def iSince_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<box> t I. P t) \<or> (\<diamond> t I. Q t \<and> (\<box> t' I \<down>> t. P t'))) = ((\<diamond> t I. Q t \<and> (\<box> t' I \<down>> t. P t')) \<or> (\<box> t I. P t))
[PROOF STEP]
by blast


[STATEMENT]
lemma Red_F_limit_Sup: "chain (\<rhd>) Ns \<Longrightarrow> Red_F (Liminf_llist Ns) = Red_F (Sup_llist Ns)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. chain (\<rhd>) Ns \<Longrightarrow> Red_F (Liminf_llist Ns) = Red_F (Sup_llist Ns)
[PROOF STEP]
by (metis Liminf_llist_subset_Sup_llist Red_F_of_Red_F_subset Red_F_of_subset Red_in_Sup
      double_diff order_refl subset_antisym)


[STATEMENT]
lemma nat_induct01Suc[case_names 0 1 Suc]:
  assumes "P 0"
      and "P 1"
      and "\<And>n. n > 0 \<Longrightarrow> P n \<Longrightarrow> P (Suc n)"
    shows "P n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P n
[PROOF STEP]
by (metis One_nat_def assms nat_induct neq0_conv)


[STATEMENT]
lemma continuous_on_add_ennreal:
  fixes f g :: "'a::topological_space \<Rightarrow> ennreal"
  shows "continuous_on A f \<Longrightarrow> continuous_on A g \<Longrightarrow> continuous_on A (\<lambda>x. f x + g x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_on A f; continuous_on A g\<rbrakk> \<Longrightarrow> continuous_on A (\<lambda>x. f x + g x)
[PROOF STEP]
by (transfer fixing: A) (auto intro!: tendsto_add_ereal_nonneg simp: continuous_on_def)


[STATEMENT]
lemma sym_sum_inter_num:
  assumes "b1 \<in># \<B>"
  shows "(\<Sum>b2 \<in>#(\<B> - {#b1#}). b1 |\<inter>| b2) = \<k>* (\<r> - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
have "(\<Sum>b2 \<in>#(\<B> - {#b1#}). b1 |\<inter>| b2) = (\<Sum>b2 \<in>#(\<B> - {#b1#}). size (mset_set (b1 \<inter> b2)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = (\<Sum>b2\<in>#remove1_mset b1 \<B>. size (mset_set (b1 \<inter> b2)))
[PROOF STEP]
by (simp add: intersection_number_def)
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = (\<Sum>b2\<in>#remove1_mset b1 \<B>. size (mset_set (b1 \<inter> b2)))

goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = (\<Sum>b2\<in>#remove1_mset b1 \<B>. size (mset_set (b1 \<inter> b2)))

goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
have "... = size (\<Sum>\<^sub>#{#mset_set (b1 \<inter> bl). bl \<in># (\<B> - {#b1#})#})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>b2\<in>#remove1_mset b1 \<B>. size (mset_set (b1 \<inter> b2))) = size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (b1 \<inter> bl))
[PROOF STEP]
by (auto simp add: size_big_union_sum)
[PROOF STATE]
proof (state)
this:
(\<Sum>b2\<in>#remove1_mset b1 \<B>. size (mset_set (b1 \<inter> b2))) = size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (b1 \<inter> bl))

goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>b2\<in>#remove1_mset b1 \<B>. size (mset_set (b1 \<inter> b2))) = size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (b1 \<inter> bl))

goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
have "... =  size (\<Sum>\<^sub>#{#mset_set (bl \<inter> b1). bl \<in># (\<B> - {#b1#})#})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (b1 \<inter> bl)) = size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (bl \<inter> b1))
[PROOF STEP]
by (metis Int_commute)
[PROOF STATE]
proof (state)
this:
size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (b1 \<inter> bl)) = size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (bl \<inter> b1))

goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (bl \<inter> b1))
[PROOF STEP]
have "(\<Sum>b2 \<in>#(\<B> - {#b1#}). b1 |\<inter>| b2) = \<k> * (\<r> - 1)"
[PROOF STATE]
proof (prove)
using this:
\<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (bl \<inter> b1))

goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
using sym_sum_mset_inter_sets_size assms
[PROOF STATE]
proof (prove)
using this:
\<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = size (\<Sum>bl\<in>#remove1_mset b1 \<B>. mset_set (bl \<inter> b1))
?blv \<in># \<B> \<Longrightarrow> size (\<Sum>bl\<in>#remove1_mset ?blv \<B>. mset_set (bl \<inter> ?blv)) = \<k> * (\<r> - 1)
b1 \<in># \<B>

goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)

goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)

goal (1 subgoal):
 1. \<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<Sum>\<^sub># (image_mset ((|\<inter>|) b1) (remove1_mset b1 \<B>)) = \<k> * (\<r> - 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma LIMSEQ_lessThan_iff_atMost:
  shows "(\<lambda>n. f {..<n}) \<longlonglongrightarrow> x \<longleftrightarrow> (\<lambda>n. f {..n}) \<longlonglongrightarrow> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>n. f {..<n}) \<longlonglongrightarrow> x = (\<lambda>n. f {..n}) \<longlonglongrightarrow> x
[PROOF STEP]
apply (subst filterlim_sequentially_Suc [symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f {..<Suc x}) \<longlonglongrightarrow> x = (\<lambda>n. f {..n}) \<longlonglongrightarrow> x
[PROOF STEP]
apply (simp only: lessThan_Suc_atMost)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma finite_k[simp, intro!]: "finite k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite k
[PROOF STEP]
using cut_ss_V finite_V finite_subset[of k V]
[PROOF STATE]
proof (prove)
using this:
k \<subseteq> V
finite V
\<lbrakk>k \<subseteq> V; finite V\<rbrakk> \<Longrightarrow> finite k

goal (1 subgoal):
 1. finite k
[PROOF STEP]
by blast


[STATEMENT]
lemma mat_of_cblinfun_scaleR:
  "mat_of_cblinfun ((a::real) *\<^sub>R F) = (complex_of_real a) \<cdot>\<^sub>m (mat_of_cblinfun F)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_of_cblinfun (a *\<^sub>R F) = complex_of_real a \<cdot>\<^sub>m mat_of_cblinfun F
[PROOF STEP]
unfolding scaleR_scaleC
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mat_of_cblinfun (complex_of_real a *\<^sub>C F) = complex_of_real a \<cdot>\<^sub>m mat_of_cblinfun F
[PROOF STEP]
by (rule mat_of_cblinfun_scaleC)


[STATEMENT]
lemma less_vecI: assumes "v \<in> carrier_vec n" "w \<in> carrier_vec n"
  "\<And> i. i < n \<Longrightarrow> v $ i < w $ i"
shows "v <\<^sub>v w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v <\<^sub>v w
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
v \<in> carrier_vec n
w \<in> carrier_vec n
?i < n \<Longrightarrow> v $ ?i < w $ ?i

goal (1 subgoal):
 1. v <\<^sub>v w
[PROOF STEP]
unfolding less_vec_def
[PROOF STATE]
proof (prove)
using this:
v \<in> carrier_vec n
w \<in> carrier_vec n
?i < n \<Longrightarrow> v $ ?i < w $ ?i

goal (1 subgoal):
 1. dim_vec v = dim_vec w \<and> (\<forall>i<dim_vec w. v $ i < w $ i)
[PROOF STEP]
by auto


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


[STATEMENT]
lemma abs_real_alg: "abs (real_of x) = real_of (abs x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>real_of x\<bar> = real_of \<bar>x\<bar>
[PROOF STEP]
unfolding abs_real_alg_def abs_real_def if_distrib
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. if real_of x < 0 then (if real_of x < 0 then (=) (- real_of x) else (=) (real_of x)) (real_of (- x)) else (if real_of x < 0 then (=) (- real_of x) else (=) (real_of x)) (real_of x)
[PROOF STEP]
by (auto simp: uminus_real_alg)


[STATEMENT]
lemma extensional_funcset_def: "extensional_funcset S T = (S \<rightarrow> T) \<inter> extensional S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. S \<rightarrow>\<^sub>E T = (S \<rightarrow> T) \<inter> extensional S
[PROOF STEP]
by (simp add: PiE_def)


[STATEMENT]
lemma not_integrable_integral_eq: "\<not> integrable M f \<Longrightarrow> integral\<^sup>L M f = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> integrable M f \<Longrightarrow> integral\<^sup>L M f = (0::'b)
[PROOF STEP]
unfolding integrable.simps lebesgue_integral_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Ex (has_bochner_integral M f) \<Longrightarrow> (if Ex (has_bochner_integral M f) then The (has_bochner_integral M f) else (0::'b)) = (0::'b)
[PROOF STEP]
by (auto intro!: arg_cong[where f=The])


[STATEMENT]
lemma uconnectedV_mono: " (a,b)\<in>uconnectedV F \<Longrightarrow> F\<subseteq>F' \<Longrightarrow> (a,b)\<in>uconnectedV F'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(a, b) \<in> Restr (uconnected F) verts; F \<subseteq> F'\<rbrakk> \<Longrightarrow> (a, b) \<in> Restr (uconnected F') verts
[PROOF STEP]
unfolding uconnected_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(a, b) \<in> Restr {(u, v). \<exists>p. epath F u p v} verts; F \<subseteq> F'\<rbrakk> \<Longrightarrow> (a, b) \<in> Restr {(u, v). \<exists>p. epath F' u p v} verts
[PROOF STEP]
by (auto intro: epath_mono)


[STATEMENT]
lemma field_differentiable_diff[derivative_intros]:
  "(f has_field_derivative f') F \<Longrightarrow>
    (g has_field_derivative g') F \<Longrightarrow> ((\<lambda>z. f z - g z) has_field_derivative f' - g') F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(f has_field_derivative f') F; (g has_field_derivative g') F\<rbrakk> \<Longrightarrow> ((\<lambda>z. f z - g z) has_field_derivative f' - g') F
[PROOF STEP]
by (simp only: diff_conv_add_uminus field_differentiable_add field_differentiable_minus)


[STATEMENT]
lemma distinct_map_ran: "distinct (map fst al) \<Longrightarrow> distinct (map fst (map_ran f al))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (map fst al) \<Longrightarrow> distinct (map fst (map_ran f al))
[PROOF STEP]
by (induct al) (auto simp add: dom_map_ran)


[STATEMENT]
lemma sq_mtx_mult_diagr: "A * (\<d>\<i>\<a>\<g> i. f i) = to_mtx (\<chi> i j. A $$ i $ j * f j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A * (\<d>\<i>\<a>\<g> i. f i) = to_mtx (\<chi>i j. A $$ i $ j * f j)
[PROOF STEP]
by transfer (simp add: matrix_matrix_mul_diag_matr)


[STATEMENT]
lemma tl_drop_2: "tl (drop n xs) = drop (Suc n) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tl (drop n xs) = drop (Suc n) xs
[PROOF STEP]
by (simp add: drop_Suc tl_drop)


[STATEMENT]
lemma (in abelian_group_hom) hom_add [simp]:
  "[| x \<in> carrier G; y \<in> carrier G |]
        ==> h (x \<oplus>\<^bsub>G\<^esub> y) = h x \<oplus>\<^bsub>H\<^esub> h y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> carrier G; y \<in> carrier G\<rbrakk> \<Longrightarrow> h (x \<oplus> y) = h x \<oplus>\<^bsub>H\<^esub> h y
[PROOF STEP]
by (rule group_hom.hom_mult[OF a_group_hom,
    simplified ring_record_simps])


[STATEMENT]
lemma fiter_qiter1: "Abs_iso (fiter_fun (Rep_iso f) (Rep_iso g) (Rep_iso h)) = qiter_fun f g h"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs_iso (fiter_fun (Rep_iso f) (Rep_iso g) (Rep_iso h)) = qiter_fun f g h
[PROOF STEP]
unfolding fiter_fun_def qiter_fun_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs_iso (((\<sqinter>) (Rep_iso f) \<circ> (\<circ>) (Rep_iso g)) (Rep_iso h)) = ((\<squnion>) f \<circ> (\<cdot>) g) h
[PROOF STEP]
by (metis Rep_iso_inverse comp_def sup_iso.rep_eq times_iso.rep_eq)


[STATEMENT]
lemma measure_pair_spmf_times:
  "measure (measure_spmf (pair_spmf p q)) (A \<times> B) = measure (measure_spmf p) A * measure (measure_spmf q) B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
have "emeasure (measure_spmf (pair_spmf p q)) (A \<times> B) = (\<integral>\<^sup>+ x. ennreal (spmf (pair_spmf p q) x) * indicator (A \<times> B) x \<partial>count_space UNIV)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. emeasure (measure_spmf (pair_spmf p q)) (A \<times> B) = \<integral>\<^sup>+x\<in>A \<times> B. ennreal (spmf (pair_spmf p q) x)\<partial>count_space UNIV
[PROOF STEP]
by(simp add: nn_integral_spmf[symmetric] nn_integral_count_space_indicator)
[PROOF STATE]
proof (state)
this:
emeasure (measure_spmf (pair_spmf p q)) (A \<times> B) = \<integral>\<^sup>+x\<in>A \<times> B. ennreal (spmf (pair_spmf p q) x)\<partial>count_space UNIV

goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
emeasure (measure_spmf (pair_spmf p q)) (A \<times> B) = \<integral>\<^sup>+x\<in>A \<times> B. ennreal (spmf (pair_spmf p q) x)\<partial>count_space UNIV

goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
have "\<dots> = (\<integral>\<^sup>+ x. (\<integral>\<^sup>+ y. (ennreal (spmf p x) * indicator A x) * (ennreal (spmf q y) * indicator B y) \<partial>count_space UNIV) \<partial>count_space UNIV)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+x\<in>A \<times> B. ennreal (spmf (pair_spmf p q) x)\<partial>count_space UNIV = (\<Sum>\<^sup>+ x. \<Sum>\<^sup>+ y. ennreal (spmf p x) * indicator A x * (ennreal (spmf q y) * indicator B y))
[PROOF STEP]
by(subst nn_integral_fst_count_space[symmetric])(auto intro!: nn_integral_cong split: split_indicator simp add: ennreal_mult)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+x\<in>A \<times> B. ennreal (spmf (pair_spmf p q) x)\<partial>count_space UNIV = (\<Sum>\<^sup>+ x. \<Sum>\<^sup>+ y. ennreal (spmf p x) * indicator A x * (ennreal (spmf q y) * indicator B y))

goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+x\<in>A \<times> B. ennreal (spmf (pair_spmf p q) x)\<partial>count_space UNIV = (\<Sum>\<^sup>+ x. \<Sum>\<^sup>+ y. ennreal (spmf p x) * indicator A x * (ennreal (spmf q y) * indicator B y))

goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
have "\<dots> = (\<integral>\<^sup>+ x. ennreal (spmf p x) * indicator A x * emeasure (measure_spmf q) B \<partial>count_space UNIV)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ x. \<Sum>\<^sup>+ y. ennreal (spmf p x) * indicator A x * (ennreal (spmf q y) * indicator B y)) = (\<Sum>\<^sup>+ x. ennreal (spmf p x) * indicator A x * emeasure (measure_spmf q) B)
[PROOF STEP]
by(simp add: nn_integral_cmult nn_integral_spmf[symmetric] nn_integral_count_space_indicator)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sup>+ x. \<Sum>\<^sup>+ y. ennreal (spmf p x) * indicator A x * (ennreal (spmf q y) * indicator B y)) = (\<Sum>\<^sup>+ x. ennreal (spmf p x) * indicator A x * emeasure (measure_spmf q) B)

goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sup>+ x. \<Sum>\<^sup>+ y. ennreal (spmf p x) * indicator A x * (ennreal (spmf q y) * indicator B y)) = (\<Sum>\<^sup>+ x. ennreal (spmf p x) * indicator A x * emeasure (measure_spmf q) B)

goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
have "\<dots> = emeasure (measure_spmf p) A * emeasure (measure_spmf q) B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>\<^sup>+ x. ennreal (spmf p x) * indicator A x * emeasure (measure_spmf q) B) = emeasure (measure_spmf p) A * emeasure (measure_spmf q) B
[PROOF STEP]
by(simp add: nn_integral_multc)(simp add: nn_integral_spmf[symmetric] nn_integral_count_space_indicator)
[PROOF STATE]
proof (state)
this:
(\<Sum>\<^sup>+ x. ennreal (spmf p x) * indicator A x * emeasure (measure_spmf q) B) = emeasure (measure_spmf p) A * emeasure (measure_spmf q) B

goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
emeasure (measure_spmf (pair_spmf p q)) (A \<times> B) = emeasure (measure_spmf p) A * emeasure (measure_spmf q) B
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
emeasure (measure_spmf (pair_spmf p q)) (A \<times> B) = emeasure (measure_spmf p) A * emeasure (measure_spmf q) B

goal (1 subgoal):
 1. Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B
[PROOF STEP]
by(simp add: measure_spmf.emeasure_eq_measure ennreal_mult[symmetric])
[PROOF STATE]
proof (state)
this:
Sigma_Algebra.measure (measure_spmf (pair_spmf p q)) (A \<times> B) = Sigma_Algebra.measure (measure_spmf p) A * Sigma_Algebra.measure (measure_spmf q) B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eint_uminus_eq:
"(a::eint) + (-a) = a - a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a + - a = a - a
[PROOF STEP]
apply(induction a)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>int. eint int + - eint int = eint int - eint int
 2. \<infinity> + - \<infinity> = \<infinity> - \<infinity>
[PROOF STEP]
apply (simp add: uminus_eint_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<infinity> + - \<infinity> = \<infinity> - \<infinity>
[PROOF STEP]
by simp


[STATEMENT]
lemma locally_path_connected_imp_locally_connected:
  "locally path_connected S \<Longrightarrow> locally connected S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally path_connected S \<Longrightarrow> locally connected S
[PROOF STEP]
using locally_mono path_connected_imp_connected
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>locally ?P ?S; \<And>T. ?P T \<Longrightarrow> ?Q T\<rbrakk> \<Longrightarrow> locally ?Q ?S
path_connected ?S \<Longrightarrow> connected ?S

goal (1 subgoal):
 1. locally path_connected S \<Longrightarrow> locally connected S
[PROOF STEP]
by blast


[STATEMENT]
lemma monic_dvdm_constant:
  assumes uk: "u dvdm [:k:]"
  and u1: "monic u" and u2: "degree u > 0"
  shows "k mod m = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k mod m = 0
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. k mod m = 0
[PROOF STEP]
have d1: "degree_m [:k:] = degree [:k:]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degree_m [:k:] = degree [:k:]
[PROOF STEP]
by (metis degree_pCons_0 le_zero_eq poly_mod.degree_m_le)
[PROOF STATE]
proof (state)
this:
degree_m [:k:] = degree [:k:]

goal (1 subgoal):
 1. k mod m = 0
[PROOF STEP]
obtain h where h: "Mp [:k:] = Mp (u * h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>h. [:k:] =m u * h \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using uk
[PROOF STATE]
proof (prove)
using this:
u dvdm [:k:]

goal (1 subgoal):
 1. (\<And>h. [:k:] =m u * h \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
unfolding dvdm_def
[PROOF STATE]
proof (prove)
using this:
\<exists>h. [:k:] =m u * h

goal (1 subgoal):
 1. (\<And>h. [:k:] =m u * h \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
[:k:] =m u * h

goal (1 subgoal):
 1. k mod m = 0
[PROOF STEP]
have d2: "degree_m [:k:] = degree_m (u*h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degree_m [:k:] = degree_m (u * h)
[PROOF STEP]
using h
[PROOF STATE]
proof (prove)
using this:
[:k:] =m u * h

goal (1 subgoal):
 1. degree_m [:k:] = degree_m (u * h)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
degree_m [:k:] = degree_m (u * h)

goal (1 subgoal):
 1. k mod m = 0
[PROOF STEP]
have d3: "degree (map_poly M (u * map_poly M h)) = degree (u * map_poly M h)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degree (map_poly M (u * map_poly M h)) = degree (u * map_poly M h)
[PROOF STEP]
by (rule degree_map_poly)
       (metis coeff_degree_mult leading_coeff_0_iff mult.right_neutral M_M Mp_coeff Mp_def u1)
[PROOF STATE]
proof (state)
this:
degree (map_poly M (u * map_poly M h)) = degree (u * map_poly M h)

goal (1 subgoal):
 1. k mod m = 0
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
degree (map_poly M (u * map_poly M h)) = degree (u * map_poly M h)

goal (1 subgoal):
 1. k mod m = 0
[PROOF STEP]
using assms d1 d2 d3
[PROOF STATE]
proof (prove)
using this:
degree (map_poly M (u * map_poly M h)) = degree (u * map_poly M h)
u dvdm [:k:]
monic u
0 < degree u
degree_m [:k:] = degree [:k:]
degree_m [:k:] = degree_m (u * h)
degree (map_poly M (u * map_poly M h)) = degree (u * map_poly M h)

goal (1 subgoal):
 1. k mod m = 0
[PROOF STEP]
by (auto, metis M_def map_poly_pCons degree_mult_right_le h leD map_poly_0
        mult_poly_0_right pCons_eq_0_iff M_0 Mp_def mult_Mp(2))
[PROOF STATE]
proof (state)
this:
k mod m = 0

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma smooth_on_cong:
  assumes "k-smooth_on S g" "open S"
    and "\<And>x. x \<in> S \<Longrightarrow> f x = g x"
  shows "k-smooth_on S f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k-smooth_on S f
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
k-smooth_on S g
open S
?x \<in> S \<Longrightarrow> f ?x = g ?x

goal (1 subgoal):
 1. k-smooth_on S f
[PROOF STEP]
unfolding smooth_on_def
[PROOF STATE]
proof (prove)
using this:
\<forall>n. enat n \<le> k \<longrightarrow> higher_differentiable_on S g n
open S
?x \<in> S \<Longrightarrow> f ?x = g ?x

goal (1 subgoal):
 1. \<forall>n. enat n \<le> k \<longrightarrow> higher_differentiable_on S f n
[PROOF STEP]
by (auto cong: higher_differentiable_on_cong)


[STATEMENT]
lemma vfunI:
    assumes "f \<in> elts A \<rightarrow> elts B"
    shows "vfun A B (VLambda A f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. vfun A B (VLambda A f)
[PROOF STEP]
proof (unfold vfun_def, intro conjI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. VLambda A f \<in> elts (VPow (vtimes A B))
 2. elts A = Domain (pairs (VLambda A f))
 3. single_valued (pairs (VLambda A f))
[PROOF STEP]
show "VLambda A f \<in> elts (VPow (vtimes A B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. VLambda A f \<in> elts (VPow (vtimes A B))
[PROOF STEP]
using assms VLambda_def
[PROOF STATE]
proof (prove)
using this:
f \<in> elts A \<rightarrow> elts B
VLambda ?A ?b \<equiv> ZFC_in_HOL.set ((\<lambda>x. \<langle>x, ?b x\<rangle>) ` elts ?A)

goal (1 subgoal):
 1. VLambda A f \<in> elts (VPow (vtimes A B))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
VLambda A f \<in> elts (VPow (vtimes A B))

goal (2 subgoals):
 1. elts A = Domain (pairs (VLambda A f))
 2. single_valued (pairs (VLambda A f))
[PROOF STEP]
show "elts A = Domain (pairs (VLambda A f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. elts A = Domain (pairs (VLambda A f))
[PROOF STEP]
using assms VLambda_def [of A f]
[PROOF STATE]
proof (prove)
using this:
f \<in> elts A \<rightarrow> elts B
VLambda A f \<equiv> ZFC_in_HOL.set ((\<lambda>x. \<langle>x, f x\<rangle>) ` elts A)

goal (1 subgoal):
 1. elts A = Domain (pairs (VLambda A f))
[PROOF STEP]
by (metis Domain_fst fst_pairs_VLambda)
[PROOF STATE]
proof (state)
this:
elts A = Domain (pairs (VLambda A f))

goal (1 subgoal):
 1. single_valued (pairs (VLambda A f))
[PROOF STEP]
show "single_valued (pairs (VLambda A f))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. single_valued (pairs (VLambda A f))
[PROOF STEP]
using assms VLambda_def single_valued_def pairs_iff_elts
[PROOF STATE]
proof (prove)
using this:
f \<in> elts A \<rightarrow> elts B
VLambda ?A ?b \<equiv> ZFC_in_HOL.set ((\<lambda>x. \<langle>x, ?b x\<rangle>) ` elts ?A)
single_valued ?r = (\<forall>x y. (x, y) \<in> ?r \<longrightarrow> (\<forall>z. (x, z) \<in> ?r \<longrightarrow> y = z))
((?x, ?y) \<in> pairs ?z) = (\<langle>?x, ?y\<rangle> \<in> elts ?z)

goal (1 subgoal):
 1. single_valued (pairs (VLambda A f))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
single_valued (pairs (VLambda A f))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma len_lexext_trans_strong:
  "(\<forall>z \<in> set zs. \<forall>y \<in> set ys. \<forall>x \<in> set xs. gt z y \<longrightarrow> gt y x \<longrightarrow> gt z x) \<Longrightarrow> len_lexext gt zs ys \<Longrightarrow>
   len_lexext gt ys xs \<Longrightarrow> len_lexext gt zs xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>z\<in>set zs. \<forall>y\<in>set ys. \<forall>x\<in>set xs. gt z y \<longrightarrow> gt y x \<longrightarrow> gt z x; len_lexext gt zs ys; len_lexext gt ys xs\<rbrakk> \<Longrightarrow> len_lexext gt zs xs
[PROOF STEP]
by (rule lenext_trans[OF lexext_trans_strong])


[STATEMENT]
lemma of_complex_of_real_eq [simp]: "of_complex (of_real n) = of_real n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. of_complex (complex_of_real n) = of_real n
[PROOF STEP]
unfolding of_complex_def of_real_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (n *\<^sub>R 1) *\<^sub>C (1::'a) = n *\<^sub>R (1::'a)
[PROOF STEP]
unfolding scaleR_scaleC
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (complex_of_real n *\<^sub>C 1) *\<^sub>C (1::'a) = complex_of_real n *\<^sub>C (1::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma divide_cancel_left:
  assumes "f1 \<in> \<Theta>[F](g1)" and "eventually (\<lambda>x. g1 x \<noteq> 0) F"
  shows   "(\<lambda>x. f1 x / f2 x) \<in> L F (\<lambda>x. g1 x / g2 x) \<longleftrightarrow>
             (\<lambda>x. inverse (f2 x)) \<in> L F (\<lambda>x. inverse (g2 x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f1 x / f2 x) \<in> L F (\<lambda>x. g1 x / g2 x)) = ((\<lambda>x. inverse (f2 x)) \<in> L F (\<lambda>x. inverse (g2 x)))
[PROOF STEP]
by (simp only: divide_inverse mult_cancel_left[OF assms])


[STATEMENT]
lemma connected_punctured_convex:
  shows "\<lbrakk>convex S; aff_dim S \<noteq> 1\<rbrakk> \<Longrightarrow> connected(S - {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>convex S; aff_dim S \<noteq> 1\<rbrakk> \<Longrightarrow> connected (S - {a})
[PROOF STEP]
using path_connected_imp_connected path_connected_punctured_convex
[PROOF STATE]
proof (prove)
using this:
path_connected ?S \<Longrightarrow> connected ?S
\<lbrakk>convex ?S; aff_dim ?S \<noteq> 1\<rbrakk> \<Longrightarrow> path_connected (?S - {?a})

goal (1 subgoal):
 1. \<lbrakk>convex S; aff_dim S \<noteq> 1\<rbrakk> \<Longrightarrow> connected (S - {a})
[PROOF STEP]
by blast


[STATEMENT]
lemma lb_exp: "exp x \<le> y \<Longrightarrow> lb_exp prec x \<le> y"
  and ub_exp: "y \<le> exp x \<Longrightarrow> y \<le> ub_exp prec x"
  for x::float and y::real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (exp (real_of_float x) \<le> y \<Longrightarrow> real_of_float (lb_exp prec x) \<le> y) &&& (y \<le> exp (real_of_float x) \<Longrightarrow> y \<le> real_of_float (ub_exp prec x))
[PROOF STEP]
using exp_boundaries[of x prec]
[PROOF STATE]
proof (prove)
using this:
exp (real_of_float x) \<in> {real_of_float (lb_exp prec x)..real_of_float (ub_exp prec x)}

goal (1 subgoal):
 1. (exp (real_of_float x) \<le> y \<Longrightarrow> real_of_float (lb_exp prec x) \<le> y) &&& (y \<le> exp (real_of_float x) \<Longrightarrow> y \<le> real_of_float (ub_exp prec x))
[PROOF STEP]
by auto


[STATEMENT]
lemma interval_integral_Ioi:
  "\<bar>a\<bar> < \<infinity> \<Longrightarrow> (LBINT x=a..\<infinity>. f x) = (LBINT x : {real_of_ereal a <..}. f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>a\<bar> < \<infinity> \<Longrightarrow> interval_lebesgue_integral lborel a \<infinity> f = set_lebesgue_integral lborel {real_of_ereal a<..} f
[PROOF STEP]
by (auto simp: interval_lebesgue_integral_def einterval_iff)


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma point_abscissa_add [simp]:
  "abscissa (A + B) = abscissa A + abscissa B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. abscissa (A + B) = abscissa A + abscissa B
[PROOF STEP]
by (simp add: point_add_def)