[STATEMENT]
lemma Proj_sandwich:
  fixes A::"'a::chilbert_space \<Rightarrow>\<^sub>C\<^sub>L 'b::chilbert_space"
  assumes "isometry A"
  shows "sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
define P where \<open>P = A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L (A*)\<close>
[PROOF STATE]
proof (state)
this:
P = A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
have \<open>P o\<^sub>C\<^sub>L P = P\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P o\<^sub>C\<^sub>L P = P
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
isometry A

goal (1 subgoal):
 1. P o\<^sub>C\<^sub>L P = P
[PROOF STEP]
unfolding P_def isometry_def
[PROOF STATE]
proof (prove)
using this:
A* o\<^sub>C\<^sub>L A = id_cblinfun

goal (1 subgoal):
 1. A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A* o\<^sub>C\<^sub>L (A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*) = A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*
[PROOF STEP]
by (metis (no_types, lifting) Proj_idempotent cblinfun_assoc_left(1) cblinfun_compose_id_left)
[PROOF STATE]
proof (state)
this:
P o\<^sub>C\<^sub>L P = P

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
P o\<^sub>C\<^sub>L P = P

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
have \<open>P = P*\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P = P*
[PROOF STEP]
unfolding P_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A* = (A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*)*
[PROOF STEP]
by (metis adj_Proj adj_cblinfun_compose cblinfun_assoc_left(1) double_adj)
[PROOF STATE]
proof (state)
this:
P = P*

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
P o\<^sub>C\<^sub>L P = P
P = P*
[PROOF STEP]
have
    \<open>\<exists>M. P = Proj M \<and> space_as_set M = range (cblinfun_apply (A o\<^sub>C\<^sub>L (Proj S) o\<^sub>C\<^sub>L (A*)))\<close>
[PROOF STATE]
proof (prove)
using this:
P o\<^sub>C\<^sub>L P = P
P = P*

goal (1 subgoal):
 1. \<exists>M. P = Proj M \<and> space_as_set M = range ((*\<^sub>V) (A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*))
[PROOF STEP]
using P_def Proj_on_own_range'
[PROOF STATE]
proof (prove)
using this:
P o\<^sub>C\<^sub>L P = P
P = P*
P = A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*
\<lbrakk>?P o\<^sub>C\<^sub>L ?P = ?P; ?P = ?P*\<rbrakk> \<Longrightarrow> Proj (?P *\<^sub>S \<top>) = ?P

goal (1 subgoal):
 1. \<exists>M. P = Proj M \<and> space_as_set M = range ((*\<^sub>V) (A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*))
[PROOF STEP]
by (metis Proj_is_Proj Proj_range_closed cblinfun_image.rep_eq closure_closed top_ccsubspace.rep_eq)
[PROOF STATE]
proof (state)
this:
\<exists>M. P = Proj M \<and> space_as_set M = range ((*\<^sub>V) (A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*))

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>M. P = Proj M \<and> space_as_set M = range ((*\<^sub>V) (A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*))
[PROOF STEP]
obtain M where \<open>P = Proj M\<close>
    and \<open>space_as_set M = range (cblinfun_apply (A o\<^sub>C\<^sub>L (Proj S) o\<^sub>C\<^sub>L (A*)))\<close>
[PROOF STATE]
proof (prove)
using this:
\<exists>M. P = Proj M \<and> space_as_set M = range ((*\<^sub>V) (A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*))

goal (1 subgoal):
 1. (\<And>M. \<lbrakk>P = Proj M; space_as_set M = range ((*\<^sub>V) (A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*))\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
P = Proj M
space_as_set M = range ((*\<^sub>V) (A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*))

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
have f1: "A o\<^sub>C\<^sub>L Proj S = P o\<^sub>C\<^sub>L A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A o\<^sub>C\<^sub>L Proj S = P o\<^sub>C\<^sub>L A
[PROOF STEP]
by (simp add: P_def assms cblinfun_compose_assoc)
[PROOF STATE]
proof (state)
this:
A o\<^sub>C\<^sub>L Proj S = P o\<^sub>C\<^sub>L A

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
hence "P o\<^sub>C\<^sub>L A o\<^sub>C\<^sub>L A* = P"
[PROOF STATE]
proof (prove)
using this:
A o\<^sub>C\<^sub>L Proj S = P o\<^sub>C\<^sub>L A

goal (1 subgoal):
 1. P o\<^sub>C\<^sub>L A o\<^sub>C\<^sub>L A* = P
[PROOF STEP]
using P_def
[PROOF STATE]
proof (prove)
using this:
A o\<^sub>C\<^sub>L Proj S = P o\<^sub>C\<^sub>L A
P = A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A*

goal (1 subgoal):
 1. P o\<^sub>C\<^sub>L A o\<^sub>C\<^sub>L A* = P
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
P o\<^sub>C\<^sub>L A o\<^sub>C\<^sub>L A* = P

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
hence "(P o\<^sub>C\<^sub>L A) *\<^sub>S (c \<squnion> A* *\<^sub>S d) = P *\<^sub>S (A *\<^sub>S c \<squnion> d)"
    for c d
[PROOF STATE]
proof (prove)
using this:
P o\<^sub>C\<^sub>L A o\<^sub>C\<^sub>L A* = P

goal (1 subgoal):
 1. (P o\<^sub>C\<^sub>L A) *\<^sub>S (c \<squnion> A* *\<^sub>S d) = P *\<^sub>S (A *\<^sub>S c \<squnion> d)
[PROOF STEP]
by (simp add: cblinfun_assoc_left(2))
[PROOF STATE]
proof (state)
this:
(P o\<^sub>C\<^sub>L A) *\<^sub>S (?c \<squnion> A* *\<^sub>S ?d) = P *\<^sub>S (A *\<^sub>S ?c \<squnion> ?d)

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
hence "P *\<^sub>S (A *\<^sub>S \<top> \<squnion> c) = (P o\<^sub>C\<^sub>L A) *\<^sub>S \<top>"
    for c
[PROOF STATE]
proof (prove)
using this:
(P o\<^sub>C\<^sub>L A) *\<^sub>S (?c \<squnion> A* *\<^sub>S ?d) = P *\<^sub>S (A *\<^sub>S ?c \<squnion> ?d)

goal (1 subgoal):
 1. P *\<^sub>S (A *\<^sub>S \<top> \<squnion> c) = (P o\<^sub>C\<^sub>L A) *\<^sub>S \<top>
[PROOF STEP]
by (metis sup_top_left)
[PROOF STATE]
proof (state)
this:
P *\<^sub>S (A *\<^sub>S \<top> \<squnion> ?c) = (P o\<^sub>C\<^sub>L A) *\<^sub>S \<top>

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
hence \<open>M = A *\<^sub>S S\<close>
[PROOF STATE]
proof (prove)
using this:
P *\<^sub>S (A *\<^sub>S \<top> \<squnion> ?c) = (P o\<^sub>C\<^sub>L A) *\<^sub>S \<top>

goal (1 subgoal):
 1. M = A *\<^sub>S S
[PROOF STEP]
using f1
[PROOF STATE]
proof (prove)
using this:
P *\<^sub>S (A *\<^sub>S \<top> \<squnion> ?c) = (P o\<^sub>C\<^sub>L A) *\<^sub>S \<top>
A o\<^sub>C\<^sub>L Proj S = P o\<^sub>C\<^sub>L A

goal (1 subgoal):
 1. M = A *\<^sub>S S
[PROOF STEP]
by (metis \<open>P = Proj M\<close> cblinfun_assoc_left(2) Proj_range sup_top_right)
[PROOF STATE]
proof (state)
this:
M = A *\<^sub>S S

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
M = A *\<^sub>S S

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
using \<open>P = Proj M\<close>
[PROOF STATE]
proof (prove)
using this:
M = A *\<^sub>S S
P = Proj M

goal (1 subgoal):
 1. sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)
[PROOF STEP]
unfolding P_def sandwich_apply
[PROOF STATE]
proof (prove)
using this:
M = A *\<^sub>S S
A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A* = Proj M

goal (1 subgoal):
 1. A o\<^sub>C\<^sub>L Proj S o\<^sub>C\<^sub>L A* = Proj (A *\<^sub>S S)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
sandwich A *\<^sub>V Proj S = Proj (A *\<^sub>S S)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma UP_a_assoc:
  assumes R: "p \<in> carrier P" "q \<in> carrier P" "r \<in> carrier P"
  shows "(p \<oplus>\<^bsub>P\<^esub> q) \<oplus>\<^bsub>P\<^esub> r = p \<oplus>\<^bsub>P\<^esub> (q \<oplus>\<^bsub>P\<^esub> r)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<oplus>\<^bsub>P\<^esub> q \<oplus>\<^bsub>P\<^esub> r = p \<oplus>\<^bsub>P\<^esub> (q \<oplus>\<^bsub>P\<^esub> r)
[PROOF STEP]
by (rule up_eqI, simp add: a_assoc R, simp_all add: R)


[STATEMENT]
lemma integrable_on_lebesgue_on:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  assumes f: "integrable (lebesgue_on S) f" and S: "S \<in> sets lebesgue"
  shows "f integrable_on S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f integrable_on S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f integrable_on S
[PROOF STEP]
have "integrable lebesgue (\<lambda>x. indicator S x *\<^sub>R f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. integrable lebesgue (\<lambda>x. indicat_real S x *\<^sub>R f x)
[PROOF STEP]
using S f inf_top.comm_neutral integrable_restrict_space
[PROOF STATE]
proof (prove)
using this:
S \<in> sets lebesgue
integrable (lebesgue_on S) f
inf ?a top = ?a
?\<Omega> \<inter> space ?M \<in> sets ?M \<Longrightarrow> integrable (restrict_space ?M ?\<Omega>) ?f = integrable ?M (\<lambda>x. indicat_real ?\<Omega> x *\<^sub>R ?f x)

goal (1 subgoal):
 1. integrable lebesgue (\<lambda>x. indicat_real S x *\<^sub>R f x)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
integrable lebesgue (\<lambda>x. indicat_real S x *\<^sub>R f x)

