[STATEMENT]
lemma sum_times_bound:\<comment> \<open>TODO: this gives better bounds for the remainder of multiplication\<close>
  "(\<Sum>i<d. e i * f i::real) * (\<Sum>i<d. e i * g i) =
   (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) +
   (\<Sum>(i, j) | i < j \<and> j < d. (e i * e j) * (f j * g i + f i * g j))" for d::nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
have "(\<Sum>i<d. e i * f i)*(\<Sum>i<d. e i * g i) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d}. e i * f i * (e j * g j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d}. e i * f i * (e j * g j))
[PROOF STEP]
unfolding sum_product sum.cartesian_product
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>(i, j)\<in>{..<d} \<times> {..<d}. e i * f i * (e j * g j)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d}. e i * f i * (e j * g j))
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
(\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d}. e i * f i * (e j * g j))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d}. e i * f i * (e j * g j))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
have "\<dots> = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i = j}. e i * f i * (e j * g j)) +
    ((\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f i * (e j * g j)) +
    (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). j < i}. e i * f i * (e j * g j)))"
    (is "_ = ?a + (?b + ?c)")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>(i, j)\<in>{..<d} \<times> {..<d}. e i * f i * (e j * g j)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i = j}. e i * f i * (e j * g j)) + ((\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f i * (e j * g j)) + (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). j < i}. e i * f i * (e j * g j)))
[PROOF STEP]
by (subst sum.union_disjoint[symmetric], force, force, force)+ (auto intro!: sum.cong)
[PROOF STATE]
proof (state)
this:
(\<Sum>(i, j)\<in>{..<d} \<times> {..<d}. e i * f i * (e j * g j)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i = j}. e i * f i * (e j * g j)) + ((\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f i * (e j * g j)) + (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). j < i}. e i * f i * (e j * g j)))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>(i, j)\<in>{..<d} \<times> {..<d}. e i * f i * (e j * g j)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i = j}. e i * f i * (e j * g j)) + ((\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f i * (e j * g j)) + (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). j < i}. e i * f i * (e j * g j)))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
have "?c = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f j * (e j * g i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). j < i}. e i * f i * (e j * g j)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f j * (e j * g i))
[PROOF STEP]
by (rule sum.reindex_cong[of "\<lambda>(x, y). (y, x)"]) (auto intro!: inj_onI)
[PROOF STATE]
proof (state)
this:
(\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). j < i}. e i * f i * (e j * g j)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f j * (e j * g i))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). j < i}. e i * f i * (e j * g j)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f j * (e j * g i))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
have "?b + \<dots> = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. (e i * e j) * (f j * g i + f i * g j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f i * (e j * g j)) + (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f j * (e j * g i)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
by (auto simp: algebra_simps sum.distrib split_beta')
[PROOF STATE]
proof (state)
this:
(\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f i * (e j * g j)) + (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f j * (e j * g i)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * e j * (f j * g i + f i * g j))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f i * (e j * g j)) + (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * f j * (e j * g i)) = (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * e j * (f j * g i + f i * g j))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
have "\<dots> = (\<Sum>(i, j) | i < j \<and> j < d. (e i * e j) * (f j * g i + f i * g j))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * e j * (f j * g i + f i * g j)) = (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
by (rule sum.cong) auto
[PROOF STATE]
proof (state)
this:
(\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * e j * (f j * g i + f i * g j)) = (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i < j}. e i * e j * (f j * g i + f i * g j)) = (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
have "?a = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i = j}. e i * f i * (e j * g j)) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i))
[PROOF STEP]
by (rule sum.reindex_cong[of "\<lambda>i. (i, i)"]) (auto simp: power2_eq_square intro!: inj_onI)
[PROOF STATE]
proof (state)
this:
(\<Sum>(i, j)\<in>{..<d} \<times> {..<d} \<inter> {(i, j). i = j}. e i * f i * (e j * g j)) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum> | case  of (i, j) \<Rightarrow> i < j \<and> j < d. case  of (i, j) \<Rightarrow> e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum> | case  of (i, j) \<Rightarrow> i < j \<and> j < d. case  of (i, j) \<Rightarrow> e i * e j * (f j * g i + f i * g j))

goal (1 subgoal):
 1. (\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i<d. e i * f i) * (\<Sum>i<d. e i * g i) = (\<Sum>i<d. (e i)\<^sup>2 * (f i * g i)) + (\<Sum>(i, j)\<in>{(i, j). i < j \<and> j < d}. e i * e j * (f j * g i + f i * g j))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fps_of_ratfps_altdef:
  "fps_of_ratfps x = (case quot_of_ratfps x of (a, b) \<Rightarrow> fps_of_poly a / fps_of_poly b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fps_of_ratfps x = (case quot_of_ratfps x of (a, b) \<Rightarrow> fps_of_poly a / fps_of_poly b)
[PROOF STEP]
by transfer (simp add: case_prod_unfold)


[STATEMENT]
lemma extreme_point_not_in_REL_INTERIOR:
    fixes S :: "'a::real_normed_vector set"
    shows "\<lbrakk>x extreme_point_of S; S \<noteq> {x}\<rbrakk> \<Longrightarrow> x \<notin> rel_interior S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x extreme_point_of S; S \<noteq> {x}\<rbrakk> \<Longrightarrow> x \<notin> rel_interior S
[PROOF STEP]
by (metis disjoint_iff face_of_disjoint_rel_interior face_of_singleton insertI1)


[STATEMENT]
lemma fun_sum_list_commute_canc:
  assumes "\<And>x y. f (x + y) = f x + ((f y)::'a::cancel_comm_monoid_add)"
  shows "f (sum_list xs) = sum_list (map f xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (sum_list xs) = sum_list (map f xs)
[PROOF STEP]
by (rule fun_sum_list_commute, rule additive_implies_homogenous, fact+)


[STATEMENT]
lemma prod_mset_Const: "prod_mset (image_mset Const A) = Const (prod_mset A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Prod>\<^sub># (image_mset Const A) = Const (\<Prod>\<^sub># A)
[PROOF STEP]
by (induction A) (auto simp: mpoly_Const_mult)


[STATEMENT]
lemma single_input_alt_def_h :
  "single_input M = (\<forall> q x x' . (h M (q,x) \<noteq> {} \<and> h M (q,x') \<noteq> {}) \<longrightarrow> x = x')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. single_input M = (\<forall>q x x'. FSM.h M (q, x) \<noteq> {} \<and> FSM.h M (q, x') \<noteq> {} \<longrightarrow> x = x')
[PROOF STEP]
by force


