[STATEMENT]
lemma fun_dom_scene_inter: "fds(A \<inter> B) = fds(A) \<sqinter>\<^sub>S fds(B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds (A \<inter> B) = fds A \<sqinter>\<^sub>S fds B
[PROOF STEP]
by (simp add: inf_scene_def fun_dom_scene_union[THEN sym] fun_dom_scene_compl[THEN sym])


[STATEMENT]
lemma row_append:"row (A@B)i = (row A i)@(row B i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. row (A @ B) i = row A i @ row B i
[PROOF STEP]
unfolding row_def map_append
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. map (\<lambda>w. w ! i) A @ map (\<lambda>w. w ! i) B = map (\<lambda>w. w ! i) A @ map (\<lambda>w. w ! i) B
[PROOF STEP]
by auto


[STATEMENT]
lemma return_restrict_space:
  "\<Omega> \<in> sets M \<Longrightarrow> return (restrict_space M \<Omega>) x = restrict_space (return M x) \<Omega>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Omega> \<in> sets M \<Longrightarrow> return (restrict_space M \<Omega>) x = restrict_space (return M x) \<Omega>
[PROOF STEP]
by (auto intro!: measure_eqI simp: sets_restrict_space emeasure_restrict_space)


[STATEMENT]
lemma eval_pCons: "poly (pCons 0 1) x = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (pCons (0::'a) 1) x = x
[PROOF STEP]
using poly_1 poly_pCons
[PROOF STATE]
proof (prove)
using this:
poly 1 ?x = (1::?'a)
poly (pCons ?a ?p) ?x = ?a + ?x * poly ?p ?x

goal (1 subgoal):
 1. poly (pCons (0::'a) 1) x = x
[PROOF STEP]
by auto


[STATEMENT]
lemma card_face_cycle_sets_da: "card H.face_cycle_sets = Suc (card G.face_cycle_sets)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card H.face_cycle_sets = Suc (card G.face_cycle_sets)
[PROOF STEP]
unfolding card_face_cycle_sets_da'
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card G.face_cycle_sets - 1 + card ({segment G.face_cycle_succ a a', segment G.face_cycle_succ a' a, {}} - {{}}) = Suc (card G.face_cycle_sets)
[PROOF STEP]
using segment_a'_a_ne' segment_a_a'_ne' card_fcs_gt_0
[PROOF STATE]
proof (prove)
using this:
segment G.face_cycle_succ a' a \<noteq> {}
segment G.face_cycle_succ a a' \<noteq> {}
0 < card G.face_cycle_sets

goal (1 subgoal):
 1. card G.face_cycle_sets - 1 + card ({segment G.face_cycle_succ a a', segment G.face_cycle_succ a' a, {}} - {{}}) = Suc (card G.face_cycle_sets)
[PROOF STEP]
by (simp add: segments_neq card_insert_if)


[STATEMENT]
lemma plus_reachable_without_loops:
  "x\<^sup>+ = (x \<sqinter> -1)\<^sup>+ \<squnion> (x \<sqinter> 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>+ = (x \<sqinter> - (1::'a))\<^sup>+ \<squnion> x \<sqinter> (1::'a)
[PROOF STEP]
by (metis comp_associative maddux_3_11_pp regular_one_closed star.circ_back_loop_fixpoint star.circ_loop_fixpoint sup_assoc reachable_without_loops)


[STATEMENT]
lemma "(0::real) < 1 + \<bar>x\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < 1 + \<bar>x\<bar>
[PROOF STEP]
by (sos "((R<1 + (((A<=1 * R<1) * (R<1/2 * [1]^2)) + ((A<=0 * R<1) * (R<1/2 * [1]^2)))))")


[STATEMENT]
lemma unwrapForall'' : "eval (AllN (i + j) A) L = eval (AllN i(AllN j A)) L"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval (AllN (i + j) A) L = eval (AllN i (AllN j A)) L
[PROOF STEP]
using unwrapExist''[of i j "neg A" L] eval_neg
[PROOF STATE]
proof (prove)
using this:
eval (ExN (i + j) (neg A)) L = eval (ExN i (ExN j (neg A))) L
(\<not> eval (neg ?f) ?L) = eval ?f ?L

goal (1 subgoal):
 1. eval (AllN (i + j) A) L = eval (AllN i (AllN j A)) L
[PROOF STEP]
by fastforce


[STATEMENT]
lemma (in encoding) full_abstraction_impl_SRel_iff_TRel_is_refl:
  fixes SRel :: "('procS \<times> 'procS) set"
    and TRel :: "('procT \<times> 'procT) set"
  assumes fullAbs: "fully_abstract SRel TRel"
  shows "refl SRel \<longleftrightarrow> (\<forall>S. (\<lbrakk>S\<rbrakk>, \<lbrakk>S\<rbrakk>) \<in> TRel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. refl SRel = (\<forall>S. (\<lbrakk>S\<rbrakk>, \<lbrakk>S\<rbrakk>) \<in> TRel)
[PROOF STEP]
unfolding refl_on_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (SRel \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> SRel)) = (\<forall>S. (\<lbrakk>S\<rbrakk>, \<lbrakk>S\<rbrakk>) \<in> TRel)
[PROOF STEP]
by (simp add: fullAbs)


[STATEMENT]
lemma DDH_bound1: "\<bar>spmf (ddh.DDH0 \<G> \<A>) True - spmf (ddh.DDH1 \<G> \<A>) True\<bar>
                        \<le> \<bar>spmf (ddh.ddh_0 \<G> \<A>) True - spmf (ddh.ddh_1 \<G> \<A>) True\<bar>
                              + \<bar>spmf (ddh.ddh_1 \<G> \<A>) True - spmf (ddh.DDH1 \<G> \<A>) True\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>spmf (DDH0 \<A>) True - spmf (DDH1 \<A>) True\<bar> \<le> \<bar>spmf (ddh_0 \<A>) True - spmf (ddh_1 \<A>) True\<bar> + \<bar>spmf (ddh_1 \<A>) True - spmf (DDH1 \<A>) True\<bar>
[PROOF STEP]
by (simp add: abs_diff_triangle_ineq2 DDH0_eq_ddh_0)


[STATEMENT]
lemma tank_arith:
  assumes "0 \<le> (\<tau>::real)" and "0 < c\<^sub>o" and "c\<^sub>o < c\<^sub>i"
  shows "\<forall>\<tau>\<in>{0..\<tau>}. \<tau> \<le> - ((hmin - y) / c\<^sub>o) \<Longrightarrow>  hmin \<le> y - c\<^sub>o * \<tau>"
    and "\<forall>\<tau>\<in>{0..\<tau>}. \<tau> \<le> (hmax - y) / (c\<^sub>i - c\<^sub>o) \<Longrightarrow>  (c\<^sub>i - c\<^sub>o) * \<tau> + y \<le> hmax"
    and "hmin \<le> y \<Longrightarrow> hmin \<le> (c\<^sub>i - c\<^sub>o) * \<tau> + y"
    and "y \<le> hmax \<Longrightarrow> y - c\<^sub>o * \<tau> \<le> hmax"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<forall>\<tau>\<in>{0..\<tau>}. \<tau> \<le> - ((hmin - y) / c\<^sub>o) \<Longrightarrow> hmin \<le> y - c\<^sub>o \<cdot> \<tau>) &&& (\<forall>\<tau>\<in>{0..\<tau>}. \<tau> \<le> (hmax - y) / (c\<^sub>i - c\<^sub>o) \<Longrightarrow> (c\<^sub>i - c\<^sub>o) \<cdot> \<tau> + y \<le> hmax)) &&& (hmin \<le> y \<Longrightarrow> hmin \<le> (c\<^sub>i - c\<^sub>o) \<cdot> \<tau> + y) &&& (y \<le> hmax \<Longrightarrow> y - c\<^sub>o \<cdot> \<tau> \<le> hmax)
[PROOF STEP]
apply(simp_all add: field_simps le_divide_eq assms)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. hmin \<le> y \<Longrightarrow> hmin + \<tau> \<cdot> c\<^sub>o \<le> y + \<tau> \<cdot> c\<^sub>i
 2. y \<le> hmax \<Longrightarrow> y \<le> hmax + \<tau> \<cdot> c\<^sub>o
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> \<tau>
0 < c\<^sub>o
c\<^sub>o < c\<^sub>i

goal (2 subgoals):
 1. hmin \<le> y \<Longrightarrow> hmin + \<tau> \<cdot> c\<^sub>o \<le> y + \<tau> \<cdot> c\<^sub>i
 2. y \<le> hmax \<Longrightarrow> y \<le> hmax + \<tau> \<cdot> c\<^sub>o
[PROOF STEP]
apply (meson add_mono less_eq_real_def mult_left_mono)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. y \<le> hmax \<Longrightarrow> y \<le> hmax + \<tau> \<cdot> c\<^sub>o
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
0 \<le> \<tau>
0 < c\<^sub>o
c\<^sub>o < c\<^sub>i

goal (1 subgoal):
 1. y \<le> hmax \<Longrightarrow> y \<le> hmax + \<tau> \<cdot> c\<^sub>o
[PROOF STEP]
by (meson add_increasing2 less_eq_real_def mult_nonneg_nonneg)


