[STATEMENT]
lemma apply_cltn2_line_alt_def:
  "apply_cltn2_line l A
  = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. apply_cltn2_line l A = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. apply_cltn2_line l A = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)
[PROOF STEP]
have "invertible (cltn2_rep (cltn2_inverse A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. invertible (cltn2_rep (cltn2_inverse A))
[PROOF STEP]
by (rule cltn2_rep_invertible)
[PROOF STATE]
proof (state)
this:
invertible (cltn2_rep (cltn2_inverse A))

goal (1 subgoal):
 1. apply_cltn2_line l A = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)
[PROOF STEP]
hence "invertible (transpose (cltn2_rep (cltn2_inverse A)))"
[PROOF STATE]
proof (prove)
using this:
invertible (cltn2_rep (cltn2_inverse A))

goal (1 subgoal):
 1. invertible (Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))
[PROOF STEP]
by (rule transpose_invertible)
[PROOF STATE]
proof (state)
this:
invertible (Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))

goal (1 subgoal):
 1. apply_cltn2_line l A = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)
[PROOF STEP]
hence
    "apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A))
    = proj2_abs (proj2_rep (L2P l) v* transpose (cltn2_rep (cltn2_inverse A)))"
[PROOF STATE]
proof (prove)
using this:
invertible (Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))

goal (1 subgoal):
 1. apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A)) = proj2_abs (proj2_rep (L2P l) v* Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))
[PROOF STEP]
unfolding cltn2_transpose_def
[PROOF STATE]
proof (prove)
using this:
invertible (Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))

goal (1 subgoal):
 1. apply_cltn2 (L2P l) (cltn2_abs (Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))) = proj2_abs (proj2_rep (L2P l) v* Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))
[PROOF STEP]
by (rule apply_cltn2_right_abs)
[PROOF STATE]
proof (state)
this:
apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A)) = proj2_abs (proj2_rep (L2P l) v* Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))

goal (1 subgoal):
 1. apply_cltn2_line l A = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)
[PROOF STEP]
hence "apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A))
    = proj2_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)"
[PROOF STATE]
proof (prove)
using this:
apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A)) = proj2_abs (proj2_rep (L2P l) v* Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))

goal (1 subgoal):
 1. apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A)) = proj2_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)
[PROOF STEP]
unfolding proj2_line_rep_def
[PROOF STATE]
proof (prove)
using this:
apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A)) = proj2_abs (proj2_rep (L2P l) v* Finite_Cartesian_Product.transpose (cltn2_rep (cltn2_inverse A)))

goal (1 subgoal):
 1. apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A)) = proj2_abs (cltn2_rep (cltn2_inverse A) *v proj2_rep (L2P l))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A)) = proj2_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)

goal (1 subgoal):
 1. apply_cltn2_line l A = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)
[PROOF STEP]
thus "apply_cltn2_line l A
    = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)"
[PROOF STATE]
proof (prove)
using this:
apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A)) = proj2_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)

goal (1 subgoal):
 1. apply_cltn2_line l A = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)
[PROOF STEP]
unfolding apply_cltn2_line_def and proj2_line_abs_def
[PROOF STATE]
proof (prove)
using this:
apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A)) = proj2_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)