[STATEMENT]
lemma Maclaurin_zero: "x = 0 \<Longrightarrow> n \<noteq> 0 \<Longrightarrow> (\<Sum>m<n. (diff m 0 / fact m) * x ^ m) = diff 0 0"
  for x :: real and n :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x = 0; n \<noteq> 0\<rbrakk> \<Longrightarrow> (\<Sum>m<n. diff m (0::'a) / fact m * x ^ m) = diff 0 (0::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma aux_42: "x \<prec> y \<Longrightarrow> \<not> dbm_add z x \<prec> dbm_add z y \<Longrightarrow> dbm_add z x = dbm_add z y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>x \<prec> y; \<not> z \<otimes> x \<prec> z \<otimes> y\<rbrakk> \<Longrightarrow> z \<otimes> x = z \<otimes> y
[PROOF STEP]
by (cases x y rule: dbm_lt.cases) ((cases z), auto)+


[STATEMENT]
lemma two_64: "2 ^ LENGTH(64) = (18446744073709551616 :: int)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 ^ LENGTH(64) = 18446744073709551616
[PROOF STEP]
by simp


[STATEMENT]
lemma simplicial_subdivision_of:
   "simplicial_subdivision p (frag_of f) =
         (if p = 0 then frag_of f
         else simplicial_cone (p -1)
               (\<lambda>i. (\<Sum>j\<le>p. simplicial_vertex j f i) / (Suc p))
               (simplicial_subdivision (p -1) (chain_boundary p (frag_of f))))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. simplicial_subdivision p (frag_of f) = (if p = 0 then frag_of f else simplicial_cone (p - 1) (\<lambda>i. (\<Sum>j\<le>p. simplicial_vertex j f i) / real (Suc p)) (simplicial_subdivision (p - 1) (chain_boundary p (frag_of f))))
[PROOF STEP]
by (induction p) (auto simp: add.commute)


[STATEMENT]
lemma of_int_mod_ring_eq_0:
  "((of_int_mod_ring x :: 'a mod_ring) = 0) \<longleftrightarrow>
    (x mod q = 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (of_int_mod_ring x = 0) = (x mod q = 0)
[PROOF STEP]
by (metis CARD_a mod_0 of_int_code(2)
  of_int_mod_ring.abs_eq of_int_mod_ring.rep_eq
  of_int_of_int_mod_ring)


[STATEMENT]
lemma denominator_pos: "f (2 - t) + f (t - 1) > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < f (2 - t) + f (t - 1)
[PROOF STEP]
by (auto simp: f_def add_pos_pos)


[STATEMENT]
lemma nat_explode'_digits: \<open>\<forall> d \<in> set (nat_explode' n). d < 10\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>d\<in>set (nat_explode' n). d < 10
[PROOF STEP]
using image_set[of \<open>(\<lambda> x. x mod 10)\<close> \<open>(nat_explode' n)\<close>]
        nat_explode_mod_10_ident[symmetric]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. x mod 10) ` set (nat_explode' n) = set (map (\<lambda>x. x mod 10) (nat_explode' n))
nat_explode' ?n = map (\<lambda>x. x mod 10) (nat_explode' ?n)

goal (1 subgoal):
 1. \<forall>d\<in>set (nat_explode' n). d < 10
[PROOF STEP]
by (metis (no_types, lifting) Euclidean_Division.div_eq_0_iff
                                imageE mod_div_trivial zero_neq_numeral)


[STATEMENT]
lemma before_in_mtf: assumes "z \<in> set xs"
shows "x < y in mtf z xs  \<longleftrightarrow>
      (y \<noteq> z \<and> (if x=z then y \<in> set xs else x < y in xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set xs else x < y in xs))
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set xs else x < y in xs))
[PROOF STEP]
have 0: "index xs z < size xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. index xs z < length xs
[PROOF STEP]
by (metis assms index_less_size_conv)
[PROOF STATE]
proof (state)
this:
index xs z < length xs

goal (1 subgoal):
 1. x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set xs else x < y in xs))
[PROOF STEP]
let ?xs = "take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set xs else x < y in xs))
[PROOF STEP]
have "x < y in mtf z xs = (y \<noteq> z \<and> (if x=z then y \<in> set ?xs else x < y in ?xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set (take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs) else x < y in take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
z \<in> set xs

goal (1 subgoal):
 1. x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set (take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs) else x < y in take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs))
[PROOF STEP]
by (auto simp add: mtf_def before_in_def index_append)
      (metis index_take index_take_if_set le_add1 le_trans less_imp_le_nat)
[PROOF STATE]
proof (state)
this:
x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set (take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs) else x < y in take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs))

goal (1 subgoal):
 1. x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set xs else x < y in xs))
[PROOF STEP]
with id_take_nth_drop[OF 0, symmetric]
[PROOF STATE]
proof (chain)
picking this:
take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs = xs
x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set (take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs) else x < y in take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs = xs
x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set (take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs) else x < y in take (index xs z) xs @ xs ! index xs z # drop (Suc (index xs z)) xs))

goal (1 subgoal):
 1. x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set xs else x < y in xs))
[PROOF STEP]
by(simp)
[PROOF STATE]
proof (state)
this:
x < y in mtf z xs = (y \<noteq> z \<and> (if x = z then y \<in> set xs else x < y in xs))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma integral_sum: "(\<And>i. i \<in> I \<Longrightarrow> integrable M (f i)) \<Longrightarrow>
  integral\<^sup>L M (\<lambda>x. \<Sum>i\<in>I. f i x) = (\<Sum>i\<in>I. integral\<^sup>L M (f i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. i \<in> I \<Longrightarrow> integrable M (f i)) \<Longrightarrow> LINT x|M. (\<Sum>i\<in>I. f i x) = (\<Sum>i\<in>I. integral\<^sup>L M (f i))
[PROOF STEP]
by (intro has_bochner_integral_integral_eq has_bochner_integral_sum has_bochner_integral_integrable)


[STATEMENT]
lemma unat_p2: "n < LENGTH('a :: len) \<Longrightarrow> unat (2 ^ n :: 'a word) = 2 ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n < LENGTH('a) \<Longrightarrow> unat (2 ^ n) = 2 ^ n
[PROOF STEP]
by (fact unat_power_lower)


[STATEMENT]
lemma dom_tensor [simp]:
    assumes "arr f" and "arr g"
    shows "dom (f \<otimes>\<^sub>S g) = dom f \<otimes>\<^sub>S dom g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.dom (f \<otimes>\<^sub>S g) = local.dom f \<otimes>\<^sub>S local.dom g
[PROOF STEP]
using assms arr_iff_in_hom [of f] arr_iff_in_hom [of g] tensor_in_hom
[PROOF STATE]
proof (prove)
using this:
arr f
arr g
arr f = \<guillemotleft>f : local.dom f \<rightarrow> cod f\<guillemotright>
arr g = \<guillemotleft>g : local.dom g \<rightarrow> cod g\<guillemotright>
\<lbrakk>\<guillemotleft>?f : ?a \<rightarrow> ?b\<guillemotright>; \<guillemotleft>?g : ?c \<rightarrow> ?d\<guillemotright>\<rbrakk> \<Longrightarrow> \<guillemotleft>?f \<otimes>\<^sub>S ?g : ?a \<otimes>\<^sub>S ?c \<rightarrow> ?b \<otimes>\<^sub>S ?d\<guillemotright>

goal (1 subgoal):
 1. local.dom (f \<otimes>\<^sub>S g) = local.dom f \<otimes>\<^sub>S local.dom g
[PROOF STEP]
by blast


[STATEMENT]
lemma spectral_radius_jnf_norm_bound_less_1_upper_triangular: assumes A: "(A :: complex mat) \<in> carrier_mat n n"
  and sr_1: "spectral_radius A < 1"
  shows "\<exists> c. \<forall> k. norm_bound (A ^\<^sub>m k) c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>c. \<forall>k. norm_bound (A ^\<^sub>m k) c
[PROOF STEP]
by (rule spectral_radius_jnf_norm_bound_less_1[OF A sr_1],
    insert char_poly_factorized[OF A] jordan_nf_exists[OF A], blast)


[STATEMENT]
lemma diamond_cube_gen_boundary_valid:
  assumes "(k,\<gamma>)\<in>boundary (diamond_cube_gen)"
  shows "valid_path \<gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid_path \<gamma>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(k, \<gamma>) \<in> boundary diamond_cube_gen

goal (1 subgoal):
 1. valid_path \<gamma>
[PROOF STEP]
proof (auto simp add: valid_path_def boundary_def horizontal_boundary_def vertical_boundary_def diamond_cube_gen_def)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>k = 1; \<gamma> = (\<lambda>x. (d * x_coord x, - (d * diamond_y_gen (x_coord x))))\<rbrakk> \<Longrightarrow> (\<lambda>x. (d * x_coord x, - (d * diamond_y_gen (x_coord x)))) piecewise_C1_differentiable_on {0..1}
 2. \<lbrakk>k = - 1; \<gamma> = (\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x)))\<rbrakk> \<Longrightarrow> (\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x))) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
have rw2: "(\<lambda>x. diamond_y_gen (x_coord x)) = diamond_y_gen o x_coord"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. diamond_y_gen (x_coord x)) = diamond_y_gen \<circ> x_coord
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. diamond_y_gen (x_coord x)) = diamond_y_gen \<circ> x_coord

goal (2 subgoals):
 1. \<lbrakk>k = 1; \<gamma> = (\<lambda>x. (d * x_coord x, - (d * diamond_y_gen (x_coord x))))\<rbrakk> \<Longrightarrow> (\<lambda>x. (d * x_coord x, - (d * diamond_y_gen (x_coord x)))) piecewise_C1_differentiable_on {0..1}
 2. \<lbrakk>k = - 1; \<gamma> = (\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x)))\<rbrakk> \<Longrightarrow> (\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x))) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
note [derivative_intros] = C1_differentiable_on_pair pair_prod_smooth_pw_smooth scale_piecewise_C1_differentiable_on piecewise_C1_differentiable_neg piecewise_C1_differentiable_compose diamond_y_gen_valid
[PROOF STATE]
proof (state)
this:
\<lbrakk>?f C1_differentiable_on ?S; ?g C1_differentiable_on ?S\<rbrakk> \<Longrightarrow> (\<lambda>x. (?f x, ?g x)) C1_differentiable_on ?S
\<lbrakk>?f C1_differentiable_on ?s; ?g piecewise_C1_differentiable_on ?s\<rbrakk> \<Longrightarrow> (\<lambda>x. (?f x, ?g x)) piecewise_C1_differentiable_on ?s
?f piecewise_C1_differentiable_on ?s \<Longrightarrow> (\<lambda>x. ?c * ?f x) piecewise_C1_differentiable_on ?s
?f piecewise_C1_differentiable_on ?S \<Longrightarrow> (\<lambda>x. - ?f x) piecewise_C1_differentiable_on ?S
\<lbrakk>?f piecewise_C1_differentiable_on ?S; ?g piecewise_C1_differentiable_on ?f ` ?S; \<And>x. finite (?S \<inter> ?f -` {x})\<rbrakk> \<Longrightarrow> ?g \<circ> ?f piecewise_C1_differentiable_on ?S
\<lbrakk>?a \<le> 0; 0 \<le> ?b\<rbrakk> \<Longrightarrow> diamond_y_gen piecewise_C1_differentiable_on {?a..?b}

goal (2 subgoals):
 1. \<lbrakk>k = 1; \<gamma> = (\<lambda>x. (d * x_coord x, - (d * diamond_y_gen (x_coord x))))\<rbrakk> \<Longrightarrow> (\<lambda>x. (d * x_coord x, - (d * diamond_y_gen (x_coord x)))) piecewise_C1_differentiable_on {0..1}
 2. \<lbrakk>k = - 1; \<gamma> = (\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x)))\<rbrakk> \<Longrightarrow> (\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x))) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
show "(\<lambda>x. (d * x_coord x, - (d * diamond_y_gen (x_coord x)))) piecewise_C1_differentiable_on {0..1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (d * x_coord x, - (d * diamond_y_gen (x_coord x)))) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
apply(auto intro!: derivative_intros)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. x_coord C1_differentiable_on {0..1}
 2. (\<lambda>x. diamond_y_gen (x_coord x)) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
apply (auto simp add: x_coord_smooth rw2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. diamond_y_gen \<circ> x_coord piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
by(auto intro!: derivative_intros simp add: x_coord_img x_coord_back_img C1_differentiable_imp_piecewise[OF x_coord_smooth])+
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (d * x_coord x, - (d * diamond_y_gen (x_coord x)))) piecewise_C1_differentiable_on {0..1}

goal (1 subgoal):
 1. \<lbrakk>k = - 1; \<gamma> = (\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x)))\<rbrakk> \<Longrightarrow> (\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x))) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
show "(\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x))) piecewise_C1_differentiable_on {0..1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x))) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
apply(auto intro!: derivative_intros)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. x_coord C1_differentiable_on {0..1}
 2. (\<lambda>x. diamond_y_gen (x_coord x)) piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
apply (auto simp add: x_coord_smooth rw2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. diamond_y_gen \<circ> x_coord piecewise_C1_differentiable_on {0..1}
[PROOF STEP]
by(auto intro!: derivative_intros simp add: x_coord_img x_coord_back_img C1_differentiable_imp_piecewise[OF x_coord_smooth])+
[PROOF STATE]
proof (state)
this:
(\<lambda>x. (d * x_coord x, d * diamond_y_gen (x_coord x))) piecewise_C1_differentiable_on {0..1}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma set_eq_iff_mset_eq_distinct:
  \<open>distinct x \<Longrightarrow> distinct y \<Longrightarrow> set x = set y \<longleftrightarrow> mset x = mset y\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>distinct x; distinct y\<rbrakk> \<Longrightarrow> (set x = set y) = (mset x = mset y)
[PROOF STEP]
by (auto simp: multiset_eq_iff distinct_count_atmost_1)


[STATEMENT]
theorem set_inter_compl_diff [simp]: \<open>- A \<inter> B = B - A\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - A \<inter> B = B - A
[PROOF STEP]
by blast


[STATEMENT]
lemma real_of_preal_mult:
  "real_of_preal ((x::preal) * y) = real_of_preal x * real_of_preal y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_preal (x * y) = real_of_preal x * real_of_preal y
[PROOF STEP]
by (simp add: real_of_preal_def real_mult algebra_simps)


[STATEMENT]
lemma infinite_UNIV_expr: "\<not> finite (UNIV :: expr set)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite UNIV
[PROOF STEP]
including card_datatype
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite UNIV
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. infinite UNIV
[PROOF STEP]
have "rangeIt (Lit 0) (Add (Lit 0)) \<subseteq> UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rangeIt (Lit 0) (Add (Lit 0)) \<subseteq> UNIV
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
rangeIt (Lit 0) (Add (Lit 0)) \<subseteq> UNIV

goal (1 subgoal):
 1. infinite UNIV
[PROOF STEP]
from finite_subset[OF this]
[PROOF STATE]
proof (chain)
picking this:
finite UNIV \<Longrightarrow> finite (rangeIt (Lit 0) (Add (Lit 0)))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
finite UNIV \<Longrightarrow> finite (rangeIt (Lit 0) (Add (Lit 0)))

goal (1 subgoal):
 1. infinite UNIV
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
infinite UNIV

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Ints_vec_vec_set: "v \<in> \<int>\<^sub>v = (vec_set v \<subseteq> \<int>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (v \<in> \<int>\<^sub>v) = (set\<^sub>v v \<subseteq> \<int>)
[PROOF STEP]
unfolding Ints_vec_def vec_set_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (v \<in> {x. \<forall>i<dim_vec x. x $ i \<in> \<int>}) = (($) v ` {..<dim_vec v} \<subseteq> \<int>)
[PROOF STEP]
by auto


[STATEMENT]
lemma complete_refl_on:
  "\<lbrakk> complete A r; refl_on A r; x \<in> A; y \<in> A \<rbrakk> \<Longrightarrow> x \<^bsub>r\<^esub>\<preceq> y \<or> y \<^bsub>r\<^esub>\<preceq> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>complete A r; refl_on A r; x \<in> A; y \<in> A\<rbrakk> \<Longrightarrow> x \<^bsub>r\<^esub>\<preceq> y \<or> y \<^bsub>r\<^esub>\<preceq> x
[PROOF STEP]
unfolding complete_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x\<in>A. \<forall>y\<in>A - {x}. x \<^bsub>r\<^esub>\<preceq> y \<or> y \<^bsub>r\<^esub>\<preceq> x; refl_on A r; x \<in> A; y \<in> A\<rbrakk> \<Longrightarrow> x \<^bsub>r\<^esub>\<preceq> y \<or> y \<^bsub>r\<^esub>\<preceq> x
[PROOF STEP]
by auto


[STATEMENT]
lemma l2_11_b:
  assumes "Bet A B C" and
    "Bet A' B' C'" and
    "Cong A B A' B'" and
    "Cong B C B' C'"
  shows "Cong A C A' C'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Cong A C A' C'
[PROOF STEP]
using assms(1) assms(2) assms(3) assms(4) l2_11
[PROOF STATE]
proof (prove)
using this:
Bet A B C
Bet A' B' C'
Cong A B A' B'
Cong B C B' C'
\<lbrakk>Bet ?A ?B ?C; Bet ?A' ?B' ?C'; Cong ?A ?B ?A' ?B'; Cong ?B ?C ?B' ?C'\<rbrakk> \<Longrightarrow> Cong ?A ?C ?A' ?C'

goal (1 subgoal):
 1. Cong A C A' C'
[PROOF STEP]
by auto


[STATEMENT]
lemma star_simulation_right:
  assumes "z * x \<le> y * z"
    shows "z * x\<^sup>\<star> \<le> y\<^sup>\<star> * z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z * x\<^sup>\<star> \<le> y\<^sup>\<star> * z
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. z * x\<^sup>\<star> \<le> y\<^sup>\<star> * z
[PROOF STEP]
have "y\<^sup>\<star> * z * x \<le> y\<^sup>\<star> * z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y\<^sup>\<star> * z * x \<le> y\<^sup>\<star> * z
[PROOF STEP]
by (metis assms dual_order.trans mult_isotone mult_left_sub_dist_sup_right star.circ_loop_fixpoint star.circ_transitive_equal sup.cobounded1 mult_assoc)
[PROOF STATE]
proof (state)
this:
y\<^sup>\<star> * z * x \<le> y\<^sup>\<star> * z

goal (1 subgoal):
 1. z * x\<^sup>\<star> \<le> y\<^sup>\<star> * z
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
y\<^sup>\<star> * z * x \<le> y\<^sup>\<star> * z

goal (1 subgoal):
 1. z * x\<^sup>\<star> \<le> y\<^sup>\<star> * z
[PROOF STEP]
by (metis le_supI star.circ_loop_fixpoint star_right_induct sup.cobounded2)
[PROOF STATE]
proof (state)
this:
z * x\<^sup>\<star> \<le> y\<^sup>\<star> * z

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma trans3:
 "(l::nat) \<le>  a1 + a2 + (a3 + a4) \<Longrightarrow> a2 + a3 \<le> r \<Longrightarrow> l \<le> a1 + r + a4"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>l \<le> a1 + a2 + (a3 + a4); a2 + a3 \<le> r\<rbrakk> \<Longrightarrow> l \<le> a1 + r + a4
[PROOF STEP]
by simp


[STATEMENT]
lemma gdd_index_non_zero_iff: "ps \<subseteq> \<V> \<Longrightarrow> card ps = 2 \<Longrightarrow>
    \<B> index ps = \<Lambda> \<longleftrightarrow> size {#b \<in>#  mset_set \<G> . ps \<subseteq> b#} = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>ps \<subseteq> \<V>; card ps = 2\<rbrakk> \<Longrightarrow> (int (\<B> index ps) = \<Lambda>) = (size (filter_mset ((\<subseteq>) ps) (mset_set \<G>)) = 0)
[PROOF STEP]
using index_non_zero_implies_no_group index_distinct_group_num_alt_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?ps \<subseteq> \<V>; card ?ps = 2; int (\<B> index ?ps) = \<Lambda>\<rbrakk> \<Longrightarrow> size (filter_mset ((\<subseteq>) ?ps) (mset_set \<G>)) = 0
\<lbrakk>?ps \<subseteq> \<V>; card ?ps = 2; size (filter_mset ((\<subseteq>) ?ps) (mset_set \<G>)) = 0\<rbrakk> \<Longrightarrow> int (\<B> index ?ps) = \<Lambda>

goal (1 subgoal):
 1. \<lbrakk>ps \<subseteq> \<V>; card ps = 2\<rbrakk> \<Longrightarrow> (int (\<B> index ps) = \<Lambda>) = (size (filter_mset ((\<subseteq>) ps) (mset_set \<G>)) = 0)
[PROOF STEP]
by auto


[STATEMENT]
lemma rightrec_43: "n > 0 \<Longrightarrow> rightrec u v lc rc ((4 * real m + 3) / 2 ^ (Suc n)) = rightrec u v lc rc ((2 * real m + 1) / 2^n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> rightrec u v lc rc ((4 * real m + 3) / 2 ^ Suc n) = rightrec u v lc rc ((2 * real m + 1) / 2 ^ n)
[PROOF STEP]
unfolding dyad_rec2_def dyad_rec_43_times2
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> snd (case dyad_rec (\<lambda>z. (u, v)) (\<lambda>(a, b). (a, lc a b (midpoint a b))) (\<lambda>(a, b). (rc a b (midpoint a b), b)) (2 * (2 * real m + 1) / 2 ^ n) of (a, b) \<Rightarrow> (rc a b (midpoint a b), b)) = snd (dyad_rec (\<lambda>z. (u, v)) (\<lambda>(a, b). (a, lc a b (midpoint a b))) (\<lambda>(a, b). (rc a b (midpoint a b), b)) (2 * ((2 * real m + 1) / 2 ^ n)))
[PROOF STEP]
by (simp add: case_prod_beta)


[STATEMENT]
lemma powr_non_neg[simp]: "\<not>a powr x < 0" for a x::real
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> a powr x < 0
[PROOF STEP]
using powr_ge_pzero[of a x]
[PROOF STATE]
proof (prove)
using this:
0 \<le> a powr x

goal (1 subgoal):
 1. \<not> a powr x < 0
[PROOF STEP]
by arith


[STATEMENT]
lemma nonneg_mat_mono: "0 \<le> Q \<Longrightarrow> u \<le> v \<Longrightarrow> Q *v u \<le> Q *v (v :: real^'c)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 \<le> Q; u \<le> v\<rbrakk> \<Longrightarrow> Q *v u \<le> Q *v v
[PROOF STEP]
using nonneg_mat_ge_zero[of Q "v - u"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> Q; 0 \<le> v - u\<rbrakk> \<Longrightarrow> 0 \<le> Q *v (v - u)

goal (1 subgoal):
 1. \<lbrakk>0 \<le> Q; u \<le> v\<rbrakk> \<Longrightarrow> Q *v u \<le> Q *v v
[PROOF STEP]
by (simp add: vec.diff)


[STATEMENT]
lemma one_le_power [simp]: "1 \<le> a \<Longrightarrow> 1 \<le> a ^ n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<le> a \<Longrightarrow> (1::'a) \<le> a ^ n
[PROOF STEP]
using power_mono [of 1 a n]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>(1::'a) \<le> a; (0::'a) \<le> (1::'a)\<rbrakk> \<Longrightarrow> (1::'a) ^ n \<le> a ^ n

goal (1 subgoal):
 1. (1::'a) \<le> a \<Longrightarrow> (1::'a) \<le> a ^ n
[PROOF STEP]
by simp


[STATEMENT]
lemma rref_condition1:
  assumes r: "reduced_row_echelon_form A"
  shows "(\<forall>i. is_zero_row i A \<longrightarrow> \<not> (\<exists>j. j>i \<and> \<not> is_zero_row j A))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>i. is_zero_row i A \<longrightarrow> \<not> (\<exists>j>i. \<not> is_zero_row j A)
[PROOF STEP]
using r
[PROOF STATE]
proof (prove)
using this:
reduced_row_echelon_form A

goal (1 subgoal):
 1. \<forall>i. is_zero_row i A \<longrightarrow> \<not> (\<exists>j>i. \<not> is_zero_row j A)
[PROOF STEP]
unfolding reduced_row_echelon_form_def'
[PROOF STATE]
proof (prove)
using this:
(\<forall>i. is_zero_row i A \<longrightarrow> \<not> (\<exists>j>i. \<not> is_zero_row j A)) \<and> (\<forall>i. \<not> is_zero_row i A \<longrightarrow> A $ i $ (LEAST k. A $ i $ k \<noteq> (0::'a)) = (1::'a)) \<and> (\<forall>i. i < i + (1::'c) \<and> \<not> is_zero_row i A \<and> \<not> is_zero_row (i + (1::'c)) A \<longrightarrow> (LEAST k. A $ i $ k \<noteq> (0::'a)) < (LEAST k. A $ (i + (1::'c)) $ k \<noteq> (0::'a))) \<and> (\<forall>i. \<not> is_zero_row i A \<longrightarrow> (\<forall>j. i \<noteq> j \<longrightarrow> A $ j $ (LEAST k. A $ i $ k \<noteq> (0::'a)) = (0::'a)))

goal (1 subgoal):
 1. \<forall>i. is_zero_row i A \<longrightarrow> \<not> (\<exists>j>i. \<not> is_zero_row j A)
[PROOF STEP]
by simp


[STATEMENT]
theorem Lambert_W'_asymp_equiv_at_left_0:
  "(\<lambda>x. Lambert_W' x - ln (-x)) \<sim>[at_left 0] (\<lambda>x. -ln (-ln (-x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. Lambert_W' x - ln (- x)) \<sim>[at_left 0] (\<lambda>x. - ln (- ln (- x)))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. Lambert_W' x - ln (- x)) \<sim>[at_left 0] (\<lambda>x. - ln (- ln (- x)))
[PROOF STEP]
have "(\<lambda>x. Lambert_W' x - ln (-x)) \<sim>[at_left 0] (\<lambda>x. (-1) * ln (-ln (-x)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. Lambert_W' x - ln (- x)) \<sim>[at_left 0] (\<lambda>x. - 1 * ln (- ln (- x)))
[PROOF STEP]
proof (rule asymp_equiv_sandwich')
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>c'. c' \<in> {?l<..<- 1} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)
 2. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 3. ?l < - 1
 4. - 1 < ?u
 5. - 1 \<noteq> 0
[PROOF STEP]
fix c' :: real
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>c'. c' \<in> {?l<..<- 1} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)
 2. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 3. ?l < - 1
 4. - 1 < ?u
 5. - 1 \<noteq> 0
[PROOF STEP]
assume c': "c' \<in> {-2<..<-1}"
[PROOF STATE]
proof (state)
this:
c' \<in> {- 2<..<- 1}

goal (5 subgoals):
 1. \<And>c'. c' \<in> {?l<..<- 1} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)
 2. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 3. ?l < - 1
 4. - 1 < ?u
 5. - 1 \<noteq> 0
[PROOF STEP]
have "eventually (\<lambda>x. x \<le> (ln (-x) + c' * ln (-ln (-x))) * exp (ln (-x) + c' * ln (-ln (-x)))) (at_left 0)"
         "eventually (\<lambda>x::real. ln (-x) + c' * ln (-ln (-x)) \<le> -1) (at_left 0)"
         "eventually (\<lambda>x::real. -exp (-1) \<le> x) (at_left 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_left 0. x \<le> (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) &&& \<forall>\<^sub>F x in at_left 0. ln (- x) + c' * ln (- ln (- x)) \<le> - 1 &&& eventually ((\<le>) (- exp (- 1))) (at_left 0)
[PROOF STEP]
using c'
[PROOF STATE]
proof (prove)
using this:
c' \<in> {- 2<..<- 1}

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_left 0. x \<le> (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) &&& \<forall>\<^sub>F x in at_left 0. ln (- x) + c' * ln (- ln (- x)) \<le> - 1 &&& eventually ((\<le>) (- exp (- 1))) (at_left 0)
[PROOF STEP]
by real_asymp+
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_left 0. x \<le> (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x)))
\<forall>\<^sub>F x in at_left 0. ln (- x) + c' * ln (- ln (- x)) \<le> - 1
eventually ((\<le>) (- exp (- 1))) (at_left 0)

goal (5 subgoals):
 1. \<And>c'. c' \<in> {?l<..<- 1} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)
 2. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 3. ?l < - 1
 4. - 1 < ?u
 5. - 1 \<noteq> 0
[PROOF STEP]
thus "eventually (\<lambda>x. Lambert_W' x - ln (-x) \<ge> c' * ln (-ln (-x))) (at_left 0)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_left 0. x \<le> (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x)))
\<forall>\<^sub>F x in at_left 0. ln (- x) + c' * ln (- ln (- x)) \<le> - 1
eventually ((\<le>) (- exp (- 1))) (at_left 0)

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_left 0. c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<le> (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))); ln (- x) + c' * ln (- ln (- x)) \<le> - 1; - exp (- 1) \<le> x\<rbrakk> \<Longrightarrow> c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)
[PROOF STEP]
case (elim x)
[PROOF STATE]
proof (state)
this:
x \<le> (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x)))
ln (- x) + c' * ln (- ln (- x)) \<le> - 1
- exp (- 1) \<le> x

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<le> (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))); ln (- x) + c' * ln (- ln (- x)) \<le> - 1; - exp (- 1) \<le> x\<rbrakk> \<Longrightarrow> c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)
[PROOF STEP]
hence "Lambert_W' x \<ge> ln (-x) + c' * ln (-ln (-x))"
[PROOF STATE]
proof (prove)
using this:
x \<le> (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x)))
ln (- x) + c' * ln (- ln (- x)) \<le> - 1
- exp (- 1) \<le> x

