[STATEMENT]
lemma span_finite_subset:
  assumes "p \<in> span B"
  obtains A where "finite A" and "A \<subseteq> B" and "p \<in> span A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>A. \<lbrakk>finite A; A \<subseteq> B; p \<in> span A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>A. \<lbrakk>finite A; A \<subseteq> B; p \<in> span A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
p \<in> span B
[PROOF STEP]
obtain A q where "finite A" and "A \<subseteq> B" and p: "p = (\<Sum>a\<in>A. q a *s a)"
[PROOF STATE]
proof (prove)
using this:
p \<in> span B

goal (1 subgoal):
 1. (\<And>A q. \<lbrakk>finite A; A \<subseteq> B; p = (\<Sum>a\<in>A. q a *s a)\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (rule spanE)
[PROOF STATE]
proof (state)
this:
finite A
A \<subseteq> B
p = (\<Sum>a\<in>A. q a *s a)

goal (1 subgoal):
 1. (\<And>A. \<lbrakk>finite A; A \<subseteq> B; p \<in> span A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
note this(1, 2)
[PROOF STATE]
proof (state)
this:
finite A
A \<subseteq> B

goal (1 subgoal):
 1. (\<And>A. \<lbrakk>finite A; A \<subseteq> B; p \<in> span A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
finite A
A \<subseteq> B

goal (1 subgoal):
 1. (\<And>A. \<lbrakk>finite A; A \<subseteq> B; p \<in> span A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "p \<in> span A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<in> span A
[PROOF STEP]
unfolding p
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>a\<in>A. q a *s a) \<in> span A
[PROOF STEP]
by (rule sum_in_spanI)
[PROOF STATE]
proof (state)
this:
p \<in> span A

goal (1 subgoal):
 1. (\<And>A. \<lbrakk>finite A; A \<subseteq> B; p \<in> span A\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
finite A
A \<subseteq> B
p \<in> span A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite A
A \<subseteq> B
p \<in> span A

goal (1 subgoal):
 1. thesis
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma snoc_eq_iff_butlast:
  "xs @ [x] = ys \<longleftrightarrow> (ys \<noteq> [] \<and> butlast ys = xs \<and> last ys = x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (xs @ [x] = ys) = (ys \<noteq> [] \<and> butlast ys = xs \<and> last ys = x)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma bounded_pbernpoly: obtains c where "\<And>x. norm (pbernpoly n x) \<le> c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>c. (\<And>x. norm (pbernpoly n x) \<le> c) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<And>c. (\<And>x. norm (pbernpoly n x) \<le> c) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "\<exists>x\<in>{0..1}. \<forall>y\<in>{0..1}. norm (bernpoly n y :: real) \<le> norm (bernpoly n x :: real)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x\<in>{0..1}. \<forall>y\<in>{0..1}. norm (bernpoly n y) \<le> norm (bernpoly n x)
[PROOF STEP]
by (intro continuous_attains_sup) (auto intro!: continuous_intros)
[PROOF STATE]
proof (state)
this:
\<exists>x\<in>{0..1}. \<forall>y\<in>{0..1}. norm (bernpoly n y) \<le> norm (bernpoly n x)

goal (1 subgoal):
 1. (\<And>c. (\<And>x. norm (pbernpoly n x) \<le> c) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>x\<in>{0..1}. \<forall>y\<in>{0..1}. norm (bernpoly n y) \<le> norm (bernpoly n x)
[PROOF STEP]
obtain x where x:
    "\<And>y. y \<in> {0..1} \<Longrightarrow> norm (bernpoly n y :: real) \<le> norm (bernpoly n x :: real)"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<in>{0..1}. \<forall>y\<in>{0..1}. norm (bernpoly n y) \<le> norm (bernpoly n x)

goal (1 subgoal):
 1. (\<And>x. (\<And>y. y \<in> {0..1} \<Longrightarrow> norm (bernpoly n y) \<le> norm (bernpoly n x)) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
?y \<in> {0..1} \<Longrightarrow> norm (bernpoly n ?y) \<le> norm (bernpoly n x)

goal (1 subgoal):
 1. (\<And>c. (\<And>x. norm (pbernpoly n x) \<le> c) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
have "norm (pbernpoly n y) \<le> norm (bernpoly n x :: real)" for y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (pbernpoly n y) \<le> norm (bernpoly n x)
[PROOF STEP]
unfolding pbernpoly_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. norm (bernpoly n (frac y)) \<le> norm (bernpoly n x)
[PROOF STEP]
using frac_lt_1[of y]
[PROOF STATE]
proof (prove)
using this:
frac y < 1

goal (1 subgoal):
 1. norm (bernpoly n (frac y)) \<le> norm (bernpoly n x)
[PROOF STEP]
by (intro x) simp_all
[PROOF STATE]
proof (state)
this:
norm (pbernpoly n ?y) \<le> norm (bernpoly n x)

goal (1 subgoal):
 1. (\<And>c. (\<And>x. norm (pbernpoly n x) \<le> c) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
norm (pbernpoly n ?y) \<le> norm (bernpoly n x)

goal (1 subgoal):
 1. thesis
[PROOF STEP]
by (rule that)
[PROOF STATE]
proof (state)
this:
thesis

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_diff_non_empty_not_subset:
  assumes "A \<subseteq> (B - C)"
  assumes "C \<noteq> {}"
  assumes "A \<noteq> {}"
  assumes "B \<noteq> {}"
  shows " \<not> (A \<subseteq> C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> A \<subseteq> C
[PROOF STEP]
proof (rule ccontr)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> \<not> A \<subseteq> C \<Longrightarrow> False
[PROOF STEP]
assume " \<not> \<not> (A \<subseteq> C)"
[PROOF STATE]
proof (state)
this:
\<not> \<not> A \<subseteq> C

goal (1 subgoal):
 1. \<not> \<not> A \<subseteq> C \<Longrightarrow> False
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> \<not> A \<subseteq> C
[PROOF STEP]
have a: "\<And> x . x \<in> A \<Longrightarrow> x \<in> C"
[PROOF STATE]
proof (prove)
using this:
\<not> \<not> A \<subseteq> C

goal (1 subgoal):
 1. \<And>x. x \<in> A \<Longrightarrow> x \<in> C
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
?x \<in> A \<Longrightarrow> ?x \<in> C

goal (1 subgoal):
 1. \<not> \<not> A \<subseteq> C \<Longrightarrow> False
[PROOF STEP]
thus False
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> ?x \<in> C

goal (1 subgoal):
 1. False
[PROOF STEP]
using a assms
[PROOF STATE]
proof (prove)
using this:
?x \<in> A \<Longrightarrow> ?x \<in> C
?x \<in> A \<Longrightarrow> ?x \<in> C
A \<subseteq> B - C
C \<noteq> {}
A \<noteq> {}
B \<noteq> {}

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma univalentD [dest]: "univalent R \<Longrightarrow> (x,y)\<in> R \<Longrightarrow> (x,z)\<in> R \<Longrightarrow> z = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>univalent R; (x, y) \<in> R; (x, z) \<in> R\<rbrakk> \<Longrightarrow> z = y
[PROOF STEP]
unfolding univalent_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x y z. (x, y) \<in> R \<and> (x, z) \<in> R \<longrightarrow> z = y; (x, y) \<in> R; (x, z) \<in> R\<rbrakk> \<Longrightarrow> z = y
[PROOF STEP]
by auto


[STATEMENT]
lemma test_comp: "test p \<Longrightarrow> \<exists>q. test q \<and> p + q = 1 \<and> p \<cdot> q = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. test p \<Longrightarrow> \<exists>q. test q \<and> p + q = (1::'a) \<and> p \<cdot> q = (0::'a)
[PROOF STEP]
using test_add_comp test_comp_closed test_comp_mult2
[PROOF STATE]
proof (prove)
using this:
test ?p \<Longrightarrow> ?p + !?p = (1::'a)
test ?p \<Longrightarrow> test (!?p)
test ?p \<Longrightarrow> ?p \<cdot> !?p = (0::'a)

goal (1 subgoal):
 1. test p \<Longrightarrow> \<exists>q. test q \<and> p + q = (1::'a) \<and> p \<cdot> q = (0::'a)
[PROOF STEP]
by blast


[STATEMENT]
lemma limit_ordinalI:
"\<lbrakk>0 < z; \<forall>x<z. oSuc x < z\<rbrakk> \<Longrightarrow> limit_ordinal z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < z; \<forall>x<z. oSuc x < z\<rbrakk> \<Longrightarrow> limit_ordinal z
[PROOF STEP]
apply (erule contrapos_pp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x<z. oSuc x < z; \<not> limit_ordinal z\<rbrakk> \<Longrightarrow> \<not> 0 < z
[PROOF STEP]
apply (unfold limit_ordinal_def, clarsimp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>y. \<lbrakk>\<forall>x<oSuc y. x < y; z = oSuc y\<rbrakk> \<Longrightarrow> False
[PROOF STEP]
apply (drule_tac x=y in spec, clarsimp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma del_UnEdge_frame[intro]:
  "x\<in>edges g \<Longrightarrow> x\<noteq>(v,e,v') \<Longrightarrow>x\<noteq>(v',e,v) \<Longrightarrow> x\<in>edges (del_unEdge v e v' g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> edges g; x \<noteq> (v, e, v'); x \<noteq> (v', e, v)\<rbrakk> \<Longrightarrow> x \<in> edges (del_unEdge v e v' g)
[PROOF STEP]
unfolding del_unEdge_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<in> edges g; x \<noteq> (v, e, v'); x \<noteq> (v', e, v)\<rbrakk> \<Longrightarrow> x \<in> edges \<lparr>nodes = nodes g, edges = edges g - {(v, e, v'), (v', e, v)}\<rparr>
[PROOF STEP]
by auto


[STATEMENT]
lemma idiff_iless_mono: "\<lbrakk> m < (n::enat); l \<le> m \<rbrakk> \<Longrightarrow> m - l < n - l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>m < n; l \<le> m\<rbrakk> \<Longrightarrow> m - l < n - l
[PROOF STEP]
by (case_tac m, case_tac n, case_tac l, simp_all, case_tac l, simp_all)


[STATEMENT]
lemma lift_01_mat_distinct_cols: "distinct (cols M) \<Longrightarrow> distinct (cols (lift_01_mat M))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (cols M) \<Longrightarrow> distinct (cols (lift_01_mat M))
[PROOF STEP]
using of_injective_lim.mat_cols_hom_lim_distinct_iff lift_01_mat_def
[PROOF STATE]
proof (prove)
using this:
elements_mat ?M \<subseteq> {0::?'a, 1::?'a} \<Longrightarrow> distinct (cols ?M) = distinct (map (map_vec of_zero_neq_one) (cols ?M))
lift_01_mat ?M \<equiv> map_mat of_zero_neq_one ?M

goal (1 subgoal):
 1. distinct (cols M) \<Longrightarrow> distinct (cols (lift_01_mat M))
[PROOF STEP]
by (metis elems01 map_vec_mat_cols)


[STATEMENT]
lemma Card_iff_initial: "Card \<kappa> \<longleftrightarrow> Ord \<kappa> \<and> (\<forall>\<alpha>. Ord \<alpha> \<and> \<alpha> < \<kappa> \<longrightarrow> ~ elts \<alpha> \<approx> elts \<kappa>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Card \<kappa> = (Ord \<kappa> \<and> (\<forall>\<alpha>. Ord \<alpha> \<and> \<alpha> < \<kappa> \<longrightarrow> \<not> elts \<alpha> \<approx> elts \<kappa>))
[PROOF STEP]
by (metis CardI Card_def Card_is_Ord not_less_Ord_Least vcard_def)


[STATEMENT]
lemma proj_psi_mat:
  "proj_psi = mat N N (\<lambda>k. 1 / N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. proj_psi = mat N N (\<lambda>x. complex_of_real (1 / real N))
[PROOF STEP]
unfolding proj_psi_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. outer_prod \<psi> \<psi> = mat N N (\<lambda>x. complex_of_real (1 / real N))
[PROOF STEP]
apply (rule eq_matI, simp_all)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < N; j < N\<rbrakk> \<Longrightarrow> outer_prod \<psi> \<psi> $$ (i, j) = 1 / of_nat N
 2. dim_row (outer_prod \<psi> \<psi>) = N
 3. dim_col (outer_prod \<psi> \<psi>) = N
[PROOF STEP]
apply (simp add: \<psi>_def index_outer_prod)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>i j. \<lbrakk>i < N; j < N\<rbrakk> \<Longrightarrow> complex_of_real (sqrt (real N)) * complex_of_real (sqrt (real N)) = of_nat N
 2. dim_row (outer_prod \<psi> \<psi>) = N
 3. dim_col (outer_prod \<psi> \<psi>) = N
[PROOF STEP]
apply (smt of_nat_less_0_iff of_real_of_nat_eq of_real_power power2_eq_square real_sqrt_pow2)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. dim_row (outer_prod \<psi> \<psi>) = N
 2. dim_col (outer_prod \<psi> \<psi>) = N
[PROOF STEP]
by (auto simp add: carrier_matD[OF outer_prod_dim[OF \<psi>_dim(1) \<psi>_dim(1)]])


[STATEMENT]
lemma ni_star_induct:
  "ni(x * y) \<le> ni(y) \<Longrightarrow> ni(x\<^sup>\<star> * y) \<le> ni(y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ni (x * y) \<le> ni y \<Longrightarrow> ni (x\<^sup>\<star> * y) \<le> ni y
[PROOF STEP]
using n_star_induct ni_n_order
[PROOF STATE]
proof (prove)
using this:
n (?x * ?y) \<le> n ?y \<longrightarrow> n (?x\<^sup>\<star> * ?y) \<le> n ?y
(ni ?x \<le> ni ?y) = (n ?x \<le> n ?y)

goal (1 subgoal):
 1. ni (x * y) \<le> ni y \<Longrightarrow> ni (x\<^sup>\<star> * y) \<le> ni y
[PROOF STEP]
by auto


[STATEMENT]
lemma poly_map_cons:
  assumes "a \<in> carrier (R\<^bsup>n\<^esup>)"
  shows "poly_map n (f#fs) a = (eval_at_point R a f)#poly_map n fs a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly_map n (f # fs) a = eval_at_point R a f # poly_map n fs a
[PROOF STEP]
unfolding poly_map_def poly_tuple_eval_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>as\<in>carrier (R\<^bsup>n\<^esup>). map (eval_at_point R as) (f # fs)) a = eval_at_point R a f # (\<lambda>as\<in>carrier (R\<^bsup>n\<^esup>). map (eval_at_point R as) fs) a
[PROOF STEP]
by (metis (mono_tags, lifting) assms list.simps(9) restrict_apply')


[STATEMENT]
lemma lmeasurable_iff_has_integral:
  "S \<in> lmeasurable \<longleftrightarrow> ((indicator S) has_integral measure lebesgue S) UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (S \<in> lmeasurable) = (indicat_real S has_integral Sigma_Algebra.measure lebesgue S) UNIV
[PROOF STEP]
by (subst has_integral_iff_nn_integral_lebesgue)
     (auto simp: ennreal_indicator emeasure_eq_measure2 borel_measurable_indicator_iff intro!: fmeasurableI)


[STATEMENT]
lemma Iff_trans: "H \<turnstile> A IFF B \<Longrightarrow> H \<turnstile> B IFF C \<Longrightarrow> H \<turnstile> A IFF C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<turnstile> A IFF B; H \<turnstile> B IFF C\<rbrakk> \<Longrightarrow> H \<turnstile> A IFF C
[PROOF STEP]
unfolding Iff_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>H \<turnstile> (A IMP B) AND (B IMP A); H \<turnstile> (B IMP C) AND (C IMP B)\<rbrakk> \<Longrightarrow> H \<turnstile> (A IMP C) AND (C IMP A)
[PROOF STEP]
by (metis Conj_E1 Conj_E2 Conj_I Disj_Semicong_1 Disj_commute)


[STATEMENT]
lemma list_of_vec_row_nth:
assumes x: "x < dim_col A"
shows "list_of_vec (row A i) ! x = A $$ (i, x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_of_vec (row A i) ! x = A $$ (i, x)
[PROOF STEP]
using x
[PROOF STATE]
proof (prove)
using this:
x < dim_col A

goal (1 subgoal):
 1. list_of_vec (row A i) ! x = A $$ (i, x)
[PROOF STEP]
unfolding row_def
[PROOF STATE]
proof (prove)
using this:
x < dim_col A

goal (1 subgoal):
 1. list_of_vec (vec (dim_col A) (\<lambda>j. A $$ (i, j))) ! x = A $$ (i, x)
[PROOF STEP]
by (transfer', auto simp add: mk_vec_def)


[STATEMENT]
lemma nat_cut_less_finite: "finite (I \<down>< (t::nat))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (I \<down>< t)
[PROOF STEP]
by (fastforce simp: finite_nat_iff_bounded2 cut_less_def)


[STATEMENT]
lemma continuous_on_inverse_ennreal[continuous_intros]:
  fixes f :: "'a::topological_space \<Rightarrow> ennreal"
  shows "continuous_on A f \<Longrightarrow> continuous_on A (\<lambda>x. inverse (f x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on A f \<Longrightarrow> continuous_on A (\<lambda>x. inverse (f x))
[PROOF STEP]
proof (transfer fixing: A)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>f. \<lbrakk>pred_fun top ((\<le>) 0) f; continuous_on A f\<rbrakk> \<Longrightarrow> continuous_on A (\<lambda>x. inverse (f x))
[PROOF STEP]
show "pred_fun top  ((\<le>) 0) f \<Longrightarrow> continuous_on A (\<lambda>x. inverse (f x))" if "continuous_on A f"
    for f :: "'a \<Rightarrow> ereal"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pred_fun top ((\<le>) 0) f \<Longrightarrow> continuous_on A (\<lambda>x. inverse (f x))
[PROOF STEP]
using continuous_on_compose2[OF continuous_on_inverse_ereal that]
[PROOF STATE]
proof (prove)
using this:
f ` A \<subseteq> {0..} \<Longrightarrow> continuous_on A (\<lambda>x. inverse (f x))

goal (1 subgoal):
 1. pred_fun top ((\<le>) 0) f \<Longrightarrow> continuous_on A (\<lambda>x. inverse (f x))
[PROOF STEP]
by (auto simp: subset_eq)
[PROOF STATE]
proof (state)
this:
\<lbrakk>continuous_on A ?f; pred_fun top ((\<le>) 0) ?f\<rbrakk> \<Longrightarrow> continuous_on A (\<lambda>x. inverse (?f x))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma zero_in_succ [simp,intro]: "Ord i \<Longrightarrow> 0 \<in> elts (succ i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ord i \<Longrightarrow> 0 \<in> elts (ZFC_in_HOL.succ i)
[PROOF STEP]
using mem_0_Ord
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>Ord ?k; ?k \<noteq> 0\<rbrakk> \<Longrightarrow> 0 \<in> elts ?k

goal (1 subgoal):
 1. Ord i \<Longrightarrow> 0 \<in> elts (ZFC_in_HOL.succ i)
[PROOF STEP]
by auto


[STATEMENT]
lemma Times_mset_assoc: "(A \<times># B) \<times># C = image_mset (\<lambda>(a, b, c). ((a, b), c)) (A \<times># B \<times># C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<times># B) \<times># C = {#((a, b), c). (a, b, c) \<in># A \<times># B \<times># C#}
[PROOF STEP]
by (auto simp: multiset_eq_iff count_Sigma_mset count_image_mset vimage_def Times_mset_Times
      Int_commute count_eq_zero_iff intro!: trans[OF _ sym[OF sum_le_singleton[of _ "(_, _, _)"]]]
      cong: sum.cong if_cong)


[STATEMENT]
lemma (in Ring) set_mult_ring_times_closed:"\<lbrakk>A \<subseteq> carrier R; ideal R B;
       x \<in> set_mult R A B; r \<in> carrier R\<rbrakk> \<Longrightarrow> r \<cdot>\<^sub>r  x \<in> set_mult R A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>A \<subseteq> carrier R; ideal R B; x \<in> set_mult R A B; r \<in> carrier R\<rbrakk> \<Longrightarrow> r \<cdot>\<^sub>r x \<in> set_mult R A B
[PROOF STEP]
apply (cut_tac ring_is_ag,
       simp add:set_mult_def,
       (erule bexE)+, frule sym, thin_tac "xa \<cdot>\<^sub>r y = x", simp,
       frule_tac c = xa in subsetD[of A "carrier R"], assumption+,
       frule ideal_subset1[of B],
       frule_tac c = y in subsetD[of B "carrier R"], assumption,
       frule_tac x = r and y = "xa \<cdot>\<^sub>r y" in ring_tOp_commute,
       simp add:ring_tOp_closed, simp,
       subst ring_tOp_assoc, assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa y. \<lbrakk>A \<subseteq> carrier R; ideal R B; r \<in> carrier R; aGroup R; xa \<in> A; y \<in> B; x = xa \<cdot>\<^sub>r y; xa \<in> carrier R; B \<subseteq> carrier R; y \<in> carrier R; r \<cdot>\<^sub>r (xa \<cdot>\<^sub>r y) = xa \<cdot>\<^sub>r y \<cdot>\<^sub>r r\<rbrakk> \<Longrightarrow> \<exists>x\<in>A. \<exists>ya\<in>B. x \<cdot>\<^sub>r ya = xa \<cdot>\<^sub>r (y \<cdot>\<^sub>r r)
[PROOF STEP]
apply (frule_tac x = y and y = r in ring_tOp_commute, assumption+,
        simp,
        frule_tac x = y and r = r in ideal_ring_multiple [of B], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa y. \<lbrakk>A \<subseteq> carrier R; ideal R B; r \<in> carrier R; aGroup R; xa \<in> A; y \<in> B; x = xa \<cdot>\<^sub>r y; xa \<in> carrier R; B \<subseteq> carrier R; y \<in> carrier R; r \<cdot>\<^sub>r (xa \<cdot>\<^sub>r y) = xa \<cdot>\<^sub>r y \<cdot>\<^sub>r r; y \<cdot>\<^sub>r r = r \<cdot>\<^sub>r y; r \<cdot>\<^sub>r y \<in> B\<rbrakk> \<Longrightarrow> \<exists>x\<in>A. \<exists>ya\<in>B. x \<cdot>\<^sub>r ya = xa \<cdot>\<^sub>r (r \<cdot>\<^sub>r y)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cblinfun_compose_zero_left[simp]: "0 o\<^sub>C\<^sub>L U = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 o\<^sub>C\<^sub>L U = 0
[PROOF STEP]
using bounded_cbilinear.zero_left bounded_cbilinear_cblinfun_compose
[PROOF STATE]
proof (prove)
using this:
bounded_cbilinear ?prod \<Longrightarrow> ?prod (0::?'a) ?b = (0::?'c)
bounded_cbilinear (o\<^sub>C\<^sub>L)

goal (1 subgoal):
 1. 0 o\<^sub>C\<^sub>L U = 0
[PROOF STEP]
by blast


[STATEMENT]
lemma nat_cut_greater_infinite_not_empty: "infinite I \<Longrightarrow> I \<down>> (t::nat) \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite I \<Longrightarrow> I \<down>> t \<noteq> {}
[PROOF STEP]
by (drule infinite_nat_iff_unbounded[THEN iffD1], blast)


[STATEMENT]
lemma distinct_zipI2:
  assumes "distinct ys"
  shows "distinct (zip xs ys)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. distinct (zip xs ys)
[PROOF STEP]
proof (rule zip_obtain_same_length)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>zs ws n. \<lbrakk>length zs = length ws; n = min (length xs) (length ys); zs = take n xs; ws = take n ys\<rbrakk> \<Longrightarrow> distinct (zip zs ws)
[PROOF STEP]
fix xs' :: "'b list" and ys' :: "'a list" and n
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>zs ws n. \<lbrakk>length zs = length ws; n = min (length xs) (length ys); zs = take n xs; ws = take n ys\<rbrakk> \<Longrightarrow> distinct (zip zs ws)
[PROOF STEP]
assume "length xs' = length ys'"
[PROOF STATE]
proof (state)
this:
length xs' = length ys'

goal (1 subgoal):
 1. \<And>zs ws n. \<lbrakk>length zs = length ws; n = min (length xs) (length ys); zs = take n xs; ws = take n ys\<rbrakk> \<Longrightarrow> distinct (zip zs ws)
[PROOF STEP]
assume "ys' = take n ys"
[PROOF STATE]
proof (state)
this:
ys' = take n ys

goal (1 subgoal):
 1. \<And>zs ws n. \<lbrakk>length zs = length ws; n = min (length xs) (length ys); zs = take n xs; ws = take n ys\<rbrakk> \<Longrightarrow> distinct (zip zs ws)
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
distinct ys
ys' = take n ys
[PROOF STEP]
have "distinct ys'"
[PROOF STATE]
proof (prove)
using this:
distinct ys
ys' = take n ys

goal (1 subgoal):
 1. distinct ys'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
distinct ys'

goal (1 subgoal):
 1. \<And>zs ws n. \<lbrakk>length zs = length ws; n = min (length xs) (length ys); zs = take n xs; ws = take n ys\<rbrakk> \<Longrightarrow> distinct (zip zs ws)
[PROOF STEP]
with \<open>length xs' = length ys'\<close>
[PROOF STATE]
proof (chain)
picking this:
length xs' = length ys'
distinct ys'
[PROOF STEP]
show "distinct (zip xs' ys')"
[PROOF STATE]
proof (prove)
using this:
length xs' = length ys'
distinct ys'

goal (1 subgoal):
 1. distinct (zip xs' ys')
[PROOF STEP]
by (induct xs' ys' rule: list_induct2) (auto elim: in_set_zipE)
[PROOF STATE]
proof (state)
this:
distinct (zip xs' ys')

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hom_to_Img:"\<lbrakk>Group F; Group G; f \<in> gHom F G\<rbrakk> \<Longrightarrow> f \<in> gHom F (Img\<^bsub>F,G\<^esub> f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Group F; Group G; f \<in> gHom F G\<rbrakk> \<Longrightarrow> f \<in> gHom F (Img\<^bsub>F,G\<^esub> f)
[PROOF STEP]
by (simp add:gHom_def Gimage_def Gp_def)


[STATEMENT]
lemma dist_fst_le: "dist (fst x) (fst y) \<le> dist x y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist (fst x) (fst y) \<le> dist x y
[PROOF STEP]
unfolding dist_prod_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dist (fst x) (fst y) \<le> sqrt ((dist (fst x) (fst y))\<^sup>2 + (dist (snd x) (snd y))\<^sup>2)
[PROOF STEP]
by (rule real_sqrt_sum_squares_ge1)


[STATEMENT]
lemma LeadsTo_Un_Un:
     "[| F \<in> A LeadsTo A'; F \<in> B LeadsTo B' |]
            ==> F \<in> (A \<union> B) LeadsTo (A' \<union> B')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>F \<in> A \<longmapsto>w A'; F \<in> B \<longmapsto>w B'\<rbrakk> \<Longrightarrow> F \<in> A \<union> B \<longmapsto>w A' \<union> B'
[PROOF STEP]
by (blast intro: LeadsTo_Un LeadsTo_weaken_R)


[STATEMENT]
lemma homeomorphic_Hausdorff_space:
   "X homeomorphic_space Y \<Longrightarrow> Hausdorff_space X \<longleftrightarrow> Hausdorff_space Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X homeomorphic_space Y \<Longrightarrow> Hausdorff_space X = Hausdorff_space Y
[PROOF STEP]
unfolding homeomorphic_space_def homeomorphic_maps_map
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>f g. homeomorphic_map X Y f \<and> homeomorphic_map Y X g \<and> (\<forall>x\<in>topspace X. g (f x) = x) \<and> (\<forall>y\<in>topspace Y. f (g y) = y) \<Longrightarrow> Hausdorff_space X = Hausdorff_space Y
[PROOF STEP]
by (auto simp: homeomorphic_eq_everything_map Hausdorff_space_injective_preimage)


[STATEMENT]
lemma equivalence_maps_compose:
    assumes "equivalence_map f" and "equivalence_map f'" and "src f' = trg f"
    shows "equivalence_map (f' \<star> f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equivalence_map (f' \<star> f)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. equivalence_map (f' \<star> f)
[PROOF STEP]
obtain g \<phi> \<psi> where fg: "equivalence_in_bicategory V H \<a> \<i> src trg f g \<phi> \<psi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>g \<phi> \<psi>. internal_equivalence f g \<phi> \<psi> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms(1) equivalence_map_def
[PROOF STATE]
proof (prove)
using this:
equivalence_map f
equivalence_map ?f \<equiv> \<exists>g \<eta> \<epsilon>. internal_equivalence ?f g \<eta> \<epsilon>

goal (1 subgoal):
 1. (\<And>g \<phi> \<psi>. internal_equivalence f g \<phi> \<psi> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
internal_equivalence f g \<phi> \<psi>

goal (1 subgoal):
 1. equivalence_map (f' \<star> f)
[PROOF STEP]
interpret fg: equivalence_in_bicategory V H \<a> \<i> src trg f g \<phi> \<psi>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. internal_equivalence f g \<phi> \<psi>
[PROOF STEP]
using fg
[PROOF STATE]
proof (prove)
using this:
internal_equivalence f g \<phi> \<psi>

goal (1 subgoal):
 1. internal_equivalence f g \<phi> \<psi>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. equivalence_map (f' \<star> f)
[PROOF STEP]
obtain g' \<phi>' \<psi>' where f'g': "equivalence_in_bicategory V H \<a> \<i> src trg f' g' \<phi>' \<psi>'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>g' \<phi>' \<psi>'. internal_equivalence f' g' \<phi>' \<psi>' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms(2) equivalence_map_def
[PROOF STATE]
proof (prove)
using this:
equivalence_map f'
equivalence_map ?f \<equiv> \<exists>g \<eta> \<epsilon>. internal_equivalence ?f g \<eta> \<epsilon>

goal (1 subgoal):
 1. (\<And>g' \<phi>' \<psi>'. internal_equivalence f' g' \<phi>' \<psi>' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
internal_equivalence f' g' \<phi>' \<psi>'

goal (1 subgoal):
 1. equivalence_map (f' \<star> f)
[PROOF STEP]
interpret f'g': equivalence_in_bicategory V H \<a> \<i> src trg f' g' \<phi>' \<psi>'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. internal_equivalence f' g' \<phi>' \<psi>'
[PROOF STEP]
using f'g'
[PROOF STATE]
proof (prove)
using this:
internal_equivalence f' g' \<phi>' \<psi>'

goal (1 subgoal):
 1. internal_equivalence f' g' \<phi>' \<psi>'
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. equivalence_map (f' \<star> f)
[PROOF STEP]
interpret composite_equivalence_in_bicategory V H \<a> \<i> src trg f g \<phi> \<psi> f' g' \<phi>' \<psi>'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. composite_equivalence_in_bicategory (\<cdot>) (\<star>) \<a> \<i> src trg f g \<phi> \<psi> f' g' \<phi>' \<psi>'
[PROOF STEP]
using assms(3)
[PROOF STATE]
proof (prove)
using this:
src f' = trg f

goal (1 subgoal):
 1. composite_equivalence_in_bicategory (\<cdot>) (\<star>) \<a> \<i> src trg f g \<phi> \<psi> f' g' \<phi>' \<psi>'
[PROOF STEP]
by (unfold_locales, auto)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. equivalence_map (f' \<star> f)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equivalence_map (f' \<star> f)
[PROOF STEP]
using equivalence_map_def equivalence_in_bicategory_axioms
[PROOF STATE]
proof (prove)
using this:
equivalence_map ?f \<equiv> \<exists>g \<eta> \<epsilon>. internal_equivalence ?f g \<eta> \<epsilon>
internal_equivalence (f' \<star> f) (g \<star> g') \<eta> \<epsilon>

goal (1 subgoal):
 1. equivalence_map (f' \<star> f)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
equivalence_map (f' \<star> f)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sin_cx_2pi [simp]: "\<lbrakk>z = of_int m; even m\<rbrakk> \<Longrightarrow> sin (z * complex_of_real pi) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>z = of_int m; even m\<rbrakk> \<Longrightarrow> sin (z * complex_of_real pi) = 0
[PROOF STEP]
by (simp add: sin_eq_0)


[STATEMENT]
lemma signed_take_bit_Suc_bit0 [simp]:
  \<open>signed_take_bit (Suc n) (numeral (Num.Bit0 k)) = signed_take_bit n (numeral k) * (2 :: int)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. signed_take_bit (Suc n) (numeral (num.Bit0 k)) = signed_take_bit n (numeral k) * 2
[PROOF STEP]
by (simp add: signed_take_bit_Suc)


[STATEMENT]
lemma hom_components_uminus: "hom_components (- p) = uminus ` hom_components p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_components (- p) = uminus ` hom_components p
[PROOF STEP]
by (simp add: hom_components_def keys_uminus image_image)


[STATEMENT]
lemma "check_eqv (Abs_idx (0, 1)) 1 (FBase (Eq_Presb None 0 42)) (FBase (Eq [1] 42 0))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. WS1S_Presburger_Equivalence.check_eqv (Abs_idx (0, 1)) 1 (FBase (Eq_Presb None 0 42)) (FBase (presb.Eq [1] 42 0))
[PROOF STEP]
by check_equiv


[STATEMENT]
lemma nth_fold_insert_nth:
  "\<lbrakk>sorted (map fst pxs); distinct (map fst pxs); \<forall>(p, b) \<in> set pxs. p < length xs + length pxs;
    i < length pxs; pxs ! i = (p, b)\<rbrakk> \<Longrightarrow>
  fold (\<lambda>(p, b). insert_nth p b) pxs xs ! p = b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>sorted (map fst pxs); distinct (map fst pxs); \<forall>(p, b)\<in>set pxs. p < length xs + length pxs; i < length pxs; pxs ! i = (p, b)\<rbrakk> \<Longrightarrow> fold (\<lambda>(p, b). insert_nth p b) pxs xs ! p = b
[PROOF STEP]
proof (induct pxs arbitrary: xs i p b)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xs i p b. \<lbrakk>sorted (map fst []); distinct (map fst []); \<forall>(p, b)\<in>set []. p < length xs + length []; i < length []; [] ! i = (p, b)\<rbrakk> \<Longrightarrow> fold (\<lambda>(x, y). insert_nth x y) [] xs ! p = b
 2. \<And>a pxs xs i p b. \<lbrakk>\<And>xs i p b. \<lbrakk>sorted (map fst pxs); distinct (map fst pxs); \<forall>(p, b)\<in>set pxs. p < length xs + length pxs; i < length pxs; pxs ! i = (p, b)\<rbrakk> \<Longrightarrow> fold (\<lambda>(x, y). insert_nth x y) pxs xs ! p = b; sorted (map fst (a # pxs)); distinct (map fst (a # pxs)); \<forall>(p, b)\<in>set (a # pxs). p < length xs + length (a # pxs); i < length (a # pxs); (a # pxs) ! i = (p, b)\<rbrakk> \<Longrightarrow> fold (\<lambda>(x, y). insert_nth x y) (a # pxs) xs ! p = b
[PROOF STEP]
case (Cons pb pxs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>sorted (map fst pxs); distinct (map fst pxs); \<forall>a\<in>set pxs. case a of (p, b) \<Rightarrow> p < length ?xs + length pxs; ?i < length pxs; pxs ! ?i = (?p, ?b)\<rbrakk> \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) pxs ?xs ! ?p = ?b
sorted (map fst (pb # pxs))
distinct (map fst (pb # pxs))
\<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs)
i < length (pb # pxs)
(pb # pxs) ! i = (p, b)

goal (2 subgoals):
 1. \<And>xs i p b. \<lbrakk>sorted (map fst []); distinct (map fst []); \<forall>(p, b)\<in>set []. p < length xs + length []; i < length []; [] ! i = (p, b)\<rbrakk> \<Longrightarrow> fold (\<lambda>(x, y). insert_nth x y) [] xs ! p = b
 2. \<And>a pxs xs i p b. \<lbrakk>\<And>xs i p b. \<lbrakk>sorted (map fst pxs); distinct (map fst pxs); \<forall>(p, b)\<in>set pxs. p < length xs + length pxs; i < length pxs; pxs ! i = (p, b)\<rbrakk> \<Longrightarrow> fold (\<lambda>(x, y). insert_nth x y) pxs xs ! p = b; sorted (map fst (a # pxs)); distinct (map fst (a # pxs)); \<forall>(p, b)\<in>set (a # pxs). p < length xs + length (a # pxs); i < length (a # pxs); (a # pxs) ! i = (p, b)\<rbrakk> \<Longrightarrow> fold (\<lambda>(x, y). insert_nth x y) (a # pxs) xs ! p = b
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
[PROOF STEP]
proof (cases i)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. i = 0 \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
 2. \<And>nat. i = Suc nat \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:
i = 0

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
 2. \<And>nat. i = Suc nat \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
[PROOF STEP]
with Cons.prems
[PROOF STATE]
proof (chain)
picking this:
sorted (map fst (pb # pxs))
distinct (map fst (pb # pxs))
\<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs)
i < length (pb # pxs)
(pb # pxs) ! i = (p, b)
i = 0
[PROOF STEP]
have "p < Suc (length xs)"
[PROOF STATE]
proof (prove)
using this:
sorted (map fst (pb # pxs))
distinct (map fst (pb # pxs))
\<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs)
i < length (pb # pxs)
(pb # pxs) ! i = (p, b)
i = 0

goal (1 subgoal):
 1. p < Suc (length xs)
[PROOF STEP]
proof (induct pxs rule: rev_induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>sorted (map fst [pb]); distinct (map fst [pb]); \<forall>(p, b)\<in>set [pb]. p < length xs + length [pb]; i < length [pb]; [pb] ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
 2. \<And>x xs. \<lbrakk>\<lbrakk>sorted (map fst (pb # xs)); distinct (map fst (pb # xs)); \<forall>(p, b)\<in>set (pb # xs). p < length xs + length (pb # xs); i < length (pb # xs); (pb # xs) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs); sorted (map fst (pb # xs @ [x])); distinct (map fst (pb # xs @ [x])); \<forall>(p, b)\<in>set (pb # xs @ [x]). p < length xs + length (pb # xs @ [x]); i < length (pb # xs @ [x]); (pb # xs @ [x]) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
[PROOF STEP]
case (snoc pb' pxs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>sorted (map fst (pb # pxs)); distinct (map fst (pb # pxs)); \<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs); i < length (pb # pxs); (pb # pxs) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
sorted (map fst (pb # pxs @ [pb']))
distinct (map fst (pb # pxs @ [pb']))
\<forall>a\<in>set (pb # pxs @ [pb']). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs @ [pb'])
i < length (pb # pxs @ [pb'])
(pb # pxs @ [pb']) ! i = (p, b)
i = 0

goal (2 subgoals):
 1. \<lbrakk>sorted (map fst [pb]); distinct (map fst [pb]); \<forall>(p, b)\<in>set [pb]. p < length xs + length [pb]; i < length [pb]; [pb] ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
 2. \<And>x xs. \<lbrakk>\<lbrakk>sorted (map fst (pb # xs)); distinct (map fst (pb # xs)); \<forall>(p, b)\<in>set (pb # xs). p < length xs + length (pb # xs); i < length (pb # xs); (pb # xs) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs); sorted (map fst (pb # xs @ [x])); distinct (map fst (pb # xs @ [x])); \<forall>(p, b)\<in>set (pb # xs @ [x]). p < length xs + length (pb # xs @ [x]); i < length (pb # xs @ [x]); (pb # xs @ [x]) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>sorted (map fst (pb # pxs)); distinct (map fst (pb # pxs)); \<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs); i < length (pb # pxs); (pb # pxs) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
sorted (map fst (pb # pxs @ [pb']))
distinct (map fst (pb # pxs @ [pb']))
\<forall>a\<in>set (pb # pxs @ [pb']). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs @ [pb'])
i < length (pb # pxs @ [pb'])
(pb # pxs @ [pb']) ! i = (p, b)
i = 0
[PROOF STEP]
obtain p' b' where "pb' = (p', b')"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>sorted (map fst (pb # pxs)); distinct (map fst (pb # pxs)); \<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs); i < length (pb # pxs); (pb # pxs) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
sorted (map fst (pb # pxs @ [pb']))
distinct (map fst (pb # pxs @ [pb']))
\<forall>a\<in>set (pb # pxs @ [pb']). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs @ [pb'])
i < length (pb # pxs @ [pb'])
(pb # pxs @ [pb']) ! i = (p, b)
i = 0

goal (1 subgoal):
 1. (\<And>p' b'. pb' = (p', b') \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
pb' = (p', b')

goal (2 subgoals):
 1. \<lbrakk>sorted (map fst [pb]); distinct (map fst [pb]); \<forall>(p, b)\<in>set [pb]. p < length xs + length [pb]; i < length [pb]; [pb] ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
 2. \<And>x xs. \<lbrakk>\<lbrakk>sorted (map fst (pb # xs)); distinct (map fst (pb # xs)); \<forall>(p, b)\<in>set (pb # xs). p < length xs + length (pb # xs); i < length (pb # xs); (pb # xs) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs); sorted (map fst (pb # xs @ [x])); distinct (map fst (pb # xs @ [x])); \<forall>(p, b)\<in>set (pb # xs @ [x]). p < length xs + length (pb # xs @ [x]); i < length (pb # xs @ [x]); (pb # xs @ [x]) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
[PROOF STEP]
with snoc.prems
[PROOF STATE]
proof (chain)
picking this:
sorted (map fst (pb # pxs @ [pb']))
distinct (map fst (pb # pxs @ [pb']))
\<forall>a\<in>set (pb # pxs @ [pb']). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs @ [pb'])
i < length (pb # pxs @ [pb'])
(pb # pxs @ [pb']) ! i = (p, b)
i = 0
pb' = (p', b')
[PROOF STEP]
have "\<forall>p \<in> fst ` set pxs. p < p'" "p' \<le> Suc (length xs + length pxs)"
[PROOF STATE]
proof (prove)
using this:
sorted (map fst (pb # pxs @ [pb']))
distinct (map fst (pb # pxs @ [pb']))
\<forall>a\<in>set (pb # pxs @ [pb']). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs @ [pb'])
i < length (pb # pxs @ [pb'])
(pb # pxs @ [pb']) ! i = (p, b)
i = 0
pb' = (p', b')

goal (1 subgoal):
 1. \<forall>p\<in>fst ` set pxs. p < p' &&& p' \<le> Suc (length xs + length pxs)
[PROOF STEP]
by (auto simp: image_iff sorted_wrt_append le_eq_less_or_eq)
[PROOF STATE]
proof (state)
this:
\<forall>p\<in>fst ` set pxs. p < p'
p' \<le> Suc (length xs + length pxs)

goal (2 subgoals):
 1. \<lbrakk>sorted (map fst [pb]); distinct (map fst [pb]); \<forall>(p, b)\<in>set [pb]. p < length xs + length [pb]; i < length [pb]; [pb] ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
 2. \<And>x xs. \<lbrakk>\<lbrakk>sorted (map fst (pb # xs)); distinct (map fst (pb # xs)); \<forall>(p, b)\<in>set (pb # xs). p < length xs + length (pb # xs); i < length (pb # xs); (pb # xs) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs); sorted (map fst (pb # xs @ [x])); distinct (map fst (pb # xs @ [x])); \<forall>(p, b)\<in>set (pb # xs @ [x]). p < length xs + length (pb # xs @ [x]); i < length (pb # xs @ [x]); (pb # xs @ [x]) ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
[PROOF STEP]
with snoc.prems
[PROOF STATE]
proof (chain)
picking this:
sorted (map fst (pb # pxs @ [pb']))
distinct (map fst (pb # pxs @ [pb']))
\<forall>a\<in>set (pb # pxs @ [pb']). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs @ [pb'])
i < length (pb # pxs @ [pb'])
(pb # pxs @ [pb']) ! i = (p, b)
i = 0
\<forall>p\<in>fst ` set pxs. p < p'
p' \<le> Suc (length xs + length pxs)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
sorted (map fst (pb # pxs @ [pb']))
distinct (map fst (pb # pxs @ [pb']))
\<forall>a\<in>set (pb # pxs @ [pb']). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs @ [pb'])
i < length (pb # pxs @ [pb'])
(pb # pxs @ [pb']) ! i = (p, b)
i = 0
\<forall>p\<in>fst ` set pxs. p < p'
p' \<le> Suc (length xs + length pxs)

goal (1 subgoal):
 1. p < Suc (length xs)
[PROOF STEP]
by (intro snoc(1)) (auto simp: sorted_append)
[PROOF STATE]
proof (state)
this:
p < Suc (length xs)

goal (1 subgoal):
 1. \<lbrakk>sorted (map fst [pb]); distinct (map fst [pb]); \<forall>(p, b)\<in>set [pb]. p < length xs + length [pb]; i < length [pb]; [pb] ! i = (p, b); i = 0\<rbrakk> \<Longrightarrow> p < Suc (length xs)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
p < Suc (length xs)

goal (2 subgoals):
 1. i = 0 \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
 2. \<And>nat. i = Suc nat \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
[PROOF STEP]
with 0 Cons.prems
[PROOF STATE]
proof (chain)
picking this:
i = 0
sorted (map fst (pb # pxs))
distinct (map fst (pb # pxs))
\<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs)
i < length (pb # pxs)
(pb # pxs) ! i = (p, b)
p < Suc (length xs)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
i = 0
sorted (map fst (pb # pxs))
distinct (map fst (pb # pxs))
\<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs)
i < length (pb # pxs)
(pb # pxs) ! i = (p, b)
p < Suc (length xs)

goal (1 subgoal):
 1. fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
[PROOF STEP]
unfolding fold.simps o_apply
[PROOF STATE]
proof (prove)
using this:
i = 0
sorted (map fst (pb # pxs))
distinct (map fst (pb # pxs))
\<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs)
i < length (pb # pxs)
(pb # pxs) ! i = (p, b)
p < Suc (length xs)

goal (1 subgoal):
 1. fold (\<lambda>(x, y). insert_nth x y) pxs ((case pb of (x, xa) \<Rightarrow> insert_nth x xa) xs) ! p = b
[PROOF STEP]
by (intro invar_fold_insert_nth) (auto simp: image_iff le_eq_less_or_eq nth_append)
[PROOF STATE]
proof (state)
this:
fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b

goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
i = Suc n

goal (1 subgoal):
 1. \<And>nat. i = Suc nat \<Longrightarrow> fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
[PROOF STEP]
with Cons.prems
[PROOF STATE]
proof (chain)
picking this:
sorted (map fst (pb # pxs))
distinct (map fst (pb # pxs))
\<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs)
i < length (pb # pxs)
(pb # pxs) ! i = (p, b)
i = Suc n
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sorted (map fst (pb # pxs))
distinct (map fst (pb # pxs))
\<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs)
i < length (pb # pxs)
(pb # pxs) ! i = (p, b)
i = Suc n

goal (1 subgoal):
 1. fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b
[PROOF STEP]
unfolding fold.simps
[PROOF STATE]
proof (prove)
using this:
sorted (map fst (pb # pxs))
distinct (map fst (pb # pxs))
\<forall>a\<in>set (pb # pxs). case a of (p, b) \<Rightarrow> p < length xs + length (pb # pxs)
i < length (pb # pxs)
(pb # pxs) ! i = (p, b)
i = Suc n

goal (1 subgoal):
 1. (fold (\<lambda>(x, y). insert_nth x y) pxs \<circ> (case pb of (x, xa) \<Rightarrow> insert_nth x xa)) xs ! p = b
[PROOF STEP]
by (auto intro!: Cons(1))
[PROOF STATE]
proof (state)
this:
fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
fold (\<lambda>a. case a of (a, b) \<Rightarrow> insert_nth a b) (pb # pxs) xs ! p = b

goal (1 subgoal):
 1. \<And>xs i p b. \<lbrakk>sorted (map fst []); distinct (map fst []); \<forall>(p, b)\<in>set []. p < length xs + length []; i < length []; [] ! i = (p, b)\<rbrakk> \<Longrightarrow> fold (\<lambda>(x, y). insert_nth x y) [] xs ! p = b
[PROOF STEP]
qed simp


[STATEMENT]
lemma real_div_nat_eq_floor_of_divide: "a div b = real_of_int \<lfloor>a / b\<rfloor>" for a b :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real (a div b) = real_of_int \<lfloor>real a / real b\<rfloor>
[PROOF STEP]
by (simp add: floor_divide_of_nat_eq [of a b])


[STATEMENT]
lemma dprod_Sigma: "(dprod (A \<times> B) (C \<times> D)) <= (uprod A C) \<times> (uprod B D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dprod (A \<times> B) (C \<times> D) \<subseteq> uprod A C \<times> uprod B D
[PROOF STEP]
by blast


[STATEMENT]
lemma graph_union_idemp[simp]:
"graph_union A A = A"
"graph_union A (graph_union A B) = (graph_union A B)"
"graph_union A (graph_union B A) = (graph_union B A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. graph_union A A = A &&& graph_union A (graph_union A B) = graph_union A B &&& graph_union A (graph_union B A) = graph_union B A
[PROOF STEP]
unfolding graph_union_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LG (edges A \<union> edges A) (vertices A \<union> vertices A) = A &&& LG (edges A \<union> edges (LG (edges A \<union> edges B) (vertices A \<union> vertices B))) (vertices A \<union> vertices (LG (edges A \<union> edges B) (vertices A \<union> vertices B))) = LG (edges A \<union> edges B) (vertices A \<union> vertices B) &&& LG (edges A \<union> edges (LG (edges B \<union> edges A) (vertices B \<union> vertices A))) (vertices A \<union> vertices (LG (edges B \<union> edges A) (vertices B \<union> vertices A))) = LG (edges B \<union> edges A) (vertices B \<union> vertices A)
[PROOF STEP]
by auto


[STATEMENT]
lemma per_union_related:
    "part_equiv R \<Longrightarrow> a\<in>Domain R \<Longrightarrow> b\<in>Domain  R \<Longrightarrow> (a,b)\<in>per_union R a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>part_equiv R; a \<in> Domain R; b \<in> Domain R\<rbrakk> \<Longrightarrow> (a, b) \<in> per_union R a b
[PROOF STEP]
unfolding per_union_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>part_equiv R; a \<in> Domain R; b \<in> Domain R\<rbrakk> \<Longrightarrow> (a, b) \<in> R \<union> {(x, y). (x, a) \<in> R \<and> (y, b) \<in> R} \<union> {(y, x). (x, a) \<in> R \<and> (y, b) \<in> R}
[PROOF STEP]
by (auto simp: part_equiv_refl)


[STATEMENT]
lemma eigen_value_transpose: "eigen_value (transpose A :: 'a :: field ^ 'n ^ 'n) v = eigen_value A v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eigen_value (Finite_Cartesian_Product.transpose A) v = eigen_value A v
[PROOF STEP]
unfolding eigen_value_root_charpoly charpoly_transpose
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (poly (charpoly A) v = (0::'a)) = (poly (charpoly A) v = (0::'a))
[PROOF STEP]
by simp


[STATEMENT]
lemma connected_component_of_disjoint:
   "disjnt (connected_component_of_set X x) (connected_component_of_set X y)
    \<longleftrightarrow> ~(connected_component_of X x y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. disjnt (connected_component_of_set X x) (connected_component_of_set X y) = (\<not> connected_component_of X x y)
[PROOF STEP]
using connected_component_of_equiv
[PROOF STATE]
proof (prove)
using this:
connected_component_of ?X ?x ?y = (?x \<in> topspace ?X \<and> ?y \<in> topspace ?X \<and> connected_component_of ?X ?x = connected_component_of ?X ?y)

goal (1 subgoal):
 1. disjnt (connected_component_of_set X x) (connected_component_of_set X y) = (\<not> connected_component_of X x y)
[PROOF STEP]
unfolding disjnt_iff
[PROOF STATE]
proof (prove)
using this:
connected_component_of ?X ?x ?y = (?x \<in> topspace ?X \<and> ?y \<in> topspace ?X \<and> connected_component_of ?X ?x = connected_component_of ?X ?y)

goal (1 subgoal):
 1. (\<forall>xa. \<not> (xa \<in> connected_component_of_set X x \<and> xa \<in> connected_component_of_set X y)) = (\<not> connected_component_of X x y)
[PROOF STEP]
by force


[STATEMENT]
lemma uniform_limit_at_le_iff:
  "uniform_limit S f l (at x) \<longleftrightarrow>
    (\<forall>e>0. \<exists>d>0. \<forall>z. 0 < dist z x \<and> dist z x < d \<longrightarrow> (\<forall>x\<in>S. dist (f z x) (l x) \<le> e))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. uniform_limit S f l (at x) = (\<forall>e>0. \<exists>d>0. \<forall>z. 0 < dist z x \<and> dist z x < d \<longrightarrow> (\<forall>x\<in>S. dist (f z x) (l x) \<le> e))
[PROOF STEP]
unfolding uniform_limit_iff eventually_at
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>e>0. \<exists>d>0. \<forall>xa\<in>UNIV. xa \<noteq> x \<and> dist xa x < d \<longrightarrow> (\<forall>x\<in>S. dist (f xa x) (l x) < e)) = (\<forall>e>0. \<exists>d>0. \<forall>z. 0 < dist z x \<and> dist z x < d \<longrightarrow> (\<forall>x\<in>S. dist (f z x) (l x) \<le> e))
[PROOF STEP]
by (fastforce dest: spec[where x = "e / 2" for e])


[STATEMENT]
lemma cobounded_unique_unbounded_components:
    fixes S :: "'a :: euclidean_space set"
    shows  "\<lbrakk>bounded (- S); c \<in> components S; \<not> bounded c; c' \<in> components S; \<not> bounded c'; 2 \<le> DIM('a)\<rbrakk> \<Longrightarrow> c' = c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>bounded (- S); c \<in> components S; \<not> bounded c; c' \<in> components S; \<not> bounded c'; 2 \<le> DIM('a)\<rbrakk> \<Longrightarrow> c' = c
[PROOF STEP]
unfolding components_iff
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>bounded (- S); \<exists>x. x \<in> S \<and> c = connected_component_set S x; \<not> bounded c; \<exists>x. x \<in> S \<and> c' = connected_component_set S x; \<not> bounded c'; 2 \<le> DIM('a)\<rbrakk> \<Longrightarrow> c' = c
[PROOF STEP]
by (metis cobounded_unique_unbounded_component)


[STATEMENT]
lemma hypnat_less_one [iff]: "\<And>n::hypnat. n < 1 \<longleftrightarrow> n = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>n. (n < 1) = (n = 0)
[PROOF STEP]
by transfer (rule less_one)


[STATEMENT]
lemma linepath_image_01: "linepath a b ` {0..1} = closed_segment a b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. linepath a b ` {0..1} = closed_segment a b
[PROOF STEP]
by (auto simp: segment linepath_def)


[STATEMENT]
lemma sumset_inter_union_subset:
 "sumset (A \<inter> B) (A \<union> B) \<subseteq> sumset A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sumset (A \<inter> B) (A \<union> B) \<subseteq> sumset A B
[PROOF STEP]
by (metis Int_Diff_Un Int_Un_eq(2) Un_subset_iff sumset_commute sumset_subset_Un(2)
    sumset_subset_Un2)


[STATEMENT]
lemma interval_of_add: "interval_of (a + b) = interval_of a + interval_of b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. interval_of (a + b) = interval_of a + interval_of b
[PROOF STEP]
by (auto intro!: interval_eqI)


[STATEMENT]
lemma osum_minus_Id1:
  "r \<le> Id \<Longrightarrow> (r +o r') - Id \<le> (Inl ` Field r \<times> Inr ` Field r') \<union> (map_prod Inr Inr ` (r' - Id))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r \<subseteq> Id \<Longrightarrow> r +o r' - Id \<subseteq> Inl ` Field r \<times> Inr ` Field r' \<union> map_prod Inr Inr ` (r' - Id)
[PROOF STEP]
unfolding osum_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r \<subseteq> Id \<Longrightarrow> map_prod Inl Inl ` r \<union> map_prod Inr Inr ` r' \<union> {(Inl a, Inr a') |a a'. a \<in> Field r \<and> a' \<in> Field r'} - Id \<subseteq> Inl ` Field r \<times> Inr ` Field r' \<union> map_prod Inr Inr ` (r' - Id)
[PROOF STEP]
by auto


[STATEMENT]
lemma ta_union_der_disj_states':
  assumes "\<Q> \<A> |\<inter>| \<Q> \<B> = {||}"
  shows "ta_der (ta_union \<A> \<B>) t = ta_der \<A> t |\<union>| ta_der \<B> t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ta_der (ta_union \<A> \<B>) t = ta_der \<A> t |\<union>| ta_der \<B> t
[PROOF STEP]
using ta_union_der_disj_states[OF assms] ta_der_mono' ta_union_ta_subset
[PROOF STATE]
proof (prove)
using this:
?q |\<in>| ta_der (ta_union \<A> \<B>) ?t \<Longrightarrow> ?q |\<in>| ta_der \<A> ?t \<or> ?q |\<in>| ta_der \<B> ?t
ta_subset ?\<A> ?\<B> \<Longrightarrow> ta_der ?\<A> ?t |\<subseteq>| ta_der ?\<B> ?t
ta_subset ?\<A> (ta_union ?\<A> ?\<B>)
ta_subset ?\<B> (ta_union ?\<A> ?\<B>)

goal (1 subgoal):
 1. ta_der (ta_union \<A> \<B>) t = ta_der \<A> t |\<union>| ta_der \<B> t
[PROOF STEP]
by (auto, fastforce) blast