goal (1 subgoal):
 1. P2L (apply_cltn2 (L2P l) (cltn2_transpose (cltn2_inverse A))) = P2L (proj2_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
apply_cltn2_line l A = proj2_line_abs (cltn2_rep (cltn2_inverse A) *v proj2_line_rep l)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sorted_int:
  assumes "interval I"
  assumes "sorted xs"
  assumes "k < length xs" "i \<le> j" "j \<le> k "
  assumes "xs ! i \<in> I" "xs ! k \<in> I"
  shows "xs ! j \<in> I"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs ! j \<in> I
[PROOF STEP]
apply (rule interval_rule[where a="xs ! i" and b="xs ! k"])
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. interval I
 2. xs ! i \<le> xs ! j
 3. xs ! j \<le> xs ! k
 4. xs ! i \<in> I
 5. xs ! k \<in> I
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
interval I
sorted xs
k < length xs
i \<le> j
j \<le> k
xs ! i \<in> I
xs ! k \<in> I

goal (5 subgoals):
 1. interval I
 2. xs ! i \<le> xs ! j
 3. xs ! j \<le> xs ! k
 4. xs ! i \<in> I
 5. xs ! k \<in> I
[PROOF STEP]
by (simp add: sorted_nth_mono)+


[STATEMENT]
lemma H_iso_cond1: "(x::'a::preorder) \<le> y \<Longrightarrow> y \<le> f z \<Longrightarrow> x \<le> f z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<le> y; y \<le> f z\<rbrakk> \<Longrightarrow> x \<le> f z
[PROOF STEP]
using order_trans
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<le> ?y; ?y \<le> ?z\<rbrakk> \<Longrightarrow> ?x \<le> ?z

goal (1 subgoal):
 1. \<lbrakk>x \<le> y; y \<le> f z\<rbrakk> \<Longrightarrow> x \<le> f z
[PROOF STEP]
by auto


[STATEMENT]
lemma N_prime_mono:
  assumes "prime p" "prime p'" "p \<le> p'"
  shows   "N p \<le> N p'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N p \<le> N p'
[PROOF STEP]
using assms q_gt_1
[PROOF STATE]
proof (prove)
using this:
prime p
prime p'
p \<le> p'
1 < q

goal (1 subgoal):
 1. N p \<le> N p'
[PROOF STEP]
by (auto simp add: N_prime field_simps nat_le_iff prime_ge_0_int)


[STATEMENT]
lemma subrobdds_set_simps [simp] :
  "subrobdds_set {} = {}"
  "subrobdds_set (insert b bs) = subrobdds b \<union> subrobdds_set bs"
  "subrobdds_set (bs1 \<union> bs2) = subrobdds_set bs1 \<union> subrobdds_set bs2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subrobdds_set {} = {} &&& subrobdds_set (insert b bs) = subrobdds b \<union> subrobdds_set bs &&& subrobdds_set (bs1 \<union> bs2) = subrobdds_set bs1 \<union> subrobdds_set bs2
[PROOF STEP]
unfolding subrobdds_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (subrobdds ` {}) = {} &&& \<Union> (subrobdds ` insert b bs) = subrobdds b \<union> \<Union> (subrobdds ` bs) &&& \<Union> (subrobdds ` (bs1 \<union> bs2)) = \<Union> (subrobdds ` bs1) \<union> \<Union> (subrobdds ` bs2)
[PROOF STEP]
by simp_all


[STATEMENT]
theorem wls_fresh_Op_simp[simp]:
assumes "wlsInp delta inp" and "wlsBinp delta binp"
shows
"fresh xs x (Op delta inp binp) =
 (freshInp xs x inp \<and> freshBinp xs x binp)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fresh xs x (Op delta inp binp) = (freshInp xs x inp \<and> freshBinp xs x binp)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
wlsInp delta inp
wlsBinp delta binp

goal (1 subgoal):
 1. fresh xs x (Op delta inp binp) = (freshInp xs x inp \<and> freshBinp xs x binp)
[PROOF STEP]
by simp


[STATEMENT]
lemma boolfunc_from_sc_lazy:
  "simplicial_complex.simplicial_complex n K
    \<Longrightarrow> boolfunc_from_sc n K = (\<lambda>p. Pow {i. i < n \<and> \<not> p i} \<subseteq> K)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_complex.simplicial_complex n K \<Longrightarrow> boolfunc_from_sc n K = (\<lambda>p. Pow {i. i < n \<and> \<not> p i} \<subseteq> K)
[PROOF STEP]
unfolding simplicial_complex.simplicial_complex_def boolfunc_from_sc_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<sigma>\<in>K. \<sigma> \<in> simplicial_complex.simplices n \<and> Pow \<sigma> \<subseteq> K \<Longrightarrow> (\<lambda>p. {i. i < n \<and> \<not> p i} \<in> K) = (\<lambda>p. Pow {i. i < n \<and> \<not> p i} \<subseteq> K)
[PROOF STEP]
by auto


[STATEMENT]
lemma i_set_mult_mod_0_div: "
  \<lbrakk> I \<in> i_set_mult k; k mod d = 0 \<rbrakk> \<Longrightarrow> I \<oslash> d \<in> i_set_mult (k div d)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>I \<in> i_set_mult k; k mod d = 0\<rbrakk> \<Longrightarrow> I \<oslash> d \<in> i_set_mult (k div d)
[PROOF STEP]
apply (case_tac "d = 0")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>I \<in> i_set_mult k; k mod d = 0; d = 0\<rbrakk> \<Longrightarrow> I \<oslash> d \<in> i_set_mult (k div d)
 2. \<lbrakk>I \<in> i_set_mult k; k mod d = 0; d \<noteq> 0\<rbrakk> \<Longrightarrow> I \<oslash> d \<in> i_set_mult (k div d)
[PROOF STEP]
apply (simp add: iT_Div_0[OF i_set_mult_imp_not_empty] i_set_mult.intros)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>I \<in> i_set_mult k; k mod d = 0; d \<noteq> 0\<rbrakk> \<Longrightarrow> I \<oslash> d \<in> i_set_mult (k div d)
[PROOF STEP]
apply (induct I rule: i_set_mult.induct)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>n. \<lbrakk>k mod d = 0; d \<noteq> 0\<rbrakk> \<Longrightarrow> [n\<dots>] \<oslash> d \<in> i_set_mult (k div d)
 2. \<And>n. \<lbrakk>k mod d = 0; d \<noteq> 0\<rbrakk> \<Longrightarrow> [\<dots>n] \<oslash> d \<in> i_set_mult (k div d)
 3. \<And>n da. \<lbrakk>k mod d = 0; d \<noteq> 0\<rbrakk> \<Longrightarrow> [n\<dots>,da] \<oslash> d \<in> i_set_mult (k div d)
 4. \<And>r m. \<lbrakk>k mod d = 0; d \<noteq> 0\<rbrakk> \<Longrightarrow> [ r, mod m * k ] \<oslash> d \<in> i_set_mult (k div d)
 5. \<And>r m c. \<lbrakk>k mod d = 0; d \<noteq> 0\<rbrakk> \<Longrightarrow> [ r, mod m * k, c ] \<oslash> d \<in> i_set_mult (k div d)
[PROOF STEP]
apply (simp_all add: iT_div i_set_mult.intros)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>r m. \<lbrakk>k mod d = 0; 0 < d\<rbrakk> \<Longrightarrow> [ r, mod m * k ] \<oslash> d \<in> i_set_mult (k div d)
 2. \<And>r m c. \<lbrakk>k mod d = 0; 0 < d\<rbrakk> \<Longrightarrow> [ r, mod m * k, c ] \<oslash> d \<in> i_set_mult (k div d)
[PROOF STEP]
apply (simp_all add: iMOD_div iMODb_div mod_0_imp_mod_mult_left_0 mod_0_imp_div_mult_left_eq i_set_mult.intros)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cartesian_product_infiniteL_imp_infinite: "\<lbrakk> infinite A; B \<noteq> {} \<rbrakk> \<Longrightarrow> infinite (A \<times> B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>infinite A; B \<noteq> {}\<rbrakk> \<Longrightarrow> infinite (A \<times> B)
[PROOF STEP]
by (blast dest: finite_cartesian_productD1)


[STATEMENT]
lemma add_assoc: "add (add i j) k = add i (add j k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. add (add i j) k = add i (add j k)
[PROOF STEP]
by (induct k) auto


[STATEMENT]
lemma enat_less_enat_plusI2:
  "enat y < z \<Longrightarrow> enat (x + y) < enat x + z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enat y < z \<Longrightarrow> enat (x + y) < enat x + z
[PROOF STEP]
by (metis enat_add_mono plus_enat_simps(1))


[STATEMENT]
lemma [code]:
  "division_segment (n::natural) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. division_segment n = 1
[PROOF STEP]
by (simp add: natural_eq_iff)


[STATEMENT]
lemma (in Ring) injec_left_exact:"\<lbrakk>R module M; R module N;
       z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; injec\<^bsub>M,N\<^esub> f\<rbrakk> \<Longrightarrow>
       exact3 R (Zm R e) z M f N"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; injec\<^bsub>M,N\<^esub> f\<rbrakk> \<Longrightarrow> exact3 R (Zm R e) z M f N
[PROOF STEP]
apply (simp add:exact3_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; injec\<^bsub>M,N\<^esub> f\<rbrakk> \<Longrightarrow> z ` carrier (Zm R e) = ker\<^bsub>M,N\<^esub> f
[PROOF STEP]
apply (simp add:Zm_def, fold Zm_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; injec\<^bsub>M,N\<^esub> f\<rbrakk> \<Longrightarrow> {z e} = ker\<^bsub>M,N\<^esub> f
[PROOF STEP]
apply (simp add:Zm_to_M_0 [of  "M" "z" "e"])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>R module M; R module N; z \<in> mHom R (Zm R e) M; f \<in> mHom R M N; injec\<^bsub>M,N\<^esub> f\<rbrakk> \<Longrightarrow> {\<zero>\<^bsub>M\<^esub>} = ker\<^bsub>M,N\<^esub> f
[PROOF STEP]
apply (simp add:injec_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma convex_rel_open_scaleR:
  fixes S :: "'n::euclidean_space set"
  assumes "convex S"
    and "rel_open S"
  shows "convex (((*\<^sub>R) c) ` S) \<and> rel_open (((*\<^sub>R) c) ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. convex ((*\<^sub>R) c ` S) \<and> rel_open ((*\<^sub>R) c ` S)
[PROOF STEP]
by (metis assms convex_scaling rel_interior_convex_scaleR rel_open_def)


[STATEMENT]
lemma Add_Less:
assumes "0 < b"
shows    "(Suc a - b < Suc a) = True"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Suc a - b < Suc a) = True
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 < b

goal (1 subgoal):
 1. (Suc a - b < Suc a) = True
[PROOF STEP]
by auto


[STATEMENT]
lemma hcmod_unit_one [simp]: "\<And>a. hcmod (HComplex (( *f* cos) a) (( *f* sin) a)) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a. hcmod (HComplex ((*f* cos) a) ((*f* sin) a)) = 1
[PROOF STEP]
by transfer (simp add: cmod_unit_one)


[STATEMENT]
lemma add_node_set_nodes: "set (nodesL (add_node v G)) = set (nodesL G) \<union> {v}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (nodesL (FiniteListGraph.add_node v G)) = set (nodesL G) \<union> {v}
[PROOF STEP]
unfolding add_node_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (nodesL \<lparr>nodesL = if v \<in> set (nodesL G) then nodesL G else v # nodesL G, edgesL = edgesL G\<rparr>) = set (nodesL G) \<union> {v}
[PROOF STEP]
by auto


[STATEMENT]
lemma
  fixes A :: "'a::comm_monoid_add set"
  shows insert_set_plus: "(insert a A) + B = (A+B) \<union> (((+)a) ` B)" and set_plus_insert: "B + (insert a A) = (B+A) \<union> (((+)a) ` B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insert a A + B = A + B \<union> (+) a ` B &&& B + insert a A = B + A \<union> (+) a ` B
[PROOF STEP]
using add.commute
[PROOF STATE]
proof (prove)
using this:
?a + ?b = ?b + ?a

goal (1 subgoal):
 1. insert a A + B = A + B \<union> (+) a ` B &&& B + insert a A = B + A \<union> (+) a ` B
[PROOF STEP]
by (auto simp: set_plus_def)


[STATEMENT]
lemma triangularizable_m0:
assumes A: "A \<in> carrier_mat m 0"
shows "\<exists>U. U \<in> carrier_mat 0 0 \<and> invertible_mat U \<and> lower_triangular (A * U)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>U. U \<in> carrier_mat 0 0 \<and> invertible_mat U \<and> lower_triangular (A * U)
[PROOF STEP]
using A
[PROOF STATE]
proof (prove)
using this:
A \<in> carrier_mat m 0

goal (1 subgoal):
 1. \<exists>U. U \<in> carrier_mat 0 0 \<and> invertible_mat U \<and> lower_triangular (A * U)
[PROOF STEP]
unfolding lower_triangular_def carrier_mat_def invertible_mat_def inverts_mat_def
[PROOF STATE]
proof (prove)
using this:
A \<in> {ma. dim_row ma = m \<and> dim_col ma = 0}

goal (1 subgoal):
 1. \<exists>U. U \<in> {m. dim_row m = 0 \<and> dim_col m = 0} \<and> (square_mat U \<and> (\<exists>B. U * B = 1\<^sub>m (dim_row U) \<and> B * U = 1\<^sub>m (dim_row B))) \<and> (\<forall>i j. i < j \<and> i < dim_row (A * U) \<and> j < dim_col (A * U) \<longrightarrow> (A * U) $$ (i, j) = (0::'b))
[PROOF STEP]
by auto (metis gr_implies_not0 index_one_mat(2) index_one_mat(3) right_mult_one_mat')


[STATEMENT]
lemma index_mat_addcol[simp]:
  "i < dim_row A \<Longrightarrow> j < dim_col A \<Longrightarrow> addcol a k l A $$ (i,j) = (if k = j then
    a * A $$ (i,l) + A $$ (i,j) else A $$ (i,j))"
  "i < dim_row A \<Longrightarrow> j < dim_col A \<Longrightarrow> addcol a j l A $$ (i,j) = a * A $$(i,l) + A$$(i,j)"
  "i < dim_row A \<Longrightarrow> j < dim_col A \<Longrightarrow> k \<noteq> j \<Longrightarrow> addcol a k l A $$ (i,j) = A $$(i,j)"
  "dim_row (addcol a k l A) = dim_row A" "dim_col (addcol a k l A) = dim_col A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lbrakk>i < dim_row A; j < dim_col A\<rbrakk> \<Longrightarrow> addcol a k l A $$ (i, j) = (if k = j then a * A $$ (i, l) + A $$ (i, j) else A $$ (i, j))) &&& (\<lbrakk>i < dim_row A; j < dim_col A\<rbrakk> \<Longrightarrow> addcol a j l A $$ (i, j) = a * A $$ (i, l) + A $$ (i, j))) &&& (\<lbrakk>i < dim_row A; j < dim_col A; k \<noteq> j\<rbrakk> \<Longrightarrow> addcol a k l A $$ (i, j) = A $$ (i, j)) &&& dim_row (addcol a k l A) = dim_row A &&& dim_col (addcol a k l A) = dim_col A
[PROOF STEP]
unfolding mat_addcol_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lbrakk>i < dim_row A; j < dim_col A\<rbrakk> \<Longrightarrow> mat (dim_row A) (dim_col A) (\<lambda>(i, j). if k = j then a * A $$ (i, l) + A $$ (i, j) else A $$ (i, j)) $$ (i, j) = (if k = j then a * A $$ (i, l) + A $$ (i, j) else A $$ (i, j))) &&& (\<lbrakk>i < dim_row A; j < dim_col A\<rbrakk> \<Longrightarrow> mat (dim_row A) (dim_col A) (\<lambda>(i, ja). if j = ja then a * A $$ (i, l) + A $$ (i, ja) else A $$ (i, ja)) $$ (i, j) = a * A $$ (i, l) + A $$ (i, j))) &&& (\<lbrakk>i < dim_row A; j < dim_col A; k \<noteq> j\<rbrakk> \<Longrightarrow> mat (dim_row A) (dim_col A) (\<lambda>(i, j). if k = j then a * A $$ (i, l) + A $$ (i, j) else A $$ (i, j)) $$ (i, j) = A $$ (i, j)) &&& dim_row (mat (dim_row A) (dim_col A) (\<lambda>(i, j). if k = j then a * A $$ (i, l) + A $$ (i, j) else A $$ (i, j))) = dim_row A &&& dim_col (mat (dim_row A) (dim_col A) (\<lambda>(i, j). if k = j then a * A $$ (i, l) + A $$ (i, j) else A $$ (i, j))) = dim_col A
[PROOF STEP]
by auto


[STATEMENT]
lemma NH\<^sub>N_EH\<^sub>N:
  assumes "p \<in> {0<..<1}"
  shows "NH\<^sub>N n = EH\<^sub>N n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NH\<^sub>N n = ennreal (EH\<^sub>N n)
[PROOF STEP]
using assms EH\<^sub>N_bounds
[PROOF STATE]
proof (prove)
using this:
p \<in> {0<..<1}
p \<in> {0<..<1} \<Longrightarrow> - harm ?n / ln q - 1 \<le> EH\<^sub>N ?n
p \<in> {0<..<1} \<Longrightarrow> EH\<^sub>N ?n \<le> - harm ?n / ln q
p \<in> {0<..<1} \<Longrightarrow> integrable (measure_pmf (H\<^sub>N ?n)) real

goal (1 subgoal):
 1. NH\<^sub>N n = ennreal (EH\<^sub>N n)
[PROOF STEP]
unfolding EH\<^sub>N_def NH\<^sub>N_def
[PROOF STATE]
proof (prove)
using this:
p \<in> {0<..<1}
p \<in> {0<..<1} \<Longrightarrow> - harm ?n / ln q - 1 \<le> measure_pmf.expectation (H\<^sub>N ?n) real
p \<in> {0<..<1} \<Longrightarrow> measure_pmf.expectation (H\<^sub>N ?n) real \<le> - harm ?n / ln q
p \<in> {0<..<1} \<Longrightarrow> integrable (measure_pmf (H\<^sub>N ?n)) real

goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (real x) \<partial>measure_pmf (H\<^sub>N n) = ennreal (measure_pmf.expectation (H\<^sub>N n) real)
[PROOF STEP]
by (subst nn_integral_eq_integral) (auto)


[STATEMENT]
lemma LIM_zero_cancel:
  fixes f :: "'a \<Rightarrow> 'b::real_normed_vector"
  shows "((\<lambda>x. f x - l) \<longlongrightarrow> 0) F \<Longrightarrow> (f \<longlongrightarrow> l) F"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. f x - l) \<longlongrightarrow> (0::'b)) F \<Longrightarrow> (f \<longlongrightarrow> l) F
[PROOF STEP]
unfolding tendsto_iff dist_norm
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>e>0. \<forall>\<^sub>F x in F. norm (f x - l - (0::'b)) < e \<Longrightarrow> \<forall>e>0. \<forall>\<^sub>F x in F. norm (f x - l) < e
[PROOF STEP]
by simp


[STATEMENT]
lemma imirror_iff: "(n \<in> imirror I) = (\<exists>x\<in>I. n = iMin I + Max I - x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (n \<in> imirror I) = (\<exists>x\<in>I. n = iMin I + Max I - x)
[PROOF STEP]
by (simp add: imirror_def image_iff)


[STATEMENT]
lemma Im2_quat_of_real [simp]: "Im2(quat_of_real a) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Im2 (quat_of_real a) = 0
[PROOF STEP]
by (simp add: of_real_def)


[STATEMENT]
lemma odd_dioph_repr:
  fixes a :: nat
  shows "odd a \<longleftrightarrow> (\<exists>x::nat. a = 2*x + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. odd a = (\<exists>x. a = 2 * x + 1)
[PROOF STEP]
by (meson dvd_triv_left even_plus_one_iff oddE)


[STATEMENT]
lemma from_nat_1: "from_nat 1 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mod_type_class.from_nat 1 = (1::'a)
[PROOF STEP]
unfolding from_nat_def o_def Abs'_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Abs (int 1 mod int CARD('a)) = (1::'a)
[PROOF STEP]
by (metis Rep_1 Rep_mod of_nat_1 one_def)


[STATEMENT]
theorem mergesort_recurrence:
  "mergesort_recurrence \<in> \<Theta>(\<lambda>n. n * ln n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. mergesort_recurrence \<in> \<Theta>(\<lambda>x. real x * ln (real x))
[PROOF STEP]
by (master_theorem) auto


[STATEMENT]
lemma "(-345::real) < -242 + -100"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - 345 < - 242 + - 100
[PROOF STEP]
by simp


[STATEMENT]
lemma nat_int2: "\<forall>(w::nat) (b::nat) (v::int).u>0 \<Longrightarrow> (w mod nat v = b mod nat v \<Longrightarrow> int w mod v = int b mod v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>w b v. (0::'a) < u; w mod nat v = b mod nat v\<rbrakk> \<Longrightarrow> int w mod v = int b mod v
[PROOF STEP]
by (metis mod_by_0 nat_eq_iff zmod_int)


[STATEMENT]
lemma covering_space_locally_connected_eq:
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
  assumes "covering_space C p S"
    shows "locally connected S \<longleftrightarrow> locally connected C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally connected S = locally connected C
[PROOF STEP]
proof (rule covering_space_locally_eq [OF assms])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>T. \<lbrakk>T \<subseteq> C; connected T\<rbrakk> \<Longrightarrow> connected (p ` T)
 2. \<And>q U. \<lbrakk>U \<subseteq> S; continuous_on U q; connected U\<rbrakk> \<Longrightarrow> connected (q ` U)
[PROOF STEP]
show "\<And>T. \<lbrakk>T \<subseteq> C; connected T\<rbrakk> \<Longrightarrow> connected (p ` T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>T. \<lbrakk>T \<subseteq> C; connected T\<rbrakk> \<Longrightarrow> connected (p ` T)
[PROOF STEP]
by (meson connected_continuous_image assms continuous_on_subset covering_space_imp_continuous)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?T \<subseteq> C; connected ?T\<rbrakk> \<Longrightarrow> connected (p ` ?T)

goal (1 subgoal):
 1. \<And>q U. \<lbrakk>U \<subseteq> S; continuous_on U q; connected U\<rbrakk> \<Longrightarrow> connected (q ` U)
[PROOF STEP]
qed (use connected_continuous_image in blast)


[STATEMENT]
lemma "finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> | w1 w2 . True}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True}
[PROOF STEP]
have "{\<guillemotleft>biderivs w1 w2 r\<guillemotright> | w1 w2 . True} =
    (\<Union>s \<in> {\<guillemotleft>lderivs as r\<guillemotright> | as . True}. {\<guillemotleft>rderivs bs s\<guillemotright> | bs . True})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True} = (\<Union>s\<in>{\<guillemotleft>lderivs as r\<guillemotright> |as. True}. {\<guillemotleft>rderivs bs s\<guillemotright> |bs. True})
[PROOF STEP]
unfolding biderivs_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {\<guillemotleft>(rderivs w2 \<circ> lderivs w1) r\<guillemotright> |w1 w2. True} = (\<Union>s\<in>{\<guillemotleft>lderivs as r\<guillemotright> |as. True}. {\<guillemotleft>rderivs bs s\<guillemotright> |bs. True})
[PROOF STEP]
by (fastforce simp: ACI_norm_rderivs)
[PROOF STATE]
proof (state)
this:
{\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True} = (\<Union>s\<in>{\<guillemotleft>lderivs as r\<guillemotright> |as. True}. {\<guillemotleft>rderivs bs s\<guillemotright> |bs. True})

goal (1 subgoal):
 1. finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
{\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True} = (\<Union>s\<in>{\<guillemotleft>lderivs as r\<guillemotright> |as. True}. {\<guillemotleft>rderivs bs s\<guillemotright> |bs. True})

goal (1 subgoal):
 1. finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True}
[PROOF STEP]
have "finite \<dots>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (\<Union>s\<in>{\<guillemotleft>lderivs as r\<guillemotright> |as. True}. {\<guillemotleft>rderivs bs s\<guillemotright> |bs. True})
[PROOF STEP]
by (rule iffD2[OF finite_UN[OF finite_lderivs] ballI[OF finite_rderivs]])
[PROOF STATE]
proof (state)
this:
finite (\<Union>s\<in>{\<guillemotleft>lderivs as r\<guillemotright> |as. True}. {\<guillemotleft>rderivs bs s\<guillemotright> |bs. True})

goal (1 subgoal):
 1. finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True}

