[STATEMENT]
lemma rbtreeify_filter_minus:
  assumes "rbt_sorted t1"
  shows "rbt_sorted (rbtreeify (filter_minus t1 t2)) \<and>
    rbt_lookup (rbtreeify (filter_minus t1 t2)) k =
    (case rbt_lookup t1 k of None \<Rightarrow> None
    | Some v \<Rightarrow> (case rbt_lookup t2 k of None \<Rightarrow> Some v | _ \<Rightarrow> None))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rbt_sorted (rbtreeify (filter_minus t1 t2)) \<and> rbt_lookup (rbtreeify (filter_minus t1 t2)) k = (case rbt_lookup t1 k of None \<Rightarrow> None | Some v \<Rightarrow> case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. rbt_sorted (rbtreeify (filter_minus t1 t2)) \<and> rbt_lookup (rbtreeify (filter_minus t1 t2)) k = (case rbt_lookup t1 k of None \<Rightarrow> None | Some v \<Rightarrow> case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x)
[PROOF STEP]
have map_of_filter: "map_of (filter (\<lambda>(k, _). rbt_lookup t2 k = None) xs) k =
    (case map_of xs k of None \<Rightarrow> None
    | Some v \<Rightarrow> (case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x))"
      for xs :: "('a \<times> 'b) list"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map_of (filter (\<lambda>(k, uu_). rbt_lookup t2 k = None) xs) k = (case map_of xs k of None \<Rightarrow> None | Some v \<Rightarrow> case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x)
[PROOF STEP]
by (induction xs) (auto split: option.splits)
[PROOF STATE]
proof (state)
this:
map_of (filter (\<lambda>(k, uu_). rbt_lookup t2 k = None) ?xs) k = (case map_of ?xs k of None \<Rightarrow> None | Some v \<Rightarrow> case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x)

goal (1 subgoal):
 1. rbt_sorted (rbtreeify (filter_minus t1 t2)) \<and> rbt_lookup (rbtreeify (filter_minus t1 t2)) k = (case rbt_lookup t1 k of None \<Rightarrow> None | Some v \<Rightarrow> case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x)
[PROOF STEP]
have map_fst_filter_minus: "map fst (filter_minus t1 t2) =
    filter (\<lambda>k. rbt_lookup t2 k = None) (map fst (RBT_Impl.entries t1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map fst (filter_minus t1 t2) = filter (\<lambda>k. rbt_lookup t2 k = None) (map fst (entries t1))
[PROOF STEP]
by (auto simp: filter_minus_def filter_map comp_def case_prod_unfold)
[PROOF STATE]
proof (state)
this:
map fst (filter_minus t1 t2) = filter (\<lambda>k. rbt_lookup t2 k = None) (map fst (entries t1))

goal (1 subgoal):
 1. rbt_sorted (rbtreeify (filter_minus t1 t2)) \<and> rbt_lookup (rbtreeify (filter_minus t1 t2)) k = (case rbt_lookup t1 k of None \<Rightarrow> None | Some v \<Rightarrow> case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x)
[PROOF STEP]
have "sorted (map fst (filter_minus t1 t2))" "distinct (map fst (filter_minus t1 t2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sorted (map fst (filter_minus t1 t2)) &&& distinct (map fst (filter_minus t1 t2))
[PROOF STEP]
using distinct_filter distinct_entries[OF assms]
      sorted_filter[of id] rbt_sorted_entries[OF assms]
[PROOF STATE]
proof (prove)
using this:
distinct ?xs \<Longrightarrow> distinct (filter ?P ?xs)
distinct (map fst (entries t1))
sorted (map id ?xs) \<Longrightarrow> sorted (map id (filter ?P ?xs))
sorted (map fst (entries t1))

goal (1 subgoal):
 1. sorted (map fst (filter_minus t1 t2)) &&& distinct (map fst (filter_minus t1 t2))
[PROOF STEP]
by (auto simp: map_fst_filter_minus intro!: rbt_sorted_rbtreeify)
[PROOF STATE]
proof (state)
this:
sorted (map fst (filter_minus t1 t2))
distinct (map fst (filter_minus t1 t2))

goal (1 subgoal):
 1. rbt_sorted (rbtreeify (filter_minus t1 t2)) \<and> rbt_lookup (rbtreeify (filter_minus t1 t2)) k = (case rbt_lookup t1 k of None \<Rightarrow> None | Some v \<Rightarrow> case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sorted (map fst (filter_minus t1 t2))
distinct (map fst (filter_minus t1 t2))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
sorted (map fst (filter_minus t1 t2))
distinct (map fst (filter_minus t1 t2))

goal (1 subgoal):
 1. rbt_sorted (rbtreeify (filter_minus t1 t2)) \<and> rbt_lookup (rbtreeify (filter_minus t1 t2)) k = (case rbt_lookup t1 k of None \<Rightarrow> None | Some v \<Rightarrow> case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x)
[PROOF STEP]
by (auto simp: rbt_lookup_rbtreeify filter_minus_def map_of_filter map_of_entries[OF assms]
        intro!: rbt_sorted_rbtreeify)
[PROOF STATE]
proof (state)
this:
rbt_sorted (rbtreeify (filter_minus t1 t2)) \<and> rbt_lookup (rbtreeify (filter_minus t1 t2)) k = (case rbt_lookup t1 k of None \<Rightarrow> None | Some v \<Rightarrow> case rbt_lookup t2 k of None \<Rightarrow> Some v | Some x \<Rightarrow> Map.empty x)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma euler_liar_mod: "euler_liar (a mod p) p = euler_liar a p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. euler_liar (a mod int p) p = euler_liar a p
[PROOF STEP]
by simp


[STATEMENT]
lemma eval_tm_lower_bound: "eval_tm \<AA> is \<ge> (2 ^ Length \<AA> - 1) * sum_list [i. i \<leftarrow> is, i < 0]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (2 ^ Length \<AA> - 1) * sum_list (concat (map (\<lambda>i. if i < 0 then [i] else []) is)) \<le> eval_tm \<AA> is
[PROOF STEP]
by transfer (auto simp: scalar_product_lower_bound)


[STATEMENT]
theorem inserted_but_not_deleted:
  assumes "list_ops ops"
    and "interp_ops ops = (list, vals)"
  shows "a \<in> dom (vals) \<longleftrightarrow> (\<exists>ref val. (a, Insert ref val) \<in> set ops) \<and>
                            (\<nexists>i. (i, Delete a) \<in> set ops)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<in> dom vals) = ((\<exists>ref val. (a, Insert ref val) \<in> set ops) \<and> (\<nexists>i. (i, Delete a) \<in> set ops))
[PROOF STEP]
using assms deleted_ids_exist inserted_ids_exist interp_ops_vals_domain
[PROOF STATE]
proof (prove)
using this:
list_ops ops
interp_ops ops = (list, vals)
(?ref \<in> set (deleted_ids ?ops)) = (\<exists>i. (i, Delete ?ref) \<in> set ?ops)
(?oid \<in> set (inserted_ids ?ops)) = (\<exists>ref val. (?oid, Insert ref val) \<in> set ?ops)
list_ops ?ops \<Longrightarrow> dom (snd (interp_ops ?ops)) = set (inserted_ids ?ops) - set (deleted_ids ?ops)

goal (1 subgoal):
 1. (a \<in> dom vals) = ((\<exists>ref val. (a, Insert ref val) \<in> set ops) \<and> (\<nexists>i. (i, Delete a) \<in> set ops))
[PROOF STEP]
by (metis Diff_iff snd_conv)


[STATEMENT]
lemma ltl_prop_equiv_min_dnf:
  "\<phi> \<sim>\<^sub>P \<psi> = (min_dnf \<phi> = min_dnf \<psi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<phi> \<sim>\<^sub>P \<psi> = (min_dnf \<phi> = min_dnf \<psi>)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<phi> \<sim>\<^sub>P \<psi> \<Longrightarrow> min_dnf \<phi> = min_dnf \<psi>
 2. min_dnf \<phi> = min_dnf \<psi> \<Longrightarrow> \<phi> \<sim>\<^sub>P \<psi>
[PROOF STEP]
assume "\<phi> \<sim>\<^sub>P \<psi>"
[PROOF STATE]
proof (state)
this:
\<phi> \<sim>\<^sub>P \<psi>

goal (2 subgoals):
 1. \<phi> \<sim>\<^sub>P \<psi> \<Longrightarrow> min_dnf \<phi> = min_dnf \<psi>
 2. min_dnf \<phi> = min_dnf \<psi> \<Longrightarrow> \<phi> \<sim>\<^sub>P \<psi>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<phi> \<sim>\<^sub>P \<psi>
[PROOF STEP]
have "\<And>x. x \<in> min_set (min_dnf \<phi>) \<longleftrightarrow> x \<in> min_set (min_dnf \<psi>)"
[PROOF STATE]
proof (prove)
using this:
\<phi> \<sim>\<^sub>P \<psi>

goal (1 subgoal):
 1. \<And>x. (x \<in> min_set (min_dnf \<phi>)) = (x \<in> min_set (min_dnf \<psi>))
[PROOF STEP]
unfolding ltl_prop_implies_equiv ltl_prop_implies_min_dnf min_set_iff
[PROOF STATE]
proof (prove)
using this:
(\<forall>A\<in>min_dnf \<phi>. \<exists>B\<in>min_dnf \<psi>. B |\<subseteq>| A) \<and> (\<forall>A\<in>min_dnf \<psi>. \<exists>B\<in>min_dnf \<phi>. B |\<subseteq>| A)

goal (1 subgoal):
 1. \<And>x. (x \<in> min_dnf \<phi> \<and> (\<forall>y\<in>min_dnf \<phi>. y |\<subseteq>| x \<longrightarrow> y = x)) = (x \<in> min_dnf \<psi> \<and> (\<forall>y\<in>min_dnf \<psi>. y |\<subseteq>| x \<longrightarrow> y = x))
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
(?x \<in> min_set (min_dnf \<phi>)) = (?x \<in> min_set (min_dnf \<psi>))

goal (2 subgoals):
 1. \<phi> \<sim>\<^sub>P \<psi> \<Longrightarrow> min_dnf \<phi> = min_dnf \<psi>
 2. min_dnf \<phi> = min_dnf \<psi> \<Longrightarrow> \<phi> \<sim>\<^sub>P \<psi>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(?x \<in> min_set (min_dnf \<phi>)) = (?x \<in> min_set (min_dnf \<psi>))
[PROOF STEP]
show "min_dnf \<phi> = min_dnf \<psi>"
[PROOF STATE]
proof (prove)
using this:
(?x \<in> min_set (min_dnf \<phi>)) = (?x \<in> min_set (min_dnf \<psi>))

goal (1 subgoal):
 1. min_dnf \<phi> = min_dnf \<psi>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
min_dnf \<phi> = min_dnf \<psi>

goal (1 subgoal):
 1. min_dnf \<phi> = min_dnf \<psi> \<Longrightarrow> \<phi> \<sim>\<^sub>P \<psi>
[PROOF STEP]
qed (simp add: ltl_prop_equiv_def min_dnf_iff_prop_assignment_subset)


[STATEMENT]
lemma octo_mult_scaleR_left: "(r *\<^sub>R x) * y = r *\<^sub>R (x * y :: octo)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. r *\<^sub>R x * y = r *\<^sub>R (x * y)
[PROOF STEP]
by (simp add: octo_eq_iff octo_mult_components algebra_simps)


[STATEMENT]
lemma integral_bounded_linear: "bounded_linear T \<Longrightarrow> integrable M f \<Longrightarrow>
    integral\<^sup>L M (\<lambda>x. T (f x)) = T (integral\<^sup>L M f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>bounded_linear T; integrable M f\<rbrakk> \<Longrightarrow> LINT x|M. T (f x) = T (integral\<^sup>L M f)
[PROOF STEP]
by (metis has_bochner_integral_bounded_linear has_bochner_integral_integrable has_bochner_integral_integral_eq)


[STATEMENT]
lemma prv_imp_imp_neg_rev:
  assumes "\<phi> \<in> fmla" and "\<chi> \<in> fmla"
  shows "prv (imp (imp \<phi> \<chi>)
                (imp (neg \<chi>) (neg \<phi>)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prv (imp (imp \<phi> \<chi>) (imp (neg \<chi>) (neg \<phi>)))
[PROOF STEP]
unfolding neg_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. prv (imp (imp \<phi> \<chi>) (imp (imp \<chi> fls) (imp \<phi> fls)))
[PROOF STEP]
using prv_imp_trans2[OF assms fls]
[PROOF STATE]
proof (prove)
using this:
prv (imp (imp \<phi> \<chi>) (imp (imp \<chi> fls) (imp \<phi> fls)))

goal (1 subgoal):
 1. prv (imp (imp \<phi> \<chi>) (imp (imp \<chi> fls) (imp \<phi> fls)))
[PROOF STEP]
.


[STATEMENT]
theorem RA6: "((P \<or> Q) ;; R) = (P;;R \<or> Q;;R)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (P \<or> Q) ;; R = (P ;; R \<or> Q ;; R)
[PROOF STEP]
using seqr_or_distl
[PROOF STATE]
proof (prove)
using this:
(?P \<or> ?Q) ;; ?R = (?P ;; ?R \<or> ?Q ;; ?R)

goal (1 subgoal):
 1. (P \<or> Q) ;; R = (P ;; R \<or> Q ;; R)
[PROOF STEP]
by blast


[STATEMENT]
lemma in_convex_hull_linear_image:
  assumes "linear f"
    and "x \<in> convex hull s"
  shows "f x \<in> convex hull (f ` s)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<in> convex hull f ` s
[PROOF STEP]
using convex_hull_linear_image[OF assms(1)] assms(2)
[PROOF STATE]
proof (prove)
using this:
f ` (convex hull ?s) = convex hull f ` ?s
x \<in> convex hull s

goal (1 subgoal):
 1. f x \<in> convex hull f ` s
[PROOF STEP]
by auto


[STATEMENT]
lemma fls_deriv_linear2:
  "fls_deriv (f * fls_const a + g * fls_const b) =
    fls_deriv f * fls_const a + fls_deriv g * fls_const b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fls_deriv (f * fls_const a + g * fls_const b) = fls_deriv f * fls_const a + fls_deriv g * fls_const b
[PROOF STEP]
by simp


[STATEMENT]
lemma swap_cols_rows_index[simp]:
  "i < dim_row A \<Longrightarrow> i < dim_col A \<Longrightarrow> j < dim_row A \<Longrightarrow> j < dim_col A \<Longrightarrow> a < dim_row A \<Longrightarrow> b < dim_row A
    \<Longrightarrow> swap_cols_rows a b A $$ (i,j) = A $$ (if i = a then b else if i = b then a else i,
     if j = a then b else if j = b then a else j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < dim_row A; i < dim_col A; j < dim_row A; j < dim_col A; a < dim_row A; b < dim_row A\<rbrakk> \<Longrightarrow> swap_cols_rows a b A $$ (i, j) = A $$ (if i = a then b else if i = b then a else i, if j = a then b else if j = b then a else j)
[PROOF STEP]
unfolding swap_cols_rows_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i < dim_row A; i < dim_col A; j < dim_row A; j < dim_col A; a < dim_row A; b < dim_row A\<rbrakk> \<Longrightarrow> swaprows a b (swapcols a b A) $$ (i, j) = A $$ (if i = a then b else if i = b then a else i, if j = a then b else if j = b then a else j)
[PROOF STEP]
by auto


[STATEMENT]
lemma is_Proj_complement[simp]:
  fixes P :: \<open>'a::chilbert_space \<Rightarrow>\<^sub>C\<^sub>L 'a\<close>
  assumes a1: "is_Proj P"
  shows "is_Proj (id_cblinfun - P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_Proj (id_cblinfun - P)
[PROOF STEP]
by (smt (z3) add_diff_cancel_left add_diff_cancel_left' adj_cblinfun_compose adj_plus assms bounded_cbilinear.add_left bounded_cbilinear_cblinfun_compose diff_add_cancel id_cblinfun_adjoint is_Proj_algebraic cblinfun_compose_id_left)


[STATEMENT]
lemma "Fract a b = of_int a / of_int b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Fract a b = rat_of_int a / rat_of_int b
[PROOF STEP]
nitpick [card = 1, expect = none]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Fract a b = rat_of_int a / rat_of_int b
[PROOF STEP]
by (rule Fract_of_int_quotient)


[STATEMENT]
lemma  cross_basis: "(axis 1 1) \<times> (axis 2 1) = axis 3 1" "(axis 2 1) \<times> (axis 1 1) = -(axis 3 1)"
                   "(axis 2 1) \<times> (axis 3 1) = axis 1 1" "(axis 3 1) \<times> (axis 2 1) = -(axis 1 1)"
                   "(axis 3 1) \<times> (axis 1 1) = axis 2 1" "(axis 1 1) \<times> (axis 3 1) = -(axis 2 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (axis 1 1 \<times> axis 2 1 = axis 3 1 &&& axis 2 1 \<times> axis 1 1 = - axis 3 1 &&& axis 2 1 \<times> axis 3 1 = axis 1 1) &&& axis 3 1 \<times> axis 2 1 = - axis 1 1 &&& axis 3 1 \<times> axis 1 1 = axis 2 1 &&& axis 1 1 \<times> axis 3 1 = - axis 2 1
[PROOF STEP]
using exhaust_3
[PROOF STATE]
proof (prove)
using this:
?x = 1 \<or> ?x = 2 \<or> ?x = 3

goal (1 subgoal):
 1. (axis 1 1 \<times> axis 2 1 = axis 3 1 &&& axis 2 1 \<times> axis 1 1 = - axis 3 1 &&& axis 2 1 \<times> axis 3 1 = axis 1 1) &&& axis 3 1 \<times> axis 2 1 = - axis 1 1 &&& axis 3 1 \<times> axis 1 1 = axis 2 1 &&& axis 1 1 \<times> axis 3 1 = - axis 2 1
[PROOF STEP]
by (force simp add: axis_def cross3_simps)+


[STATEMENT]
lemma is_nth_power_prime_power_nat_iff:
  fixes p :: nat assumes "prime p"
  shows "is_nth_power n (p ^ k) \<longleftrightarrow> n dvd k"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_nth_power n (p ^ k) = (n dvd k)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
prime p

goal (1 subgoal):
 1. is_nth_power n (p ^ k) = (n dvd k)
[PROOF STEP]
by (cases "n > 0")
     (auto simp: is_nth_power_conv_multiplicity_nat prime_elem_multiplicity_power_distrib)


[STATEMENT]
lemma degree_minus_eq_right:
fixes p::"'b::ab_group_add poly"
shows "degree q < degree p \<Longrightarrow> degree (p - q) = degree p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. degree q < degree p \<Longrightarrow> degree (p - q) = degree p
[PROOF STEP]
using degree_add_eq_left[of "-q" p] degree_minus
[PROOF STATE]
proof (prove)
using this:
degree (- q) < degree p \<Longrightarrow> degree (p + - q) = degree p
degree (- ?p) = degree ?p

goal (1 subgoal):
 1. degree q < degree p \<Longrightarrow> degree (p - q) = degree p
[PROOF STEP]
by auto


[STATEMENT]
lemma submap_imp_state_succ_submap:
  fixes a :: "'a action" and s1 s2
  assumes "(fst a \<subseteq>\<^sub>f s1)" "(s1 \<subseteq>\<^sub>f s2)"
  shows "(state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a
[PROOF STEP]
have 1: "state_succ s1 a = (snd a ++ s1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. state_succ s1 a = snd a ++ s1
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
fst a \<subseteq>\<^sub>f s1

goal (1 subgoal):
 1. state_succ s1 a = snd a ++ s1
[PROOF STEP]
by (simp add: state_succ_def)
[PROOF STATE]
proof (state)
this:
state_succ s1 a = snd a ++ s1

goal (1 subgoal):
 1. state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
state_succ s1 a = snd a ++ s1
[PROOF STEP]
have "fst a \<subseteq>\<^sub>f s2"
[PROOF STATE]
proof (prove)
using this:
state_succ s1 a = snd a ++ s1

goal (1 subgoal):
 1. fst a \<subseteq>\<^sub>f s2
[PROOF STEP]
using assms(1, 2) submap_imp_state_succ_submap_a
[PROOF STATE]
proof (prove)
using this:
state_succ s1 a = snd a ++ s1
fst a \<subseteq>\<^sub>f s1
s1 \<subseteq>\<^sub>f s2
\<lbrakk>?s1.0 \<subseteq>\<^sub>f ?s2.0; ?s2.0 \<subseteq>\<^sub>f ?s3.0\<rbrakk> \<Longrightarrow> ?s1.0 \<subseteq>\<^sub>f ?s3.0

goal (1 subgoal):
 1. fst a \<subseteq>\<^sub>f s2
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
fst a \<subseteq>\<^sub>f s2

goal (1 subgoal):
 1. state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
fst a \<subseteq>\<^sub>f s2
[PROOF STEP]
have 2: "state_succ s2 a = (snd a ++ s2)"
[PROOF STATE]
proof (prove)
using this:
fst a \<subseteq>\<^sub>f s2

goal (1 subgoal):
 1. state_succ s2 a = snd a ++ s2
[PROOF STEP]
using 1 state_succ_def
[PROOF STATE]
proof (prove)
using this:
fst a \<subseteq>\<^sub>f s2
state_succ s1 a = snd a ++ s1
state_succ ?s ?a \<equiv> if fst ?a \<subseteq>\<^sub>f ?s then snd ?a ++ ?s else ?s

goal (1 subgoal):
 1. state_succ s2 a = snd a ++ s2
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
state_succ s2 a = snd a ++ s2

goal (1 subgoal):
 1. state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
state_succ s2 a = snd a ++ s2
[PROOF STEP]
have "snd a ++ s1 \<subseteq>\<^sub>f snd a ++ s2"
[PROOF STATE]
proof (prove)
using this:
state_succ s2 a = snd a ++ s2

goal (1 subgoal):
 1. snd a ++ s1 \<subseteq>\<^sub>f snd a ++ s2
[PROOF STEP]
using assms(2) submap_imp_state_succ_submap_b
[PROOF STATE]
proof (prove)
using this:
state_succ s2 a = snd a ++ s2
s1 \<subseteq>\<^sub>f s2
?s1.0 \<subseteq>\<^sub>f ?s2.0 \<Longrightarrow> ?s0.0 ++ ?s1.0 \<subseteq>\<^sub>f ?s0.0 ++ ?s2.0

goal (1 subgoal):
 1. snd a ++ s1 \<subseteq>\<^sub>f snd a ++ s2
[PROOF STEP]
by fast
[PROOF STATE]
proof (state)
this:
snd a ++ s1 \<subseteq>\<^sub>f snd a ++ s2

goal (1 subgoal):
 1. state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
snd a ++ s1 \<subseteq>\<^sub>f snd a ++ s2
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
snd a ++ s1 \<subseteq>\<^sub>f snd a ++ s2

goal (1 subgoal):
 1. state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a
[PROOF STEP]
using 1 2
[PROOF STATE]
proof (prove)
using this:
snd a ++ s1 \<subseteq>\<^sub>f snd a ++ s2
state_succ s1 a = snd a ++ s1
state_succ s2 a = snd a ++ s2

goal (1 subgoal):
 1. state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a
[PROOF STEP]
by argo
[PROOF STATE]
proof (state)
this:
state_succ s1 a \<subseteq>\<^sub>f state_succ s2 a

goal:
No subgoals!
[PROOF STEP]
qed

\<comment> \<open>NOTE types for `a`, `s1` and `s2` had to be fixed (type mismatch in goal).\<close>


[STATEMENT]
lemma complete_fin_sgraph: "finite S \<Longrightarrow> fin_sgraph S (all_edges S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite S \<Longrightarrow> fin_sgraph S (all_edges S)
[PROOF STEP]
using complete_sgraph
[PROOF STATE]
proof (prove)
using this:
sgraph ?S (all_edges ?S)

goal (1 subgoal):
 1. finite S \<Longrightarrow> fin_sgraph S (all_edges S)
[PROOF STEP]
by (intro_locales) (auto simp add: sgraph.axioms(1) sgraph_def fin_graph_system_axioms_def)


[STATEMENT]
lemma sum_list_nonneg_eq_zero_iff:
  fixes xs :: "'a :: linordered_ab_group_add list"
  shows "(\<And>x. x \<in> set xs \<Longrightarrow> x \<ge> 0) \<Longrightarrow> sum_list xs = 0 \<longleftrightarrow> set xs \<subseteq> {0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> set xs \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list xs = (0::'a)) = (set xs \<subseteq> {0::'a})
[PROOF STEP]
proof (induction xs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<And>x. x \<in> set [] \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list [] = (0::'a)) = (set [] \<subseteq> {0::'a})
 2. \<And>a xs. \<lbrakk>(\<And>x. x \<in> set xs \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list xs = (0::'a)) = (set xs \<subseteq> {0::'a}); \<And>x. x \<in> set (a # xs) \<Longrightarrow> (0::'a) \<le> x\<rbrakk> \<Longrightarrow> (sum_list (a # xs) = (0::'a)) = (set (a # xs) \<subseteq> {0::'a})
[PROOF STEP]
case (Cons x xs)
[PROOF STATE]
proof (state)
this:
(\<And>x. x \<in> set xs \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list xs = (0::'a)) = (set xs \<subseteq> {0::'a})
?x \<in> set (x # xs) \<Longrightarrow> (0::'a) \<le> ?x

goal (2 subgoals):
 1. (\<And>x. x \<in> set [] \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list [] = (0::'a)) = (set [] \<subseteq> {0::'a})
 2. \<And>a xs. \<lbrakk>(\<And>x. x \<in> set xs \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list xs = (0::'a)) = (set xs \<subseteq> {0::'a}); \<And>x. x \<in> set (a # xs) \<Longrightarrow> (0::'a) \<le> x\<rbrakk> \<Longrightarrow> (sum_list (a # xs) = (0::'a)) = (set (a # xs) \<subseteq> {0::'a})
[PROOF STEP]
from Cons.prems
[PROOF STATE]
proof (chain)
picking this:
?x \<in> set (x # xs) \<Longrightarrow> (0::'a) \<le> ?x
[PROOF STEP]
have "sum_list (x#xs) = 0 \<longleftrightarrow> x = 0 \<and> sum_list xs = 0"
[PROOF STATE]
proof (prove)
using this:
?x \<in> set (x # xs) \<Longrightarrow> (0::'a) \<le> ?x

goal (1 subgoal):
 1. (sum_list (x # xs) = (0::'a)) = (x = (0::'a) \<and> sum_list xs = (0::'a))
[PROOF STEP]
unfolding sum_list_simps
[PROOF STATE]
proof (prove)
using this:
?x \<in> set (x # xs) \<Longrightarrow> (0::'a) \<le> ?x

goal (1 subgoal):
 1. (x + sum_list xs = (0::'a)) = (x = (0::'a) \<and> sum_list xs = (0::'a))
[PROOF STEP]
by (subst add_nonneg_eq_0_iff) (auto intro: sum_list_nonneg)
[PROOF STATE]
proof (state)
this:
(sum_list (x # xs) = (0::'a)) = (x = (0::'a) \<and> sum_list xs = (0::'a))

goal (2 subgoals):
 1. (\<And>x. x \<in> set [] \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list [] = (0::'a)) = (set [] \<subseteq> {0::'a})
 2. \<And>a xs. \<lbrakk>(\<And>x. x \<in> set xs \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list xs = (0::'a)) = (set xs \<subseteq> {0::'a}); \<And>x. x \<in> set (a # xs) \<Longrightarrow> (0::'a) \<le> x\<rbrakk> \<Longrightarrow> (sum_list (a # xs) = (0::'a)) = (set (a # xs) \<subseteq> {0::'a})
[PROOF STEP]
with Cons.IH Cons.prems
[PROOF STATE]
proof (chain)
picking this:
(\<And>x. x \<in> set xs \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list xs = (0::'a)) = (set xs \<subseteq> {0::'a})
?x \<in> set (x # xs) \<Longrightarrow> (0::'a) \<le> ?x
(sum_list (x # xs) = (0::'a)) = (x = (0::'a) \<and> sum_list xs = (0::'a))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
(\<And>x. x \<in> set xs \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list xs = (0::'a)) = (set xs \<subseteq> {0::'a})
?x \<in> set (x # xs) \<Longrightarrow> (0::'a) \<le> ?x
(sum_list (x # xs) = (0::'a)) = (x = (0::'a) \<and> sum_list xs = (0::'a))

goal (1 subgoal):
 1. (sum_list (x # xs) = (0::'a)) = (set (x # xs) \<subseteq> {0::'a})
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(sum_list (x # xs) = (0::'a)) = (set (x # xs) \<subseteq> {0::'a})

goal (1 subgoal):
 1. (\<And>x. x \<in> set [] \<Longrightarrow> (0::'a) \<le> x) \<Longrightarrow> (sum_list [] = (0::'a)) = (set [] \<subseteq> {0::'a})
[PROOF STEP]
qed simp_all


[STATEMENT]
theorem product_closure:
  "O x y \<Longrightarrow> (\<exists>z. \<forall>w. P w z \<longleftrightarrow> (P w x \<and> P w y))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. O x y \<Longrightarrow> \<exists>z. \<forall>w. P w z = (P w x \<and> P w y)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. O x y \<Longrightarrow> \<exists>z. \<forall>w. P w z = (P w x \<and> P w y)
[PROOF STEP]
assume "O x y"
[PROOF STATE]
proof (state)
this:
O x y

goal (1 subgoal):
 1. O x y \<Longrightarrow> \<exists>z. \<forall>w. P w z = (P w x \<and> P w y)
[PROOF STEP]
hence "(\<forall>w. P w (\<sigma> v. (P v x \<and> P v y)) \<longleftrightarrow> (P w x \<and> P w y))"
[PROOF STATE]
proof (prove)
using this:
O x y

goal (1 subgoal):
 1. \<forall>w. P w (\<sigma>v. P v x \<and> P v y) = (P w x \<and> P w y)
[PROOF STEP]
by (rule common_part_fusion)
[PROOF STATE]
proof (state)
this:
\<forall>w. P w (\<sigma>v. P v x \<and> P v y) = (P w x \<and> P w y)

goal (1 subgoal):
 1. O x y \<Longrightarrow> \<exists>z. \<forall>w. P w z = (P w x \<and> P w y)
[PROOF STEP]
thus "\<exists>z. \<forall>w. P w z \<longleftrightarrow> (P w x \<and> P w y)"
[PROOF STATE]
proof (prove)
using this:
\<forall>w. P w (\<sigma>v. P v x \<and> P v y) = (P w x \<and> P w y)

goal (1 subgoal):
 1. \<exists>z. \<forall>w. P w z = (P w x \<and> P w y)
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<exists>z. \<forall>w. P w z = (P w x \<and> P w y)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rapprox_rat_nonpos_nonneg: "x \<le> 0 \<Longrightarrow> 0 \<le> y \<Longrightarrow> real_of_float (rapprox_rat n x y) \<le> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<le> 0; 0 \<le> y\<rbrakk> \<Longrightarrow> real_of_float (rapprox_rat n x y) \<le> 0
[PROOF STEP]
by transfer (simp add: truncate_up_nonpos divide_nonpos_nonneg)


[STATEMENT]
lemma input_sizes_deep_model':
assumes "length rs \<ge> 1"
shows "input_sizes (deep_model'_l rs) = replicate (2^(length rs - 1)) (last rs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
1 \<le> length rs

goal (1 subgoal):
 1. input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
proof (induction "butlast rs" arbitrary:rs)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>rs. \<lbrakk>[] = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
 2. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
case Nil
[PROOF STATE]
proof (state)
this:
[] = butlast rs
1 \<le> length rs

goal (2 subgoals):
 1. \<And>rs. \<lbrakk>[] = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
 2. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
[] = butlast rs
1 \<le> length rs
[PROOF STEP]
have "rs = [rs!0]"
[PROOF STATE]
proof (prove)
using this:
[] = butlast rs
1 \<le> length rs

goal (1 subgoal):
 1. rs = [rs ! 0]
[PROOF STEP]
by (metis One_nat_def diff_diff_cancel diff_zero length_0_conv length_Suc_conv length_butlast nth_Cons_0)
[PROOF STATE]
proof (state)
this:
rs = [rs ! 0]

goal (2 subgoals):
 1. \<And>rs. \<lbrakk>[] = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
 2. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
rs = [rs ! 0]
[PROOF STEP]
have "input_sizes (deep_model'_l rs) = [last rs]"
[PROOF STATE]
proof (prove)
using this:
rs = [rs ! 0]

goal (1 subgoal):
 1. input_sizes (deep_model'_l rs) = [last rs]
[PROOF STEP]
by (metis deep_model'.simps(1) input_sizes.simps(1) last.simps list.sel(3))
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model'_l rs) = [last rs]

goal (2 subgoals):
 1. \<And>rs. \<lbrakk>[] = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
 2. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
input_sizes (deep_model'_l rs) = [last rs]
[PROOF STEP]
show "input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)"
[PROOF STATE]
proof (prove)
using this:
input_sizes (deep_model'_l rs) = [last rs]

goal (1 subgoal):
 1. input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
by (metis One_nat_def \<open>[] = butlast rs\<close> empty_replicate length_butlast list.size(3) power_0 replicate.simps(2))
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
case (Cons r rs' rs)
[PROOF STATE]
proof (state)
this:
\<lbrakk>rs' = butlast ?rs; 1 \<le> length ?rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l ?rs) = replicate (2 ^ (length ?rs - 1)) (last ?rs)
r # rs' = butlast rs
1 \<le> length rs

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>rs' = butlast ?rs; 1 \<le> length ?rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l ?rs) = replicate (2 ^ (length ?rs - 1)) (last ?rs)
r # rs' = butlast rs
1 \<le> length rs
[PROOF STEP]
have IH: "input_sizes (deep_model'_l (tl rs)) = replicate (2 ^ (length (tl rs) - 1)) (last rs)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>rs' = butlast ?rs; 1 \<le> length ?rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l ?rs) = replicate (2 ^ (length ?rs - 1)) (last ?rs)
r # rs' = butlast rs
1 \<le> length rs

goal (1 subgoal):
 1. input_sizes (deep_model'_l (tl rs)) = replicate (2 ^ (length (tl rs) - 1)) (last rs)
[PROOF STEP]
by (metis (no_types, lifting) One_nat_def butlast_tl diff_is_0_eq' last_tl length_Cons
    length_butlast length_tl list.sel(3) list.size(3) nat_le_linear not_one_le_zero)
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model'_l (tl rs)) = replicate (2 ^ (length (tl rs) - 1)) (last rs)

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
have "rs = r # (tl rs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rs = r # tl rs
[PROOF STEP]
by (metis Cons.hyps(2) Cons.prems One_nat_def append_Cons append_butlast_last_id length_greater_0_conv less_le_trans list.sel(3) zero_less_Suc)
[PROOF STATE]
proof (state)
this:
rs = r # tl rs

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
rs = r # tl rs
[PROOF STEP]
have "deep_model'_l rs = Pool (deep_model_l rs) (deep_model_l rs)"
[PROOF STATE]
proof (prove)
using this:
rs = r # tl rs

goal (1 subgoal):
 1. deep_model'_l rs = Pool (deep_model_l rs) (deep_model_l rs)
[PROOF STEP]
by (metis Cons.hyps(2) One_nat_def butlast.simps(2) deep_model'.elims list.sel(3) list.simps(3) nth_Cons_0 nth_Cons_Suc)
[PROOF STATE]
proof (state)
this:
deep_model'_l rs = Pool (deep_model_l rs) (deep_model_l rs)

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
deep_model'_l rs = Pool (deep_model_l rs) (deep_model_l rs)
[PROOF STEP]
have "input_sizes (deep_model'_l rs) = input_sizes (deep_model_l rs) @ input_sizes (deep_model_l rs)"
[PROOF STATE]
proof (prove)
using this:
deep_model'_l rs = Pool (deep_model_l rs) (deep_model_l rs)

goal (1 subgoal):
 1. input_sizes (deep_model'_l rs) = input_sizes (deep_model_l rs) @ input_sizes (deep_model_l rs)
[PROOF STEP]
using input_sizes.simps(3)
[PROOF STATE]
proof (prove)
using this:
deep_model'_l rs = Pool (deep_model_l rs) (deep_model_l rs)
input_sizes (Pool ?m1.0 ?m2.0) = input_sizes ?m1.0 @ input_sizes ?m2.0

goal (1 subgoal):
 1. input_sizes (deep_model'_l rs) = input_sizes (deep_model_l rs) @ input_sizes (deep_model_l rs)
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model'_l rs) = input_sizes (deep_model_l rs) @ input_sizes (deep_model_l rs)

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model'_l rs) = input_sizes (deep_model_l rs) @ input_sizes (deep_model_l rs)

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
have "... = input_sizes (deep_model'_l (tl rs)) @ input_sizes (deep_model'_l (tl rs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. input_sizes (deep_model_l rs) @ input_sizes (deep_model_l rs) = input_sizes (deep_model'_l (tl rs)) @ input_sizes (deep_model'_l (tl rs))
[PROOF STEP]
by (metis (no_types, lifting) Cons.hyps(2) One_nat_def deep_model.elims input_sizes.simps(2)
    length_Cons length_butlast length_greater_0_conv length_tl list.sel(2) list.sel(3) list.size(3)
    nth_tl one_neq_zero)
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model_l rs) @ input_sizes (deep_model_l rs) = input_sizes (deep_model'_l (tl rs)) @ input_sizes (deep_model'_l (tl rs))

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model_l rs) @ input_sizes (deep_model_l rs) = input_sizes (deep_model'_l (tl rs)) @ input_sizes (deep_model'_l (tl rs))

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
have "... = replicate (2 ^ (length (tl rs) - 1)) (last rs) @ replicate (2 ^ (length (tl rs) - 1)) (last rs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. input_sizes (deep_model'_l (tl rs)) @ input_sizes (deep_model'_l (tl rs)) = replicate (2 ^ (length (tl rs) - 1)) (last rs) @ replicate (2 ^ (length (tl rs) - 1)) (last rs)
[PROOF STEP]
using IH
[PROOF STATE]
proof (prove)
using this:
input_sizes (deep_model'_l (tl rs)) = replicate (2 ^ (length (tl rs) - 1)) (last rs)

goal (1 subgoal):
 1. input_sizes (deep_model'_l (tl rs)) @ input_sizes (deep_model'_l (tl rs)) = replicate (2 ^ (length (tl rs) - 1)) (last rs) @ replicate (2 ^ (length (tl rs) - 1)) (last rs)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model'_l (tl rs)) @ input_sizes (deep_model'_l (tl rs)) = replicate (2 ^ (length (tl rs) - 1)) (last rs) @ replicate (2 ^ (length (tl rs) - 1)) (last rs)

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model'_l (tl rs)) @ input_sizes (deep_model'_l (tl rs)) = replicate (2 ^ (length (tl rs) - 1)) (last rs) @ replicate (2 ^ (length (tl rs) - 1)) (last rs)

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
have "... = replicate (2 ^ (length rs - 1)) (last rs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. replicate (2 ^ (length (tl rs) - 1)) (last rs) @ replicate (2 ^ (length (tl rs) - 1)) (last rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
using replicate_add[of "2 ^ (length (tl rs) - 1)" "2 ^ (length (tl rs) - 1)" "last rs"]
[PROOF STATE]
proof (prove)
using this:
replicate (2 ^ (length (tl rs) - 1) + 2 ^ (length (tl rs) - 1)) (last rs) = replicate (2 ^ (length (tl rs) - 1)) (last rs) @ replicate (2 ^ (length (tl rs) - 1)) (last rs)

goal (1 subgoal):
 1. replicate (2 ^ (length (tl rs) - 1)) (last rs) @ replicate (2 ^ (length (tl rs) - 1)) (last rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
by (metis Cons.hyps(2) One_nat_def butlast_tl length_butlast list.sel(3) list.size(4) mult_2_right
    power_add power_one_right)
[PROOF STATE]
proof (state)
this:
replicate (2 ^ (length (tl rs) - 1)) (last rs) @ replicate (2 ^ (length (tl rs) - 1)) (last rs) = replicate (2 ^ (length rs - 1)) (last rs)

goal (1 subgoal):
 1. \<And>a x rs. \<lbrakk>\<And>rs. \<lbrakk>x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs); a # x = butlast rs; 1 \<le> length rs\<rbrakk> \<Longrightarrow> input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)

goal (1 subgoal):
 1. input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
input_sizes (deep_model'_l rs) = replicate (2 ^ (length rs - 1)) (last rs)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma normalize_quot_aux:
  fixes a b
  assumes "b \<noteq> 0"
  defines "d \<equiv> gcd a b * unit_factor b"
  shows   "a = fst (normalize_quot (a,b)) * d" "b = snd (normalize_quot (a,b)) * d"
          "d dvd a" "d dvd b" "d \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a = fst (normalize_quot (a, b)) * d &&& b = snd (normalize_quot (a, b)) * d) &&& d dvd a &&& d dvd b &&& d \<noteq> (0::'a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. a = fst (normalize_quot (a, b)) * d
 2. b = snd (normalize_quot (a, b)) * d
 3. d dvd a
 4. d dvd b
 5. d \<noteq> (0::'a)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
b \<noteq> (0::'a)
d \<equiv> gcd a b * unit_factor b
[PROOF STEP]
show "d dvd a" "d dvd b"
[PROOF STATE]
proof (prove)
using this:
b \<noteq> (0::'a)
d \<equiv> gcd a b * unit_factor b

goal (1 subgoal):
 1. d dvd a &&& d dvd b
[PROOF STEP]
by (simp_all add: d_def mult_unit_dvd_iff)
[PROOF STATE]
proof (state)
this:
d dvd a
d dvd b

goal (3 subgoals):
 1. a = fst (normalize_quot (a, b)) * d
 2. b = snd (normalize_quot (a, b)) * d
 3. d \<noteq> (0::'a)
[PROOF STEP]
thus "a = fst (normalize_quot (a,b)) * d" "b = snd (normalize_quot (a,b)) * d" "d \<noteq> 0"
[PROOF STATE]
proof (prove)
using this:
d dvd a
d dvd b

goal (1 subgoal):
 1. a = fst (normalize_quot (a, b)) * d &&& b = snd (normalize_quot (a, b)) * d &&& d \<noteq> (0::'a)
[PROOF STEP]
by (auto simp: normalize_quot_def Let_def d_def \<open>b \<noteq> 0\<close>)
[PROOF STATE]
proof (state)
this:
a = fst (normalize_quot (a, b)) * d
b = snd (normalize_quot (a, b)) * d
d \<noteq> (0::'a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma concat_take_suc: assumes "j < \<^bold>|ws\<^bold>|" shows "concat(take j ws) \<cdot> ws!j = concat(take (Suc j) ws)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. concat (take j ws) \<cdot> ws ! j = concat (take (Suc j) ws)
[PROOF STEP]
unfolding take_Suc_conv_app_nth[OF \<open>j < \<^bold>|ws\<^bold>|\<close>]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. concat (take j ws) \<cdot> ws ! j = concat (take j ws \<cdot> [ws ! j])
[PROOF STEP]
using sym[OF concat_append[of "(take j ws)" "[ws ! j]",
        unfolded concat.simps(2)[of "ws!j" \<epsilon>, unfolded concat.simps(1) append_Nil2]]]
[PROOF STATE]
proof (prove)
using this:
concat (take j ws) \<cdot> ws ! j = concat (take j ws \<cdot> [ws ! j])

goal (1 subgoal):
 1. concat (take j ws) \<cdot> ws ! j = concat (take j ws \<cdot> [ws ! j])
[PROOF STEP]
.


[STATEMENT]
lemma Lambert_W'_eqI:
  assumes "w \<le> -1" "w * exp w = x"
  shows   "Lambert_W' x = w"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lambert_W' x = w
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Lambert_W' x = w
[PROOF STEP]
from assms exp_times_self_ge[of w]
[PROOF STATE]
proof (chain)
picking this:
w \<le> - 1
w * exp w = x
- exp (- 1) \<le> w * exp w
[PROOF STEP]
have "x \<ge> -exp (-1)"
[PROOF STATE]
proof (prove)
using this:
w \<le> - 1
w * exp w = x
- exp (- 1) \<le> w * exp w

goal (1 subgoal):
 1. - exp (- 1) \<le> x
[PROOF STEP]
by (cases "x \<ge> -exp (-1)") auto
[PROOF STATE]
proof (state)
this:
- exp (- 1) \<le> x

goal (1 subgoal):
 1. Lambert_W' x = w
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
- exp (- 1) \<le> x

goal (1 subgoal):
 1. Lambert_W' x = w
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
w \<le> - 1
w * exp w = x
[PROOF STEP]
have "w * exp w < 0"
[PROOF STATE]
proof (prove)
using this:
w \<le> - 1
w * exp w = x

goal (1 subgoal):
 1. w * exp w < 0
[PROOF STEP]
by (intro mult_neg_pos) auto
[PROOF STATE]
proof (state)
this:
w * exp w < 0

goal (1 subgoal):
 1. Lambert_W' x = w
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
- exp (- 1) \<le> x
w * exp w < 0
[PROOF STEP]
have "x \<in> {-exp (-1)..<0}"
[PROOF STATE]
proof (prove)
using this:
- exp (- 1) \<le> x
w * exp w < 0

goal (1 subgoal):
 1. x \<in> {- exp (- 1)..<0}
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
- exp (- 1) \<le> x
w * exp w < 0
w \<le> - 1
w * exp w = x

goal (1 subgoal):
 1. x \<in> {- exp (- 1)..<0}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<in> {- exp (- 1)..<0}

goal (1 subgoal):
 1. Lambert_W' x = w
[PROOF STEP]
from Lambert_W'_ex1[OF this(1)] Lambert_W'_times_exp_self[OF this(1)] Lambert_W'_le assms
[PROOF STATE]
proof (chain)
picking this:
\<exists>!w. w \<le> - 1 \<and> w * exp w = x
Lambert_W' x * exp (Lambert_W' x) = x
Lambert_W' ?x \<le> - 1
w \<le> - 1
w * exp w = x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>!w. w \<le> - 1 \<and> w * exp w = x
Lambert_W' x * exp (Lambert_W' x) = x
Lambert_W' ?x \<le> - 1
w \<le> - 1
w * exp w = x

goal (1 subgoal):
 1. Lambert_W' x = w
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
Lambert_W' x = w

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fps_mod_eq_zero:
  assumes "g \<noteq> 0" and "subdegree f \<ge> subdegree g"
  shows   "f mod g = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f mod g = 0
[PROOF STEP]
proof (cases "f * inverse (unit_factor g) = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. f * inverse (unit_factor g) = 0 \<Longrightarrow> f mod g = 0
 2. f * inverse (unit_factor g) \<noteq> 0 \<Longrightarrow> f mod g = 0
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
f * inverse (unit_factor g) \<noteq> 0

goal (2 subgoals):
 1. f * inverse (unit_factor g) = 0 \<Longrightarrow> f mod g = 0
 2. f * inverse (unit_factor g) \<noteq> 0 \<Longrightarrow> f mod g = 0
[PROOF STEP]
have "fps_cutoff (subdegree g) (f * inverse (unit_factor g)) = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_cutoff (subdegree g) (f * inverse (unit_factor g)) = 0
[PROOF STEP]
using False assms(2) fps_mult_subdegree_ge fps_cutoff_zero_iff
[PROOF STATE]
proof (prove)
using this:
f * inverse (unit_factor g) \<noteq> 0
subdegree g \<le> subdegree f
?f * ?g \<noteq> 0 \<Longrightarrow> subdegree ?f + subdegree ?g \<le> subdegree (?f * ?g)
(fps_cutoff ?n ?f = 0) = (?f = 0 \<or> ?n \<le> subdegree ?f)

goal (1 subgoal):
 1. fps_cutoff (subdegree g) (f * inverse (unit_factor g)) = 0
[PROOF STEP]
by force
[PROOF STATE]
proof (state)
this:
fps_cutoff (subdegree g) (f * inverse (unit_factor g)) = 0

goal (2 subgoals):
 1. f * inverse (unit_factor g) = 0 \<Longrightarrow> f mod g = 0
 2. f * inverse (unit_factor g) \<noteq> 0 \<Longrightarrow> f mod g = 0
[PROOF STEP]
with assms(1)
[PROOF STATE]
proof (chain)
picking this:
g \<noteq> 0
fps_cutoff (subdegree g) (f * inverse (unit_factor g)) = 0
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
g \<noteq> 0
fps_cutoff (subdegree g) (f * inverse (unit_factor g)) = 0

goal (1 subgoal):
 1. f mod g = 0
[PROOF STEP]
by (simp add: fps_mod_def Let_def)
[PROOF STATE]
proof (state)
this:
f mod g = 0

goal (1 subgoal):
 1. f * inverse (unit_factor g) = 0 \<Longrightarrow> f mod g = 0
[PROOF STEP]
qed (simp add: assms fps_mod_def)


[STATEMENT]
lemma bmod_Un_rel: "\<otimes> (\<Squnion>\<R>) f g x = \<Squnion>{\<otimes> R f g x |R. R \<in> \<R>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<otimes> (\<Squnion>\<R>) f g x = \<Squnion>{\<otimes> R f g x |R. R \<in> \<R>}
[PROOF STEP]
apply (simp add: bmod_comp_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion>{f y \<cdot> g z |y z. \<exists>f\<in>\<R>. f x y z} = \<Squnion>{\<Squnion>{f y \<cdot> g z |y z. R x y z} |R. R \<in> \<R>}
[PROOF STEP]
apply (rule antisym)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<Squnion>{f y \<cdot> g z |y z. \<exists>f\<in>\<R>. f x y z} \<le> \<Squnion>{\<Squnion>{f y \<cdot> g z |y z. R x y z} |R. R \<in> \<R>}
 2. \<Squnion>{\<Squnion>{f y \<cdot> g z |y z. R x y z} |R. R \<in> \<R>} \<le> \<Squnion>{f y \<cdot> g z |y z. \<exists>f\<in>\<R>. f x y z}
[PROOF STEP]
apply (rule Sup_least, safe)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>xa y z fa. \<lbrakk>fa \<in> \<R>; fa x y z\<rbrakk> \<Longrightarrow> f y \<cdot> g z \<le> \<Squnion>{\<Squnion>{f y \<cdot> g z |y z. R x y z} |R. R \<in> \<R>}
 2. \<Squnion>{\<Squnion>{f y \<cdot> g z |y z. R x y z} |R. R \<in> \<R>} \<le> \<Squnion>{f y \<cdot> g z |y z. \<exists>f\<in>\<R>. f x y z}
[PROOF STEP]
apply (rule Sup_upper2, force)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>xa y z fa. \<lbrakk>fa \<in> \<R>; fa x y z\<rbrakk> \<Longrightarrow> f y \<cdot> g z \<le> \<Squnion>{f y \<cdot> g z |y z. fa x y z}
 2. \<Squnion>{\<Squnion>{f y \<cdot> g z |y z. R x y z} |R. R \<in> \<R>} \<le> \<Squnion>{f y \<cdot> g z |y z. \<exists>f\<in>\<R>. f x y z}
[PROOF STEP]
apply (rule Sup_upper, force)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion>{\<Squnion>{f y \<cdot> g z |y z. R x y z} |R. R \<in> \<R>} \<le> \<Squnion>{f y \<cdot> g z |y z. \<exists>f\<in>\<R>. f x y z}
[PROOF STEP]
apply (rule Sup_least, safe)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa R xaa y z. \<lbrakk>R \<in> \<R>; R x y z\<rbrakk> \<Longrightarrow> f y \<cdot> g z \<le> \<Squnion>{f y \<cdot> g z |y z. \<exists>f\<in>\<R>. f x y z}
[PROOF STEP]
by (metis (mono_tags, lifting) Sup_upper mem_Collect_eq)


[STATEMENT]
lemma not_prime_unit: "is_unit x \<Longrightarrow> \<not>prime x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_unit x \<Longrightarrow> \<not> prime x
[PROOF STEP]
using prime_elem_not_unit[of x]
[PROOF STATE]
proof (prove)
using this:
prime_elem x \<Longrightarrow> \<not> is_unit x

goal (1 subgoal):
 1. is_unit x \<Longrightarrow> \<not> prime x
[PROOF STEP]
by (auto simp add: prime_def)


[STATEMENT]
lemma sqrt_case :
  assumes detGreater0 : "SQ \<ge> 0"
  shows "((SQ^(i div 2)) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2))) = (sqrt SQ) ^ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
have h1 : "i mod 2 = 0 \<or> (odd i \<and> (i mod 2 = 1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i mod 2 = 0 \<or> odd i \<and> i mod 2 = 1
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i mod 2 = 0 \<or> odd i \<and> i mod 2 = 1

goal (1 subgoal):
 1. SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
have h2 : "i mod 2 = 0 \<Longrightarrow> ((SQ^(i div 2)) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2))) = (sqrt SQ) ^ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. i mod 2 = 0 \<Longrightarrow> SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
using detGreater0
[PROOF STATE]
proof (prove)
using this:
0 \<le> SQ

goal (1 subgoal):
 1. i mod 2 = 0 \<Longrightarrow> SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> SQ; even i\<rbrakk> \<Longrightarrow> SQ ^ (i div 2) = sqrt SQ ^ i
[PROOF STEP]
by (simp add: real_sqrt_power_even)
[PROOF STATE]
proof (state)
this:
i mod 2 = 0 \<Longrightarrow> SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i

goal (1 subgoal):
 1. SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
have h3 : "(odd i \<and> (i mod 2 = 1)) \<Longrightarrow> ((SQ^(i div 2)) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2))) = (sqrt SQ) ^ i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. odd i \<and> i mod 2 = 1 \<Longrightarrow> SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
using detGreater0
[PROOF STATE]
proof (prove)
using this:
0 \<le> SQ

goal (1 subgoal):
 1. odd i \<and> i mod 2 = 1 \<Longrightarrow> SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> SQ; odd i; i mod 2 = Suc 0\<rbrakk> \<Longrightarrow> SQ ^ (i div 2) * sqrt SQ = sqrt SQ ^ i
[PROOF STEP]
by (smt One_nat_def add_Suc_right mult.commute nat_arith.rule0 odd_two_times_div_two_succ power.simps(2) power_mult real_sqrt_pow2)
[PROOF STATE]
proof (state)
this:
odd i \<and> i mod 2 = 1 \<Longrightarrow> SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i

goal (1 subgoal):
 1. SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
using h1 h2 h3
[PROOF STATE]
proof (prove)
using this:
i mod 2 = 0 \<or> odd i \<and> i mod 2 = 1
i mod 2 = 0 \<Longrightarrow> SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
odd i \<and> i mod 2 = 1 \<Longrightarrow> SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i

goal (1 subgoal):
 1. SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i
[PROOF STEP]
by linarith
[PROOF STATE]
proof (state)
this:
SQ ^ (i div 2) * real (i mod 2) * sqrt SQ + SQ ^ (i div 2) * (1 - real (i mod 2)) = sqrt SQ ^ i

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma aff_dim_cball:
  fixes a :: "'n::euclidean_space"
  assumes "e > 0"
  shows "aff_dim (cball a e) = int (DIM('n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aff_dim (cball a e) = int DIM('n)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. aff_dim (cball a e) = int DIM('n)
[PROOF STEP]
have "(\<lambda>x. a + x) ` (cball 0 e) \<subseteq> cball a e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (+) a ` cball (0::'n) e \<subseteq> cball a e
[PROOF STEP]
unfolding cball_def dist_norm
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (+) a ` {y. norm ((0::'n) - y) \<le> e} \<subseteq> {y. norm (a - y) \<le> e}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(+) a ` cball (0::'n) e \<subseteq> cball a e

goal (1 subgoal):
 1. aff_dim (cball a e) = int DIM('n)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(+) a ` cball (0::'n) e \<subseteq> cball a e
[PROOF STEP]
have "aff_dim (cball (0 :: 'n::euclidean_space) e) \<le> aff_dim (cball a e)"
[PROOF STATE]
proof (prove)
using this:
(+) a ` cball (0::'n) e \<subseteq> cball a e

goal (1 subgoal):
 1. aff_dim (cball (0::'n) e) \<le> aff_dim (cball a e)
[PROOF STEP]
using aff_dim_translation_eq[of a "cball 0 e"]
          aff_dim_subset[of "(+) a ` cball 0 e" "cball a e"]
[PROOF STATE]
proof (prove)
using this:
(+) a ` cball (0::'n) e \<subseteq> cball a e
aff_dim ((+) a ` cball (0::'n) e) = aff_dim (cball (0::'n) e)
(+) a ` cball (0::'n) e \<subseteq> cball a e \<Longrightarrow> aff_dim ((+) a ` cball (0::'n) e) \<le> aff_dim (cball a e)

goal (1 subgoal):
 1. aff_dim (cball (0::'n) e) \<le> aff_dim (cball a e)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
aff_dim (cball (0::'n) e) \<le> aff_dim (cball a e)

goal (1 subgoal):
 1. aff_dim (cball a e) = int DIM('n)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
aff_dim (cball (0::'n) e) \<le> aff_dim (cball a e)

goal (1 subgoal):
 1. aff_dim (cball a e) = int DIM('n)
[PROOF STEP]
have "aff_dim (cball (0 :: 'n::euclidean_space) e) = int (DIM('n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. aff_dim (cball (0::'n) e) = int DIM('n)
[PROOF STEP]
using hull_inc[of "(0 :: 'n::euclidean_space)" "cball 0 e"]
      centre_in_cball[of "(0 :: 'n::euclidean_space)"] assms
[PROOF STATE]
proof (prove)
using this:
(0::'n) \<in> cball (0::'n) e \<Longrightarrow> (0::'n) \<in> ?P hull cball (0::'n) e
((0::'n) \<in> cball (0::'n) ?e) = (0 \<le> ?e)
0 < e

goal (1 subgoal):
 1. aff_dim (cball (0::'n) e) = int DIM('n)
[PROOF STEP]
by (simp add: dim_cball[of e] aff_dim_zero[of "cball 0 e"])
[PROOF STATE]
proof (state)
this:
aff_dim (cball (0::'n) e) = int DIM('n)

goal (1 subgoal):
 1. aff_dim (cball a e) = int DIM('n)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
aff_dim (cball (0::'n) e) \<le> aff_dim (cball a e)
aff_dim (cball (0::'n) e) = int DIM('n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
aff_dim (cball (0::'n) e) \<le> aff_dim (cball a e)
aff_dim (cball (0::'n) e) = int DIM('n)

goal (1 subgoal):
 1. aff_dim (cball a e) = int DIM('n)
[PROOF STEP]
using aff_dim_le_DIM[of "cball a e"]
[PROOF STATE]
proof (prove)
using this:
aff_dim (cball (0::'n) e) \<le> aff_dim (cball a e)
aff_dim (cball (0::'n) e) = int DIM('n)
aff_dim (cball a e) \<le> int DIM('n)

goal (1 subgoal):
 1. aff_dim (cball a e) = int DIM('n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
aff_dim (cball a e) = int DIM('n)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lexord_append_leftD:
  "\<lbrakk>(x @ u, x @ v) \<in> lexord r; (\<forall>a. (a,a) \<notin> r) \<rbrakk> \<Longrightarrow> (u,v) \<in> lexord r"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(x @ u, x @ v) \<in> lexord r; \<forall>a. (a, a) \<notin> r\<rbrakk> \<Longrightarrow> (u, v) \<in> lexord r
[PROOF STEP]
by (simp add: lexord_same_pref_iff)


[STATEMENT]
lemma mult_oexp_indec: "\<lbrakk>Ord \<alpha>; Limit \<mu>; indecomposable \<mu>\<rbrakk> \<Longrightarrow> \<alpha> * (\<alpha> \<up> \<mu>) = (\<alpha> \<up> \<mu>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Ord \<alpha>; Limit \<mu>; indecomposable \<mu>\<rbrakk> \<Longrightarrow> \<alpha> * \<alpha> \<up> \<mu> = \<alpha> \<up> \<mu>
[PROOF STEP]
by (metis Limit_def Ord_1 OrdmemD indecomposable_imp_eq oexp_1_right oexp_add one_V_def)


[STATEMENT]
lemma insertion_mult:
  "insertion f (p * q) = insertion f p * insertion f q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. insertion f (p * q) = insertion f p * insertion f q
[PROOF STEP]
by transfer (simp add: insertion_aux_def insertion_fun_mult)


[STATEMENT]
lemma arr_Rel_converse_Rel_comp_Rel[dg_Rel_cs_simps]:
  assumes "arr_Rel \<alpha> G" and "arr_Rel \<alpha> F"
  shows "(F \<circ>\<^sub>R\<^sub>e\<^sub>l G)\<inverse>\<^sub>R\<^sub>e\<^sub>l = G\<inverse>\<^sub>R\<^sub>e\<^sub>l \<circ>\<^sub>R\<^sub>e\<^sub>l F\<inverse>\<^sub>R\<^sub>e\<^sub>l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (F \<circ>\<^sub>R\<^sub>e\<^sub>l G)\<inverse>\<^sub>R\<^sub>e\<^sub>l = G\<inverse>\<^sub>R\<^sub>e\<^sub>l \<circ>\<^sub>R\<^sub>e\<^sub>l F\<inverse>\<^sub>R\<^sub>e\<^sub>l
[PROOF STEP]
proof(rule arr_Rel_eqI, unfold converse_Rel_components comp_Rel_components)
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. arr_Rel ?\<alpha> ((F \<circ>\<^sub>R\<^sub>e\<^sub>l G)\<inverse>\<^sub>R\<^sub>e\<^sub>l)
 2. arr_Rel ?\<alpha> (G\<inverse>\<^sub>R\<^sub>e\<^sub>l \<circ>\<^sub>R\<^sub>e\<^sub>l F\<inverse>\<^sub>R\<^sub>e\<^sub>l)
 3. (F\<lparr>ArrVal\<rparr> \<circ>\<^sub>\<circ> G\<lparr>ArrVal\<rparr>)\<inverse>\<^sub>\<circ> = (G\<lparr>ArrVal\<rparr>)\<inverse>\<^sub>\<circ> \<circ>\<^sub>\<circ> (F\<lparr>ArrVal\<rparr>)\<inverse>\<^sub>\<circ>
 4. F\<lparr>ArrCod\<rparr> = F\<lparr>ArrCod\<rparr>
 5. G\<lparr>ArrDom\<rparr> = G\<lparr>ArrDom\<rparr>
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
arr_Rel \<alpha> G
arr_Rel \<alpha> F
[PROOF STEP]
show "arr_Rel \<alpha> (G\<inverse>\<^sub>R\<^sub>e\<^sub>l \<circ>\<^sub>R\<^sub>e\<^sub>l F\<inverse>\<^sub>R\<^sub>e\<^sub>l)"
[PROOF STATE]
proof (prove)
using this:
arr_Rel \<alpha> G
arr_Rel \<alpha> F

goal (1 subgoal):
 1. arr_Rel \<alpha> (G\<inverse>\<^sub>R\<^sub>e\<^sub>l \<circ>\<^sub>R\<^sub>e\<^sub>l F\<inverse>\<^sub>R\<^sub>e\<^sub>l)
[PROOF STEP]
by (cs_concl cs_shallow cs_intro: dg_Rel_cs_intros)
[PROOF STATE]
proof (state)
this:
arr_Rel \<alpha> (G\<inverse>\<^sub>R\<^sub>e\<^sub>l \<circ>\<^sub>R\<^sub>e\<^sub>l F\<inverse>\<^sub>R\<^sub>e\<^sub>l)

goal (4 subgoals):
 1. arr_Rel \<alpha> ((F \<circ>\<^sub>R\<^sub>e\<^sub>l G)\<inverse>\<^sub>R\<^sub>e\<^sub>l)
 2. (F\<lparr>ArrVal\<rparr> \<circ>\<^sub>\<circ> G\<lparr>ArrVal\<rparr>)\<inverse>\<^sub>\<circ> = (G\<lparr>ArrVal\<rparr>)\<inverse>\<^sub>\<circ> \<circ>\<^sub>\<circ> (F\<lparr>ArrVal\<rparr>)\<inverse>\<^sub>\<circ>
 3. F\<lparr>ArrCod\<rparr> = F\<lparr>ArrCod\<rparr>
 4. G\<lparr>ArrDom\<rparr> = G\<lparr>ArrDom\<rparr>
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
arr_Rel \<alpha> G
arr_Rel \<alpha> F
[PROOF STEP]
show "arr_Rel \<alpha> ((F \<circ>\<^sub>R\<^sub>e\<^sub>l G)\<inverse>\<^sub>R\<^sub>e\<^sub>l)"
[PROOF STATE]
proof (prove)
using this:
arr_Rel \<alpha> G
arr_Rel \<alpha> F

goal (1 subgoal):
 1. arr_Rel \<alpha> ((F \<circ>\<^sub>R\<^sub>e\<^sub>l G)\<inverse>\<^sub>R\<^sub>e\<^sub>l)
[PROOF STEP]
by (cs_intro_step dg_Rel_cs_intros)+
[PROOF STATE]
proof (state)
this:
arr_Rel \<alpha> ((F \<circ>\<^sub>R\<^sub>e\<^sub>l G)\<inverse>\<^sub>R\<^sub>e\<^sub>l)

goal (3 subgoals):
 1. (F\<lparr>ArrVal\<rparr> \<circ>\<^sub>\<circ> G\<lparr>ArrVal\<rparr>)\<inverse>\<^sub>\<circ> = (G\<lparr>ArrVal\<rparr>)\<inverse>\<^sub>\<circ> \<circ>\<^sub>\<circ> (F\<lparr>ArrVal\<rparr>)\<inverse>\<^sub>\<circ>
 2. F\<lparr>ArrCod\<rparr> = F\<lparr>ArrCod\<rparr>
 3. G\<lparr>ArrDom\<rparr> = G\<lparr>ArrDom\<rparr>
[PROOF STEP]
qed (simp_all add: vconverse_vcomp)


[STATEMENT]
lemma exponent_normal_of_Float:"exponent (normal_of_Float x::('e, 'f)float) =
  nat (Float.exponent x + (bias TYPE(('e, 'f)float)) + bitlen \<bar>mantissa x\<bar> - 1)"
  if "is_normal_Float TYPE(('e, 'f)float) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IEEE.exponent (normal_of_Float x) = nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + bitlen \<bar>mantissa x\<bar> - 1)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
is_normal_Float TYPE(('e, 'f) IEEE.float) x

goal (1 subgoal):
 1. IEEE.exponent (normal_of_Float x) = nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + bitlen \<bar>mantissa x\<bar> - 1)
[PROOF STEP]
apply (transfer fixing: x)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_normal_Float TYPE(('e, 'f) IEEE.float) x \<Longrightarrow> (case let m = mantissa x; e = Float.exponent x in (if 0 < m then 0 else 1, word_of_int (e + int (bias TYPE(('e, 'f) IEEE.float)) + bitlen \<bar>m\<bar> - 1), word_of_int (\<bar>m\<bar> * 2 ^ (Suc LENGTH('f) - nat (bitlen \<bar>m\<bar>)) - 2 ^ LENGTH('f))) of (uu_, e, uua_) \<Rightarrow> unat e) = nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + bitlen \<bar>mantissa x\<bar> - 1)
[PROOF STEP]
apply (simp flip: uint_nat nat_uint_eq add: Let_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_normal_Float TYPE(('e, 'f) IEEE.float) x \<Longrightarrow> nat (uint (word_of_int (Float.exponent x) + word_of_nat (bias TYPE(('e, 'f) IEEE.float)) + word_of_int (bitlen \<bar>mantissa x\<bar>) - 1)) = nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + bitlen \<bar>mantissa x\<bar> - 1)
[PROOF STEP]
apply (auto simp: is_normal_Float_def bitlen_le_iff_power uint_word_of_int_bitlen_eq Let_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>mantissa x \<noteq> 0; \<bar>mantissa x\<bar> < 2 ^ nat (1 + int LENGTH('f)); - int (bias TYPE(('e, 'f) IEEE.float)) - bitlen \<bar>mantissa x\<bar> + 1 < Float.exponent x; Float.exponent x < 2 ^ LENGTH('e) - bitlen \<bar>mantissa x\<bar> - int (bias TYPE(('e, 'f) IEEE.float))\<rbrakk> \<Longrightarrow> unat (word_of_int (Float.exponent x) + word_of_nat (bias TYPE(('e, 'f) IEEE.float)) + word_of_int (bitlen \<bar>mantissa x\<bar>) - 1) = nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + bitlen \<bar>mantissa x\<bar> - 1)
[PROOF STEP]
apply transfer
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>mantissa x \<noteq> 0; \<bar>mantissa x\<bar> < 2 ^ nat (1 + int LENGTH('f)); - int (bias TYPE(('e, 'f) IEEE.float)) - bitlen \<bar>mantissa x\<bar> + 1 < Float.exponent x; Float.exponent x < 2 ^ LENGTH('e) - bitlen \<bar>mantissa x\<bar> - int (bias TYPE(('e, 'f) IEEE.float))\<rbrakk> \<Longrightarrow> (nat \<circ> take_bit LENGTH('e)) (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + bitlen \<bar>mantissa x\<bar> - 1) = nat (Float.exponent x + int (bias TYPE(('e, 'f) IEEE.float)) + bitlen \<bar>mantissa x\<bar> - 1)
[PROOF STEP]
apply (simp add: nat_take_bit_eq take_bit_int_eq_self)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma take_byte_shiftlr_256:
  fixes v :: "256 word"
  assumes "m \<le> n"
  shows "take_byte n (v << m*8) = (if (n+1)*8 \<le> 256 then take_byte (n-m) v else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. take_byte n (v << m * 8) = (if (n + 1) * 8 \<le> 256 then take_byte (n - m) v else 0)
[PROOF STEP]
apply (rule bit_word_eqI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>na. na < LENGTH(8) \<Longrightarrow> take_byte n (v << m * 8) !! na = (if (n + 1) * 8 \<le> 256 then take_byte (n - m) v else 0) !! na
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
m \<le> n

goal (1 subgoal):
 1. \<And>na. na < LENGTH(8) \<Longrightarrow> take_byte n (v << m * 8) !! na = (if (n + 1) * 8 \<le> 256 then take_byte (n - m) v else 0) !! na
[PROOF STEP]
apply (simp add: bit_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>na. \<lbrakk>na < 8; m \<le> n\<rbrakk> \<Longrightarrow> n \<le> 31 \<longrightarrow> v !! (na + n * 8 - m * 8) = v !! (na + (n - m) * 8)
[PROOF STEP]
apply (simp add: algebra_simps)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma pos_half_less: fixes x::real shows "x > 0 \<Longrightarrow> x / 2 < x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < x \<Longrightarrow> x / 2 < x
[PROOF STEP]
by auto


[STATEMENT]
lemma ex_in_kvi_rel_conv:
      "(\<exists>r'. (r,r')\<in>kvi_rel hm i \<and> \<Phi> r') \<longleftrightarrow> (fst r = hm_key_of hm i \<and> \<Phi> (snd r))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>r'. (r, r') \<in> kvi_rel hm i \<and> \<Phi> r') = (fst r = hm_key_of hm i \<and> \<Phi> (snd r))
[PROOF STEP]
unfolding kvi_rel_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<exists>r'. (r, r') \<in> {((k, v), v) |k v. hm_key_of hm i = k} \<and> \<Phi> r') = (fst r = hm_key_of hm i \<and> \<Phi> (snd r))
[PROOF STEP]
apply (cases r)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b. r = (a, b) \<Longrightarrow> (\<exists>r'. (r, r') \<in> {((k, v), v) |k v. hm_key_of hm i = k} \<and> \<Phi> r') = (fst r = hm_key_of hm i \<and> \<Phi> (snd r))
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma "P (f a b) (f b c) \<and> P (f b c) (f a c) \<and>
     (\<forall>x y z. P x y \<and> P y z \<longrightarrow> P x z)    \<longrightarrow>   P (f a b) (f a c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (f a b) (f b c) \<and> P (f b c) (f a c) \<and> (\<forall>x y z. P x y \<and> P y z \<longrightarrow> P x z) \<longrightarrow> P (f a b) (f a c)
[PROOF STEP]
by blast