[STATEMENT]
lemma qbs_prob_integral_indep_mult:
  assumes "qbs_integrable p f"
      and "qbs_integrable q g"
    shows "(\<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>(p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q)) = (\<integral>\<^sub>Q x. f x \<partial>p) * (\<integral>\<^sub>Q y. g y \<partial>q)"
          (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
have "?lhs = (\<integral>\<^sub>Q x. \<integral>\<^sub>Q y. f x * g y \<partial>q \<partial>p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = \<integral>\<^sub>Q x. \<integral>\<^sub>Q y. f x * g y \<partial>q \<partial>p
[PROOF STEP]
using qbs_prob_integral_Fubini_fst[OF qbs_integrable_indep_mult[OF assms]]
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sub>Q x. \<integral>\<^sub>Q y. f (fst (x, y)) * g (snd (x, y)) \<partial>q \<partial>p = \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q

goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = \<integral>\<^sub>Q x. \<integral>\<^sub>Q y. f x * g y \<partial>q \<partial>p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
\<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = \<integral>\<^sub>Q x. \<integral>\<^sub>Q y. f x * g y \<partial>q \<partial>p

goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = \<integral>\<^sub>Q x. \<integral>\<^sub>Q y. f x * g y \<partial>q \<partial>p

goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
have "... = (\<integral>\<^sub>Q x. f x * (\<integral>\<^sub>Q y.  g y \<partial>q) \<partial>p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sub>Q x. \<integral>\<^sub>Q y. f x * g y \<partial>q \<partial>p = \<integral>\<^sub>Q x. f x * qbs_prob_integral q g \<partial>p
[PROOF STEP]
by(simp add: qbs_prob_integral_cmult)
[PROOF STATE]
proof (state)
this:
\<integral>\<^sub>Q x. \<integral>\<^sub>Q y. f x * g y \<partial>q \<partial>p = \<integral>\<^sub>Q x. f x * qbs_prob_integral q g \<partial>p

goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<integral>\<^sub>Q x. \<integral>\<^sub>Q y. f x * g y \<partial>q \<partial>p = \<integral>\<^sub>Q x. f x * qbs_prob_integral q g \<partial>p

goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
have "... = ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sub>Q x. f x * qbs_prob_integral q g \<partial>p = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
by(simp add: qbs_prob_integral_cmult ab_semigroup_mult_class.mult.commute[where b="\<integral>\<^sub>Q y.  g y \<partial>q"])
[PROOF STATE]
proof (state)
this:
\<integral>\<^sub>Q x. f x * qbs_prob_integral q g \<partial>p = qbs_prob_integral p f * qbs_prob_integral q g

goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g

goal (1 subgoal):
 1. \<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<integral>\<^sub>Q z. f (fst z) * g (snd z) \<partial>p \<Otimes>\<^sub>Q\<^sub>m\<^sub>e\<^sub>s q = qbs_prob_integral p f * qbs_prob_integral q g

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fs0_gso0: "0 < m \<Longrightarrow> fs ! 0 = gso 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < length fs \<Longrightarrow> fs ! 0 = gso 0
[PROOF STEP]
unfolding gso.simps[of 0]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < length fs \<Longrightarrow> fs ! 0 = fs ! 0 + M.sumlist (map (\<lambda>j. - \<mu> 0 j \<cdot>\<^sub>v gso j) [0..<0])
[PROOF STEP]
using f_dim[of 0]
[PROOF STATE]
proof (prove)
using this:
0 < length fs \<Longrightarrow> dim_vec (fs ! 0) = n

goal (1 subgoal):
 1. 0 < length fs \<Longrightarrow> fs ! 0 = fs ! 0 + M.sumlist (map (\<lambda>j. - \<mu> 0 j \<cdot>\<^sub>v gso j) [0..<0])
[PROOF STEP]
by (cases fs, auto simp add: upt_rec)


[STATEMENT]
lemma (in encoding) fully_abstract_impl_symcl_source_target_relation_is_preorder:
  fixes SRel :: "('procS \<times> 'procS) set"
    and TRel :: "('procT \<times> 'procT) set"
  assumes fullAbs: "fully_abstract ((symcl (SRel\<^sup>=))\<^sup>+) ((symcl (TRel\<^sup>=))\<^sup>+)"
  shows "\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel)
                \<and> ((symcl (SRel\<^sup>=))\<^sup>+) = {(S1, S2). (SourceTerm S1, SourceTerm S2) \<in> symcl Rel}
                \<and> ((symcl (TRel\<^sup>=))\<^sup>+) = {(T1, T2). (TargetTerm T1, TargetTerm T2) \<in> symcl Rel}
                \<and> preorder (symcl Rel)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
[PROOF STEP]
have "refl ((symcl (TRel\<^sup>=))\<^sup>+)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. refl ((symcl (TRel\<^sup>=))\<^sup>+)
[PROOF STEP]
using refl_symm_trans_closure_is_symm_refl_trans_closure[of TRel]
            refl_rtrancl[of TRel]
[PROOF STATE]
proof (prove)
using this:
(symcl (TRel\<^sup>=))\<^sup>+ = (symcl TRel)\<^sup>*
refl (TRel\<^sup>*)

goal (1 subgoal):
 1. refl ((symcl (TRel\<^sup>=))\<^sup>+)
[PROOF STEP]
unfolding sym_def refl_on_def
[PROOF STATE]
proof (prove)
using this:
(symcl (TRel\<^sup>=))\<^sup>+ = (symcl TRel)\<^sup>*
TRel\<^sup>* \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> TRel\<^sup>*)

goal (1 subgoal):
 1. (symcl (TRel\<^sup>=))\<^sup>+ \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> (symcl (TRel\<^sup>=))\<^sup>+)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
refl ((symcl (TRel\<^sup>=))\<^sup>+)

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
refl ((symcl (TRel\<^sup>=))\<^sup>+)

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
[PROOF STEP]
have "sym ((symcl (TRel\<^sup>=))\<^sup>+)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sym ((symcl (TRel\<^sup>=))\<^sup>+)
[PROOF STEP]
using sym_symcl[of "TRel\<^sup>="] sym_trancl[of "symcl (TRel\<^sup>=)"]
[PROOF STATE]
proof (prove)
using this:
sym (symcl (TRel\<^sup>=))
sym (symcl (TRel\<^sup>=)) \<Longrightarrow> sym ((symcl (TRel\<^sup>=))\<^sup>+)

goal (1 subgoal):
 1. sym ((symcl (TRel\<^sup>=))\<^sup>+)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sym ((symcl (TRel\<^sup>=))\<^sup>+)

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
sym ((symcl (TRel\<^sup>=))\<^sup>+)

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
[PROOF STEP]
have "trans ((symcl (TRel\<^sup>=))\<^sup>+)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. trans ((symcl (TRel\<^sup>=))\<^sup>+)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
trans ((symcl (TRel\<^sup>=))\<^sup>+)

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
refl ((symcl (TRel\<^sup>=))\<^sup>+)
sym ((symcl (TRel\<^sup>=))\<^sup>+)
trans ((symcl (TRel\<^sup>=))\<^sup>+)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
refl ((symcl (TRel\<^sup>=))\<^sup>+)
sym ((symcl (TRel\<^sup>=))\<^sup>+)
trans ((symcl (TRel\<^sup>=))\<^sup>+)

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
[PROOF STEP]
using fully_abstract_wrt_equivalences_impl_symcl_source_target_relation_is_preorder[where
             SRel="(symcl (SRel\<^sup>=))\<^sup>+" and TRel="(symcl (TRel\<^sup>=))\<^sup>+"] fullAbs
            refl_symm_closure_is_symm_refl_closure
[PROOF STATE]
proof (prove)
using this:
refl ((symcl (TRel\<^sup>=))\<^sup>+)
sym ((symcl (TRel\<^sup>=))\<^sup>+)
trans ((symcl (TRel\<^sup>=))\<^sup>+)
(\<forall>S1 S2. ((S1, S2) \<in> (symcl (SRel\<^sup>=))\<^sup>+) = ((\<lbrakk>S1\<rbrakk>, \<lbrakk>S2\<rbrakk>) \<in> (symcl (TRel\<^sup>=))\<^sup>+)) \<and> refl ((symcl (TRel\<^sup>=))\<^sup>+) \<and> sym ((symcl (TRel\<^sup>=))\<^sup>+) \<and> trans ((symcl (TRel\<^sup>=))\<^sup>+) \<Longrightarrow> \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
\<forall>S1 S2. ((S1, S2) \<in> (symcl (SRel\<^sup>=))\<^sup>+) = ((\<lbrakk>S1\<rbrakk>, \<lbrakk>S2\<rbrakk>) \<in> (symcl (TRel\<^sup>=))\<^sup>+)
symcl (?Rel\<^sup>=) = (symcl ?Rel)\<^sup>=

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)
[PROOF STEP]
unfolding preorder_on_def
[PROOF STATE]
proof (prove)
using this:
refl ((symcl (TRel\<^sup>=))\<^sup>+)
sym ((symcl (TRel\<^sup>=))\<^sup>+)
trans ((symcl (TRel\<^sup>=))\<^sup>+)
(\<forall>S1 S2. ((S1, S2) \<in> (symcl (SRel\<^sup>=))\<^sup>+) = ((\<lbrakk>S1\<rbrakk>, \<lbrakk>S2\<rbrakk>) \<in> (symcl (TRel\<^sup>=))\<^sup>+)) \<and> refl ((symcl (TRel\<^sup>=))\<^sup>+) \<and> sym ((symcl (TRel\<^sup>=))\<^sup>+) \<and> trans ((symcl (TRel\<^sup>=))\<^sup>+) \<Longrightarrow> \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> refl (symcl Rel) \<and> trans (symcl Rel)
\<forall>S1 S2. ((S1, S2) \<in> (symcl (SRel\<^sup>=))\<^sup>+) = ((\<lbrakk>S1\<rbrakk>, \<lbrakk>S2\<rbrakk>) \<in> (symcl (TRel\<^sup>=))\<^sup>+)
symcl (?Rel\<^sup>=) = (symcl ?Rel)\<^sup>=

goal (1 subgoal):
 1. \<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> refl (symcl Rel) \<and> trans (symcl Rel)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<exists>Rel. (\<forall>S. (SourceTerm S, TargetTerm (\<lbrakk>S\<rbrakk>)) \<in> Rel) \<and> (symcl (SRel\<^sup>=))\<^sup>+ = _Collect (S1, S2) ((SourceTerm S1, SourceTerm S2) \<in> symcl Rel) \<and> (symcl (TRel\<^sup>=))\<^sup>+ = _Collect (T1, T2) ((TargetTerm T1, TargetTerm T2) \<in> symcl Rel) \<and> preorder (symcl Rel)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma length_negGorbit_list : "length (negGorbit_list gs T as) = length gs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (negGorbit_list gs T as) = length gs
[PROOF STEP]
using negGorbit_list_def[of gs T]
[PROOF STATE]
proof (prove)
using this:
negGorbit_list gs T ?as \<equiv> map (\<lambda>g. map ((*\<cdot>) (- g) \<circ> T) ?as) gs

goal (1 subgoal):
 1. length (negGorbit_list gs T as) = length gs
[PROOF STEP]
by simp


[STATEMENT]
lemma transp_ord_option: "transp ord \<Longrightarrow> transp (ord_option ord)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. transp ord \<Longrightarrow> transp (ord_option ord)
[PROOF STEP]
unfolding transp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>x y z. ord x y \<longrightarrow> ord y z \<longrightarrow> ord x z \<Longrightarrow> \<forall>x y z. ord_option ord x y \<longrightarrow> ord_option ord y z \<longrightarrow> ord_option ord x z
[PROOF STEP]
by(blast intro: ord_option_trans)


[STATEMENT]
lemma fixp_mono:
  assumes fg: "fun_ord (\<le>) f g"
  and f: "monotone (\<le>) (\<le>) f"
  and g: "monotone (\<le>) (\<le>) g"
  shows "ccpo_class.fixp f \<le> ccpo_class.fixp g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ccpo_class.fixp f \<le> ccpo_class.fixp g
[PROOF STEP]
unfolding fixp_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> ccpo_class.iterates f \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
proof(rule ccpo_Sup_least)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Complete_Partial_Order.chain (\<le>) (ccpo_class.iterates f)
 2. \<And>x. x \<in> ccpo_class.iterates f \<Longrightarrow> x \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. Complete_Partial_Order.chain (\<le>) (ccpo_class.iterates f)
 2. \<And>x. x \<in> ccpo_class.iterates f \<Longrightarrow> x \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
assume "x \<in> ccpo_class.iterates f"
[PROOF STATE]
proof (state)
this:
x \<in> ccpo_class.iterates f

goal (2 subgoals):
 1. Complete_Partial_Order.chain (\<le>) (ccpo_class.iterates f)
 2. \<And>x. x \<in> ccpo_class.iterates f \<Longrightarrow> x \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
thus "x \<le> \<Squnion>ccpo_class.iterates g"
[PROOF STATE]
proof (prove)
using this:
x \<in> ccpo_class.iterates f

goal (1 subgoal):
 1. x \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
proof induction
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>x. \<lbrakk>x \<in> ccpo_class.iterates f; x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> f x \<le> \<Squnion> ccpo_class.iterates g
 2. \<And>M. \<lbrakk>Complete_Partial_Order.chain (\<le>) M; \<forall>x\<in>M. x \<in> ccpo_class.iterates f \<and> x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> \<Squnion> M \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
case (step x)
[PROOF STATE]
proof (state)
this:
x \<in> ccpo_class.iterates f
x \<le> \<Squnion> ccpo_class.iterates g