goal (1 subgoal):
 1. finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
finite {\<guillemotleft>biderivs w1 w2 r\<guillemotright> |w1 w2. True}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma p_nat_pow_factor_int_pow:
  assumes "a \<in> nonzero Q\<^sub>p"
  shows "(\<pp>[^](n::nat) \<otimes> a)[^](k::int) = \<pp>[^](n*k) \<otimes> a[^]k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<pp> [^] n \<otimes> a) [^] k = \<pp> [^] (int n * k) \<otimes> a [^] k
[PROOF STEP]
using assms  Qp_p_int_nat_pow_pow p_natpow_closed(1)
[PROOF STATE]
proof (prove)
using this:
a \<in> nonzero Q\<^sub>p
\<pp> [^] (?n * int ?m) = (\<pp> [^] ?n) [^] ?m
\<pp> [^] ?n \<in> carrier Q\<^sub>p

goal (1 subgoal):
 1. (\<pp> [^] n \<otimes> a) [^] k = \<pp> [^] (int n * k) \<otimes> a [^] k
[PROOF STEP]
by (metis int_pow_int p_int_pow_factor_int_pow)


[STATEMENT]
lemma algebraic_int_prod [intro]:
  "(\<And>x. x \<in> A \<Longrightarrow> algebraic_int (f x :: 'a :: field_char_0))
    \<Longrightarrow> algebraic_int (prod f A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> A \<Longrightarrow> algebraic_int (f x)) \<Longrightarrow> algebraic_int (prod f A)
