[STATEMENT]
lemma strict_mono_cancel_le:
fixes f :: "'a::linorder \<Rightarrow> 'b::linorder"
shows "strict_mono f \<Longrightarrow> (f x \<le> f y) = (x \<le> y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. OrdinalInduct.strict_mono f \<Longrightarrow> (f x \<le> f y) = (x \<le> y)
[PROOF STEP]
apply (auto simp add: order_le_less)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrakk>OrdinalInduct.strict_mono f; x \<noteq> y; f x < f y\<rbrakk> \<Longrightarrow> x < y
 2. \<lbrakk>OrdinalInduct.strict_mono f; x \<noteq> y; f x = f y\<rbrakk> \<Longrightarrow> x < y
 3. \<lbrakk>OrdinalInduct.strict_mono f; f x \<noteq> f y; x < y\<rbrakk> \<Longrightarrow> f x < f y
[PROOF STEP]
apply (simp add: strict_mono_cancel_less)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>OrdinalInduct.strict_mono f; x \<noteq> y; f x = f y\<rbrakk> \<Longrightarrow> x < y
 2. \<lbrakk>OrdinalInduct.strict_mono f; f x \<noteq> f y; x < y\<rbrakk> \<Longrightarrow> f x < f y
[PROOF STEP]
apply (simp add: strict_mono_cancel_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>OrdinalInduct.strict_mono f; f x \<noteq> f y; x < y\<rbrakk> \<Longrightarrow> f x < f y
[PROOF STEP]
apply (simp add: strict_monoD)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma norm_le: "norm x \<le> norm y \<longleftrightarrow> inner x x \<le> inner y y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (norm x \<le> norm y) = (inner x x \<le> inner y y)
[PROOF STEP]
by (simp add: norm_eq_sqrt_inner)


[STATEMENT]
lemma slg_rel_def: "\<langle>R\<rangle>slg_rel =
  (R \<rightarrow> \<langle>R\<rangle>list_set_rel) O br (\<lambda>succs. {(u,v). v\<in>succs u}) (\<lambda>_. True)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<langle>R\<rangle>slg_rel = (R \<rightarrow> \<langle>R\<rangle>list_set_rel) O br (\<lambda>succs. {(u, v). v \<in> succs u}) (\<lambda>_. True)
[PROOF STEP]
unfolding slg_rel_def_internal relAPP_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fun_rel R (list_set_rel R) O br (\<lambda>succs. {(u, v). v \<in> succs u}) (\<lambda>_. True) = fun_rel R (list_set_rel R) O br (\<lambda>succs. {(u, v). v \<in> succs u}) (\<lambda>_. True)
[PROOF STEP]
by simp


[STATEMENT]
lemma IMGU_iff_Idem_and_MGU: "IMGU \<mu> t u \<longleftrightarrow> Idem \<mu> \<and> MGU \<mu> t u"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. IMGU \<mu> t u = (Idem \<mu> \<and> MGU \<mu> t u)
[PROOF STEP]
unfolding IMGU_def Idem_def MGU_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Unifier \<mu> t u \<and> (\<forall>\<theta>. Unifier \<theta> t u \<longrightarrow> \<theta> \<doteq> \<mu> \<lozenge> \<theta>)) = (\<mu> \<lozenge> \<mu> \<doteq> \<mu> \<and> Unifier \<mu> t u \<and> (\<forall>\<theta>. Unifier \<theta> t u \<longrightarrow> (\<exists>\<gamma>. \<theta> \<doteq> \<mu> \<lozenge> \<gamma>)))
[PROOF STEP]
by (smt (verit, best) subst_comp subst_eq_def)


[STATEMENT]
lemma infinite_inj_image_infinite:
  assumes "infinite S" and "inj_on f S"
  shows "infinite (f ` S)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. infinite (f ` S)
[PROOF STEP]
using assms finite_image_iff
[PROOF STATE]
proof (prove)
using this:
infinite S
inj_on f S
inj_on ?f ?A \<Longrightarrow> finite (?f ` ?A) = finite ?A

goal (1 subgoal):
 1. infinite (f ` S)
[PROOF STEP]
by blast


[STATEMENT]
lemma equiv_associated:
  shows "equiv UNIV associated_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. equiv UNIV associated_rel
[PROOF STEP]
unfolding associated_rel_def equiv_def refl_on_def sym_def trans_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({(a, b). normalize a = normalize b} \<subseteq> UNIV \<times> UNIV \<and> (\<forall>x\<in>UNIV. (x, x) \<in> {(a, b). normalize a = normalize b})) \<and> (\<forall>x y. (x, y) \<in> {(a, b). normalize a = normalize b} \<longrightarrow> (y, x) \<in> {(a, b). normalize a = normalize b}) \<and> (\<forall>x y z. (x, y) \<in> {(a, b). normalize a = normalize b} \<longrightarrow> (y, z) \<in> {(a, b). normalize a = normalize b} \<longrightarrow> (x, z) \<in> {(a, b). normalize a = normalize b})
[PROOF STEP]
by simp


[STATEMENT]
lemma collect_disj: "{x. P x | Q x} = {x. P x} Un {x. Q x}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x. P x \<or> Q x} = {x. P x} \<union> {x. Q x}
[PROOF STEP]
by(force)


[STATEMENT]
theorem graph_lemma: "\<BB>\<^sub>F G = {hd (Dec (\<BB>\<^sub>F G) g) | g. g \<in> G \<and> g \<noteq> \<epsilon>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<BB>\<^sub>F G = {hd (Dec \<BB>\<^sub>F G g) |g. g \<in> G \<and> g \<noteq> \<epsilon>}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<BB>\<^sub>F G = {hd (Dec \<BB>\<^sub>F G g) |g. g \<in> G \<and> g \<noteq> \<epsilon>}
[PROOF STEP]
have *: "rev u = last (Dec rev ` (\<BB>\<^sub>F G) (rev g)) \<and> g \<in> G \<and> g \<noteq> \<epsilon>
           \<longleftrightarrow> u = hd (Dec (\<BB>\<^sub>F G) g) \<and> g \<in> G \<and> g \<noteq> \<epsilon>" for u g
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (rev u = last (Dec rev ` (\<BB>\<^sub>F G) rev g) \<and> g \<in> G \<and> g \<noteq> \<epsilon>) = (u = hd (Dec \<BB>\<^sub>F G g) \<and> g \<in> G \<and> g \<noteq> \<epsilon>)
[PROOF STEP]
by (cases "g \<in> G \<and> g \<noteq> \<epsilon>") (simp add: gen_in_free_hull last_rev hd_map code.dec_rev, blast)
[PROOF STATE]
proof (state)
this:
(rev ?u = last (Dec rev ` (\<BB>\<^sub>F G) rev ?g) \<and> ?g \<in> G \<and> ?g \<noteq> \<epsilon>) = (?u = hd (Dec \<BB>\<^sub>F G ?g) \<and> ?g \<in> G \<and> ?g \<noteq> \<epsilon>)

goal (1 subgoal):
 1. \<BB>\<^sub>F G = {hd (Dec \<BB>\<^sub>F G g) |g. g \<in> G \<and> g \<noteq> \<epsilon>}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<BB>\<^sub>F G = {hd (Dec \<BB>\<^sub>F G g) |g. g \<in> G \<and> g \<noteq> \<epsilon>}