goal (2 subgoals):
 1. \<And>x. \<lbrakk>x \<in> ccpo_class.iterates f; x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> f x \<le> \<Squnion> ccpo_class.iterates g
 2. \<And>M. \<lbrakk>Complete_Partial_Order.chain (\<le>) M; \<forall>x\<in>M. x \<in> ccpo_class.iterates f \<and> x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> \<Squnion> M \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
from f step.IH
[PROOF STATE]
proof (chain)
picking this:
monotone (\<le>) (\<le>) f
x \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
have "f x \<le> f (\<Squnion>ccpo_class.iterates g)"
[PROOF STATE]
proof (prove)
using this:
monotone (\<le>) (\<le>) f
x \<le> \<Squnion> ccpo_class.iterates g

goal (1 subgoal):
 1. f x \<le> f (\<Squnion> ccpo_class.iterates g)
[PROOF STEP]
by(rule monotoneD)
[PROOF STATE]
proof (state)
this:
f x \<le> f (\<Squnion> ccpo_class.iterates g)

goal (2 subgoals):
 1. \<And>x. \<lbrakk>x \<in> ccpo_class.iterates f; x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> f x \<le> \<Squnion> ccpo_class.iterates g
 2. \<And>M. \<lbrakk>Complete_Partial_Order.chain (\<le>) M; \<forall>x\<in>M. x \<in> ccpo_class.iterates f \<and> x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> \<Squnion> M \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f x \<le> f (\<Squnion> ccpo_class.iterates g)

goal (2 subgoals):
 1. \<And>x. \<lbrakk>x \<in> ccpo_class.iterates f; x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> f x \<le> \<Squnion> ccpo_class.iterates g
 2. \<And>M. \<lbrakk>Complete_Partial_Order.chain (\<le>) M; \<forall>x\<in>M. x \<in> ccpo_class.iterates f \<and> x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> \<Squnion> M \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
have "\<dots> \<le> g (\<Squnion>ccpo_class.iterates g)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (\<Squnion> ccpo_class.iterates g) \<le> g (\<Squnion> ccpo_class.iterates g)
[PROOF STEP]
using fg
[PROOF STATE]
proof (prove)
using this:
fun_ord (\<le>) f g

goal (1 subgoal):
 1. f (\<Squnion> ccpo_class.iterates g) \<le> g (\<Squnion> ccpo_class.iterates g)
[PROOF STEP]
by(simp add: fun_ord_def)
[PROOF STATE]
proof (state)
this:
f (\<Squnion> ccpo_class.iterates g) \<le> g (\<Squnion> ccpo_class.iterates g)

goal (2 subgoals):
 1. \<And>x. \<lbrakk>x \<in> ccpo_class.iterates f; x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> f x \<le> \<Squnion> ccpo_class.iterates g
 2. \<And>M. \<lbrakk>Complete_Partial_Order.chain (\<le>) M; \<forall>x\<in>M. x \<in> ccpo_class.iterates f \<and> x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> \<Squnion> M \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
f (\<Squnion> ccpo_class.iterates g) \<le> g (\<Squnion> ccpo_class.iterates g)

goal (2 subgoals):
 1. \<And>x. \<lbrakk>x \<in> ccpo_class.iterates f; x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> f x \<le> \<Squnion> ccpo_class.iterates g
 2. \<And>M. \<lbrakk>Complete_Partial_Order.chain (\<le>) M; \<forall>x\<in>M. x \<in> ccpo_class.iterates f \<and> x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> \<Squnion> M \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
have "\<dots> = \<Squnion>ccpo_class.iterates g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g (\<Squnion> ccpo_class.iterates g) = \<Squnion> ccpo_class.iterates g
[PROOF STEP]
by(fold fixp_def fixp_unfold[OF g]) simp
[PROOF STATE]
proof (state)
this:
g (\<Squnion> ccpo_class.iterates g) = \<Squnion> ccpo_class.iterates g

goal (2 subgoals):
 1. \<And>x. \<lbrakk>x \<in> ccpo_class.iterates f; x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> f x \<le> \<Squnion> ccpo_class.iterates g
 2. \<And>M. \<lbrakk>Complete_Partial_Order.chain (\<le>) M; \<forall>x\<in>M. x \<in> ccpo_class.iterates f \<and> x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> \<Squnion> M \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
f x \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
f x \<le> \<Squnion> ccpo_class.iterates g

goal (1 subgoal):
 1. f x \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
f x \<le> \<Squnion> ccpo_class.iterates g

goal (1 subgoal):
 1. \<And>M. \<lbrakk>Complete_Partial_Order.chain (\<le>) M; \<forall>x\<in>M. x \<in> ccpo_class.iterates f \<and> x \<le> \<Squnion> ccpo_class.iterates g\<rbrakk> \<Longrightarrow> \<Squnion> M \<le> \<Squnion> ccpo_class.iterates g
[PROOF STEP]
qed(blast intro: ccpo_Sup_least)
[PROOF STATE]
proof (state)
this:
x \<le> \<Squnion> ccpo_class.iterates g

goal (1 subgoal):
 1. Complete_Partial_Order.chain (\<le>) (ccpo_class.iterates f)
[PROOF STEP]
qed(rule chain_iterates[OF f])


[STATEMENT]
lemma pconj_mono:
  "\<lbrakk> a \<le> b; c \<le> d \<rbrakk> \<Longrightarrow> a .& c \<le> b .& d"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<le> b; c \<le> d\<rbrakk> \<Longrightarrow> a .& c \<le> b .& d
[PROOF STEP]
unfolding pconj_def tminus_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>a \<le> b; c \<le> d\<rbrakk> \<Longrightarrow> max (a + c - 1) 0 \<le> max (b + d - 1) 0
[PROOF STEP]
by(simp)


[STATEMENT]
lemma Pi_pmf_if_set:
  assumes "finite A"
  shows "Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) =
           Pi_pmf {x\<in>A. b x} dflt f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f
[PROOF STEP]
have "Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) =
          Pi_pmf {x\<in>A. b x} dflt (\<lambda>x. if b x then f x else return_pmf dflt)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt (\<lambda>x. if b x then f x else return_pmf dflt)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
finite A

goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt (\<lambda>x. if b x then f x else return_pmf dflt)
[PROOF STEP]
by (intro Pi_pmf_subset') auto
[PROOF STATE]
proof (state)
this:
Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt (\<lambda>x. if b x then f x else return_pmf dflt)

goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt (\<lambda>x. if b x then f x else return_pmf dflt)

goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f
[PROOF STEP]
have "\<dots> = Pi_pmf {x\<in>A. b x} dflt f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Pi_pmf.Pi_pmf {x \<in> A. b x} dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f
[PROOF STEP]
by (intro Pi_pmf_cong) auto
[PROOF STATE]
proof (state)
this:
Pi_pmf.Pi_pmf {x \<in> A. b x} dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f

goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f

goal (1 subgoal):
 1. Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
Pi_pmf.Pi_pmf A dflt (\<lambda>x. if b x then f x else return_pmf dflt) = Pi_pmf.Pi_pmf {x \<in> A. b x} dflt f

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma minimise_states_finite :
  assumes "observable M"
  and     "q \<in> states (minimise M)"
  shows "finite q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite q
[PROOF STEP]
using minimise_states_subset[OF assms] fsm_states_finite[of M]
[PROOF STATE]
proof (prove)
using this:
q \<subseteq> FSM.states M
finite (FSM.states M)

goal (1 subgoal):
 1. finite q
[PROOF STEP]
using finite_subset
[PROOF STATE]
proof (prove)
using this:
q \<subseteq> FSM.states M
finite (FSM.states M)
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A

goal (1 subgoal):
 1. finite q
[PROOF STEP]
by auto


[STATEMENT]
lemma compact_cball[simp]:
  fixes x :: "'a::heine_borel"
  shows "compact (cball x e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. compact (cball x e)
[PROOF STEP]
using compact_eq_bounded_closed bounded_cball closed_cball
[PROOF STATE]
proof (prove)
using this:
compact ?S = (bounded ?S \<and> closed ?S)
bounded (cball ?x ?e)
closed (cball ?x ?e)

goal (1 subgoal):
 1. compact (cball x e)
[PROOF STEP]
by blast


[STATEMENT]
lemma real_cond_exp_less_c:
  assumes [measurable]: "integrable M f"
      and "AE x in M. f x < c"
  shows "AE x in M. real_cond_exp M F f x < c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. real_cond_exp M F f x < c
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. AE x in M. real_cond_exp M F f x < c
[PROOF STEP]
have "AE x in M. real_cond_exp M F f x = -real_cond_exp M F (\<lambda>x. -f x) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. real_cond_exp M F f x = - real_cond_exp M F (\<lambda>x. - f x) x
[PROOF STEP]
using real_cond_exp_cmult[OF \<open>integrable M f\<close>, of "-1"]
[PROOF STATE]
proof (prove)
using this:
AE x in M. real_cond_exp M F (\<lambda>x. - 1 * f x) x = - 1 * real_cond_exp M F f x

goal (1 subgoal):
 1. AE x in M. real_cond_exp M F f x = - real_cond_exp M F (\<lambda>x. - f x) x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
AE x in M. real_cond_exp M F f x = - real_cond_exp M F (\<lambda>x. - f x) x

goal (1 subgoal):
 1. AE x in M. real_cond_exp M F f x < c
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
AE x in M. real_cond_exp M F f x = - real_cond_exp M F (\<lambda>x. - f x) x

goal (1 subgoal):
 1. AE x in M. real_cond_exp M F f x < c
[PROOF STEP]
have "AE x in M. real_cond_exp M F (\<lambda>x. -f x) x > -c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. AE x in M. - c < real_cond_exp M F (\<lambda>x. - f x) x
[PROOF STEP]
apply (rule real_cond_exp_gr_c)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. integrable M (\<lambda>x. - f x)
 2. AE x in M. - c < - f x
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
integrable M f
AE x in M. f x < c

goal (2 subgoals):
 1. integrable M (\<lambda>x. - f x)
 2. AE x in M. - c < - f x
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
AE x in M. - c < real_cond_exp M F (\<lambda>x. - f x) x

goal (1 subgoal):
 1. AE x in M. real_cond_exp M F f x < c
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
AE x in M. real_cond_exp M F f x = - real_cond_exp M F (\<lambda>x. - f x) x
AE x in M. - c < real_cond_exp M F (\<lambda>x. - f x) x
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
AE x in M. real_cond_exp M F f x = - real_cond_exp M F (\<lambda>x. - f x) x
AE x in M. - c < real_cond_exp M F (\<lambda>x. - f x) x

goal (1 subgoal):
 1. AE x in M. real_cond_exp M F f x < c
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
AE x in M. real_cond_exp M F f x < c

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma foldl_funion_fsingleton : "foldl (|\<union>|) x xs = ffUnion (fset_of_list (x#xs))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. foldl (|\<union>|) x xs = ffUnion (fset_of_list (x # xs))
[PROOF STEP]
by (induction xs rule: rev_induct; auto)


[STATEMENT]
lemma bij_betw_implies_inj_on_and_card_eq:
  assumes "finite B"
  assumes "f \<in> A \<rightarrow>\<^sub>E B"
  shows "bij_betw f A B \<longleftrightarrow> inj_on f A \<and> card A = card B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw f A B = (inj_on f A \<and> card A = card B)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. bij_betw f A B \<Longrightarrow> inj_on f A \<and> card A = card B
 2. inj_on f A \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
assume "bij_betw f A B"
[PROOF STATE]
proof (state)
this:
bij_betw f A B

goal (2 subgoals):
 1. bij_betw f A B \<Longrightarrow> inj_on f A \<and> card A = card B
 2. inj_on f A \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
bij_betw f A B
[PROOF STEP]
show "inj_on f A \<and> card A = card B"
[PROOF STATE]
proof (prove)
using this:
bij_betw f A B

goal (1 subgoal):
 1. inj_on f A \<and> card A = card B
[PROOF STEP]
by (simp add: bij_betw_imp_inj_on bij_betw_same_card)
[PROOF STATE]
proof (state)
this:
inj_on f A \<and> card A = card B

goal (1 subgoal):
 1. inj_on f A \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. inj_on f A \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
assume "inj_on f A \<and> card A = card B"
[PROOF STATE]
proof (state)
this:
inj_on f A \<and> card A = card B

goal (1 subgoal):
 1. inj_on f A \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
from this
[PROOF STATE]
proof (chain)
picking this:
inj_on f A \<and> card A = card B
[PROOF STEP]
have "inj_on f A" and "card A = card B"
[PROOF STATE]
proof (prove)
using this:
inj_on f A \<and> card A = card B

goal (1 subgoal):
 1. inj_on f A &&& card A = card B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
inj_on f A
card A = card B

goal (1 subgoal):
 1. inj_on f A \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
from \<open>f \<in> A \<rightarrow>\<^sub>E B\<close>
[PROOF STATE]
proof (chain)
picking this:
f \<in> A \<rightarrow>\<^sub>E B
[PROOF STEP]
have "f ` A \<subseteq> B"
[PROOF STATE]
proof (prove)
using this:
f \<in> A \<rightarrow>\<^sub>E B

goal (1 subgoal):
 1. f ` A \<subseteq> B
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
f ` A \<subseteq> B

goal (1 subgoal):
 1. inj_on f A \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
from \<open>inj_on f A\<close>
[PROOF STATE]
proof (chain)
picking this:
inj_on f A
[PROOF STEP]
have "card (f ` A) = card A"
[PROOF STATE]
proof (prove)
using this:
inj_on f A

goal (1 subgoal):
 1. card (f ` A) = card A
[PROOF STEP]
by (simp add: card_image)
[PROOF STATE]
proof (state)
this:
card (f ` A) = card A

goal (1 subgoal):
 1. inj_on f A \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
from \<open>f ` A \<subseteq> B\<close> \<open>card A = card B\<close> this
[PROOF STATE]
proof (chain)
picking this:
f ` A \<subseteq> B
card A = card B
card (f ` A) = card A
[PROOF STEP]
have "f ` A = B"
[PROOF STATE]
proof (prove)
using this:
f ` A \<subseteq> B
card A = card B
card (f ` A) = card A

goal (1 subgoal):
 1. f ` A = B
[PROOF STEP]
by (simp add: \<open>finite B\<close> card_subset_eq)
[PROOF STATE]
proof (state)
this:
f ` A = B

goal (1 subgoal):
 1. inj_on f A \<and> card A = card B \<Longrightarrow> bij_betw f A B
[PROOF STEP]
from \<open>inj_on f A\<close> this
[PROOF STATE]
proof (chain)
picking this:
inj_on f A
f ` A = B
[PROOF STEP]
show "bij_betw f A B"
[PROOF STATE]
proof (prove)
using this:
inj_on f A
f ` A = B

goal (1 subgoal):
 1. bij_betw f A B
[PROOF STEP]
by (rule bij_betw_imageI)
[PROOF STATE]
proof (state)
this:
bij_betw f A B

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma rev_induct2[consumes 1]:
  fixes xs :: "'a list" and ys :: "'a list" and P :: "'a list \<Rightarrow> 'a list \<Rightarrow> bool"
  assumes
  "length xs = length ys" and "P [] []" and
  "\<And>x xs y ys. \<lbrakk> length xs = length ys; P xs ys \<rbrakk> \<Longrightarrow> P (xs @ [x]) (ys @ [y])"
  shows "P xs ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P xs ys
[PROOF STEP]
proof (simplesubst rev_rev_ident[symmetric])
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. P xs (rev (rev ys))
[PROOF STEP]
from assms(1)
[PROOF STATE]
proof (chain)
picking this:
length xs = length ys
[PROOF STEP]
have lrev: "length (rev xs) = length (rev ys)"
[PROOF STATE]
proof (prove)
using this:
length xs = length ys

goal (1 subgoal):
 1. length (rev xs) = length (rev ys)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
length (rev xs) = length (rev ys)

goal (1 subgoal):
 1. P xs (rev (rev ys))
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
length xs = length ys
P [] []
\<lbrakk>length ?xs = length ?ys; P ?xs ?ys\<rbrakk> \<Longrightarrow> P (?xs @ [?x]) (?ys @ [?y])
[PROOF STEP]
have "P (rev (rev xs))(rev (rev ys))"
[PROOF STATE]
proof (prove)
using this:
length xs = length ys
P [] []
\<lbrakk>length ?xs = length ?ys; P ?xs ?ys\<rbrakk> \<Longrightarrow> P (?xs @ [?x]) (?ys @ [?y])

goal (1 subgoal):
 1. P (rev (rev xs)) (rev (rev ys))
[PROOF STEP]
by (induct rule: list_induct2[OF lrev], simp_all)
[PROOF STATE]
proof (state)
this:
P (rev (rev xs)) (rev (rev ys))

goal (1 subgoal):
 1. P xs (rev (rev ys))
[PROOF STEP]
thus "P xs (rev (rev ys))"
[PROOF STATE]
proof (prove)
using this:
P (rev (rev xs)) (rev (rev ys))

goal (1 subgoal):
 1. P xs (rev (rev ys))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P xs (rev (rev ys))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma (in group) normal_restrict_supergroup:
  assumes SsubG:"subgroup S G"
  assumes Nnormal:"N \<lhd> G"
  assumes "N \<subseteq> S"
  shows "N \<lhd> (G\<lparr>carrier := S\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N \<lhd> G\<lparr>carrier := S\<rparr>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. N \<lhd> G\<lparr>carrier := S\<rparr>
[PROOF STEP]
interpret Sgrp: group "G\<lparr>carrier := S\<rparr>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Group.group (G\<lparr>carrier := S\<rparr>)
[PROOF STEP]
using SsubG
[PROOF STATE]
proof (prove)
using this:
subgroup S G

goal (1 subgoal):
 1. Group.group (G\<lparr>carrier := S\<rparr>)
[PROOF STEP]
by (rule subgroup_imp_group)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. N \<lhd> G\<lparr>carrier := S\<rparr>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. N \<lhd> G\<lparr>carrier := S\<rparr>
[PROOF STEP]
proof(rule Sgrp.normalI)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. subgroup N (G\<lparr>carrier := S\<rparr>)
 2. \<forall>x\<in>carrier (G\<lparr>carrier := S\<rparr>). N #>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> x = x <#\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> N
[PROOF STEP]
show "subgroup N (G\<lparr>carrier := S\<rparr>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. subgroup N (G\<lparr>carrier := S\<rparr>)
[PROOF STEP]
using assms is_group
[PROOF STATE]
proof (prove)
using this:
subgroup S G
N \<lhd> G
N \<subseteq> S
Group.group G

goal (1 subgoal):
 1. subgroup N (G\<lparr>carrier := S\<rparr>)
[PROOF STEP]
by (metis subgroup.subgroup_of_subset normal_inv_iff)
[PROOF STATE]
proof (state)
this:
subgroup N (G\<lparr>carrier := S\<rparr>)

goal (1 subgoal):
 1. \<forall>x\<in>carrier (G\<lparr>carrier := S\<rparr>). N #>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> x = x <#\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> N
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<forall>x\<in>carrier (G\<lparr>carrier := S\<rparr>). N #>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> x = x <#\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> N
[PROOF STEP]
from SsubG
[PROOF STATE]
proof (chain)
picking this:
subgroup S G
[PROOF STEP]
have "S \<subseteq> carrier G"
[PROOF STATE]
proof (prove)
using this:
subgroup S G

goal (1 subgoal):
 1. S \<subseteq> carrier G
[PROOF STEP]
by (rule subgroup.subset)
[PROOF STATE]
proof (state)
this:
S \<subseteq> carrier G

goal (1 subgoal):
 1. \<forall>x\<in>carrier (G\<lparr>carrier := S\<rparr>). N #>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> x = x <#\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> N
[PROOF STEP]
thus "\<forall>x\<in>carrier (G\<lparr>carrier := S\<rparr>). N #>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> x = x <#\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> N"
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> carrier G

goal (1 subgoal):
 1. \<forall>x\<in>carrier (G\<lparr>carrier := S\<rparr>). N #>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> x = x <#\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> N
[PROOF STEP]
using Nnormal
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> carrier G
N \<lhd> G

goal (1 subgoal):
 1. \<forall>x\<in>carrier (G\<lparr>carrier := S\<rparr>). N #>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> x = x <#\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> N
[PROOF STEP]
unfolding normal_def normal_axioms_def l_coset_def r_coset_def
[PROOF STATE]
proof (prove)
using this:
S \<subseteq> carrier G
subgroup N G \<and> Group.group G \<and> (\<forall>x\<in>carrier G. (\<Union>h\<in>N. {h \<otimes> x}) = (\<Union>h\<in>N. {x \<otimes> h}))

goal (1 subgoal):
 1. \<forall>x\<in>carrier (G\<lparr>carrier := S\<rparr>). (\<Union>h\<in>N. {h \<otimes>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> x}) = (\<Union>h\<in>N. {x \<otimes>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> h})
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<forall>x\<in>carrier (G\<lparr>carrier := S\<rparr>). N #>\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> x = x <#\<^bsub>G\<lparr>carrier := S\<rparr>\<^esub> N

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
N \<lhd> G\<lparr>carrier := S\<rparr>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma arcs_graph_G_ge_2vertsT:
  assumes "graph G"
  shows "card (arcs G) \<ge> 2 * (card (verts T) - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
let ?compl = "{e2\<in> arcs G. (\<exists>e1 \<in> arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2)}"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
interpret graph G
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. graph G
[PROOF STEP]
by (rule assms)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
have "\<forall>e1 \<in> arcs T. \<exists>e2 \<in> arcs G. head G e2 = tail G e1 \<and> head G e1 = tail G e2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>e1\<in>arcs T. \<exists>e2\<in>arcs G. head G e2 = tail G e1 \<and> head G e1 = tail G e2
[PROOF STEP]
using reverse_arc_in_G_only assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>graph G; ?e1.0 \<in> arcs T\<rbrakk> \<Longrightarrow> \<exists>e2\<in>arcs G. head G e2 = tail G ?e1.0 \<and> head G ?e1.0 = tail G e2 \<and> e2 \<notin> arcs T
graph G

goal (1 subgoal):
 1. \<forall>e1\<in>arcs T. \<exists>e2\<in>arcs G. head G e2 = tail G e1 \<and> head G e1 = tail G e2
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<forall>e1\<in>arcs T. \<exists>e2\<in>arcs G. head G e2 = tail G e1 \<and> head G e1 = tail G e2

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
have fin1: "finite ?compl"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2}

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
have "?compl \<inter> arcs T = {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<inter> arcs T = {}
[PROOF STEP]
using reverse_arc_notin_T
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?e1.0 \<in> arcs T; head G ?e2.0 = tail G ?e1.0; head G ?e1.0 = tail G ?e2.0\<rbrakk> \<Longrightarrow> ?e2.0 \<notin> arcs T