[PROOF STEP]
by (induction A rule: infinite_finite_induct) auto


[STATEMENT]
lemma min_product_iff:
  "x \<in> A \<otimes>\<^sub>m B \<longleftrightarrow> (\<exists>a \<in> A. \<exists>b \<in> B. x = a |\<union>| b) \<and> (\<forall>a \<in> A. \<forall>b \<in> B. a |\<union>| b |\<subseteq>| x \<longrightarrow> a |\<union>| b = x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> A \<otimes>\<^sub>m B) = ((\<exists>a\<in>A. \<exists>b\<in>B. x = a |\<union>| b) \<and> (\<forall>a\<in>A. \<forall>b\<in>B. a |\<union>| b |\<subseteq>| x \<longrightarrow> a |\<union>| b = x))
[PROOF STEP]
unfolding min_product_def min_set_iff product_iff product_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> {a |\<union>| b |a b. a \<in> A \<and> b \<in> B} \<and> (\<forall>y\<in>{a |\<union>| b |a b. a \<in> A \<and> b \<in> B}. y |\<subseteq>| x \<longrightarrow> y = x)) = ((\<exists>a\<in>A. \<exists>b\<in>B. x = a |\<union>| b) \<and> (\<forall>a\<in>A. \<forall>b\<in>B. a |\<union>| b |\<subseteq>| x \<longrightarrow> a |\<union>| b = x))
[PROOF STEP]
by blast