goal (1 subgoal):
 1. ln (- x) + c' * ln (- ln (- x)) \<le> Lambert_W' x
[PROOF STEP]
by (intro Lambert_W'_geI)
[PROOF STATE]
proof (state)
this:
ln (- x) + c' * ln (- ln (- x)) \<le> Lambert_W' x

goal (1 subgoal):
 1. \<And>x. \<lbrakk>x \<le> (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))); ln (- x) + c' * ln (- ln (- x)) \<le> - 1; - exp (- 1) \<le> x\<rbrakk> \<Longrightarrow> c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
ln (- x) + c' * ln (- ln (- x)) \<le> Lambert_W' x

goal (1 subgoal):
 1. c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_left 0. c' * ln (- ln (- x)) \<le> Lambert_W' x - ln (- x)

goal (4 subgoals):
 1. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 2. - 2 < - 1
 3. - 1 < ?u
 4. - 1 \<noteq> 0
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 2. - 2 < - 1
 3. - 1 < ?u
 4. - 1 \<noteq> 0
[PROOF STEP]
fix c' :: real
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 2. - 2 < - 1
 3. - 1 < ?u
 4. - 1 \<noteq> 0
[PROOF STEP]
assume c': "c' \<in> {-1<..<0}"
[PROOF STATE]
proof (state)
this:
c' \<in> {- 1<..<0}

