[STATEMENT]
lemma UN_box_eq_UNIV: "(\<Union>i::nat. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Union>i. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Union>i. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV
[PROOF STEP]
have "\<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>Max ((\<lambda>b. \<bar>x \<bullet> b\<bar>)`Basis)\<rceil> + 1)"
    if [simp]: "b \<in> Basis" for x b :: 'a
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
have "\<bar>x \<bullet> b\<bar> \<le> real_of_int \<lceil>\<bar>x \<bullet> b\<bar>\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<bar>x \<bullet> b\<bar> \<le> real_of_int \<lceil>\<bar>x \<bullet> b\<bar>\<rceil>
[PROOF STEP]
by (rule le_of_int_ceiling)
[PROOF STATE]
proof (state)
this:
\<bar>x \<bullet> b\<bar> \<le> real_of_int \<lceil>\<bar>x \<bullet> b\<bar>\<rceil>

goal (1 subgoal):
 1. \<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
\<bar>x \<bullet> b\<bar> \<le> real_of_int \<lceil>\<bar>x \<bullet> b\<bar>\<rceil>

goal (1 subgoal):
 1. \<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
have "\<dots> \<le> real_of_int \<lceil>Max ((\<lambda>b. \<bar>x \<bullet> b\<bar>)`Basis)\<rceil>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int \<lceil>\<bar>x \<bullet> b\<bar>\<rceil> \<le> real_of_int \<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil>
[PROOF STEP]
by (auto intro!: ceiling_mono)
[PROOF STATE]
proof (state)
this:
real_of_int \<lceil>\<bar>x \<bullet> b\<bar>\<rceil> \<le> real_of_int \<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil>

goal (1 subgoal):
 1. \<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
real_of_int \<lceil>\<bar>x \<bullet> b\<bar>\<rceil> \<le> real_of_int \<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil>

goal (1 subgoal):
 1. \<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
have "\<dots> < real_of_int (\<lceil>Max ((\<lambda>b. \<bar>x \<bullet> b\<bar>)`Basis)\<rceil> + 1)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. real_of_int \<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
real_of_int \<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)

goal (1 subgoal):
 1. \<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
\<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)

goal (1 subgoal):
 1. \<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
\<bar>x \<bullet> b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>x \<bullet> b\<bar>\<rceil> + 1)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
?b \<in> Basis \<Longrightarrow> \<bar>?x \<bullet> ?b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>?x \<bullet> b\<bar>\<rceil> + 1)

goal (1 subgoal):
 1. (\<Union>i. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?b \<in> Basis \<Longrightarrow> \<bar>?x \<bullet> ?b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>?x \<bullet> b\<bar>\<rceil> + 1)
[PROOF STEP]
have "\<exists>n::nat. \<forall>b\<in>Basis. \<bar>x \<bullet> b\<bar> < real n" for x :: 'a
[PROOF STATE]
proof (prove)
using this:
?b \<in> Basis \<Longrightarrow> \<bar>?x \<bullet> ?b\<bar> < real_of_int (\<lceil>MAX b\<in>Basis. \<bar>?x \<bullet> b\<bar>\<rceil> + 1)

goal (1 subgoal):
 1. \<exists>n. \<forall>b\<in>Basis. \<bar>x \<bullet> b\<bar> < real n
[PROOF STEP]
by (metis order.strict_trans reals_Archimedean2)
[PROOF STATE]
proof (state)
this:
\<exists>n. \<forall>b\<in>Basis. \<bar>?x \<bullet> b\<bar> < real n