[STATEMENT]
lemma poly_map_poly_of_real_cnj:
    "poly (map_poly of_real p) (cnj z) = cnj (poly (map_poly of_real p) z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (map_poly complex_of_real p) (cnj z) = cnj (poly (map_poly complex_of_real p) z)
[PROOF STEP]
apply (induction p)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. poly (map_poly complex_of_real 0) (cnj z) = cnj (poly (map_poly complex_of_real 0) z)
 2. \<And>a p. \<lbrakk>a \<noteq> 0 \<or> p \<noteq> 0; poly (map_poly complex_of_real p) (cnj z) = cnj (poly (map_poly complex_of_real p) z)\<rbrakk> \<Longrightarrow> poly (map_poly complex_of_real (pCons a p)) (cnj z) = cnj (poly (map_poly complex_of_real (pCons a p)) z)
[PROOF STEP]
by auto


[STATEMENT]
lemma (in ring) units_form_group: "group (units_group R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Group.group (units_group R)
[PROOF STEP]
apply (intro groupI)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>x y. \<lbrakk>x \<in> carrier (units_group R); y \<in> carrier (units_group R)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>units_group R\<^esub> y \<in> carrier (units_group R)
 2. \<one>\<^bsub>units_group R\<^esub> \<in> carrier (units_group R)
 3. \<And>x y z. \<lbrakk>x \<in> carrier (units_group R); y \<in> carrier (units_group R); z \<in> carrier (units_group R)\<rbrakk> \<Longrightarrow> x \<otimes>\<^bsub>units_group R\<^esub> y \<otimes>\<^bsub>units_group R\<^esub> z = x \<otimes>\<^bsub>units_group R\<^esub> (y \<otimes>\<^bsub>units_group R\<^esub> z)
 4. \<And>x. x \<in> carrier (units_group R) \<Longrightarrow> \<one>\<^bsub>units_group R\<^esub> \<otimes>\<^bsub>units_group R\<^esub> x = x
 5. \<And>x. x \<in> carrier (units_group R) \<Longrightarrow> \<exists>y\<in>carrier (units_group R). y \<otimes>\<^bsub>units_group R\<^esub> x = \<one>\<^bsub>units_group R\<^esub>