goal (4 subgoals):
 1. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 2. - 2 < - 1
 3. - 1 < ?u
 4. - 1 \<noteq> 0
[PROOF STEP]
have "eventually (\<lambda>x. x \<ge> (ln (-x) + c' * ln (-ln (-x))) * exp (ln (-x) + c' * ln (-ln (-x)))) (at_left 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_left 0. (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x
[PROOF STEP]
using c'
[PROOF STATE]
proof (prove)
using this:
c' \<in> {- 1<..<0}

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_left 0. (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x
[PROOF STEP]
by real_asymp
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_left 0. (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x

goal (4 subgoals):
 1. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 2. - 2 < - 1
 3. - 1 < ?u
 4. - 1 \<noteq> 0
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_left 0. (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x

goal (4 subgoals):
 1. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 2. - 2 < - 1
 3. - 1 < ?u
 4. - 1 \<noteq> 0
[PROOF STEP]
have "eventually (\<lambda>x::real. x < 0) (at_left 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_left 0. x < 0
[PROOF STEP]
by (auto simp: eventually_at intro: exI[of _ 1])
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_left 0. x < 0

goal (4 subgoals):
 1. \<And>c'. c' \<in> {- 1<..<?u} \<Longrightarrow> \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
 2. - 2 < - 1
 3. - 1 < ?u
 4. - 1 \<noteq> 0
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in at_left 0. (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x
\<forall>\<^sub>F x in at_left 0. x < 0
[PROOF STEP]
show "eventually (\<lambda>x. Lambert_W' x - ln (-x) \<le> c' * ln (-ln (-x))) (at_left 0)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in at_left 0. (ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x
\<forall>\<^sub>F x in at_left 0. x < 0

goal (1 subgoal):
 1. \<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
[PROOF STEP]
proof eventually_elim
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>(ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x; x < 0\<rbrakk> \<Longrightarrow> Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
[PROOF STEP]
case (elim x)
[PROOF STATE]
proof (state)
this:
(ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x
x < 0

goal (1 subgoal):
 1. \<And>x. \<lbrakk>(ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x; x < 0\<rbrakk> \<Longrightarrow> Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
[PROOF STEP]
hence "Lambert_W' x \<le> ln (-x) + c' * ln (-ln (-x))"
[PROOF STATE]
proof (prove)
using this:
(ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x
x < 0

goal (1 subgoal):
 1. Lambert_W' x \<le> ln (- x) + c' * ln (- ln (- x))
[PROOF STEP]
by (intro Lambert_W'_leI)
[PROOF STATE]
proof (state)
this:
Lambert_W' x \<le> ln (- x) + c' * ln (- ln (- x))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>(ln (- x) + c' * ln (- ln (- x))) * exp (ln (- x) + c' * ln (- ln (- x))) \<le> x; x < 0\<rbrakk> \<Longrightarrow> Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
Lambert_W' x \<le> ln (- x) + c' * ln (- ln (- x))

goal (1 subgoal):
 1. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in at_left 0. Lambert_W' x - ln (- x) \<le> c' * ln (- ln (- x))

goal (3 subgoals):
 1. - 2 < - 1
 2. - 1 < 0
 3. - 1 \<noteq> 0
[PROOF STEP]
qed auto
[PROOF STATE]
proof (state)
this:
(\<lambda>x. Lambert_W' x - ln (- x)) \<sim>[at_left 0] (\<lambda>x. - 1 * ln (- ln (- x)))

goal (1 subgoal):
 1. (\<lambda>x. Lambert_W' x - ln (- x)) \<sim>[at_left 0] (\<lambda>x. - ln (- ln (- x)))
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. Lambert_W' x - ln (- x)) \<sim>[at_left 0] (\<lambda>x. - 1 * ln (- ln (- x)))

goal (1 subgoal):
 1. (\<lambda>x. Lambert_W' x - ln (- x)) \<sim>[at_left 0] (\<lambda>x. - ln (- ln (- x)))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<lambda>x. Lambert_W' x - ln (- x)) \<sim>[at_left 0] (\<lambda>x. - ln (- ln (- x)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma summable_If_finite_set[simp, intro]: "finite A \<Longrightarrow> summable (\<lambda>r. if r \<in> A then f r else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> summable (\<lambda>r. if r \<in> A then f r else (0::'a))
[PROOF STEP]
by (rule sums_summable) (rule sums_If_finite_set)


[STATEMENT]
lemma dghm_cn_comp_ArrMap_vdomain[dg_cs_simps]:
  assumes "\<GG> : \<BB> \<^sub>D\<^sub>G\<mapsto>\<mapsto>\<^bsub>\<alpha>\<^esub> \<CC>" and "\<FF> : \<AA> \<^sub>D\<^sub>G\<mapsto>\<mapsto>\<^bsub>\<alpha>\<^esub> \<BB>"
  shows "\<D>\<^sub>\<circ> ((\<GG> \<^sub>D\<^sub>G\<^sub>H\<^sub>M\<circ> \<FF>)\<lparr>ArrMap\<rparr>) = \<AA>\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> ((\<GG> \<^sub>D\<^sub>G\<^sub>H\<^sub>M\<circ> \<FF>)\<lparr>ArrMap\<rparr>) = \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
\<GG> : op_dg \<BB> \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> \<CC>
\<FF> : op_dg \<AA> \<mapsto>\<mapsto>\<^sub>D\<^sub>G\<^bsub>\<alpha>\<^esub> \<BB>

goal (1 subgoal):
 1. \<D>\<^sub>\<circ> ((\<GG> \<^sub>D\<^sub>G\<^sub>H\<^sub>M\<circ> \<FF>)\<lparr>ArrMap\<rparr>) = \<AA>\<lparr>Arr\<rparr>
[PROOF STEP]
by
    (
      cs_concl
        cs_simp: dghm_cn_comp_components dg_cs_simps dg_op_simps V_cs_simps
        cs_intro: is_dghm.dghm_ArrMap_vrange
    )


[STATEMENT]
lemma bigo_powr_nonneg:
  fixes f :: "'a \<Rightarrow> real"
  assumes "f \<in> O[F](g)" "p \<ge> 0" "eventually (\<lambda>x. f x \<ge> 0) F" "eventually (\<lambda>x. g x \<ge> 0) F"
  shows   "(\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)
[PROOF STEP]
from assms(3)
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in F. 0 \<le> f x
[PROOF STEP]
have "(\<lambda>x. f x powr p) \<in> \<Theta>[F](\<lambda>x. \<bar>f x\<bar> powr p)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in F. 0 \<le> f x

goal (1 subgoal):
 1. (\<lambda>x. f x powr p) \<in> \<Theta>[F](\<lambda>x. \<bar>f x\<bar> powr p)
[PROOF STEP]
by (intro bigthetaI_cong) (auto elim!: eventually_mono)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x powr p) \<in> \<Theta>[F](\<lambda>x. \<bar>f x\<bar> powr p)

goal (1 subgoal):
 1. (\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x powr p) \<in> \<Theta>[F](\<lambda>x. \<bar>f x\<bar> powr p)

goal (1 subgoal):
 1. (\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)
[PROOF STEP]
have "(\<lambda>x. \<bar>f x\<bar> powr p) \<in> O[F](\<lambda>x. \<bar>g x\<bar> powr p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. \<bar>f x\<bar> powr p) \<in> O[F](\<lambda>x. \<bar>g x\<bar> powr p)
[PROOF STEP]
by (intro bigo_powr) fact+
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<bar>f x\<bar> powr p) \<in> O[F](\<lambda>x. \<bar>g x\<bar> powr p)

goal (1 subgoal):
 1. (\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<bar>f x\<bar> powr p) \<in> O[F](\<lambda>x. \<bar>g x\<bar> powr p)

goal (1 subgoal):
 1. (\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)
[PROOF STEP]
from assms(4)
[PROOF STATE]
proof (chain)
picking this:
\<forall>\<^sub>F x in F. 0 \<le> g x
[PROOF STEP]
have "(\<lambda>x. \<bar>g x\<bar> powr p) \<in> \<Theta>[F](\<lambda>x. g x powr p)"
[PROOF STATE]
proof (prove)
using this:
\<forall>\<^sub>F x in F. 0 \<le> g x

goal (1 subgoal):
 1. (\<lambda>x. \<bar>g x\<bar> powr p) \<in> \<Theta>[F](\<lambda>x. g x powr p)
[PROOF STEP]
by (intro bigthetaI_cong) (auto elim!: eventually_mono)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. \<bar>g x\<bar> powr p) \<in> \<Theta>[F](\<lambda>x. g x powr p)

goal (1 subgoal):
 1. (\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)

goal (1 subgoal):
 1. (\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x powr p) \<in> O[F](\<lambda>x. g x powr p)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma right_mult_one_mat'[simp]: "dim_col (A :: 'a :: semiring_1 mat) = n \<Longrightarrow> A * 1\<^sub>m n = A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dim_col A = n \<Longrightarrow> A * 1\<^sub>m n = A
[PROOF STEP]
by (rule right_mult_one_mat, unfold carrier_mat_def, simp)


[STATEMENT]
lemma singleton_append_dotP:
  assumes "dim_vec z = dim_vec y + 1"
  shows "(y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i\<in>{0..<dim_vec y}. y $ i * z $ i) + x * z $ dim_vec y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
have "(y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i\<in>{0..<dim_vec z}. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec z. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i)
[PROOF STEP]
unfolding scalar_prod_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec z. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) = (\<Sum>i = 0..<dim_vec z. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec z. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i)

goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec z. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i)

goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
have "... = (\<Sum>i\<in>{0..<dim_vec z-1}. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) +
                   (y @\<^sub>v [x]\<^sub>v)$(dim_vec z-1) * z$(dim_vec z-1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec z. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) = (\<Sum>i = 0..<dim_vec z - 1. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ (dim_vec z - 1) * z $ (dim_vec z - 1)
[PROOF STEP]
by (simp add: assms)
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec z. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) = (\<Sum>i = 0..<dim_vec z - 1. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ (dim_vec z - 1) * z $ (dim_vec z - 1)

goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec z. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) = (\<Sum>i = 0..<dim_vec z - 1. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ (dim_vec z - 1) * z $ (dim_vec z - 1)

goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
have "... = (\<Sum>i\<in>{0..<dim_vec y}. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) +
                   (y @\<^sub>v [x]\<^sub>v)$(dim_vec y)* z$(dim_vec y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec z - 1. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ (dim_vec z - 1) * z $ (dim_vec z - 1) = (\<Sum>i = 0..<dim_vec y. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ dim_vec y * z $ dim_vec y
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
dim_vec z = dim_vec y + 1

goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec z - 1. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ (dim_vec z - 1) * z $ (dim_vec z - 1) = (\<Sum>i = 0..<dim_vec y. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ dim_vec y * z $ dim_vec y
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec z - 1. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ (dim_vec z - 1) * z $ (dim_vec z - 1) = (\<Sum>i = 0..<dim_vec y. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ dim_vec y * z $ dim_vec y

goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec z - 1. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ (dim_vec z - 1) * z $ (dim_vec z - 1) = (\<Sum>i = 0..<dim_vec y. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ dim_vec y * z $ dim_vec y

goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
have "... = (\<Sum>i\<in>{0..<dim_vec y}. y $ i * z $ i) +
                   x * z$(dim_vec y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i = 0..<dim_vec y. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ dim_vec y * z $ dim_vec y = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Sum>i = 0..<dim_vec y. (y @\<^sub>v [x]\<^sub>v) $ i * z $ i) + (y @\<^sub>v [x]\<^sub>v) $ dim_vec y * z $ dim_vec y = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y

goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y

goal (1 subgoal):
 1. (y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(y @\<^sub>v [x]\<^sub>v) \<bullet> z = (\<Sum>i = 0..<dim_vec y. y $ i * z $ i) + x * z $ dim_vec y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in group) subgroup_generated2 [simp]: "subgroup_generated (subgroup_generated G S) S = subgroup_generated G S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgroup_generated (subgroup_generated G S) S = subgroup_generated G S
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. subgroup_generated (subgroup_generated G S) S = subgroup_generated G S
[PROOF STEP]
have *: "\<And>A. carrier G \<inter> A \<subseteq> carrier (subgroup_generated (subgroup_generated G A) A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>A. carrier G \<inter> A \<subseteq> carrier (subgroup_generated (subgroup_generated G A) A)
[PROOF STEP]
by (metis (no_types, opaque_lifting) Int_assoc carrier_subgroup_generated generate.incl inf.order_iff subset_iff)
[PROOF STATE]
proof (state)
this:
carrier G \<inter> ?A \<subseteq> carrier (subgroup_generated (subgroup_generated G ?A) ?A)

goal (1 subgoal):
 1. subgroup_generated (subgroup_generated G S) S = subgroup_generated G S
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgroup_generated (subgroup_generated G S) S = subgroup_generated G S
[PROOF STEP]
apply (auto intro!: monoid.equality)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x. x \<in> carrier (subgroup_generated (subgroup_generated G S) S) \<Longrightarrow> x \<in> carrier (subgroup_generated G S)
 2. \<And>x. x \<in> carrier (subgroup_generated G S) \<Longrightarrow> x \<in> carrier (subgroup_generated (subgroup_generated G S) S)
 3. monoid.more (subgroup_generated (subgroup_generated G S) S) = monoid.more (subgroup_generated G S)
[PROOF STEP]
using group.carrier_subgroup_generated_subset group_subgroup_generated
[PROOF STATE]
proof (prove)
using this:
Group.group ?G \<Longrightarrow> carrier (subgroup_generated ?G ?A) \<subseteq> carrier ?G
Group.group (subgroup_generated G ?S)

goal (3 subgoals):
 1. \<And>x. x \<in> carrier (subgroup_generated (subgroup_generated G S) S) \<Longrightarrow> x \<in> carrier (subgroup_generated G S)
 2. \<And>x. x \<in> carrier (subgroup_generated G S) \<Longrightarrow> x \<in> carrier (subgroup_generated (subgroup_generated G S) S)
 3. monoid.more (subgroup_generated (subgroup_generated G S) S) = monoid.more (subgroup_generated G S)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>x. x \<in> carrier (subgroup_generated G S) \<Longrightarrow> x \<in> carrier (subgroup_generated (subgroup_generated G S) S)
 2. monoid.more (subgroup_generated (subgroup_generated G S) S) = monoid.more (subgroup_generated G S)
[PROOF STEP]
apply (metis (no_types, opaque_lifting) "*" group.subgroup_subgroup_generated group_subgroup_generated subgroup_generated_minimal
        subgroup_generated_restrict subgroup_subgroup_generated_iff subset_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. monoid.more (subgroup_generated (subgroup_generated G S) S) = monoid.more (subgroup_generated G S)
[PROOF STEP]
apply (simp add: subgroup_generated_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
subgroup_generated (subgroup_generated G S) S = subgroup_generated G S

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma r_triangle_eq_triangle [simp]: "eval r_triangle [n] \<down>= triangle n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval r_triangle [n] \<down>= triangle n
[PROOF STEP]
using r_triangle gauss_sum_nat triangle_def
[PROOF STATE]
proof (prove)
using this:
eval r_triangle [?n] \<down>= \<Sum> {0..?n}
\<Sum> {0..?n} = ?n * Suc ?n div 2
triangle ?n = ?n * Suc ?n div 2

goal (1 subgoal):
 1. eval r_triangle [n] \<down>= triangle n
[PROOF STEP]
by simp


[STATEMENT]
lemma nat_to_bv_non_empty: assumes a: "0<n" shows "nat_to_bv n ~= []"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nat_to_bv n \<noteq> []
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. nat_to_bv n \<noteq> []
[PROOF STEP]
from nat_to_bv_non0[of n]
[PROOF STATE]
proof (chain)
picking this:
n \<noteq> 0 \<Longrightarrow> nat_to_bv n = nat_to_bv (n div 2) @ [if n mod 2 = 0 then \<zero> else \<one>]
[PROOF STEP]
have "\<exists>x. nat_to_bv n = x@[if n mod 2 = 0 then \<zero> else \<one>]"
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0 \<Longrightarrow> nat_to_bv n = nat_to_bv (n div 2) @ [if n mod 2 = 0 then \<zero> else \<one>]

goal (1 subgoal):
 1. \<exists>x. nat_to_bv n = x @ [if n mod 2 = 0 then \<zero> else \<one>]
[PROOF STEP]
using a
[PROOF STATE]
proof (prove)
using this:
n \<noteq> 0 \<Longrightarrow> nat_to_bv n = nat_to_bv (n div 2) @ [if n mod 2 = 0 then \<zero> else \<one>]
0 < n

goal (1 subgoal):
 1. \<exists>x. nat_to_bv n = x @ [if n mod 2 = 0 then \<zero> else \<one>]
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<exists>x. nat_to_bv n = x @ [if n mod 2 = 0 then \<zero> else \<one>]

goal (1 subgoal):
 1. nat_to_bv n \<noteq> []
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>x. nat_to_bv n = x @ [if n mod 2 = 0 then \<zero> else \<one>]
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>x. nat_to_bv n = x @ [if n mod 2 = 0 then \<zero> else \<one>]

goal (1 subgoal):
 1. nat_to_bv n \<noteq> []
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
nat_to_bv n \<noteq> []

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma measure_spmf_spmf_of_pmf [simp]: "measure_spmf (spmf_of_pmf p) = measure_pmf p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. measure_spmf (spmf_of_pmf p) = measure_pmf p
[PROOF STEP]
by(rule measure_eqI) simp_all


[STATEMENT]
lemma continuous_frac:
  fixes x::real
  assumes "x \<notin> \<int>"
  shows "continuous (at x) frac"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont frac x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. isCont frac x
[PROOF STEP]
have "isCont (\<lambda>x. real_of_int \<lfloor>x\<rfloor>) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. isCont (\<lambda>x. real_of_int \<lfloor>x\<rfloor>) x
[PROOF STEP]
using continuous_floor [OF assms]
[PROOF STATE]
proof (prove)
using this:
isCont (real_of_int \<circ> floor) x

goal (1 subgoal):
 1. isCont (\<lambda>x. real_of_int \<lfloor>x\<rfloor>) x
[PROOF STEP]
by (simp add: o_def)
[PROOF STATE]
proof (state)
this:
isCont (\<lambda>x. real_of_int \<lfloor>x\<rfloor>) x

goal (1 subgoal):
 1. isCont frac x
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
isCont (\<lambda>x. real_of_int \<lfloor>x\<rfloor>) x
[PROOF STEP]
have *: "continuous (at x) (\<lambda>x. x - real_of_int \<lfloor>x\<rfloor>)"
[PROOF STATE]
proof (prove)
using this:
isCont (\<lambda>x. real_of_int \<lfloor>x\<rfloor>) x

goal (1 subgoal):
 1. isCont (\<lambda>x. x - real_of_int \<lfloor>x\<rfloor>) x
[PROOF STEP]
by (intro continuous_intros)
[PROOF STATE]
proof (state)
this:
isCont (\<lambda>x. x - real_of_int \<lfloor>x\<rfloor>) x

goal (1 subgoal):
 1. isCont frac x
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
isCont (\<lambda>x. x - real_of_int \<lfloor>x\<rfloor>) x

goal (1 subgoal):
 1. isCont frac x
[PROOF STEP]
have "\<forall>\<^sub>F x in nhds x. frac x = x - real_of_int \<lfloor>x\<rfloor>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in nhds x. frac x = x - real_of_int \<lfloor>x\<rfloor>
[PROOF STEP]
by (simp add: frac_def)
[PROOF STATE]
proof (state)
this:
\<forall>\<^sub>F x in nhds x. frac x = x - real_of_int \<lfloor>x\<rfloor>

goal (1 subgoal):
 1. isCont frac x
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
isCont (\<lambda>x. x - real_of_int \<lfloor>x\<rfloor>) x
\<forall>\<^sub>F x in nhds x. frac x = x - real_of_int \<lfloor>x\<rfloor>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
isCont (\<lambda>x. x - real_of_int \<lfloor>x\<rfloor>) x
\<forall>\<^sub>F x in nhds x. frac x = x - real_of_int \<lfloor>x\<rfloor>

goal (1 subgoal):
 1. isCont frac x
[PROOF STEP]
by (simp add: LIM_imp_LIM frac_def isCont_def)
[PROOF STATE]
proof (state)
this:
isCont frac x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma ceiling_add_numeral [simp]: "\<lceil>x + numeral v\<rceil> = \<lceil>x\<rceil> + numeral v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lceil>x + numeral v\<rceil> = \<lceil>x\<rceil> + numeral v
[PROOF STEP]
using ceiling_add_of_int [of x "numeral v"]
[PROOF STATE]
proof (prove)
using this:
\<lceil>x + of_int (numeral v)\<rceil> = \<lceil>x\<rceil> + numeral v

goal (1 subgoal):
 1. \<lceil>x + numeral v\<rceil> = \<lceil>x\<rceil> + numeral v
[PROOF STEP]
by simp


[STATEMENT]
lemma integral_cong_AE:
  "f \<in> borel_measurable M \<Longrightarrow> g \<in> borel_measurable M \<Longrightarrow> AE x in M. f x = g x \<Longrightarrow>
    integral\<^sup>L M f = integral\<^sup>L M g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> borel_measurable M; g \<in> borel_measurable M; AE x in M. f x = g x\<rbrakk> \<Longrightarrow> integral\<^sup>L M f = integral\<^sup>L M g
[PROOF STEP]
unfolding lebesgue_integral_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>f \<in> borel_measurable M; g \<in> borel_measurable M; AE x in M. f x = g x\<rbrakk> \<Longrightarrow> (if Ex (has_bochner_integral M f) then The (has_bochner_integral M f) else (0::'b)) = (if Ex (has_bochner_integral M g) then The (has_bochner_integral M g) else (0::'b))
[PROOF STEP]
by (rule arg_cong[where x="has_bochner_integral M f"]) (intro has_bochner_integral_cong_AE ext)


[STATEMENT]
lemma converse_nreachable_cases[cases pred: nreachable]:
  assumes "u \<rightarrow>\<^bsup>n\<^esup> v"
  obtains (ntrancl_on_0) "u = v" "n = 0" "u \<in> verts G"
    | (ntrancl_on_Suc) w m where "u \<rightarrow> w" "n = Suc m" "w \<rightarrow>\<^bsup>m\<^esup> v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<lbrakk>u = v; n = 0; u \<in> verts G\<rbrakk> \<Longrightarrow> thesis; \<And>w m. \<lbrakk>u \<rightarrow> w; n = Suc m; w \<rightarrow>\<^bsup>m\<^esup> v\<rbrakk> \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
u \<rightarrow>\<^bsup>n\<^esup> v

goal (1 subgoal):
 1. \<lbrakk>\<lbrakk>u = v; n = 0; u \<in> verts G\<rbrakk> \<Longrightarrow> thesis; \<And>w m. \<lbrakk>u \<rightarrow> w; n = Suc m; w \<rightarrow>\<^bsup>m\<^esup> v\<rbrakk> \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
unfolding nreachable_def
[PROOF STATE]
proof (prove)
using this:
ntrancl_onp (verts G) (arcs_ends G) n u v

goal (1 subgoal):
 1. \<lbrakk>\<lbrakk>u = v; n = 0; u \<in> verts G\<rbrakk> \<Longrightarrow> thesis; \<And>w m. \<lbrakk>u \<rightarrow> w; n = Suc m; ntrancl_onp (verts G) (arcs_ends G) m w v\<rbrakk> \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by cases auto


[STATEMENT]
lemma c_f_list_is_pr: "f \<in> PrimRec2 \<Longrightarrow> c_f_list f \<in> PrimRec2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f \<in> PrimRec2 \<Longrightarrow> c_f_list f \<in> PrimRec2
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f \<in> PrimRec2 \<Longrightarrow> c_f_list f \<in> PrimRec2
[PROOF STEP]
assume A1: "f \<in> PrimRec2"
[PROOF STATE]
proof (state)
this:
f \<in> PrimRec2

goal (1 subgoal):
 1. f \<in> PrimRec2 \<Longrightarrow> c_f_list f \<in> PrimRec2
[PROOF STEP]
let ?g = "(%x. c_cons (f 0 x) 0)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f \<in> PrimRec2 \<Longrightarrow> c_f_list f \<in> PrimRec2
[PROOF STEP]
from A1 c_cons_is_pr
[PROOF STATE]
proof (chain)
picking this:
f \<in> PrimRec2
c_cons \<in> PrimRec2
[PROOF STEP]
have S1: "?g \<in> PrimRec1"
[PROOF STATE]
proof (prove)
using this:
f \<in> PrimRec2
c_cons \<in> PrimRec2

goal (1 subgoal):
 1. (\<lambda>x. c_cons (f 0 x) 0) \<in> PrimRec1
[PROOF STEP]
by prec
[PROOF STATE]
proof (state)
this:
(\<lambda>x. c_cons (f 0 x) 0) \<in> PrimRec1

goal (1 subgoal):
 1. f \<in> PrimRec2 \<Longrightarrow> c_f_list f \<in> PrimRec2
[PROOF STEP]
let ?h = "(%a b c. c_cons (f (Suc a) c) b)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. f \<in> PrimRec2 \<Longrightarrow> c_f_list f \<in> PrimRec2
[PROOF STEP]
from A1 c_cons_is_pr
[PROOF STATE]
proof (chain)
picking this:
f \<in> PrimRec2
c_cons \<in> PrimRec2
[PROOF STEP]
have S2: "?h \<in> PrimRec3"
[PROOF STATE]
proof (prove)
using this:
f \<in> PrimRec2
c_cons \<in> PrimRec2

goal (1 subgoal):
 1. (\<lambda>a b c. c_cons (f (Suc a) c) b) \<in> PrimRec3
[PROOF STEP]
by prec
[PROOF STATE]
proof (state)
this:
(\<lambda>a b c. c_cons (f (Suc a) c) b) \<in> PrimRec3

goal (1 subgoal):
 1. f \<in> PrimRec2 \<Longrightarrow> c_f_list f \<in> PrimRec2
[PROOF STEP]
from S1 S2
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. c_cons (f 0 x) 0) \<in> PrimRec1
(\<lambda>a b c. c_cons (f (Suc a) c) b) \<in> PrimRec3
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. c_cons (f 0 x) 0) \<in> PrimRec1
(\<lambda>a b c. c_cons (f (Suc a) c) b) \<in> PrimRec3

goal (1 subgoal):
 1. c_f_list f \<in> PrimRec2
[PROOF STEP]
by (simp add: pr_rec c_f_list_def Let_def)
[PROOF STATE]
proof (state)
this:
c_f_list f \<in> PrimRec2

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma smult_carrier_vec[simp]: "(a \<cdot>\<^sub>v v \<in> carrier_vec n) = (v \<in> carrier_vec n)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<cdot>\<^sub>v v \<in> carrier_vec n) = (v \<in> carrier_vec n)
[PROOF STEP]
unfolding carrier_vec_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a \<cdot>\<^sub>v v \<in> {v. dim_vec v = n}) = (v \<in> {v. dim_vec v = n})
[PROOF STEP]
by auto


[STATEMENT]
lemma OPT_0_right:
  "OPT i 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.OPT i 0 = 0
[PROOF STEP]
unfolding OPT_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Max {length xs |xs. subseq xs (take i A) \<and> subseq xs (take 0 B)} = 0
[PROOF STEP]
by (simp add: subseq_append_le_same_iff[of _ "[]", simplified])


[STATEMENT]
lemma nths_atLeastAtMost_0_take: "nths xs {0..m} = take (Suc m) xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nths xs {0..m} = take (Suc m) xs
[PROOF STEP]
by (metis atLeast0AtMost lessThan_Suc_atMost nths_upt_eq_take)


[STATEMENT]
lemma sorted_less_rev_set_unique:
  assumes "sorted (rev xs)"
      and "sorted (rev ys)"
      and "set xs = set ys"
    shows "xs = ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. xs = ys
[PROOF STEP]
using assms sorted_less_set_unique[of "rev xs" "rev ys"]
[PROOF STATE]
proof (prove)
using this:
Sorted_Less.sorted (rev xs)
Sorted_Less.sorted (rev ys)
set xs = set ys
\<lbrakk>Sorted_Less.sorted (rev xs); Sorted_Less.sorted (rev ys); set (rev xs) = set (rev ys)\<rbrakk> \<Longrightarrow> rev xs = rev ys

goal (1 subgoal):
 1. xs = ys
[PROOF STEP]
by auto


[STATEMENT]
lemma mono_SucI1: "\<forall>n. X n \<le> X (Suc n) \<Longrightarrow> monoseq X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>n. X n \<le> X (Suc n) \<Longrightarrow> monoseq X
[PROOF STEP]
by (simp add: monoseq_Suc)


[STATEMENT]
lemma birkhoff_sum_diff:
  fixes f g::"_ \<Rightarrow> real"
  shows "birkhoff_sum (\<lambda>x. f x - g x) n x = birkhoff_sum f n x - birkhoff_sum g n x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. birkhoff_sum (\<lambda>x. f x - g x) n x = birkhoff_sum f n x - birkhoff_sum g n x
[PROOF STEP]
unfolding birkhoff_sum_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>i<n. f ((T ^^ i) x) - g ((T ^^ i) x)) = (\<Sum>i<n. f ((T ^^ i) x)) - (\<Sum>i<n. g ((T ^^ i) x))
[PROOF STEP]
by (simp add: sum_subtractf)


[STATEMENT]
lemma eq_m_irreducible_m: "f =m g \<Longrightarrow> irreducible_m f \<longleftrightarrow> irreducible_m g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f =m g \<Longrightarrow> irreducible_m f = irreducible_m g
[PROOF STEP]
using irreducible_m_Mp
[PROOF STATE]
proof (prove)
using this:
irreducible_m (Mp ?f) = irreducible_m ?f

goal (1 subgoal):
 1. f =m g \<Longrightarrow> irreducible_m f = irreducible_m g
[PROOF STEP]
by metis


[STATEMENT]
lemma summable_If_finite_set[simp, intro]: "finite A \<Longrightarrow> summable (\<lambda>r. if r \<in> A then f r else 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite A \<Longrightarrow> summable (\<lambda>r. if r \<in> A then f r else (0::'a))
[PROOF STEP]
by (rule sums_summable) (rule sums_If_finite_set)


[STATEMENT]
lemma order_power: "p \<noteq> 0 \<Longrightarrow> order c (p ^ n) = n * order c p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. p \<noteq> 0 \<Longrightarrow> order c (p ^ n) = n * order c p
[PROOF STEP]
by (induction n) (auto simp: order_mult)


[STATEMENT]
lemma subset_to_atom_closed:
  assumes "As \<noteq> {}"
  assumes "As \<subseteq> Xs"
  shows "subset_to_atom Xs As \<subseteq> \<Union> Xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subset_to_atom Xs As \<subseteq> \<Union> Xs
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. subset_to_atom Xs As \<subseteq> \<Union> Xs
[PROOF STEP]
have 0: "\<Inter> As \<subseteq> \<Union> As "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Inter> As \<subseteq> \<Union> As
[PROOF STEP]
apply(rule subsetI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> \<Inter> As \<Longrightarrow> x \<in> \<Union> As
[PROOF STEP]
using assms(1)
[PROOF STATE]
proof (prove)
using this:
As \<noteq> {}

goal (1 subgoal):
 1. \<And>x. x \<in> \<Inter> As \<Longrightarrow> x \<in> \<Union> As
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<Inter> As \<subseteq> \<Union> As

goal (1 subgoal):
 1. subset_to_atom Xs As \<subseteq> \<Union> Xs
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subset_to_atom Xs As \<subseteq> \<Union> Xs
[PROOF STEP]
apply(rule subsetI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. x \<in> subset_to_atom Xs As \<Longrightarrow> x \<in> \<Union> Xs
[PROOF STEP]
using assms 0
[PROOF STATE]
proof (prove)
using this:
As \<noteq> {}
As \<subseteq> Xs
\<Inter> As \<subseteq> \<Union> As

goal (1 subgoal):
 1. \<And>x. x \<in> subset_to_atom Xs As \<Longrightarrow> x \<in> \<Union> Xs
[PROOF STEP]
unfolding subset_to_atom_def
[PROOF STATE]
proof (prove)
using this:
As \<noteq> {}
As \<subseteq> Xs
\<Inter> As \<subseteq> \<Union> As

goal (1 subgoal):
 1. \<And>x. x \<in> \<Inter> As - \<Union> (Xs - As) \<Longrightarrow> x \<in> \<Union> Xs
[PROOF STEP]
by (meson DiffD1 Union_mono subsetD)
[PROOF STATE]
proof (state)
this:
subset_to_atom Xs As \<subseteq> \<Union> Xs

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma complex_bounded_clinear: "bounded_clinear f \<longleftrightarrow> (\<exists>c::complex. f = (\<lambda>x. x * c))"
  for f :: "complex \<Rightarrow> complex"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))
[PROOF STEP]
{
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))
[PROOF STEP]
assume "bounded_clinear f"
[PROOF STATE]
proof (state)
this:
bounded_clinear f

goal (1 subgoal):
 1. bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bounded_clinear f
[PROOF STEP]
interpret bounded_clinear f
[PROOF STATE]
proof (prove)
using this:
bounded_clinear f

goal (1 subgoal):
 1. bounded_clinear f
[PROOF STEP]
.
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))
[PROOF STEP]
from scaleC[of x 1]
[PROOF STATE]
proof (chain)
picking this:
f (x *\<^sub>C 1) = x *\<^sub>C f 1
[PROOF STEP]
have "f x = x * f 1"
[PROOF STATE]
proof (prove)
using this:
f (x *\<^sub>C 1) = x *\<^sub>C f 1

goal (1 subgoal):
 1. f x = x * f 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
f x = x * f 1

goal (1 subgoal):
 1. bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))
[PROOF STEP]
}
[PROOF STATE]
proof (state)
this:
bounded_clinear f \<Longrightarrow> f ?x2 = ?x2 * f 1

goal (1 subgoal):
 1. bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
bounded_clinear f \<Longrightarrow> f ?x2 = ?x2 * f 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
bounded_clinear f \<Longrightarrow> f ?x2 = ?x2 * f 1

goal (1 subgoal):
 1. bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))
[PROOF STEP]
by (auto intro: exI[of _ "f 1"] bounded_clinear_mult_left)
[PROOF STATE]
proof (state)
this:
bounded_clinear f = (\<exists>c. f = (\<lambda>x. x * c))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Suc_add_max_le[simp]:
  "(Suc(n + max i j) \<le> m) = (Suc(n + i) \<le> m \<and> Suc(n + j) \<le> m)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Suc (n + max i j) \<le> m) = (Suc (n + i) \<le> m \<and> Suc (n + j) \<le> m)
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Suc (n + max i j) \<le> m) = (Suc (n + i) \<le> m \<and> Suc (n + j) \<le> m)
[PROOF STEP]
by arith


[STATEMENT]
lemma fundamental_theorem_of_calculus_partial_vector:
  fixes a b:: "real" and
    F:: "('a::euclidean_space \<Rightarrow> 'b::euclidean_space)" and
    i:: "'a" and
    j:: "'b" and
    F_j_i:: "('a::euclidean_space \<Rightarrow> real)"
  assumes a_leq_b: "a \<le> b" and
    Base_vecs: "i \<in> Basis" "j \<in> Basis" and
    no_i_component: "c \<bullet> i = 0 " and
    has_partial_deriv: "\<forall>p \<in> D. has_partial_vector_derivative (\<lambda>x. (F x) \<bullet> j) i (F_j_i p) p" and
    domain_subset_of_D: "{x *\<^sub>R i + c |x. a \<le> x \<and> x \<le> b} \<subseteq> D"
  shows "((\<lambda>x. F_j_i( x *\<^sub>R i + c)) has_integral
          F(b *\<^sub>R i + c) \<bullet> j - F(a *\<^sub>R i + c) \<bullet> j) (cbox a b)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) (cbox a b)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) (cbox a b)