[PROOF STEP]
using graph_lemma_last[reversed, of G]
[PROOF STATE]
proof (prove)
using this:
\<BB>\<^sub>F G = {x. \<exists>xa. rev x = last (Dec rev ` (\<BB>\<^sub>F G) rev xa) \<and> xa \<in> G \<and> xa \<noteq> \<epsilon>}

goal (1 subgoal):
 1. \<BB>\<^sub>F G = {hd (Dec \<BB>\<^sub>F G g) |g. g \<in> G \<and> g \<noteq> \<epsilon>}
[PROOF STEP]
unfolding *
[PROOF STATE]
proof (prove)
using this:
\<BB>\<^sub>F G = {hd (Dec \<BB>\<^sub>F G x) |x. x \<in> G \<and> x \<noteq> \<epsilon>}

goal (1 subgoal):
 1. \<BB>\<^sub>F G = {hd (Dec \<BB>\<^sub>F G g) |g. g \<in> G \<and> g \<noteq> \<epsilon>}
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<BB>\<^sub>F G = {hd (Dec \<BB>\<^sub>F G g) |g. g \<in> G \<and> g \<noteq> \<epsilon>}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bool2: "(\<not> False) = True"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<not> False) = True
[PROOF STEP]
by blast


[STATEMENT]
lemma coord_partial_eval_mult:
  assumes "as \<in> carrier (R\<^bsup>n\<^esup>)"
  assumes "p \<in> carrier (R[\<X>\<^bsub>n\<^esub>])"
  assumes "Q \<in> carrier (R[\<X>\<^bsub>n\<^esub>])"
  shows "coord_partial_eval R S as  (p \<otimes>\<^bsub>(R[\<X>\<^bsub>n\<^esub>])\<^esub> Q) =
          (coord_partial_eval R S as  p) \<otimes>\<^bsub>(R[\<X>\<^bsub>n\<^esub>])\<^esub> (coord_partial_eval R S as  Q)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. coord_partial_eval R S as (p \<otimes>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> Q) = coord_partial_eval R S as p \<otimes>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> coord_partial_eval R S as Q
[PROOF STEP]
using assms R.poly_eval_mult[of p "{..<n}" Q "(point_to_eval_map R as)" S] Pring_def[of R "{..<n}"]
  point_to_eval_map_closed[of as n]
[PROOF STATE]
proof (prove)
using this:
as \<in> carrier (R\<^bsup>n\<^esup>)
p \<in> carrier (R [\<X>\<^bsub>n\<^esub>])
Q \<in> carrier (R [\<X>\<^bsub>n\<^esub>])
\<lbrakk>p \<in> carrier R [\<X>\<^bsub>{..<n}\<^esub>]; Q \<in> carrier R [\<X>\<^bsub>{..<n}\<^esub>]; (\<lambda>i. if i < length as then as ! i else \<zero>) \<in> UNIV \<rightarrow> carrier R\<rbrakk> \<Longrightarrow> poly_eval R S (\<lambda>i. if i < length as then as ! i else \<zero>) (p \<Otimes>\<^sub>p Q) = poly_eval R S (\<lambda>i. if i < length as then as ! i else \<zero>) p \<Otimes>\<^sub>p poly_eval R S (\<lambda>i. if i < length as then as ! i else \<zero>) Q
Pring R {..<n} \<equiv> \<lparr>carrier = carrier R [\<X>\<^bsub>{..<n}\<^esub>], monoid.mult = (\<Otimes>\<^sub>p), one = R.indexed_const \<one>, zero = R.indexed_const \<zero>, add = (\<Oplus>), smult = poly_scalar_mult R\<rparr>
as \<in> carrier (R\<^bsup>n\<^esup>) \<Longrightarrow> (\<lambda>i. if i < length as then as ! i else \<zero>) \<in> UNIV \<rightarrow> carrier R

goal (1 subgoal):
 1. coord_partial_eval R S as (p \<otimes>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> Q) = coord_partial_eval R S as p \<otimes>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> coord_partial_eval R S as Q
[PROOF STEP]
unfolding coord_partial_eval_def
[PROOF STATE]
proof (prove)
using this:
as \<in> carrier (R\<^bsup>n\<^esup>)
p \<in> carrier (R [\<X>\<^bsub>n\<^esub>])
Q \<in> carrier (R [\<X>\<^bsub>n\<^esub>])
\<lbrakk>p \<in> carrier R [\<X>\<^bsub>{..<n}\<^esub>]; Q \<in> carrier R [\<X>\<^bsub>{..<n}\<^esub>]; (\<lambda>i. if i < length as then as ! i else \<zero>) \<in> UNIV \<rightarrow> carrier R\<rbrakk> \<Longrightarrow> poly_eval R S (\<lambda>i. if i < length as then as ! i else \<zero>) (p \<Otimes>\<^sub>p Q) = poly_eval R S (\<lambda>i. if i < length as then as ! i else \<zero>) p \<Otimes>\<^sub>p poly_eval R S (\<lambda>i. if i < length as then as ! i else \<zero>) Q
Pring R {..<n} \<equiv> \<lparr>carrier = carrier R [\<X>\<^bsub>{..<n}\<^esub>], monoid.mult = (\<Otimes>\<^sub>p), one = R.indexed_const \<one>, zero = R.indexed_const \<zero>, add = (\<Oplus>), smult = poly_scalar_mult R\<rparr>
as \<in> carrier (R\<^bsup>n\<^esup>) \<Longrightarrow> (\<lambda>i. if i < length as then as ! i else \<zero>) \<in> UNIV \<rightarrow> carrier R

goal (1 subgoal):
 1. poly_eval R S (\<lambda>i. if i < length as then as ! i else \<zero>) (p \<otimes>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> Q) = poly_eval R S (\<lambda>i. if i < length as then as ! i else \<zero>) p \<otimes>\<^bsub>R [\<X>\<^bsub>n\<^esub>]\<^esub> poly_eval R S (\<lambda>i. if i < length as then as ! i else \<zero>) Q
[PROOF STEP]
by (metis R.Pring_car R.Pring_mult coord_ring_def)


[STATEMENT]
lemma Re_Arccos: "Re(Arccos z) = Im (Ln (z + \<i> * csqrt(1 - z\<^sup>2)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Re (Arccos z) = Im (Ln (z + \<i> * csqrt (1 - z\<^sup>2)))
[PROOF STEP]
by (simp add: Arccos_def)


[STATEMENT]
lemma nn_integral_spmf: "(\<integral>\<^sup>+ x. spmf p x \<partial>count_space A) = emeasure (measure_spmf p) A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (spmf p x) \<partial>count_space A = emeasure (measure_spmf p) A
[PROOF STEP]
apply(simp add: measure_spmf_def emeasure_distr emeasure_restrict_space space_restrict_space nn_integral_pmf[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<integral>\<^sup>+ x. ennreal (spmf p x) \<partial>count_space A = \<integral>\<^sup>+ x. ennreal (pmf p x) \<partial>count_space (the -` A \<inter> range Some)
[PROOF STEP]
apply(rule nn_integral_bij_count_space[where g=Some])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw Some A (the -` A \<inter> range Some)
[PROOF STEP]
apply(auto simp add: bij_betw_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma module_iff_vector_space: "module s \<longleftrightarrow> vector_space s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. module s = vector_space s
[PROOF STEP]
unfolding module_def vector_space_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (((\<forall>a x y. s a (x + y) = s a x + s a y) \<and> (\<forall>a b x. s (a + b) x = s a x + s b x)) \<and> (\<forall>a b x. s a (s b x) = s (a * b) x) \<and> (\<forall>x. s (1::'a) x = x)) = (((\<forall>a x y. s a (x + y) = s a x + s a y) \<and> (\<forall>a b x. s (a + b) x = s a x + s b x)) \<and> (\<forall>a b x. s a (s b x) = s (a * b) x) \<and> (\<forall>x. s (1::'a) x = x))
[PROOF STEP]
..


[STATEMENT]
lemma Frct_less: "Frct (a, numeral b) < Frct (c, numeral d) \<longleftrightarrow> a * numeral d < c * numeral b"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Frct (a, numeral b) < Frct (c, numeral d)) = (a * numeral d < c * numeral b)
[PROOF STEP]
by simp


[STATEMENT]
lemma subprob_cexprD:
  assumes "subprob_cexpr V V' \<Gamma> e"
  shows "\<And>\<rho>. \<rho> \<in> space (state_measure V' \<Gamma>) \<Longrightarrow>
               (\<integral>\<^sup>+\<sigma>. extract_real (cexpr_sem (merge V V' (\<sigma>, \<rho>)) e) \<partial>state_measure V \<Gamma>) \<le> 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<rho>. \<rho> \<in> space (state_measure V' \<Gamma>) \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (extract_real (cexpr_sem (merge V V' (x, \<rho>)) e)) \<partial>state_measure V \<Gamma> \<le> 1
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
subprob_cexpr V V' \<Gamma> e

goal (1 subgoal):
 1. \<And>\<rho>. \<rho> \<in> space (state_measure V' \<Gamma>) \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (extract_real (cexpr_sem (merge V V' (x, \<rho>)) e)) \<partial>state_measure V \<Gamma> \<le> 1
[PROOF STEP]
unfolding subprob_cexpr_def
[PROOF STATE]
proof (prove)
using this:
\<forall>\<rho>\<in>space (state_measure V' \<Gamma>). \<integral>\<^sup>+ x. ennreal (extract_real (cexpr_sem (merge V V' (x, \<rho>)) e)) \<partial>state_measure V \<Gamma> \<le> 1

goal (1 subgoal):
 1. \<And>\<rho>. \<rho> \<in> space (state_measure V' \<Gamma>) \<Longrightarrow> \<integral>\<^sup>+ x. ennreal (extract_real (cexpr_sem (merge V V' (x, \<rho>)) e)) \<partial>state_measure V \<Gamma> \<le> 1
[PROOF STEP]
by simp


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


[STATEMENT]
lemma Inf_inf_pres:
  fixes f :: "'a::complete_lattice \<Rightarrow> 'b::complete_lattice"
  shows"Inf_pres f \<Longrightarrow> inf_pres f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Inf_pres f \<Longrightarrow> inf_pres f
[PROOF STEP]
by (smt INF_insert comp_eq_elim dual_complete_lattice.Sup_empty dual_complete_lattice.Sup_insert inf_top.right_neutral)


[STATEMENT]
theorem dual_star_least: "(x * z) \<squnion> y \<le> z \<Longrightarrow> (x^\<otimes>) * y \<le> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * z \<squnion> y \<le> z \<Longrightarrow> x ^ \<otimes> * y \<le> z
[PROOF STEP]
apply (subst dual_le)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * z \<squnion> y \<le> z \<Longrightarrow> z ^ o \<le> (x ^ \<otimes> * y) ^ o
[PROOF STEP]
apply (simp add: dual_star_def dual_comp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * z \<le> z \<and> y \<le> z \<Longrightarrow> z ^ o \<le> (x ^ o) ^ * * y ^ o
[PROOF STEP]
apply (rule star_greatest)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * z \<le> z \<and> y \<le> z \<Longrightarrow> z ^ o \<le> x ^ o * z ^ o \<sqinter> y ^ o
[PROOF STEP]
apply (subst dual_le)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x * z \<le> z \<and> y \<le> z \<Longrightarrow> (x ^ o * z ^ o \<sqinter> y ^ o) ^ o \<le> (z ^ o) ^ o
[PROOF STEP]
by (simp add: dual_inf dual_comp)


[STATEMENT]
lemma darcs_child_count_ge2:
  "\<lbrakk>(t1,e1) \<in> fset xs; (t2,e2) \<in> fset xs; e2 \<in> darcs t1\<rbrakk> \<Longrightarrow> count (darcs_mset (Node r xs)) e2 \<ge> 2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(t1, e1) \<in> fset xs; (t2, e2) \<in> fset xs; e2 \<in> darcs t1\<rbrakk> \<Longrightarrow> 2 \<le> count (darcs_mset (Node r xs)) e2
[PROOF STEP]
unfolding darcs_mset_alt
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(t1, e1) \<in> fset xs; (t2, e2) \<in> fset xs; e2 \<in> darcs t1\<rbrakk> \<Longrightarrow> 2 \<le> count ((\<Sum>(t, e)\<in>fset xs. {#e#}) + (\<Sum>(t, e)\<in>fset xs. darcs_mset t)) e2
[PROOF STEP]
by (metis darcs_child_count_ge1 darcs_snd_count_ge1 add_mono count_union one_add_one)


[STATEMENT]
lemma extended_hyperb_ineq_4_points' [mono_intros]:
  "Min {extended_Gromov_product_at (e::'a::Gromov_hyperbolic_space) x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + 2 * deltaG(TYPE('a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Min {extended_Gromov_product_at e x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + ereal (2 * deltaG TYPE('a))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Min {extended_Gromov_product_at e x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + ereal (2 * deltaG TYPE('a))
[PROOF STEP]
have "min (extended_Gromov_product_at e x y + 0) (min (extended_Gromov_product_at e y z) (extended_Gromov_product_at e z t))
        \<le> min (extended_Gromov_product_at e x y + deltaG(TYPE('a))) (extended_Gromov_product_at e y t + deltaG(TYPE('a))) "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. min (extended_Gromov_product_at e x y + 0) (min (extended_Gromov_product_at e y z) (extended_Gromov_product_at e z t)) \<le> min (extended_Gromov_product_at e x y + ereal (deltaG TYPE('a))) (extended_Gromov_product_at e y t + ereal (deltaG TYPE('a)))
[PROOF STEP]
by (intro mono_intros)
[PROOF STATE]
proof (state)
this:
min (extended_Gromov_product_at e x y + 0) (min (extended_Gromov_product_at e y z) (extended_Gromov_product_at e z t)) \<le> min (extended_Gromov_product_at e x y + ereal (deltaG TYPE('a))) (extended_Gromov_product_at e y t + ereal (deltaG TYPE('a)))

goal (1 subgoal):
 1. Min {extended_Gromov_product_at e x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + ereal (2 * deltaG TYPE('a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
min (extended_Gromov_product_at e x y + 0) (min (extended_Gromov_product_at e y z) (extended_Gromov_product_at e z t)) \<le> min (extended_Gromov_product_at e x y + ereal (deltaG TYPE('a))) (extended_Gromov_product_at e y t + ereal (deltaG TYPE('a)))

goal (1 subgoal):
 1. Min {extended_Gromov_product_at e x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + ereal (2 * deltaG TYPE('a))
[PROOF STEP]
have "... = min (extended_Gromov_product_at e x y) (extended_Gromov_product_at e y t) + deltaG(TYPE('a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. min (extended_Gromov_product_at e x y + ereal (deltaG TYPE('a))) (extended_Gromov_product_at e y t + ereal (deltaG TYPE('a))) = min (extended_Gromov_product_at e x y) (extended_Gromov_product_at e y t) + ereal (deltaG TYPE('a))
[PROOF STEP]
by (simp add: add_mono_thms_linordered_semiring(3) dual_order.antisym min_def)
[PROOF STATE]
proof (state)
this:
min (extended_Gromov_product_at e x y + ereal (deltaG TYPE('a))) (extended_Gromov_product_at e y t + ereal (deltaG TYPE('a))) = min (extended_Gromov_product_at e x y) (extended_Gromov_product_at e y t) + ereal (deltaG TYPE('a))

goal (1 subgoal):
 1. Min {extended_Gromov_product_at e x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + ereal (2 * deltaG TYPE('a))
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
min (extended_Gromov_product_at e x y + ereal (deltaG TYPE('a))) (extended_Gromov_product_at e y t + ereal (deltaG TYPE('a))) = min (extended_Gromov_product_at e x y) (extended_Gromov_product_at e y t) + ereal (deltaG TYPE('a))

goal (1 subgoal):
 1. Min {extended_Gromov_product_at e x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + ereal (2 * deltaG TYPE('a))
[PROOF STEP]
have "... \<le> (extended_Gromov_product_at e x t + deltaG(TYPE('a))) + deltaG(TYPE('a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. min (extended_Gromov_product_at e x y) (extended_Gromov_product_at e y t) + ereal (deltaG TYPE('a)) \<le> extended_Gromov_product_at e x t + ereal (deltaG TYPE('a)) + ereal (deltaG TYPE('a))
[PROOF STEP]
by (intro mono_intros)
[PROOF STATE]
proof (state)
this:
min (extended_Gromov_product_at e x y) (extended_Gromov_product_at e y t) + ereal (deltaG TYPE('a)) \<le> extended_Gromov_product_at e x t + ereal (deltaG TYPE('a)) + ereal (deltaG TYPE('a))

goal (1 subgoal):
 1. Min {extended_Gromov_product_at e x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + ereal (2 * deltaG TYPE('a))
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
min (extended_Gromov_product_at e x y + 0) (min (extended_Gromov_product_at e y z) (extended_Gromov_product_at e z t)) \<le> extended_Gromov_product_at e x t + ereal (deltaG TYPE('a)) + ereal (deltaG TYPE('a))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
min (extended_Gromov_product_at e x y + 0) (min (extended_Gromov_product_at e y z) (extended_Gromov_product_at e z t)) \<le> extended_Gromov_product_at e x t + ereal (deltaG TYPE('a)) + ereal (deltaG TYPE('a))

goal (1 subgoal):
 1. Min {extended_Gromov_product_at e x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + ereal (2 * deltaG TYPE('a))
[PROOF STEP]
apply (auto simp add: algebra_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. min (extended_Gromov_product_at e x y) (min (extended_Gromov_product_at e y z) (extended_Gromov_product_at e z t)) \<le> ereal (deltaG TYPE('a)) + (ereal (deltaG TYPE('a)) + extended_Gromov_product_at e x t) \<Longrightarrow> min (extended_Gromov_product_at e x y) (min (extended_Gromov_product_at e y z) (extended_Gromov_product_at e z t)) \<le> extended_Gromov_product_at e x t + ereal (deltaG TYPE('a) * 2)
[PROOF STEP]
by (metis (no_types, opaque_lifting) add.commute add.left_commute mult_2_right plus_ereal.simps(1))
[PROOF STATE]
proof (state)
this:
Min {extended_Gromov_product_at e x y, extended_Gromov_product_at e y z, extended_Gromov_product_at e z t} \<le> extended_Gromov_product_at e x t + ereal (2 * deltaG TYPE('a))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Buffon_set_altdef1:
  "Buffon_set =
     {(x,\<phi>) \<in> {-d/2..d/2} \<times> {-pi..pi}.
         let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi>
         in  min a b + d/2 \<le> 0 \<and> max a b + d/2 \<ge> 0 \<or> min a b - d/2 \<le> 0 \<and> max a b - d/2 \<ge> 0}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Buffon_set = {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)}
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. Buffon_set = {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)}
[PROOF STEP]
have "(\<lambda>(x,\<phi>). needle l x \<phi> \<inter> {-d/2, d/2} \<noteq> {}) =
      (\<lambda>(x,\<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi>
               in  -d/2 \<ge> min a b \<and> -d/2 \<le> max a b \<or> min a b \<le> d/2 \<and> max a b \<ge> d/2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(x, \<phi>). needle l x \<phi> \<inter> {- d / 2, d / 2} \<noteq> {}) = (\<lambda>(x, \<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b \<le> - d / 2 \<and> - d / 2 \<le> max a b \<or> min a b \<le> d / 2 \<and> d / 2 \<le> max a b)
[PROOF STEP]
by (auto simp: needle_def Let_def closed_segment_eq_real_ivl min_def max_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>(x, \<phi>). needle l x \<phi> \<inter> {- d / 2, d / 2} \<noteq> {}) = (\<lambda>(x, \<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b \<le> - d / 2 \<and> - d / 2 \<le> max a b \<or> min a b \<le> d / 2 \<and> d / 2 \<le> max a b)

goal (1 subgoal):
 1. Buffon_set = {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)}
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<lambda>(x, \<phi>). needle l x \<phi> \<inter> {- d / 2, d / 2} \<noteq> {}) = (\<lambda>(x, \<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b \<le> - d / 2 \<and> - d / 2 \<le> max a b \<or> min a b \<le> d / 2 \<and> d / 2 \<le> max a b)

goal (1 subgoal):
 1. Buffon_set = {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)}
[PROOF STEP]
have "\<dots> =
    (\<lambda>(x,\<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi>
             in  min a b + d/2 \<le> 0 \<and> max a b + d/2 \<ge> 0 \<or> min a b - d/2 \<le> 0 \<and> max a b - d/2 \<ge> 0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>(x, \<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b \<le> - d / 2 \<and> - d / 2 \<le> max a b \<or> min a b \<le> d / 2 \<and> d / 2 \<le> max a b) = (\<lambda>(x, \<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)
[PROOF STEP]
by (auto simp add: algebra_simps Let_def)
[PROOF STATE]
proof (state)
this:
(\<lambda>(x, \<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b \<le> - d / 2 \<and> - d / 2 \<le> max a b \<or> min a b \<le> d / 2 \<and> d / 2 \<le> max a b) = (\<lambda>(x, \<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)

goal (1 subgoal):
 1. Buffon_set = {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)}
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<lambda>(x, \<phi>). needle l x \<phi> \<inter> {- d / 2, d / 2} \<noteq> {}) = (\<lambda>(x, \<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<lambda>(x, \<phi>). needle l x \<phi> \<inter> {- d / 2, d / 2} \<noteq> {}) = (\<lambda>(x, \<phi>). let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)

goal (1 subgoal):
 1. Buffon_set = {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)}
[PROOF STEP]
unfolding Buffon_set_def case_prod_unfold
[PROOF STATE]
proof (prove)
using this:
(\<lambda>p. needle l (fst p) (snd p) \<inter> {- d / 2, d / 2} \<noteq> {}) = (\<lambda>p. let a = fst p - l / 2 * sin (snd p); b = fst p + l / 2 * sin (snd p) in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)

goal (1 subgoal):
 1. {p. (fst p, snd p) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> needle l (fst p) (snd p) \<inter> {- d / 2, d / 2} \<noteq> {}} = {p. (fst p, snd p) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> (let a = fst p - l / 2 * sin (snd p); b = fst p + l / 2 * sin (snd p) in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)}
[PROOF STEP]
by (intro Collect_cong conj_cong refl) meson
[PROOF STATE]
proof (state)
this:
Buffon_set = {(x, \<phi>). (x, \<phi>) \<in> {- d / 2..d / 2} \<times> {- pi..pi} \<and> (let a = x - l / 2 * sin \<phi>; b = x + l / 2 * sin \<phi> in min a b + d / 2 \<le> 0 \<and> 0 \<le> max a b + d / 2 \<or> min a b - d / 2 \<le> 0 \<and> 0 \<le> max a b - d / 2)}

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bex1_equality: "\<lbrakk> \<exists>!x\<in>A. P x; x\<in>A; P x; y\<in>A; P y \<rbrakk> \<Longrightarrow> x=y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<exists>!x. x \<in> A \<and> P x; x \<in> A; P x; y \<in> A; P y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
by blast


[STATEMENT]
lemma tan_conv_tanh: "tan z = -\<i> * tanh (\<i>*z)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tan z = - \<i> * tanh (\<i> * z)
[PROOF STEP]
by (simp add: tan_def sin_conv_sinh cos_conv_cosh tanh_def)


[STATEMENT]
lemma \<Delta>\<Phi>_merge:
  "\<Phi> (merge h1 h2) - \<Phi> h1 - \<Phi> h2
  \<le> log 2 (size_hp h1 + size_hp h2 + 1) + 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Phi> (merge h1 h2) - \<Phi> h1 - \<Phi> h2 \<le> log 2 (real (size_hp h1 + size_hp h2 + 1)) + 1
[PROOF STEP]
proof(induction h1 h2 rule: merge.induct)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>h. \<Phi> (merge h heap.Empty) - \<Phi> h - \<Phi> heap.Empty \<le> log 2 (real (size_hp h + size_hp heap.Empty + 1)) + 1
 2. \<And>v va. \<Phi> (merge heap.Empty (Hp v va)) - \<Phi> heap.Empty - \<Phi> (Hp v va) \<le> log 2 (real (size_hp heap.Empty + size_hp (Hp v va) + 1)) + 1
 3. \<And>x hsx y hsy. \<Phi> (merge (Hp x hsx) (Hp y hsy)) - \<Phi> (Hp x hsx) - \<Phi> (Hp y hsy) \<le> log 2 (real (size_hp (Hp x hsx) + size_hp (Hp y hsy) + 1)) + 1
[PROOF STEP]
case (3 x lx y ly)
[PROOF STATE]
proof (state)
this:

goal (3 subgoals):
 1. \<And>h. \<Phi> (merge h heap.Empty) - \<Phi> h - \<Phi> heap.Empty \<le> log 2 (real (size_hp h + size_hp heap.Empty + 1)) + 1
 2. \<And>v va. \<Phi> (merge heap.Empty (Hp v va)) - \<Phi> heap.Empty - \<Phi> (Hp v va) \<le> log 2 (real (size_hp heap.Empty + size_hp (Hp v va) + 1)) + 1
 3. \<And>x hsx y hsy. \<Phi> (merge (Hp x hsx) (Hp y hsy)) - \<Phi> (Hp x hsx) - \<Phi> (Hp y hsy) \<le> log 2 (real (size_hp (Hp x hsx) + size_hp (Hp y hsy) + 1)) + 1
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<Phi> (merge (Hp x lx) (Hp y ly)) - \<Phi> (Hp x lx) - \<Phi> (Hp y ly) \<le> log 2 (real (size_hp (Hp x lx) + size_hp (Hp y ly) + 1)) + 1
[PROOF STEP]
using ld_le_2ld[of "size_hps lx" "size_hps ly"]
      log_le_cancel_iff[of 2 "size_hps lx + size_hps ly + 2" "size_hps lx + size_hps ly + 3"]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 \<le> real (size_hps lx); 0 \<le> real (size_hps ly)\<rbrakk> \<Longrightarrow> log 2 (1 + real (size_hps lx) + real (size_hps ly)) \<le> 1 + log 2 (1 + real (size_hps lx)) + log 2 (1 + real (size_hps ly))
\<lbrakk>1 < 2; 0 < real (size_hps lx + size_hps ly + 2); 0 < real (size_hps lx + size_hps ly + 3)\<rbrakk> \<Longrightarrow> (log 2 (real (size_hps lx + size_hps ly + 2)) \<le> log 2 (real (size_hps lx + size_hps ly + 3))) = (real (size_hps lx + size_hps ly + 2) \<le> real (size_hps lx + size_hps ly + 3))

goal (1 subgoal):
 1. \<Phi> (merge (Hp x lx) (Hp y ly)) - \<Phi> (Hp x lx) - \<Phi> (Hp y ly) \<le> log 2 (real (size_hp (Hp x lx) + size_hp (Hp y ly) + 1)) + 1
[PROOF STEP]
by (auto simp del: log_le_cancel_iff)
[PROOF STATE]
proof (state)
this:
\<Phi> (merge (Hp x lx) (Hp y ly)) - \<Phi> (Hp x lx) - \<Phi> (Hp y ly) \<le> log 2 (real (size_hp (Hp x lx) + size_hp (Hp y ly) + 1)) + 1

goal (2 subgoals):
 1. \<And>h. \<Phi> (merge h heap.Empty) - \<Phi> h - \<Phi> heap.Empty \<le> log 2 (real (size_hp h + size_hp heap.Empty + 1)) + 1
 2. \<And>v va. \<Phi> (merge heap.Empty (Hp v va)) - \<Phi> heap.Empty - \<Phi> (Hp v va) \<le> log 2 (real (size_hp heap.Empty + size_hp (Hp v va) + 1)) + 1
[PROOF STEP]
qed auto


[STATEMENT]
lemma reaches_on_takeWhile: "reaches_on r s vs s' \<Longrightarrow> r s' = Some (s'', v) \<Longrightarrow> \<not>f v \<Longrightarrow>
  vs' = takeWhile f vs \<Longrightarrow>
  \<exists>t' t'' v'. reaches_on r s vs' t' \<and> r t' = Some (t'', v') \<and> \<not>f v' \<and>
  reaches_on r t' (drop (length vs') vs) s'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>reaches_on r s vs s'; r s' = Some (s'', v); \<not> f v; vs' = takeWhile f vs\<rbrakk> \<Longrightarrow> \<exists>t' t'' v'. reaches_on r s vs' t' \<and> r t' = Some (t'', v') \<and> \<not> f v' \<and> reaches_on r t' (drop (length vs') vs) s'
[PROOF STEP]
by (induction s vs s' arbitrary: vs' rule: reaches_on.induct) (auto intro: reaches_on.intros)


[STATEMENT]
lemma closure_of_eq_diff: "X closure_of S = topspace X - \<Union>{T. openin X T \<and> disjnt S T}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X closure_of S = topspace X - \<Union> {T. openin X T \<and> disjnt S T}
[PROOF STEP]
by (auto simp: closure_of_def disjnt_iff)


[STATEMENT]
lemma univalent_linorder_matrix:
  fixes f :: "('a::finite,'b::linorder_stone_relation_algebra_expansion) square"
  shows "matrix_stone_relation_algebra.univalent f \<longleftrightarrow> (\<forall>i j k . f (i,j) \<noteq> bot \<and> f (i,k) \<noteq> bot \<longrightarrow> j = k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_stone_relation_algebra.univalent f = (\<forall>i j k. f (i, j) \<noteq> bot \<and> f (i, k) \<noteq> bot \<longrightarrow> j = k)
[PROOF STEP]
using univalent_linorder_matrix_1 univalent_linorder_matrix_2
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>matrix_stone_relation_algebra.univalent ?f; ?f (?i, ?j) \<noteq> bot; ?f (?i, ?k) \<noteq> bot\<rbrakk> \<Longrightarrow> ?j = ?k
\<forall>i j k. ?f (i, j) \<noteq> bot \<and> ?f (i, k) \<noteq> bot \<longrightarrow> j = k \<Longrightarrow> matrix_stone_relation_algebra.univalent ?f

goal (1 subgoal):
 1. matrix_stone_relation_algebra.univalent f = (\<forall>i j k. f (i, j) \<noteq> bot \<and> f (i, k) \<noteq> bot \<longrightarrow> j = k)
[PROOF STEP]
by auto


[STATEMENT]
lemma minimal_equivalence_size_r :
  assumes "minimal M1"
  and     "minimal M2"
  and     "observable M1"
  and     "observable M2"
  and     "L M1 = L M2"
shows "size_r M1 = size_r M2"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. size_r M1 = size_r M2
[PROOF STEP]
using observable_minimal_size_r_language_distinct[OF assms(1-4)]
        observable_minimal_size_r_language_distinct[OF assms(2,1,4,3)]
        assms(5)
[PROOF STATE]
proof (prove)
using this:
size_r M1 < size_r M2 \<Longrightarrow> L M1 \<noteq> L M2
size_r M2 < size_r M1 \<Longrightarrow> L M2 \<noteq> L M1
L M1 = L M2

goal (1 subgoal):
 1. size_r M1 = size_r M2
[PROOF STEP]
using nat_neq_iff
[PROOF STATE]
proof (prove)
using this:
size_r M1 < size_r M2 \<Longrightarrow> L M1 \<noteq> L M2
size_r M2 < size_r M1 \<Longrightarrow> L M2 \<noteq> L M1
L M1 = L M2
(?m \<noteq> ?n) = (?m < ?n \<or> ?n < ?m)

goal (1 subgoal):
 1. size_r M1 = size_r M2
[PROOF STEP]
by auto


[STATEMENT]
lemma eval_poly_as_sum:
  fixes h :: "'a :: zero \<Rightarrow> 'b :: comm_semiring_1"
  assumes "h 0 = 0"
  shows "eval_poly h p x = (\<Sum>i\<le>degree p. x^i * h (coeff p i))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval_poly h p x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i))
[PROOF STEP]
unfolding eval_poly_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i))
[PROOF STEP]
proof (induct p)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. poly (map_poly h 0) x = (\<Sum>i\<le>degree 0. x ^ i * h (coeff 0 i))
 2. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i))\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
case 0
[PROOF STATE]
proof (state)
this:

goal (2 subgoals):
 1. poly (map_poly h 0) x = (\<Sum>i\<le>degree 0. x ^ i * h (coeff 0 i))
 2. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i))\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (map_poly h 0) x = (\<Sum>i\<le>degree 0. x ^ i * h (coeff 0 i))
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
h (0::'a) = (0::'b)

goal (1 subgoal):
 1. poly (map_poly h 0) x = (\<Sum>i\<le>degree 0. x ^ i * h (coeff 0 i))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
poly (map_poly h 0) x = (\<Sum>i\<le>degree 0. x ^ i * h (coeff 0 i))

goal (1 subgoal):
 1. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i))\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i))\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
case (pCons a p)
[PROOF STATE]
proof (state)
this:
a \<noteq> (0::'a) \<or> p \<noteq> 0
poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i))

goal (1 subgoal):
 1. \<And>a p. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i))\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
thus ?case
[PROOF STATE]
proof (prove)
using this:
a \<noteq> (0::'a) \<or> p \<noteq> 0
poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i))

goal (1 subgoal):
 1. poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
proof (cases "p = 0")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i)); p = 0\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
 2. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i)); p \<noteq> 0\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
p = 0

goal (2 subgoals):
 1. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i)); p = 0\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
 2. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i)); p \<noteq> 0\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
by (simp add: True map_poly_simps assms)
[PROOF STATE]
proof (state)
this:
poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))

goal (1 subgoal):
 1. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i)); p \<noteq> 0\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i)); p \<noteq> 0\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
p \<noteq> 0

goal (1 subgoal):
 1. \<lbrakk>a \<noteq> (0::'a) \<or> p \<noteq> 0; poly (map_poly h p) x = (\<Sum>i\<le>degree p. x ^ i * h (coeff p i)); p \<noteq> 0\<rbrakk> \<Longrightarrow> poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
unfolding degree_pCons_eq[OF False]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>Suc (degree p). x ^ i * h (coeff (pCons a p) i))
[PROOF STEP]
unfolding sum.atMost_Suc_shift
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (map_poly h (pCons a p)) x = x ^ 0 * h (coeff (pCons a p) 0) + (\<Sum>i\<le>degree p. x ^ Suc i * h (coeff (pCons a p) (Suc i)))
[PROOF STEP]
unfolding map_poly_pCons[OF pCons(1)]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (pCons (h a) (map_poly h p)) x = x ^ 0 * h (coeff (pCons a p) 0) + (\<Sum>i\<le>degree p. x ^ Suc i * h (coeff (pCons a p) (Suc i)))
[PROOF STEP]
by (simp add: pCons(2) sum_distrib_left mult.assoc)
[PROOF STATE]
proof (state)
this:
poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
poly (map_poly h (pCons a p)) x = (\<Sum>i\<le>degree (pCons a p). x ^ i * h (coeff (pCons a p) i))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma equiv_out_trans: "\<lbrakk> equiv_out a b; equiv_out b c \<rbrakk> \<Longrightarrow> equiv_out a c"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>equiv_out a b; equiv_out b c\<rbrakk> \<Longrightarrow> equiv_out a c
[PROOF STEP]
using equiv_class_eq_iff equiv_out_equiv
[PROOF STATE]
proof (prove)
using this:
equiv ?A ?r \<Longrightarrow> ((?x, ?y) \<in> ?r) = (?r `` {?x} = ?r `` {?y} \<and> ?x \<in> ?A \<and> ?y \<in> ?A)
equiv UNIV {(x, y). equiv_out x y}

goal (1 subgoal):
 1. \<lbrakk>equiv_out a b; equiv_out b c\<rbrakk> \<Longrightarrow> equiv_out a c
[PROOF STEP]
by fastforce


[STATEMENT]
lemma homotopy_equivalence_relative_homology_group_isomorphism:
  assumes "continuous_map X Y f" and fim: "f ` S \<subseteq> T"
      and "continuous_map Y X g" and gim: "g ` T \<subseteq> S"
      and "homotopic_with (\<lambda>h. h ` S \<subseteq> S) X X (g \<circ> f) id"
      and "homotopic_with (\<lambda>k. k ` T \<subseteq> T) Y Y (f \<circ> g) id"
    shows "(hom_induced p X S Y T f) \<in> iso (relative_homology_group p X S) (relative_homology_group p Y T)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hom_induced p X S Y T f \<in> Group.iso (relative_homology_group p X S) (relative_homology_group p Y T)
[PROOF STEP]
using homotopy_equivalence_relative_homology_group_isomorphisms [OF assms] group_isomorphisms_imp_iso
[PROOF STATE]
proof (prove)
using this:
group_isomorphisms (relative_homology_group ?p X S) (relative_homology_group ?p Y T) (hom_induced ?p X S Y T f) (hom_induced ?p Y T X S g)
group_isomorphisms ?G ?H ?f ?g \<Longrightarrow> ?f \<in> Group.iso ?G ?H

goal (1 subgoal):
 1. hom_induced p X S Y T f \<in> Group.iso (relative_homology_group p X S) (relative_homology_group p Y T)
[PROOF STEP]
by metis


[STATEMENT]
lemma "~~(P | ~P)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> \<not> (P \<or> \<not> P)
[PROOF STEP]
by iprover


[STATEMENT]
lemma closure_finite[simp]: "closure X = X" if "finite X" for X::"'a::t1_space set"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. closure X = X
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
finite X

goal (1 subgoal):
 1. closure X = X
[PROOF STEP]
by (induction X) (simp_all add: closure_insert)


[STATEMENT]
lemma hyp2_rep_abs:
  assumes "norm v < 1"
  shows "hyp2_rep (hyp2_abs v) = v"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. hyp2_rep (hyp2_abs v) = v
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. hyp2_rep (hyp2_abs v) = v
[PROOF STEP]
from \<open>norm v < 1\<close>
[PROOF STATE]
proof (chain)
picking this:
norm v < 1
[PROOF STEP]
have "proj2_pt v \<in> hyp2"
[PROOF STATE]
proof (prove)
using this:
norm v < 1

goal (1 subgoal):
 1. proj2_pt v \<in> hyp2
[PROOF STEP]
by (simp add: norm_lt_1_iff_in_hyp2)
[PROOF STATE]
proof (state)
this:
proj2_pt v \<in> hyp2

goal (1 subgoal):
 1. hyp2_rep (hyp2_abs v) = v
[PROOF STEP]
hence "Rep_hyp2 (Abs_hyp2 (proj2_pt v)) = proj2_pt v"
[PROOF STATE]
proof (prove)
using this:
proj2_pt v \<in> hyp2

goal (1 subgoal):
 1. Rep_hyp2 (Abs_hyp2 (proj2_pt v)) = proj2_pt v
[PROOF STEP]
by (simp add: Abs_hyp2_inverse)
[PROOF STATE]
proof (state)
this:
Rep_hyp2 (Abs_hyp2 (proj2_pt v)) = proj2_pt v

goal (1 subgoal):
 1. hyp2_rep (hyp2_abs v) = v
[PROOF STEP]
hence "hyp2_rep (hyp2_abs v) = cart2_pt (proj2_pt v)"
[PROOF STATE]
proof (prove)
using this:
Rep_hyp2 (Abs_hyp2 (proj2_pt v)) = proj2_pt v

goal (1 subgoal):
 1. hyp2_rep (hyp2_abs v) = cart2_pt (proj2_pt v)
[PROOF STEP]
by (unfold hyp2_rep_def hyp2_abs_def) simp
[PROOF STATE]
proof (state)
this:
hyp2_rep (hyp2_abs v) = cart2_pt (proj2_pt v)

goal (1 subgoal):
 1. hyp2_rep (hyp2_abs v) = v
[PROOF STEP]
thus "hyp2_rep (hyp2_abs v) = v"
[PROOF STATE]
proof (prove)
using this:
hyp2_rep (hyp2_abs v) = cart2_pt (proj2_pt v)

goal (1 subgoal):
 1. hyp2_rep (hyp2_abs v) = v
[PROOF STEP]
by (simp add: cart2_proj2)
[PROOF STATE]
proof (state)
this:
hyp2_rep (hyp2_abs v) = v

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma not_cong_3412:
  assumes "\<not> Cong A B C D"
  shows "\<not> Cong C D A B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> Cong C D A B
[PROOF STEP]
using assms cong_symmetry
[PROOF STATE]
proof (prove)
using this:
\<not> Cong A B C D
Cong ?A ?B ?C ?D \<Longrightarrow> Cong ?C ?D ?A ?B

goal (1 subgoal):
 1. \<not> Cong C D A B
[PROOF STEP]
by blast


[STATEMENT]
lemma rbtreeify_fD:
  "\<lbrakk> rbtreeify_f n kvs = (t, kvs'); n \<le> length kvs \<rbrakk>
  \<Longrightarrow> entries t = take n kvs \<and> kvs' = drop n kvs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>rbtreeify_f n kvs = (t, kvs'); n \<le> length kvs\<rbrakk> \<Longrightarrow> entries t = take n kvs \<and> kvs' = drop n kvs
[PROOF STEP]
using rbtreeify_f_conv_drop[of n kvs] entries_rbtreeify_f[of n kvs]
[PROOF STATE]
proof (prove)
using this:
n \<le> length kvs \<Longrightarrow> snd (rbtreeify_f n kvs) = drop n kvs
n \<le> length kvs \<Longrightarrow> entries (fst (rbtreeify_f n kvs)) = take n kvs

goal (1 subgoal):
 1. \<lbrakk>rbtreeify_f n kvs = (t, kvs'); n \<le> length kvs\<rbrakk> \<Longrightarrow> entries t = take n kvs \<and> kvs' = drop n kvs
[PROOF STEP]
by simp


[STATEMENT]
lemma sum_split:
  "finite I \<Longrightarrow>
  (\<Sum>i \<in> I. if p i then f i else g i) = (\<Sum>i | i \<in> I \<and> p i. f i) + (\<Sum>i | i \<in> I \<and> \<not>p i. g i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite I \<Longrightarrow> (\<Sum>i\<in>I. if p i then f i else g i) = (\<Sum>i | i \<in> I \<and> p i. f i) + (\<Sum>i | i \<in> I \<and> \<not> p i. g i)
[PROOF STEP]
by (simp add: sum.If_cases Int_def)


[STATEMENT]
lemma Lambert_W'_leI:
  assumes "y * exp y \<le> x" "x < 0"
  shows   "Lambert_W' x \<le> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lambert_W' x \<le> y
[PROOF STEP]
proof (cases "y \<le> -1")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
 2. \<not> y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
y \<le> - 1

goal (2 subgoals):
 1. y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
 2. \<not> y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
[PROOF STEP]
have "Lambert_W' x \<le> Lambert_W' (y * exp y)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lambert_W' x \<le> Lambert_W' (y * exp y)
[PROOF STEP]
using assms exp_times_self_ge[of y]
[PROOF STATE]
proof (prove)
using this:
y * exp y \<le> x
x < 0
- exp (- 1) \<le> y * exp y

goal (1 subgoal):
 1. Lambert_W' x \<le> Lambert_W' (y * exp y)
[PROOF STEP]
by (intro Lambert_W'_antimono) auto
[PROOF STATE]
proof (state)
this:
Lambert_W' x \<le> Lambert_W' (y * exp y)

goal (2 subgoals):
 1. y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
 2. \<not> y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
Lambert_W' x \<le> Lambert_W' (y * exp y)

goal (1 subgoal):
 1. Lambert_W' x \<le> y
[PROOF STEP]
using assms True
[PROOF STATE]
proof (prove)
using this:
Lambert_W' x \<le> Lambert_W' (y * exp y)
y * exp y \<le> x
x < 0
y \<le> - 1

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

goal (1 subgoal):
 1. \<not> y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
\<not> y \<le> - 1

goal (1 subgoal):
 1. \<not> y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
[PROOF STEP]
have "Lambert_W' x \<le> -1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Lambert_W' x \<le> - 1
[PROOF STEP]
by (rule Lambert_W'_le)
[PROOF STATE]
proof (state)
this:
Lambert_W' x \<le> - 1

goal (1 subgoal):
 1. \<not> y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
Lambert_W' x \<le> - 1

goal (1 subgoal):
 1. \<not> y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
[PROOF STEP]
have "\<dots> < y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - 1 < y
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
\<not> y \<le> - 1

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

goal (1 subgoal):
 1. \<not> y \<le> - 1 \<Longrightarrow> Lambert_W' x \<le> y
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
Lambert_W' x < y
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
Lambert_W' x < y

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

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma append_lists_of_length_alt_def :
  "append_sets T (lists_of_length X (Suc n)) = append_set (append_sets T (lists_of_length X n)) X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. append_sets T (lists_of_length X (Suc n)) = append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. append_sets T (lists_of_length X (Suc n)) \<subseteq> append_set (append_sets T (lists_of_length X n)) X
 2. append_set (append_sets T (lists_of_length X n)) X \<subseteq> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
show "append_sets T (lists_of_length X (Suc n))
          \<subseteq> append_set (append_sets T (lists_of_length X n)) X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. append_sets T (lists_of_length X (Suc n)) \<subseteq> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
fix tx
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
assume "tx \<in> append_sets T (lists_of_length X (Suc n))"
[PROOF STATE]
proof (state)
this:
tx \<in> append_sets T (lists_of_length X (Suc n))

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
tx \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
obtain t x where "t@x = tx" "t \<in> T" "length x = Suc n" "set x \<subseteq> X"
[PROOF STATE]
proof (prove)
using this:
tx \<in> append_sets T (lists_of_length X (Suc n))

goal (1 subgoal):
 1. (\<And>t x. \<lbrakk>t @ x = tx; t \<in> T; length x = Suc n; set x \<subseteq> X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
t @ x = tx
t \<in> T
length x = Suc n
set x \<subseteq> X

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t @ x = tx
t \<in> T
length x = Suc n
set x \<subseteq> X
[PROOF STEP]
have "x \<noteq> []" "length (butlast x) = n"
[PROOF STATE]
proof (prove)
using this:
t @ x = tx
t \<in> T
length x = Suc n
set x \<subseteq> X

goal (1 subgoal):
 1. x \<noteq> [] &&& length (butlast x) = n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
x \<noteq> []
length (butlast x) = n

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
x \<noteq> []
length (butlast x) = n

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
have "set (butlast x) \<subseteq> X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (butlast x) \<subseteq> X
[PROOF STEP]
using \<open>set x \<subseteq> X\<close>
[PROOF STATE]
proof (prove)
using this:
set x \<subseteq> X

goal (1 subgoal):
 1. set (butlast x) \<subseteq> X
[PROOF STEP]
by (meson dual_order.trans prefixeq_butlast set_mono_prefix)
[PROOF STATE]
proof (state)
this:
set (butlast x) \<subseteq> X

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
x \<noteq> []
length (butlast x) = n
set (butlast x) \<subseteq> X
[PROOF STEP]
have "butlast x \<in> lists_of_length X n"
[PROOF STATE]
proof (prove)
using this:
x \<noteq> []
length (butlast x) = n
set (butlast x) \<subseteq> X

goal (1 subgoal):
 1. butlast x \<in> lists_of_length X n
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
butlast x \<in> lists_of_length X n

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
butlast x \<in> lists_of_length X n
[PROOF STEP]
have "t@(butlast x) \<in> append_sets T (lists_of_length X n)"
[PROOF STATE]
proof (prove)
using this:
butlast x \<in> lists_of_length X n

goal (1 subgoal):
 1. t @ butlast x \<in> append_sets T (lists_of_length X n)
[PROOF STEP]
using \<open>t \<in> T\<close>
[PROOF STATE]
proof (prove)
using this:
butlast x \<in> lists_of_length X n
t \<in> T

goal (1 subgoal):
 1. t @ butlast x \<in> append_sets T (lists_of_length X n)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
t @ butlast x \<in> append_sets T (lists_of_length X n)

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
t @ butlast x \<in> append_sets T (lists_of_length X n)

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
have "last x \<in> X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. last x \<in> X
[PROOF STEP]
using \<open>set x \<subseteq> X\<close> \<open>x \<noteq> []\<close>
[PROOF STATE]
proof (prove)
using this:
set x \<subseteq> X
x \<noteq> []

goal (1 subgoal):
 1. last x \<in> X
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
last x \<in> X

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
t @ butlast x \<in> append_sets T (lists_of_length X n)
last x \<in> X
[PROOF STEP]
have "t@(butlast x)@[last x] \<in> append_set (append_sets T (lists_of_length X n)) X"
[PROOF STATE]
proof (prove)
using this:
t @ butlast x \<in> append_sets T (lists_of_length X n)
last x \<in> X

goal (1 subgoal):
 1. t @ butlast x @ [last x] \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
t @ butlast x @ [last x] \<in> append_set (append_sets T (lists_of_length X n)) X

goal (1 subgoal):
 1. \<And>x. x \<in> append_sets T (lists_of_length X (Suc n)) \<Longrightarrow> x \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
t @ butlast x @ [last x] \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
show "tx \<in> append_set (append_sets T (lists_of_length X n)) X"
[PROOF STATE]
proof (prove)
using this:
t @ butlast x @ [last x] \<in> append_set (append_sets T (lists_of_length X n)) X

goal (1 subgoal):
 1. tx \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
using \<open>t@x = tx\<close>
[PROOF STATE]
proof (prove)
using this:
t @ butlast x @ [last x] \<in> append_set (append_sets T (lists_of_length X n)) X
t @ x = tx

goal (1 subgoal):
 1. tx \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
by (simp add: \<open>x \<noteq> []\<close>)
[PROOF STATE]
proof (state)
this:
tx \<in> append_set (append_sets T (lists_of_length X n)) X

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
append_sets T (lists_of_length X (Suc n)) \<subseteq> append_set (append_sets T (lists_of_length X n)) X

goal (1 subgoal):
 1. append_set (append_sets T (lists_of_length X n)) X \<subseteq> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
show "append_set (append_sets T (lists_of_length X n)) X
          \<subseteq> append_sets T (lists_of_length X (Suc n))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. append_set (append_sets T (lists_of_length X n)) X \<subseteq> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
fix tx
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
assume "tx \<in> append_set (append_sets T (lists_of_length X n)) X"
[PROOF STATE]
proof (state)
this:
tx \<in> append_set (append_sets T (lists_of_length X n)) X

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
tx \<in> append_set (append_sets T (lists_of_length X n)) X
[PROOF STEP]
obtain tx' x where "tx = tx' @ [x]" "tx' \<in> append_sets T (lists_of_length X n)" "x \<in> X"
[PROOF STATE]
proof (prove)
using this:
tx \<in> append_set (append_sets T (lists_of_length X n)) X

goal (1 subgoal):
 1. (\<And>tx' x. \<lbrakk>tx = tx' @ [x]; tx' \<in> append_sets T (lists_of_length X n); x \<in> X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
tx = tx' @ [x]
tx' \<in> append_sets T (lists_of_length X n)
x \<in> X

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
tx = tx' @ [x]
tx' \<in> append_sets T (lists_of_length X n)
x \<in> X
[PROOF STEP]
obtain tx'' x' where "tx''@x' = tx'" "tx'' \<in> T" "length x' = n" "set x' \<subseteq> X"
[PROOF STATE]
proof (prove)
using this:
tx = tx' @ [x]
tx' \<in> append_sets T (lists_of_length X n)
x \<in> X

goal (1 subgoal):
 1. (\<And>tx'' x'. \<lbrakk>tx'' @ x' = tx'; tx'' \<in> T; length x' = n; set x' \<subseteq> X\<rbrakk> \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
tx'' @ x' = tx'
tx'' \<in> T
length x' = n
set x' \<subseteq> X

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
tx'' @ x' = tx'
tx'' \<in> T
length x' = n
set x' \<subseteq> X
[PROOF STEP]
have "tx''@x'@[x] = tx"
[PROOF STATE]
proof (prove)
using this:
tx'' @ x' = tx'
tx'' \<in> T
length x' = n
set x' \<subseteq> X

goal (1 subgoal):
 1. tx'' @ x' @ [x] = tx
[PROOF STEP]
by (simp add: \<open>tx = tx' @ [x]\<close>)
[PROOF STATE]
proof (state)
this:
tx'' @ x' @ [x] = tx

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
tx'' @ x' @ [x] = tx

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
have "tx'' \<in> T"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tx'' \<in> T
[PROOF STEP]
by (meson \<open>tx'' \<in> T\<close>)
[PROOF STATE]
proof (state)
this:
tx'' \<in> T

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
tx'' \<in> T

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
have "length (x'@[x]) = Suc n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. length (x' @ [x]) = Suc n
[PROOF STEP]
by (simp add: \<open>length x' = n\<close>)
[PROOF STATE]
proof (state)
this:
length (x' @ [x]) = Suc n

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
length (x' @ [x]) = Suc n

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
have "set (x'@[x]) \<subseteq> X"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (x' @ [x]) \<subseteq> X
[PROOF STEP]
by (simp add: \<open>set x' \<subseteq> X\<close> \<open>x \<in> X\<close>)
[PROOF STATE]
proof (state)
this:
set (x' @ [x]) \<subseteq> X

goal (1 subgoal):
 1. \<And>x. x \<in> append_set (append_sets T (lists_of_length X n)) X \<Longrightarrow> x \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
tx'' @ x' @ [x] = tx
tx'' \<in> T
length (x' @ [x]) = Suc n
set (x' @ [x]) \<subseteq> X
[PROOF STEP]
show "tx \<in> append_sets T (lists_of_length X (Suc n))"
[PROOF STATE]
proof (prove)
using this:
tx'' @ x' @ [x] = tx
tx'' \<in> T
length (x' @ [x]) = Suc n
set (x' @ [x]) \<subseteq> X

goal (1 subgoal):
 1. tx \<in> append_sets T (lists_of_length X (Suc n))
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
tx \<in> append_sets T (lists_of_length X (Suc n))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
append_set (append_sets T (lists_of_length X n)) X \<subseteq> append_sets T (lists_of_length X (Suc n))

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma greaterThan_non_empty[simp]: "{x<\<^sub>a..} \<noteq> {}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x<\<^sub>a..} \<noteq> {}
[PROOF STEP]
using gt_ex[of x]
[PROOF STATE]
proof (prove)
using this:
\<exists>y. x <\<^sub>a y

goal (1 subgoal):
 1. {x<\<^sub>a..} \<noteq> {}
[PROOF STEP]
unfolding ray_def
[PROOF STATE]
proof (prove)
using this:
\<exists>y. x <\<^sub>a y

goal (1 subgoal):
 1. {xa \<in> UNIV. x <\<^sub>a xa} \<noteq> {}
[PROOF STEP]
by simp


[STATEMENT]
lemma Subseqs_UNION [simp]: "Subseqs (\<Union>(f ` A)) = \<Union>((\<lambda>x. Subseqs (f x)) ` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Subseqs (\<Union> (f ` A)) = (\<Union>x\<in>A. Subseqs (f x))
[PROOF STEP]
by (simp add: Subseqs_def)


[STATEMENT]
lemma finite_real_int_interval [simp]:
  "finite (range real_of_int \<inter> {a..b})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (range real_of_int \<inter> {a..b})
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. finite (range real_of_int \<inter> {a..b})
[PROOF STEP]
have "range real_of_int \<inter> {a..b} \<subseteq> real_of_int`{floor a..ceiling b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. range real_of_int \<inter> {a..b} \<subseteq> real_of_int ` {\<lfloor>a\<rfloor>..\<lceil>b\<rceil>}
[PROOF STEP]
by (auto, metis atLeastAtMost_iff ceiling_mono ceiling_of_int floor_mono floor_of_int image_eqI)
[PROOF STATE]
proof (state)
this:
range real_of_int \<inter> {a..b} \<subseteq> real_of_int ` {\<lfloor>a\<rfloor>..\<lceil>b\<rceil>}

goal (1 subgoal):
 1. finite (range real_of_int \<inter> {a..b})
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
range real_of_int \<inter> {a..b} \<subseteq> real_of_int ` {\<lfloor>a\<rfloor>..\<lceil>b\<rceil>}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
range real_of_int \<inter> {a..b} \<subseteq> real_of_int ` {\<lfloor>a\<rfloor>..\<lceil>b\<rceil>}

goal (1 subgoal):
 1. finite (range real_of_int \<inter> {a..b})
[PROOF STEP]
using finite_subset
[PROOF STATE]
proof (prove)
using this:
range real_of_int \<inter> {a..b} \<subseteq> real_of_int ` {\<lfloor>a\<rfloor>..\<lceil>b\<rceil>}
\<lbrakk>?A \<subseteq> ?B; finite ?B\<rbrakk> \<Longrightarrow> finite ?A

goal (1 subgoal):
 1. finite (range real_of_int \<inter> {a..b})
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
finite (range real_of_int \<inter> {a..b})

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fds_abs_converges_of_real [simp]:
  "fds_abs_converges (fds_of_real f)
     (of_real s :: 'a :: {nat_power_normed_field,banach}) \<longleftrightarrow> fds_abs_converges f s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fds_abs_converges (fds_of_real f) (of_real s) = fds_abs_converges f s
[PROOF STEP]
unfolding fds_abs_converges_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. summable (\<lambda>n. norm (fds_nth (fds_of_real f) n / nat_power n (of_real s))) = summable (\<lambda>n. norm (fds_nth f n / nat_power n s))
[PROOF STEP]
by (subst (1 2) summable_Suc_iff [symmetric]) (simp add: norm_divide norm_nat_power)


[STATEMENT]
lemma span_subsetI: assumes ws: "ws \<subseteq> carrier_vec n"
  "us \<subseteq> span ws"
shows "span us \<subseteq> span ws"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. local.span us \<subseteq> local.span ws
[PROOF STEP]
by (simp add: assms(1) span_is_submodule span_is_subset subsetI ws)


[STATEMENT]
lemma is_le_rel_trans_le_right:
  assumes "is_le_rel rel"
  shows "rel x y \<Longrightarrow> y \<le> z \<Longrightarrow> x \<le> z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>rel x y; y \<le> z\<rbrakk> \<Longrightarrow> x \<le> z
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
is_le_rel rel

goal (1 subgoal):
 1. \<lbrakk>rel x y; y \<le> z\<rbrakk> \<Longrightarrow> x \<le> z
[PROOF STEP]
by (rule is_le_relE, auto dest: order_trans less_le_trans less_imp_le)


[STATEMENT]
lemma fps_exp_eq_iff [simp]: "fps_exp c = fps_exp d \<longleftrightarrow> c = (d :: 'a :: field_char_0)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (fps_exp c = fps_exp d) = (c = d)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. fps_exp c = fps_exp d \<Longrightarrow> c = d
 2. c = d \<Longrightarrow> fps_exp c = fps_exp d
[PROOF STEP]
assume "fps_exp c = fps_exp d"
[PROOF STATE]
proof (state)
this:
fps_exp c = fps_exp d

goal (2 subgoals):
 1. fps_exp c = fps_exp d \<Longrightarrow> c = d
 2. c = d \<Longrightarrow> fps_exp c = fps_exp d
[PROOF STEP]
from arg_cong[of _ _ "\<lambda>F. F $ 1", OF this]
[PROOF STATE]
proof (chain)
picking this:
fps_exp c $ 1 = fps_exp d $ 1
[PROOF STEP]
show "c = d"
[PROOF STATE]
proof (prove)
using this:
fps_exp c $ 1 = fps_exp d $ 1

goal (1 subgoal):
 1. c = d
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
c = d

goal (1 subgoal):
 1. c = d \<Longrightarrow> fps_exp c = fps_exp d
[PROOF STEP]
qed simp_all


[STATEMENT]
lemma pos_pp_np_help: "\<And>x. 0\<le>f x \<Longrightarrow> pp f x = f x \<and> np f x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. (0::'b) \<le> f x \<Longrightarrow> pp f x = f x \<and> np f x = (0::'b)
[PROOF STEP]
by (simp add: positive_part_def negative_part_def)


[STATEMENT]
lemma UPairSingleton: "Upair u v = union (Singleton u) (Singleton v)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Upair u v = HOLZF.union (Singleton u) (Singleton v)
[PROOF STEP]
apply (subst Ext)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>z. Elem z (Upair u v) = Elem z (HOLZF.union (Singleton u) (Singleton v))
[PROOF STEP]
apply (subst Upair)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>z. (z = u \<or> z = v) = Elem z (HOLZF.union (Singleton u) (Singleton v))
[PROOF STEP]
apply (subst union)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>z. (z = u \<or> z = v) = (Elem z (Singleton u) \<or> Elem z (Singleton v))
[PROOF STEP]
apply (subst Singleton)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>z. (z = u \<or> z = v) = (z = u \<or> z = v)
[PROOF STEP]
apply (simp)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma derived_set_of_topspace:
  "X derived_set_of (topspace X) = {x \<in> topspace X. \<not> openin X {x}}" (is "?lhs = ?rhs")
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X derived_set_of topspace X = {x \<in> topspace X. \<not> openin X {x}}
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. X derived_set_of topspace X \<subseteq> {x \<in> topspace X. \<not> openin X {x}}
 2. {x \<in> topspace X. \<not> openin X {x}} \<subseteq> X derived_set_of topspace X
[PROOF STEP]
show "?lhs \<subseteq> ?rhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. X derived_set_of topspace X \<subseteq> {x \<in> topspace X. \<not> openin X {x}}
[PROOF STEP]
by (auto simp: in_derived_set_of)
[PROOF STATE]
proof (state)
this:
X derived_set_of topspace X \<subseteq> {x \<in> topspace X. \<not> openin X {x}}

goal (1 subgoal):
 1. {x \<in> topspace X. \<not> openin X {x}} \<subseteq> X derived_set_of topspace X
[PROOF STEP]
show "?rhs \<subseteq> ?lhs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {x \<in> topspace X. \<not> openin X {x}} \<subseteq> X derived_set_of topspace X
[PROOF STEP]
by (clarsimp simp: in_derived_set_of) (metis openin_closedin_eq openin_subopen singletonD subset_eq)
[PROOF STATE]
proof (state)
this:
{x \<in> topspace X. \<not> openin X {x}} \<subseteq> X derived_set_of topspace X

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma conjugation_is_Bij:
  assumes fin:"finite (carrier G)"
  assumes g:"g \<in> carrier G"
  shows "conjugation_action p g \<in> Bij (subgroups_of_size p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. conjugation_action p g \<in> Bij (subgroups_of_size p)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. conjugation_action p g \<in> Bij (subgroups_of_size p)
[PROOF STEP]
from g
[PROOF STATE]
proof (chain)
picking this:
g \<in> carrier G
[PROOF STEP]
have invg:"inv g \<in> carrier G"
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G

goal (1 subgoal):
 1. inv g \<in> carrier G
[PROOF STEP]
by (rule inv_closed)
[PROOF STATE]
proof (state)
this:
inv g \<in> carrier G

goal (1 subgoal):
 1. conjugation_action p g \<in> Bij (subgroups_of_size p)
[PROOF STEP]
from g
[PROOF STATE]
proof (chain)
picking this:
g \<in> carrier G
[PROOF STEP]
have "conjugation_action p g \<in> extensional (subgroups_of_size p)"
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G

goal (1 subgoal):
 1. conjugation_action p g \<in> extensional (subgroups_of_size p)
[PROOF STEP]
unfolding conjugation_action_def
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G

goal (1 subgoal):
 1. (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) g \<in> extensional (subgroups_of_size p)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
conjugation_action p g \<in> extensional (subgroups_of_size p)

goal (1 subgoal):
 1. conjugation_action p g \<in> Bij (subgroups_of_size p)
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
conjugation_action p g \<in> extensional (subgroups_of_size p)

goal (1 subgoal):
 1. conjugation_action p g \<in> Bij (subgroups_of_size p)
[PROOF STEP]
have "bij_betw (conjugation_action p g) (subgroups_of_size p) (subgroups_of_size p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bij_betw (conjugation_action p g) (subgroups_of_size p) (subgroups_of_size p)
[PROOF STEP]
proof(auto simp add:bij_betw_def)
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. inj_on (conjugation_action p g) (subgroups_of_size p)
 2. \<And>xa. xa \<in> subgroups_of_size p \<Longrightarrow> conjugation_action p g xa \<in> subgroups_of_size p
 3. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
show "inj_on (conjugation_action p g) (subgroups_of_size p)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on (conjugation_action p g) (subgroups_of_size p)
[PROOF STEP]
proof(rule inj_onI)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
fix U V
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
assume U:"U \<in> subgroups_of_size p" and V:"V \<in> subgroups_of_size p"
[PROOF STATE]
proof (state)
this:
U \<in> subgroups_of_size p
V \<in> subgroups_of_size p

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence subsetG:"U \<subseteq> carrier G" "V \<subseteq> carrier G"
[PROOF STATE]
proof (prove)
using this:
U \<in> subgroups_of_size p
V \<in> subgroups_of_size p

goal (1 subgoal):
 1. U \<subseteq> carrier G &&& V \<subseteq> carrier G
[PROOF STEP]
unfolding subgroups_of_size_def
[PROOF STATE]
proof (prove)
using this:
U \<in> {H. subgroup H G \<and> card H = p}
V \<in> {H. subgroup H G \<and> card H = p}

goal (1 subgoal):
 1. U \<subseteq> carrier G &&& V \<subseteq> carrier G
[PROOF STEP]
by (metis (lifting) mem_Collect_eq subgroup.subset)+
[PROOF STATE]
proof (state)
this:
U \<subseteq> carrier G
V \<subseteq> carrier G

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence subsetL:"U #> inv g \<subseteq> carrier G" "V #> inv g \<subseteq> carrier G"
[PROOF STATE]
proof (prove)
using this:
U \<subseteq> carrier G
V \<subseteq> carrier G

goal (1 subgoal):
 1. U #> inv g \<subseteq> carrier G &&& V #> inv g \<subseteq> carrier G
[PROOF STEP]
by (metis invg r_coset_subset_G)+
[PROOF STATE]
proof (state)
this:
U #> inv g \<subseteq> carrier G
V #> inv g \<subseteq> carrier G

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
assume "conjugation_action p g U = conjugation_action p g V"
[PROOF STATE]
proof (state)
this:
conjugation_action p g U = conjugation_action p g V

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
with g U V
[PROOF STATE]
proof (chain)
picking this:
g \<in> carrier G
U \<in> subgroups_of_size p
V \<in> subgroups_of_size p
conjugation_action p g U = conjugation_action p g V
[PROOF STEP]
have "g <# (U #> inv g) = g <# (V #> inv g)"
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G
U \<in> subgroups_of_size p
V \<in> subgroups_of_size p
conjugation_action p g U = conjugation_action p g V

goal (1 subgoal):
 1. g <# (U #> inv g) = g <# (V #> inv g)
[PROOF STEP]
unfolding conjugation_action_def
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G
U \<in> subgroups_of_size p
V \<in> subgroups_of_size p
(\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) g U = (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) g V

goal (1 subgoal):
 1. g <# (U #> inv g) = g <# (V #> inv g)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
g <# (U #> inv g) = g <# (V #> inv g)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "(inv g) <# (g <# (U #> inv g)) = (inv g) <# (g <# (V #> inv g))"
[PROOF STATE]
proof (prove)
using this:
g <# (U #> inv g) = g <# (V #> inv g)

goal (1 subgoal):
 1. inv g <# (g <# (U #> inv g)) = inv g <# (g <# (V #> inv g))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
inv g <# (g <# (U #> inv g)) = inv g <# (g <# (V #> inv g))

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "(inv g \<otimes> g) <# (U #> inv g) = (inv g \<otimes> g) <# (V #> inv g)"
[PROOF STATE]
proof (prove)
using this:
inv g <# (g <# (U #> inv g)) = inv g <# (g <# (V #> inv g))

goal (1 subgoal):
 1. inv g \<otimes> g <# (U #> inv g) = inv g \<otimes> g <# (V #> inv g)
[PROOF STEP]
by (metis g invg lcos_m_assoc r_coset_subset_G subsetG)
[PROOF STATE]
proof (state)
this:
inv g \<otimes> g <# (U #> inv g) = inv g \<otimes> g <# (V #> inv g)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "\<one> <# (U #> inv g) = \<one> <# (V #> inv g)"
[PROOF STATE]
proof (prove)
using this:
inv g \<otimes> g <# (U #> inv g) = inv g \<otimes> g <# (V #> inv g)

goal (1 subgoal):
 1. \<one> <# (U #> inv g) = \<one> <# (V #> inv g)
[PROOF STEP]
by (metis g l_inv)
[PROOF STATE]
proof (state)
this:
\<one> <# (U #> inv g) = \<one> <# (V #> inv g)

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "U #> inv g = V #> inv g"
[PROOF STATE]
proof (prove)
using this:
\<one> <# (U #> inv g) = \<one> <# (V #> inv g)

goal (1 subgoal):
 1. U #> inv g = V #> inv g
[PROOF STEP]
by (metis subsetL lcos_mult_one)
[PROOF STATE]
proof (state)
this:
U #> inv g = V #> inv g

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "(U #> inv g) #> g = (V #> inv g) #> g"
[PROOF STATE]
proof (prove)
using this:
U #> inv g = V #> inv g

goal (1 subgoal):
 1. U #> inv g #> g = V #> inv g #> g
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
U #> inv g #> g = V #> inv g #> g

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "U #> (inv g \<otimes> g) = V #> (inv g \<otimes> g)"
[PROOF STATE]
proof (prove)
using this:
U #> inv g #> g = V #> inv g #> g

goal (1 subgoal):
 1. U #> inv g \<otimes> g = V #> inv g \<otimes> g
[PROOF STEP]
by (metis coset_mult_assoc g inv_closed subsetG)
[PROOF STATE]
proof (state)
this:
U #> inv g \<otimes> g = V #> inv g \<otimes> g

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
hence "U #> \<one> = V #> \<one>"
[PROOF STATE]
proof (prove)
using this:
U #> inv g \<otimes> g = V #> inv g \<otimes> g

goal (1 subgoal):
 1. U #> \<one> = V #> \<one>
[PROOF STEP]
by (metis g l_inv)
[PROOF STATE]
proof (state)
this:
U #> \<one> = V #> \<one>

goal (1 subgoal):
 1. \<And>x y. \<lbrakk>x \<in> subgroups_of_size p; y \<in> subgroups_of_size p; conjugation_action p g x = conjugation_action p g y\<rbrakk> \<Longrightarrow> x = y
[PROOF STEP]
thus "U = V"
[PROOF STATE]
proof (prove)
using this:
U #> \<one> = V #> \<one>

goal (1 subgoal):
 1. U = V
[PROOF STEP]
by (metis coset_mult_one subsetG)
[PROOF STATE]
proof (state)
this:
U = V

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
inj_on (conjugation_action p g) (subgroups_of_size p)

goal (2 subgoals):
 1. \<And>xa. xa \<in> subgroups_of_size p \<Longrightarrow> conjugation_action p g xa \<in> subgroups_of_size p
 2. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xa. xa \<in> subgroups_of_size p \<Longrightarrow> conjugation_action p g xa \<in> subgroups_of_size p
 2. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
fix P
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>xa. xa \<in> subgroups_of_size p \<Longrightarrow> conjugation_action p g xa \<in> subgroups_of_size p
 2. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
assume "P \<in> subgroups_of_size p"
[PROOF STATE]
proof (state)
this:
P \<in> subgroups_of_size p

goal (2 subgoals):
 1. \<And>xa. xa \<in> subgroups_of_size p \<Longrightarrow> conjugation_action p g xa \<in> subgroups_of_size p
 2. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
thus "conjugation_action p g P \<in> subgroups_of_size p"
[PROOF STATE]
proof (prove)
using this:
P \<in> subgroups_of_size p

goal (1 subgoal):
 1. conjugation_action p g P \<in> subgroups_of_size p
[PROOF STEP]
by (metis fin g conjugation_is_size_invariant)
[PROOF STATE]
proof (state)
this:
conjugation_action p g P \<in> subgroups_of_size p

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
fix P
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
assume P:"P \<in> subgroups_of_size p"
[PROOF STATE]
proof (state)
this:
P \<in> subgroups_of_size p

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
with invg
[PROOF STATE]
proof (chain)
picking this:
inv g \<in> carrier G
P \<in> subgroups_of_size p
[PROOF STEP]
have "conjugation_action p (inv g) P \<in> subgroups_of_size p"
[PROOF STATE]
proof (prove)
using this:
inv g \<in> carrier G
P \<in> subgroups_of_size p

goal (1 subgoal):
 1. conjugation_action p (inv g) P \<in> subgroups_of_size p
[PROOF STEP]
by (metis fin invg conjugation_is_size_invariant)
[PROOF STATE]
proof (state)
this:
conjugation_action p (inv g) P \<in> subgroups_of_size p

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
with invg P
[PROOF STATE]
proof (chain)
picking this:
inv g \<in> carrier G
P \<in> subgroups_of_size p
conjugation_action p (inv g) P \<in> subgroups_of_size p
[PROOF STEP]
have "(inv g) <# (P #> (inv (inv g))) \<in> subgroups_of_size p"
[PROOF STATE]
proof (prove)
using this:
inv g \<in> carrier G
P \<in> subgroups_of_size p
conjugation_action p (inv g) P \<in> subgroups_of_size p

goal (1 subgoal):
 1. inv g <# (P #> inv (inv g)) \<in> subgroups_of_size p
[PROOF STEP]
unfolding conjugation_action_def
[PROOF STATE]
proof (prove)
using this:
inv g \<in> carrier G
P \<in> subgroups_of_size p
(\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) (inv g) P \<in> subgroups_of_size p

goal (1 subgoal):
 1. inv g <# (P #> inv (inv g)) \<in> subgroups_of_size p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
inv g <# (P #> inv (inv g)) \<in> subgroups_of_size p

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
hence 1:"(inv g) <# (P #> g) \<in> subgroups_of_size p"
[PROOF STATE]
proof (prove)
using this:
inv g <# (P #> inv (inv g)) \<in> subgroups_of_size p

goal (1 subgoal):
 1. inv g <# (P #> g) \<in> subgroups_of_size p
[PROOF STEP]
by (metis g inv_inv)
[PROOF STATE]
proof (state)
this:
inv g <# (P #> g) \<in> subgroups_of_size p

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
have "g <# (((inv g) <# (P #> g)) #> inv g) = (\<Union>p \<in> P. {g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. g <# (inv g <# (P #> g) #> inv g) = (\<Union>p\<in>P. {g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g)})
[PROOF STEP]
unfolding r_coset_def l_coset_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>h\<in>\<Union>h\<in>\<Union>h\<in>\<Union>h\<in>P. {h \<otimes> g}. {inv g \<otimes> h}. {h \<otimes> inv g}. {g \<otimes> h}) = (\<Union>p\<in>P. {g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g)})
[PROOF STEP]
by (simp add:m_assoc)
[PROOF STATE]
proof (state)
this:
g <# (inv g <# (P #> g) #> inv g) = (\<Union>p\<in>P. {g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g)})

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
g <# (inv g <# (P #> g) #> inv g) = (\<Union>p\<in>P. {g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g)})

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
from P
[PROOF STATE]
proof (chain)
picking this:
P \<in> subgroups_of_size p
[PROOF STEP]
have PG:"P \<subseteq> carrier G"
[PROOF STATE]
proof (prove)
using this:
P \<in> subgroups_of_size p

goal (1 subgoal):
 1. P \<subseteq> carrier G
[PROOF STEP]
unfolding subgroups_of_size_def
[PROOF STATE]
proof (prove)
using this:
P \<in> {H. subgroup H G \<and> card H = p}

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

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
have "\<forall>p \<in> P.  g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>p\<in>P. g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
proof(auto)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>p. p \<in> P \<Longrightarrow> g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
fix p
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>p. p \<in> P \<Longrightarrow> g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
assume "p \<in> P"
[PROOF STATE]
proof (state)
this:
p \<in> P

goal (1 subgoal):
 1. \<And>p. p \<in> P \<Longrightarrow> g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
with PG
[PROOF STATE]
proof (chain)
picking this:
P \<subseteq> carrier G
p \<in> P
[PROOF STEP]
have p:"p \<in> carrier G"
[PROOF STATE]
proof (prove)
using this:
P \<subseteq> carrier G
p \<in> P

goal (1 subgoal):
 1. p \<in> carrier G
[PROOF STEP]
..
[PROOF STATE]
proof (state)
this:
p \<in> carrier G

goal (1 subgoal):
 1. \<And>p. p \<in> P \<Longrightarrow> g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
with g invg
[PROOF STATE]
proof (chain)
picking this:
g \<in> carrier G
inv g \<in> carrier G
p \<in> carrier G
[PROOF STEP]
have "g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = (g \<otimes> inv g) \<otimes> p \<otimes> (g \<otimes> inv g)"
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G
inv g \<in> carrier G
p \<in> carrier G

goal (1 subgoal):
 1. g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = g \<otimes> inv g \<otimes> p \<otimes> (g \<otimes> inv g)
[PROOF STEP]
by (metis m_assoc m_closed)
[PROOF STATE]
proof (state)
this:
g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = g \<otimes> inv g \<otimes> p \<otimes> (g \<otimes> inv g)

goal (1 subgoal):
 1. \<And>p. p \<in> P \<Longrightarrow> g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = g \<otimes> inv g \<otimes> p \<otimes> (g \<otimes> inv g)

goal (1 subgoal):
 1. \<And>p. p \<in> P \<Longrightarrow> g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
with g invg g p
[PROOF STATE]
proof (chain)
picking this:
g \<in> carrier G
inv g \<in> carrier G
g \<in> carrier G
p \<in> carrier G
g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = g \<otimes> inv g \<otimes> p \<otimes> (g \<otimes> inv g)
[PROOF STEP]
have "... = p"
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier G
inv g \<in> carrier G
g \<in> carrier G
p \<in> carrier G
g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = g \<otimes> inv g \<otimes> p \<otimes> (g \<otimes> inv g)

goal (1 subgoal):
 1. g \<otimes> inv g \<otimes> p \<otimes> (g \<otimes> inv g) = p
[PROOF STEP]
by (metis l_one r_inv r_one)
[PROOF STATE]
proof (state)
this:
g \<otimes> inv g \<otimes> p \<otimes> (g \<otimes> inv g) = p

goal (1 subgoal):
 1. \<And>p. p \<in> P \<Longrightarrow> g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
show "g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p"
[PROOF STATE]
proof (prove)
using this:
g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p

goal (1 subgoal):
 1. g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<forall>p\<in>P. g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
hence "(\<Union>p \<in> P. {g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g)}) = P"
[PROOF STATE]
proof (prove)
using this:
\<forall>p\<in>P. g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g) = p

goal (1 subgoal):
 1. (\<Union>p\<in>P. {g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g)}) = P
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(\<Union>p\<in>P. {g \<otimes> (inv g \<otimes> (p \<otimes> g) \<otimes> inv g)}) = P

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
g <# (inv g <# (P #> g) #> inv g) = P
[PROOF STEP]
have "g <# (((inv g) <# (P #> g)) #> inv g) = P"
[PROOF STATE]
proof (prove)
using this:
g <# (inv g <# (P #> g) #> inv g) = P

goal (1 subgoal):
 1. g <# (inv g <# (P #> g) #> inv g) = P
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
g <# (inv g <# (P #> g) #> inv g) = P

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
with 1
[PROOF STATE]
proof (chain)
picking this:
inv g <# (P #> g) \<in> subgroups_of_size p
g <# (inv g <# (P #> g) #> inv g) = P
[PROOF STEP]
have "P \<in> (\<lambda>P. g <# (P #> inv g)) ` subgroups_of_size p"
[PROOF STATE]
proof (prove)
using this:
inv g <# (P #> g) \<in> subgroups_of_size p
g <# (inv g <# (P #> g) #> inv g) = P

goal (1 subgoal):
 1. P \<in> (\<lambda>P. g <# (P #> inv g)) ` subgroups_of_size p
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
P \<in> (\<lambda>P. g <# (P #> inv g)) ` subgroups_of_size p

goal (1 subgoal):
 1. \<And>x. x \<in> subgroups_of_size p \<Longrightarrow> x \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
with P g
[PROOF STATE]
proof (chain)
picking this:
P \<in> subgroups_of_size p
g \<in> carrier G
P \<in> (\<lambda>P. g <# (P #> inv g)) ` subgroups_of_size p
[PROOF STEP]
show "P \<in> conjugation_action p g ` subgroups_of_size p"
[PROOF STATE]
proof (prove)
using this:
P \<in> subgroups_of_size p
g \<in> carrier G
P \<in> (\<lambda>P. g <# (P #> inv g)) ` subgroups_of_size p

goal (1 subgoal):
 1. P \<in> conjugation_action p g ` subgroups_of_size p
[PROOF STEP]
unfolding conjugation_action_def
[PROOF STATE]
proof (prove)
using this:
P \<in> subgroups_of_size p
g \<in> carrier G
P \<in> (\<lambda>P. g <# (P #> inv g)) ` subgroups_of_size p

goal (1 subgoal):
 1. P \<in> (\<lambda>g\<in>carrier G. \<lambda>P\<in>subgroups_of_size p. g <# (P #> inv g)) g ` subgroups_of_size p
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
P \<in> conjugation_action p g ` subgroups_of_size p

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
bij_betw (conjugation_action p g) (subgroups_of_size p) (subgroups_of_size p)

goal (1 subgoal):
 1. conjugation_action p g \<in> Bij (subgroups_of_size p)
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
conjugation_action p g \<in> extensional (subgroups_of_size p)
bij_betw (conjugation_action p g) (subgroups_of_size p) (subgroups_of_size p)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
conjugation_action p g \<in> extensional (subgroups_of_size p)
bij_betw (conjugation_action p g) (subgroups_of_size p) (subgroups_of_size p)

goal (1 subgoal):
 1. conjugation_action p g \<in> Bij (subgroups_of_size p)
[PROOF STEP]
unfolding BijGroup_def Bij_def
[PROOF STATE]
proof (prove)
using this:
conjugation_action p g \<in> extensional (subgroups_of_size p)
bij_betw (conjugation_action p g) (subgroups_of_size p) (subgroups_of_size p)

goal (1 subgoal):
 1. conjugation_action p g \<in> extensional (subgroups_of_size p) \<inter> {f. bij_betw f (subgroups_of_size p) (subgroups_of_size p)}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
conjugation_action p g \<in> Bij (subgroups_of_size p)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma nodes_in_taken_in_takeSucn: "no \<in> set (take n nodeslist) \<Longrightarrow> no \<in> set (take (Suc n) nodeslist) "
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. no \<in> set (take n nodeslist) \<Longrightarrow> no \<in> set (take (Suc n) nodeslist)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. no \<in> set (take n nodeslist) \<Longrightarrow> no \<in> set (take (Suc n) nodeslist)
[PROOF STEP]
assume no_in_taken: "no \<in> set (take n nodeslist)"
[PROOF STATE]
proof (state)
this:
no \<in> set (take n nodeslist)

goal (1 subgoal):
 1. no \<in> set (take n nodeslist) \<Longrightarrow> no \<in> set (take (Suc n) nodeslist)
[PROOF STEP]
have "set (take n nodeslist) \<subseteq> set (take (Suc n) nodeslist)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (take n nodeslist) \<subseteq> set (take (Suc n) nodeslist)
[PROOF STEP]
apply -
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. set (take n nodeslist) \<subseteq> set (take (Suc n) nodeslist)
[PROOF STEP]
apply (rule set_take_subset_set_take)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. n \<le> Suc n
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
set (take n nodeslist) \<subseteq> set (take (Suc n) nodeslist)

goal (1 subgoal):
 1. no \<in> set (take n nodeslist) \<Longrightarrow> no \<in> set (take (Suc n) nodeslist)
[PROOF STEP]
with no_in_taken
[PROOF STATE]
proof (chain)
picking this:
no \<in> set (take n nodeslist)
set (take n nodeslist) \<subseteq> set (take (Suc n) nodeslist)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
no \<in> set (take n nodeslist)
set (take n nodeslist) \<subseteq> set (take (Suc n) nodeslist)

goal (1 subgoal):
 1. no \<in> set (take (Suc n) nodeslist)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
no \<in> set (take (Suc n) nodeslist)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma inj_on_nsets:
  assumes "inj_on f A"
  shows "inj_on (\<lambda>X. f ` X) ([A]\<^bsup>n\<^esup>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. inj_on ((`) f) ([A]\<^bsup>n\<^esup>)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
inj_on f A

goal (1 subgoal):
 1. inj_on ((`) f) ([A]\<^bsup>n\<^esup>)
[PROOF STEP]
unfolding nsets_def
[PROOF STATE]
proof (prove)
using this:
inj_on f A

goal (1 subgoal):
 1. inj_on ((`) f) {N. N \<subseteq> A \<and> finite N \<and> card N = n}
[PROOF STEP]
by (metis (no_types, lifting) inj_on_inverseI inv_into_image_cancel mem_Collect_eq)