[PROOF STEP]
apply (unfold units_group_def, auto)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> Units R; y \<in> Units R; z \<in> Units R\<rbrakk> \<Longrightarrow> x \<otimes> y \<otimes> z = x \<otimes> (y \<otimes> z)
 2. \<And>x. x \<in> Units R \<Longrightarrow> \<exists>y\<in>Units R. y \<otimes> x = \<one>
[PROOF STEP]
apply (intro m_assoc)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x y z. \<lbrakk>x \<in> Units R; y \<in> Units R; z \<in> Units R\<rbrakk> \<Longrightarrow> x \<in> carrier R
 2. \<And>x y z. \<lbrakk>x \<in> Units R; y \<in> Units R; z \<in> Units R\<rbrakk> \<Longrightarrow> y \<in> carrier R
 3. \<And>x y z. \<lbrakk>x \<in> Units R; y \<in> Units R; z \<in> Units R\<rbrakk> \<Longrightarrow> z \<in> carrier R
 4. \<And>x. x \<in> Units R \<Longrightarrow> \<exists>y\<in>Units R. y \<otimes> x = \<one>
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> Units R \<Longrightarrow> \<exists>y\<in>Units R. y \<otimes> x = \<one>
[PROOF STEP]
apply (unfold Units_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> {y \<in> carrier R. \<exists>x\<in>carrier R. x \<otimes> y = \<one> \<and> y \<otimes> x = \<one>} \<Longrightarrow> \<exists>y\<in>{y \<in> carrier R. \<exists>x\<in>carrier R. x \<otimes> y = \<one> \<and> y \<otimes> x = \<one>}. y \<otimes> x = \<one>
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma map_rev_Suc: "map f (rev [0..<Suc j]) = f j # map f (rev [0..< j])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map f (rev [0..<Suc j]) = f j # map f (rev [0..<j])
[PROOF STEP]
by simp


[STATEMENT]
lemma mod_plus_minus_mult:
  "s*x mod+- q = (s mod+- q) * (x mod+- q) mod+- q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. s * x mod+- q = s mod+- q * (x mod+- q) mod+- q
[PROOF STEP]
unfolding mod_plus_minus_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (s * x + \<lfloor>real_of_int q / 2\<rfloor>) mod q - \<lfloor>real_of_int q / 2\<rfloor> = (((s + \<lfloor>real_of_int q / 2\<rfloor>) mod q - \<lfloor>real_of_int q / 2\<rfloor>) * ((x + \<lfloor>real_of_int q / 2\<rfloor>) mod q - \<lfloor>real_of_int q / 2\<rfloor>) + \<lfloor>real_of_int q / 2\<rfloor>) mod q - \<lfloor>real_of_int q / 2\<rfloor>
[PROOF STEP]
by (smt (verit, del_insts) mod_add_eq mod_diff_left_eq
  mod_mult_left_eq mod_mult_right_eq)


[STATEMENT]
lemma binomial_n0: "(Suc n choose 0) = (n choose 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Suc n choose 0 = n choose 0
[PROOF STEP]
by simp


[STATEMENT]
lemma two_power_increasing:
  "\<lbrakk> n \<le> m; m < LENGTH('a) \<rbrakk> \<Longrightarrow> (2 :: 'a :: len word) ^ n \<le> 2 ^ m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>n \<le> m; m < LENGTH('a)\<rbrakk> \<Longrightarrow> 2 ^ n \<le> 2 ^ m
[PROOF STEP]
by (simp add: word_le_nat_alt)


[STATEMENT]
lemma arden_r_counter: "\<exists> (x::'a lan) (y::'a lan) (z::'a lan). x = x \<cdot> y + z \<and> x \<noteq> z \<cdot> y\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x y z. x = x \<cdot> y + z \<and> x \<noteq> z \<cdot> y\<^sup>\<star>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>x y z. x = x \<cdot> y + z \<and> x \<noteq> z \<cdot> y\<^sup>\<star>
[PROOF STEP]
have one: "(0::'a lan) + 1 \<cdot> 1 = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 + 1 \<cdot> 1 = 1
[PROOF STEP]
by (metis ab_near_semiring_one_class.mult_onel kleene_algebra_class.dual.add_zerol)
[PROOF STATE]
proof (state)
this:
0 + 1 \<cdot> 1 = 1

goal (1 subgoal):
 1. \<exists>x y z. x = x \<cdot> y + z \<and> x \<noteq> z \<cdot> y\<^sup>\<star>
[PROOF STEP]
have two: "(1::'a lan) \<noteq> 0 \<cdot> 1\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 1 \<noteq> 0 \<cdot> 1\<^sup>\<star>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 1 \<noteq> 0 \<cdot> 1\<^sup>\<star>
[PROOF STEP]
have "\<exists>x\<^sub>1. (0::'a list set) \<noteq> x\<^sub>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x\<^sub>1. 0 \<noteq> x\<^sub>1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<exists>x\<^sub>1. 0 \<noteq> x\<^sub>1

goal (1 subgoal):
 1. 1 \<noteq> 0 \<cdot> 1\<^sup>\<star>
[PROOF STEP]
hence "(1::'a list set) \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
\<exists>x\<^sub>1. 0 \<noteq> x\<^sub>1

goal (1 subgoal):
 1. 1 \<noteq> 0
[PROOF STEP]
by (metis kleene_algebra_class.dual.annir kleene_algebra_class.dual.mult.right_neutral)
[PROOF STATE]
proof (state)
this:
1 \<noteq> 0

goal (1 subgoal):
 1. 1 \<noteq> 0 \<cdot> 1\<^sup>\<star>
[PROOF STEP]
thus "(1::'a list set) \<noteq> 0 \<cdot> 1\<^sup>\<star>"
[PROOF STATE]
proof (prove)
using this:
1 \<noteq> 0

goal (1 subgoal):
 1. 1 \<noteq> 0 \<cdot> 1\<^sup>\<star>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
1 \<noteq> 0 \<cdot> 1\<^sup>\<star>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
1 \<noteq> 0 \<cdot> 1\<^sup>\<star>

goal (1 subgoal):
 1. \<exists>x y z. x = x \<cdot> y + z \<and> x \<noteq> z \<cdot> y\<^sup>\<star>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>x y z. x = x \<cdot> y + z \<and> x \<noteq> z \<cdot> y\<^sup>\<star>
[PROOF STEP]
using one and two
[PROOF STATE]
proof (prove)
using this:
0 + 1 \<cdot> 1 = 1
1 \<noteq> 0 \<cdot> 1\<^sup>\<star>

goal (1 subgoal):
 1. \<exists>x y z. x = x \<cdot> y + z \<and> x \<noteq> z \<cdot> y\<^sup>\<star>
[PROOF STEP]
by (metis kleene_algebra_class.dual.add_zerol kleene_algebra_class.dual.add_zeror)
[PROOF STATE]
proof (state)
this:
\<exists>x y z. x = x \<cdot> y + z \<and> x \<noteq> z \<cdot> y\<^sup>\<star>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma eSuc_max: "eSuc (max x y) = max (eSuc x) (eSuc y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eSuc (max x y) = max (eSuc x) (eSuc y)
[PROOF STEP]
by (simp add: eSuc_def split: enat.split)


[STATEMENT]
lemma (in pseudo_hoop_lattice) sup_impr_inf:
  "(a \<squnion> b) r\<rightarrow> c = (a r\<rightarrow> c) \<sqinter> (b r\<rightarrow>c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<squnion> b) r\<rightarrow> c = (a r\<rightarrow> c) \<sqinter> (b r\<rightarrow> c)
[PROOF STEP]
apply (cut_tac A = "{a, b}" and a = "a \<squnion> b" and b = c in lemma_2_8_i1)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. a \<squnion> b \<in> supremum {a, b}
 2. (a \<squnion> b) r\<rightarrow> c \<in> infimum ((\<lambda>x. x r\<rightarrow> c) ` {a, b}) \<Longrightarrow> (a \<squnion> b) r\<rightarrow> c = (a r\<rightarrow> c) \<sqinter> (b r\<rightarrow> c)
[PROOF STEP]
by simp_all


[STATEMENT]
lemma sets_pair_swap:
  assumes "A \<in> sets (M1 \<Otimes>\<^sub>M M2)"
  shows "(\<lambda>(x, y). (y, x)) -` A \<inter> space (M2 \<Otimes>\<^sub>M M1) \<in> sets (M2 \<Otimes>\<^sub>M M1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(x, y). (y, x)) -` A \<inter> space (M2 \<Otimes>\<^sub>M M1) \<in> sets (M2 \<Otimes>\<^sub>M M1)
[PROOF STEP]
using measurable_pair_swap' assms
[PROOF STATE]
proof (prove)
using this:
(\<lambda>(x, y). (y, x)) \<in> ?M1.0 \<Otimes>\<^sub>M ?M2.0 \<rightarrow>\<^sub>M ?M2.0 \<Otimes>\<^sub>M ?M1.0
A \<in> sets (M1 \<Otimes>\<^sub>M M2)

goal (1 subgoal):
 1. (\<lambda>(x, y). (y, x)) -` A \<inter> space (M2 \<Otimes>\<^sub>M M1) \<in> sets (M2 \<Otimes>\<^sub>M M1)
[PROOF STEP]
by (rule measurable_sets)


[STATEMENT]
theorem t_sortA:
  "t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nlog2 (length xs + 1) + 1)"
  (is "?lhs \<le> _")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)
[PROOF STEP]
have "?lhs \<le> ?lhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> t_heap_of_A xs + t_list_of_A (heap_of_A xs)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> t_heap_of_A xs + t_list_of_A (heap_of_A xs)

goal (1 subgoal):
 1. t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> t_heap_of_A xs + t_list_of_A (heap_of_A xs)

goal (1 subgoal):
 1. t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)