goal (1 subgoal):
 1. f integrable_on S
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
integrable lebesgue (\<lambda>x. indicat_real S x *\<^sub>R f x)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
integrable lebesgue (\<lambda>x. indicat_real S x *\<^sub>R f x)

goal (1 subgoal):
 1. f integrable_on S
[PROOF STEP]
using absolutely_integrable_on_def set_integrable_def
[PROOF STATE]
proof (prove)
using this:
integrable lebesgue (\<lambda>x. indicat_real S x *\<^sub>R f x)
(?f absolutely_integrable_on ?S) = (?f integrable_on ?S \<and> (\<lambda>x. norm (?f x)) integrable_on ?S)
set_integrable ?M ?A ?f \<equiv> integrable ?M (\<lambda>x. indicat_real ?A x *\<^sub>R ?f x)

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ereal_SUP: "\<bar>SUP a\<in>A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (SUP a\<in>A. f a) = (SUP a\<in>A. ereal (f a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>SUP a\<in>A. ereal (f a)\<bar> \<noteq> \<infinity> \<Longrightarrow> ereal (Sup (f ` A)) = (SUP a\<in>A. ereal (f a))
[PROOF STEP]
by (simp add: ereal_Sup image_comp)


[STATEMENT]
lemma isolated_singularity_at_minus[singularity_intros]:
  assumes f_iso:"isolated_singularity_at f z"
      and g_iso:"isolated_singularity_at g z"
    shows "isolated_singularity_at (\<lambda>w. f w - g w) z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. f w - g w) z
[PROOF STEP]
using isolated_singularity_at_uminus[THEN isolated_singularity_at_add[OF f_iso,of "\<lambda>w. - g w"]
        ,OF g_iso]
[PROOF STATE]
proof (prove)
using this:
isolated_singularity_at (\<lambda>w. f w + - g w) z

goal (1 subgoal):
 1. isolated_singularity_at (\<lambda>w. f w - g w) z
[PROOF STEP]
by simp


[STATEMENT]
lemma degree_reflect_poly_le: "degree (reflect_poly p) \<le> degree p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degree (reflect_poly p) \<le> degree p
[PROOF STEP]
by (simp add: degree_eq_length_coeffs coeffs_reflect_poly length_dropWhile_le diff_le_mono)


[STATEMENT]
lemma inorder_delete:
  "sorted(inorder t) \<Longrightarrow> inorder(delete x t) = del_list x (inorder t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sorted_Less.sorted (Tree2.inorder t) \<Longrightarrow> Tree2.inorder (delete x t) = del_list x (Tree2.inorder t)
[PROOF STEP]
by(induction t)
  (auto simp: del_list_simps inorder_combine inorder_rotateL inorder_rotateR
     not_Leaf_if_not_balanced1 simp del: rotateL.simps rotateR.simps)


[STATEMENT]
lemma soundness:
assumes "check_eqv r s" shows "lang r = lang s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lang r = lang s
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. lang r = lang s
[PROOF STEP]
let ?nr = "norm r"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. lang r = lang s
[PROOF STEP]
let ?ns = "norm s"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. lang r = lang s
[PROOF STEP]
let ?as = "add_atoms ?nr (add_atoms ?ns [])"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. lang r = lang s
[PROOF STEP]
obtain R where 1: "closure ?as (?nr,?ns) = Some([],R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>R. closure (add_atoms (norm r) (add_atoms (norm s) [])) (norm r, norm s) = Some ([], R) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
check_eqv r s

goal (1 subgoal):
 1. (\<And>R. closure (add_atoms (norm r) (add_atoms (norm s) [])) (norm r, norm s) = Some ([], R) \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (auto simp: check_eqv_def Let_def split:option.splits list.splits)
[PROOF STATE]
proof (state)
this:
closure (add_atoms (norm r) (add_atoms (norm s) [])) (norm r, norm s) = Some ([], R)

goal (1 subgoal):
 1. lang r = lang s
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
closure (add_atoms (norm r) (add_atoms (norm s) [])) (norm r, norm s) = Some ([], R)
[PROOF STEP]
have "lang (norm r) = lang (norm s)"
[PROOF STATE]
proof (prove)
using this:
closure (add_atoms (norm r) (add_atoms (norm s) [])) (norm r, norm s) = Some ([], R)

goal (1 subgoal):
 1. lang (norm r) = lang (norm s)
[PROOF STEP]
by (rule closure_sound) (auto simp: set_add_atoms dest!: subsetD[OF atoms_norm])
[PROOF STATE]
proof (state)
this:
lang (norm r) = lang (norm s)

goal (1 subgoal):
 1. lang r = lang s
[PROOF STEP]
thus "lang r = lang s"
[PROOF STATE]
proof (prove)
using this:
lang (norm r) = lang (norm s)

goal (1 subgoal):
 1. lang r = lang s
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
lang r = lang s

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bv_to_int_lower_range: "- (2 ^ (length w - 1)) \<le> bv_to_int w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (2 ^ (length w - 1)) \<le> bv_to_int w
[PROOF STEP]
proof (rule bit_list_cases [of w],simp_all)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>bs. w = \<zero> # bs \<Longrightarrow> - (2 ^ length bs) \<le> int (bv_to_nat bs)
 2. \<And>bs. w = \<one> # bs \<Longrightarrow> - (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))
[PROOF STEP]
fix bs :: "bit list"
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>bs. w = \<zero> # bs \<Longrightarrow> - (2 ^ length bs) \<le> int (bv_to_nat bs)
 2. \<And>bs. w = \<one> # bs \<Longrightarrow> - (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))
[PROOF STEP]
have "- (2 ^ length bs) \<le> (0::int)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (2 ^ length bs) \<le> 0
[PROOF STEP]
by (induct bs) simp_all
[PROOF STATE]
proof (state)
this:
- (2 ^ length bs) \<le> 0

goal (2 subgoals):
 1. \<And>bs. w = \<zero> # bs \<Longrightarrow> - (2 ^ length bs) \<le> int (bv_to_nat bs)
 2. \<And>bs. w = \<one> # bs \<Longrightarrow> - (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
- (2 ^ length bs) \<le> 0

goal (2 subgoals):
 1. \<And>bs. w = \<zero> # bs \<Longrightarrow> - (2 ^ length bs) \<le> int (bv_to_nat bs)
 2. \<And>bs. w = \<one> # bs \<Longrightarrow> - (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))
[PROOF STEP]
have "... \<le> int (bv_to_nat bs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> int (bv_to_nat bs)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
0 \<le> int (bv_to_nat bs)

goal (2 subgoals):
 1. \<And>bs. w = \<zero> # bs \<Longrightarrow> - (2 ^ length bs) \<le> int (bv_to_nat bs)
 2. \<And>bs. w = \<one> # bs \<Longrightarrow> - (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
- (2 ^ length bs) \<le> int (bv_to_nat bs)
[PROOF STEP]
show "- (2 ^ length bs) \<le> int (bv_to_nat bs)"
[PROOF STATE]
proof (prove)
using this:
- (2 ^ length bs) \<le> int (bv_to_nat bs)

goal (1 subgoal):
 1. - (2 ^ length bs) \<le> int (bv_to_nat bs)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
- (2 ^ length bs) \<le> int (bv_to_nat bs)

goal (1 subgoal):
 1. \<And>bs. w = \<one> # bs \<Longrightarrow> - (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>bs. w = \<one> # bs \<Longrightarrow> - (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))
[PROOF STEP]
fix bs
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>bs. w = \<one> # bs \<Longrightarrow> - (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))
[PROOF STEP]
from bv_to_nat_upper_range [of "bv_not bs"]
[PROOF STATE]
proof (chain)
picking this:
bv_to_nat (bv_not bs) < 2 ^ length (bv_not bs)
[PROOF STEP]
show "- (2 ^ length bs) \<le> -1 - int (bv_to_nat (bv_not bs))"
[PROOF STATE]
proof (prove)
using this:
bv_to_nat (bv_not bs) < 2 ^ length (bv_not bs)

goal (1 subgoal):
 1. - (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))