[PROOF STEP]
let ?domain = "{v. \<exists>x. a \<le> x \<and> x \<le> b \<and> v = x *\<^sub>R i + c}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) (cbox a b)
[PROOF STEP]
have "\<forall>x\<in> ?domain.  has_partial_vector_derivative (\<lambda>x. (F x) \<bullet> j) i (F_j_i x) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x\<in>{v. \<exists>x\<ge>a. x \<le> b \<and> v = x *\<^sub>R i + c}. has_partial_vector_derivative (\<lambda>x. F x \<bullet> j) i (F_j_i x) x
[PROOF STEP]
using has_partial_deriv domain_subset_of_D
[PROOF STATE]
proof (prove)
using this:
\<forall>p\<in>D. has_partial_vector_derivative (\<lambda>x. F x \<bullet> j) i (F_j_i p) p
{x *\<^sub>R i + c |x. a \<le> x \<and> x \<le> b} \<subseteq> D

goal (1 subgoal):
 1. \<forall>x\<in>{v. \<exists>x\<ge>a. x \<le> b \<and> v = x *\<^sub>R i + c}. has_partial_vector_derivative (\<lambda>x. F x \<bullet> j) i (F_j_i x) x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>{v. \<exists>x\<ge>a. x \<le> b \<and> v = x *\<^sub>R i + c}. has_partial_vector_derivative (\<lambda>x. F x \<bullet> j) i (F_j_i x) x