[PROOF STEP]
note t_heap_of_A_log_bound[of xs]
[PROOF STATE]
proof (state)
this:
t_heap_of_A xs \<le> length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)

goal (1 subgoal):
 1. t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
t_heap_of_A xs \<le> length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)

goal (1 subgoal):
 1. t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)
[PROOF STEP]
note t_list_of_A_log_bound[of "heap_of_A xs", OF braun_heap_of_A]
[PROOF STATE]
proof (state)
this:
t_list_of_A (heap_of_A xs) \<le> 2 * nat \<lceil>log 2 (real (size (heap_of_A xs) + 1))\<rceil> * size (heap_of_A xs)

goal (1 subgoal):
 1. t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>\<And>x y. x \<le> y \<Longrightarrow> x + t_list_of_A (heap_of_A xs) \<le> y + t_list_of_A (heap_of_A xs); \<And>x y. x \<le> y \<Longrightarrow> length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1) + x \<le> length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1) + y\<rbrakk> \<Longrightarrow> t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1) + 2 * nat \<lceil>log 2 (real (size (heap_of_A xs) + 1))\<rceil> * size (heap_of_A xs)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>\<And>x y. x \<le> y \<Longrightarrow> x + t_list_of_A (heap_of_A xs) \<le> y + t_list_of_A (heap_of_A xs); \<And>x y. x \<le> y \<Longrightarrow> length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1) + x \<le> length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1) + y\<rbrakk> \<Longrightarrow> t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1) + 2 * nat \<lceil>log 2 (real (size (heap_of_A xs) + 1))\<rceil> * size (heap_of_A xs)

goal (1 subgoal):
 1. t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)
[PROOF STEP]
by (simp add: size_heap_of_A)
[PROOF STATE]
proof (state)
this:
t_heap_of_A xs + t_list_of_A (heap_of_A xs) \<le> 3 * length xs * (nat \<lceil>log 2 (real (length xs + 1))\<rceil> + 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "(13::int) * 19 = 247"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 13 * 19 = 247
[PROOF STEP]
by simp