[PROOF STEP]
apply (simp add: algebra_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bv_to_nat (bv_not bs) < 2 ^ length bs \<Longrightarrow> 1 + int (bv_to_nat (bv_not bs)) \<le> 2 ^ length bs
[PROOF STEP]
by (metis of_nat_power add.commute not_less of_nat_numeral zle_add1_eq_le of_nat_le_iff)
[PROOF STATE]
proof (state)
this:
- (2 ^ length bs) \<le> - 1 - int (bv_to_nat (bv_not bs))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hermitian_proj_psi_minus_1:
  "hermitian (2 \<cdot>\<^sub>m proj_psi - 1\<^sub>m N)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hermitian (2 \<cdot>\<^sub>m proj_psi - 1\<^sub>m N)
[PROOF STEP]
unfolding hermitian_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint (2 \<cdot>\<^sub>m proj_psi - 1\<^sub>m N) = 2 \<cdot>\<^sub>m proj_psi - 1\<^sub>m N
[PROOF STEP]
apply (subst adjoint_minus[of _ N N])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. 2 \<cdot>\<^sub>m proj_psi \<in> carrier_mat N N
 2. 1\<^sub>m N \<in> carrier_mat N N
 3. adjoint (2 \<cdot>\<^sub>m proj_psi) - adjoint (1\<^sub>m N) = 2 \<cdot>\<^sub>m proj_psi - 1\<^sub>m N
[PROOF STEP]
apply (auto simp add: proj_psi_dim)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. adjoint (2 \<cdot>\<^sub>m proj_psi) - adjoint (1\<^sub>m N) = 2 \<cdot>\<^sub>m proj_psi - 1\<^sub>m N
[PROOF STEP]
apply (subst adjoint_scale)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjugate 2 \<cdot>\<^sub>m adjoint proj_psi - adjoint (1\<^sub>m N) = 2 \<cdot>\<^sub>m proj_psi - 1\<^sub>m N
[PROOF STEP]
using hermitian_proj_psi[simplified hermitian_def] hermitian_def adjoint_one
[PROOF STATE]
proof (prove)
using this:
adjoint proj_psi = proj_psi
hermitian ?A = (adjoint ?A = ?A)
adjoint (1\<^sub>m ?n) = 1\<^sub>m ?n

goal (1 subgoal):
 1. conjugate 2 \<cdot>\<^sub>m adjoint proj_psi - adjoint (1\<^sub>m N) = 2 \<cdot>\<^sub>m proj_psi - 1\<^sub>m N
[PROOF STEP]
by auto


[STATEMENT]
lemma sorted_wrt_linorder_index_le_imp:
  assumes "linorder_on A R" "set xs \<subseteq> A" "sorted_wrt R xs"
          "x \<in> set xs" "y \<in> set xs" "index xs x \<le> index xs y"
  shows   "(x,y) \<in> R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x, y) \<in> R
[PROOF STEP]
proof (cases "x = y")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x = y \<Longrightarrow> (x, y) \<in> R
 2. x \<noteq> y \<Longrightarrow> (x, y) \<in> R
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
x \<noteq> y

goal (2 subgoals):
 1. x = y \<Longrightarrow> (x, y) \<in> R
 2. x \<noteq> y \<Longrightarrow> (x, y) \<in> R
[PROOF STEP]
define i j where "i = index xs x" and "j = index xs y"
[PROOF STATE]
proof (state)
this:
i = index xs x
j = index xs y

goal (2 subgoals):
 1. x = y \<Longrightarrow> (x, y) \<in> R
 2. x \<noteq> y \<Longrightarrow> (x, y) \<in> R
[PROOF STEP]
from False and assms
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> y
linorder_on A R
set xs \<subseteq> A
Linorder_Relations.sorted_wrt R xs
x \<in> set xs
y \<in> set xs
index xs x \<le> index xs y
[PROOF STEP]
have "i \<noteq> j"
[PROOF STATE]
proof (prove)
using this:
x \<noteq> y
linorder_on A R
set xs \<subseteq> A
Linorder_Relations.sorted_wrt R xs
x \<in> set xs
y \<in> set xs
index xs x \<le> index xs y

goal (1 subgoal):
 1. i \<noteq> j
[PROOF STEP]
by (simp add: i_def j_def)
[PROOF STATE]
proof (state)
this:
i \<noteq> j

goal (2 subgoals):
 1. x = y \<Longrightarrow> (x, y) \<in> R
 2. x \<noteq> y \<Longrightarrow> (x, y) \<in> R
[PROOF STEP]
with \<open>index xs x \<le> index xs y\<close>
[PROOF STATE]
proof (chain)
picking this:
index xs x \<le> index xs y
i \<noteq> j
[PROOF STEP]
have "i < j"
[PROOF STATE]
proof (prove)
using this:
index xs x \<le> index xs y
i \<noteq> j

goal (1 subgoal):
 1. i < j
[PROOF STEP]
by (simp add: i_def j_def)
[PROOF STATE]
proof (state)
this:
i < j

goal (2 subgoals):
 1. x = y \<Longrightarrow> (x, y) \<in> R
 2. x \<noteq> y \<Longrightarrow> (x, y) \<in> R
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
i < j

goal (2 subgoals):
 1. x = y \<Longrightarrow> (x, y) \<in> R
 2. x \<noteq> y \<Longrightarrow> (x, y) \<in> R
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
linorder_on A R
set xs \<subseteq> A
Linorder_Relations.sorted_wrt R xs
x \<in> set xs
y \<in> set xs
index xs x \<le> index xs y
[PROOF STEP]
have "j < length xs"
[PROOF STATE]
proof (prove)
using this:
linorder_on A R
set xs \<subseteq> A
Linorder_Relations.sorted_wrt R xs
x \<in> set xs
y \<in> set xs
index xs x \<le> index xs y

goal (1 subgoal):
 1. j < length xs
[PROOF STEP]
by (simp add: j_def)
[PROOF STATE]
proof (state)
this:
j < length xs

goal (2 subgoals):
 1. x = y \<Longrightarrow> (x, y) \<in> R
 2. x \<noteq> y \<Longrightarrow> (x, y) \<in> R
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
i < j
j < length xs
[PROOF STEP]
have "(xs ! i, xs ! j) \<in> R"
[PROOF STATE]
proof (prove)
using this:
i < j
j < length xs

goal (1 subgoal):
 1. (xs ! i, xs ! j) \<in> R
[PROOF STEP]
using assms(3)
[PROOF STATE]
proof (prove)
using this:
i < j
j < length xs
Linorder_Relations.sorted_wrt R xs

goal (1 subgoal):
 1. (xs ! i, xs ! j) \<in> R
[PROOF STEP]
by (auto simp: sorted_wrt_conv_nth)
[PROOF STATE]
proof (state)
this:
(xs ! i, xs ! j) \<in> R

goal (2 subgoals):
 1. x = y \<Longrightarrow> (x, y) \<in> R
 2. x \<noteq> y \<Longrightarrow> (x, y) \<in> R
[PROOF STEP]
with assms
[PROOF STATE]
proof (chain)
picking this:
linorder_on A R
set xs \<subseteq> A
Linorder_Relations.sorted_wrt R xs
x \<in> set xs
y \<in> set xs
index xs x \<le> index xs y
(xs ! i, xs ! j) \<in> R
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
linorder_on A R
set xs \<subseteq> A
Linorder_Relations.sorted_wrt R xs
x \<in> set xs
y \<in> set xs
index xs x \<le> index xs y
(xs ! i, xs ! j) \<in> R

goal (1 subgoal):
 1. (x, y) \<in> R
[PROOF STEP]
by (simp_all add: i_def j_def)
[PROOF STATE]
proof (state)
this:
(x, y) \<in> R

goal (1 subgoal):
 1. x = y \<Longrightarrow> (x, y) \<in> R
[PROOF STEP]
qed (insert assms, auto simp: linorder_on_def refl_on_def)


[STATEMENT]
lemma cmp_inj:"\<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B \<rbrakk> \<Longrightarrow>
         inj_on (cmp g f) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B\<rbrakk> \<Longrightarrow> inj_on (cmp g f) A
[PROOF STEP]
apply (simp add:inj_on_def [of "cmp g f"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B\<rbrakk> \<Longrightarrow> \<forall>x\<in>A. \<forall>y\<in>A. cmp g f x = cmp g f y \<longrightarrow> x = y
[PROOF STEP]
apply (rule ballI)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B; x \<in> A; y \<in> A\<rbrakk> \<Longrightarrow> cmp g f x = cmp g f y \<longrightarrow> x = y
[PROOF STEP]
apply (simp add:cmp_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B; x \<in> A; y \<in> A\<rbrakk> \<Longrightarrow> g (f x) = g (f y) \<longrightarrow> x = y
[PROOF STEP]
apply (rule impI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B; x \<in> A; y \<in> A; g (f x) = g (f y)\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
apply (subgoal_tac "f x = f y")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x y. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B; x \<in> A; y \<in> A; g (f x) = g (f y); f x = f y\<rbrakk> \<Longrightarrow> x = y
 2. \<And>x y. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B; x \<in> A; y \<in> A; g (f x) = g (f y)\<rbrakk> \<Longrightarrow> f x = f y
[PROOF STEP]
apply (simp add:inj_on_def [of "f"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B; x \<in> A; y \<in> A; g (f x) = g (f y)\<rbrakk> \<Longrightarrow> f x = f y
[PROOF STEP]
apply (frule_tac x = x in funcset_mem [of "f" "A" "B"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B; x \<in> A; y \<in> A; g (f x) = g (f y); f x \<in> B\<rbrakk> \<Longrightarrow> f x = f y
[PROOF STEP]
apply (frule_tac x = y in funcset_mem [of "f" "A" "B"], assumption+)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>f \<in> A \<rightarrow> B; g \<in> B \<rightarrow> C; inj_on f A; inj_on g B; x \<in> A; y \<in> A; g (f x) = g (f y); f x \<in> B; f y \<in> B\<rbrakk> \<Longrightarrow> f x = f y
[PROOF STEP]
apply (simp add:inj_on_def [of "g"])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma word_aligned_0_sum:
  "\<lbrakk> a + b = 0; is_aligned (a :: 'a :: len word) n; b \<le> mask n; n < LENGTH('a) \<rbrakk>
   \<Longrightarrow> a = 0 \<and> b = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a + b = 0; is_aligned a n; b \<le> mask n; n < LENGTH('a)\<rbrakk> \<Longrightarrow> a = 0 \<and> b = 0
[PROOF STEP]
by (simp add: word_plus_and_or_coroll aligned_mask_disjoint word_or_zero)


[STATEMENT]
lemma starfun_exp_less_mono: "\<And>x y::hypreal. x < y \<Longrightarrow> ( *f* exp) x < ( *f* exp) y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x y. x < y \<Longrightarrow> (*f* exp) x < (*f* exp) y
[PROOF STEP]
by transfer (rule exp_less_mono)


[STATEMENT]
lemma bw_diff_const [simp]: "bw_diff (\<lambda>_. c) = (\<lambda>_. 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bw_diff (\<lambda>_. c) = (\<lambda>_. 0::'a)
[PROOF STEP]
by (rule ext) (simp add: bw_diff_def)


[STATEMENT]
lemma suffix_conc_fst[simp]:
  assumes "n \<le> length u"
  shows "suffix n (u \<frown> v) = drop n u \<frown> v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. suffix n (u \<frown> v) = drop n u \<frown> v
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. suffix n (u \<frown> v) x = (drop n u \<frown> v) x
[PROOF STEP]
show "suffix n (u \<frown> v) i = (drop n u \<frown> v) i" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. suffix n (u \<frown> v) i = (drop n u \<frown> v) i
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
n \<le> length u

goal (1 subgoal):
 1. suffix n (u \<frown> v) i = (drop n u \<frown> v) i
[PROOF STEP]
by (cases "n + i < length u") (auto simp: algebra_simps)
[PROOF STATE]
proof (state)
this:
suffix n (u \<frown> v) ?i = (drop n u \<frown> v) ?i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma component_path: "u\<in>nodes (component_of g r) \<Longrightarrow>
  path (component_of g r) u p v \<longleftrightarrow> path g u p v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. u \<in> nodes (component_of g r) \<Longrightarrow> path (component_of g r) u p v = path g u p v
[PROOF STEP]
apply rule
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>u \<in> nodes (component_of g r); path (component_of g r) u p v\<rbrakk> \<Longrightarrow> path g u p v
 2. \<lbrakk>u \<in> nodes (component_of g r); path g u p v\<rbrakk> \<Longrightarrow> path (component_of g r) u p v
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u \<in> nodes (component_of g r); path (component_of g r) u p v\<rbrakk> \<Longrightarrow> path g u p v
[PROOF STEP]
by (erule path_mono[OF component_edges_subset])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u \<in> nodes (component_of g r); path g u p v\<rbrakk> \<Longrightarrow> path (component_of g r) u p v
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>u \<in> nodes (component_of g r); path g u p v\<rbrakk> \<Longrightarrow> path (component_of g r) u p v
[PROOF STEP]
by (induction p arbitrary: u) (auto simp: reachable_nodes_step')
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma soundness_mat_leqb_eqc2:
  assumes "dim_row A\<^sup>T = dim_vec c"
  assumes "dim_col A\<^sup>T = dim_vec b"
  assumes "simplex (mat_leqb_eqc A b c) = Sat X"
  shows "\<exists>y. [y \<^sub>v* A]=c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>y. [y\<^sub>v*A]=c
[PROOF STEP]
proof (standard, intro mat_times_vec_eqI)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. dim_col A\<^sup>T = dim_vec ?y
 2. dim_row A\<^sup>T = dim_vec c
 3. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v ?y) $ i = c $ i
[PROOF STEP]
define y where x: "y = snd (split_n_m_x (dim_col A) (dim_row A) X)"
[PROOF STATE]
proof (state)
this:
y = snd (split_n_m_x (dim_col A) (dim_row A) X)

goal (3 subgoals):
 1. dim_col A\<^sup>T = dim_vec ?y
 2. dim_row A\<^sup>T = dim_vec c
 3. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v ?y) $ i = c $ i
[PROOF STEP]
have *: "dim_vec y = dim_row A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_vec y = dim_row A
[PROOF STEP]
by (simp add: split_i_j_x_def x)
[PROOF STATE]
proof (state)
this:
dim_vec y = dim_row A

goal (3 subgoals):
 1. dim_col A\<^sup>T = dim_vec ?y
 2. dim_row A\<^sup>T = dim_vec c
 3. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v ?y) $ i = c $ i
[PROOF STEP]
show "dim_col A\<^sup>T = dim_vec y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_col A\<^sup>T = dim_vec y
[PROOF STEP]
by (simp add: "*")
[PROOF STATE]
proof (state)
this:
dim_col A\<^sup>T = dim_vec y

goal (2 subgoals):
 1. dim_row A\<^sup>T = dim_vec c
 2. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v snd (split_n_m_x (dim_col A) (dim_row A) X)) $ i = c $ i
[PROOF STEP]
show "dim_row A\<^sup>T = dim_vec c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_row A\<^sup>T = dim_vec c
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
dim_row A\<^sup>T = dim_vec c

goal (1 subgoal):
 1. dim_row A\<^sup>T = dim_vec c
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
dim_row A\<^sup>T = dim_vec c

goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v snd (split_n_m_x (dim_col A) (dim_row A) X)) $ i = c $ i
[PROOF STEP]
show "\<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v y) $ i = c $ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v y) $ i = c $ i
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v y) $ i = c $ i
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v y) $ i = c $ i
[PROOF STEP]
assume a: "i < dim_vec c"
[PROOF STATE]
proof (state)
this:
i < dim_vec c

goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v y) $ i = c $ i
[PROOF STEP]
have "[y \<^sub>v* A]=c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [y\<^sub>v*A]=c
[PROOF STEP]
using mat_leqb_eqc_split_correct2[of c A b _ _ y, OF assms(1)[symmetric] assms(2)[symmetric]]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<langle>?X\<rangle> \<Turnstile>\<^sub>c\<^sub>s set (mat_leqb_eqc A b c); (?x, y) = split_n_m_x (dim_row A\<^sup>T) (dim_col A\<^sup>T) ?X\<rbrakk> \<Longrightarrow> [y\<^sub>v*A]=c

goal (1 subgoal):
 1. [y\<^sub>v*A]=c
[PROOF STEP]
by (metis Matrix.transpose_transpose assms(3) index_transpose_mat(2)
          simplex(3) snd_conv split_i_j_x_def x)
[PROOF STATE]
proof (state)
this:
[y\<^sub>v*A]=c

goal (1 subgoal):
 1. \<And>i. i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v y) $ i = c $ i
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[y\<^sub>v*A]=c
[PROOF STEP]
show "(A\<^sup>T *\<^sub>v y) $ i = c $ i"
[PROOF STATE]
proof (prove)
using this:
[y\<^sub>v*A]=c

goal (1 subgoal):
 1. (A\<^sup>T *\<^sub>v y) $ i = c $ i
[PROOF STEP]
by (metis a vec_times_mat_eq_def)
[PROOF STATE]
proof (state)
this:
(A\<^sup>T *\<^sub>v y) $ i = c $ i

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?i < dim_vec c \<Longrightarrow> (A\<^sup>T *\<^sub>v y) $ ?i = c $ ?i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bifunctor_flip_ObjMap_vrange[cat_cs_simps]:
  assumes "category \<alpha> \<AA>"
    and "category \<alpha> \<BB>"
    and "\<FF> : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) = \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) = \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) = \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
interpret \<FF>: is_functor \<alpha> \<open>\<AA> \<times>\<^sub>C \<BB>\<close> \<CC> \<FF>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<FF> : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
[PROOF STEP]
by (rule assms(3))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) = \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) = \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
proof(intro vsubset_antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
 2. \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
show "\<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
proof
      (
        intro vsv.vsv_vrange_vsubset,
        unfold bifunctor_flip_ObjMap_vdomain[OF assms]
      )
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. vsv (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr> \<Longrightarrow> bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
fix ba
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. vsv (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr> \<Longrightarrow> bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
assume "ba \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (state)
this:
ba \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>

goal (2 subgoals):
 1. vsv (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr> \<Longrightarrow> bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ba \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>
[PROOF STEP]
obtain a b
        where ba_def: "ba = [b, a]\<^sub>\<circ>"
          and b: "b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>"
          and a: "a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (prove)
using this:
ba \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>

goal (1 subgoal):
 1. (\<And>b a. \<lbrakk>ba = [b, a]\<^sub>\<circ>; b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>; a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (elim cat_prod_2_ObjE[OF assms(2,1)])
[PROOF STATE]
proof (state)
this:
ba = [b, a]\<^sub>\<circ>
b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>
a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>

goal (2 subgoals):
 1. vsv (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr> \<Longrightarrow> bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
from assms a b
[PROOF STATE]
proof (chain)
picking this:
category \<alpha> \<AA>
category \<alpha> \<BB>
\<FF> : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>
[PROOF STEP]
show
        "bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>\<lparr>ba\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)"
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<AA>
category \<alpha> \<BB>
\<FF> : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>

goal (1 subgoal):
 1. bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>\<lparr>ba\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
unfolding ba_def
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<AA>
category \<alpha> \<BB>
\<FF> : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>

goal (1 subgoal):
 1. b \<otimes>\<^sub>H\<^sub>M\<^sub>.\<^sub>O\<^bsub>bifunctor_flip \<AA> \<BB> \<FF>\<^esub> a \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
by
          (
            cs_concl cs_shallow
              cs_simp: cat_cs_simps cs_intro: V_cs_intros cat_prod_cs_intros
          )
[PROOF STATE]
proof (state)
this:
bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>\<lparr>ba\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)

goal (1 subgoal):
 1. vsv (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
qed (auto intro: cat_cs_intros)
[PROOF STATE]
proof (state)
this:
\<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)

goal (1 subgoal):
 1. \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
show "\<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
proof(intro vsv.vsv_vrange_vsubset, unfold \<FF>.cf_ObjMap_vdomain)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. vsv (\<FF>\<lparr>ObjMap\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr> \<Longrightarrow> \<FF>\<lparr>ObjMap\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
fix ab
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. vsv (\<FF>\<lparr>ObjMap\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr> \<Longrightarrow> \<FF>\<lparr>ObjMap\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
assume prems: "ab \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (state)
this:
ab \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>

goal (2 subgoals):
 1. vsv (\<FF>\<lparr>ObjMap\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr> \<Longrightarrow> \<FF>\<lparr>ObjMap\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
ab \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>
[PROOF STEP]
obtain a b
        where ab_def: "ab = [a, b]\<^sub>\<circ>"
          and a: "a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>"
          and b: "b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (prove)
using this:
ab \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>

goal (1 subgoal):
 1. (\<And>a b. \<lbrakk>ab = [a, b]\<^sub>\<circ>; a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>; b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (elim cat_prod_2_ObjE[OF assms(1,2)])
[PROOF STATE]
proof (state)
this:
ab = [a, b]\<^sub>\<circ>
a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>

goal (2 subgoals):
 1. vsv (\<FF>\<lparr>ObjMap\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr> \<Longrightarrow> \<FF>\<lparr>ObjMap\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
from assms a b
[PROOF STATE]
proof (chain)
picking this:
category \<alpha> \<AA>
category \<alpha> \<BB>
\<FF> : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>
[PROOF STEP]
have ba: "[b, a]\<^sub>\<circ> \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>"
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<AA>
category \<alpha> \<BB>
\<FF> : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>

goal (1 subgoal):
 1. [b, a]\<^sub>\<circ> \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>
[PROOF STEP]
by (cs_concl cs_shallow cs_intro: cat_prod_cs_intros)
[PROOF STATE]
proof (state)
this:
[b, a]\<^sub>\<circ> \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>

goal (2 subgoals):
 1. vsv (\<FF>\<lparr>ObjMap\<rparr>)
 2. \<And>x. x \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr> \<Longrightarrow> \<FF>\<lparr>ObjMap\<rparr>\<lparr>x\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
from assms bifunctor_flip_ObjMap_vsv prems a b ba
[PROOF STATE]
proof (chain)
picking this:
category \<alpha> \<AA>
category \<alpha> \<BB>
\<FF> : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
vsv (bifunctor_flip ?\<AA> ?\<BB> ?\<FF>\<lparr>ObjMap\<rparr>)
ab \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>
a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>
[b, a]\<^sub>\<circ> \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>
[PROOF STEP]
show
        "\<FF>\<lparr>ObjMap\<rparr>\<lparr>ab\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)"
[PROOF STATE]
proof (prove)
using this:
category \<alpha> \<AA>
category \<alpha> \<BB>
\<FF> : \<AA> \<times>\<^sub>C \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
vsv (bifunctor_flip ?\<AA> ?\<BB> ?\<FF>\<lparr>ObjMap\<rparr>)
ab \<in>\<^sub>\<circ> (\<AA> \<times>\<^sub>C \<BB>)\<lparr>Obj\<rparr>
a \<in>\<^sub>\<circ> \<AA>\<lparr>Obj\<rparr>
b \<in>\<^sub>\<circ> \<BB>\<lparr>Obj\<rparr>
[b, a]\<^sub>\<circ> \<in>\<^sub>\<circ> (\<BB> \<times>\<^sub>C \<AA>)\<lparr>Obj\<rparr>

goal (1 subgoal):
 1. \<FF>\<lparr>ObjMap\<rparr>\<lparr>ab\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
by
          (
            cs_concl cs_shallow
              cs_simp: ab_def cat_cs_simps cs_intro: V_cs_intros
          )
[PROOF STATE]
proof (state)
this:
\<FF>\<lparr>ObjMap\<rparr>\<lparr>ab\<rparr> \<in>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)

goal (1 subgoal):
 1. vsv (\<FF>\<lparr>ObjMap\<rparr>)
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
\<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>) \<subseteq>\<^sub>\<circ> \<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<R>\<^sub>\<circ> (bifunctor_flip \<AA> \<BB> \<FF>\<lparr>ObjMap\<rparr>) = \<R>\<^sub>\<circ> (\<FF>\<lparr>ObjMap\<rparr>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma continuous_map_of_fst:
   "continuous_map (prod_topology X Y) Z (f \<circ> fst) \<longleftrightarrow> topspace Y = {} \<or> continuous_map X Z f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
[PROOF STEP]
proof (cases "topspace Y = {}")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. topspace Y = {} \<Longrightarrow> continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
 2. topspace Y \<noteq> {} \<Longrightarrow> continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
topspace Y = {}

goal (2 subgoals):
 1. topspace Y = {} \<Longrightarrow> continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
 2. topspace Y \<noteq> {} \<Longrightarrow> continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
topspace Y = {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
topspace Y = {}

goal (1 subgoal):
 1. continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
[PROOF STEP]
by (simp add: continuous_map_on_empty)
[PROOF STATE]
proof (state)
this:
continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)

goal (1 subgoal):
 1. topspace Y \<noteq> {} \<Longrightarrow> continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. topspace Y \<noteq> {} \<Longrightarrow> continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
topspace Y \<noteq> {}

goal (1 subgoal):
 1. topspace Y \<noteq> {} \<Longrightarrow> continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
topspace Y \<noteq> {}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
topspace Y \<noteq> {}

goal (1 subgoal):
 1. continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)
[PROOF STEP]
by (simp add: continuous_compose_quotient_map_eq)
[PROOF STATE]
proof (state)
this:
continuous_map (prod_topology X Y) Z (f \<circ> fst) = (topspace Y = {} \<or> continuous_map X Z f)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma hypext_sqrt_hyperdual_parts:
      "a > 0 \<Longrightarrow>  (*h* sqrt) (a *\<^sub>H ba + b *\<^sub>H e1 + c *\<^sub>H e2 + d *\<^sub>H e12) =
       sqrt a *\<^sub>H ba + (b * inverse (sqrt a) / 2) *\<^sub>H e1 + (c * inverse (sqrt a) / 2) *\<^sub>H e2 +
       (d * inverse (sqrt a) / 2 - b * c * inverse (sqrt a ^ 3) / 4) *\<^sub>H e12"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < a \<Longrightarrow> (*h* sqrt) (a *\<^sub>H ba + b *\<^sub>H e1 + c *\<^sub>H e2 + d *\<^sub>H e12) = sqrt a *\<^sub>H ba + (b * inverse (sqrt a) / 2) *\<^sub>H e1 + (c * inverse (sqrt a) / 2) *\<^sub>H e2 + (d * inverse (sqrt a) / 2 - b * c * inverse (sqrt a ^ 3) / 4) *\<^sub>H e12
[PROOF STEP]
by (metis Hyperdual_eq hypext_sqrt_Hyperdual)


[STATEMENT]
lemma X_I_ZmX_eq:
  shows "X_I * I_ZmX = X_ZmX"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X_I * I_ZmX = X_ZmX
[PROOF STEP]
unfolding X_I_def I_ZmX_def X_ZmX_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (X \<Otimes> 1\<^sub>m 2) * (1\<^sub>m 2 \<Otimes> ZmX) = X \<Otimes> ZmX
[PROOF STEP]
using mult_distr_tensor
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>dim_col ?A = dim_row ?B; dim_col ?C = dim_row ?D; 0 < dim_col ?A; 0 < dim_col ?B; 0 < dim_col ?C; 0 < dim_col ?D\<rbrakk> \<Longrightarrow> ?A * ?B \<Otimes> ?C * ?D = (?A \<Otimes> ?C) * (?B \<Otimes> ?D)

goal (1 subgoal):
 1. (X \<Otimes> 1\<^sub>m 2) * (1\<^sub>m 2 \<Otimes> ZmX) = X \<Otimes> ZmX
[PROOF STEP]
by (metis (no_types, lifting) X_inv ZmX_inv index_mult_mat(2) index_mult_mat(3) index_one_mat(2)
      index_one_mat(3) left_mult_one_mat' pos2 right_mult_one_mat')


[STATEMENT]
lemma (in Order) BNTr7_7:"\<lbrakk>S_inductive_set D; f \<in> carrier D \<rightarrow> carrier D;
      a \<in> carrier D; \<forall>x\<in>carrier D. x \<preceq> (f x); \<exists>xa. Wa D xa f a \<and> x \<in> xa\<rbrakk> \<Longrightarrow>
      x \<in> \<Union>(WWa D f a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S_inductive_set D; f \<in> carrier D \<rightarrow> carrier D; a \<in> carrier D; \<forall>x\<in>carrier D. x \<preceq> f x; \<exists>xa. Wa D xa f a \<and> x \<in> xa\<rbrakk> \<Longrightarrow> x \<in> \<Union> (WWa D f a)
[PROOF STEP]
apply (subst Union_iff[of "x" "WWa D f a"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>S_inductive_set D; f \<in> carrier D \<rightarrow> carrier D; a \<in> carrier D; \<forall>x\<in>carrier D. x \<preceq> f x; \<exists>xa. Wa D xa f a \<and> x \<in> xa\<rbrakk> \<Longrightarrow> Bex (WWa D f a) ((\<in>) x)
[PROOF STEP]
apply (subst WWa_def, blast)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma (in normalization_semidom) normalize_prod_mset_normalize:
  "normalize (prod_mset (image_mset normalize A)) = normalize (prod_mset A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. normalize (\<Prod>\<^sub># (image_mset normalize A)) = normalize (\<Prod>\<^sub># A)
[PROOF STEP]
proof (induction A)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. normalize (\<Prod>\<^sub># (image_mset normalize {#})) = normalize (\<Prod>\<^sub># {#})
 2. \<And>x A. normalize (\<Prod>\<^sub># (image_mset normalize A)) = normalize (\<Prod>\<^sub># A) \<Longrightarrow> normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (\<Prod>\<^sub># (add_mset x A))
[PROOF STEP]
case (add x A)
[PROOF STATE]
proof (state)
this:
normalize (\<Prod>\<^sub># (image_mset normalize A)) = normalize (\<Prod>\<^sub># A)

goal (2 subgoals):
 1. normalize (\<Prod>\<^sub># (image_mset normalize {#})) = normalize (\<Prod>\<^sub># {#})
 2. \<And>x A. normalize (\<Prod>\<^sub># (image_mset normalize A)) = normalize (\<Prod>\<^sub># A) \<Longrightarrow> normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (\<Prod>\<^sub># (add_mset x A))
[PROOF STEP]
have "normalize (prod_mset (image_mset normalize (add_mset x A))) =
          normalize (x * normalize (prod_mset (image_mset normalize A)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (x * normalize (\<Prod>\<^sub># (image_mset normalize A)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (x * normalize (\<Prod>\<^sub># (image_mset normalize A)))

goal (2 subgoals):
 1. normalize (\<Prod>\<^sub># (image_mset normalize {#})) = normalize (\<Prod>\<^sub># {#})
 2. \<And>x A. normalize (\<Prod>\<^sub># (image_mset normalize A)) = normalize (\<Prod>\<^sub># A) \<Longrightarrow> normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (\<Prod>\<^sub># (add_mset x A))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (x * normalize (\<Prod>\<^sub># (image_mset normalize A)))

goal (2 subgoals):
 1. normalize (\<Prod>\<^sub># (image_mset normalize {#})) = normalize (\<Prod>\<^sub># {#})
 2. \<And>x A. normalize (\<Prod>\<^sub># (image_mset normalize A)) = normalize (\<Prod>\<^sub># A) \<Longrightarrow> normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (\<Prod>\<^sub># (add_mset x A))
[PROOF STEP]
note add.IH
[PROOF STATE]
proof (state)
this:
normalize (\<Prod>\<^sub># (image_mset normalize A)) = normalize (\<Prod>\<^sub># A)

goal (2 subgoals):
 1. normalize (\<Prod>\<^sub># (image_mset normalize {#})) = normalize (\<Prod>\<^sub># {#})
 2. \<And>x A. normalize (\<Prod>\<^sub># (image_mset normalize A)) = normalize (\<Prod>\<^sub># A) \<Longrightarrow> normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (\<Prod>\<^sub># (add_mset x A))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (x * normalize (\<Prod>\<^sub># A))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (x * normalize (\<Prod>\<^sub># A))

goal (1 subgoal):
 1. normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (\<Prod>\<^sub># (add_mset x A))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
normalize (\<Prod>\<^sub># (image_mset normalize (add_mset x A))) = normalize (\<Prod>\<^sub># (add_mset x A))

goal (1 subgoal):
 1. normalize (\<Prod>\<^sub># (image_mset normalize {#})) = normalize (\<Prod>\<^sub># {#})
[PROOF STEP]
qed auto


[STATEMENT]
lemma point_not_equal:
  assumes "is_point p"
      and "is_point q"
    shows "p\<noteq>q \<longleftrightarrow> p\<le>-q"
      and "p\<le>-q \<longleftrightarrow> p;q\<^sup>T \<le> -1'"
      and "p;q\<^sup>T \<le> -1' \<longleftrightarrow> p\<^sup>T;q \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p \<noteq> q) = (p \<le> - q) &&& (p \<le> - q) = (p ; q\<^sup>T \<le> - 1') &&& (p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. (p \<noteq> q) = (p \<le> - q)
 2. (p \<le> - q) = (p ; q\<^sup>T \<le> - 1')
 3. (p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)
[PROOF STEP]
have "p \<noteq> q \<Longrightarrow> p \<le> - q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<noteq> q \<Longrightarrow> p \<le> - q
[PROOF STEP]
by (metis assms point_not_equal_aux is_point_def vector_compl vector_mult point_singleton
              inf.orderI inf.cobounded1)
[PROOF STATE]
proof (state)
this:
p \<noteq> q \<Longrightarrow> p \<le> - q

goal (3 subgoals):
 1. (p \<noteq> q) = (p \<le> - q)
 2. (p \<le> - q) = (p ; q\<^sup>T \<le> - 1')
 3. (p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)
[PROOF STEP]
thus "p\<noteq>q \<longleftrightarrow> p\<le>-q"
[PROOF STATE]
proof (prove)
using this:
p \<noteq> q \<Longrightarrow> p \<le> - q

goal (1 subgoal):
 1. (p \<noteq> q) = (p \<le> - q)
[PROOF STEP]
by (metis assms(1) galois_aux inf.orderE is_point_def order.refl)
[PROOF STATE]
proof (state)
this:
(p \<noteq> q) = (p \<le> - q)

goal (2 subgoals):
 1. (p \<le> - q) = (p ; q\<^sup>T \<le> - 1')
 2. (p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (p \<le> - q) = (p ; q\<^sup>T \<le> - 1')
 2. (p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)
[PROOF STEP]
show "(p \<le> - q) = (p ; q\<^sup>T \<le> - 1')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p \<le> - q) = (p ; q\<^sup>T \<le> - 1')
[PROOF STEP]
by (simp add: conv_galois_2)
[PROOF STATE]
proof (state)
this:
(p \<le> - q) = (p ; q\<^sup>T \<le> - 1')

goal (1 subgoal):
 1. (p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)
[PROOF STEP]
show "(p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)
[PROOF STEP]
by (metis assms(2) compl_bot_eq conv_galois_2 galois_aux maddux_141 mult_1_right
              point_equations(4))
[PROOF STATE]
proof (state)
this:
(p ; q\<^sup>T \<le> - 1') = (p\<^sup>T ; q \<le> 0)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lookup_monom_of_set:
  "Poly_Mapping.lookup (monom_of_set X) i = (if finite X \<and> i \<in> X then 1 else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. lookup (monom_of_set X) i = (if finite X \<and> i \<in> X then 1 else 0)
[PROOF STEP]
by transfer auto


[STATEMENT]
lemma solvable_condition:
  assumes "group_hom G H f" "group_hom H K g"
    and "g ` (carrier H) = carrier K" and "kernel H K g \<subseteq> f ` (carrier G)"
    and "solvable G" "solvable K" shows "solvable H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. solvable H
[PROOF STEP]
using solvable_seq_condition[OF assms(1-2) _ assms(4) group.subgroup_self] assms(3,5-6)
        subgroup.subset[OF group_hom.img_is_subgroup[OF assms(1)]] group_hom.axioms(2)[OF assms(1)]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>f ` carrier G \<subseteq> carrier H; Group.group H; solvable_seq G (carrier G); solvable_seq K (g ` carrier H)\<rbrakk> \<Longrightarrow> solvable_seq H (carrier H)
g ` carrier H = carrier K
solvable G
solvable K
f ` carrier G \<subseteq> carrier H
Group.group H

goal (1 subgoal):
 1. solvable H
[PROOF STEP]
by (simp add: solvable_def)


[STATEMENT]
lemma (in prob_space) indep_vars_nn_integral:
  assumes I: "finite I" "indep_vars (\<lambda>_. borel) X I" "\<And>i \<omega>. i \<in> I \<Longrightarrow> 0 \<le> X i \<omega>"
  shows "(\<integral>\<^sup>+\<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M) = (\<Prod>i\<in>I. \<integral>\<^sup>+\<omega>. X i \<omega> \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
proof cases
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
assume "I \<noteq> {}"
[PROOF STATE]
proof (state)
this:
I \<noteq> {}

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
define Y where [abs_def]: "Y i \<omega> = (if i \<in> I then X i \<omega> else 0)" for i \<omega>
[PROOF STATE]
proof (state)
this:
Y \<equiv> \<lambda>i \<omega>. if i \<in> I then X i \<omega> else 0

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
Y \<equiv> \<lambda>i \<omega>. if i \<in> I then X i \<omega> else 0

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
have "i \<in> I \<Longrightarrow> random_variable borel (X i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i \<in> I \<Longrightarrow> random_variable borel (X i)
[PROOF STEP]
using I(2)
[PROOF STATE]
proof (prove)
using this:
indep_vars (\<lambda>_. borel) X I

goal (1 subgoal):
 1. i \<in> I \<Longrightarrow> random_variable borel (X i)
[PROOF STEP]
by (cases "i\<in>I") (auto simp: indep_vars_def)
[PROOF STATE]
proof (state)
this:
i \<in> I \<Longrightarrow> random_variable borel (X i)

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
?i10 \<in> I \<Longrightarrow> random_variable borel (X ?i10)

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
note rv_X = this
[PROOF STATE]
proof (state)
this:
?i10 \<in> I \<Longrightarrow> random_variable borel (X ?i10)

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
this:
?i10 \<in> I \<Longrightarrow> random_variable borel (X ?i10)

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
have "random_variable borel (Y i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. random_variable borel (Y i)
[PROOF STEP]
using I(2)
[PROOF STATE]
proof (prove)
using this:
indep_vars (\<lambda>_. borel) X I

goal (1 subgoal):
 1. random_variable borel (Y i)
[PROOF STEP]
by (cases "i\<in>I") (auto simp: Y_def rv_X)
[PROOF STATE]
proof (state)
this:
random_variable borel (Y i)

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
random_variable borel (Y ?i10)

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
note rv_Y = this[measurable]
[PROOF STATE]
proof (state)
this:
random_variable borel (Y ?i10)

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
interpret Y: prob_space "distr M borel (Y i)" for i
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prob_space (distr M borel (Y i))
[PROOF STEP]
using I(2)
[PROOF STATE]
proof (prove)
using this:
indep_vars (\<lambda>_. borel) X I

goal (1 subgoal):
 1. prob_space (distr M borel (Y i))
[PROOF STEP]
by (cases "i \<in> I") (auto intro!: prob_space_distr simp: indep_vars_def prob_space_return)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
interpret product_sigma_finite "\<lambda>i. distr M borel (Y i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. product_sigma_finite (\<lambda>i. distr M borel (Y i))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
have indep_Y: "indep_vars (\<lambda>i. borel) Y I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. indep_vars (\<lambda>i. borel) Y I
[PROOF STEP]
by (rule indep_vars_cong[THEN iffD1, OF _ _ _ I(2)]) (auto simp: Y_def)
[PROOF STATE]
proof (state)
this:
indep_vars (\<lambda>i. borel) Y I

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
have "(\<integral>\<^sup>+\<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M) = (\<integral>\<^sup>+\<omega>. (\<Prod>i\<in>I. Y i \<omega>) \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. Y i \<omega>) \<partial>M
[PROOF STEP]
using I(3)
[PROOF STATE]
proof (prove)
using this:
?i8 \<in> I \<Longrightarrow> 0 \<le> X ?i8 ?\<omega>8

goal (1 subgoal):
 1. \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. Y i \<omega>) \<partial>M
[PROOF STEP]
by (auto intro!: nn_integral_cong prod.cong simp add: Y_def max_def)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. Y i \<omega>) \<partial>M

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. Y i \<omega>) \<partial>M

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
have "\<dots> = (\<integral>\<^sup>+\<omega>. (\<Prod>i\<in>I. \<omega> i) \<partial>distr M (Pi\<^sub>M I (\<lambda>i. borel)) (\<lambda>x. \<lambda>i\<in>I. Y i x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. Y i \<omega>) \<partial>M = \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>distr M (Pi\<^sub>M I (\<lambda>i. borel)) (\<lambda>x. \<lambda>i\<in>I. Y i x)
[PROOF STEP]
by (subst nn_integral_distr) auto
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. Y i \<omega>) \<partial>M = \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>distr M (Pi\<^sub>M I (\<lambda>i. borel)) (\<lambda>x. \<lambda>i\<in>I. Y i x)

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. Y i \<omega>) \<partial>M = \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>distr M (Pi\<^sub>M I (\<lambda>i. borel)) (\<lambda>x. \<lambda>i\<in>I. Y i x)

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
have "\<dots> = (\<integral>\<^sup>+\<omega>. (\<Prod>i\<in>I. \<omega> i) \<partial>Pi\<^sub>M I (\<lambda>i. distr M borel (Y i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>distr M (Pi\<^sub>M I (\<lambda>i. borel)) (\<lambda>x. \<lambda>i\<in>I. Y i x) = \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>Pi\<^sub>M I (\<lambda>i. distr M borel (Y i))
[PROOF STEP]
unfolding indep_vars_iff_distr_eq_PiM[THEN iffD1, OF \<open>I \<noteq> {}\<close> rv_Y indep_Y]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>Pi\<^sub>M I (\<lambda>i. distr M borel (Y i)) = \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>Pi\<^sub>M I (\<lambda>i. distr M borel (Y i))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>distr M (Pi\<^sub>M I (\<lambda>i. borel)) (\<lambda>x. \<lambda>i\<in>I. Y i x) = \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>Pi\<^sub>M I (\<lambda>i. distr M borel (Y i))

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>distr M (Pi\<^sub>M I (\<lambda>i. borel)) (\<lambda>x. \<lambda>i\<in>I. Y i x) = \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>Pi\<^sub>M I (\<lambda>i. distr M borel (Y i))

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
have "\<dots> = (\<Prod>i\<in>I. (\<integral>\<^sup>+\<omega>. \<omega> \<partial>distr M borel (Y i)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>Pi\<^sub>M I (\<lambda>i. distr M borel (Y i)) = (\<Prod>i\<in>I. \<integral>\<^sup>+ \<omega>. \<omega> \<partial>distr M borel (Y i))
[PROOF STEP]
by (rule product_nn_integral_prod) (auto intro: \<open>finite I\<close>)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>Pi\<^sub>M I (\<lambda>i. distr M borel (Y i)) = (\<Prod>i\<in>I. \<integral>\<^sup>+ \<omega>. \<omega> \<partial>distr M borel (Y i))

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ \<omega>. prod \<omega> I \<partial>Pi\<^sub>M I (\<lambda>i. distr M borel (Y i)) = (\<Prod>i\<in>I. \<integral>\<^sup>+ \<omega>. \<omega> \<partial>distr M borel (Y i))

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
have "\<dots> = (\<Prod>i\<in>I. \<integral>\<^sup>+\<omega>. X i \<omega> \<partial>M)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Prod>i\<in>I. \<integral>\<^sup>+ \<omega>. \<omega> \<partial>distr M borel (Y i)) = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
by (intro prod.cong nn_integral_cong) (auto simp: nn_integral_distr Y_def rv_X)
[PROOF STATE]
proof (state)
this:
(\<Prod>i\<in>I. \<integral>\<^sup>+ \<omega>. \<omega> \<partial>distr M borel (Y i)) = (\<Prod>i\<in>I. integral\<^sup>N M (X i))

goal (2 subgoals):
 1. ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
 2. \<not> ?P \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))

goal (1 subgoal):
 1. \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))

goal (1 subgoal):
 1. \<not> I \<noteq> {} \<Longrightarrow> \<integral>\<^sup>+ \<omega>. (\<Prod>i\<in>I. X i \<omega>) \<partial>M = (\<Prod>i\<in>I. integral\<^sup>N M (X i))
[PROOF STEP]
qed (simp add: emeasure_space_1)


[STATEMENT]
lemma collision_d: "collision S \<longleftrightarrow> (\<exists>t\<in>S. d t = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. collision S = (\<exists>t\<in>S. d t = 0)
[PROOF STEP]
by (force simp: d_diff collision_def )


[STATEMENT]
lemma insertion_aux_irrelevant_vars:
fixes p::"((nat \<Rightarrow>\<^sub>0 nat) \<Rightarrow>\<^sub>0 'a::comm_ring_1)"
assumes "\<And>m v. lookup p m \<noteq> 0 \<Longrightarrow> lookup m v \<noteq> 0 \<Longrightarrow> f v = g v"
shows "insertion_aux f p = insertion_aux g p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insertion_aux f p = insertion_aux g p
[PROOF STEP]
using insertion_fun_irrelevant_vars[of "lookup p" f g] assms
[PROOF STATE]
proof (prove)
using this:
(\<And>m v. \<lbrakk>lookup p m \<noteq> (0::'a); lookup m v \<noteq> 0\<rbrakk> \<Longrightarrow> f v = g v) \<Longrightarrow> insertion_fun f (lookup p) = insertion_fun g (lookup p)
\<lbrakk>lookup p ?m \<noteq> (0::'a); lookup ?m ?v \<noteq> 0\<rbrakk> \<Longrightarrow> f ?v = g ?v

goal (1 subgoal):
 1. insertion_aux f p = insertion_aux g p
[PROOF STEP]
by (metis insertion_aux.rep_eq)


[STATEMENT]
lemma dverts_child_count_ge1:
  "\<lbrakk>(t1,e1) \<in> fset xs; x \<in> dverts t1\<rbrakk> \<Longrightarrow> count (\<Sum>(t, e)\<in>fset xs. dverts_mset t) x \<ge> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(t1, e1) \<in> fset xs; x \<in> dverts t1\<rbrakk> \<Longrightarrow> 1 \<le> count (\<Sum>(t, e)\<in>fset xs. dverts_mset t) x
[PROOF STEP]
by (simp add: mset_sum_elemI)


[STATEMENT]
lemma irreducible_cases: "irreducible p \<longleftrightarrow>
  degree p = 0 \<and> irreducible (coeff p 0) \<or>
  degree p \<noteq> 0 \<and> irreducible (map_poly to_fract p) \<and> content_ff_ff p =dff 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. irreducible p = (degree p = 0 \<and> irreducible (coeff p 0) \<or> degree p \<noteq> 0 \<and> irreducible (map_poly to_fract p) \<and> content_ff (map_poly to_fract p) =dff 1)
[PROOF STEP]
using irreducible_PM_M_PFM irreducible_M_PM irreducible_PFM_PM
[PROOF STATE]
proof (prove)
using this:
irreducible ?p \<Longrightarrow> degree ?p = 0 \<and> irreducible (coeff ?p 0) \<or> degree ?p \<noteq> 0 \<and> irreducible (map_poly to_fract ?p) \<and> content_ff (map_poly to_fract ?p) =dff 1
\<lbrakk>degree ?p = 0; irreducible (coeff ?p 0)\<rbrakk> \<Longrightarrow> irreducible ?p
\<lbrakk>irreducible (map_poly to_fract ?p); content_ff (map_poly to_fract ?p) =dff 1\<rbrakk> \<Longrightarrow> irreducible ?p

goal (1 subgoal):
 1. irreducible p = (degree p = 0 \<and> irreducible (coeff p 0) \<or> degree p \<noteq> 0 \<and> irreducible (map_poly to_fract p) \<and> content_ff (map_poly to_fract p) =dff 1)
[PROOF STEP]
by blast


[STATEMENT]
lemma stone_phi_embed_strict_order_isomorphism:
  "x < y \<longleftrightarrow> stone_phi_embed x < stone_phi_embed y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x < y) = (stone_phi_embed x < stone_phi_embed y)
[PROOF STEP]
by (smt less_eq_stone_phi_pair.rep_eq less_le_not_le less_stone_phi_pair.rep_eq stone_phi.pairs_less.elims(2,3) stone_phi_embed_homomorphism stone_phi_embed_order_injective)


[STATEMENT]
lemma prefix_Par_Int3: "\<lbrakk>a \<in> C; b \<notin> C\<rbrakk> \<Longrightarrow> (a \<rightarrow> P \<lbrakk>C\<rbrakk> (b \<rightarrow> Q)) = (b \<rightarrow> ((a \<rightarrow> P) \<lbrakk>C\<rbrakk> Q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<in> C; b \<notin> C\<rbrakk> \<Longrightarrow> (a \<rightarrow> P \<lbrakk>C\<rbrakk> b \<rightarrow> Q) = (b \<rightarrow> (a \<rightarrow> P \<lbrakk>C\<rbrakk> Q))
[PROOF STEP]
using mprefix_Par_Int_distr[of "{b}" C "{a}" "\<lambda>x. P" "\<lambda>x. Q", simplified]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>b \<notin> C; a \<in> C\<rbrakk> \<Longrightarrow> (Mprefix {a} (\<lambda>x. P) \<lbrakk>C\<rbrakk> Mprefix {b} (\<lambda>x. Q)) = Mprefix {b} (\<lambda>x. Mprefix {a} (\<lambda>x. P) \<lbrakk>C\<rbrakk> Q)

goal (1 subgoal):
 1. \<lbrakk>a \<in> C; b \<notin> C\<rbrakk> \<Longrightarrow> (a \<rightarrow> P \<lbrakk>C\<rbrakk> b \<rightarrow> Q) = (b \<rightarrow> (a \<rightarrow> P \<lbrakk>C\<rbrakk> Q))
[PROOF STEP]
by (auto simp add:write0_def sync_commute)


[STATEMENT]
lemma is_alignedE_pre:
  fixes w::"'a::len word"
  assumes aligned: "is_aligned w n"
  shows        rl: "\<exists>q. w = 2 ^ n * (of_nat q) \<and> q < 2 ^ (LENGTH('a) - n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>q. w = 2 ^ n * word_of_nat q \<and> q < 2 ^ (LENGTH('a) - n)
[PROOF STEP]
using aligned is_alignedE
[PROOF STATE]
proof (prove)
using this:
is_aligned w n
\<lbrakk>is_aligned ?w ?n; \<And>q. \<lbrakk>?w = 2 ^ ?n * word_of_nat q; q < 2 ^ (LENGTH(?'a) - ?n)\<rbrakk> \<Longrightarrow> ?thesis\<rbrakk> \<Longrightarrow> ?thesis

goal (1 subgoal):
 1. \<exists>q. w = 2 ^ n * word_of_nat q \<and> q < 2 ^ (LENGTH('a) - n)
[PROOF STEP]
by blast


[STATEMENT]
lemma mono_deductions: "[| A <= B |] ==> deductions(A) <= deductions(B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> B \<Longrightarrow> deductions A \<subseteq> deductions B
[PROOF STEP]
apply(best intro: deductions.inferI elim: deductions.induct)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma arcs_compl_un_eq_arcs:
  "r \<in> verts G \<Longrightarrow>
    {e2 \<in> arcs G. \<exists>e1\<in>arcs (dir_tree_r r). head G e2 = tail G e1 \<and> head G e1 = tail G e2}
      \<union> arcs (dir_tree_r r) = arcs G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r \<in> verts G \<Longrightarrow> {e2 \<in> arcs G. \<exists>e1\<in>arcs (dir_tree_r r). head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs (dir_tree_r r) = arcs G
[PROOF STEP]
using bfs_tree.undir_arcs_compl_un_eq_arcs[OF bfs_dir_tree_r undirected_tree_axioms]
[PROOF STATE]
proof (prove)
using this:
?root \<in> verts G \<Longrightarrow> {e2 \<in> arcs G. \<exists>e1\<in>arcs (dir_tree_r ?root). head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs (dir_tree_r ?root) = arcs G

goal (1 subgoal):
 1. r \<in> verts G \<Longrightarrow> {e2 \<in> arcs G. \<exists>e1\<in>arcs (dir_tree_r r). head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs (dir_tree_r r) = arcs G
[PROOF STEP]
by blast


[STATEMENT]
lemma sint_ge: "- (2 ^ (LENGTH('a) - 1)) \<le> sint x"
  for x :: "'a::len word"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (2 ^ (LENGTH('a) - 1)) \<le> sint x
[PROOF STEP]
using sint_greater_eq [of x]
[PROOF STATE]
proof (prove)
using this:
- (2 ^ (LENGTH('a) - Suc 0)) \<le> sint x

goal (1 subgoal):
 1. - (2 ^ (LENGTH('a) - 1)) \<le> sint x
[PROOF STEP]
by simp


[STATEMENT]
lemma norm_QR_less_one: "d \<in> D\<^sub>D \<Longrightarrow> norm (inv\<^sub>L (Q d) o\<^sub>L R d) < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. d \<in> D\<^sub>D \<Longrightarrow> norm (inv\<^sub>L (Q d) o\<^sub>L R d) < 1
[PROOF STEP]
using QR_contraction
[PROOF STATE]
proof (prove)
using this:
(\<Squnion>d\<in>D\<^sub>D. norm (inv\<^sub>L (Q d) o\<^sub>L R d)) < 1

goal (1 subgoal):
 1. d \<in> D\<^sub>D \<Longrightarrow> norm (inv\<^sub>L (Q d) o\<^sub>L R d) < 1
[PROOF STEP]
by (auto intro!: cSUP_lessD[of "\<lambda>d. norm (inv\<^sub>L (Q d) o\<^sub>L R d)"])


[STATEMENT]
lemma wcc_sup_wcc:
  "wcc (x \<squnion> y) = wcc (x \<squnion> wcc y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. wcc (x \<squnion> y) = wcc (x \<squnion> wcc y)
[PROOF STEP]
by (smt (verit, ccfv_SIG) le_sup_iff order.antisym sup_right_divisibility wcc_below_wcc wcc_increasing)


[STATEMENT]
lemma substT_substT[simp]:
assumes s[simp]: "s \<in> atrm" and t[simp]:"t \<in> trm" and x[simp]:"x \<in> var" and y[simp]:"y \<in> var"
assumes yy: "x \<noteq> y" "y \<notin> FvarsT s"
shows "substT (substT s (Var y) x) t y = substT s t x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. substT (substT s (Var y) x) t y = substT s t x
[PROOF STEP]
using substT_compose_eq_or[OF s _ t x y, of "Var y"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>Var y \<in> trm; x = y \<or> y \<notin> FvarsT s\<rbrakk> \<Longrightarrow> substT (substT s (Var y) x) t y = substT s (substT (Var y) t y) x

goal (1 subgoal):
 1. substT (substT s (Var y) x) t y = substT s t x
[PROOF STEP]
using subst_notIn yy
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>Var y \<in> trm; x = y \<or> y \<notin> FvarsT s\<rbrakk> \<Longrightarrow> substT (substT s (Var y) x) t y = substT s (substT (Var y) t y) x
\<lbrakk>?\<phi> \<in> fmla; ?t \<in> trm; ?x \<in> var; ?x \<notin> Fvars ?\<phi>\<rbrakk> \<Longrightarrow> subst ?\<phi> ?t ?x = ?\<phi>
x \<noteq> y
y \<notin> FvarsT s

goal (1 subgoal):
 1. substT (substT s (Var y) x) t y = substT s t x
[PROOF STEP]
by simp


[STATEMENT]
lemma aforms_err_to_aformsE:
  assumes X: "x \<in> aforms_err e X"
  assumes deg: "degree_aforms_err X \<le> n"
    assumes e: "e \<in> UNIV \<rightarrow> {-1 .. 1}"
  obtains e' where "x = aform_vals e' (aforms_err_to_aforms n X)" "e' \<in> UNIV \<rightarrow> {-1 .. 1}"
    "\<And>i. i < n \<Longrightarrow> e' i = e i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>e'. \<lbrakk>x = aform_vals e' (aforms_err_to_aforms n X); e' \<in> UNIV \<rightarrow> {- 1..1}; \<And>i. i < n \<Longrightarrow> e' i = e i\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using aforms_err_to_aforms_ex[OF X deg e]
[PROOF STATE]
proof (prove)
using this:
\<exists>e'\<in>UNIV \<rightarrow> {- 1..1}. x = aform_vals e' (aforms_err_to_aforms n X) \<and> (\<forall>i<n. e' i = e i)

goal (1 subgoal):
 1. (\<And>e'. \<lbrakk>x = aform_vals e' (aforms_err_to_aforms n X); e' \<in> UNIV \<rightarrow> {- 1..1}; \<And>i. i < n \<Longrightarrow> e' i = e i\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast


[STATEMENT]
lemma Nset_img:"f \<in> {j. j \<le> Suc n} \<rightarrow> B \<Longrightarrow>
         insert (f (Suc n)) (f ` {j. j \<le> n}) = f ` {j. j \<le> Suc n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> {j. j \<le> Suc n} \<rightarrow> B \<Longrightarrow> insert (f (Suc n)) (f ` {j. j \<le> n}) = f ` {j. j \<le> Suc n}
[PROOF STEP]
by (auto elim: le_SucE)


[STATEMENT]
theorem prover_SeCaV:
  fixes A :: \<open>tm list\<close> and z :: \<open>fm list\<close>
  defines \<open>t \<equiv> secavProver (A, z)\<close>
  shows \<open>tfinite t \<and> wf t \<longleftrightarrow> (\<tturnstile> z)\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (tfinite t \<and> Prover.wf t) = (\<tturnstile> z)
[PROOF STEP]
using assms prover_soundness_SeCaV prover_completeness_SeCaV
[PROOF STATE]
proof (prove)
using this:
t \<equiv> secavProver (A, z)
\<lbrakk>tfinite ?t; Prover.wf ?t\<rbrakk> \<Longrightarrow> \<tturnstile> rootSequent ?t
\<tturnstile> ?z \<Longrightarrow> fst (tree.root (secavProver (?A, ?z))) = (?A, ?z) \<and> Prover.wf (secavProver (?A, ?z)) \<and> tfinite (secavProver (?A, ?z))

goal (1 subgoal):
 1. (tfinite t \<and> Prover.wf t) = (\<tturnstile> z)
[PROOF STEP]
unfolding secavProver_def
[PROOF STATE]
proof (prove)
using this:
t \<equiv> mkTree rules (A, z)
\<lbrakk>tfinite ?t; Prover.wf ?t\<rbrakk> \<Longrightarrow> \<tturnstile> rootSequent ?t
\<tturnstile> ?z \<Longrightarrow> fst (tree.root (mkTree rules (?A, ?z))) = (?A, ?z) \<and> Prover.wf (mkTree rules (?A, ?z)) \<and> tfinite (mkTree rules (?A, ?z))

goal (1 subgoal):
 1. (tfinite t \<and> Prover.wf t) = (\<tturnstile> z)
[PROOF STEP]
by fastforce


[STATEMENT]
lemma p_S1: "s \<in> S1 \<Longrightarrow> p s = (\<Squnion>D\<in>K s. \<integral>\<^sup>+ t. p t \<partial>measure_pmf D)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s \<in> S1 \<Longrightarrow> p s = (\<Squnion>D\<in>K s. integral\<^sup>N (measure_pmf D) p)
[PROOF STEP]
using S1 S1_S2 K_closed[of s]
[PROOF STATE]
proof (prove)
using this:
S1 \<subseteq> S
S1 \<inter> S2 = {}
s \<in> S \<Longrightarrow> \<Union> (set_pmf ` K s) \<subseteq> S

goal (1 subgoal):
 1. s \<in> S1 \<Longrightarrow> p s = (\<Squnion>D\<in>K s. integral\<^sup>N (measure_pmf D) p)
[PROOF STEP]
unfolding p_def
[PROOF STATE]
proof (prove)
using this:
S1 \<subseteq> S
S1 \<inter> S2 = {}
s \<in> S \<Longrightarrow> \<Union> (set_pmf ` K s) \<subseteq> S

goal (1 subgoal):
 1. s \<in> S1 \<Longrightarrow> (\<lambda>s\<in>S. P_sup s (\<lambda>\<omega>. (HLD S1 suntil HLD S2) (s ## \<omega>))) s = (\<Squnion>D\<in>K s. integral\<^sup>N (measure_pmf D) (\<lambda>s\<in>S. P_sup s (\<lambda>\<omega>. (HLD S1 suntil HLD S2) (s ## \<omega>))))
[PROOF STEP]
by (simp add: P_sup_iterate[of _ s] subset_eq set_eq_iff suntil_Stream[of _ _ s])
     (auto intro!: SUP_cong nn_integral_cong_AE simp add: AE_measure_pmf_iff)


[STATEMENT]
lemma det_fst_Gauss_Jordan_PA_eq_fst_Gauss_Jordan_det_P:
fixes A::"'a::{field}^'n::{mod_type}^'n::{mod_type}"
shows "fst (Gauss_Jordan_det_P A) = det (fst (Gauss_Jordan_PA A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (Gauss_Jordan_det_P A) = det (fst (Gauss_Jordan_PA A))
[PROOF STEP]
by (unfold Gauss_Jordan_det_P_def Gauss_Jordan_PA_def, rule det_fst_Gauss_Jordan_upt_k_PA_eq_fst_Gauss_Jordan_upt_k_det_P)