[STATEMENT]
lemma Sup_closed_coclop_var:
  fixes X :: "'a::complete_lattice set"
  shows "coclop f \<Longrightarrow> \<forall>x \<in> X. x \<in> range f \<Longrightarrow> \<Squnion>X \<in> range f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>coclop f; \<forall>x\<in>X. x \<in> range f\<rbrakk> \<Longrightarrow> \<Squnion> X \<in> range f
[PROOF STEP]
by (smt Inf.INF_id_eq Sup.SUP_cong antisym coclop_closure coclop_coextensive_var coclop_iso id_apply mono_SUP)


[STATEMENT]
lemma while_sup_sub_sup_one:
  "x \<star> (x \<squnion> y) \<le> x \<star> (1 \<squnion> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<star> x \<squnion> y \<le> x \<star> (1::'a) \<squnion> y
[PROOF STEP]
using semiring.add_right_mono while_left_dist_sup while_below_while_one
[PROOF STATE]
proof (prove)
using this:
?a \<le> ?b \<Longrightarrow> ?a \<squnion> ?c \<le> ?b \<squnion> ?c
?x \<star> ?y \<squnion> ?z = (?x \<star> ?y) \<squnion> (?x \<star> ?z)
?x \<star> ?x \<le> ?x \<star> (1::'a)

goal (1 subgoal):
 1. x \<star> x \<squnion> y \<le> x \<star> (1::'a) \<squnion> y
[PROOF STEP]
by auto


[STATEMENT]
lemma setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t_proj_subset:
  "setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t A"
  "setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj m (proj n A)) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t A &&& setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj m (proj n A)) \<subseteq> setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t (proj n A)
[PROOF STEP]
unfolding proj_def setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Union> (setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t\<^sub>p ` set (filter (\<lambda>s. has_LabelN n s \<or> has_LabelS s) A)) \<subseteq> \<Union> (setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t\<^sub>p ` set A) &&& \<Union> (setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t\<^sub>p ` set (filter (\<lambda>s. has_LabelN m s \<or> has_LabelS s) (filter (\<lambda>s. has_LabelN n s \<or> has_LabelS s) A))) \<subseteq> \<Union> (setops\<^sub>l\<^sub>s\<^sub>s\<^sub>t\<^sub>p ` set (filter (\<lambda>s. has_LabelN n s \<or> has_LabelS s) A))
[PROOF STEP]
by auto


[STATEMENT]
lemma int_of_integer_plus: "int_of_integer (x + y) = (int_of_integer x + int_of_integer y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. int_of_integer (x + y) = int_of_integer x + int_of_integer y
[PROOF STEP]
by simp


[STATEMENT]
lemma borel_measurable_vimage_halfspace_component_gt:
  fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"
  shows "f \<in> borel_measurable (lebesgue_on S) \<longleftrightarrow>
         (\<forall>a i. i \<in> Basis \<longrightarrow> {x \<in> S. f x \<bullet> i > a} \<in> sets (lebesgue_on S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (f \<in> borel_measurable (lebesgue_on S)) = (\<forall>a i. i \<in> Basis \<longrightarrow> {x \<in> S. a < f x \<bullet> i} \<in> sets (lebesgue_on S))
[PROOF STEP]
apply (rule trans [OF borel_measurable_iff_halfspace_greater])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>i\<in>Basis. \<forall>a. {w \<in> space (lebesgue_on S). a < f w \<bullet> i} \<in> sets (lebesgue_on S)) = (\<forall>a i. i \<in> Basis \<longrightarrow> {x \<in> S. a < f x \<bullet> i} \<in> sets (lebesgue_on S))
[PROOF STEP]
apply (fastforce simp add: space_restrict_space)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma cf_bcomp_ArrMap_vdomain[cat_cs_simps]:
  assumes "\<FF> : \<BB>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>" and "\<GG> : \<CC>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>"
  shows "\<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
interpret \<FF>: is_functor \<alpha> \<BB>' \<BB> \<FF>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<FF> : \<BB>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<BB>
[PROOF STEP]
by (rule assms(1))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
interpret \<GG>: is_functor \<alpha> \<CC>' \<CC> \<GG>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<GG> : \<CC>' \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>
[PROOF STEP]
by (rule assms(2))
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
unfolding cf_bcomp_components
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<D>\<^sub>\<circ> (\<lambda>f\<in>\<^sub>\<circ>(\<FF>\<lparr>HomDom\<rparr> \<times>\<^sub>C \<GG>\<lparr>HomDom\<rparr>)\<lparr>Arr\<rparr>. \<FF>\<lparr>ArrMap\<rparr>\<lparr>f\<lparr>[]\<^sub>\<circ>\<rparr>\<rparr> \<otimes>\<^sub>H\<^sub>M\<^sub>.\<^sub>A\<^bsub>\<SS>\<^esub> \<GG>\<lparr>ArrMap\<rparr>\<lparr>f\<lparr>1\<^sub>\<nat>\<rparr>\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>
[PROOF STEP]
by (simp add: cat_cs_simps)
[PROOF STATE]
proof (state)
this:
\<D>\<^sub>\<circ> (cf_bcomp \<SS> \<FF> \<GG>\<lparr>ArrMap\<rparr>) = (\<BB>' \<times>\<^sub>C \<CC>')\<lparr>Arr\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nat_test_pre_post_2:
  "nat_test t s \<Longrightarrow> -r \<le> s \<Longrightarrow> (\<forall>n . x \<le> t n*-p\<stileturn>(pSum t n)) \<Longrightarrow> -p\<star>x \<le> -r\<stileturn>1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>nat_test t s; - r \<le> s; \<forall>n. x \<le> t n * - p \<stileturn> pSum t n\<rbrakk> \<Longrightarrow> - p \<star> x \<le> - r \<stileturn> (1::'a)
[PROOF STEP]
by (smt (verit, ccfv_threshold) nat_test_def nat_test_pre_2 one_def pSum_test_nat pre_post_galois tests_dual.sub_sup_closed)


[STATEMENT]
lemma "(\<forall>x. f(x) \<longrightarrow>
              (\<exists>y. g(y) \<and> h x y \<and> (\<exists>y. g(y) \<and> \<not> h x y)))  \<and>
              (\<exists>x. j(x) \<and> (\<forall>y. g(y) \<longrightarrow> h x y))
              \<longrightarrow> (\<exists>x. j(x) \<and> \<not>f(x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<forall>x. f x \<longrightarrow> (\<exists>y. g y \<and> h x y \<and> (\<exists>y. g y \<and> \<not> h x y))) \<and> (\<exists>x. j x \<and> (\<forall>y. g y \<longrightarrow> h x y)) \<longrightarrow> (\<exists>x. j x \<and> \<not> f x)
[PROOF STEP]
by blast


[STATEMENT]
lemma [import_const "?"]:
  "Ex = (\<lambda>P::'A \<Rightarrow> bool. All (\<lambda>q::bool. (All (\<lambda>x::'A::type. (P x) \<longrightarrow> q)) \<longrightarrow> q))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Ex = (\<lambda>P. \<forall>q. (\<forall>x. P x \<longrightarrow> q) \<longrightarrow> q)
[PROOF STEP]
by auto


[STATEMENT]
lemma LANDAU_PROD_bigo_iff:
  "LANDAU_PROD (bigo at_top) c1 c2 fs \<longleftrightarrow> c1 = 0 \<or> (c2 \<noteq> 0 \<and> nonneg_primfun_list (group_primfuns fs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LANDAU_PROD bigo_at_top c1 c2 fs = (c1 = 0 \<or> c2 \<noteq> 0 \<and> nonneg_primfun_list (group_primfuns fs))
[PROOF STEP]
unfolding LANDAU_PROD_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>_. c1) \<in> O(\<lambda>x. c2 * eval_primfuns fs x)) = (c1 = 0 \<or> c2 \<noteq> 0 \<and> nonneg_primfun_list (group_primfuns fs))
[PROOF STEP]
by (cases "c1 = 0", simp, cases "c2 = 0", simp) (simp_all add: landau_primfuns_iff)


[STATEMENT]
lemma measurable_dens_ctxt_measure_component:
    "x \<in> V \<Longrightarrow> (\<lambda>\<sigma>. \<sigma> x) \<in> measurable (dens_ctxt_measure (V,V',\<Gamma>,\<delta>) \<rho>) (stock_measure (\<Gamma> x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> V \<Longrightarrow> (\<lambda>\<sigma>. \<sigma> x) \<in> dens_ctxt_measure \<Y> \<rho> \<rightarrow>\<^sub>M stock_measure (\<Gamma> x)
[PROOF STEP]
unfolding dens_ctxt_measure_def state_measure'_def state_measure_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> V \<Longrightarrow> (\<lambda>\<sigma>. \<sigma> x) \<in> (case \<Y> of (V, V', \<Gamma>, \<delta>) \<Rightarrow> \<lambda>\<rho>. density (distr (Pi\<^sub>M V (\<lambda>x. stock_measure (\<Gamma> x))) (Pi\<^sub>M (V \<union> V') (\<lambda>x. stock_measure (\<Gamma> x))) (\<lambda>\<sigma>. merge V V' (\<sigma>, \<rho>))) \<delta>) \<rho> \<rightarrow>\<^sub>M stock_measure (\<Gamma> x)
[PROOF STEP]
by (auto intro!: measurable_component_singleton)