goal (1 subgoal):
 1. (\<Union>i. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<exists>n. \<forall>b\<in>Basis. \<bar>?x \<bullet> b\<bar> < real n

goal (1 subgoal):
 1. (\<Union>i. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV
[PROOF STEP]
have "\<And>x b::'a. \<And>n::nat.  \<bar>x \<bullet> b\<bar> < real n \<longleftrightarrow> - real n < x \<bullet> b \<and> x \<bullet> b < real n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x b n. (\<bar>x \<bullet> b\<bar> < real n) = (- real n < x \<bullet> b \<and> x \<bullet> b < real n)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<bar>?x \<bullet> ?b\<bar> < real ?n) = (- real ?n < ?x \<bullet> ?b \<and> ?x \<bullet> ?b < real ?n)

goal (1 subgoal):
 1. (\<Union>i. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<exists>n. \<forall>b\<in>Basis. \<bar>?x \<bullet> b\<bar> < real n
(\<bar>?x \<bullet> ?b\<bar> < real ?n) = (- real ?n < ?x \<bullet> ?b \<and> ?x \<bullet> ?b < real ?n)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
\<exists>n. \<forall>b\<in>Basis. \<bar>?x \<bullet> b\<bar> < real n
(\<bar>?x \<bullet> ?b\<bar> < real ?n) = (- real ?n < ?x \<bullet> ?b \<and> ?x \<bullet> ?b < real ?n)

goal (1 subgoal):
 1. (\<Union>i. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV
[PROOF STEP]
by (auto simp: box_def inner_sum_left inner_Basis sum.If_cases)
[PROOF STATE]
proof (state)
this:
(\<Union>i. box (- (real i *\<^sub>R One)) (real i *\<^sub>R One)) = UNIV

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma fold_const_fa_Mult_eq_NumE:
  assumes "fold_const_fa (Mult a b) = Num x"
  obtains y z where "fold_const_fa a = Num y" "fold_const_fa b = Num z" "x = y * z"
  | y where "fold_const_fa a = Num 0" "x = 0"
  | y where "fold_const_fa b = Num 0" "x = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>y z. \<lbrakk>fold_const_fa a = Num y; fold_const_fa b = Num z; x = y * z\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>fold_const_fa a = Num 0; x = 0\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>fold_const_fa b = Num 0; x = 0\<rbrakk> \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
fold_const_fa (Mult a b) = Num x

goal (1 subgoal):
 1. \<lbrakk>\<And>y z. \<lbrakk>fold_const_fa a = Num y; fold_const_fa b = Num z; x = y * z\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>fold_const_fa a = Num 0; x = 0\<rbrakk> \<Longrightarrow> thesis; \<lbrakk>fold_const_fa b = Num 0; x = 0\<rbrakk> \<Longrightarrow> thesis\<rbrakk> \<Longrightarrow> thesis
[PROOF STEP]
by atomize_elim (auto simp: fold_const_fa.simps split!: option.splits if_splits
      elim!: dest_Num_fa_Some dest_Num_fa_None)


[STATEMENT]
lemma (in aGroup) nsum_minus:"\<forall>j \<le> n. f j \<in> carrier A \<Longrightarrow>
                    -\<^sub>a (nsum A f n) = nsum A (\<lambda>x\<in>{j. j \<le> n}. -\<^sub>a (f x)) n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>j\<le>n. f j \<in> carrier A \<Longrightarrow> -\<^sub>a \<Sigma>\<^sub>e A f n = \<Sigma>\<^sub>e A (\<lambda>x\<in>{j. j \<le> n}. -\<^sub>a f x) n
[PROOF STEP]
apply (simp add:nsum_minusTr)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma column_add_code_nth [code abstract]: "vec_nth (column_add A a b q) = column_add_row A a b q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (column_add A a b q) = column_add_row A a b q
[PROOF STEP]
unfolding column_add_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (\<chi>i j. if j = a then A $ i $ a + A $ i $ b * q else A $ i $ j) = column_add_row A a b q
[PROOF STEP]
unfolding column_add_row_def[abs_def]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ($) (\<chi>i j. if j = a then A $ i $ a + A $ i $ b * q else A $ i $ j) = (\<lambda>i. \<chi>j. if j = a then A $ i $ a + A $ i $ b * q else A $ i $ j)
[PROOF STEP]
by auto


[STATEMENT]
lemma distinct_concat':
  "\<lbrakk> distinct (list_neq xs []);
     \<And> ys. ys \<in> set xs \<Longrightarrow> distinct ys;
     \<And> ys zs. \<lbrakk> ys \<in> set xs ; zs \<in> set xs ; ys \<noteq> zs \<rbrakk> \<Longrightarrow> set ys \<inter> set zs = {}
   \<rbrakk> \<Longrightarrow> distinct (concat xs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>distinct (list_neq xs []); \<And>ys. ys \<in> set xs \<Longrightarrow> distinct ys; \<And>ys zs. \<lbrakk>ys \<in> set xs; zs \<in> set xs; ys \<noteq> zs\<rbrakk> \<Longrightarrow> set ys \<inter> set zs = {}\<rbrakk> \<Longrightarrow> distinct (concat xs)
[PROOF STEP]
by (induct xs, auto split: if_splits)


[STATEMENT]
lemma has_vderiv_on_sq_mtx_linear:
  "D (\<lambda>t. exp ((t - t\<^sub>0) *\<^sub>R A) *\<^sub>V s) = (\<lambda>t. A *\<^sub>V (exp ((t - t\<^sub>0) *\<^sub>R A) *\<^sub>V s)) on {t\<^sub>0--t}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1.  D (\<lambda>t. exp ((t - t\<^sub>0) *\<^sub>R A) *\<^sub>V s) = (\<lambda>t. A *\<^sub>V (exp ((t - t\<^sub>0) *\<^sub>R A) *\<^sub>V s)) on {t\<^sub>0--t}
[PROOF STEP]
by (rule poly_derivatives)+ (auto simp: exp_times_scaleR_commute sq_mtx_times_vec_assoc)


[STATEMENT]
lemma tendsto_arcosh_at_left_1: "(arcosh \<longlongrightarrow> 0) (at_right (1::real))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (arcosh \<longlongrightarrow> 0) (at_right 1)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (arcosh \<longlongrightarrow> 0) (at_right 1)
[PROOF STEP]
have "(arcosh \<longlongrightarrow> arcosh 1) (at_right (1::real))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (arcosh \<longlongrightarrow> arcosh 1) (at_right 1)
[PROOF STEP]
by (rule tendsto_arcosh_strong) (auto simp: eventually_at intro!: exI[of _ 1])
[PROOF STATE]
proof (state)
this:
(arcosh \<longlongrightarrow> arcosh 1) (at_right 1)

goal (1 subgoal):
 1. (arcosh \<longlongrightarrow> 0) (at_right 1)
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
(arcosh \<longlongrightarrow> arcosh 1) (at_right 1)

goal (1 subgoal):
 1. (arcosh \<longlongrightarrow> 0) (at_right 1)
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
(arcosh \<longlongrightarrow> 0) (at_right 1)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Sup_img_rule[refine_vcg]:
  "\<lbrakk> \<And>x. x\<in>S \<Longrightarrow> f x \<le> SPEC \<Phi> \<rbrakk> \<Longrightarrow> Sup(f`S) \<le> SPEC \<Phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>x. x \<in> S \<Longrightarrow> f x \<le> SPEC \<Phi>) \<Longrightarrow> Sup (f ` S) \<le> SPEC \<Phi>
[PROOF STEP]
by (auto simp: SUP_img_rule_complete[symmetric])


[STATEMENT]
lemma fin_edges: "finite E"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite E
[PROOF STEP]
using wellformed finV
[PROOF STATE]
proof (prove)
using this:
?e \<in> E \<Longrightarrow> ?e \<subseteq> V
finite V

goal (1 subgoal):
 1. finite E
[PROOF STEP]
by (meson PowI finite_Pow_iff finite_subset subsetI)


[STATEMENT]
lemma list_encode_eq: "list_encode x = list_encode y \<longleftrightarrow> x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (list_encode x = list_encode y) = (x = y)
[PROOF STEP]
by (rule inj_list_encode [THEN inj_eq])


[STATEMENT]
lemma sum_encode_eq: "sum_encode x = sum_encode y \<longleftrightarrow> x = y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (sum_encode x = sum_encode y) = (x = y)
[PROOF STEP]
by (rule inj_sum_encode [THEN inj_eq])


[STATEMENT]
lemma (in FinGroupRepresentation) notIrr_decompose :
  "\<not> IrrFinGroupRepresentation G smult V
        \<Longrightarrow> \<exists>U W. GSubspace U \<and> U \<noteq> 0 \<and> U \<noteq> V \<and> GSubspace W \<and> W \<noteq> 0
          \<and> W \<noteq> V \<and> V = U \<oplus> W"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> IrrFinGroupRepresentation G (\<cdot>) V \<Longrightarrow> \<exists>U W. (RModule FG (\<cdot>) U \<and> U \<subseteq> V) \<and> U \<noteq> 0 \<and> U \<noteq> V \<and> (RModule FG (\<cdot>) W \<and> W \<subseteq> V) \<and> W \<noteq> 0 \<and> W \<noteq> V \<and> V = U \<oplus> W
[PROOF STEP]
using notIrr Maschke_proper
[PROOF STATE]
proof (prove)
using this:
\<not> IrrFinGroupRepresentation G (\<cdot>) V \<Longrightarrow> \<exists>U. (RModule FG (\<cdot>) U \<and> U \<subseteq> V) \<and> U \<noteq> 0 \<and> U \<noteq> V
\<lbrakk>RModule FG (\<cdot>) ?U \<and> ?U \<subseteq> V; ?U \<noteq> 0; ?U \<noteq> V\<rbrakk> \<Longrightarrow> \<exists>W. (RModule FG (\<cdot>) W \<and> W \<subseteq> V) \<and> W \<noteq> 0 \<and> W \<noteq> V \<and> V = W \<oplus> ?U

goal (1 subgoal):
 1. \<not> IrrFinGroupRepresentation G (\<cdot>) V \<Longrightarrow> \<exists>U W. (RModule FG (\<cdot>) U \<and> U \<subseteq> V) \<and> U \<noteq> 0 \<and> U \<noteq> V \<and> (RModule FG (\<cdot>) W \<and> W \<subseteq> V) \<and> W \<noteq> 0 \<and> W \<noteq> V \<and> V = U \<oplus> W
[PROOF STEP]
by blast


[STATEMENT]
lemma eq: "[| \<And>x. x\<in>A \<Longrightarrow> x\<in>B; \<And>x. x\<in>B \<Longrightarrow> x\<in>A |] ==> A=B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<And>x. x \<in> A \<Longrightarrow> x \<in> B; \<And>x. x \<in> B \<Longrightarrow> x \<in> A\<rbrakk> \<Longrightarrow> A = B
[PROOF STEP]
by auto


[STATEMENT]
lemma imp_eqvt:
  shows "pi\<bullet>(A\<longrightarrow>B) = ((pi\<bullet>A)\<longrightarrow>(pi\<bullet>B))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pi \<bullet> (A \<longrightarrow> B) = (pi \<bullet> A \<longrightarrow> pi \<bullet> B)
[PROOF STEP]
by (simp add: perm_bool)


[STATEMENT]
lemma continuous_map_open [intro]:
  "continuous_map T1 T2 f \<Longrightarrow> openin T2 U \<Longrightarrow> openin T1 (f-`U \<inter> topspace(T1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>continuous_map T1 T2 f; openin T2 U\<rbrakk> \<Longrightarrow> openin T1 (f -` U \<inter> topspace T1)
[PROOF STEP]
unfolding continuous_map_alt
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(\<forall>U. openin T2 U \<longrightarrow> openin T1 (f -` U \<inter> topspace T1)) \<and> f ` topspace T1 \<subseteq> topspace T2; openin T2 U\<rbrakk> \<Longrightarrow> openin T1 (f -` U \<inter> topspace T1)
[PROOF STEP]
by auto


[STATEMENT]
lemma star_left_unfold_equal:
  "1 \<squnion> x * x\<^sup>\<star> = x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<squnion> x\<^sup>+ = x\<^sup>\<star>
[PROOF STEP]
by (metis sup_right_isotone order.antisym mult_right_isotone mult_1_right star_left_induct star_left_unfold)


[STATEMENT]
lemma out2_bet_out:
  assumes "B Out A C" and
    "B Out X P" and
    "Bet A X C"
  shows "B Out A P \<and> B Out C P"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B Out A P \<and> B Out C P
[PROOF STEP]
by (smt Out_def Tarski_neutral_dimensionless.l6_7 Tarski_neutral_dimensionless_axioms assms(1) assms(2) assms(3) between_exchange2 between_symmetry)


[STATEMENT]
lemma bit_exp_iff [bit_simps]:
  \<open>bit (2 ^ m) n \<longleftrightarrow> possible_bit TYPE('a) n \<and> m = n\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. bit ((2::'a) ^ m) n = (possible_bit TYPE('a) n \<and> m = n)
[PROOF STEP]
by (auto simp add: bit_iff_odd exp_div_exp_eq possible_bit_def)


[STATEMENT]
lemma nat_to_tm_is_inv_of_tm_to_nat: "nat_to_tm (tm_to_nat tm) = tm"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. nat_to_tm (tm_to_nat tm) = tm
[PROOF STEP]
by (simp add: nat_list_to_tm_is_inv_of_tm_to_nat_list nat_to_tm_def tm_to_nat_def)


[STATEMENT]
lemma to_univ_poly_closed:
  assumes "i \<le> n"
  assumes "p \<in> carrier (R[\<X>\<^bsub>Suc n\<^esub>])"
  shows "to_univ_poly (Suc n) i p \<in> carrier (UP (R[\<X>\<^bsub>n\<^esub>]))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. to_univ_poly (Suc n) i p \<in> carrier (UP (R [\<X>\<^bsub>n\<^esub>]))
[PROOF STEP]
using to_univ_poly_is_hom[of i n] assms
[PROOF STATE]
proof (prove)
using this:
i \<le> n \<Longrightarrow> to_univ_poly (Suc n) i \<in> ring_hom (R [\<X>\<^bsub>Suc n\<^esub>]) (UP (R [\<X>\<^bsub>n\<^esub>]))
i \<le> n
p \<in> carrier (R [\<X>\<^bsub>Suc n\<^esub>])

goal (1 subgoal):
 1. to_univ_poly (Suc n) i p \<in> carrier (UP (R [\<X>\<^bsub>n\<^esub>]))
[PROOF STEP]
unfolding  ring_hom_def
[PROOF STATE]
proof (prove)
using this:
i \<le> n \<Longrightarrow> to_univ_poly (Suc n) i \<in> {h \<in> carrier (R [\<X>\<^bsub>Suc n\<^esub>]) \<rightarrow> carrier (UP (R [\<X>\<^bsub>n\<^esub>])). (\<forall>x y. x \<in> carrier (R [\<X>\<^bsub>Suc n\<^esub>]) \<and> y \<in> carrier (R [\<X>\<^bsub>Suc n\<^esub>]) \<longrightarrow> h (x \<otimes>\<^bsub>R [\<X>\<^bsub>Suc n\<^esub>]\<^esub> y) = h x \<otimes>\<^bsub>UP (R [\<X>\<^bsub>n\<^esub>])\<^esub> h y \<and> h (x \<oplus>\<^bsub>R [\<X>\<^bsub>Suc n\<^esub>]\<^esub> y) = h x \<oplus>\<^bsub>UP (R [\<X>\<^bsub>n\<^esub>])\<^esub> h y) \<and> h \<one>\<^bsub>R [\<X>\<^bsub>Suc n\<^esub>]\<^esub> = \<one>\<^bsub>UP (R [\<X>\<^bsub>n\<^esub>])\<^esub>}
i \<le> n
p \<in> carrier (R [\<X>\<^bsub>Suc n\<^esub>])

goal (1 subgoal):
 1. to_univ_poly (Suc n) i p \<in> carrier (UP (R [\<X>\<^bsub>n\<^esub>]))
[PROOF STEP]
by blast


[STATEMENT]
lemma pow2_le_abs: "(a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b::real\<bar>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)
[PROOF STEP]
(*<*)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)
[PROOF STEP]
have "(a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2)
[PROOF STEP]
by (simp add: numeral_2_eq_2)
[PROOF STATE]
proof (state)
this:
(a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2)

goal (1 subgoal):
 1. (a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2)

goal (1 subgoal):
 1. (a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)
[PROOF STEP]
have "\<dots> = (\<bar>a\<bar> \<le> \<bar>b\<bar>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)
[PROOF STEP]
proof
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2 \<Longrightarrow> \<bar>a\<bar> \<le> \<bar>b\<bar>
 2. \<bar>a\<bar> \<le> \<bar>b\<bar> \<Longrightarrow> \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2
[PROOF STEP]
assume "\<bar>a\<bar> \<le> \<bar>b\<bar>"
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar> \<le> \<bar>b\<bar>

goal (2 subgoals):
 1. \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2 \<Longrightarrow> \<bar>a\<bar> \<le> \<bar>b\<bar>
 2. \<bar>a\<bar> \<le> \<bar>b\<bar> \<Longrightarrow> \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2
[PROOF STEP]
thus "\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2"
[PROOF STATE]
proof (prove)
using this:
\<bar>a\<bar> \<le> \<bar>b\<bar>

goal (1 subgoal):
 1. \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2
[PROOF STEP]
by (rule power_mono) simp
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2

goal (1 subgoal):
 1. \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2 \<Longrightarrow> \<bar>a\<bar> \<le> \<bar>b\<bar>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2 \<Longrightarrow> \<bar>a\<bar> \<le> \<bar>b\<bar>
[PROOF STEP]
assume "\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2"
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2

goal (1 subgoal):
 1. \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2 \<Longrightarrow> \<bar>a\<bar> \<le> \<bar>b\<bar>
[PROOF STEP]
hence "\<bar>a\<bar>^(Suc 1) \<le> \<bar>b\<bar>^(Suc 1)"
[PROOF STATE]
proof (prove)
using this:
\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2

goal (1 subgoal):
 1. \<bar>a\<bar> ^ Suc 1 \<le> \<bar>b\<bar> ^ Suc 1
[PROOF STEP]
by (simp add: numeral_2_eq_2)
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar> ^ Suc 1 \<le> \<bar>b\<bar> ^ Suc 1

goal (1 subgoal):
 1. \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2 \<Longrightarrow> \<bar>a\<bar> \<le> \<bar>b\<bar>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar> ^ Suc 1 \<le> \<bar>b\<bar> ^ Suc 1

goal (1 subgoal):
 1. \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2 \<Longrightarrow> \<bar>a\<bar> \<le> \<bar>b\<bar>
[PROOF STEP]
have "0 \<le> \<bar>b\<bar>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 \<le> \<bar>b\<bar>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
0 \<le> \<bar>b\<bar>

goal (1 subgoal):
 1. \<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2 \<Longrightarrow> \<bar>a\<bar> \<le> \<bar>b\<bar>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
\<bar>a\<bar> ^ Suc 1 \<le> \<bar>b\<bar> ^ Suc 1
0 \<le> \<bar>b\<bar>
[PROOF STEP]
show "\<bar>a\<bar> \<le> \<bar>b\<bar>"
[PROOF STATE]
proof (prove)
using this:
\<bar>a\<bar> ^ Suc 1 \<le> \<bar>b\<bar> ^ Suc 1
0 \<le> \<bar>b\<bar>

goal (1 subgoal):
 1. \<bar>a\<bar> \<le> \<bar>b\<bar>
[PROOF STEP]
by (rule power_le_imp_le_base)
[PROOF STATE]
proof (state)
this:
\<bar>a\<bar> \<le> \<bar>b\<bar>

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<bar>a\<bar>\<^sup>2 \<le> \<bar>b\<bar>\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)

goal (1 subgoal):
 1. (a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)

goal (1 subgoal):
 1. (a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(a\<^sup>2 \<le> b\<^sup>2) = (\<bar>a\<bar> \<le> \<bar>b\<bar>)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma gauss_normE:
  assumes "g \<in> carrier Q\<^sub>p_x"
  shows "gauss_norm g \<le> val (g k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. gauss_norm g \<le> val (g k)
[PROOF STEP]
apply(cases "k \<le> degree g")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. k \<le> deg Q\<^sub>p g \<Longrightarrow> gauss_norm g \<le> val (g k)
 2. \<not> k \<le> deg Q\<^sub>p g \<Longrightarrow> gauss_norm g \<le> val (g k)
[PROOF STEP]
unfolding gauss_norm_def
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. k \<le> deg Q\<^sub>p g \<Longrightarrow> Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)
 2. \<not> k \<le> deg Q\<^sub>p g \<Longrightarrow> Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
g \<in> carrier (UP Q\<^sub>p)

goal (2 subgoals):
 1. k \<le> deg Q\<^sub>p g \<Longrightarrow> Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)
 2. \<not> k \<le> deg Q\<^sub>p g \<Longrightarrow> Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)
[PROOF STEP]
apply auto[1]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<not> k \<le> deg Q\<^sub>p g \<Longrightarrow> Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<not> k \<le> deg Q\<^sub>p g \<Longrightarrow> Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)
[PROOF STEP]
assume "\<not> k \<le> degree g"
[PROOF STATE]
proof (state)
this:
\<not> k \<le> deg Q\<^sub>p g

goal (1 subgoal):
 1. \<not> k \<le> deg Q\<^sub>p g \<Longrightarrow> Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<not> k \<le> deg Q\<^sub>p g
[PROOF STEP]
have "g k = \<zero>\<^bsub>Q\<^sub>p\<^esub> "
[PROOF STATE]
proof (prove)
using this:
\<not> k \<le> deg Q\<^sub>p g

goal (1 subgoal):
 1. g k = \<zero>
[PROOF STEP]
by (simp add: UPQ.deg_leE assms)
[PROOF STATE]
proof (state)
this:
g k = \<zero>

goal (1 subgoal):
 1. \<not> k \<le> deg Q\<^sub>p g \<Longrightarrow> Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
g k = \<zero>
[PROOF STEP]
show "Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)"
[PROOF STATE]
proof (prove)
using this:
g k = \<zero>

goal (1 subgoal):
 1. Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)
[PROOF STEP]
by (simp add: local.val_zero)
[PROOF STATE]
proof (state)
this:
Min (val ` g ` {..deg Q\<^sub>p g}) \<le> val (g k)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma finite_cone_empty[simp]: "finite_cone {} = {0\<^sub>v n}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite_cone {} = {0\<^sub>v n}
[PROOF STEP]
by (auto simp: finite_cone_def nonneg_lincomb_def)


[STATEMENT]
lemma inv_character_eq_principal_dchar_iff [simp]:
  "inv_character \<chi> = principal_dchar n \<longleftrightarrow> \<chi> = principal_dchar n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (inv_character \<chi> = principal_dchar n) = (\<chi> = principal_dchar n)
[PROOF STEP]
by (auto simp add: fun_eq_iff inv_character_def principal_dchar_def)


[STATEMENT]
lemma finite_rtrancl_delta_Image:
  "finite ({((r,s),(delta a r,delta a s))| r s a. a : A}^* `` {(init r, init s)})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite ({((r, s), delta a r, delta a s) |r s a. a \<in> A}\<^sup>* `` {(init r, init s)})
[PROOF STEP]
unfolding rtrancl_fold_product Image_singleton
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite {b. ((init r, init s), b) \<in> {((r, s), fold delta w r, fold delta w s) |r s w. w \<in> lists A}}
[PROOF STEP]
by (auto intro: finite_subset[OF _ finite_cartesian_product[OF fin fin]])


[STATEMENT]
lemma meyer_1: "x\<^sup>\<star> = (1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<star> = ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
proof (rule order.antisym)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
have "(1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> (1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>)
[PROOF STEP]
by (metis mult.assoc mult_onel distrib_right')
[PROOF STATE]
proof (state)
this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>)

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>)

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
have "... = ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> (x \<cdot> x)\<^sup>\<star> + ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) = ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> (x \<cdot> x)\<^sup>\<star> + ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis distrib_left mult.assoc)
[PROOF STATE]
proof (state)
this:
((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) = ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> (x \<cdot> x)\<^sup>\<star> + ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) = ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> (x \<cdot> x)\<^sup>\<star> + ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
have "... = (x \<cdot> x) \<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> (x \<cdot> x)\<^sup>\<star> + ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis combine_common_factor distrib_right)
[PROOF STATE]
proof (state)
this:
((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> (x \<cdot> x)\<^sup>\<star> + ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> (x \<cdot> x)\<^sup>\<star> + ((x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>) \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
have "... = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis add.assoc add_idem' mult.assoc star_slide star_trans_eq)
[PROOF STATE]
proof (state)
this:
(x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> (x \<cdot> x)\<^sup>\<star> + (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
have "... = 1 + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (1::'a) + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis star_unfoldl_eq)
[PROOF STATE]
proof (state)
this:
(x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (1::'a) + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (1::'a) + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
have "... = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis add_comm add_idem' add.left_commute star_unfoldl_eq)
[PROOF STATE]
proof (state)
this:
(1::'a) + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star> + x \<cdot> x \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
have "(1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> (1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = (1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
using this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (1 subgoal):
 1. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis mult_1_left distrib_right')
[PROOF STATE]
proof (state)
this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
have "1 + x \<le> (1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) + x \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis mult_1_right star_unfoldl_eq subdistl)
[PROOF STATE]
proof (state)
this:
(1::'a) + x \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (2 subgoals):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
 2. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
(1::'a) + x \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
show "x\<^sup>\<star> \<le> (1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
using this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<cdot> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
(1::'a) + x \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (1 subgoal):
 1. x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis B23 mult.assoc)
[PROOF STATE]
proof (state)
this:
x\<^sup>\<star> \<le> ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (1 subgoal):
 1. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
have "(1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>
[PROOF STEP]
by (metis mult_1_left distrib_right')
[PROOF STATE]
proof (state)
this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (1 subgoal):
 1. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
thus "(1 + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>"
[PROOF STATE]
proof (prove)
using this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> = (x \<cdot> x)\<^sup>\<star> + x \<cdot> (x \<cdot> x)\<^sup>\<star>

goal (1 subgoal):
 1. ((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>
[PROOF STEP]
by (metis local.add_zeror local.join.sup_least local.mult_isol_var local.mult_oner local.star_ext local.star_invol local.star_iso local.star_subdist_var_2 local.star_trans_eq local.subdistl_eq)
[PROOF STATE]
proof (state)
this:
((1::'a) + x) \<cdot> (x \<cdot> x)\<^sup>\<star> \<le> x\<^sup>\<star>

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma all_nth_imp_all_set:
  "\<lbrakk>\<forall>i < length xs. P(xs!i); x \<in> set xs\<rbrakk> \<Longrightarrow> P x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>i<length xs. P (xs ! i); x \<in> set xs\<rbrakk> \<Longrightarrow> P x
[PROOF STEP]
by (auto simp add: set_conv_nth)


[STATEMENT]
lemma incrementI2:
  "NSDERIV f x :> D \<Longrightarrow>
    increment f x h = ( *f* f) (hypreal_of_real x + h) - hypreal_of_real (f x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. NSDERIV f x :> D \<Longrightarrow> increment f x h = (*f* f) (hypreal_of_real x + h) - hypreal_of_real (f x)
[PROOF STEP]
by (erule NSdifferentiableI [THEN incrementI])


[STATEMENT]
lemma rwof_cons: "\<lbrakk>is_rwof_invar m0 cond step I; rwof m0 cond step s\<rbrakk> \<Longrightarrow> I s"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>is_rwof_invar m0 cond step I; rwof m0 cond step s\<rbrakk> \<Longrightarrow> I s
[PROOF STEP]
unfolding is_rwof_invar_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>m0 \<le>\<^sub>n SPEC I \<and> (\<forall>s. rwof m0 cond step s \<and> I s \<and> cond s \<longrightarrow> step s \<le>\<^sub>n SPEC I); rwof m0 cond step s\<rbrakk> \<Longrightarrow> I s
[PROOF STEP]
using establish_rwof_invar[of m0 I cond step s]
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>m0 \<le>\<^sub>n SPEC I; \<And>s. \<lbrakk>rwof m0 cond step s; I s; cond s\<rbrakk> \<Longrightarrow> step s \<le>\<^sub>n SPEC I; rwof m0 cond step s\<rbrakk> \<Longrightarrow> I s

goal (1 subgoal):
 1. \<lbrakk>m0 \<le>\<^sub>n SPEC I \<and> (\<forall>s. rwof m0 cond step s \<and> I s \<and> cond s \<longrightarrow> step s \<le>\<^sub>n SPEC I); rwof m0 cond step s\<rbrakk> \<Longrightarrow> I s
[PROOF STEP]
by blast


[STATEMENT]
lemma lunit_simps [simp]:
    assumes "ide f"
    shows "arr \<l>[f]" and "src \<l>[f] = src f" and "trg \<l>[f] = trg f"
    and "dom \<l>[f] = trg f \<star> f" and "cod \<l>[f] = f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (arr \<l>[f] &&& src \<l>[f] = src f) &&& trg \<l>[f] = trg f &&& local.dom \<l>[f] = trg f \<star> f &&& cod \<l>[f] = f
[PROOF STEP]
using assms lunit_in_hom
[PROOF STATE]
proof (prove)
using this:
ide f
ide ?f \<Longrightarrow> \<guillemotleft>\<l>[?f] : src ?f \<rightarrow> trg ?f\<guillemotright>
ide ?f \<Longrightarrow> \<guillemotleft>\<l>[?f] : trg ?f \<star> ?f \<Rightarrow> ?f\<guillemotright>

goal (1 subgoal):
 1. (arr \<l>[f] &&& src \<l>[f] = src f) &&& trg \<l>[f] = trg f &&& local.dom \<l>[f] = trg f \<star> f &&& cod \<l>[f] = f
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrakk>ide f; \<And>f. ide f \<Longrightarrow> \<guillemotleft>\<l>[f] : src f \<rightarrow> trg f\<guillemotright>\<rbrakk> \<Longrightarrow> local.dom \<l>[f] = trg f \<star> f
 2. \<lbrakk>ide f; \<And>f. ide f \<Longrightarrow> \<guillemotleft>\<l>[f] : src f \<rightarrow> trg f\<guillemotright>\<rbrakk> \<Longrightarrow> cod \<l>[f] = f
[PROOF STEP]
using assms lunit_in_hom
[PROOF STATE]
proof (prove)
using this:
ide f
ide ?f \<Longrightarrow> \<guillemotleft>\<l>[?f] : src ?f \<rightarrow> trg ?f\<guillemotright>
ide ?f \<Longrightarrow> \<guillemotleft>\<l>[?f] : trg ?f \<star> ?f \<Rightarrow> ?f\<guillemotright>

goal (2 subgoals):
 1. \<lbrakk>ide f; \<And>f. ide f \<Longrightarrow> \<guillemotleft>\<l>[f] : src f \<rightarrow> trg f\<guillemotright>\<rbrakk> \<Longrightarrow> local.dom \<l>[f] = trg f \<star> f
 2. \<lbrakk>ide f; \<And>f. ide f \<Longrightarrow> \<guillemotleft>\<l>[f] : src f \<rightarrow> trg f\<guillemotright>\<rbrakk> \<Longrightarrow> cod \<l>[f] = f
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>ide f; \<And>f. ide f \<Longrightarrow> \<guillemotleft>\<l>[f] : src f \<rightarrow> trg f\<guillemotright>\<rbrakk> \<Longrightarrow> cod \<l>[f] = f
[PROOF STEP]
using assms lunit_in_hom
[PROOF STATE]
proof (prove)
using this:
ide f
ide ?f \<Longrightarrow> \<guillemotleft>\<l>[?f] : src ?f \<rightarrow> trg ?f\<guillemotright>
ide ?f \<Longrightarrow> \<guillemotleft>\<l>[?f] : trg ?f \<star> ?f \<Rightarrow> ?f\<guillemotright>

goal (1 subgoal):
 1. \<lbrakk>ide f; \<And>f. ide f \<Longrightarrow> \<guillemotleft>\<l>[f] : src f \<rightarrow> trg f\<guillemotright>\<rbrakk> \<Longrightarrow> cod \<l>[f] = f
[PROOF STEP]
by blast


[STATEMENT]
lemma countable_INT[intro, simp]: "i \<in> I \<Longrightarrow> countable (A i) \<Longrightarrow> countable (\<Inter>i\<in>I. A i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>i \<in> I; countable (A i)\<rbrakk> \<Longrightarrow> countable (\<Inter> (A ` I))
[PROOF STEP]
by (blast intro: countable_subset)


[STATEMENT]
lemma stream_eq_Stream_iff: "s = x ## t \<longleftrightarrow> (shd s = x \<and> stl s = t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (s = x ## t) = (shd s = x \<and> stl s = t)
[PROOF STEP]
by (cases s) simp


[STATEMENT]
lemma tvsT_tsubstT: "tvsT (tsubstT \<sigma> \<rho>) = \<Union> {tvsT (\<rho> a s) | a s. (a, s) \<in> tvsT \<sigma>}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tvsT (tsubstT \<sigma> \<rho>) = \<Union> {tvsT (\<rho> a s) |a s. (a, s) \<in> tvsT \<sigma>}
[PROOF STEP]
by (induction \<sigma>) fastforce+


[STATEMENT]
lemma nth_rotate:
  \<open>rotate m xs ! n = xs ! ((m + n) mod length xs)\<close> if \<open>n < length xs\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. rotate m xs ! n = xs ! ((m + n) mod length xs)
[PROOF STEP]
using that
[PROOF STATE]
proof (prove)
using this:
n < length xs

goal (1 subgoal):
 1. rotate m xs ! n = xs ! ((m + n) mod length xs)
[PROOF STEP]
apply (auto simp add: rotate_drop_take nth_append not_less less_diff_conv ac_simps dest!: le_Suc_ex)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. n + m mod length xs < length xs \<Longrightarrow> xs ! (n + m mod length xs) = xs ! ((m + n) mod length xs)
 2. \<And>na. \<lbrakk>n < length xs; n + m mod length xs = na + length xs\<rbrakk> \<Longrightarrow> xs ! (n - (length xs - m mod length xs)) = xs ! ((m + n) mod length xs)
[PROOF STEP]
apply (metis add.commute mod_add_right_eq mod_less)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>na. \<lbrakk>n < length xs; n + m mod length xs = na + length xs\<rbrakk> \<Longrightarrow> xs ! (n - (length xs - m mod length xs)) = xs ! ((m + n) mod length xs)
[PROOF STEP]
apply (metis (no_types, lifting) Nat.diff_diff_right add.commute add_diff_cancel_right' diff_le_self dual_order.strict_trans2 length_greater_0_conv less_nat_zero_code list.size(3) mod_add_right_eq mod_add_self2 mod_le_divisor mod_less)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma covering_space_locally_connected:
  fixes p :: "'a::real_normed_vector \<Rightarrow> 'b::real_normed_vector"
  assumes "locally connected C" "covering_space C p S"
  shows "locally connected S"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. locally connected S
[PROOF STEP]
using assms covering_space_locally_connected_eq
[PROOF STATE]
proof (prove)
using this:
locally connected C
covering_space C p S
covering_space ?C ?p ?S \<Longrightarrow> locally connected ?S = locally connected ?C

goal (1 subgoal):
 1. locally connected S
[PROOF STEP]
by blast


[STATEMENT]
lemma neg_meas_set_opp:
  assumes "signed_measure_space.neg_meas_set M (\<lambda> A. - \<mu> A) A"
  shows "pos_meas_set A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pos_meas_set A
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pos_meas_set A
[PROOF STEP]
have m_meas_neg : "signed_measure M  (\<lambda> A. - \<mu> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. signed_measure M (\<lambda>A. - \<mu> A)
[PROOF STEP]
using assms signed_measure_space_def
[PROOF STATE]
proof (prove)
using this:
signed_measure_space.neg_meas_set M (\<lambda>A. - \<mu> A) A
signed_measure_space ?M ?\<mu> \<equiv> signed_measure ?M ?\<mu>

goal (1 subgoal):
 1. signed_measure M (\<lambda>A. - \<mu> A)
[PROOF STEP]
by (simp add: sgn_meas signed_measure_minus)
[PROOF STATE]
proof (state)
this:
signed_measure M (\<lambda>A. - \<mu> A)

goal (1 subgoal):
 1. pos_meas_set A
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
signed_measure M (\<lambda>A. - \<mu> A)

goal (1 subgoal):
 1. pos_meas_set A
[PROOF STEP]
by (metis assms ereal_uminus_le_0_iff m_meas_neg pos_meas_setI
        signed_measure_space.intro signed_measure_space.neg_meas_set_def)
[PROOF STATE]
proof (state)
this:
pos_meas_set A

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma Some_in_map_option_image [simp]: "Some x \<in> map_option f ` A \<longleftrightarrow> (\<exists>y. x = f y \<and> Some y \<in> A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (Some x \<in> map_option f ` A) = (\<exists>y. x = f y \<and> Some y \<in> A)
[PROOF STEP]
by(auto intro: rev_image_eqI dest: sym)


[STATEMENT]
lemma cong_cong_mod_int: "[a = b] (mod m) \<longleftrightarrow> [a mod m = b mod m] (mod m)"
  for a b :: int
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. [a = b] (mod m) = [a mod m = b mod m] (mod m)
[PROOF STEP]
by simp


[STATEMENT]
lemma insert_MPT[code] :
  "insert (MPT m) xs = (case xs of
    [] \<Rightarrow> (MPT m) |
    (x#xs) \<Rightarrow> MPT (Mapping.update x (insert (case Mapping.lookup m x of None \<Rightarrow> empty | Some t' \<Rightarrow> t') xs) m))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Prefix_Tree.insert (MPT m) xs = (case xs of [] \<Rightarrow> MPT m | x # xs \<Rightarrow> MPT (Mapping.update x (Prefix_Tree.insert (case Mapping.lookup m x of None \<Rightarrow> Prefix_Tree.empty | Some t' \<Rightarrow> t') xs) m))
[PROOF STEP]
apply (cases xs; simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a list. xs = a # list \<Longrightarrow> Prefix_Tree.insert (MPT m) (a # list) = MPT (Mapping.update a (Prefix_Tree.insert (case Mapping.lookup m a of None \<Rightarrow> Prefix_Tree.empty | Some t' \<Rightarrow> t') list) m)
[PROOF STEP]
by (simp add: MPT_def lookup.rep_eq update.rep_eq)


[STATEMENT]
lemma "steps0 (1, [], [Oc]) tm_semi_id_gt0 2 = (1, [], [Oc])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. steps0 (1, [], [Oc]) tm_semi_id_gt0 2 = (1, [], [Oc])
[PROOF STEP]
by (simp add: step.simps steps.simps numeral_eqs_upto_12 tm_semi_id_gt0_def)


[STATEMENT]
lemma diff_cancel_imp_eq: "\<lbrakk> 0 < (n::nat);  n + i - j = n \<rbrakk> \<Longrightarrow> i = j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>0 < n; n + i - j = n\<rbrakk> \<Longrightarrow> i = j
[PROOF STEP]
by simp


[STATEMENT]
lemma flow_unique:
  assumes "t \<in> existence_ivl t0 x0"
  assumes "phi t0 = x0"
  assumes "\<And>t. t \<in> existence_ivl t0 x0 \<Longrightarrow> (phi has_vector_derivative f t (phi t)) (at t)"
  assumes "\<And>t. t \<in> existence_ivl t0 x0 \<Longrightarrow> phi t \<in> X"
  shows "flow t0 x0 t = phi t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. flow t0 x0 t = phi t
[PROOF STEP]
apply (rule maximal_existence_flow[where K="existence_ivl t0 x0"])
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. (phi solves_ode f) (existence_ivl t0 x0) X
 2. phi t0 = x0
 3. is_interval (existence_ivl t0 x0)
 4. t0 \<in> existence_ivl t0 x0
 5. existence_ivl t0 x0 \<subseteq> T
 6. t \<in> existence_ivl t0 x0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (phi solves_ode f) (existence_ivl t0 x0) X
[PROOF STEP]
by (auto intro!: solves_odeI simp: has_vderiv_on_def assms at_within_open[OF _ open_existence_ivl])
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. phi t0 = x0
 2. is_interval (existence_ivl t0 x0)
 3. t0 \<in> existence_ivl t0 x0
 4. existence_ivl t0 x0 \<subseteq> T
 5. t \<in> existence_ivl t0 x0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. phi t0 = x0
[PROOF STEP]
by fact
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. is_interval (existence_ivl t0 x0)
 2. t0 \<in> existence_ivl t0 x0
 3. existence_ivl t0 x0 \<subseteq> T
 4. t \<in> existence_ivl t0 x0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_interval (existence_ivl t0 x0)
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. t0 \<in> existence_ivl t0 x0
 2. existence_ivl t0 x0 \<subseteq> T
 3. t \<in> existence_ivl t0 x0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t0 \<in> existence_ivl t0 x0
[PROOF STEP]
using mem_existence_ivl_iv_defined[OF \<open>t \<in> existence_ivl t0 x0\<close>]
[PROOF STATE]
proof (prove)
using this:
t0 \<in> T
x0 \<in> X

goal (1 subgoal):
 1. t0 \<in> existence_ivl t0 x0
[PROOF STEP]
by simp
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. existence_ivl t0 x0 \<subseteq> T
 2. t \<in> existence_ivl t0 x0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. existence_ivl t0 x0 \<subseteq> T
[PROOF STEP]
by (simp add: existence_ivl_subset)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<in> existence_ivl t0 x0
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. t \<in> existence_ivl t0 x0
[PROOF STEP]
by fact
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma greaterThanAtMost_empty_iff[simp]: "{k<\<^sub>a..\<le>\<^sub>al} = {} \<longleftrightarrow> \<not> k <\<^sub>a l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ({k<\<^sub>a..\<le>\<^sub>al} = {}) = (\<not> k <\<^sub>a l)
[PROOF STEP]
by (auto simp: dual.le_less_trans)


[STATEMENT]
lemma finite_elements_mat[simp]: "finite (elements_mat A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (elements_mat A)
[PROOF STEP]
unfolding elements_mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. finite (set (concat (map (\<lambda>i. map (\<lambda>j. A $$ (i, j)) [0..<dim_col A]) [0..<dim_row A])))
[PROOF STEP]
by (rule finite_set)


[STATEMENT]
lemma DIVISION_0:
  "\<forall>m n::nat. if n = id 0 then m div n = id 0 \<and> m mod n = m else m = m div n * n + m mod n \<and> m mod n < n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>m n. if n = id 0 then m div n = id 0 \<and> m mod n = m else m = m div n * n + m mod n \<and> m mod n < n
[PROOF STEP]
by simp


[STATEMENT]
lemma (in equivalence) is_closedI:
  assumes closed: "\<And>x y. \<lbrakk>x .= y; x \<in> A; y \<in> carrier S\<rbrakk> \<Longrightarrow> y \<in> A"
    and S: "A \<subseteq> carrier S"
  shows "is_closed A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. is_closed A
[PROOF STEP]
unfolding eq_is_closed_def eq_closure_of_def elem_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> carrier S \<and> {y \<in> carrier S. Bex A ((.=) y)} = A
[PROOF STEP]
using S
[PROOF STATE]
proof (prove)
using this:
A \<subseteq> carrier S

goal (1 subgoal):
 1. A \<subseteq> carrier S \<and> {y \<in> carrier S. Bex A ((.=) y)} = A
[PROOF STEP]
by (blast dest: closed sym)


[STATEMENT]
lemma has_fps_expansion_tan' [fps_expansion_intros]:
  "tan has_fps_expansion fps_tan (1 :: 'a :: {banach, real_normed_field, field_char_0})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tan has_fps_expansion fps_tan (1::'a)
[PROOF STEP]
using has_fps_expansion_tan[of 1]
[PROOF STATE]
proof (prove)
using this:
(\<lambda>x. tan ((1::?'b1) * x)) has_fps_expansion fps_tan (1::?'b1)

goal (1 subgoal):
 1. tan has_fps_expansion fps_tan (1::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma pprt_singleton[simp]: "pprt (singleton_matrix j i (x::_::lattice_ring)) = singleton_matrix j i (pprt x)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pprt (singleton_matrix j i x) = singleton_matrix j i (pprt x)
[PROOF STEP]
apply (simp add: pprt_def sup_matrix_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. combine_matrix sup (singleton_matrix j i x) 0 = singleton_matrix j i (sup x (0::'a))
[PROOF STEP]
apply (simp add: Rep_matrix_inject[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Rep_matrix (combine_matrix sup (singleton_matrix j i x) 0) = Rep_matrix (singleton_matrix j i (sup x (0::'a)))
[PROOF STEP]
apply (rule ext)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>xa xaa. Rep_matrix (combine_matrix sup (singleton_matrix j i x) 0) xa xaa = Rep_matrix (singleton_matrix j i (sup x (0::'a))) xa xaa
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma iex_disj_distrib2: "
  (\<diamond> t1 I1. \<diamond> t2 (I2 t1). P t1 t2 \<or> Q t1 t2) =
  ((\<diamond> t1 I1. \<diamond> t2 (I2 t1). P t1 t2) \<or> (\<diamond> t1 I1. \<diamond> t2 (I2 t1). Q t1 t2))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<diamond> t1 I1. \<diamond> t2 I2 t1. P t1 t2 \<or> Q t1 t2) = ((\<diamond> t1 I1. \<diamond> t2 I2 t1. P t1 t2) \<or> (\<diamond> t1 I1. \<diamond> t2 I2 t1. Q t1 t2))
[PROOF STEP]
by blast


[STATEMENT]
lemma imod_1: "(enat m) mod eSuc 0 = 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. enat m mod eSuc 0 = 0
[PROOF STEP]
by (simp add: eSuc_enat)


[STATEMENT]
lemma
  iFROM_plus: "x \<in> [n\<dots>] \<Longrightarrow> x + k \<in> [n\<dots>]" and
  iFROM_Suc: "x \<in> [n\<dots>] \<Longrightarrow> Suc x \<in> [n\<dots>]" and
  iFROM_minus: "\<lbrakk> x \<in> [n\<dots>]; k \<le> x - n \<rbrakk> \<Longrightarrow> x - k \<in> [n\<dots>]" and
  iFROM_pred: "n < x  \<Longrightarrow> x - Suc 0 \<in> [n\<dots>]"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((x \<in> [n\<dots>] \<Longrightarrow> x + k \<in> [n\<dots>]) &&& (x \<in> [n\<dots>] \<Longrightarrow> Suc x \<in> [n\<dots>])) &&& (\<lbrakk>x \<in> [n\<dots>]; k \<le> x - n\<rbrakk> \<Longrightarrow> x - k \<in> [n\<dots>]) &&& (n < x \<Longrightarrow> x - Suc 0 \<in> [n\<dots>])
[PROOF STEP]
by (simp add: iFROM_iff)+


[STATEMENT]
lemma card_paths_with_new: "card paths_with_new = Suc (card paths)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card paths_with_new = Suc (card paths)
[PROOF STEP]
unfolding paths_with_new_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. card (insert P_new paths) = Suc (card paths)
[PROOF STEP]
using P_new_new
[PROOF STATE]
proof (prove)
using this:
P_new \<notin> paths

goal (1 subgoal):
 1. card (insert P_new paths) = Suc (card paths)
[PROOF STEP]
by (simp add: finite_paths)


[STATEMENT]
lemma lfinite_lrel: "lfinite xs \<Longrightarrow> lrel R xs ys \<Longrightarrow> lfinite ys"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>lfinite xs; lrel R xs ys\<rbrakk> \<Longrightarrow> lfinite ys
[PROOF STEP]
proof (induct xs arbitrary: ys rule: lfinite.induct)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>ys. lrel R LNil ys \<Longrightarrow> lfinite ys
 2. \<And>x xs ys. \<lbrakk>lfinite xs; \<And>ys. lrel R xs ys \<Longrightarrow> lfinite ys; lrel R (LCons x xs) ys\<rbrakk> \<Longrightarrow> lfinite ys
[PROOF STEP]
case LNil
[PROOF STATE]
proof (state)
this:
lrel R LNil ys

goal (2 subgoals):
 1. \<And>ys. lrel R LNil ys \<Longrightarrow> lfinite ys
 2. \<And>x xs ys. \<lbrakk>lfinite xs; \<And>ys. lrel R xs ys \<Longrightarrow> lfinite ys; lrel R (LCons x xs) ys\<rbrakk> \<Longrightarrow> lfinite ys
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
lrel R LNil ys
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
lrel R LNil ys

goal (1 subgoal):
 1. lfinite ys
[PROOF STEP]
by (cases ys) (auto intro: lfinite.intros)
[PROOF STATE]
proof (state)
this:
lfinite ys

goal (1 subgoal):
 1. \<And>x xs ys. \<lbrakk>lfinite xs; \<And>ys. lrel R xs ys \<Longrightarrow> lfinite ys; lrel R (LCons x xs) ys\<rbrakk> \<Longrightarrow> lfinite ys
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>x xs ys. \<lbrakk>lfinite xs; \<And>ys. lrel R xs ys \<Longrightarrow> lfinite ys; lrel R (LCons x xs) ys\<rbrakk> \<Longrightarrow> lfinite ys
[PROOF STEP]
case (LCons x xs)
[PROOF STATE]
proof (state)
this:
lfinite xs
lrel R xs ?ys \<Longrightarrow> lfinite ?ys
lrel R (LCons x xs) ys

goal (1 subgoal):
 1. \<And>x xs ys. \<lbrakk>lfinite xs; \<And>ys. lrel R xs ys \<Longrightarrow> lfinite ys; lrel R (LCons x xs) ys\<rbrakk> \<Longrightarrow> lfinite ys
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
lfinite xs
lrel R xs ?ys \<Longrightarrow> lfinite ?ys
lrel R (LCons x xs) ys
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
lfinite xs
lrel R xs ?ys \<Longrightarrow> lfinite ?ys
lrel R (LCons x xs) ys

goal (1 subgoal):
 1. lfinite ys
[PROOF STEP]
by (cases ys) (auto intro: lfinite.intros)
[PROOF STATE]
proof (state)
this:
lfinite ys

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma mult_column_mat_1: "A ** mult_column (mat 1) a q = mult_column A a q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A ** mult_column (mat (1::'a)) a q = mult_column A a q
[PROOF STEP]
proof (unfold matrix_matrix_mult_def, unfold mult_column_def, vector, auto)
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
 2. \<And>i ia. ia \<noteq> a \<Longrightarrow> (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ ia) = A $ i $ ia
[PROOF STEP]
fix i
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>i. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
 2. \<And>i ia. ia \<noteq> a \<Longrightarrow> (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ ia) = A $ i $ ia
[PROOF STEP]
show "(\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
let ?f="\<lambda>k.  A $ i $ k * (mat (1::'a) $ k $ a * q)"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
have univ_rw:"UNIV = (UNIV-{a}) \<union> {a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV = UNIV - {a} \<union> {a}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
UNIV = UNIV - {a} \<union> {a}

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
have "sum ?f UNIV = sum ?f ((UNIV-{a}) \<union> {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>UNIV - {a} \<union> {a}. A $ i $ k * (mat (1::'a) $ k $ a * q))
[PROOF STEP]
using univ_rw
[PROOF STATE]
proof (prove)
using this:
UNIV = UNIV - {a} \<union> {a}

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>UNIV - {a} \<union> {a}. A $ i $ k * (mat (1::'a) $ k $ a * q))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>UNIV - {a} \<union> {a}. A $ i $ k * (mat (1::'a) $ k $ a * q))

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>UNIV - {a} \<union> {a}. A $ i $ k * (mat (1::'a) $ k $ a * q))

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
have "... = sum ?f (UNIV-{a}) + sum ?f {a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV - {a} \<union> {a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>UNIV - {a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) + (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q))
[PROOF STEP]
by (rule sum.union_disjoint, auto)
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV - {a} \<union> {a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>UNIV - {a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) + (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q))

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV - {a} \<union> {a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>UNIV - {a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) + (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q))

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
have "... = sum ?f {a}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV - {a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) + (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q))
[PROOF STEP]
unfolding mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV - {a}. A $ i $ k * ((\<chi>i j. if i = j then 1::'a else (0::'a)) $ k $ a * q)) + (\<Sum>k\<in>{a}. A $ i $ k * ((\<chi>i j. if i = j then 1::'a else (0::'a)) $ k $ a * q)) = (\<Sum>k\<in>{a}. A $ i $ k * ((\<chi>i j. if i = j then 1::'a else (0::'a)) $ k $ a * q))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV - {a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) + (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q))

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV - {a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) + (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) = (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q))

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
have "... = A $ i $ a * q"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
unfolding mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>{a}. A $ i $ k * ((\<chi>i j. if i = j then 1::'a else (0::'a)) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>{a}. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV. A $ i $ k * (mat (1::'a) $ k $ a * q)) = A $ i $ a * q

goal (1 subgoal):
 1. \<And>i ia. ia \<noteq> a \<Longrightarrow> (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ ia) = A $ i $ ia
[PROOF STEP]
fix j
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>i ia. ia \<noteq> a \<Longrightarrow> (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ ia) = A $ i $ ia
[PROOF STEP]
show "(\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
let ?f="\<lambda>k. A $ i $ k * mat (1::'a) $ k $ j"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
have univ_rw:"UNIV = (UNIV-{j}) \<union> {j}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. UNIV = UNIV - {j} \<union> {j}
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
UNIV = UNIV - {j} \<union> {j}

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
have "sum ?f UNIV = sum ?f ((UNIV-{j}) \<union> {j})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>UNIV - {j} \<union> {j}. A $ i $ k * mat (1::'a) $ k $ j)
[PROOF STEP]
using univ_rw
[PROOF STATE]
proof (prove)
using this:
UNIV = UNIV - {j} \<union> {j}

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>UNIV - {j} \<union> {j}. A $ i $ k * mat (1::'a) $ k $ j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>UNIV - {j} \<union> {j}. A $ i $ k * mat (1::'a) $ k $ j)

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>UNIV - {j} \<union> {j}. A $ i $ k * mat (1::'a) $ k $ j)

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
have "... = sum ?f (UNIV-{j}) + sum ?f {j}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV - {j} \<union> {j}. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>UNIV - {j}. A $ i $ k * mat (1::'a) $ k $ j) + (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j)
[PROOF STEP]
by (rule sum.union_disjoint, auto)
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV - {j} \<union> {j}. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>UNIV - {j}. A $ i $ k * mat (1::'a) $ k $ j) + (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j)

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV - {j} \<union> {j}. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>UNIV - {j}. A $ i $ k * mat (1::'a) $ k $ j) + (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j)

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
have "... = sum ?f {j}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV - {j}. A $ i $ k * mat (1::'a) $ k $ j) + (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j)
[PROOF STEP]
unfolding mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV - {j}. A $ i $ k * (\<chi>i j. if i = j then 1::'a else (0::'a)) $ k $ j) + (\<Sum>k\<in>{j}. A $ i $ k * (\<chi>i j. if i = j then 1::'a else (0::'a)) $ k $ j) = (\<Sum>k\<in>{j}. A $ i $ k * (\<chi>i j. if i = j then 1::'a else (0::'a)) $ k $ j)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV - {j}. A $ i $ k * mat (1::'a) $ k $ j) + (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j)

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV - {j}. A $ i $ k * mat (1::'a) $ k $ j) + (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j) = (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j)

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
have "... = A $ i $ j"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
unfolding mat_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<Sum>k\<in>{j}. A $ i $ k * (\<chi>i j. if i = j then 1::'a else (0::'a)) $ k $ j) = A $ i $ j
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>{j}. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j

goal (1 subgoal):
 1. (\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j
[PROOF STEP]
.
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
(\<Sum>k\<in>UNIV. A $ i $ k * mat (1::'a) $ k $ j) = A $ i $ j

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma norm_bound_Basis_lt: "b \<in> Basis \<Longrightarrow> norm x < e \<Longrightarrow> \<bar>inner x b\<bar> < e"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>b \<in> Basis; norm x < e\<rbrakk> \<Longrightarrow> \<bar>inner x b\<bar> < e
[PROOF STEP]
by (metis Basis_le_norm le_less_trans)


[STATEMENT]
lemma index_eqlen_conv[simp]: "index l x = length l \<longleftrightarrow> x\<notin>set l"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (index l x = length l) = (x \<notin> set l)
[PROOF STEP]
by (auto simp: index_size_conv)


[STATEMENT]
lemma GroupHomSetD_Im : "T \<in> GroupHomSet G H \<Longrightarrow> T ` G \<subseteq> H"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T \<in> GroupHomSet G H \<Longrightarrow> T ` G \<subseteq> H
[PROOF STEP]
unfolding GroupHomSet_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. T \<in> {T. GroupHom G T} \<inter> {T. T ` G \<subseteq> H} \<Longrightarrow> T ` G \<subseteq> H
[PROOF STEP]
by fast


[STATEMENT]
lemma tllist_all2_preserve2 [quot_preserve]:
  assumes q1: "Quotient3 R1 Abs1 Rep1"
  and q2: "Quotient3 R2 Abs2 Rep2"
  shows "(tllist_all2 ((Rep1 ---> Rep1 ---> id) R1) ((Rep2 ---> Rep2 ---> id) R2)) = (=)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. tllist_all2 ((Rep1 ---> Rep1 ---> id) R1) ((Rep2 ---> Rep2 ---> id) R2) = (=)
[PROOF STEP]
by (simp add: fun_eq_iff map_fun_def comp_def Quotient3_rel_rep[OF q1] Quotient3_rel_rep[OF q2]
    tllist_all2_eq)


[STATEMENT]
lemma pow_res_mult':
  assumes "n > 0"
  assumes "a \<in> carrier Q\<^sub>p"
  assumes "b \<in> carrier Q\<^sub>p"
  assumes "c \<in> carrier Q\<^sub>p"
  assumes "d \<in> carrier Q\<^sub>p"
  assumes "e \<in> carrier Q\<^sub>p"
  assumes "f \<in> carrier Q\<^sub>p"
  assumes "pow_res n a = pow_res n d"
  assumes "pow_res n b = pow_res n e"
  assumes "pow_res n c = pow_res n f"
  shows "pow_res n (a \<otimes> b \<otimes> c) = pow_res n (d \<otimes> e \<otimes> f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pow_res n (a \<otimes> b \<otimes> c) = pow_res n (d \<otimes> e \<otimes> f)
[PROOF STEP]
proof-
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. pow_res n (a \<otimes> b \<otimes> c) = pow_res n (d \<otimes> e \<otimes> f)
[PROOF STEP]
have "pow_res n (a \<otimes> b) = pow_res n (d \<otimes> e)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. pow_res n (a \<otimes> b) = pow_res n (d \<otimes> e)
[PROOF STEP]
using pow_res_mult assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>0 < ?n; ?a \<in> carrier Q\<^sub>p; ?b \<in> carrier Q\<^sub>p; ?c \<in> carrier Q\<^sub>p; ?d \<in> carrier Q\<^sub>p; pow_res ?n ?a = pow_res ?n ?c; pow_res ?n ?b = pow_res ?n ?d\<rbrakk> \<Longrightarrow> pow_res ?n (?a \<otimes> ?b) = pow_res ?n (?c \<otimes> ?d)
0 < n
a \<in> carrier Q\<^sub>p
b \<in> carrier Q\<^sub>p
c \<in> carrier Q\<^sub>p
d \<in> carrier Q\<^sub>p
e \<in> carrier Q\<^sub>p
f \<in> carrier Q\<^sub>p
pow_res n a = pow_res n d
pow_res n b = pow_res n e
pow_res n c = pow_res n f

goal (1 subgoal):
 1. pow_res n (a \<otimes> b) = pow_res n (d \<otimes> e)
[PROOF STEP]
by meson
[PROOF STATE]
proof (state)
this:
pow_res n (a \<otimes> b) = pow_res n (d \<otimes> e)

goal (1 subgoal):
 1. pow_res n (a \<otimes> b \<otimes> c) = pow_res n (d \<otimes> e \<otimes> f)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
pow_res n (a \<otimes> b) = pow_res n (d \<otimes> e)
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
pow_res n (a \<otimes> b) = pow_res n (d \<otimes> e)

goal (1 subgoal):
 1. pow_res n (a \<otimes> b \<otimes> c) = pow_res n (d \<otimes> e \<otimes> f)
[PROOF STEP]
using pow_res_mult assms
[PROOF STATE]
proof (prove)
using this:
pow_res n (a \<otimes> b) = pow_res n (d \<otimes> e)
\<lbrakk>0 < ?n; ?a \<in> carrier Q\<^sub>p; ?b \<in> carrier Q\<^sub>p; ?c \<in> carrier Q\<^sub>p; ?d \<in> carrier Q\<^sub>p; pow_res ?n ?a = pow_res ?n ?c; pow_res ?n ?b = pow_res ?n ?d\<rbrakk> \<Longrightarrow> pow_res ?n (?a \<otimes> ?b) = pow_res ?n (?c \<otimes> ?d)
0 < n
a \<in> carrier Q\<^sub>p
b \<in> carrier Q\<^sub>p
c \<in> carrier Q\<^sub>p
d \<in> carrier Q\<^sub>p
e \<in> carrier Q\<^sub>p
f \<in> carrier Q\<^sub>p
pow_res n a = pow_res n d
pow_res n b = pow_res n e
pow_res n c = pow_res n f

goal (1 subgoal):
 1. pow_res n (a \<otimes> b \<otimes> c) = pow_res n (d \<otimes> e \<otimes> f)
[PROOF STEP]
by (meson Qp.m_closed)
[PROOF STATE]
proof (state)
this:
pow_res n (a \<otimes> b \<otimes> c) = pow_res n (d \<otimes> e \<otimes> f)

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma of_nat: "f (of_nat n) = f 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f (of_nat n) = f (0::'a)
[PROOF STEP]
using plus_of_nat[of 0 n]
[PROOF STATE]
proof (prove)
using this:
f ((0::'a) + of_nat n) = f (0::'a)

goal (1 subgoal):
 1. f (of_nat n) = f (0::'a)
[PROOF STEP]
by simp


[STATEMENT]
lemma fst_quot_of_fract_0_imp: "fst (quot_of_fract x) = 0 \<Longrightarrow> snd (quot_of_fract x) = 1"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fst (quot_of_fract x) = (0::'a) \<Longrightarrow> snd (quot_of_fract x) = (1::'a)
[PROOF STEP]
by transfer auto


[STATEMENT]
lemma overrides_t_Some_iff:
  "(x \<in> (s \<oplus>\<oplus> t) k) = (x \<in> t k \<or> t k = {} \<and> x \<in> s k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x \<in> (s \<oplus>\<oplus> t) k) = (x \<in> t k \<or> t k = {} \<and> x \<in> s k)
[PROOF STEP]
by (simp add: overrides_t_def)


[STATEMENT]
lemma distinct_fstD: "\<lbrakk> distinct_fst xs; (x, y) \<in> set xs; (x, z) \<in> set xs \<rbrakk> \<Longrightarrow> y = z"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>distinct_fst xs; (x, y) \<in> set xs; (x, z) \<in> set xs\<rbrakk> \<Longrightarrow> y = z
[PROOF STEP]
by(induct xs) auto


[STATEMENT]
lemma atoms_And_append: "atoms (\<^bold>\<And> (as1 @ as2)) = atoms (\<^bold>\<And> as1) \<union>  atoms (\<^bold>\<And> as2)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. atoms \<^bold>\<And>as1 @ as2 = atoms \<^bold>\<And>as1 \<union> atoms \<^bold>\<And>as2
[PROOF STEP]
by (induction as1) auto


[STATEMENT]
lemma smultfunsetI :
  "\<forall>a::'r. \<forall>g\<in>G. \<forall>x\<in>FH. f ( a \<delta>\<delta> g * x ) = (a \<delta>\<delta> g) \<cdot> (f x)
        \<Longrightarrow> f \<in> smultfunset G FH"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>a. \<forall>g\<in>G. \<forall>x\<in>FH. f (a \<delta>\<delta> g * x) = (a \<delta>\<delta> g) \<cdot> f x \<Longrightarrow> f \<in> smultfunset G FH
[PROOF STEP]
unfolding smultfunset_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>a. \<forall>g\<in>G. \<forall>x\<in>FH. f (a \<delta>\<delta> g * x) = (a \<delta>\<delta> g) \<cdot> f x \<Longrightarrow> f \<in> {f. \<forall>a. \<forall>g\<in>G. \<forall>x\<in>FH. f (a \<delta>\<delta> g * x) = (a \<delta>\<delta> g) \<cdot> f x}
[PROOF STEP]
by fast


[STATEMENT]
lemma sumset_subset_Un1: "sumset (A \<union> A') B = sumset A B \<union> sumset A' B"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sumset (A \<union> A') B = sumset A B \<union> sumset A' B
[PROOF STEP]
by (auto simp: sumset_eq)


[STATEMENT]
lemma leq_min_inf: "(m::nat) \<le> n \<longrightarrow> Min {m..n} = m"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. m \<le> n \<longrightarrow> Min {m..n} = m
[PROOF STEP]
by (auto simp: Min_eq_iff)


[STATEMENT]
lemma add_square_ne_zero[simp]: "(y::'a::linordered_idom) > 0 \<Longrightarrow> y + x\<^sup>2 \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (0::'a) < y \<Longrightarrow> y + x\<^sup>2 \<noteq> (0::'a)
[PROOF STEP]
by auto (metis less_add_same_cancel2 power2_less_0)


[STATEMENT]
lemma trs_refinement: "(trs r \<le> trs r') = ((\<forall> x . inpt r x \<longrightarrow> inpt r' x) \<and> (\<forall> x . inpt r x \<longrightarrow> r' x \<le> r x))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (trs r \<le> trs r') = ((\<forall>x. inpt r x \<longrightarrow> inpt r' x) \<and> (\<forall>x. inpt r x \<longrightarrow> r' x \<le> r x))
[PROOF STEP]
by (simp add: trs_def assert_demonic_refinement, simp add: le_fun_def)


[STATEMENT]
lemma ccNeighbors_lub[simp]: "ccNeighbors x (lub Gs) = lub (ccNeighbors x ` Gs)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ccNeighbors x (lub Gs) = lub (ccNeighbors x ` Gs)
[PROOF STEP]
by transfer (auto simp add: lub_set)


[STATEMENT]
lemma right_unique_rel_resource:
  "\<lbrakk> right_total A; right_unique B \<rbrakk> \<Longrightarrow> right_unique (rel_resource A B)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>right_total A; right_unique B\<rbrakk> \<Longrightarrow> right_unique (rel_resource A B)
[PROOF STEP]
unfolding right_unique_alt_def right_total_alt_def rel_resource_conversep[symmetric]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(=) \<le> A\<inverse>\<inverse> OO A; B\<inverse>\<inverse> OO B \<le> (=)\<rbrakk> \<Longrightarrow> rel_resource A\<inverse>\<inverse> B\<inverse>\<inverse> OO rel_resource A B \<le> (=)
[PROOF STEP]
apply(subst rel_resource_eq[symmetric])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(=) \<le> A\<inverse>\<inverse> OO A; B\<inverse>\<inverse> OO B \<le> (=)\<rbrakk> \<Longrightarrow> rel_resource A\<inverse>\<inverse> B\<inverse>\<inverse> OO rel_resource A B \<le> rel_resource (=) (=)
[PROOF STEP]
apply(rule order_trans[OF rel_resource_pos_distr])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>(=) \<le> A\<inverse>\<inverse> OO A; B\<inverse>\<inverse> OO B \<le> (=)\<rbrakk> \<Longrightarrow> rel_resource (A\<inverse>\<inverse> OO A) (B\<inverse>\<inverse> OO B) \<le> rel_resource (=) (=)
[PROOF STEP]
apply(erule (1) rel_resource_mono)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done


[STATEMENT]
lemma less_le: "x < y \<longleftrightarrow> x \<le> y \<and> \<not> x \<approx> y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (x < y) = (x \<le> y \<and> \<not> x \<approx> y)
[PROOF STEP]
by (auto simp add: equiv_def less_le_not_le)


[STATEMENT]
lemma "partition_by_biflows [(1::int, 1::int), (1,2), (2, 1), (1,3)] = ([(1, 1), (2, 1)], [(1, 3)])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. partition_by_biflows [(1, 1), (1, 2), (2, 1), (1, 3)] = ([(1, 1), (2, 1)], [(1, 3)])
[PROOF STEP]
by eval


[STATEMENT]
lemma image_alt_def: "f ` A = {f x |x. x \<in> A}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f ` A = {f x |x. x \<in> A}
[PROOF STEP]
by auto


[STATEMENT]
lemma less_eq_introp:
"-(x \<squnion> -(y \<squnion> z)) = -(x \<squnion> y \<squnion> -z) \<Longrightarrow> y \<sqsubseteq> x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. - (x \<squnion> - (y \<squnion> z)) = - (x \<squnion> y \<squnion> - z) \<Longrightarrow> y \<sqsubseteq> x
[PROOF STEP]
by (metis robbins sup_assoc less_eq_def
            sup_comm[where x=x and y=y])


[STATEMENT]
lemma less_imp_le: "a < b \<Longrightarrow> a <= (b::_::order)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a < b \<Longrightarrow> a \<le> b
[PROOF STEP]
by (simp add: less_def)


[STATEMENT]
lemma exp_cf6_pos: "exp_cf6 x > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < exp_cf6 x
[PROOF STEP]
unfolding exp_cf6_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. 0 < numer_cf6 x / numer_cf6 (- x)
[PROOF STEP]
by (auto simp add: divide_simps numer_cf6_pos)


[STATEMENT]
lemma mapping_linorder_matrix:
  fixes f :: "('a::finite,'b::linorder_stone_relation_algebra_expansion) square"
  shows "matrix_stone_relation_algebra.mapping f \<longleftrightarrow> (\<forall>i . \<exists>j . f (i,j) = top \<and> (\<forall>k . j \<noteq> k \<longrightarrow> f (i,k) = bot))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. matrix_stone_relation_algebra.mapping f = (\<forall>i. \<exists>j. f (i, j) = top \<and> (\<forall>k. j \<noteq> k \<longrightarrow> f (i, k) = bot))
[PROOF STEP]
by (unfold total_linorder_matrix univalent_linorder_matrix) (metis (mono_tags, opaque_lifting) comp_inf.mult_1_right comp_inf.mult_right_zero)


[STATEMENT]
lemma approximation_preproc_floatarith[approximation_preproc]:
  "0 = real_of_float 0"
  "1 = real_of_float 1"
  "0 = Float 0 0"
  "1 = Float 1 0"
  "numeral a = Float (numeral a) 0"
  "numeral a = real_of_float (numeral a)"
  "x - y = x + - y"
  "x / y = x * inverse y"
  "ceiling x = - floor (- x)"
  "log x y = ln y * inverse (ln x)"
  "sin x = cos (pi / 2 - x)"
  "tan x = sin x / cos x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ((0 = real_of_float 0 &&& 1 = real_of_float 1 &&& 0 = Float 0 0) &&& 1 = Float 1 0 &&& numeral a = Float (numeral a) 0 &&& numeral a = real_of_float (numeral a)) &&& (x - y = x + - y &&& x / y = x * inverse y &&& \<lceil>x\<rceil> = - \<lfloor>- x\<rfloor>) &&& log x y = ln y * inverse (ln x) &&& sin x = cos (pi / 2 - x) &&& tan x = sin x / cos x
[PROOF STEP]
by (simp_all add: inverse_eq_divide ceiling_def log_def sin_cos_eq tan_def real_of_float_eq)


[STATEMENT]
lemma "push_impl v (S,B,I,P) \<equiv> (S@[v], B@[length S], I(v\<mapsto>STACK (length S)),
    if E``{v}={} then P else P@[(length S,E``{v})])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. push_impl v (S, B, I, P) \<equiv> (S @ [v], B @ [length S], I(v \<mapsto> STACK (length S)), if E `` {v} = {} then P else P @ [(length S, E `` {v})])
[PROOF STEP]
unfolding push_impl_def GS.push_impl_def GS.P_def GS.S_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. let _ = stat_newnode (); j = length (case (S, B, I, P) of (S, B, I, P) \<Rightarrow> S); Sa = (case (S, B, I, P) of (S, B, I, P) \<Rightarrow> S) @ [v]; Ba = GS.B (S, B, I, P) @ [j]; Ia = GS.I (S, B, I, P)(v \<mapsto> STACK j); P = if E `` {v} = {} then case (S, B, I, P) of (S, B, I, P) \<Rightarrow> P else (case (S, B, I, P) of (S, B, I, P) \<Rightarrow> P) @ [(j, E `` {v})] in (Sa, Ba, Ia, P) \<equiv> (S @ [v], B @ [length S], I(v \<mapsto> STACK (length S)), if E `` {v} = {} then P else P @ [(length S, E `` {v})])
[PROOF STEP]
by (auto simp: Let_def)


[STATEMENT]
lemma poly_cond2_no_rat_root: assumes "poly_cond2 p"
  shows "ipoly p (real_of_rat x) \<noteq> 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. poly (real_of_int_poly p) (real_of_rat x) \<noteq> 0
[PROOF STEP]
using poly_cond_degree_gt_1[of p "real_of_rat x"] assms
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>poly_cond p; 1 < degree p; poly (real_of_int_poly p) (real_of_rat x) = 0\<rbrakk> \<Longrightarrow> real_of_rat x \<notin> \<rat>
poly_cond2 p

goal (1 subgoal):
 1. poly (real_of_int_poly p) (real_of_rat x) \<noteq> 0
[PROOF STEP]
by auto


[STATEMENT]
lemma integrable_continuous_interval:
  fixes f :: "'b::ordered_euclidean_space \<Rightarrow> 'a::banach"
  assumes "continuous_on {a..b} f"
  shows "f integrable_on {a..b}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f integrable_on {a..b}
[PROOF STEP]
by (metis assms integrable_continuous interval_cbox)


[STATEMENT]
lemma sint_of_int_eq:
  "\<lbrakk> - (2 ^ (LENGTH('a) - 1)) \<le> x; x < 2 ^ (LENGTH('a) - 1) \<rbrakk> \<Longrightarrow> sint (of_int x :: ('a::len) word) = x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>- (2 ^ (LENGTH('a) - 1)) \<le> x; x < 2 ^ (LENGTH('a) - 1)\<rbrakk> \<Longrightarrow> sint (word_of_int x) = x
[PROOF STEP]
by (simp add: signed_take_bit_int_eq_self signed_of_int)


[STATEMENT]
lemma awp_iff_stable: "(A \<subseteq> awp F A) = (F \<in> stable A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (A \<subseteq> awp F A) = (F \<in> UNITY.stable A)
[PROOF STEP]
by (simp add: awp_iff_constrains stable_def)


[STATEMENT]
lemma bij_is_maprop:
  assumes "is_bij x" and "is_map x"
  shows "x\<^sup>\<smile> ; x  = 1' \<and> x ; x\<^sup>\<smile> = 1'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x\<^sup>\<smile> ; x = 1' \<and> x ; x\<^sup>\<smile> = 1'
[PROOF STEP]
by (metis assms is_bij_def order.eq_iff is_inj_def is_map_def is_p_fun_def is_sur_def is_total_def)


[STATEMENT]
lemma induced_arrow_eqI:
    assumes "D.cone a' \<chi>'" and "\<guillemotleft>f : a' \<rightarrow> a\<guillemotright>" and "D.cones_map f \<chi> = \<chi>'"
    shows "induced_arrow a' \<chi>' = f"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. induced_arrow a' \<chi>' = f
[PROOF STEP]
using assms is_universal induced_arrow_def
            the1_equality [of "\<lambda>f. f \<in> C.hom a' a \<and> D.cones_map f \<chi> = \<chi>'" f]
[PROOF STATE]
proof (prove)
using this:
D.cone a' \<chi>'
\<guillemotleft>f : a' \<rightarrow> a\<guillemotright>
D.cones_map f \<chi> = \<chi>'
D.cone ?a' ?\<chi>' \<Longrightarrow> \<exists>!f. \<guillemotleft>f : ?a' \<rightarrow> a\<guillemotright> \<and> D.cones_map f \<chi> = ?\<chi>'
induced_arrow ?a' ?\<chi>' = (THE f. \<guillemotleft>f : ?a' \<rightarrow> a\<guillemotright> \<and> D.cones_map f \<chi> = ?\<chi>')
\<lbrakk>\<exists>!x. x \<in> C.hom a' a \<and> D.cones_map x \<chi> = \<chi>'; f \<in> C.hom a' a \<and> D.cones_map f \<chi> = \<chi>'\<rbrakk> \<Longrightarrow> (THE x. x \<in> C.hom a' a \<and> D.cones_map x \<chi> = \<chi>') = f

goal (1 subgoal):
 1. induced_arrow a' \<chi>' = f
[PROOF STEP]
by simp


[STATEMENT]
lemma get_min: "\<lbrakk> heap t;  t \<noteq> Leaf \<rbrakk> \<Longrightarrow> get_min t = Min(set_tree t)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>Leftist_Heap.linorder_class.heap t; t \<noteq> \<langle>\<rangle>\<rbrakk> \<Longrightarrow> get_min t = Min (Tree2.set_tree t)
[PROOF STEP]
by (cases t) (auto simp add: eq_Min_iff)


[STATEMENT]
lemma (in Corps) val_nonpos_inv_pos:"\<lbrakk>valuation K v; x \<in> carrier K;
        \<not> 0 \<le> (v x)\<rbrakk>  \<Longrightarrow> 0 < (v (x\<^bsup>\<hyphen>K\<^esup>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>valuation K v; x \<in> carrier K; \<not> 0 \<le> v x\<rbrakk> \<Longrightarrow> 0 < v (x\<^bsup>\<hyphen> K\<^esup>)
[PROOF STEP]
by (case_tac "x = \<zero>\<^bsub>K\<^esub>", simp add:value_of_zero,
       frule Vr_ring[of v],
       simp add:aneg_le[of "0" "v x"],
       frule value_of_inv[THEN sym, of v x], assumption+,
       frule aless_minus[of "v x" "0"], simp)


[STATEMENT]
lemma div_mult_le:
  \<open>a div b * b \<le> a\<close> for a b :: nat
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. a div b * b \<le> a
[PROOF STEP]
by (fact div_times_less_eq_dividend)


[STATEMENT]
lemma star_unfoldl' [simp]: "1 \<squnion> x \<cdot> (star x) = star x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
have "1 \<squnion> x \<cdot> (star x) = x ^ 0 \<squnion> x \<cdot> Sup{y. \<exists>i. y = x ^ i}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = x ^ zero_class.zero \<squnion> x \<cdot> Sup {y. \<exists>i. y = x ^ i}
[PROOF STEP]
by (simp add: star_def_var1)
[PROOF STATE]
proof (state)
this:
(1::'a) \<squnion> x \<cdot> quantale_class.star x = x ^ zero_class.zero \<squnion> x \<cdot> Sup {y. \<exists>i. y = x ^ i}

goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
(1::'a) \<squnion> x \<cdot> quantale_class.star x = x ^ zero_class.zero \<squnion> x \<cdot> Sup {y. \<exists>i. y = x ^ i}

goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
have "... = x ^ 0 \<squnion> Sup{y. \<exists>i. y = x ^ (i + 1)}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x ^ zero_class.zero \<squnion> x \<cdot> Sup {y. \<exists>i. y = x ^ i} = x ^ zero_class.zero \<squnion> Sup {y. \<exists>i. y = x ^ (i + 1)}
[PROOF STEP]
by (simp add: Sup_distl, metis)
[PROOF STATE]
proof (state)
this:
x ^ zero_class.zero \<squnion> x \<cdot> Sup {y. \<exists>i. y = x ^ i} = x ^ zero_class.zero \<squnion> Sup {y. \<exists>i. y = x ^ (i + 1)}

goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x ^ zero_class.zero \<squnion> x \<cdot> Sup {y. \<exists>i. y = x ^ i} = x ^ zero_class.zero \<squnion> Sup {y. \<exists>i. y = x ^ (i + 1)}

goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
have "... = Sup{y. y = x ^ 0 \<or> (\<exists>i. y = x ^ (i + 1))}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x ^ zero_class.zero \<squnion> Sup {y. \<exists>i. y = x ^ (i + 1)} = Sup {y. y = x ^ zero_class.zero \<or> (\<exists>i. y = x ^ (i + 1))}
[PROOF STEP]
using Sup_sup_pred
[PROOF STATE]
proof (prove)
using this:
?x \<squnion> Sup {y. ?P y} = Sup {y. y = ?x \<or> ?P y}

goal (1 subgoal):
 1. x ^ zero_class.zero \<squnion> Sup {y. \<exists>i. y = x ^ (i + 1)} = Sup {y. y = x ^ zero_class.zero \<or> (\<exists>i. y = x ^ (i + 1))}
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
x ^ zero_class.zero \<squnion> Sup {y. \<exists>i. y = x ^ (i + 1)} = Sup {y. y = x ^ zero_class.zero \<or> (\<exists>i. y = x ^ (i + 1))}

goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
also
[PROOF STATE]
proof (state)
this:
x ^ zero_class.zero \<squnion> Sup {y. \<exists>i. y = x ^ (i + 1)} = Sup {y. y = x ^ zero_class.zero \<or> (\<exists>i. y = x ^ (i + 1))}

goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
have "... = Sup{y. \<exists>i. y = x ^ i}"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. Sup {y. y = x ^ zero_class.zero \<or> (\<exists>i. y = x ^ (i + 1))} = Sup {y. \<exists>i. y = x ^ i}
[PROOF STEP]
by (metis Suc_eq_plus1 power.power.power_Suc power.power_eq_if)
[PROOF STATE]
proof (state)
this:
Sup {y. y = x ^ zero_class.zero \<or> (\<exists>i. y = x ^ (i + 1))} = Sup {y. \<exists>i. y = x ^ i}

goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
finally
[PROOF STATE]
proof (chain)
picking this:
(1::'a) \<squnion> x \<cdot> quantale_class.star x = Sup {y. \<exists>i. y = x ^ i}
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(1::'a) \<squnion> x \<cdot> quantale_class.star x = Sup {y. \<exists>i. y = x ^ i}

goal (1 subgoal):
 1. (1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x
[PROOF STEP]
by (simp add: star_def_var1)
[PROOF STATE]
proof (state)
this:
(1::'a) \<squnion> x \<cdot> quantale_class.star x = quantale_class.star x

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma bool_to_ternary_simp2:  "bool_to_ternary Y = TernaryFalse \<longleftrightarrow> \<not> Y"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (bool_to_ternary Y = TernaryFalse) = (\<not> Y)
[PROOF STEP]
by (metis bool_to_ternary.elims ternaryvalue.distinct(1))


[STATEMENT]
lemma subset_singleton_insert2: "{y} \<subseteq> A \<Longrightarrow> {y} \<subseteq> insert x A"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. {y} \<subseteq> A \<Longrightarrow> {y} \<subseteq> insert x A
[PROOF STEP]
by auto


[STATEMENT]
lemma is_ball_imp_in_Qp:
  assumes "is_ball B"
  shows "B \<subseteq> carrier Q\<^sub>p"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<subseteq> carrier Q\<^sub>p
[PROOF STEP]
unfolding is_ball_def
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. B \<subseteq> carrier Q\<^sub>p
[PROOF STEP]
using assms c_ball_in_Qp is_ball_def
[PROOF STATE]
proof (prove)
using this:
is_ball B
B\<^bsub>?n\<^esub>[?c] \<subseteq> carrier Q\<^sub>p
is_ball ?B = (\<exists>m. \<exists>c\<in>carrier Q\<^sub>p. ?B = B\<^bsub>m\<^esub>[c])

goal (1 subgoal):
 1. B \<subseteq> carrier Q\<^sub>p
[PROOF STEP]
by auto


[STATEMENT]
lemma nsets_mono: "A \<subseteq> B \<Longrightarrow> nsets A n \<subseteq> nsets B n"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. A \<subseteq> B \<Longrightarrow> [A]\<^bsup>n\<^esup> \<subseteq> [B]\<^bsup>n\<^esup>
[PROOF STEP]
by (auto simp: nsets_def)


[STATEMENT]
lemma eval_Inf [simp]:
  "eval (\<Sqinter>A) = \<Sqinter>(eval ` A)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. eval (\<Sqinter> A) = \<Sqinter> (eval ` A)
[PROOF STEP]
by (simp add: Inf_pred_def)


[STATEMENT]
lemma unique_on_intersection:
  assumes sols: "(x solves_ode f) U X" "(y solves_ode f) V X"
  assumes iv_mem: "t0 \<in> U" "t0 \<in> V" and subs: "U \<subseteq> T" "V \<subseteq> T"
  assumes ivls: "is_interval U" "is_interval V"
  assumes iv: "x t0 = y t0"
  assumes mem: "t \<in> U" "t \<in> V"
  shows "x t = y t"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. x t = y t
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. x t = y t
[PROOF STEP]
from
    maximal_existence_flow(2)[OF sols(1) refl          ivls(1) iv_mem(1) subs(1) mem(1)]
    maximal_existence_flow(2)[OF sols(2) iv[symmetric] ivls(2) iv_mem(2) subs(2) mem(2)]
[PROOF STATE]
proof (chain)
picking this:
flow t0 (x t0) t = x t
flow t0 (x t0) t = y t
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
flow t0 (x t0) t = x t
flow t0 (x t0) t = y t

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

goal:
No subgoals!
[PROOF STEP]
qed