goal (1 subgoal):
 1. {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<inter> arcs T = {}
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<inter> arcs T = {}

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
{e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<inter> arcs T = {}
[PROOF STEP]
have "card (?compl \<union> arcs T) = card ?compl + card (arcs T)"
[PROOF STATE]
proof (prove)
using this:
{e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<inter> arcs T = {}

goal (1 subgoal):
 1. card ({e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T) = card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T)
[PROOF STEP]
using card_Un_disjoint[OF fin1 fin_arcs_T']
[PROOF STATE]
proof (prove)
using this:
{e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<inter> arcs T = {}
\<lbrakk>graph G; {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<inter> arcs T = {}\<rbrakk> \<Longrightarrow> card ({e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T) = card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T)

goal (1 subgoal):
 1. card ({e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T) = card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
card ({e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T) = card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T)

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card ({e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T) = card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T)

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
have "?compl \<union> arcs T \<subseteq> arcs G"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T \<subseteq> arcs G
[PROOF STEP]
using sub_G
[PROOF STATE]
proof (prove)
using this:
Digraph_Component.subgraph T G

goal (1 subgoal):
 1. {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T \<subseteq> arcs G
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
{e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T \<subseteq> arcs G

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
{e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T \<subseteq> arcs G

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
have "finite (arcs G)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (arcs G)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
finite (arcs G)

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
card ({e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T) = card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T)
{e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T \<subseteq> arcs G
finite (arcs G)
[PROOF STEP]
have "card ?compl + card (arcs T) \<le> card (arcs G)"
[PROOF STATE]
proof (prove)
using this:
card ({e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T) = card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T)
{e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T \<subseteq> arcs G
finite (arcs G)

goal (1 subgoal):
 1. card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T) \<le> card (arcs G)
[PROOF STEP]
using card_mono[of "arcs G" "?compl \<union> arcs T"]
[PROOF STATE]
proof (prove)
using this:
card ({e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T) = card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T)
{e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T \<subseteq> arcs G
finite (arcs G)
\<lbrakk>finite (arcs G); {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T \<subseteq> arcs G\<rbrakk> \<Longrightarrow> card ({e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} \<union> arcs T) \<le> card (arcs G)

goal (1 subgoal):
 1. card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T) \<le> card (arcs G)
[PROOF STEP]
by presburger
[PROOF STATE]
proof (state)
this:
card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T) \<le> card (arcs G)

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T) \<le> card (arcs G)

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
have "card (arcs T) = (card (verts T) - 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (arcs T) = card (verts T) - 1
[PROOF STEP]
using Suc_card_arcs_eq_card_verts assms
[PROOF STATE]
proof (prove)
using this:
finite (verts T) \<Longrightarrow> Suc (card (arcs T)) = card (verts T)
graph G

goal (1 subgoal):
 1. card (arcs T) = card (verts T) - 1
[PROOF STEP]
by (simp add: fin_verts_T')
[PROOF STATE]
proof (state)
this:
card (arcs T) = card (verts T) - 1

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T) \<le> card (arcs G)
card (arcs T) = card (verts T) - 1
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T) \<le> card (arcs G)
card (arcs T) = card (verts T) - 1

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
using T_arcs_compl_card_eq
[PROOF STATE]
proof (prove)
using this:
card {e2 \<in> arcs G. \<exists>e1\<in>arcs T. head G e2 = tail G e1 \<and> head G e1 = tail G e2} + card (arcs T) \<le> card (arcs G)
card (arcs T) = card (verts T) - 1
\<lbrakk>graph G; ?es \<subseteq> arcs T\<rbrakk> \<Longrightarrow> card {e2 \<in> arcs G. \<exists>e1\<in>?es. head G e2 = tail G e1 \<and> head G e1 = tail G e2} = card ?es

goal (1 subgoal):
 1. 2 * (card (verts T) - 1) \<le> card (arcs G)
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
2 * (card (verts T) - 1) \<le> card (arcs G)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma lipschitz_on_compose2:
  "(D * C)-lipschitz_on U (\<lambda>x. g (f x))"
  if "C-lipschitz_on U f" "D-lipschitz_on (f`U) g"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (D * C)-lipschitz_on U (\<lambda>x. g (f x))
[PROOF STEP]
using lipschitz_on_compose[OF that]
[PROOF STATE]
proof (prove)
using this:
(D * C)-lipschitz_on U (g \<circ> f)

goal (1 subgoal):
 1. (D * C)-lipschitz_on U (\<lambda>x. g (f x))
[PROOF STEP]
by (simp add: o_def)


[STATEMENT]
lemma pow_mono_one: assumes a: "a \<ge> (1 :: 'a :: ordered_semiring_1)"
  shows "a ^ n \<ge> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<le> a ^ n
[PROOF STEP]
proof (induct n)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (1::'a) \<le> a ^ 0
 2. \<And>n. (1::'a) \<le> a ^ n \<Longrightarrow> (1::'a) \<le> a ^ Suc n
[PROOF STEP]
case (Suc n)
[PROOF STATE]
proof (state)
this:
(1::'a) \<le> a ^ n

goal (2 subgoals):
 1. (1::'a) \<le> a ^ 0
 2. \<And>n. (1::'a) \<le> a ^ n \<Longrightarrow> (1::'a) \<le> a ^ Suc n
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<le> a ^ Suc n
[PROOF STEP]
unfolding power_Suc
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<le> a * a ^ n
[PROOF STEP]
using ge_trans[OF times_right_mono[OF ge_trans[OF a one_ge_zero] Suc], of 1]
    a
[PROOF STATE]
proof (prove)
using this:
(1::'a) \<le> a * (1::'a) \<Longrightarrow> (1::'a) \<le> a * a ^ n
(1::'a) \<le> a

goal (1 subgoal):
 1. (1::'a) \<le> a * a ^ n
[PROOF STEP]
by (auto simp: field_simps)
[PROOF STATE]
proof (state)
this:
(1::'a) \<le> a ^ Suc n

goal (1 subgoal):
 1. (1::'a) \<le> a ^ 0
[PROOF STEP]
qed (auto simp: ge_refl)


[STATEMENT]
lemma vec_inv_closed[simp]: "v \<in> carrier_vec n \<Longrightarrow> vec_inv v \<in> carrier_vec n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<in> carrier_vec n \<Longrightarrow> vec_inv v \<in> carrier_vec n
[PROOF STEP]
unfolding vec_inv_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. v \<in> carrier_vec n \<Longrightarrow> (1::'a) / (v \<bullet>c v) \<cdot>\<^sub>v conjugate v \<in> carrier_vec n
[PROOF STEP]
by auto


[STATEMENT]
lemma domainOfGraph:
  "runiq(graph X f) & Domain(graph X f)=X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. runiq (graph X f) \<and> Domain (graph X f) = X
[PROOF STEP]
unfolding graph_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. runiq {(x, f x) |x. x \<in> X} \<and> Domain {(x, f x) |x. x \<in> X} = X
[PROOF STEP]
using rightUniqueRestrictedGraph
[PROOF STATE]
proof (prove)
using this:
runiq {(x, ?f x) |x. ?P x}

goal (1 subgoal):
 1. runiq {(x, f x) |x. x \<in> X} \<and> Domain {(x, f x) |x. x \<in> X} = X
[PROOF STEP]
by fast


[STATEMENT]
lemma gcd_mult_right_right_cancel:
  "gcd a (b * c) = gcd a b" if "coprime a c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcd a (b * c) = gcd a b
[PROOF STEP]
using that gcd_mult_right_left_cancel [of a c b]
[PROOF STATE]
proof (prove)
using this:
coprime a c
coprime a c \<Longrightarrow> gcd a (c * b) = gcd a b

goal (1 subgoal):
 1. gcd a (b * c) = gcd a b
[PROOF STEP]
by (simp add: ac_simps)


[STATEMENT]
lemma absolutely_integrable_component_lbound:
  fixes f :: "'a :: euclidean_space \<Rightarrow> 'b :: euclidean_space"
  assumes f: "f absolutely_integrable_on A" and g: "g integrable_on A"
      and comp: "\<And>x b. \<lbrakk>x \<in> A; b \<in> Basis\<rbrakk> \<Longrightarrow> f x \<bullet> b \<le> g x \<bullet> b"
  shows "g absolutely_integrable_on A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g absolutely_integrable_on A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. g absolutely_integrable_on A
[PROOF STEP]
have "(\<lambda>x. f x + (g x - f x)) absolutely_integrable_on A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. f x + (g x - f x)) absolutely_integrable_on A
[PROOF STEP]
proof (rule set_integral_add [OF f nonnegative_absolutely_integrable])
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. (\<lambda>x. g x - f x) integrable_on A
 2. \<And>x b. \<lbrakk>x \<in> A; b \<in> Basis\<rbrakk> \<Longrightarrow> 0 \<le> (g x - f x) \<bullet> b
[PROOF STEP]
show "(\<lambda>x. g x - f x) integrable_on A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>x. g x - f x) integrable_on A
[PROOF STEP]
using Henstock_Kurzweil_Integration.integrable_diff absolutely_integrable_on_def f g
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?f integrable_on ?S; ?g integrable_on ?S\<rbrakk> \<Longrightarrow> (\<lambda>x. ?f x - ?g x) integrable_on ?S
(?f absolutely_integrable_on ?S) = (?f integrable_on ?S \<and> (\<lambda>x. norm (?f x)) integrable_on ?S)
f absolutely_integrable_on A
g integrable_on A

goal (1 subgoal):
 1. (\<lambda>x. g x - f x) integrable_on A
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<lambda>x. g x - f x) integrable_on A

goal (1 subgoal):
 1. \<And>x b. \<lbrakk>x \<in> A; b \<in> Basis\<rbrakk> \<Longrightarrow> 0 \<le> (g x - f x) \<bullet> b
[PROOF STEP]
qed (simp add: comp inner_diff_left)
[PROOF STATE]
proof (state)
this:
(\<lambda>x. f x + (g x - f x)) absolutely_integrable_on A

goal (1 subgoal):
 1. g absolutely_integrable_on A
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>x. f x + (g x - f x)) absolutely_integrable_on A
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. f x + (g x - f x)) absolutely_integrable_on A

goal (1 subgoal):
 1. g absolutely_integrable_on A
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
g absolutely_integrable_on A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma beukers_aux_ln_conv_integral:
  fixes x y :: real
  assumes xy: "x \<in> {0<..<1}" "y \<in> {0<..<1}"
  shows "-ln (x*y) / (1-x*y) = (LBINT z=0..1. 1 / (1-(1-x*y)*z))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
have "x * y < 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * y < 1
[PROOF STEP]
using mult_strict_mono[of x 1 y 1] xy
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>x < 1; y < 1; 0 < 1; 0 \<le> y\<rbrakk> \<Longrightarrow> x * y < 1 * 1
x \<in> {0<..<1}
y \<in> {0<..<1}

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

goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
have less: "(1 - x * y) * u < 1" if u: "u \<in> {0..1}" for u
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1 - x * y) * u < 1
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (1 - x * y) * u < 1
[PROOF STEP]
from u \<open>x * y < 1\<close>
[PROOF STATE]
proof (chain)
picking this:
u \<in> {0..1}
x * y < 1
[PROOF STEP]
have "(1 - x * y) * u \<le> (1 - x * y) * 1"
[PROOF STATE]
proof (prove)
using this:
u \<in> {0..1}
x * y < 1

goal (1 subgoal):
 1. (1 - x * y) * u \<le> (1 - x * y) * 1
[PROOF STEP]
by (intro mult_left_mono) auto
[PROOF STATE]
proof (state)
this:
(1 - x * y) * u \<le> (1 - x * y) * 1

goal (1 subgoal):
 1. (1 - x * y) * u < 1
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1 - x * y) * u \<le> (1 - x * y) * 1

goal (1 subgoal):
 1. (1 - x * y) * u < 1
[PROOF STEP]
have "\<dots> < 1 * 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1 - x * y) * 1 < 1 * 1
[PROOF STEP]
using xy
[PROOF STATE]
proof (prove)
using this:
x \<in> {0<..<1}
y \<in> {0<..<1}

goal (1 subgoal):
 1. (1 - x * y) * 1 < 1 * 1
[PROOF STEP]
by (intro mult_strict_right_mono) auto
[PROOF STATE]
proof (state)
this:
(1 - x * y) * 1 < 1 * 1

goal (1 subgoal):
 1. (1 - x * y) * u < 1
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(1 - x * y) * u < 1 * 1
[PROOF STEP]
show "(1 - x * y) * u < 1"
[PROOF STATE]
proof (prove)
using this:
(1 - x * y) * u < 1 * 1

goal (1 subgoal):
 1. (1 - x * y) * u < 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(1 - x * y) * u < 1

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?u \<in> {0..1} \<Longrightarrow> (1 - x * y) * ?u < 1

goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
have neq: "(1 - x * y) * u \<noteq> 1" if "u \<in> {0..1}" for u
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1 - x * y) * u \<noteq> 1
[PROOF STEP]
using less[of u] that
[PROOF STATE]
proof (prove)
using this:
u \<in> {0..1} \<Longrightarrow> (1 - x * y) * u < 1
u \<in> {0..1}

goal (1 subgoal):
 1. (1 - x * y) * u \<noteq> 1
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
?u \<in> {0..1} \<Longrightarrow> (1 - x * y) * ?u \<noteq> 1

goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
let ?F = "\<lambda>z. ln (1-(1-x*y)*z)/(x*y-1)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
have "(LBINT z=ereal 0..ereal 1. 1 / (1-(1-x*y)*z)) = ?F 1 - ?F 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. LBINT z=ereal 0..ereal 1. 1 / (1 - (1 - x * y) * z) = ln (1 - (1 - x * y) * 1) / (x * y - 1) - ln (1 - (1 - x * y) * 0) / (x * y - 1)
[PROOF STEP]
proof (rule interval_integral_FTC_finite, goal_cases cont deriv)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. continuous_on {min 0 1..max 0 1} (\<lambda>xa. 1 / (1 - (1 - x * y) * xa))
 2. \<And>z. \<lbrakk>min 0 1 \<le> z; z \<le> max 0 1\<rbrakk> \<Longrightarrow> ((\<lambda>a. ln (1 - (1 - x * y) * a) / (x * y - 1)) has_vector_derivative 1 / (1 - (1 - x * y) * z)) (at z within {min 0 1..max 0 1})
[PROOF STEP]
case cont
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. continuous_on {min 0 1..max 0 1} (\<lambda>xa. 1 / (1 - (1 - x * y) * xa))
 2. \<And>z. \<lbrakk>min 0 1 \<le> z; z \<le> max 0 1\<rbrakk> \<Longrightarrow> ((\<lambda>a. ln (1 - (1 - x * y) * a) / (x * y - 1)) has_vector_derivative 1 / (1 - (1 - x * y) * z)) (at z within {min 0 1..max 0 1})
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_on {min 0 1..max 0 1} (\<lambda>xa. 1 / (1 - (1 - x * y) * xa))
[PROOF STEP]
using neq
[PROOF STATE]
proof (prove)
using this:
?u \<in> {0..1} \<Longrightarrow> (1 - x * y) * ?u \<noteq> 1

goal (1 subgoal):
 1. continuous_on {min 0 1..max 0 1} (\<lambda>xa. 1 / (1 - (1 - x * y) * xa))
[PROOF STEP]
by (intro continuous_intros) auto
[PROOF STATE]
proof (state)
this:
continuous_on {min 0 1..max 0 1} (\<lambda>xa. 1 / (1 - (1 - x * y) * xa))

goal (1 subgoal):
 1. \<And>z. \<lbrakk>min 0 1 \<le> z; z \<le> max 0 1\<rbrakk> \<Longrightarrow> ((\<lambda>a. ln (1 - (1 - x * y) * a) / (x * y - 1)) has_vector_derivative 1 / (1 - (1 - x * y) * z)) (at z within {min 0 1..max 0 1})
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>z. \<lbrakk>min 0 1 \<le> z; z \<le> max 0 1\<rbrakk> \<Longrightarrow> ((\<lambda>a. ln (1 - (1 - x * y) * a) / (x * y - 1)) has_vector_derivative 1 / (1 - (1 - x * y) * z)) (at z within {min 0 1..max 0 1})
[PROOF STEP]
case (deriv z)
[PROOF STATE]
proof (state)
this:
min 0 1 \<le> z
z \<le> max 0 1

goal (1 subgoal):
 1. \<And>z. \<lbrakk>min 0 1 \<le> z; z \<le> max 0 1\<rbrakk> \<Longrightarrow> ((\<lambda>a. ln (1 - (1 - x * y) * a) / (x * y - 1)) has_vector_derivative 1 / (1 - (1 - x * y) * z)) (at z within {min 0 1..max 0 1})
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>a. ln (1 - (1 - x * y) * a) / (x * y - 1)) has_vector_derivative 1 / (1 - (1 - x * y) * z)) (at z within {min 0 1..max 0 1})
[PROOF STEP]
unfolding has_real_derivative_iff_has_vector_derivative [symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((\<lambda>a. ln (1 - (1 - x * y) * a) / (x * y - 1)) has_real_derivative 1 / (1 - (1 - x * y) * z)) (at z within {min 0 1..max 0 1})
[PROOF STEP]
by (insert less[of z] xy \<open>x * y < 1\<close> deriv)
         (rule derivative_eq_intros refl | simp)+
[PROOF STATE]
proof (state)
this:
((\<lambda>a. ln (1 - (1 - x * y) * a) / (x * y - 1)) has_vector_derivative 1 / (1 - (1 - x * y) * z)) (at z within {min 0 1..max 0 1})

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
LBINT z=ereal 0..ereal 1. 1 / (1 - (1 - x * y) * z) = ln (1 - (1 - x * y) * 1) / (x * y - 1) - ln (1 - (1 - x * y) * 0) / (x * y - 1)

goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
LBINT z=ereal 0..ereal 1. 1 / (1 - (1 - x * y) * z) = ln (1 - (1 - x * y) * 1) / (x * y - 1) - ln (1 - (1 - x * y) * 0) / (x * y - 1)

goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
have "\<dots> = -ln (x*y) / (1-x*y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ln (1 - (1 - x * y) * 1) / (x * y - 1) - ln (1 - (1 - x * y) * 0) / (x * y - 1) = - ln (x * y) / (1 - x * y)
[PROOF STEP]
using \<open>x * y < 1\<close>
[PROOF STATE]
proof (prove)
using this:
x * y < 1

goal (1 subgoal):
 1. ln (1 - (1 - x * y) * 1) / (x * y - 1) - ln (1 - (1 - x * y) * 0) / (x * y - 1) = - ln (x * y) / (1 - x * y)
[PROOF STEP]
by (simp add: field_simps)
[PROOF STATE]
proof (state)
this:
ln (1 - (1 - x * y) * 1) / (x * y - 1) - ln (1 - (1 - x * y) * 0) / (x * y - 1) = - ln (x * y) / (1 - x * y)

goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
LBINT z=ereal 0..ereal 1. 1 / (1 - (1 - x * y) * z) = - ln (x * y) / (1 - x * y)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
LBINT z=ereal 0..ereal 1. 1 / (1 - (1 - x * y) * z) = - ln (x * y) / (1 - x * y)

goal (1 subgoal):
 1. - ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)
[PROOF STEP]
by (simp add: zero_ereal_def one_ereal_def)
[PROOF STATE]
proof (state)
this:
- ln (x * y) / (1 - x * y) = LBINT z=0..1. 1 / (1 - (1 - x * y) * z)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
theorem dual_bottom [intro?]: "dual \<bottom> = \<top>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. dual \<bottom> = \<top>
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. dual \<bottom> = \<top>
[PROOF STEP]
have "\<top> = dual \<bottom>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<top> = dual \<bottom>
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. a \<sqsubseteq> dual \<bottom>
[PROOF STEP]
fix a'
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a. a \<sqsubseteq> dual \<bottom>
[PROOF STEP]
have "\<bottom> \<sqsubseteq> undual a'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bottom> \<sqsubseteq> undual a'
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
\<bottom> \<sqsubseteq> undual a'

goal (1 subgoal):
 1. \<And>a. a \<sqsubseteq> dual \<bottom>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<bottom> \<sqsubseteq> undual a'
[PROOF STEP]
have "dual (undual a') \<sqsubseteq> dual \<bottom>"
[PROOF STATE]
proof (prove)
using this:
\<bottom> \<sqsubseteq> undual a'

goal (1 subgoal):
 1. dual (undual a') \<sqsubseteq> dual \<bottom>
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
dual (undual a') \<sqsubseteq> dual \<bottom>

goal (1 subgoal):
 1. \<And>a. a \<sqsubseteq> dual \<bottom>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
dual (undual a') \<sqsubseteq> dual \<bottom>
[PROOF STEP]
show "a' \<sqsubseteq> dual \<bottom>"
[PROOF STATE]
proof (prove)
using this:
dual (undual a') \<sqsubseteq> dual \<bottom>

goal (1 subgoal):
 1. a' \<sqsubseteq> dual \<bottom>
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
a' \<sqsubseteq> dual \<bottom>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<top> = dual \<bottom>

goal (1 subgoal):
 1. dual \<bottom> = \<top>
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<top> = dual \<bottom>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<top> = dual \<bottom>

goal (1 subgoal):
 1. dual \<bottom> = \<top>
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
dual \<bottom> = \<top>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma has_sum_cmult_right:
  fixes f :: "'a \<Rightarrow> 'b :: {topological_semigroup_mult, semiring_0}"
  assumes \<open>has_sum f A a\<close>
  shows "has_sum (\<lambda>x. c * f x) A (c * a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. has_sum (\<lambda>x. c * f x) A (c * a)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. has_sum (\<lambda>x. c * f x) A (c * a)
[PROOF STEP]
from assms
[PROOF STATE]
proof (chain)
picking this:
has_sum f A a
[PROOF STEP]
have \<open>(sum f \<longlongrightarrow> a) (finite_subsets_at_top A)\<close>
[PROOF STATE]
proof (prove)
using this:
has_sum f A a

goal (1 subgoal):
 1. (sum f \<longlongrightarrow> a) (finite_subsets_at_top A)
[PROOF STEP]
using has_sum_def
[PROOF STATE]
proof (prove)
using this:
has_sum f A a
has_sum ?f ?A ?x = (sum ?f \<longlongrightarrow> ?x) (finite_subsets_at_top ?A)

goal (1 subgoal):
 1. (sum f \<longlongrightarrow> a) (finite_subsets_at_top A)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(sum f \<longlongrightarrow> a) (finite_subsets_at_top A)

goal (1 subgoal):
 1. has_sum (\<lambda>x. c * f x) A (c * a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(sum f \<longlongrightarrow> a) (finite_subsets_at_top A)
[PROOF STEP]
have \<open>((\<lambda>F. c * sum f F) \<longlongrightarrow> c * a) (finite_subsets_at_top A)\<close>
[PROOF STATE]
proof (prove)
using this:
(sum f \<longlongrightarrow> a) (finite_subsets_at_top A)

goal (1 subgoal):
 1. ((\<lambda>F. c * sum f F) \<longlongrightarrow> c * a) (finite_subsets_at_top A)
[PROOF STEP]
by (simp add: tendsto_mult_left)
[PROOF STATE]
proof (state)
this:
((\<lambda>F. c * sum f F) \<longlongrightarrow> c * a) (finite_subsets_at_top A)

goal (1 subgoal):
 1. has_sum (\<lambda>x. c * f x) A (c * a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
((\<lambda>F. c * sum f F) \<longlongrightarrow> c * a) (finite_subsets_at_top A)
[PROOF STEP]
have \<open>(sum (\<lambda>x. c * f x) \<longlongrightarrow> c * a) (finite_subsets_at_top A)\<close>
[PROOF STATE]
proof (prove)
using this:
((\<lambda>F. c * sum f F) \<longlongrightarrow> c * a) (finite_subsets_at_top A)

goal (1 subgoal):
 1. (sum (\<lambda>x. c * f x) \<longlongrightarrow> c * a) (finite_subsets_at_top A)
[PROOF STEP]
apply (rule tendsto_cong[THEN iffD1, rotated])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>\<^sub>F x in finite_subsets_at_top A. c * sum f x = (\<Sum>x\<in>x. c * f x)
[PROOF STEP]
apply (rule eventually_finite_subsets_at_top_weakI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>X. \<lbrakk>finite X; X \<subseteq> A\<rbrakk> \<Longrightarrow> c * sum f X = (\<Sum>x\<in>X. c * f x)
[PROOF STEP]
using sum_distrib_left
[PROOF STATE]
proof (prove)
using this:
?r * sum ?f ?A = (\<Sum>n\<in>?A. ?r * ?f n)

goal (1 subgoal):
 1. \<And>X. \<lbrakk>finite X; X \<subseteq> A\<rbrakk> \<Longrightarrow> c * sum f X = (\<Sum>x\<in>X. c * f x)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(sum (\<lambda>x. c * f x) \<longlongrightarrow> c * a) (finite_subsets_at_top A)

goal (1 subgoal):
 1. has_sum (\<lambda>x. c * f x) A (c * a)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(sum (\<lambda>x. c * f x) \<longlongrightarrow> c * a) (finite_subsets_at_top A)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(sum (\<lambda>x. c * f x) \<longlongrightarrow> c * a) (finite_subsets_at_top A)

goal (1 subgoal):
 1. has_sum (\<lambda>x. c * f x) A (c * a)
[PROOF STEP]
using infsumI has_sum_def
[PROOF STATE]
proof (prove)
using this:
(sum (\<lambda>x. c * f x) \<longlongrightarrow> c * a) (finite_subsets_at_top A)
has_sum ?f ?A ?x \<Longrightarrow> infsum ?f ?A = ?x
has_sum ?f ?A ?x = (sum ?f \<longlongrightarrow> ?x) (finite_subsets_at_top ?A)

goal (1 subgoal):
 1. has_sum (\<lambda>x. c * f x) A (c * a)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
has_sum (\<lambda>x. c * f x) A (c * a)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma gcd'_dvd1:
  assumes "is_gcd gcd'" shows "gcd' a b dvd a"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gcd' a b dvd a
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_gcd gcd'

goal (1 subgoal):
 1. gcd' a b dvd a
[PROOF STEP]
unfolding is_gcd_def
[PROOF STATE]
proof (prove)
using this:
\<forall>a b. gcd' a b dvd a \<and> gcd' a b dvd b \<and> (\<forall>d'. d' dvd a \<and> d' dvd b \<longrightarrow> d' dvd gcd' a b)

goal (1 subgoal):
 1. gcd' a b dvd a
[PROOF STEP]
by auto


[STATEMENT]
lemma list_sel_eq_foldr: "list_sel f x y = foldr (\<lambda>b a. a * list_sel_aux f b y) x 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. list_sel f x y = foldr (\<lambda>b a. a * list_sel_aux f b y) x 1
[PROOF STEP]
by(induction x) auto


[STATEMENT]
lemma fps_shift_rev_shift:
  "m \<le> n \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k<m then 0 else f $ (k-m))) = fps_shift (n-m) f"
  "m > n \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k<m then 0 else f $ (k-m))) =
    Abs_fps (\<lambda>k. if k<m-n then 0 else f $ (k-(m-n)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (m \<le> n \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = fps_shift (n - m) f) &&& (n < m \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = Abs_fps (\<lambda>k. if k < m - n then 0::'a else f $ (k - (m - n))))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. m \<le> n \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = fps_shift (n - m) f
 2. n < m \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = Abs_fps (\<lambda>k. if k < m - n then 0::'a else f $ (k - (m - n)))
[PROOF STEP]
assume "m \<le> n"
[PROOF STATE]
proof (state)
this:
m \<le> n

goal (2 subgoals):
 1. m \<le> n \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = fps_shift (n - m) f
 2. n < m \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = Abs_fps (\<lambda>k. if k < m - n then 0::'a else f $ (k - (m - n)))
[PROOF STEP]
thus "fps_shift n (Abs_fps (\<lambda>k. if k<m then 0 else f $ (k-m))) = fps_shift (n-m) f"
[PROOF STATE]
proof (prove)
using this:
m \<le> n

goal (1 subgoal):
 1. fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = fps_shift (n - m) f
[PROOF STEP]
by (intro fps_ext) auto
[PROOF STATE]
proof (state)
this:
fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = fps_shift (n - m) f

goal (1 subgoal):
 1. n < m \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = Abs_fps (\<lambda>k. if k < m - n then 0::'a else f $ (k - (m - n)))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. n < m \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = Abs_fps (\<lambda>k. if k < m - n then 0::'a else f $ (k - (m - n)))
[PROOF STEP]
assume mn: "m > n"
[PROOF STATE]
proof (state)
this:
n < m

goal (1 subgoal):
 1. n < m \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = Abs_fps (\<lambda>k. if k < m - n then 0::'a else f $ (k - (m - n)))
[PROOF STEP]
hence "\<And>k. k \<ge> m-n \<Longrightarrow> k+n-m = k - (m-n)"
[PROOF STATE]
proof (prove)
using this:
n < m

goal (1 subgoal):
 1. \<And>k. m - n \<le> k \<Longrightarrow> k + n - m = k - (m - n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
m - n \<le> ?k \<Longrightarrow> ?k + n - m = ?k - (m - n)

goal (1 subgoal):
 1. n < m \<Longrightarrow> fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = Abs_fps (\<lambda>k. if k < m - n then 0::'a else f $ (k - (m - n)))
[PROOF STEP]
thus
    "fps_shift n (Abs_fps (\<lambda>k. if k<m then 0 else f $ (k-m))) =
      Abs_fps (\<lambda>k. if k<m-n then 0 else f $ (k-(m-n)))"
[PROOF STATE]
proof (prove)
using this:
m - n \<le> ?k \<Longrightarrow> ?k + n - m = ?k - (m - n)

goal (1 subgoal):
 1. fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = Abs_fps (\<lambda>k. if k < m - n then 0::'a else f $ (k - (m - n)))
[PROOF STEP]
by (intro fps_ext) auto
[PROOF STATE]
proof (state)
this:
fps_shift n (Abs_fps (\<lambda>k. if k < m then 0::'a else f $ (k - m))) = Abs_fps (\<lambda>k. if k < m - n then 0::'a else f $ (k - (m - n)))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma path_connectedin_standard_simplex:
   "path_connectedin (powertop_real UNIV) (standard_simplex p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. path_connectedin (powertop_real UNIV) (standard_simplex p)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. path_connectedin (powertop_real UNIV) (standard_simplex p)
[PROOF STEP]
define g where "g \<equiv> \<lambda>x y::nat\<Rightarrow>real. \<lambda>u i. (1 - u) * x i + u * y i"
[PROOF STATE]
proof (state)
this:
g \<equiv> \<lambda>x y u i. (1 - u) * x i + u * y i

goal (1 subgoal):
 1. path_connectedin (powertop_real UNIV) (standard_simplex p)
[PROOF STEP]
have "continuous_map
                (subtopology euclideanreal {0..1}) (powertop_real UNIV)
                (g x y)"
    if "x \<in> standard_simplex p" "y \<in> standard_simplex p" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. continuous_map (top_of_set {0..1}) (powertop_real UNIV) (g x y)
[PROOF STEP]
unfolding g_def continuous_map_componentwise
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>u i. (1 - u) * x i + u * y i) ` topspace (top_of_set {0..1}) \<subseteq> extensional UNIV \<and> (\<forall>k\<in>UNIV. continuous_map (top_of_set {0..1}) euclideanreal (\<lambda>xa. (1 - xa) * x k + xa * y k))
[PROOF STEP]
by (force intro: continuous_intros)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> continuous_map (top_of_set {0..1}) (powertop_real UNIV) (g ?x ?y)

goal (1 subgoal):
 1. path_connectedin (powertop_real UNIV) (standard_simplex p)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> continuous_map (top_of_set {0..1}) (powertop_real UNIV) (g ?x ?y)

goal (1 subgoal):
 1. path_connectedin (powertop_real UNIV) (standard_simplex p)
[PROOF STEP]
have "g x y ` {0..1} \<subseteq> standard_simplex p" "g x y 0 = x" "g x y 1 = y"
    if "x \<in> standard_simplex p" "y \<in> standard_simplex p" for x y
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g x y ` {0..1} \<subseteq> standard_simplex p &&& g x y 0 = x &&& g x y 1 = y
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
x \<in> standard_simplex p
y \<in> standard_simplex p

goal (1 subgoal):
 1. g x y ` {0..1} \<subseteq> standard_simplex p &&& g x y 0 = x &&& g x y 1 = y
[PROOF STEP]
by (auto simp: convex_standard_simplex g_def)
[PROOF STATE]
proof (state)
this:
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y ` {0..1} \<subseteq> standard_simplex p
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y 0 = ?x
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y 1 = ?y

goal (1 subgoal):
 1. path_connectedin (powertop_real UNIV) (standard_simplex p)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> continuous_map (top_of_set {0..1}) (powertop_real UNIV) (g ?x ?y)
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y ` {0..1} \<subseteq> standard_simplex p
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y 0 = ?x
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y 1 = ?y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> continuous_map (top_of_set {0..1}) (powertop_real UNIV) (g ?x ?y)
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y ` {0..1} \<subseteq> standard_simplex p
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y 0 = ?x
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y 1 = ?y

goal (1 subgoal):
 1. path_connectedin (powertop_real UNIV) (standard_simplex p)
[PROOF STEP]
unfolding path_connectedin_def path_connected_space_def pathin_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> continuous_map (top_of_set {0..1}) (powertop_real UNIV) (g ?x ?y)
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y ` {0..1} \<subseteq> standard_simplex p
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y 0 = ?x
\<lbrakk>?x \<in> standard_simplex p; ?y \<in> standard_simplex p\<rbrakk> \<Longrightarrow> g ?x ?y 1 = ?y

goal (1 subgoal):
 1. standard_simplex p \<subseteq> topspace (powertop_real UNIV) \<and> (\<forall>x\<in>topspace (subtopology (powertop_real UNIV) (standard_simplex p)). \<forall>y\<in>topspace (subtopology (powertop_real UNIV) (standard_simplex p)). \<exists>g. continuous_map (top_of_set {0..1}) (subtopology (powertop_real UNIV) (standard_simplex p)) g \<and> g 0 = x \<and> g 1 = y)
[PROOF STEP]
by (metis continuous_map_in_subtopology euclidean_product_topology top_greatest topspace_euclidean topspace_euclidean_subtopology)
[PROOF STATE]
proof (state)
this:
path_connectedin (powertop_real UNIV) (standard_simplex p)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma sp_mono:
  assumes "z \<in> {0..1}"
      and "x \<le> y"
    shows "sp z x \<le> sp z y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sp z x \<le> sp z y
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. sp z x \<le> sp z y
[PROOF STEP]
have "z + (1 - z) * x \<le> z + (1 - z) * y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. z + (1 - z) * x \<le> z + (1 - z) * y
[PROOF STEP]
using assms mult_left_mono
[PROOF STATE]
proof (prove)
using this:
z \<in> {0..1}
x \<le> y
\<lbrakk>?a \<le> ?b; (0::?'a) \<le> ?c\<rbrakk> \<Longrightarrow> ?c * ?a \<le> ?c * ?b

goal (1 subgoal):
 1. z + (1 - z) * x \<le> z + (1 - z) * y
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
z + (1 - z) * x \<le> z + (1 - z) * y

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

goal (1 subgoal):
 1. sp z x \<le> sp z y
[PROOF STEP]
by (unfold left_diff_distrib right_diff_distrib distrib_left distrib_right) simp
[PROOF STATE]
proof (state)
this:
sp z x \<le> sp z y

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma numeral_list_head_is_Oc: "(nl::nat list) \<noteq> [] \<Longrightarrow> hd (<nl>) = Oc"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nl \<noteq> [] \<Longrightarrow> hd (<nl>) = Oc
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. nl \<noteq> [] \<Longrightarrow> hd (<nl>) = Oc
[PROOF STEP]
assume A: "(nl::nat list) \<noteq> []"
[PROOF STATE]
proof (state)
this:
nl \<noteq> []

goal (1 subgoal):
 1. nl \<noteq> [] \<Longrightarrow> hd (<nl>) = Oc
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
nl \<noteq> []
[PROOF STEP]
have "(\<exists>r'. <nl> = Oc # r')"
[PROOF STATE]
proof (prove)
using this:
nl \<noteq> []

goal (1 subgoal):
 1. \<exists>r'. <nl> = Oc # r'
[PROOF STEP]
using append_Nil tape_of_list_empty tape_of_nat_list_cases2 unique_Bk_postfix_numeral_list_Nil
[PROOF STATE]
proof (prove)
using this:
nl \<noteq> []
[] @ ?ys = ?ys
<[]> = []
<?nl> = [] \<or> (\<exists>r'. <?nl> = Oc # r')
<[]> @ Bk \<up> ?l1.0 = <?yl> @ Bk \<up> ?l2.0 \<Longrightarrow> [] = ?yl

goal (1 subgoal):
 1. \<exists>r'. <nl> = Oc # r'
[PROOF STEP]
by fastforce
[PROOF STATE]
proof (state)
this:
\<exists>r'. <nl> = Oc # r'

goal (1 subgoal):
 1. nl \<noteq> [] \<Longrightarrow> hd (<nl>) = Oc
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<exists>r'. <nl> = Oc # r'
[PROOF STEP]
obtain r' where w_r': "<nl> = Oc # r'"
[PROOF STATE]
proof (prove)
using this:
\<exists>r'. <nl> = Oc # r'

goal (1 subgoal):
 1. (\<And>r'. <nl> = Oc # r' \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
<nl> = Oc # r'

goal (1 subgoal):
 1. nl \<noteq> [] \<Longrightarrow> hd (<nl>) = Oc
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
<nl> = Oc # r'
[PROOF STEP]
show "hd (<nl>) = Oc"
[PROOF STATE]
proof (prove)
using this:
<nl> = Oc # r'

goal (1 subgoal):
 1. hd (<nl>) = Oc
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
hd (<nl>) = Oc

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma closed_segment_half_open_segment_subsetI:
  fixes x::real shows "x \<in> {t0--<t1} \<Longrightarrow> {t0--x} \<subseteq> {t0--<t1}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x \<in> {t0--<t1} \<Longrightarrow> {t0--x} \<subseteq> {t0--<t1}
[PROOF STEP]
by (auto simp: half_open_segment_real closed_segment_eq_real_ivl split: if_split_asm)


[STATEMENT]
lemma Span_in_carrier:
  assumes "K \<subseteq> carrier R" "set Us \<subseteq> carrier R"
  shows "Span K Us \<subseteq> carrier R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Span K Us \<subseteq> carrier R
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
K \<subseteq> carrier R
set Us \<subseteq> carrier R

goal (1 subgoal):
 1. Span K Us \<subseteq> carrier R
[PROOF STEP]
by (induct Us) (auto simp add: line_extension_in_carrier)


[STATEMENT]
lemma continuous_imp_embedding_map:
   "\<lbrakk>continuous_map X Y f; compact_space X; Hausdorff_space Y; inj_on f (topspace X)\<rbrakk>
        \<Longrightarrow> embedding_map X Y f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_map X Y f; compact_space X; Hausdorff_space Y; inj_on f (topspace X)\<rbrakk> \<Longrightarrow> embedding_map X Y f
[PROOF STEP]
by (simp add: continuous_imp_closed_map injective_closed_imp_embedding_map)


[STATEMENT]
lemma fixp_strong_induct:
  assumes [cont_intro]: "ccpo.admissible Sup (\<le>) P"
  and mono: "monotone (\<le>) (\<le>) f"
  and bot: "P (\<Squnion>{})"
  and step: "\<And>x. \<lbrakk> x \<le> ccpo_class.fixp f; P x \<rbrakk> \<Longrightarrow> P (f x)"
  shows "P (ccpo_class.fixp f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. P (ccpo_class.fixp f)
[PROOF STEP]
proof(rule fixp_induct[where P="\<lambda>x. x \<le> ccpo_class.fixp f \<and> P x", THEN conjunct2])
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. ccpo.admissible Sup (\<le>) (\<lambda>x. x \<le> ccpo_class.fixp f \<and> P x)
 2. monotone (\<le>) (\<le>) f
 3. \<Squnion> {} \<le> ccpo_class.fixp f \<and> P (\<Squnion> {})
 4. \<And>x. x \<le> ccpo_class.fixp f \<and> P x \<Longrightarrow> f x \<le> ccpo_class.fixp f \<and> P (f x)
[PROOF STEP]
note [cont_intro] = admissible_leI
[PROOF STATE]
proof (state)
this:
\<lbrakk>mcont ?luba ?orda Sup (\<le>) ?f; mcont ?luba ?orda Sup (\<le>) ?g\<rbrakk> \<Longrightarrow> ccpo.admissible ?luba ?orda (\<lambda>x. ?f x \<le> ?g x)

goal (4 subgoals):
 1. ccpo.admissible Sup (\<le>) (\<lambda>x. x \<le> ccpo_class.fixp f \<and> P x)
 2. monotone (\<le>) (\<le>) f
 3. \<Squnion> {} \<le> ccpo_class.fixp f \<and> P (\<Squnion> {})
 4. \<And>x. x \<le> ccpo_class.fixp f \<and> P x \<Longrightarrow> f x \<le> ccpo_class.fixp f \<and> P (f x)
[PROOF STEP]
show "ccpo.admissible Sup (\<le>) (\<lambda>x. x \<le> ccpo_class.fixp f \<and> P x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ccpo.admissible Sup (\<le>) (\<lambda>x. x \<le> ccpo_class.fixp f \<and> P x)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
ccpo.admissible Sup (\<le>) (\<lambda>x. x \<le> ccpo_class.fixp f \<and> P x)

goal (3 subgoals):
 1. monotone (\<le>) (\<le>) f
 2. \<Squnion> {} \<le> ccpo_class.fixp f \<and> P (\<Squnion> {})
 3. \<And>x. x \<le> ccpo_class.fixp f \<and> P x \<Longrightarrow> f x \<le> ccpo_class.fixp f \<and> P (f x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. monotone (\<le>) (\<le>) f
 2. \<Squnion> {} \<le> ccpo_class.fixp f \<and> P (\<Squnion> {})
 3. \<And>x. x \<le> ccpo_class.fixp f \<and> P x \<Longrightarrow> f x \<le> ccpo_class.fixp f \<and> P (f x)
[PROOF STEP]
show "\<Squnion>{} \<le> ccpo_class.fixp f \<and> P (\<Squnion>{})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Squnion> {} \<le> ccpo_class.fixp f \<and> P (\<Squnion> {})
[PROOF STEP]
by(auto simp add: bot intro: ccpo_Sup_least chain_empty)
[PROOF STATE]
proof (state)
this:
\<Squnion> {} \<le> ccpo_class.fixp f \<and> P (\<Squnion> {})

goal (2 subgoals):
 1. monotone (\<le>) (\<le>) f
 2. \<And>x. x \<le> ccpo_class.fixp f \<and> P x \<Longrightarrow> f x \<le> ccpo_class.fixp f \<and> P (f x)
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. monotone (\<le>) (\<le>) f
 2. \<And>x. x \<le> ccpo_class.fixp f \<and> P x \<Longrightarrow> f x \<le> ccpo_class.fixp f \<and> P (f x)
[PROOF STEP]
fix x
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. monotone (\<le>) (\<le>) f
 2. \<And>x. x \<le> ccpo_class.fixp f \<and> P x \<Longrightarrow> f x \<le> ccpo_class.fixp f \<and> P (f x)
[PROOF STEP]
assume "x \<le> ccpo_class.fixp f \<and> P x"
[PROOF STATE]
proof (state)
this:
x \<le> ccpo_class.fixp f \<and> P x

goal (2 subgoals):
 1. monotone (\<le>) (\<le>) f
 2. \<And>x. x \<le> ccpo_class.fixp f \<and> P x \<Longrightarrow> f x \<le> ccpo_class.fixp f \<and> P (f x)
[PROOF STEP]
thus "f x \<le> ccpo_class.fixp f \<and> P (f x)"
[PROOF STATE]
proof (prove)
using this:
x \<le> ccpo_class.fixp f \<and> P x

goal (1 subgoal):
 1. f x \<le> ccpo_class.fixp f \<and> P (f x)
[PROOF STEP]
by(subst fixp_unfold[OF mono])(auto dest: monotoneD[OF mono] intro: step)
[PROOF STATE]
proof (state)
this:
f x \<le> ccpo_class.fixp f \<and> P (f x)

goal (1 subgoal):
 1. monotone (\<le>) (\<le>) f
[PROOF STEP]
qed(rule mono)