goal (1 subgoal):
 1. ((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) (cbox a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>{v. \<exists>x\<ge>a. x \<le> b \<and> v = x *\<^sub>R i + c}. has_partial_vector_derivative (\<lambda>x. F x \<bullet> j) i (F_j_i x) x
[PROOF STEP]
have "\<forall>x\<in> (cbox a b).  ((\<lambda>x. F(x *\<^sub>R i + c) \<bullet> j) has_vector_derivative (F_j_i( x *\<^sub>R i + c))) (at x)"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>{v. \<exists>x\<ge>a. x \<le> b \<and> v = x *\<^sub>R i + c}. has_partial_vector_derivative (\<lambda>x. F x \<bullet> j) i (F_j_i x) x

goal (1 subgoal):
 1. \<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
proof(clarsimp simp add: has_partial_vector_derivative_def)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x. (\<exists>xa\<ge>a. xa \<le> b \<and> x = xa *\<^sub>R i + c) \<longrightarrow> ((\<lambda>xa. F (x - (x \<bullet> i) *\<^sub>R i + xa *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i)); a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
fix x::real
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x. (\<exists>xa\<ge>a. xa \<le> b \<and> x = xa *\<^sub>R i + c) \<longrightarrow> ((\<lambda>xa. F (x - (x \<bullet> i) *\<^sub>R i + xa *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i)); a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
assume range_of_x: "a \<le> x" "x \<le> b"
[PROOF STATE]
proof (state)
this:
a \<le> x
x \<le> b

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x. (\<exists>xa\<ge>a. xa \<le> b \<and> x = xa *\<^sub>R i + c) \<longrightarrow> ((\<lambda>xa. F (x - (x \<bullet> i) *\<^sub>R i + xa *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i)); a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
assume ass2: "\<forall>x. (\<exists>z\<ge>a. z \<le> b \<and> x = z *\<^sub>R i + c) \<longrightarrow>
                     ((\<lambda>z. F(x - (x \<bullet> i) *\<^sub>R i + z *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i))"
[PROOF STATE]
proof (state)
this:
\<forall>x. (\<exists>z\<ge>a. z \<le> b \<and> x = z *\<^sub>R i + c) \<longrightarrow> ((\<lambda>z. F (x - (x \<bullet> i) *\<^sub>R i + z *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x. (\<exists>xa\<ge>a. xa \<le> b \<and> x = xa *\<^sub>R i + c) \<longrightarrow> ((\<lambda>xa. F (x - (x \<bullet> i) *\<^sub>R i + xa *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i)); a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
have "((\<lambda>z. F((x *\<^sub>R i + c) - ((x *\<^sub>R i + c) \<bullet> i) *\<^sub>R i + z *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at ((x *\<^sub>R i + c) \<bullet> i)) "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>z. F (x *\<^sub>R i + c - ((x *\<^sub>R i + c) \<bullet> i) *\<^sub>R i + z *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at ((x *\<^sub>R i + c) \<bullet> i))
[PROOF STEP]
using range_of_x ass2
[PROOF STATE]
proof (prove)
using this:
a \<le> x
x \<le> b
\<forall>x. (\<exists>z\<ge>a. z \<le> b \<and> x = z *\<^sub>R i + c) \<longrightarrow> ((\<lambda>z. F (x - (x \<bullet> i) *\<^sub>R i + z *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i))

goal (1 subgoal):
 1. ((\<lambda>z. F (x *\<^sub>R i + c - ((x *\<^sub>R i + c) \<bullet> i) *\<^sub>R i + z *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at ((x *\<^sub>R i + c) \<bullet> i))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>z. F (x *\<^sub>R i + c - ((x *\<^sub>R i + c) \<bullet> i) *\<^sub>R i + z *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at ((x *\<^sub>R i + c) \<bullet> i))

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x. (\<exists>xa\<ge>a. xa \<le> b \<and> x = xa *\<^sub>R i + c) \<longrightarrow> ((\<lambda>xa. F (x - (x \<bullet> i) *\<^sub>R i + xa *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i)); a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>z. F (x *\<^sub>R i + c - ((x *\<^sub>R i + c) \<bullet> i) *\<^sub>R i + z *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at ((x *\<^sub>R i + c) \<bullet> i))
[PROOF STEP]
have 0: "((\<lambda>x. F( c + x *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)"
[PROOF STATE]
proof (prove)
using this:
((\<lambda>z. F (x *\<^sub>R i + c - ((x *\<^sub>R i + c) \<bullet> i) *\<^sub>R i + z *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at ((x *\<^sub>R i + c) \<bullet> i))

goal (1 subgoal):
 1. ((\<lambda>x. F (c + x *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
by (simp add: assms(2) inner_left_distrib no_i_component)
[PROOF STATE]
proof (state)
this:
((\<lambda>x. F (c + x *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x. (\<exists>xa\<ge>a. xa \<le> b \<and> x = xa *\<^sub>R i + c) \<longrightarrow> ((\<lambda>xa. F (x - (x \<bullet> i) *\<^sub>R i + xa *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i)); a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
have 1: "(\<lambda>x. F(x *\<^sub>R i + c) \<bullet> j) = (\<lambda>x. F(c + x *\<^sub>R i) \<bullet> j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) = (\<lambda>x. F (c + x *\<^sub>R i) \<bullet> j)
[PROOF STEP]
by (simp add: add.commute)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) = (\<lambda>x. F (c + x *\<^sub>R i) \<bullet> j)

goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<forall>x. (\<exists>xa\<ge>a. xa \<le> b \<and> x = xa *\<^sub>R i + c) \<longrightarrow> ((\<lambda>xa. F (x - (x \<bullet> i) *\<^sub>R i + xa *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i x) (at (x \<bullet> i)); a \<le> x; x \<le> b\<rbrakk> \<Longrightarrow> ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) = (\<lambda>x. F (c + x *\<^sub>R i) \<bullet> j)
[PROOF STEP]
show "((\<lambda>x. F(x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)"
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) = (\<lambda>x. F (c + x *\<^sub>R i) \<bullet> j)

goal (1 subgoal):
 1. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
using 0 and 1
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) = (\<lambda>x. F (c + x *\<^sub>R i) \<bullet> j)
((\<lambda>x. F (c + x *\<^sub>R i) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
(\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) = (\<lambda>x. F (c + x *\<^sub>R i) \<bullet> j)

goal (1 subgoal):
 1. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)

goal (1 subgoal):
 1. ((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) (cbox a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
[PROOF STEP]
have "\<forall>x\<in> (cbox a b).  ((\<lambda>x. F(x *\<^sub>R i + c) \<bullet> j) has_vector_derivative (F_j_i( x *\<^sub>R i + c))) (at_within x (cbox a b))"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)

goal (1 subgoal):
 1. \<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x within cbox a b)
[PROOF STEP]
using has_vector_derivative_at_within
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x)
(?f has_vector_derivative ?f') (at ?x) \<Longrightarrow> (?f has_vector_derivative ?f') (at ?x within ?S)

goal (1 subgoal):
 1. \<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x within cbox a b)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x within cbox a b)

goal (1 subgoal):
 1. ((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) (cbox a b)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x within cbox a b)
[PROOF STEP]
show "( (\<lambda>x. F_j_i( x *\<^sub>R i + c)) has_integral
             F(b *\<^sub>R i + c) \<bullet> j - F(a *\<^sub>R i + c) \<bullet> j) (cbox a b)"
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x within cbox a b)

goal (1 subgoal):
 1. ((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) (cbox a b)
[PROOF STEP]
using fundamental_theorem_of_calculus[of "a" "b" "(\<lambda>x::real.  F(x *\<^sub>R i + c) \<bullet> j)" "(\<lambda>x::real. F_j_i( x *\<^sub>R i + c))"] and
      a_leq_b
[PROOF STATE]
proof (prove)
using this:
\<forall>x\<in>cbox a b. ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x within cbox a b)
\<lbrakk>a \<le> b; \<And>x. x \<in> {a..b} \<Longrightarrow> ((\<lambda>x. F (x *\<^sub>R i + c) \<bullet> j) has_vector_derivative F_j_i (x *\<^sub>R i + c)) (at x within {a..b})\<rbrakk> \<Longrightarrow> ((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) {a..b}
a \<le> b

goal (1 subgoal):
 1. ((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) (cbox a b)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
((\<lambda>x. F_j_i (x *\<^sub>R i + c)) has_integral F (b *\<^sub>R i + c) \<bullet> j - F (a *\<^sub>R i + c) \<bullet> j) (cbox a b)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem p16: "(p \<longrightarrow> q) \<or> (q \<longrightarrow> p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (p \<longrightarrow> q) \<or> (q \<longrightarrow> p)
[PROOF STEP]
by auto2


[STATEMENT]
lemma open_closed: "open S \<longleftrightarrow> closed (- S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. open S = closed (- S)
[PROOF STEP]
by (simp add: closed_def)


[STATEMENT]
lemma meta_same_imp_rule: "(\<lbrakk>PROP P; PROP P\<rbrakk> \<Longrightarrow> PROP Q) \<equiv> (PROP P \<Longrightarrow> PROP Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lbrakk>PROP P; PROP P\<rbrakk> \<Longrightarrow> PROP Q) \<equiv> (PROP P \<Longrightarrow> PROP Q)
[PROOF STEP]
by rule


[STATEMENT]
lemma SSup_ds_inv: "SSup \<circ> ds = (id::'a::complete_lattice \<Rightarrow> 'a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. SSup \<circ> ds = id
[PROOF STEP]
unfolding ds_def SSup_def fun_eq_iff id_def comp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x. \<Squnion> Rep_downset (Abs_downset (\<down> x)) = x
[PROOF STEP]
by (simp add: Abs_downset_inverse pointfree_idE)


[STATEMENT]
lemma square_part_pos [simp]: "n > 0 \<Longrightarrow> square_part n > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> 0 < square_part n
[PROOF STEP]
unfolding square_part_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < n \<Longrightarrow> 0 < (if n = 0 then 0 else \<Prod>p\<in>prime_factors n. p ^ (multiplicity p n div 2))
[PROOF STEP]
using prime_gt_0_nat
[PROOF STATE]
proof (prove)
using this:
prime ?p \<Longrightarrow> 0 < ?p

goal (1 subgoal):
 1. 0 < n \<Longrightarrow> 0 < (if n = 0 then 0 else \<Prod>p\<in>prime_factors n. p ^ (multiplicity p n div 2))
[PROOF STEP]
by auto


[STATEMENT]
lemma safety_prop_INTER1 [simp]:
  "(\<And>i. safety_prop (X i)) \<Longrightarrow> safety_prop (\<Inter>i. X i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>i. safety_prop (X i)) \<Longrightarrow> safety_prop (\<Inter> (range X))
[PROOF STEP]
by (rule safety_prop_INTER) simp


[STATEMENT]
lemma qe_eq_repeat_eval_augment : "amount \<le> var+1 \<Longrightarrow>
      (\<exists>xs. (length xs = var + 1) \<and> eval (list_conj (map fm.Atom L @ F)) (xs @ \<Gamma>)) =
      (\<exists>xs. (length xs = var + 1) \<and> eval (step_augment qe_eq_repeat IdentityHeuristic amount var L F) (xs @ \<Gamma>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. amount \<le> var + 1 \<Longrightarrow> (\<exists>xs. length xs = var + 1 \<and> eval (list_conj (map fm.Atom L @ F)) (xs @ \<Gamma>)) = (\<exists>xs. length xs = var + 1 \<and> eval (step_augment qe_eq_repeat IdentityHeuristic amount var L F) (xs @ \<Gamma>))
[PROOF STEP]
apply(rule step_augmenter_eval[of qe_eq_repeat IdentityHeuristic amount var L F \<Gamma>])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>xs vara L F \<Gamma>. \<lbrakk>amount \<le> var + 1; length xs = vara\<rbrakk> \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom L @ F)) (xs @ x # \<Gamma>)) = (\<exists>x. eval (qe_eq_repeat vara L F) (xs @ x # \<Gamma>))
 2. \<And>n vara L F. \<lbrakk>amount \<le> var + 1; IdentityHeuristic n L F = vara\<rbrakk> \<Longrightarrow> vara \<le> n
 3. amount \<le> var + 1 \<Longrightarrow> amount \<le> var + 1
[PROOF STEP]
using qe_eq_repeat_eval
[PROOF STATE]
proof (prove)
using this:
length ?xs = ?var \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom ?L @ ?F)) (?xs @ x # ?\<Gamma>)) = (\<exists>x. eval (qe_eq_repeat ?var ?L ?F) (?xs @ x # ?\<Gamma>))

goal (3 subgoals):
 1. \<And>xs vara L F \<Gamma>. \<lbrakk>amount \<le> var + 1; length xs = vara\<rbrakk> \<Longrightarrow> (\<exists>x. eval (list_conj (map fm.Atom L @ F)) (xs @ x # \<Gamma>)) = (\<exists>x. eval (qe_eq_repeat vara L F) (xs @ x # \<Gamma>))
 2. \<And>n vara L F. \<lbrakk>amount \<le> var + 1; IdentityHeuristic n L F = vara\<rbrakk> \<Longrightarrow> vara \<le> n
 3. amount \<le> var + 1 \<Longrightarrow> amount \<le> var + 1
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>n vara L F. \<lbrakk>amount \<le> var + 1; IdentityHeuristic n L F = vara\<rbrakk> \<Longrightarrow> vara \<le> n
 2. amount \<le> var + 1 \<Longrightarrow> amount \<le> var + 1
[PROOF STEP]
by auto


[STATEMENT]
lemma matrix_vector_mult_in_columnspace:
  fixes A :: "real^'n^'m"
  shows "(A *v x) \<in> span(columns A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A *v x \<in> span (columns A)
[PROOF STEP]
using matrix_vector_mult_in_columnspace_gen[of A x]
[PROOF STATE]
proof (prove)
using this:
A *v x \<in> vec.span (columns A)

goal (1 subgoal):
 1. A *v x \<in> span (columns A)
[PROOF STEP]
by (simp add: span_vec_eq)


[STATEMENT]
lemma self_eq_eucl_of_list: "x = eucl_of_list (map (\<lambda>i. x $\<^sub>e i) [0..<DIM('a)])"
  for x::"'a::executable_euclidean_space"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x = eucl_of_list (map (($\<^sub>e) x) [0..<DIM('a)])
[PROOF STEP]
by (auto simp: eucl_eq_iff[where 'a='a] eucl_of_list_eucl_nth)


[STATEMENT]
lemma mem_restrictD[dest]: assumes "(x,y) \<in> R \<restriction> X" shows "x \<in> X" "y \<in> X" "(x,y) \<in> R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> X &&& y \<in> X &&& (x, y) \<in> R
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> R \<restriction> X

goal (1 subgoal):
 1. x \<in> X &&& y \<in> X &&& (x, y) \<in> R
[PROOF STEP]
unfolding restrict_def
[PROOF STATE]
proof (prove)
using this:
(x, y) \<in> {(x, y). x \<in> X \<and> y \<in> X \<and> (x, y) \<in> R}

goal (1 subgoal):
 1. x \<in> X &&& y \<in> X &&& (x, y) \<in> R
[PROOF STEP]
by auto